On 19 July 2010 19:41, Laurent PETIT wrote:
> 2010/7/19 Stuart Halloway
>>
>> "use" = "rely on"
>>
>> In your example, func relies on a variable which is (presumably, based on
>> its use in other-func) intended for dynamic binding. Therefore, func is
>> impure.
>>
>> It is idiomatic to name such
On 14 July 2010 16:21, Tim McCormack wrote:
> Is there some kind of JDBC nonsense that I'm not aware of? Are
> backticks a special feature of MySQL that can't be read by all JDBC-
> compatible RDBMSs? I'm not a database person, but it seems to me that
> either backticks should be placed around all
On 12 July 2010 23:25, j-g-faustus wrote:
> The site looks very nice, I especially like the "find real world
> examples" functionality and the fact that it collects documentation
> for common non-core libraries as well.
>
> I made my own cheat sheet for private use over the past month or so,
> cor
On 10 July 2010 09:06, James Reeves wrote:
> On 9 July 2010 17:46, Paul Moore wrote:
>> Is there any benefit to using a name like foo.core (or foo.api) rather
>> than simply foo (beyond sytlistic considerations, that is)?
>
> Clojure compiles "foo" to a
On 9 July 2010 17:30, Laurent PETIT wrote:
> Indeed, foo.api sounds better than foo.core to me, now than I'm exposed to
> that (core sounds more like 'internals'). But still I prefer to have the
> library name at the end of the namespace, it's easier to spot than in the
> middle (e.g. I prefer net
On 6 July 2010 22:24, Greg wrote:
>> This would be most likely java interop, ie. ->.
>> There the main arguments are 99% of the times the first or the last ones. So
>> -> or ->> will work
>
> OK, so what happens when one of the functions takes it in the front, and the
> other in the back?
>
> Or
On 6 July 2010 22:02, Greg wrote:
> Greg you're enthusiasm is appreciated. But this ML is filled with talented
> and smart people who have an equal grasp of logic and reason who have been
> using Clojure for a couple years now and they aren't clamoring to your nice
> snippet of code. That's someth
On 2 July 2010 15:50, Meikel Brandmeyer wrote:
> Then there are examples like this one:
> (reduce '* '(1 2 3))
>
> Someone who is new to Clojure and tries to understand reduce... Does
> he understand why the result is 3? A result which relies on a not very
> well-known fact, that you can actually
On 1 July 2010 16:49, Kevin Livingston wrote:
> Some of the build tools like Maven can help a lot.
(Thanks for your other comments, which I've cut. But this one made me think).
I've heard comments like this elsewhere (with regard to both Maven and
Leiningen), but I'm not quite sure I follow. You
On 1 July 2010 15:29, Laurent PETIT wrote:
> Hello,
>
> note that with java 6 you can specify at once to add all the jars
> located in a directory:
>
> java -cp "libs/*" clojure.main
>
> and you can place any jar you want in directory libs.
>
> and this is composable:
>
> java -cp "clojure.jar:lib
First, a disclaimer - I don't have any problem with the idea of the
classpath in Java. In principle, it's pretty similar to Python's
sys.path. And jar files are much like Python having zip files on
sys.path. So I'm familiar with the idea.
Where I struggle is with the practicalities of managing the
On 29 June 2010 23:31, Sean Corfield wrote:
> FWIW, I blogged a short step-by-step post on getting up and running
> with Leiningen to show some Clojure at the repl, run as a script and
> compiled to a JAR and run via java:
>
> http://corfield.org/blog/post.cfm/getting-started-with-clojure
>
> Bear
On 30 June 2010 04:02, Jason Smith wrote:
> So I'll say it again, it's just not that simple. Unless you already
> know Java, and the only learning curve you face is the new features in
> Clojure. Then it's not bad. But it does give you new ways to cut your
> foot off more quickly. :-)
An intere
On 29 June 2010 21:03, Phil Hagelberg wrote:
> On Wed, Jun 16, 2010 at 9:24 PM, Phil Hagelberg wrote:
>> Mostly I'd like feedback on the tutorial:
>> http://github.com/technomancy/leiningen/blob/master/TUTORIAL.md
>>
>> But if you've got some time to look over the readme, that would be
>> great t
On 29 June 2010 18:36, Mark Engelberg wrote:
> On Tue, Jun 29, 2010 at 12:30 AM, Paul Moore wrote:
>> Is there anything a clojure newbie with little JVM development
>> experience (but a willingness to learn) can do to help with the
>> Windows situation? From what I under
On 29 June 2010 15:14, Angel Java Lopez wrote:
> Hi people!
>
> Paul, yes! but...
>
> The apply and str evaluations in (apply str (repeat n text))
> are lazy?
>
> I guess the result could be a big string. Isn't it?
So you're looking for a result that behaves like a string, but isn't
an actual ja
On 29 June 2010 06:11, cageface wrote:
> On Jun 28, 9:14 pm, Michael Richter wrote:
>> Ah. The Clojure community has already started down the road to Common
>> Lisp-style, smugness-generated obscurity and disdain. Bravo! Well-played!
>
> Not at all. Nothing would make me happier than "Clojure
On 28 June 2010 22:41, cageface wrote:
> On Jun 28, 12:16 pm, Martin DeMello wrote:
>> It depends. I found the concepts pretty easy, since I have done a lot
>> of functional programming, but when I was new to clojure I had a truly
>> horrible time figuring out the various classpath issues needed
On 28 June 2010 23:13, Lee Spector wrote:
> and more recently I had to figure out about.dotted.names and their meaning
> with respect to directory structures,
> in order to get require to find a second clj file. It's not complicated, but
> it's also not obvious to everyone first coming
> to Cloj
On 29 June 2010 06:47, Mark Engelberg wrote:
> Yes, that is disconcerting that clojure-contrib produces errors on
> Windows (sigh, it often feels like Windows is a second-class citizen
> when it comes to clojure), but that did the trick and allowed the
> build to complete. Thanks for the tip.
Is
On 28 June 2010 19:49, Mike Meyer
wrote:
>> Yet another set of choices n00bs are faced with is figuring out how
>> to actually compile their source into an executable.
>
> Executable? We're talking about Java here. It doesn't do executables -
> it does jar files. There's little reason to build tho
On 28 June 2010 20:24, Angel Java Lopez wrote:
> Hi people!
>
> Any way to produce a lazy seq of chars, that prints as a string, based on
> two parameters, n (number of repeats), text (text to repeat)?
>
> Then, something like
>
> (myrepeat 100 "superdupertext")
>
> could be implemented withou
On 22 June 2010 15:15, Lars Nilsson wrote:
> Maybe Windows Script Host is an option, if you haven't looked at that one yet.
Yes, WSH/VBS is a reasonable option. There are some gotchas which you
need to be careful of though - there's *still* only one filetype
(.vbs) which is executed by cscript o
On 22 June 2010 00:11, Rick Moynihan wrote:
> On 21 June 2010 18:42, Paul Moore wrote:
>> 3. Using a bat file to start a GUI application from Explorer causes an
>> unnecessary and ugly console window to appear.
>
> You should use "javaw" instead of "java&quo
On 21 June 2010 22:12, Russ Olsen wrote:
> Paul,
>
> One way would be to use the cljw.exe that comes with
> dejour. This is a windows executable that runs clojure
> without creating that annoying extra window.
Thanks. That's certainly one option - I could probably without too
much difficulty put
The common way of running Java applications (and hence Clojure code)
on Windows seems to be to use a batch file wrapper (for example,
lein.bat for Leiningen). It seems to me that there are a number of
issues with this:
1. Batch files don't nest well - if I want to call lein.bat from
within another
On 19 June 2010 15:26, cageface wrote:
> Maybe it's only because I'm coming from Ruby, in which number
> promotion is automatic and everything is slow, but if I have to choose
> between correctness and performance as a *default*, I'll choose
> correctness every time. I think there's a good reason
On 19 June 2010 17:22, Chas Emerick wrote:
> If you're just looking to run a script that happens to be on the classpath,
> you can do so by prepending an '@' character to the classpath-relative path
> to the script.
>
> So, if a directory foo is on your classpath, and a clojure file you'd like
> t
On 19 June 2010 07:24, rzeze...@gmail.com wrote:
> On Jun 18, 6:15 pm, Paul Moore wrote:
>> I've just seen a couple of postings which, if I'm not mistaken, imply
>> that it's possible to have a Clojure script in my classspath. Is that
>> right?
>
> Yes,
Thanks to Ryan, Rob and Alex for the suggestions. I'll have a deeper
look into all of them.
Paul
--
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 moderat
I'm wondering, what would be a useful basic set of tools for a
newcomer to Clojure with no Java background? I'm not really talking
about IDEs (everyone has their own opinions about IDEs, and I've seen
some discussions elsewhere to give me some pointers on that one). I'm
more interested in things li
I've just seen a couple of postings which, if I'm not mistaken, imply
that it's possible to have a Clojure script in my classspath. Is that
right? I come from a Python background (little or no Java experience)
and the idea that anything other than .class or .jar files (or
directories) could be on t
On 18 June 2010 15:08, Stuart Halloway wrote:
> While I enjoy a theoretical debate as much as the next person, it would be
> nice to see
>
> (1) examples of real code that fail on reasonable inputs, if this change
> were made. And how difficult it would be to fix them.
>
> (2) examples of real cod
On 3 June 2010 21:25, Aaron Cohen wrote:
> This error indicates that your "java" executable is coming from the
> JRE rather than the JDK. On windows, the JRE only includes the
> "client" virtual machine.
>
> If you have the JDK already installed on your computer, switch your
> JAVA_HOME and PATH t
More of a Java question than a Clojure one, but it's in the context of
clojure, and I don't know a better place to ask, so forgive me...
I've seen a couple of references in articles about clojure to using
"java -server". My "java" executable has a "server" option, but when I
try it, I get told:
On 31 May 2010 07:48, alux wrote:
> Hello Glen, good hint. Problem and solution reproduced ;-)
Yes, it looks like Clojure's (comment ...) form requires the contents
of the comment to be syntactically correct Clojure forms. As Glen
says, forward slashes seem to work - although personally, I dislik
On 31 May 2010 06:12, Zak Wilson wrote:
> The trouble with pmap is that it only works well with a slow function
> and a short sequence. In trivial tests, it seems to be best if the
> sequence has as many elements as you do cores.
>
> I've been experimenting with things that are like pmap, but work
I've written a small simulation program, in order to help me learn
Clojure. I've reproduced it below. It's quite likely not very
idiomatic - any suggestions on how to improve it would be nice.
However, my main concern is that it doesn't seem to scale as I would
expect when multi-threading.
The sim
On 30 May 2010 12:31, alux wrote:
> Small addition, you missed to add the : before eof
>
> replace "goto eof" by "goto :eof"
Thanks, good catch. ("goto eof" without the colon works on TCC, which
I normally use as my command shell).
Paul.
--
You received this message because you are subscribed
On 28 May 2010 16:17, alux wrote:
> Hello Paul,
>
> thats much better, many thanks!
I've added it to the Wikibooks page,
http://en.wikibooks.org/wiki/Clojure_Programming/Tutorials_and_Tips#Shebang_Scripting_in_Clojure
Paul.
--
You received this message because you are subscribed to the Google
On 28 May 2010 09:48, alux wrote:
> Hello!
>
> Short: It works, but is not perfect.
>
> (this may need an windows expert to make it better)
Try this:
--- myscript.bat ---
:x (comment
@echo off
java -cp clojure.jar clojure.main "%~f0" %*
goto eof
)
(println "Hi!" *command-line-args*)
--
Th
I want to write a reasonably high-performance simulation program in
Clojure. For the random numbers, I'd prefer to use Mersenne Twister
(for a number of reasons - it's a well-known, good RNG, and it's
commonly used in a number of other languages I use, so it's a good
baseline for comparing implemen
On 27 May 2010 18:26, Sean Devlin wrote:
> I make them available CC BY-NC-SA, so download away. You'll need a
> vimeo account (free) to download them, though.
Ah, I hadn't realised that signing up got a download option. Thanks!
Paul.
--
You received this message because you are subscribed to t
On 27 May 2010 16:39, eyeris wrote:
> The Full Disclojure video series is targeted more toward the lisp
> newbie, but it contains a series of videos touring different
> development environments. http://vimeo.com/channels/fulldisclojure
Ta. Any way of downloading these to watch on my iPod? As I sa
On 27 May 2010 15:38, Base wrote:
> Regarding Clojure I got Stuart Halloway's book Programming Clojure
Another recommendation! Looks like that's definite then :-) Thanks.
> Also, I spend a *lot* of time on this site and ask a lot of really
> dumb questions. Clojure has the best group support by
On 27 May 2010 15:16, Sean Devlin wrote:
> Welcome aboard Paul!
Thanks!
> 1. Pick an IDE and stick with it. I'd recommend ClojureBox if you're
> interested in Clojure only, or NetBeans + Enclojure if you want to
> learn some about Java too. In fact, NetBeans is probably a better
> place to st
Hi,
I'm new to Clojure, and looking for the best way to get going. I've
got a pretty broad experience of various programming languages (C,
Python, Lua, Factor, JavaScript, Haskell, Perl, ...) including a bit
of experience with Lisp-like languages, so the language itself isn't
likely to be a huge pr
47 matches
Mail list logo