Re: Is it possible to increase the canvas size of an Incanter chart?

2013-08-06 Thread Alex Ott
Hi basically, if I remember correctly, it should be configured via setPadding method of JFreeChart class ( http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/JFreeChart.html#setPadding%28org.jfree.ui.RectangleInsets%29), but I haven't checked it. P.S. for incanter questions it's better t

Is it possible to increase the canvas size of an Incanter chart?

2013-08-06 Thread Tim Visher
`(view … :width … :height …)` isn't what I want as that doesn't seem to intrinsically increase the size that incanter thinks it can use to draw. It more seems to have the effect that scaling the resulting window has, which is not desirable. I'm putting a bunch of box and whisker data on a single c

Re: What are the phases of the Clojure compiler?

2013-08-06 Thread Kevin Downey
On 8/6/13 2:23 PM, gixxi wrote: > Hi there, > > I wanne dive a bit more deep into the clojure compiler and I wonder whether > it follows the std procedure for compiled languages > > Character Stream -> Scanner (lexical analysis) -> Token Stream > Token Stream -> Parser (syntax analysis) -> Parse

What are the phases of the Clojure compiler?

2013-08-06 Thread gixxi
Hi there, I wanne dive a bit more deep into the clojure compiler and I wonder whether it follows the std procedure for compiled languages Character Stream -> Scanner (lexical analysis) -> Token Stream Token Stream -> Parser (syntax analysis) -> Parse Tree Parse Tree -> Semantic Analysis -> Abstr

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-06 Thread kovas boguta
Its just a matter of removing the event handlers that got added in the first place. I'll think about what the best way of exposing those via the api is. In the meantime feel free to look at the source, its not very complicated when it gets down to the paredit-widget function. On Tue, Aug 6, 2

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-06 Thread Lee Spector
On Aug 6, 2013, at 3:51 PM, Zach Oakes wrote: > I'll try adding a way to toggle paredit, but it'll be complicated since I > will probably have to re-create and re-load all open files, unless > paredit-widget provides a way to disable paredit from a JTextArea that > previously had it added. Th

Re: [ANN] Nightcode, an IDE for Clojure and Java

2013-08-06 Thread Jörg Winter
Hey Zach, great initiative! Keep it going.. much needed toole there! Just wanted to say that for indenting/reformatting clojure-code, it is indeed possible to use clojure's own "pprint" function. Unfortunately the official java API.invoke() is only available in clojure 1.6 But I have used this

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-06 Thread Zach Oakes
I'll try adding a way to toggle paredit, but it'll be complicated since I will probably have to re-create and re-load all open files, unless paredit-widget provides a way to disable paredit from a JTextArea that previously had it added. As for evaluating selected expressions, I definitely inten

Re: Interest in a commercial IDE for Clojure?

2013-08-06 Thread ngieschen
Oh and I'd love to contribute to this too. I didn't see the fork on github. If you're open to contribution let me know since I'd love something better than la clojure. (I wouldn't care if it ended up commercial.) I'm also considering creating some better clojure tools for Intellij, but would pr

REPL sessions crash Windows

2013-08-06 Thread Steve J
I am new to Clojure programming and have been running REPL sessions from the Command Prompt. At some unpredictable time, either during the session or after it is ended, Windows will crash (the computer not responding and with a frozen pattern on the screen). I have tried several things, such as

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-06 Thread Lee Spector
On Aug 6, 2013, at 2:15 PM, kovas boguta wrote: > Cool! I just cloned the repo and tried it out. Seems to work pretty well. > I just tried it too, mainly to see if there was a way to turn paredit off... and I don't see one. Is there one? I really dislike paredit. Also, is there not a way to e

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-06 Thread kovas boguta
Cool! I just cloned the repo and tried it out. Seems to work pretty well. On Tue, Aug 6, 2013 at 11:05 AM, Zach Oakes wrote: > OK thanks, that makes sense. I just pushed the commit that adds it to > Nightcode so hopefully I'll get some feedback on it for the next release. > Thanks again. > > >

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Tassilo Horn
Sean Corfield writes: > Deprecating (not removing) :use from ns seems reasonable but I really > don't see any value in a new unified syntax - esp. since it would have > to support the legacy syntax for several releases alongside (and then > you'd have to consider whether mixed syntax should be su

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-06 Thread Zach Oakes
OK thanks, that makes sense. I just pushed the commit that adds it to Nightcode so hopefully I'll get some feedback on it for the next release. Thanks again. On Tuesday, August 6, 2013 1:43:57 PM UTC-4, kovasb wrote: > > I got it from > > https://github.com/laurentpetit/ccw/tree/master/paredit.

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Softaddicts
Enforcing good use through syntax is a bad thing. "Good use" is a matter of taste. I suspect that your tastes and mines are not in agreement so please let me express mines as I wish. I am not against some of the changes you propose but if your goal is to have everyone use ns "correctly" according

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-06 Thread kovas boguta
On Tue, Aug 6, 2013 at 12:46 AM, Laurent PETIT wrote: > > > Le mardi 6 août 2013, kovas boguta a écrit : > > https://github.com/kovasb/paredit-widget >> >> This is a simple project that does the obvious: provide a simple widget >> that implements paredit. It is intended to be embedded as part of o

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Sean Corfield
On Tue, Aug 6, 2013 at 7:51 AM, Greg wrote: > (ns one.fresh-server > (:refer-clojure :exclude [ancestors printf]) > (:use core.matrix > [ring.adapter.jetty :only (run-jetty)] Except most code I've seen uses (nested) vectors not lists. > [ring.middleware.file :only (wrap-file)

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-06 Thread kovas boguta
I got it from https://github.com/laurentpetit/ccw/tree/master/paredit.clj I had to make a change to bump the parsley version On Tue, Aug 6, 2013 at 10:14 AM, Zach Oakes wrote: > Yeah that's what it is: > > WARNING!!! version ranges found for: > [org.kovas/paredit-widget "0.1.1-SNAPSHOT"] ->

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Jonathan Fischer Friberg
If there was one thing I would deprecate it's that the first element of the vector is special. I find the fact that these two: (ns bob [:require [tawny owl reasoner]]) (ns john [:require [tawny.owl reasoner]]) are totally different, very confusing. That feature is very important to me. It's super

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Greg
> If this syntax were unified into something like you suggest we have a problem: > > (ns user > [foo IBar]) ;; What is IBar, a class or a var? Look what happens after we also do this: foo=> (defn IBar [] "a") #'foo/IBar foo=> (ns user) nil user=> (class foo.IBar) java.lang.Class user=> (class

Re: [ANN] Nightcode, an IDE for Clojure and Java

2013-08-06 Thread Arie van Wingerden
Zach, sorry for my late reply. It seems that 0.0.4 indeed solves the problem with "run repl"! Thx very much, Arie 2013/8/6 Marcus Blankenship > Hey Zach, > > First, this is awesome. Really. Awesome. ;-) > > Second, you should put an email sign-up on this page, so folks can be > notified w

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-06 Thread Zach Oakes
Yeah that's what it is: WARNING!!! version ranges found for: [org.kovas/paredit-widget "0.1.1-SNAPSHOT"] -> [org.kovas/paredit.clj "0.20.1-SNAPSHOT"] -> [net.cgrand/parsley "0.9.2"] -> [net.cgrand/regex "1.1.0"] -> [org.clojure/clojure "[1.2.0,)"] I guess my only remaining question is whether t

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Timothy Baldridge
Sure, put this into a repl: (ns foo) (defprotocol IBar (do-stuff [this])) (ns user (require [foo]) (import [foo IBar])) (class foo/IBar) (class foo.IBar) If this syntax were unified into something like you suggest we have a problem: (ns user [foo IBar]) ;; What is IBar, a class or a

Re: Interest in a commercial IDE for Clojure?

2013-08-06 Thread ngieschen
I would absolutely pay for something like this. On Sunday, July 28, 2013 8:34:19 PM UTC-7, Colin Fleming wrote: > > Thanks for the thoughts, Matt - I agree it's a tough market for all the > reasons you describe. It's unfortunate that companies that pay for an > Ultimate license would have to pay

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-06 Thread Nelson Morris
It might be a version range somewhere. `lein deps :tree` in lein 2.2.0 should show the path to it. If it doesn't please let me know On Tue, Aug 6, 2013 at 11:32 AM, Zach Oakes wrote: > Thanks! It seems to work well so far in Nightcode. I noticed it pulled > down a bunch of older versions of C

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Greg
>> Yeah, there's a bug in the code, but let me try to redefine the problem. >> Assume I have a namespace called foo that defines a protocol (and hence an >> interface) called bar. I then also have a namespace called foo.bar. How do I >> tell the new syntax to import each? If I simply say "go get

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Timothy Baldridge
>> I just view that as yet another reason to change the syntax. You're going to have to prove the new syntax better, because now you have to justify it in the face of breaking existing code. >>I think part of the problem here is that I'm not very well educated on this topic yet. Perhaps you can

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Greg
> It's exactly the same as a normal require. Ns allows vectors/seqs > symbols/keywords to be used interchangeably. Some people use (:require) > others use (require), ns just uses ns/namespace to get the data on the first > of each item after the symbol. Wow that's confusing! I just view that

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-06 Thread Zach Oakes
Thanks! It seems to work well so far in Nightcode. I noticed it pulled down a bunch of older versions of Clojure, but I'm guessing that's because you're using a SNAPSHOT version of seesaw in it? Also, I was wondering if the other library you use (org.kovas/paredit.clj) was available anywhere --

Re: [ANN] Nightcode, an IDE for Clojure and Java

2013-08-06 Thread Marcus Blankenship
Hey Zach, First, this is awesome. Really. Awesome. ;-) Second, you should put an email sign-up on this page, so folks can be notified when you update it, or when you have other cool things to say. Anyone that builds this kind of product probably has other cool things to say, and I would wa

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Greg
> Scares me to be honest. You now have an implicit alias ":as reload", and > are distinguishing between having an alias and having no qualification > by nesting or otherwise. Sorry, I'm not sure what you're saying at the end there. If you want to rename a namespace you can do it explicitly with

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Timothy Baldridge
>> (ns foo >> [require [clojure.string :as c]]) >> I've never seen that before. What does it do? It's exactly the same as a normal require. Ns allows vectors/seqs symbols/keywords to be used interchangeably. Some people use (:require) others use (require), ns just uses ns/namespace to get the d

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Phillip Lord
Greg writes: >> I am dubious about distinguishing between lists and vectors. Currently, >> as far as I can tell, the ns is agnostic, and only cares about them >> being sequential. This is probably one of the sources of confusion for >> beginners -- they see both and don't see why > > The reason f

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Greg
Thanks Timothy for your very thoughtful reply! You bring up some very valid points. > a) How do you plan on having this backwards-compatible with existing code? > You will have to support both the old and new versions on the same Clojure > compiler. Notice that this is completely valid in the c

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Greg
> I am dubious about distinguishing between lists and vectors. Currently, > as far as I can tell, the ns is agnostic, and only cares about them > being sequential. This is probably one of the sources of confusion for > beginners -- they see both and don't see why The reason for distinguishing betw

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Timothy Baldridge
For this to even have a chance at making it into Clojure you need to consider all the edge cases. So I have two questions a) How do you plan on having this backwards-compatible with existing code? You will have to support both the old and new versions on the same Clojure compiler. Notice that this

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Phillip Lord
Greg writes: > New School: > > (ns two.namespace > [clojure [core :except (ancestors printf)]] > [core [matrix math bs]] ; same as (:use (core matrix math bs)) > [[some-ns]] ; same as (:use some-ns) > [ring.adapter.jetty (run-jetty :as jetty)] > [ring.middleware.file ("warp-*")] ; refers

Re: Can we please deprecate the :use directive (was Re: [Proposal] Simplified 'ns' declaration)

2013-08-06 Thread Lee Spector
On Aug 6, 2013, at 7:55 AM, Curtis Summers wrote: > I agree that wildcards make it "easy" (in the nearness sense), but from a > long-term maintainability standpoint, I'd prefer to have explicit imports as > is. When I'm reading your code a year from now and need to look-up the docs > on a cla

Re: Can we please deprecate the :use directive ?

2013-08-06 Thread Greg
> Struggling a bit. Moving the keywords to the end of the vector rather > than the beginning? This reduces complexity? I changed the syntax a bit since posting that, please have a look at the "[Proposal] Simplified 'ns' declaration" thread. - Greg -- Please do not email me anything that you are

Re: Ambiguous error message with lazy sequence.

2013-08-06 Thread jiujiu xiang
在 2013年8月6日星期二UTC+8下午8时31分19秒,Qiu Xiafei写道: > > I have a test.clj file like the following: > > $ cat test.clj > (defn some-lazy-seq [n] > (lazy-cat > (concat n;; should be [n] here > (some-lazy-seq (inc n) > (println (take 100 (some-lazy-seq 0))) > > It's

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Greg
Folks, I feel this thread has gotten derailed by the discussion of implicit imports. This thread is not about that. It's not about asterisks, or :use, it's about a simplified syntax for the 'ns' form. PLEASE use the "Re: Can we please deprecate the :use directive ?" thread to discuss whether i

Re: [ANN] Clotilde is Linda in Clojure.

2013-08-06 Thread François DE SERRES
Hi Lee, translating some examples from C-Linda, I banged my head on an issue I need to fix first hand (see github). But they're definitely coming soon! Thanks for your feedback, keep in touch ;o) -- F. Le mardi 6 août 2013 03:49:27 UTC+2, Lee a écrit : > > > On Aug 5, 2013, at 10:37 AM, Françoi

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Curtis Summers
I agree that wildcards make it "easy" (in the nearness sense), but from a long-term maintainability standpoint, I'd prefer to have explicit imports as is. When I'm reading your code a year from now and need to look-up the docs on a class, wildcards make me (and anyone else in the future) have t

Ambiguous error message with lazy sequence.

2013-08-06 Thread Qiu Xiafei
I have a test.clj file like the following: $ cat test.clj (defn some-lazy-seq [n] (lazy-cat (concat n;; should be [n] here (some-lazy-seq (inc n) (println (take 100 (some-lazy-seq 0))) It's obviously wrong on line 3, the concat function shoud take a seq as

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Lee Spector
On Aug 6, 2013, at 7:40 AM, Phillip Lord wrote: >> Maybe it's not ideal if Clojure has to walk the classpath, but the >> alternative is that I have to manually walk the classpath and jars myself >> with no idea what I'm looking for. Surely it's better for this to be >> handled through an automat

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Phillip Lord
Mark Engelberg writes: > On Mon, Aug 5, 2013 at 11:14 AM, Timothy Baldridge > wrote: > >> On that subject when last discussed, it was mentioned that Clojure doesn't >> have a import * method because it's basically impossible to implement. >> > > Well, surely the word "impossible" is inaccurate, s

Re: [Proposal] Simplified 'ns' declaration

2013-08-06 Thread Phillip Lord
I've used Java since 1.0 days which is a depressing long time ago. In that time, I've used and seen used * an awful lot. Of course, it's bad (when 1.2 came out, we all had to fix our code because of the java.awt/java.util List nameclash), but the alternative was a total pain in the ass. I stopped

Re: Can we please deprecate the :use directive ?

2013-08-06 Thread Phillip Lord
Struggling a bit. Moving the keywords to the end of the vector rather than the beginning? This reduces complexity? Phil Greg writes: > Looking at it again, we don't even need an explicit :require anymore: > > (ns one.fresh-server > "optional doc string goes here" > [clojure.core :refer-e

Re: the snake game with core.async and swing

2013-08-06 Thread Andreas Liljeqvist
+1 for Daniels suggestion. Swing can be quite bothersome if you just want a canvas and key-events. I would avoid multimethods: (defn calc-new-pos [xy prev-pos dir] (condp = [xy dir] [:x :right] (+ prev-pos step) [:x :left]) (- prev-pos step) [:y :down] (+ prev-pos step) [:y :up]

Re: ANN: paredit-widget, simple swing-based clojure paredit widget

2013-08-06 Thread Laurent PETIT
Le mardi 6 août 2013, kovas boguta a écrit : > https://github.com/kovasb/paredit-widget > > This is a simple project that does the obvious: provide a simple widget > that implements paredit. It is intended to be embedded as part of other > applications, and thus is minimal. > > This is a rough cut