Re: semantics of ! on closed channels

2014-01-24 Thread John Szakmeister
if you have two accounts in GMail (I have a regular GMail account and one that's in the Apps for Business). They sometimes interact badly, especially around starting and ending sessions. -John -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: semantics of ! on closed channels

2014-01-23 Thread john walker
This is a common windows problem. On Thursday, January 23, 2014 9:17:09 PM UTC-5, Cedric Greevey wrote: [meta, but about something apparently triggered by the message, from this thread, that I'm quoting] Why did reading this post cause gmail to go bonkers? I saw this thread had new

Re: Profiling, VisualVM random-pause

2014-01-22 Thread John D. Hume
On Tue, Jan 21, 2014 at 1:50 PM, Yves Parès limestr...@gmail.com wrote: 2) All my methods listed in the profiler are suffixed by .invoke. Is it normal or is pathological of something (I haven't aot-compiled anything, I don't know if it may have an impact here), like unnecessary reflection

Re: Clojure development laptop battery usage

2014-01-22 Thread John Chijioke
Not true. More RAM, more power. If it hits swap, even more power. That has been my personal observation. On Monday, January 20, 2014 6:53:14 AM UTC+1, g vim wrote: On 20/01/2014 05:43, john walker wrote: The JVM hasn't been receiving the love it deserves lately! Fortunately, percent

clojure.java.shell/sh and expand wildcard

2014-01-21 Thread John Gabriele
I'd like to do something like: user= (require '[clojure.java.shell :as sh]) user= (sh/sh ls *.txt) but get: {:exit 2, :out , :err ls: cannot access *.txt: No such file or directory\n} even though there *are* a few .txt files present. That error message is the same one I'd get if

Re: Security implications of code is data/data is code

2014-01-21 Thread John Wiseman
I don't think homoiconicity is the issue, except in a very indirect way. Note that Common Lisp does have a rather annoying, insecure default that did allow the kind of attack you're talking about: *read-eval* defaults to T http://clhs.lisp.se/Body/v_rd_eva.htm, which enables the #. reader macro,

Re: [ANN] play-clj, a game library

2014-01-20 Thread john walker
Is there any chance of support for javascript/webgl? On Monday, January 20, 2014 10:31:50 AM UTC-5, Zach Oakes wrote: Today I'm releasing play-clj https://github.com/oakes/play-clj, a Clojure wrapper for LibGDX that allows you to write games for desktop OSes, Android, and iOS from the same

Re: let bindings

2014-01-20 Thread John Mastro
all tail calls) do implement let in that way, but Common Lisps (where it's not promised by the spec, though some implementations with some settings will) does not, likely at least in part for the same reason. - John -- -- You received this message because you are subscribed to the Google

Re: Clojure development laptop battery usage

2014-01-19 Thread john walker
The JVM hasn't been receiving the love it deserves lately! Fortunately, percent memory usage isn't going to have any effect on battery life until you hit swap. The resources you should consider are just activity on the cpu/gpu/disk. So yeah, it's light table. It's not its fault for being

Re: cljs / format

2014-01-19 Thread john walker
Kind of ..? Based off the discussion, it's probably better not to, but the closure library provides an implementation that's trivial to wrap (accepting the problems). Discussion: http://dev.clojure.org/jira/browse/CLJS-324 Example: https://www.refheap.com/19693 On Monday, January 20, 2014

Re: string/replace regex help

2014-01-16 Thread John Wiseman
(clojure.string/replace myText #(?s)START.*?END ==) ;; a==\nee\nff\nggg\n==\n\n (?s) specifies multi-line mode, *? is the non-greedy form of *. On Thu, Jan 16, 2014 at 1:02 PM, Kuba Roth kuba.r...@gmail.com wrote: Hi, This is more of a regex specific question

Re: Contributors needed for Rouge (Clojure on Ruby)

2014-01-08 Thread John Gabriele
On Wednesday, January 8, 2014 7:17:35 AM UTC-5, Mikera wrote: The JVM isn't really the problem though, at least as far as I can work out. In fact I think the whole JVM startup is slow thing is a bit of a myth: JVM startup including running a simple hello world is less than 0.1 secs on my

Re: Contributors needed for Rouge (Clojure on Ruby)

2014-01-08 Thread John Gabriele
and multithreading. -- John -- -- 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

Are all clojure namespaces loaded in repl by default?

2014-01-07 Thread John Kida
I am using Clojure 1.5, and reading a book on Clojure 1.3. I am reading over the namespaces chapters but I appears in my repl I can already access everything with its fully qualified name without a require. For example on this website, namespaces

Re: Are all clojure namespaces loaded in repl by default?

2014-01-07 Thread John Kida
Thanks, that does work as expected now. Is it simply documented somewhere what clojure preloads for you? Or is there a way to reflect this? I found the (all-ns) command, not sure if there is a better way to view this info. Are the preloaded classed documented on the clojure site? -- -- You

Re: Contributors needed for Rouge (Clojure on Ruby)

2014-01-05 Thread John Gabriele
On Saturday, January 4, 2014 1:12:12 PM UTC-5, Michael Gardner wrote: Hopefully the landscape for alternative Clojure hosts will improve with the completion of CinC [2]. [2] https://github.com/Bronsa/CinC Looks like CinC is now: * https://github.com/clojure/tools.analyzer *

Re: Contributors needed for Rouge (Clojure on Ruby)

2014-01-05 Thread john walker
If boot time is your primary concern, this can help. The jvm is still there, though :/ https://github.com/technomancy/grenchman On Saturday, January 4, 2014 9:43:22 AM UTC-5, g vim wrote: I have recently moved most of my work to Clojure and Clojurescript but neither of these

reasoning behind nth and take-nth inconsistent parameter pos.

2014-01-03 Thread John Kida
(take-nth i coll) (nth coll i) or (nth coll i not-found) Why is one using the index as the first parameter and the other uses index as its second parameter..? Is there any good articles out there for clojure idioms that may explain some of these things? -- -- You received this message

Re: Sorting Nested Vectors and filter out some

2014-01-03 Thread john walker
You can do something like this. https://gist.github.com/johnwalker/8243534 On Friday, January 3, 2014 12:37:07 PM UTC-5, Jeff Angle wrote: Hi guys! this has made me pull quite a load of hair new to clojure.. have a nested vector say [[salt 0 0 %deviation 00] [sugar 5 10 %deviation

Re: bug in clojure.zip when calling next on empty list node?

2013-12-31 Thread John Mastro
you're right that opening a ticket on JIRA is the next step. - John -- -- 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

Re: is there a tutorial about working at the REPL?

2013-12-30 Thread John Mastro
exception(s) thrown. Based on the error in your REPL session - John -- -- 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: is there a tutorial about working at the REPL?

2013-12-28 Thread John Mastro
)? If it can't find the file, `clojure.java.io/resource` returns nil; and (slurp nil) throws an IllegalArgumentException, which doesn't seem to be the error you're getting. [1] https://github.com/clojure/tools.namespace [2] https://github.com/clojure-emacs/cider - John -- -- You received this message

Re: Is Clojure right for me?

2013-12-27 Thread John Chijioke
Words play a very important role in expressing ideas. For me, I think clojure is mostly about ideas. A way of doing things. For me clojure was intuitive from day one. The notion of programming with functions applied to data. So in clojure data structures are emphasized as a way of representing

Re: Namespaces [was Re: Is Clojure right for me?]

2013-12-27 Thread john walker
I posted this in response to the original gist, but it probably wasn't seen. Does this demonstrate the behavior you want? https://gist.github.com/johnwalker/8142143 On Friday, December 27, 2013 1:08:49 PM UTC-5, puzzler wrote: I ended up accidentally injecting a completely different thread

Re: Namespaces [was Re: Is Clojure right for me?]

2013-12-27 Thread john walker
long to implement inline in the record definition. 2. Protocols are significantly more restricted than regular functions (e.g., aren't they restricted to 4 parameters, no indefinite arities, and no destructuring in the arguments?) On Fri, Dec 27, 2013 at 10:19 AM, john walker john.lo

Re: Namespaces [was Re: Is Clojure right for me?]

2013-12-27 Thread john walker
This works (clever hack!), but you would have to reduplicate the keys in (defn bar [..]...), (defn baz [...] ...) etc. On Friday, December 27, 2013 3:05:24 PM UTC-5, Cedric Greevey wrote: On Fri, Dec 27, 2013 at 2:32 PM, Mark Engelberg mark.en...@gmail.comjavascript: wrote: On Fri, Dec

Re: Is Clojure right for me?

2013-12-27 Thread john walker
Err, a lot of these questions are quite open in nature. I don't think anyone in software engineering has great answers - see Everything is an Object for Javaland and then some of the proposals in Doug Hoyte's Let Over Lambda (an excellent read if you're after Common Lisp books and recognize

Re: Namespaces [was Re: Is Clojure right for me?]

2013-12-27 Thread John Chijioke
James Reeves has got it. It's same for me. All this boils down to really knowing the language. Knowing how to make music with the instruments provided. For me Clojure's namespaces has been one of the most wonderful things that has happened to me in programming. It has facilitated all kinds of

Re: Is Clojure right for me?

2013-12-26 Thread john walker
clojurekoans.com uses Joodo. https://github.com/slagyr/joodo What are some other cool sites powered by Clojure? On Wednesday, December 25, 2013 4:06:20 PM UTC-5, Massimiliano Tomassoli wrote: Hi, I'm not sure if Clojure is the right language for me. I'd like to use Clojure mainly for web

Finding available methods or docs for a value type

2013-12-24 Thread John Kida
So i am very new to Clojure and I am wondering if there are any good techniques to finding available methods that will take a particular value. I understand this is probably very hard to do or even impossible being Clojure is a dynamic language and a lisp but for example. Lets say i have a

Re: library development

2013-12-20 Thread John Gabriele
Ah, neat. This works great! If I can just `lein install` my libs (or other people's libs) and then use them in all my projects (just like the libs found at clojars), what extra functionality does lein-localrepo provide beyond that? -- John On Friday, December 20, 2013 9:22:30 AM UTC-5

Re: library development

2013-12-20 Thread John Gabriele
On Friday, December 20, 2013 9:22:30 AM UTC-5, Daniel Higginbotham wrote: lein install actually installs your library ~/.m2/repository in addition to creating the pom and jar. That should be all you need to do. On Friday, December 20, 2013 12:16:59 PM UTC-5, John Gabriele wrote: Ah, neat

Re: Who is doing something worthwhile in Clojure?

2013-12-19 Thread John Wiseman
: If you know of activity X that you in good faith believe is worthwhile or, more specifically, (and I'm guessing at RIch's original intention so I could be wrong) philanthropic then post about X. If you disagree with a poster about whether X is worthwhile, do not post. John On Thu, Dec 19, 2013

Re: Implementation options for auto-complete and symbol resolution while coding

2013-12-18 Thread John Wiseman
Just for background, Steve Yegge's grok project seems relevant. It is a cross-language static analysis system intended to be useable on a large scale. (And is intended to be open sourced, when it's done.) http://www.youtube.com/watch?v=KTJs-0EInW8 On Wed, Dec 18, 2013 at 8:27 AM, juan.facorro

Is Clojure more functional then Scala?

2013-12-15 Thread John Kida
I jumped on the FP bandwagon over a year ago and have been using Scala both at work and for personal interest. Recently however I decided to take a closer look at Clojure and see if it is something i actually like. I have to admit at first the syntax form was awkward, but im starting to really

Re: type hinting overloaded methods

2013-12-10 Thread John D. Hume
On Tue, Dec 10, 2013 at 4:25 AM, Phillip Lord phillip.l...@newcastle.ac.ukwrote: (defn ^IRI iri [name] (cond (instance? String name) (IRI/create ^String name) (instance? java.net.URL name) (IRI/create ^java.net.URL name) (instance? java.io.File name) (IRI/create

Re: Code layout

2013-12-10 Thread John Gabriele
On Tuesday, December 10, 2013 9:24:16 PM UTC-5, Plinio Balduino wrote: Hi there What is the ideal way to format Clojure code? I'm following Batsov's Style Guide but, in some moments, it sounds a bit confuse to me. To the point: (reduce + (filter even? nums))

Re: error-on-reflection

2013-12-09 Thread John D. Hume
Are you aware of `lein check`? We have our some of our CI builds wired to fail if that finds anything. On Dec 9, 2013 4:12 AM, Phillip Lord phillip.l...@newcastle.ac.uk wrote: I know about *warn-on-reflection* but is there anyway that I can get an error-on-reflection instead? I've been type

Re: [Clojure-CLR] implement interface that has properties

2013-12-09 Thread John D. Hume
If I recall, properties are just syntactic sugar for awkwardly named methods. Have you tried the compiler-generated get and set method-names? On Dec 9, 2013 9:50 AM, Frank Hale frankh...@gmail.com wrote: I'm trying to implement an interface that has properties but can't quite seem to get it to

TypeInitializationException

2013-12-09 Thread John Jelinek
I grabbed the Clojure NuGet package 1.5.0.2, and when I new up my clojure namespace and execute a method, I get a TypeInitializationException. It seems to be referencing Clojure 1.4.0, but shouldn't it be targeting 1.5.0? namespace.clj: (ns my.namespace (:gen-class :methods [[testing

Re: Any elegant solutions for this problem?

2013-12-01 Thread john walker
Sorry, I spoke without seeing that you were aware of partition-by. Here's one that isn't vectorized. (def v [foo 1 bar 10 20 clown 5]) (- v (partition-by string?) (partition 2) (map #(apply concat %))) On Sunday, December 1, 2013 2:10:04 PM UTC-5, Ben wrote: user= (def v [foo 1

Re: Any elegant solutions for this problem?

2013-12-01 Thread john walker
Use partition-by http://clojuredocs.org/clojure_core/clojure.core/partition-by On Sunday, December 1, 2013 1:57:52 PM UTC-5, Ryan wrote: Hi all, I have a vector which contains an unknown number of repetitions of the following pattern: String, followed by 1 or more integers For example:

Re: Any elegant solutions for this problem?

2013-12-01 Thread john walker
]))) (reduce into [])) On Sunday, December 1, 2013 2:21:14 PM UTC-5, john walker wrote: Sorry, I spoke without seeing that you were aware of partition-by. Here's one that isn't vectorized. (def v [foo 1 bar 10 20 clown 5]) (- v (partition-by string?) (partition 2) (map #(apply

Re: Is The Joy if Clojure up to date?

2013-11-30 Thread John Mastro
] http://www.manning.com/fogus2/ - John On Nov 30, 2013, at 10:34 AM, Mars0i marsh...@logical.net wrote: Amazon claims that the publication date of the second edition is Feb. 28, 2014. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: [ANN] projars.com

2013-11-29 Thread John Wiseman
On Thu, Nov 28, 2013 at 2:53 AM, Bastien bastiengue...@gmail.com wrote: I'm working on a website where people will be able to ask donations more easily for their FLOSS achievements and future projects, I'd love to see both directions (more commercial options and more crowdfunded FLOSS

Re: expand a form

2013-11-25 Thread John D. Hume
You won't find the results as easy to read as what you're asking for, but clojure.tools.analyzer will show you calls that have been inlined by the compiler. On Nov 25, 2013 2:24 PM, Andy Smith the4thamig...@googlemail.com wrote: In your example a full expansion might be : (. clojure.lang.Numbers

Re: java.jdbc DSLs (java.jdbc.sql / java.jdbc.ddl)

2013-11-23 Thread John D. Hume
On Nov 22, 2013 4:09 PM, Sean Corfield seancorfi...@gmail.com wrote: Perhaps a solution here is for me to put it in a library, on Clojars, under a different name and let folks migrate to that as an interim solution (i.e., identical API so folks would just update project.clj and update some ns

Re: [ANN] optparse-clj: Functional GNU-style command line options parsing

2013-11-23 Thread John Szakmeister
On Fri, Nov 22, 2013 at 8:30 PM, guns s...@sungpae.com wrote: On Fri 22 Nov 2013 at 07:22:20PM -0500, John Szakmeister wrote: This looks very nice. Have you considered something along the lines of Python's argparse? http://docs.python.org/dev/library/argparse.html Thank you. I am

Re: [ANN] optparse-clj: Functional GNU-style command line options parsing

2013-11-22 Thread John Szakmeister
clojure.tools.cli¹, but the parser is more flexible: This looks very nice. Have you considered something along the lines of Python's argparse? http://docs.python.org/dev/library/argparse.html It's nice to see you thought about subcommand support as well. Thank you for your contribution! -John

Re: first vals first vals

2013-11-21 Thread John Szakmeister
think you want get-in: (- {:key1 {:cf {:cq 0,1,2,3}}} (get-in [:key1 :cf :cq]) (clojure.string/split #,)) -John -- -- 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

Re: first vals first vals

2013-11-21 Thread John Szakmeister
On Thu, Nov 21, 2013 at 4:32 AM, Zhemin Lin lin.zhe...@gmail.com wrote: Thanks, John Jernau. What if :cf, :cq are not fixed, and I don't really care about the keys, but only the value of the value of the value ...? You might want to consider tree-seq to get at the innermost string: (last

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-21 Thread John D. Hume
! withdraw!. I don't see how else this can be done since they are refs. I would appreciate feedback for this (hopefully) last version... many thanks in advance :) Jim On 21/11/13 13:19, John D. Hume wrote: If you want to demonstrate STM with the deposit-withdraw-transfer example, you definitely

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-21 Thread John D. Hume
If you want to demonstrate STM with the deposit-withdraw-transfer example, you definitely need a ref for each account. I'd suggest an atom for the account-num-balance-ref map (the bank) and an atom for the account-num-generator, but you say coordination is necessary for opening and closing

Re: first vals first vals

2013-11-21 Thread John D. Hume
On Nov 21, 2013 3:32 AM, Zhemin Lin lin.zhe...@gmail.com wrote: What if :cf, :cq are not fixed, and I don't really care about the keys, but only the value of the value of the value ...? Maps seem an awkward choice of data-structure for a scenario where you don't know or care about the keys. --

Re: Generating functions from data

2013-11-19 Thread John D. Hume
After some experience with excessively meta-programmed Ruby apps, I generally try to design an API that is as clean (or almost) as what I'm tempted to generate and avoid the metaprogramming. For example (api/get-user-by-id 123) is only slightly nicer than (api/get-by-id :user 123), so if the

Re: Padding missing elements in a sequence of identical K/V maps

2013-11-19 Thread John Mastro
2, :value nil} ;; {:key 3, :value 30} ;; {:key 4, :value 40} ;; {:key 5, :value nil}) - John -- -- 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

Re: parse a text file that has some binary characters

2013-11-19 Thread John Mastro
bar) (.write wtr 0x02) (.write wtr baz))) (create-test-file test-file) (read-lines test-file) ;= (foo^Abar^Bbaz) (read-and-replace test-file) ;= (fooXbarYbaz) - John -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Design question - dependencies and function discovery

2013-11-18 Thread John D. Hume
Rather than having hidden mutable state for wiring events to handlers, would it be clearer if the main namespace just passed an :event-[handlers] map to the event processor? If that would create a huge, frequently changing data structure, each namespace with handlers could expose an

Re: [ANN] datasource 0.1 - Small clojure library for access to environment dependent configuration.

2013-11-14 Thread John D. Hume
One piece of feedback: the name datasource is confusing, given javax.sql.DataSource, as seen, for example, at http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html# setting-up-a-data-source On Thu, Nov 14, 2013 at 10:09 AM, Andrey Antukh n...@niwi.be wrote:

Re: Regarding Clojure's license

2013-11-13 Thread John Gabriele
of it as well. -- John -- -- 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

cider status

2013-11-12 Thread John D. Hume
The last (non-authoritative) word on cider on this mailing list[1] was that it is unstable. Is that really the case? Is it just a matter of many packages that depend on it not being updated? I tried checking the official mailing list[2] and was surprised to find that it's private. I'm trying to

Re: Regarding Clojure's license

2013-11-12 Thread John Gabriele
On Tuesday, November 12, 2013 11:30:23 AM UTC-5, Sean Corfield wrote: It's also worth pointing out that a lot of US companies won't use GPL-licensed software (and won't pay for a closed source version), and many aren't comfortable with LGPL either. I don't see why a company would have

Re: Regarding Clojure's license

2013-11-12 Thread John Gabriele
On Tuesday, November 12, 2013 11:40:53 AM UTC-5, Michael Klishin wrote: 2013/11/12 Kalinni Gorzkis musicde...@gmail.com javascript: That violates the principle of free software. License incompatibilities like this divide the open-source community. Please change. Said principle of free

Re: [ANN] Yesql 0.2.1 - Clojure SQL queries rethought.

2013-11-11 Thread John D. Hume
For me, the one feature that can justify an internal DSL for generating SQL is the ability to compose queries. I assume that's not on the Yesql roadmap. On Nov 11, 2013 5:10 AM, Kris Jenkins krisajenk...@gmail.com wrote: https://github.com/krisajenkins/yesql Yesql is a simple library for

Re: StackOverflowError

2013-11-08 Thread John Szakmeister
places with deep recursive calls :( Something like stack is filling against my will...? Are you using concat, remove, or filter to build or modify a sequence? If so, you can run into a StackOverflow error if you build a long chain of operations and then try to process the whole sequence. -John

Re: StackOverflowError

2013-11-08 Thread John Szakmeister
to maintain performance. -John -- -- 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

What's the -dup in print-dup?

2013-11-02 Thread John Mastro
This isn't a very deep question, but I wonder every time I come across it: to what does -dup in `print-dup` and `*print-dup*` refer? Thanks - John -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Re: Any interest in Compojure/Ring screencasts?

2013-11-01 Thread John Jackaman
+1 On Tuesday, October 29, 2013 5:39:05 PM UTC-5, James Reeves wrote: I'm considering putting together a screencast, or a series of screencasts, based on my Functional Web Architecturehttp://skillsmatter.com/podcast/home/functional-web talk. The base presentation would be improved, and

Experiences using SQLite with Clojure? Recommendations?

2013-10-23 Thread John Gabriele
How have your experiences been using SQLite with Clojure? Back when org.xerial/sqlite-jdbc was at v3.7.2, I'd heard some complaints. But I notice that the project appears to be fairly actively maintained (see its [mailing list] and [project page]). The current version is 3.7.15-M1. [mailing

Re: blog article on RSpec like TDD with a rapid feedback cycle in Clojure

2013-10-21 Thread John Szakmeister
/wiki/Autotest -John -- -- 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

Re: Newbie question: How to add external clojure jars properly in Eclipse.

2013-10-19 Thread John Mastro
John, thanks. Not a stupid question at all. When learning a new language, a new environment, and using an unfamiliar OS, there are so many moving parts that it is sometimes hard to know where to begin when tracking stuff down. My old and favorite line here is that signposts are generally

Re: Newbie question: How to add external clojure jars properly in Eclipse.

2013-10-18 Thread John Mastro
://github.com/technomancy/leiningen/blob/master/sample.project.clj You're unlikely to need most of the options - just take a look at :dependencies. Each project will list the appropriate coordinate vector (e.g. [some/project 1.0.0]) on their project page and/or GitHub repo. - John -- -- You

Re: Compulsive over-optimization

2013-10-18 Thread John D. Hume
What kind of optimal do you compulsively rearrange for? Performance? Readability? Amusing terseness? On Oct 18, 2013 6:20 PM, Kendall Shaw ks...@kendallshaw.com wrote: With clojure in particular, I am having trouble not rearranging my code to be what I think is more optimal in ways that seem

Re: Are there any GUI based Clojure apps out there?

2013-10-17 Thread John Gabriele
Seesaw is, of course, the GUI *toolkit* for creating GUI apps. Though, it does come with a lot of examples. Also, speaking of seesaw, it looks like ClojureSphere lists a number of projects which make use of it: http://www.clojuresphere.com/seesaw/seesaw (scroll down to Dependents). -- John

Re: finding a call to longCast

2013-10-15 Thread John D. Hume
If you have some idea where to look in your code, or if there isn't much code, I'd take a look at clojure.tools.analyzer/analyze-ns[1]. The output is a little overwhelming, but it's pretty easy to navigate in clojure.inspector. One issue may be finding the call (e.g. to some clojure.core fn) that

Re: use lein compile a Java project

2013-10-11 Thread John D. Hume
I believe :dependencies and :resource-paths will be used for the classpath at both build and run time. Does that meet your needs? On Fri, Oct 11, 2013 at 8:00 AM, Gaofeng Zeng ndtm.i...@gmail.com wrote: How use lein compile a Java project? I know the java-source-paths can specify the src

Re: [ANN] Grenchman, for running Clojure code quickly

2013-10-09 Thread John D. Hume
On Wed, Oct 9, 2013 at 2:32 AM, Zack Maril thewitzb...@gmail.com wrote: How does this vary from flatland/drip? -Zack Grenchman connects to a JVM-with-nrepl you previously launched. Repeated invocations from the command line will hit that same JVM, potentially building up state over time, and

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-08 Thread John D. Hume
On Oct 8, 2013 5:35 AM, Phillip Lord However… I find that I am writing a lot of statements like this: (cond (hash-map? v) …… (vector? v) …… (list? v) ….. :else …..) zcaudate, in what context(s) do you

Re: Teaching Clojure to students (how ?)

2013-10-08 Thread John Gabriele
On Tuesday, October 8, 2013 12:52:38 PM UTC-4, Phil Hagelberg wrote: On Monday, October 7, 2013 8:12:05 PM UTC-7, John Gabriele wrote: For new users who want to get their feet wet right on the first day, I'd suggest this (after they make sure they've got Java installed): #. Download `lein

Re: Teaching Clojure to students (how ?)

2013-10-07 Thread John D. Hume
On Oct 7, 2013 3:29 AM, Phillip Lord phillip.l...@newcastle.ac.uk wrote: Tend to agree with this also. As nice as leiningen is, Clojure seems to inherit from Java bulky projects. Compare these two hello worlds: (println hello world) to #!/usr/bin/python print( hello world ) Both

Re: Teaching Clojure to students (how ?)

2013-10-07 Thread John Gabriele
foo.clj`. -- John -- -- 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: Who uses HtmlUnit?

2013-10-06 Thread John D. Hume
WebDriver's HtmlUnitDriver is only one of many supported drivers. Most Selenium-using teams I've been on have driven real browsers using another driver (which among other benefits allows one to generate realistic screen shots). The one team I was on that used HtmlUnit (a couple years ago) blamed

Re: Type of let form

2013-10-04 Thread John D. Hume
This seems intentional, not a case of docs lagging behind. If you look at the source of let you can see that it has :special-form true in its metadata so that it will remain documented as special even though it's just a macro. I assume the thinking is that it's more useful to continue to document

Re: Type of let form

2013-10-04 Thread John D. Hume
else is fair-game, with java bits being a clear delineation of host-specific functionality. On Fri, Oct 4, 2013 at 4:20 PM, John D. Hume duelin.mark...@gmail.comwrote: This seems intentional, not a case of docs lagging behind. If you look at the source of let you can see that it has :special

Re: Jsonify a Jdbc4Array in Clojure

2013-10-02 Thread John D. Hume
you got it from? On Wednesday, October 2, 2013 9:50:13 AM UTC-4, Christian Jauvin wrote: Ah finally, thanks John, the with-open pattern was indeed the missing piece: it works! Just to summarize, here's what works for me: (extend-type org.postgresql.jdbc4.**Jdbc4Array json/JSONWriter

Re: Jsonify a Jdbc4Array in Clojure

2013-10-01 Thread John D. Hume
I don't use clojure.java.jdbc, so this may be non-idiomatic or just wrong, but have you tried something like (with-open [connection (jdbc/db-connection *db*)] (json/write-str (jdbc/query {:connection connection} [SELECT * FROM...]))) On Tue, Oct 1, 2013 at 8:13 PM, Christian Jauvin

Re: Emacs font and theme for clojure

2013-09-29 Thread John Gabriele
On Thursday, September 26, 2013 10:51:44 AM UTC-4, Murtaza Husain wrote: Hi, I was just cycling through the different themes in emacs. I was wondering what font and theme combination others are using ? I like Inconsolata and Zenburn. -- -- You received this message because you are

Re: Type hints for clojure.set functions

2013-09-28 Thread John D. Hume
On Sep 28, 2013 1:47 PM, splondike splond...@gmail.com wrote: Can anyone else think of a reason why we should not add type hints to the functions, or why coercing the arguments to sets is better (or something else I haven't thought of)? IIRC, type hints are only used by the compiler to generate

Re: much lower recursion depth with memoization

2013-09-23 Thread John Lawrence Aspden
the stack size should give me as much recursion as a man could reasonably need. John. On Monday, September 23, 2013 2:13:12 PM UTC+1, Chris Perkins wrote: On Sunday, September 22, 2013 5:28:37 PM UTC-6, John Lawrence Aspden wrote: This recursion limit really is quite nasty. I could probably

Re: much lower recursion depth with memoization

2013-09-23 Thread John Lawrence Aspden
?'. There are usually ways of dealing with cases where the recursion is just an iteration. A stack depth of 100 should be livable with. A stack depth of 200 means the machine has trouble with problems I can do in my head. Cheers, John. On Monday, September 23, 2013 12:50:28 AM UTC+1, James

Re: much lower recursion depth with memoization

2013-09-23 Thread John Lawrence Aspden
to output a short C program to solve the problem. It took quarter of an hour to write and 65 seconds to run. Thanks for you kind words! There'll almost certainly be a blog post about this at some point. John. -- -- You received this message because you are subscribed to the Google Groups

Re: much lower recursion depth with memoization

2013-09-23 Thread John Lawrence Aspden
that trampoline and recur miss. It's obviously not ideal that the stack and heap can't coexist under one limit, but worst case that means that you need twice as much memory as you should. I can live with that. John. On Monday, September 23, 2013 8:59:19 AM UTC+1, puzzler wrote: Sorry, I wrote

much lower recursion depth with memoization

2013-09-22 Thread John Lawrence Aspden
know why this would happen? Do I just have to give up on memoization and find another way to do dynamic programming? Cheers, John. -- -- 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: much lower recursion depth with memoization

2013-09-22 Thread John Lawrence Aspden
? Is it possible to increase the stack size somehow? Or would that use up all the memory? Cheers, John. On Sunday, September 22, 2013 6:40:11 PM UTC+1, puzzler wrote: Check out my blog article from last year and search for the spot where I describe the priming the pump trick: http://programming

Re: much lower recursion depth with memoization

2013-09-22 Thread John Lawrence Aspden
Ah, it turns out that adding this :jvm-opts [-Xss50M] to project.clj gets me about 25000 memoized self-calls, so that will do. Last time I had to worry about stack size I was programming an 8051 . I'd forgotten! Cheers, John. -- -- You received this message because you are subscribed

Re: Reading single characters...?

2013-09-22 Thread John Jacobsen
-keystroke/read-unbuffered-keystroke.asciidoc. If that recipe (or its trivial extension to echo repeated characters) indeed does not work correctly for you, now would be an excellent time to let people know so there is a chance to correct it before it goes to print! John On Sunday, September 22

Re: Why is clojure so powerful?

2013-09-13 Thread John Hyaduck
Have you made the free version available yet? I would like to read it and review. John Hyaduck On Wednesday, September 4, 2013 5:32:01 PM UTC-4, Tomislav Tomšić wrote: I suspect, there are numerous possible ways to answer that question. One can ignore it, others would care to offer

Re: ANN How to Write a Useful Change Log

2013-09-12 Thread John Gabriele
One thing I like to see under each release's heading in the ChangeLog.md file is a date indicating when the release was made. -- -- 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

Re: new ClojureDocs experiment

2013-09-11 Thread John Gabriele
there. :) -- John -- -- 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: new ClojureDocs experiment

2013-09-10 Thread John Gabriele
docstrings directly from Clojure itself. Fixing docstring typos in a wiki is nice, but I'd rather see fixed the actual source docstrings themselves... -- John -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

<    1   2   3   4   5   6   7   8   9   10   >