Re: idiomatic list-ify

2012-03-09 Thread Sanel Zukan
Not sure what kind of input you can get, but apply-ing list only on strings would decompose them, so your function can be written as: (defn ls [x] (cond (string? x) (apply list (list x)) :else (apply list x as '(apply list nil)' will yield '(). Or, you can write

using Clojail dynamically

2012-03-09 Thread nchurch
I've just been trying out Clojail, and ran into a difficulty. Suppose you make a sandbox: (def sb (sandbox secure-tester)) and you want to dynamically assemble function calls to run inside the sandbox. Well, the sandbox takes a quoted expression, so you do something like this: (defn

Re: using Clojail dynamically

2012-03-09 Thread Meikel Brandmeyer (kotarak)
Hi, without being too deep in clojail and the like... Try quoting the func and input values to your function-sandbox function. Sincerely Meikel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Leiningen 2.0.0-preview1

2012-03-09 Thread kjeldahl
Another problem. I have a :repl-init myproj.something in project.clj . Using lein repl, that namespace gets pulled in just fine, but not when I do a lein2 repl. Any idea why? Looks like it does not even try to load the namespace until I pull it in inside the repl manually. Thanks, Marius K. On

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread Daniel Jomphe
On Thursday, March 8, 2012 9:33:04 PM UTC-5, puzzler wrote: I love these ideas. I think your final comment is especially insightful. I have no problem writing Clojure code, I just find it unnecessarily taxing to read it. The idea of separating the two, and possibly having a read-mode is

Re: idiomatic list-ify

2012-03-09 Thread Brandon Harvey
On Thursday, March 8, 2012 2:19:37 PM UTC-8, mefesto wrote: If `x` is a list then is the call to `(apply list x)` necessary? Yes, meant to take that out. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread Jason Lewis
This has been a fascinating discussion, thanks to everyone involved. I do kind of feel like complaining about indentation in Clojure is like complaining that Ruby has too many parentheses ( shut up, they're optional!). I still feel like a big part of 'readability' comes down to personal

Clojure/West rock climbing unsession

2012-03-09 Thread Kevin Lynagh
Keming Labs and Upwind Solutions are sponsoring a trip to the local rock gym the Friday of Clojure/West, immediately after Richard Gabriel's talk. No rock climbing experience required: we're going to be bouldering, i.e., without ropes, not very high up. If you would like to come, RSVP with me via

Re: clojure on android over CLI

2012-03-09 Thread Rostislav Svoboda
On 8 March 2012 11:14, Jim - FooBar(); jimpil1...@gmail.com wrote: There is a clojure repl for android... Jim, my goal is to be able to write android apps in clojure. But to develop an app in clojure on a PC is pain: The android emulator eats a lot of memory and takes minutes to start, 'ant

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread Timothy Baldridge
This has been a fascinating discussion, thanks to everyone involved. So I've been lurking on this thread for some time, and thought I'd go and offer my two cents on the topic. While writing clojure-py, I've been in the unique situation of having to decide which language features will be

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread Konrad Hinsen
Timothy Baldridge writes: For example, this is perfectly valid Python, and something I see fairly often in other people's Python code: print [(x, y, x * y) for x in (0,1,2,3) for y in (0,1,2,3) if x y] But personally I consider this sort of code unacceptable. Instead I tend to

Re: using Clojail dynamically

2012-03-09 Thread Alan Malloy
Indeed. Don't pass it the function +, pass it the symbol '+. On Mar 9, 1:20 am, Meikel Brandmeyer (kotarak) m...@kotka.de wrote: Hi, without being too deep in clojail and the like... Try quoting the func and input values to your function-sandbox function. Sincerely Meikel -- You

Re: clojure on android over CLI

2012-03-09 Thread Daniel Solano Gomez
On Fri Mar 9 02:44 2012, Rostislav Svoboda wrote: On 8 March 2012 11:14, Jim - FooBar(); jimpil1...@gmail.com wrote: There is a clojure repl for android... Jim, my goal is to be able to write android apps in clojure. But to develop an app in clojure on a PC is pain: The android emulator

Re: Why don't extends? and satisfies? require implementation of all protocol methods?

2012-03-09 Thread Armando Blancas
I just want to point out that I incorrectly stated that Clojure generates abstract stubs for unimplemented protocol methods (or types, for that matter). In fact, Clojure does nothing about them. For classes to fully implement interfaces is enforced by the Java compiler, not the JVM. On

Re: Leiningen 2.0.0-preview1

2012-03-09 Thread Colin Jones
Yes, it's not supported yet in lein2 because REPL-y doesn't support it yet. But it's definitely on my plate to knock out soon, along with :prompt support, although :repl-* options will likely be collapsed into a :repl-options map. https://github.com/technomancy/leiningen/issues/432

Re: using Clojail dynamically

2012-03-09 Thread nchurch
Thank you both! That works. I'm not sure I understand why, though. From the error message, you would think it needs fewer steps of evaluation, not more. Meanwhile, if I do: (defn non-sandbox [func inputs] (map (fn [inp] (eval `(~func ~inp))) inputs)) this has no problem taking a function.

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread Craig Brozefsky
Evan Gamble solar.f...@gmail.com writes: (let? [a foo :else nil b bar :is even? c baz :when ( b c) d qux] (f a b c d)) Macros like that just make your code so much LESS readable. I now have to understand the semantics of a bunch of keywords specific to the macro,

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread Tassilo Horn
Craig Brozefsky cr...@red-bean.com writes: Hi Craig, Also, people have been writing lisp for a real long time, and they haven't invented a chucklehead macro like let? yet, so prolly not really needed to improve the readability... They have invented `loop' and `format'. ;-) SCNR, Tassilo --

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread Evan Gamble
I find let? useful and readable, as do others. There's a bit of brain- training necessary to read it, but not a lot. Probably no more than the keyword clauses of the for comprehension. The argument that decades of Lisp programmers haven't invented this particular chucklehead macro is a bit weak,

ns-publics, ns-map etc in ClojureScript?

2012-03-09 Thread Shantanu Kumar
Hi, Is there a plan to support namespace-related meta programming functions such as ns-publics, ns-map etc. in ClojureScript? I was wondering about at least the ones that we annotate with ^:export in the CLJS files. Shantanu -- You received this message because you are subscribed to the Google

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread daly
On Fri, 2012-03-09 at 10:04 -0800, Evan Gamble wrote: I find let? useful and readable, as do others. There's a bit of brain- training necessary to read it, but not a lot. Probably no more than the keyword clauses of the for comprehension. The argument that decades of Lisp programmers haven't

Re: ns-publics, ns-map etc in ClojureScript?

2012-03-09 Thread Stuart Sierra
Namespaces don't exist at runtime in ClojureScript. That's not likely to change. -S -- 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

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread Craig Brozefsky
Tassilo Horn tass...@member.fsf.org writes: Craig Brozefsky cr...@red-bean.com writes: Hi Craig, Also, people have been writing lisp for a real long time, and they haven't invented a chucklehead macro like let? yet, so prolly not really needed to improve the readability... They have

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread Nicolas
Well maybe the problem of the let? macro is that it is not standard. If you use standard constructs and I'am proeficient with clojure I'll understand your code fast. I'll concentrate on understanding your code relevant for your application and domain. But just adding a few new constructs specific

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread Nicolas
(Sorry for split post). So I'am not against let? macro of whatever you might need. That why we have a lisp here. But be sure you really need it/use it. And it is designed to be intuitive as possible. On 9 mar, 23:05, Nicolas bousque...@gmail.com wrote: Well maybe the problem of the let? macro

Re: Can Clojure be as readable as Python or Ruby ?

2012-03-09 Thread Mark Engelberg
The nice thing about Grand's cond macro is that it matches the syntax of using :let inside for comprehensions, so it looks just like other Clojure code. In fact, once you've tried it, it feels surprising that it's not already built into Clojure, specifically because it is so similar to binding

Clojars security upgrade

2012-03-09 Thread Phil Hagelberg
Hello folks! In light of the recent break-in to the Node.js package hosting site (https://gist.github.com/2001456), I've decided to bump the priority of increasing the security on Clojars. I've deployed a fix that uses bcrypt (http://codahale.com/how-to-safely-store-a-password/) for password

Clojure 1.4.0-beta4 release

2012-03-09 Thread Stuart Sierra
Available soon from Maven Central repository. List of changes available here: http://build.clojure.org/job/clojure/357/ -S -- 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

Re: clojure.io

2012-03-09 Thread Brian Goslinga
On Mar 8, 3:12 pm, cej38 junkerme...@gmail.com wrote: This is a NOOB question. Would it be possible to write a library that could do IO without resorting to the underlying VM? I would be suspicious of a cross-implementation wrapper. You'll probably end up with something as awful as the Common

[ANN] kibit 0.0.2

2012-03-09 Thread Jonas
We have now released kibit[1] 0.0.2 to Clojars. New in this release is * Leiningen 2.0 support * Better at finding source code * More rules * Marginalia docs[3] * Lots of small fixes Kibit is a simple code analysis tool (and leiningen plugin). The purpose of the tool is to tell its users that

ANN: ringMon Ring middleware that provides monitoring and nREPL remote interface to any Ring based Clojure web app

2012-03-09 Thread zoka
Hi all, The ringMon is Ring middleware that injects single web page into existing Ring application for monitoring, testing and debugging purposes. The page provides periodic display of raw JMX data of interest in hierarchical form. It also displays some derived data such as CPU load over sampling

Re: ANN: ringMon Ring middleware that provides monitoring and nREPL remote interface to any Ring based Clojure web app

2012-03-09 Thread Shantanu Kumar
Hi Zoka, That sounds like a great project! I will try it out. The only suggestion I would like to make right now is that it would probably be better to push non-SNAPSHOT JARs to Clojars while making a release. Shantanu On Mar 10, 11:08 am, zoka ztomi...@gmail.com wrote: Hi all, The ringMon