Step by step debugging

2013-11-07 Thread Bastien
I'm a big fan of edebug, the Emacs debugger, which allows step through debugging (and breakpoints, and some more fun.) Is there anything similar for Clojure? For example, from an Emacs (cider) REPL, I'd evaluate some Clojure expression, then a window would let me go through a buffer containing a

Re: Step by step debugging

2013-11-07 Thread juan.facorro
Hi Bastien, I think Ritz [1] might be what you are looking for. Although I haven't tried it myself yet, I recently saw the presentation "Ritz, The Missing Clojure Tooling" and really liked what I saw. HTH, J [1]: https://github.com/pallet/ritz [2]: http://w

Re: Step by step debugging

2013-11-07 Thread Bastien
Hi Juan, "juan.facorro" writes: > I think Ritz [1] might be what you are looking for. Although I > haven't tried it myself yet, I recently saw the presentation "Ritz, > The Missing Clojure Tooling" and really liked what I saw. This seems great indeed, I'll watch the presentation carefully. Tha

Re: Step by step debugging

2013-11-07 Thread Phillip Lord
Ritz does some things, but it doesn't do step through like edebug. I've never found anything as nice as edebug in any language; I guess, it's the big advantage of running your editor and whatever you are debugging in the environment. Phil Bastien writes: > I'm a big fan of edebug, the Emacs d

[ANN] friend-oauth2 0.1.0

2013-11-07 Thread Dave Della Costa
Hi folks, friend-oauth2 0.1.0 is out. https://github.com/ddellacosta/friend-oauth2 Changes: - adds credential-fn for injecting your own functionality in the post-3rd-party-authentication stage. Thanks go to Kevin Lynagh (https://github.com/lynaghk) for this feature. - More refactoring of entir

Re: Step by step debugging

2013-11-07 Thread Bastien
phillip.l...@newcastle.ac.uk (Phillip Lord) writes: > Ritz does some things, but it doesn't do step through like edebug. > > I've never found anything as nice as edebug in any language; I guess, > it's the big advantage of running your editor and whatever you are > debugging in the environment. W

Re: What font is used for Clojure on clojure.org?

2013-11-07 Thread Erlis Vidal
Is there any screen cast that shows how to use Cider? I would like to see it in action. I really liked this logo https://github.com/clojure-emacs/cider/issues/399#issuecomment-27805491 I think it blends the Cider concept with the clojure characters ... the other are more colorful but really it loo

Re: What font is used for Clojure on clojure.org?

2013-11-07 Thread Tim Visher
It's funny that in the comments bbatsov and I have already explored this space a bit. :) It seems like everyone has a different experience of drinking cider. I've never drank cider in anything but cups or mugs, and hot cider is always served in a mug in my circles. While it seems like other people

Newbie questions: include external libraries from lein REPL

2013-11-07 Thread Starry SHI
Hi. I am new to clojure, and I find leiningen REPL is a convenient tool for clojure code testing. However, I find I cannot include external java libraries and call functions defined in those libraries from lein REPL. For example, my clojure code needs to compute square root, which is defined in

newbie question: how to include external libraries from Leiningen REPL

2013-11-07 Thread Starry SHI
Hi, I am new to clojure and I find lein REPL very convenient to use. But I have one question: in REPL, how to include functions defined in other libraries and call them in my clojure code? For example, my code need to call square root function defined in clojure.contrib.math (included in clojur

Re: introducing CloServe, a view first web framework in Clojure

2013-11-07 Thread jiawei . zhao
If anyone of you is trying this, I have update my html editor software http://www.mkrrf-it.com/cloedit , with it you can get HTML snippets in Hickory or Hiccup form, which can then be copy/paste to use in Clojure code. Best Regards, Jiawei On Tuesday, November 5, 2013 1:29:14 PM UTC-5, jiawe..

Re: What font is used for Clojure on clojure.org?

2013-11-07 Thread Erlis Vidal
And what about the screencasts? On Nov 7, 2013 8:34 AM, "Tim Visher" wrote: > It's funny that in the comments bbatsov and I have already explored > this space a bit. :) > > It seems like everyone has a different experience of drinking cider. > I've never drank cider in anything but cups or mugs,

Re: Newbie questions: include external libraries from lein REPL

2013-11-07 Thread Cedric Greevey
Assuming the Java or Clojure library is on your classpath, it *should* be usable from the REPL. (import '[java.library SomeClass]) (.foo (SomeClass. 42)) (require '[clojure.contrib.math :as m]) (m/sqrt 42.0) or whatever On Thu, Nov 7, 2013 at 8:00 AM, Starry SHI wrote: > Hi. I am new to c

Re: newbie question: how to include external libraries from Leiningen REPL

2013-11-07 Thread Cedric Greevey
Assuming the Java or Clojure library is on your classpath, it *should* be usable from the REPL. (import '[java.library SomeClass]) (.foo (SomeClass. 42)) (require '[clojure.contrib.math :as m]) (m/sqrt 42.0) or whatever. (Didn't this exact question just get asked by someone five minutes ago?

Re: What font is used for Clojure on clojure.org?

2013-11-07 Thread Tim Visher
Cider _is_ nrepl.el at this point, essentially, so any screencast documenting nrepl.el would get you most of the way there. Also, Cider is _unstable_ at this point. I'm still using nrepl 0.2.0 and it's working fine. I would _not_ recommend upgrading to Cider at this point. On Thu, Nov 7, 2013 at

Re: Step by step debugging

2013-11-07 Thread Alex Miller
If you're willing to look outside of Emacs *shock* *horror*, both Eclipse CCW and IntelliJ Cursive have debuggers that work to some degree with Clojure. On Thursday, November 7, 2013 3:16:17 AM UTC-6, Bastien Guerry wrote: > > I'm a big fan of edebug, the Emacs debugger, which allows step throu

Re: Step by step debugging

2013-11-07 Thread Bastien
Hi Alex, Alex Miller writes: > If you're willing to look outside of Emacs *shock* *horror*, both > Eclipse CCW and IntelliJ Cursive have debuggers that work to some > degree with Clojure. I love testing new tools, I did not sign a life-time contract with any software ;) Is there a video somew

Re: Step by step debugging

2013-11-07 Thread Alex Miller
Not to my knowledge. (if anyone wants to make one, that would be useful hint hint) I would try asking on the CCW list at https://groups.google.com/forum/#!msg/clojuredev-users/ for help on the CCW/Eclipse debugger. For Cursive, there is some info at http://cursiveclojure.com/userguide/repl.html o

Re: ANN: ClojureScript 0.0-2014 - source maps, incremental compilation, and internal changes

2013-11-07 Thread Alan Moore
Just in case it hasn't been mentioned lately... you guys rock! Thank you *so* much for your hard work on these tools... let me know how I can help. Alan On Wednesday, November 6, 2013 12:24:08 PM UTC-8, David Nolen wrote: > Oh, the speed of incremental compilation is now dependent on tools pres

Re: Step by step debugging

2013-11-07 Thread Rob Ashton
There is redl which does some of this too, that's more for the vim workflow though On Thursday, November 7, 2013, Phillip Lord wrote: > > > Ritz does some things, but it doesn't do step through like edebug. > > I've never found anything as nice as edebug in any language; I guess, > it's the big a

Re: newbie question: how to include external libraries from Leiningen REPL

2013-11-07 Thread Mars0i
I'm pretty new, also. The Leiningen documentation that's easy to find has all of the information you need ... but it's not easy to sort out at first. Cedric Greevey gives the answer for standard libraries that usually come with Clojure. For others, I suggest: Find the library name and versio

Re: What are effective ways to debug Clojure code?

2013-11-07 Thread Gary Trakhman
The absolutely most useful thing I reach for time and again is the dbg macro: http://www.learningclojure.com/2010/09/clojure-macro-tutorial-part-i-getting.html (defmacro dbg[x] `(let [x# ~x] (println '~x "=" x#) x#)) My current variation: (defn pprint-str [x] (with-out-str (pp/pprint x))) (d

confused over meta on var

2013-11-07 Thread Phillip Lord
I find myself confused by the metadata on a var. Consider this code: (def a-test-var 10) (pritnln (meta #'a-test-var)) Now when run under "lein test" (by stuffing it into a test namespace), I get this {:ns #, :name a-test-var, :column 1, :line 102, :file tawny/util_test.clj} But, when

Re: Step by step debugging

2013-11-07 Thread Lee Spector
I'd like to chime in here from a background that involved a lot of Common Lisping back in the day. I have been continually dismayed, as I've moved further from Common Lisp, that debugging facilities that are so basic and ubiquitous and helpful in that world are considered exotic or specialized

Re: Step by step debugging

2013-11-07 Thread Rob Ashton
There is redl which does some of this too, that's more for the vim workflow though On Thursday, November 7, 2013, Phillip Lord wrote: > > > Ritz does some things, but it doesn't do step through like edebug. > > I've never found anything as nice as edebug in any language; I guess, > it's the big a

ANN: byte vector backed, utf8 strings for Clojure

2013-11-07 Thread Paul Stadig
I have released a byte vector backed, utf8 string library for Clojure. It exists because when doing lots of ASCII string processing, Java strings can be pretty hefty. Using byte arrays to represent strings can be annoying for various reasons (mutability, bad equality semantics). However, byte vecto

Re: Step by step debugging

2013-11-07 Thread Mimmo Cosenza
Hi Lee, you made me cry (almost). I've been working in the eighties on Lisp Machine (both Symbolics and Texas Instruments) and I still have to see a programming environment comparable to the one I was using 30 years ago. At the moment we're still far way from those happy days. Well written!

[ANN] Will be giving a Lecture on Clojure to Computer Science Students in Tunisia

2013-11-07 Thread Rafik NACCACHE
Hi all, I am particularly excited to announce that I will be presenting Clojure to my Former University, the "Faculté des Sciences de Tunis" ! Hope it will drain interest from the young engineers there ! It will be scheduled on November the 20th ! Regards, Rafik -- -- You received this me

Re: Step by step debugging

2013-11-07 Thread Andy Fingerhut
Lee, I am curious whether you would consider it "too tied to a particular dev environment" if the kind of minimal debugging features you wish for worked from Leiningen's REPL? i.e. 'lein repl' I do not know if Ritz can work in such an environment or not, but I am guessing it might be easier to ge

Re: ANN: byte vector backed, utf8 strings for Clojure

2013-11-07 Thread Andy Fingerhut
Very cool. I read through your README (thank you for that), and did not notice an answer to the question of: does seq on a utf8 string return a sequence of Unicode code points? Java UTF-16 code points (with pairs of them for characters outside the BMP)? Something else? It would be great to have

[ANN] Clojure 1.6.0-alpha2 release

2013-11-07 Thread Alex Miller
Clojure 1.6.0-alpha2 is now available. Try it via - Download: http://central.maven.org/maven2/org/clojure/clojure/1.6.0-alpha2/ - Leiningen: [org.clojure/clojure "1.6.0-alpha2"] Clojure 1.6.0-alpha2 has the following changes from 1.6.0-alpha1: 1) Reverted: CLJ-1252 (keywords starting with a

Re: [ANN] Clojure 1.6.0-alpha2 release

2013-11-07 Thread Michael Klishin
2013/11/8 Alex Miller > 3) Added: changelog for 1.6.0. > https://github.com/clojure/clojure/blob/master/changes.md > > This is *much* more detailed and human-oriented than any other change log Clojure/core has ever produced. And it's posted shortly after the release. Good job! -- MK http://git

Re: Step by step debugging

2013-11-07 Thread Alex Miller
I believe the locals are actually *not* available because they are proactively cleared to help GC. Setting the *compiler-options* var with :disable-locals-clearing can turn that off. Which is probably what you often want in dev, but is not the default. You can also set this via command line

Re: ANN: byte vector backed, utf8 strings for Clojure

2013-11-07 Thread Paul Stadig
On Thursday, November 7, 2013 2:57:03 PM UTC-5, Andy Fingerhut wrote: > > Very cool. > > I read through your README (thank you for that), and did not notice an > answer to the question of: does seq on a utf8 string return a sequence of > Unicode code points? Java UTF-16 code points (with pairs o

Re: Step by step debugging

2013-11-07 Thread Lee Spector
Andy, I do think that if a debugging feature has to be limited to a particular environment then Leiningen would be preferable to any other, since it's so simple to install and use (and maybe most people have it anyway?) that people who use other environments could, without too much trouble, do

Re: Step by step debugging

2013-11-07 Thread Lee Spector
What would I need to do to get it to not only retain locals but also show them to me when I hit an error? -Lee On Nov 7, 2013, at 4:22 PM, Alex Miller wrote: > I believe the locals are actually *not* available because they are > proactively cleared to help GC. > > Setting the *compiler-op

Re: [ANN] Clojure 1.6.0-alpha2 release

2013-11-07 Thread Alex Miller
This is exactly the same change log that has been posted for every release? I just added the 1.6 stuff. Hoping to be a little more diligent in keeping it up to date as we go. Alex On Thursday, November 7, 2013 3:16:32 PM UTC-6, Michael Klishin wrote: > > 2013/11/8 Alex Miller > > >> 3) Added:

Re: ANN: ClojureScript 0.0-2014 - source maps, incremental compilation, and internal changes

2013-11-07 Thread Geraldo Lopes de Souza
David, Using relative source maps is not updating .cljs equivalents when the original source is updated. If you delete it'll be created. If you update the .cljs it remains stalled. Using lein-cljsbuild "1.0.0-alpha2". Regards, Geraldo On Wednesday, November 6, 2013 6:09:09 PM UTC-2, David No

Re: Step by step debugging

2013-11-07 Thread Rudi Engelbrecht
+1 Rudi Engelbrecht Mobile: +61 (0) 455 500 369 Voice: +61 (0) 2 8091 5554 Voice: +27 (0) 11 083 7774 Email: r...@engelbrecht.me > On 8 Nov 2013, at 8:29, Lee Spector wrote: > > > Andy, > > I do think that if a debugging feature has to be limited to a particular > environment then Leiningen

Does Pedestal have a future in the long run

2013-11-07 Thread Marko Kocić
Hi all, I'd like to hear opinions about Pedestal from the people that have been playing more with it. Right now I started looking at it, and like some of the things, but not sure should I invest more time learning it. While I do like some concepts, I'm not sure is it going to became abandonware

Re: Step by step debugging

2013-11-07 Thread Alex Miller
When you say "hit an error", I'm assuming you mean "clojure throws an exception" and not "hit a breakpoint in a debugger" or something else. I don't think there is one place where we could generically attach locals info to a thrown exception. The JVM debugging interface (JVMTI - http://docs.or

Re: ANN: byte vector backed, utf8 strings for Clojure

2013-11-07 Thread Jozef Wagner
Hi, Thank for releasing this library. Some ideas for next features: * support for writing an underlaying byte array into the OutputStream * constructing utf8 string directly from InputStream, byte array or byte buffer * less lazyness and more reducers, current version is very very slow * cache th

Re: Step by step debugging

2013-11-07 Thread Andy Fingerhut
I don't know yet, since what I have in mind at the moment is based on vague pattern matching of words rather than on knowledge of how Ritz works. :-) My basic idea was simply that the Ritz nrepl stuff only works in Emacs now, but it does work across an nREPL connection between a client and the JVM

Re: [ANN] Clojure 1.6.0-alpha2 release

2013-11-07 Thread Howard M. Lewis Ship
Any idea how I can push that patch I submitted (toString for functions) along? It's in purgatory now. On Thursday, 7 November 2013 13:04:19 UTC-8, Alex Miller wrote: > > Clojure 1.6.0-alpha2 is now available. > > Try it via > - Download: > http://central.maven.org/maven2/org/clojure/clojure/

Re: Does Pedestal have a future in the long run

2013-11-07 Thread Andreas Liljeqvist
I sure hope it does. Not a master of it yet, but the concept seems very interesting. I know that there is a guy writing a book about it. Many of the other somewhat related technologies like Django are a completely different cognitive model. More tutorials would be great, also they should stress t

Re: [ANN] Jig

2013-11-07 Thread Timothy Washington
Umm I can't think of parallel dependency tree walking algos, off the top of my head. Sorry :/ But niiice. Yeah, we're definitely thinking along the same lines. But you're way ahead of me. Now just to be able to isolate that browser repl on a per project basis. Sweet Tim Washington Interruptsoft

Re: [ANN] Clojure 1.6.0-alpha2 release

2013-11-07 Thread Alex Miller
Any ticket with a fix version of 1.6is still a candidate for inclusion, and I expect many of those to make it i

Re: Step by step debugging

2013-11-07 Thread Lee Spector
On Nov 7, 2013, at 5:48 PM, Alex Miller wrote: > When you say "hit an error", I'm assuming you mean "clojure throws an > exception" and not "hit a breakpoint in a debugger" or something else. Yes -- I mean "clojure throws an exception." > > I don't think there is one place where we could gen

Re: newbie question: how to include external libraries from Leiningen REPL

2013-11-07 Thread Sean Corfield
On Thu, Nov 7, 2013 at 5:18 AM, Starry SHI wrote: > Hi, I am new to clojure and I find lein REPL very convenient to use. But I > have one question: in REPL, how to include functions defined in other > libraries and call them in my clojure code? As Marshall indicated, you need to edit your project

Re: Does Pedestal have a future in the long run

2013-11-07 Thread Marcus Blankenship
It seems like Congitect is heavily invested in it’s future, and committed to moving it forward. I suspect it will change significantly as adoption increases, but that will probably be a good thing. Clojure is still so new that it’s hard to know if there will be “one web framework to rule them

Re: Step by step debugging

2013-11-07 Thread intronic
+1 well said, Lee. > > > philli...@newcastle.ac.uk (Phillip Lord) writes: > > > >> Ritz does some things, but it doesn't do step through like edebug. > >> > >> I've never found anything as nice as edebug in any language; I guess, > >> it's the big advantage of running your editor and whate

Re: Step by step debugging

2013-11-07 Thread intronic
Why would a break function in clojure the language not be considered, a-la common-lisp? On Friday, 8 November 2013 09:31:55 UTC+10, Lee wrote: > > > On Nov 7, 2013, at 5:48 PM, Alex Miller wrote: > > > When you say "hit an error", I'm assuming you mean "clojure throws an > exception" and not

Re: Does Pedestal have a future in the long run

2013-11-07 Thread Ryan Neufeld
Speaking as a core Pedestal team member and engineer at Cognitect I can say we are *very* serious about continuing to grow and support Pedestal. It may be quiet, but we're using the entirety of Pedestal with a number of client and are fervently preparing a number of new features and improvements

Re: [ANN] Jig

2013-11-07 Thread Cedric Greevey
If you are just visiting every node as a tree, and you have core.async, then there's (let [c (chan)] (go (doseq [n (tree-seq ... (depends on tree implementation) ...)] (>! c n))) (dotimes [_ (.availableProcessors (Runtime/getRuntime))] (go (loop [] (when-let [n (wro

Re: [ANN] Jig

2013-11-07 Thread Malcolm Sparks
This is a good question, but not so much one for Jig as for Stuart's workflow pattern on which Jig's based. Generally, I write my Clojure bottom-up, so that functions that do work against database connections and the like, take these as parameters, and not the whole system map. This leads to th

Re: [ANN] Jig

2013-11-07 Thread Malcolm Sparks
That's a nice use of core.async :) The key requirement, however, is that a component's dependencies must all initialize before a component can start initializing. That reduces parallelism but not entirely. A component's dependencies can all be initiated in parallel, so long as there aren't any

Re: newbie question: how to include external libraries from Leiningen REPL

2013-11-07 Thread Qiu Xiafei
you may have a look at alembic: https://github.com/pallet/alembic -- -- 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

Re: ANN: byte vector backed, utf8 strings for Clojure

2013-11-07 Thread danle...@gmail.com
By "transient-utf8-writer" -- would that give you, effectively, something comparable to what is called an "adjustable-string" in common-lisp? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroup

Re: confused over meta on var

2013-11-07 Thread Michael Wood
Just s guess: Maybe the classpath is absolute in one case and relative in the other. On 07 Nov 2013 7:15 PM, "Phillip Lord" wrote: > > > I find myself confused by the metadata on a var. Consider this code: > > (def a-test-var 10) > > (pritnln (meta #'a-test-var)) > > Now when run under "lein test

Re: [ANN] Jig

2013-11-07 Thread Cedric Greevey
Ah, for that you need to "layer" your DAG (directed acyclic graph -- if A and B both depend on C, and are dependencies of D, you don't have a tree). Start with S an empty set and n = 0. Iteratively let Sn be the items with no dependencies not in S, S become S U Sn, and n = n + 1 until no items are

Re: Step by step debugging

2013-11-07 Thread Colin Fleming
I'm slightly late to the discussion, sorry - currently moving cities. Cursive does indeed have a stepping debugger which works well with Clojure, although it's quite slow (I haven't been able to figure out why, yet - I suspect Clojure adds a lot of line information to the bytecode). There have also

Re: Step by step debugging

2013-11-07 Thread Cedric Greevey
Ideally, in a Lisp I'd think the unit of breakpoints would not be a line but instead an s-expression, tripping before evaluating the body of the expression. On Fri, Nov 8, 2013 at 12:24 AM, Colin Fleming wrote: > I'm slightly late to the discussion, sorry - currently moving cities. > Cursive doe

Re: Step by step debugging

2013-11-07 Thread Colin Fleming
Right, sadly I believe this is impossible using JVMTI, although I'm far from an expert. On 8 November 2013 18:51, Cedric Greevey wrote: > Ideally, in a Lisp I'd think the unit of breakpoints would not be a line > but instead an s-expression, tripping before evaluating the body of the > expressi

Re: Does Pedestal have a future in the long run

2013-11-07 Thread Daniel
I suspect Pedestal adoption will really take off once it has a well designed and advertised widget/ui toolkit. Just my two cents. -- -- 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

Re: Step by step debugging

2013-11-07 Thread Cedric Greevey
This JVMTI doesn't know Clojure source code from parsnip soup, I expect, so can't it be fooled into "thinking" that the bytecode it's interpreting came from a source with many more, shorter lines? So (defn x [y z] (a (b (c)) ((d) e (f g could be passed off to it as if it were (defn x

Clojure try with PredictionIO which is an open source machine learning server

2013-11-07 Thread Tienson Qin
PredictionIO is an open source machine learning server for software developers to create predictive features, such as personalization, recommendation and content discovery. I've written a recommendation sample with clojure, thanks to PredictionIO's RESTful api, the code is very simple and shor

Re: ANN: byte vector backed, utf8 strings for Clojure

2013-11-07 Thread Jozef Wagner
It is more like the transient vector which Clojure provides. You can only conj to the transients. If you want to perform other operations, you must convert it back to the persistent ut8-string. On Friday, November 8, 2013 4:33:04 AM UTC+1, danl...@gmail.com wrote: > > By "transient-utf8-writer"