Re: ClojureScript Repl -- Swank-like workflow with Emacs?

2011-09-27 Thread Paul Koerbitz
Hi Volker, not sure I understand you correctly. You should still be able to type into the repl and get results, even if it is 'in-browser', right? At least that works for me if I start the browser repl on the command line. So it should also work in Emacs, I am pretty sure its something weird with

Re: advantage of dynamic typing

2011-09-27 Thread Paul Koerbitz
Javier, Nathan +1 I think type systems such as Haskells (and presumably Scala's FP stuff, don't know anything about that) are really the way to go if you want static typing. I think the extra safety that it provides you with is really beneficial and for most things Haskells type system feels

Re: advantage of dynamic typing

2011-09-27 Thread Paul Koerbitz
Hi Nathan! I am very intrigued by your approach. I would love to contribute, my problem is that I don't know the first thing about type inference systems (as in how they work on the inside). Do you have a good reference here? I'll take a look at what you've done, maybe bother you with some

defrecord and overriding empty

2011-09-27 Thread Nathan Sorenson
I'm using clojure.walk/postwalk to rewrite terms in nested data structures. However, I am unable to do this with types as defined by defrecord, because they specify that the function empty throw a not- implemented exception. If I were able to over-ride this default implementation of 'empty' I

Re: advantage of dynamic typing

2011-09-27 Thread Nathan Sorenson
I am following the general strategy described in Sam Tobin-Hochstadt's work. He is the person behind typed-racket. His Phd dissertation[1] has an overview of the area of gradual/soft/refinement typing in dynamic languages. It's a good place to start, with a pretty gentle introduction to the

Re: advantage of dynamic typing

2011-09-27 Thread Paul Koerbitz
Hi Nathan, thanks for the pointer, this is great! I got his dissertation, this does seem like a great starting point given that he is the guy behind typed racket. The wikipedia page on sequent calculus also looks promising, let's see how far I'll make it ;) Thanks for the pointer Paul On Sep

Re: Does macros evaluates its arguments before?

2011-09-27 Thread ru
You are right, Alan! And in this case Closure compiler behave itself also unpredictably and quite the contrary: Where it must evaluate a symbol (like in this case), it doesn't. Where it mustn't evaluate a symbol (argument of macro), it does. So, need to have comprehensive and profound knowledge

New Clojure Brush for Alex Gorbatchev's SyntaxHighlighter

2011-09-27 Thread J . Pablo Fernández
Hello, I took Travis Whitton's brush for Clojure[1] for Alex Gorbatchev's SyntaxHighlighter[2] and put it in a git repo in GitHub, with an index file to easy development and trying it out. I also fixed some bugs and did some improvements. The new code is here:

Re: Does macros evaluates its arguments before?

2011-09-27 Thread Mark Rathwell
And in this case Closure compiler behave itself also unpredictably and quite the contrary: Where it must evaluate a symbol (like in this case), it doesn't. Symbols need to be namespace resolved in order to be evaluated properly. This is something you need to be aware of, but it is not

Shameless self promotion - JavaOne

2011-09-27 Thread Dennis
Hey guys, I will be giving a talk at JavaOne (it is Clojure related). Here is the information. Title: Monitoring a Large-Scale Infrastructure with Clojure Time Tuesday, 07:30 PM, Parc 55 - Embarcadero Length 45 Minutes Abstract: Monitoring a large

statistics library?

2011-09-27 Thread Lee Spector
I need to do some pretty simple statistics in a Clojure program and Incanter produces results that I think must be wrong (details below). So I don't think I can trust it. Is there other code for statistical testing out there? Or maybe somebody could explain to me how to interpret the

Re: Clojure v1.4 - what is new, changed and in development

2011-09-27 Thread Andy Fingerhut
Pardon my ignorance -- I've not done anything with AJAX before. Is there a way to do this in a single HTML file, and include all of the tooltips in that file? If so, do you have an example of this I could use to learn from? Just two or three links each with different tooltips would be enough to

Re: Clojure v1.4 - what is new, changed and in development

2011-09-27 Thread tmountain
Is there a way to do this in a single HTML file, and include all of the tooltips in that file? Yes, there is. There are a lot of options out there, but I've found qTip to be pretty simple. http://craigsworks.com/projects/qtip/demos/content/basic If you don't want to use any third-party

Re: defrecord and overriding empty

2011-09-27 Thread David Nolen
The problem is what does empty mean in the context of defrecord? A new instance of a defrecord is not empty, it has those fields and they are set to nil. David On Tue, Sep 27, 2011 at 3:48 AM, Nathan Sorenson n...@sfu.ca wrote: I'm using clojure.walk/postwalk to rewrite terms in nested data

Re: statistics library?

2011-09-27 Thread Johann Hibschman
Lee Spector lspec...@hampshire.edu writes: I need to do some pretty simple statistics in a Clojure program and Incanter produces results that I think must be wrong (details below). So I don't think I can trust it. I agree, those all look weird to me. Is there other code for statistical

Re: Does macros evaluates its arguments before?

2011-09-27 Thread ru
On 27 сен, 16:45, Mark Rathwell mark.rathw...@gmail.com wrote: And in this case Closure compiler behave itself also unpredictably and quite the contrary: Where it must evaluate a symbol (like in this case), it doesn't. Symbols need to be namespace resolved in order to be evaluated

Re: statistics library?

2011-09-27 Thread Johann Hibschman
Johann Hibschman joha...@gmail.com writes: There may be an easier way to do this, but this worked for me: user= (org.apache.commons.math.stat.inference.TestUtils/tTest (into-array Double/TYPE [40 5 2]) (into-array Double/TYPE [1 5 1])) 0.3884493044983227 I should have used

Re: defrecord and overriding empty

2011-09-27 Thread Nathan Sorenson
You're right that my use isn't strictly returning a collection with a size of zero-- I'm treating empty more like 'default'. I'm thinking of its use in clojure.walk, which simply creates a blank version of an arbitrary collection in which to place the altered sub-forms. I can't find any other

Re: statistics library?

2011-09-27 Thread Lee Spector
On Sep 27, 2011, at 1:37 PM, Johann Hibschman wrote: Johann Hibschman joha...@gmail.com writes: There may be an easier way to do this, but this worked for me: user= (org.apache.commons.math.stat.inference.TestUtils/tTest (into-array Double/TYPE [40 5 2]) (into-array Double/TYPE [1 5

Re: Does macros evaluates its arguments before?

2011-09-27 Thread David Nolen
2011/9/27 ru soro...@oogis.ru All, I give up! :) You're macro will still be incorrect in CLISP, SBCL, CMUCL, Clozure MCL, ABCL, MIT Scheme, Gambit Scheme, Chicken, Ikarus, Racket etc. ;) David -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: can't see the error

2011-09-27 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 27.09.2011 06:27, schrieb Baishampayan Ghose: i wasn't really trying to achieve anything useful - just messing around and see where i get. now i'm here: (defrecord point [x y z]) (defn genPoints [n] (let [random (new Random) randomInt

suggestion for clojure development

2011-09-27 Thread Arthur Edelstein
Dear Everyone, I would like to make a suggestion for the future of Clojure, and hopefully prompt a discussion. My comment comes as a result of my experience trying to port code to 1.3. I have run into numerous problems, most of which come from 1.3's incompatibilities with my 1.2- targeted code

Re: [ANN] Clojure 1.3 Released

2011-09-27 Thread Sean Corfield
On Fri, Sep 23, 2011 at 2:44 PM, Christopher Redinger redin...@gmail.com wrote: We are pleased to announce today the release of Clojure 1.3: We took Clojure 1.3 into production today, along with a lot more Clojure code compared to our previous production release. We've converted all of our

Re: [ANN] Clojure 1.3 Released

2011-09-27 Thread Bruce Durling
Sean, On Tue, Sep 27, 2011 at 20:17, Sean Corfield seancorfi...@gmail.com wrote: On Fri, Sep 23, 2011 at 2:44 PM, Christopher Redinger redin...@gmail.com wrote: We are pleased to announce today the release of Clojure 1.3: We took Clojure 1.3 into production today, along with a lot more

Re: Does macros evaluates its arguments before?

2011-09-27 Thread Alan Malloy
It seems you are enjoying spewing accusations at Clojure, but if your goal is to actually get something done, you would get a lot more out of this discussion if your attitude were Huh, I expected x but see y! Is that a bug or am I wrong? Oh I see, it's not a bug? I still don't understand, please

Re: ClojureScript Repl -- Swank-like workflow with Emacs?

2011-09-27 Thread Volker Schlecht
Hi Paul, sorry, I was blindly assuming you were starting a browser repl without hooking it up with a browser :) Reversing your posts, that becomes clear ... What happens when you do the following M-x set-variable enter: inferior-lisp-program enter: /path/to/repl/script M-x inferior-lisp ?

Re: ClojureScript Repl -- Swank-like workflow with Emacs?

2011-09-27 Thread Volker Schlecht
s/repl/repljs/ -- 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: Does macros evaluates its arguments before?

2011-09-27 Thread ru
Alan, Please forgive me. I am very sorry. May be my English is not so good. Simply, I stupidly kept the idea that macro differs from the function in that is evaluated twice, the first time with the unevaluated arguments. When I saw that even in Lisp it is not the case, I gave up : ( Sincerely,

Re: [ANN] Clojure 1.3 Released

2011-09-27 Thread Sean Corfield
On Tue, Sep 27, 2011 at 12:22 PM, Bruce Durling b...@otfrom.com wrote: That is great to hear. So happy to see someone use a lot of clojure in production. Congrats on the release. Thanx. You can get a lot done with just a little Clojure. We stand at 1,829 lines of production Clojure code and 448

Re: Does macros evaluates its arguments before?

2011-09-27 Thread Michał Marczyk
Hi Ru, let's input your macro definition at the REPL: user (defmacro infix [e] `(let [[x# f# y#] ~e] (f# x# y#))) #'user/infix So far so good. Now let's try use it in a function: user (defn foo [] (infix (5 + 4))) #'user/foo Well now -- it compiled! So, there's no exception being thrown when

Re: suggestion for clojure development

2011-09-27 Thread Phil Hagelberg
On Tue, Sep 27, 2011 at 11:57 AM, Arthur Edelstein arthuredelst...@gmail.com wrote: So my request for Clojure's future development, is that backwards compatibility not be broken. This means that Clojure code needs a way of designating what Clojure version it is targeted for. Then, for example,

October Amsterdam Clojure

2011-09-27 Thread Hubert Iwaniuk
Good news everyone! * tl;dr - http://bit.ly/ams-clj On Wednesday, October 12th Amsterdam Clojurians is organizing October Amsterdam Clojure. Same as last year, we are proud to have a great speaker: Uncle Bob Martin. Sourcesense.com is our proud sponsor and made it possible to host the event

Re: statistics library?

2011-09-27 Thread labwork07
Yes, those errors in Incanter are unfortunate. I had another weird one occurred which David Liebke attributed to the underlying Colt library. user= (sd (repeat 9 0.65)) NaN The sd function calls the variance function, which calls a function in Colt; the trouble is Colt is returning a number

Re: suggestion for clojure development

2011-09-27 Thread Andreas Kostler
I'm with Phil on that one. Legacy support slows or even hinders innovation. On Sep 28, 2011 6:06 AM, Phil Hagelberg p...@hagelb.org wrote: On Tue, Sep 27, 2011 at 11:57 AM, Arthur Edelstein arthuredelst...@gmail.com wrote: So my request for Clojure's future development, is that backwards

documentation problem with Atom

2011-09-27 Thread Robert McIntyre
Just wanted to report that the documentation for atom misspells become as be come --Robert McIntyre -- 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: statistics library?

2011-09-27 Thread David Powell
Again, if I understand correctly, under no circumstances should the p-value ever be outside of the range from 0 to 1. It's a probability, and no value outside of that range makes any sense. But Incanter sometimes returns p-values greater than 1. I see that there was a recent fix made to

Re: Does macros evaluates its arguments before?

2011-09-27 Thread Andreas Kostler
This is quite amusing since the first reply to the original post already provided the correct answer :) On Sep 28, 2011 6:05 AM, Michał Marczyk michal.marc...@gmail.com wrote: Hi Ru, let's input your macro definition at the REPL: user (defmacro infix [e] `(let [[x# f# y#] ~e] (f# x# y#)))

Re: suggestion for clojure development

2011-09-27 Thread Sean Corfield
On Tue, Sep 27, 2011 at 11:57 AM, Arthur Edelstein arthuredelst...@gmail.com wrote: raises the question of what happens to all of the many existing Clojure 1.2-based libraries in Clojars and on github. Many of these are very useful, but not necessarily actively maintained. A lot of Are therein

iterate with side-effect function?

2011-09-27 Thread siyu798
Hi, From clojure doc, it states iterate takes a side-effect free function, and what's the implication if the function has side-effect as follow? (- 0 (iterate (fn [cnt] (prn cnt) ;; save data to csv (Thread/sleep 6000) (inc

Clojurescript output effect

2011-09-27 Thread Brent Millare
I'm trying to figure out why when I require('cljs.core') in a javascript file, the hello world example doesn't work. hello.js goog.require('cljs.core'); ;;--- If I delete this line, then everything works. goog.require('goog.dom'); function sayHi() { var myc__2284 =

Re: Clojurescript output effect

2011-09-27 Thread David Nolen
What was the error and what were your compile options? On Tuesday, September 27, 2011, Brent Millare brent.mill...@gmail.com wrote: I'm trying to figure out why when I require('cljs.core') in a javascript file, the hello world example doesn't work. hello.js goog.require('cljs.core');

Re: Clojurescript output effect

2011-09-27 Thread Brent Millare
You can try out the code I posted, but basically I wanted to create a hello world canvas. Without the require, I get the canvas. With the require, I get a blank white page. There isn't any error message, which is what made this particularly difficult to narrow. -Brent On Sep 27, 7:01 pm, David

Re: suggestion for clojure development

2011-09-27 Thread Brian Marick
On Sep 27, 2011, at 5:18 PM, Sean Corfield wrote: Are therein lies the problem: if they are not actively maintained, you're not going to get bug fixes even on Clojure 1.2. I think is it actively maintained? is not a particularly interesting question for a community. The question is: is this

Re: statistics library?

2011-09-27 Thread Lee Spector
On Sep 27, 2011, at 5:44 PM, David Powell wrote: I see that there was a recent fix made to Incanter: Fixed typo in :lower-tail? keyword. This was causing the complement of the p-value to be returned. https://github.com/liebke/incanter/pull/39 Have you tried the latest version in

Re: suggestion for clojure development

2011-09-27 Thread Sean Corfield
On Tue, Sep 27, 2011 at 4:28 PM, Brian Marick mar...@exampler.com wrote: I think is it actively maintained? is not a particularly interesting question for a community. The question is: is this a useful library? Then: is the original author maintaining it? And then, if not: who will pick it

Re: suggestion for clojure development

2011-09-27 Thread Phil Hagelberg
On Tue, Sep 27, 2011 at 4:43 PM, Sean Corfield seancorfi...@gmail.com wrote: The pain of migrating from Contrib 1.2.0 (or earlier) to the New Contrib Libraries (whether you stay on Clojure 1.2.x or move to Clojure 1.3.0) is a one-time tax for early adopters and, as unpleasant as that may be, I

Re: iterate with side-effect function?

2011-09-27 Thread Nathan Sorenson
Because the fn is wrapped in a lazy sequence, the effects won't run if you ask for the same value again-- For instance: (def a (iterate (fn [cnt] (prn cnt) ;; save data to csv (inc cnt)) 0)) (nth a 5) ... all the effects are fired. (nth a 5) ...

Re: trace-forms macro

2011-09-27 Thread Luc Prefontaine
Fine, I merged the new version and I will add a couple of tests related to these changes. Luc On Mon, 26 Sep 2011 18:46:12 +0200 Jonathan Fischer Friberg odysso...@gmail.com wrote: I looked at it today and have updated the macro. (same gist: https://gist.github.com/1209498) Additions: It

Re: suggestion for clojure development

2011-09-27 Thread Arthur Edelstein
On Sep 27, 4:43 pm, Sean Corfield seancorfi...@gmail.com wrote: On Tue, Sep 27, 2011 at 4:28 PM, Brian Marick mar...@exampler.com wrote: I think is it actively maintained? is not a particularly interesting question for a community. The question is: is this a useful library? Then: is the

Re: Clojurescript output effect

2011-09-27 Thread Brent Millare
Also as for compile options, there are none. I initially tried advanced, but again got a blank page. So I tried no args, and it made the out folder. I looked in there and saw the generated js file. I looked through that, and edited each line to look like my working js code. In the end, translating

Re: suggestion for clojure development

2011-09-27 Thread Stuart Halloway
I hope so, too, but very often this doesn't happen in practice. Much useful code is not maintained. If I add a dependency from Clojars or maven central to my project.clj file, I don't want to pay the tax of deciding what Clojure version it is and whether it is actively maintained, Clojars

Re: advantage of dynamic typing

2011-09-27 Thread Lee Spector
On Sep 27, 2011, at 3:40 AM, Paul Koerbitz wrote: That said, I read somewhere (can't find the link now, sorry) that compile-time type checking in Lisps is difficult because they allow code generation at run time? That would still leave the possibility to apply it to everything which is

Re: iterate with side-effect function?

2011-09-27 Thread siyu798
Nathan, Thanks for the explanation, what i'm trying to do is to repeatedly run a side-effect function until the return value of it meets certain criteria. It could have been done using loop/recur as shown below, and wondering if there's alternatives. Is a there general approach to

Re: iterate with side-effect function?

2011-09-27 Thread Nathan Sorenson
Quite often I convince myself I need state or some effectful trigger, but further thought reveals a simpler stateless approach. That being said--if you absolutely need to be doing something based on effects, something that absolutely can't be tracked via values in a purely functional way--like

Re: suggestion for clojure development

2011-09-27 Thread Sean Corfield
On Tue, Sep 27, 2011 at 7:33 PM, Arthur Edelstein arthuredelst...@gmail.com wrote: I hope so, too, but very often this doesn't happen in practice. Much useful code is not maintained. My position on free open source software is that if it's that useful to someone, then that someone has at least

tools.trace (was Re: trace-forms macro on the clojure mailing list)

2011-09-27 Thread Luc Prefontaine
Hi, First shot of tools.trace is now available on github: http://github.com/clojure/tools.trace As for the traceforms macro, you will notice that when an exception is trapped, I recompose an new exception with the necessary form traceback information instead of using print. The main reason is

Re: suggestion for clojure development

2011-09-27 Thread Arthur Edelstein
When you're selecting a library to solve a particular problem, you normally have to do some research and evaluate more than one library so, for me, the activity of the project and software versions supported are part of that necessary research. I can't imagine just using some random library

Re: suggestion for clojure development

2011-09-27 Thread Sean Corfield
On Wed, Sep 28, 2011 at 12:03 AM, Arthur Edelstein arthuredelst...@gmail.com wrote: You may think I'm doing it wrong, but I don't think I'm alone at all. I don't think you're doing anything wrong - and I'm sure many people only do minimal research on tools they use. I just think your

Re: tools.trace (was Re: trace-forms macro on the clojure mailing list)

2011-09-27 Thread Sean Corfield
Thank you Luc! On Tue, Sep 27, 2011 at 11:44 PM, Luc Prefontaine lprefonta...@softaddicts.ca wrote: First shot of tools.trace is now available on github: http://github.com/clojure/tools.trace As for the traceforms macro, you will notice that when an exception is trapped, I recompose an