in namespace user.
The crux is this: (def...) is a special form, so the usual rules don't
apply. In this case, what matters is when the (def...) form gets
READ, not when it gets evaluated. To get the behavior you expect, try
the intern function.
-Stuart Sierra
the future
was created. clojure.test uses dynamic bindings for counting the
number of tests/assertions.
So yes, the answer is to do all your assertions in the test body, not
in other threads. I hope this is a special case that won't be a
problem too often, since I don't see any way around it.
-Stuart
On Jul 6, 6:59 pm, Nicolas Buduroi nbudu...@gmail.com wrote:
Hi, I needed to call a static method on a class stored in a var
yesterday and found that it was a little bit trickier than I initially
thought.
My first impression is that this is probably not the best way to go
about this. Java
Hi Ben,
Clojure assumes UTF-8 when loading code. If you want to load source
code in a different encoding, you can open a java.io.Reader with the
appropriate encoding; the easiest way to do that is probably to use
clojure.contrib.duck-streams and bind *default-encoding*.
-SS
On Jul 2, 2:20 am,
Hi folks,
I have created a branch of clojure-contrib that should be fully
compatible with Clojure 1.0:
http://github.com/richhickey/clojure-contrib/tree/clojure-1.0-compatible
This includes c.c.test-is with the older syntax for are. Maybe this
should be updated to use the newer syntax.
Contrib
On Jul 2, 2:17 pm, Chouser chou...@gmail.com wrote:
Also, is there any reason not to call this contrib-1.0? It seems to me that
it
would be most useful to have major contrib versions simply map to major
clojure
versions: contrib-1.a.x for clojure-1.a.y
The consensus on the dev list
On Jun 29, 11:14 am, John D. Hume duelin.mark...@gmail.com wrote:
There may already have been a discussion about this in IRC, but I
would have loved to see the 'are' macro continue to support the old
syntax (maybe with deprecation warnings) as well as the new until
after 1.1 is released.
On Jun 25, 6:25 am, Rich Claxton rich.clax...@gmail.com wrote:
Hello I have just started learning Clojure and functional programming,
quick question, what happens internally when I do a defn, does this
create the byte code, or a ref to the function which is stored, as it
does actually create
the difference is barely
noticeable.
The location the code came from (file, JAR, typed at the REPL) makes
no difference.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send
On Jun 25, 2:51 am, michael frericks michael-freri...@web.de wrote:
a) new features planned,
b) things that break Clojure 1.0
c) and maybe removed features?
Check out http://clojure.org/todo
-SS
--~--~-~--~~~---~--~~
You received this message because you are
On Jun 25, 3:59 pm, Berlin Brown berlin.br...@gmail.com wrote:
But does anyone have a problem with Lisp/S-Expressions to HTML/XHtml,
especially for the entire document. What is wrong with using some
form of templating system.
Yes, I'm partial to StringTemplate, a Java template framework.
Hi Michel,
Thanks for working on this! I'm going away this week, but I'll be
sure to look at this more closely when I get back. (I wrote the first
c.c.trace, it may have been modified by others since.)
-Stuart Sierra
On Jun 16, 7:13 pm, Michel Salim michel.syl...@gmail.com wrote:
I've often
Strange, I get the expected result, Clojure SVN revision 1382:
user (def dozen 12)
#'user/dozen
user (binding [dozen 13] dozen)
13
user (#(binding [dozen 13] dozen))
13
user
-the other Stuart
On Jun 16, 2:08 pm, Stuart Halloway stuart.hallo...@gmail.com wrote:
This surprised me. What part of
kind of durable Ref that commits to disk,
but never had the time to write any code. At some point, you're
basically implementing a database, and that's a lot of work.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed
?
It's not much less hacky, but you can do:
(alter-var-root #'report-problem
(fn [_] mdc.common.test-expect.test-is-adapter/report-problem)
The only real difference is that this will preserve var metadata.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received
On Jun 9, 10:32 am, Stuart Sierra the.stuart.sie...@gmail.com wrote:
Join us Tuesday, June 9 from 7:00-9:00 for Stuart Sierra's
presentation:
Implementing AltLaw.org in Clojure
Slides and video here: http://lispnyc.org/wiki.clp?page=past-meetings
We'll try to get something lighter than
Can I help from the test-is side? Could test-expect be added to
clojure-contrib?
-Stuart
On Jun 10, 1:36 pm, Matt Clark matt.clar...@gmail.com wrote:
Thanks for these ideas, I will give them a try tonight and update the
adapter namespace with the changes. If anyone knows of a more
, software
transactional memory, and tools for managing mutable state
in a multithreaded environment. Clojure is compiled
on-the-fly to Java bytecode, and offers direct and
convenient access to any Java library.
Stuart Sierra http://stuartsierra.com/ has contributed
many
relationships outside the Java class hierarchy. So for now, defining
your own root ancestor is the way to proceed.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send
://gigamonkeys.com/book/
Clojure borrows the good bits of CL.
SICP is available online too, http://mitpress.mit.edu/sicp/
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email
[]
(for [x (range 1 9), y (range 1 )]
(format %05d-%04d x y)))
-Stuart Sierra
--~--~-~--~~~---~--~~
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
var))
(intern *ns* symbol var
This is slightly evil, and I would never recommend it for any purpose
except unit testing, but there it is.
-Stuart Sierra
On Wed, Jun 3, 2009 at 12:36 AM, Stuart Halloway
stuart.hallo...@gmail.com wrote:
Hi Allen,
You could write a function that uses
. Clojure is compiled
on-the-fly to Java bytecode, and offers direct and
convenient access to any Java library.
Stuart Sierra http://stuartsierra.com/ has contributed
many modules to Clojure's standard library, including a
testing framework, a code walker, and a macro-based
retrieve them.
-Stuart Sierra
On May 28, 5:23 pm, tsuraan tsur...@gmail.com wrote:
I have a java class whose constructor expects (among other things) a
BlockingQueueLong. It's easy to create a BlockingQueue in clojure
(obviously), but I can't figure out the syntax to specialize it to the
Long
-root, and the changes would only affect the
current thread.
-Stuart Sierra
On May 17, 3:24 pm, Mark Engelberg mark.engelb...@gmail.com wrote:
Thanks for your questions. I'll try to explain better.
First, I'll explain that my line of work is to build tools to generate
puzzles. I often have
Hi Josip,
The latest version of c.c.json dispatches on the type function,
which in turn uses class. It should be pretty easily extendible.
-Stuart Sierra
On May 12, 9:26 am, Josip Gracin josip.gra...@gmail.com wrote:
Hi!
I'm querying a DB and getting java.sql.Timestamp in results, among
...
(prn transformed-code)
(recur)))
But this sort of source-level transformation is rarely used in Lisp-
like languages. A more typical approach would be to write a macro or
function that overrides some core function, then use that in your own
namespace.
-Stuart Sierra
Hi folks,
I just found out that my presentation for tomorrow has been canceled,
due to problems with the venue.
But LispNYC will still be meet at the Sunburnt Cow, 137 Avenue C
between 9th 10th Streets. I'll be there to talk about Clojure over
drinks.
My presentation has been postponed to
I'll remove it.
-SS
On May 10, 1:56 pm, miner stevemi...@gmail.com wrote:
I'm just getting started with Clojure. I had a small issue trying to
build the clojure-contrib project. I'm on an old PPC Mac with only
Java 5. The javalog.clj file requires Java 6.
There's an easy fix for
APIs. Whatever. Java libraries tend to
be used by more than two people, so they have a higher likelihood of
actually working.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post
On May 8, 6:30 pm, Chris Dean ctd...@sokitomi.com wrote:
How do folks launch their apps?
Shell scripts, calling AOT-compiled classes (gen-class with a -main
function).
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed
.
-Stuart Sierra
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to
clojure+unsubscr
One comment, although this has no effect on performance: you don't
need to use the static class fields as functions. That is, you can
write Math/PI and Short/MAX_VALUE instead of (Math/PI) and (Short/
MAX_VALUE).
-Stuart Sierra
On May 9, 6:53 pm, Julien julien.ma...@gmail.com wrote:
I'm
The pretty-printer requires clojure-contrib to be compiled with ant -
Dclojure.jar=... You may be missing that.
-SS
On May 9, 8:25 pm, Aaron Feng aaron.f...@gmail.com wrote:
When I tried to import PrettyWriter from clojure-contrib I'm getting
java.lang.ClassNotFoundException. Am I missing
Hi Stephane,
Sorry about this; it was my fault. Should be fixed now, contrib SVN
rev. 773.
-Stuart Sierra
On May 7, 8:27 am, stephaner stepha...@gmail.com wrote:
Hi everyone,
I've upgrade to the lastest release, i'm trying under Emacs to run-
tests and now I receive the following error
On May 6, 8:34 pm, Eric Tschetter eched...@gmail.com wrote:
I'm wonder if such a thing exists, or has everyone basically
just rolled their own wrapper on top of their favorite Java HTTP
client library?
I just use the Apache Commons HTTP client.
-SS
Hi Bruce,
It looks like your namespace only implements an interface, rather than
extending a class. You need an :extends... line in your (:gen-
class...) to set the concrete base class.
-Stuart Sierra
On May 7, 12:26 pm, gun43 bg-561...@versanet.de wrote:
I am having trouble calling
On May 5, 2:05 pm, Timo Mihaljov noid@gmail.com wrote:
When clojure.contrib.test-is/run-tests is given an invalid argument, it
throws a NullPointerException:
Fixed!
-SS
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
org.example.FancyInputStream
(:gen-class :extends java.io.InputStream))
(defn -read-void [this]
(int \a))
Related: You can also use the :exposes-methods argument to gen-class
to access superclass methods.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you
On May 5, 2:05 pm, Timo Mihaljov noid@gmail.com wrote:
When clojure.contrib.test-is/run-tests is given an invalid argument, it
throws a NullPointerException:
Yes, I'm aware of this, will try to fix.
-SS
--~--~-~--~~~---~--~~
You received this message
the classpath; check the docs.
You can check the classpath at the REPL like this:
(System/getProperty java.class.path)
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group
libraries) in Java that you could use
from Clojure.
-Stuart Sierra
On May 5, 12:16 pm, dhs827 scheur...@gmail.com wrote:
Hi,
my name is Dirk Scheuring, I'm a writer based in Cologne, Germany, and
I want to write something about AI that can only be expressed by using
AI technology and technique
that may need
to be fixed to make proper file names. file is for strings that are
assumed to be valid file names.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group
On May 1, 9:28 am, Julien julien.ma...@gmail.com wrote:
How could (read-string ) access to a binding local to a form?
Is this possible?
(let...) defines a lexical scope, which is only available to forms
that are physically (lexically) inside the let. The result of read-
string doesn't count
to have
any hope of success. At some point I hope to write an article with
more details. In the mean time, search the list to learn about gen-
class and compile.
-Stuart Sierra
On Apr 29, 7:04 am, Santanu thisissant...@gmail.com wrote:
Hi Everybody,
I wanted to compile a .clj clojure file
On Apr 29, 10:14 am, brus emil.bru...@gmail.com wrote:
(def AShow (proxy [Enum] [AlwaysShow 1]))
I don't think you can proxy an enumeration. You can use gen-class,
but even that doesn't work perfectly. You may need to break down and
write some Java.
-Stuart Sierra
* Clojure libs I've written, like test-is
-Stuart Sierra
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send
On Apr 29, 11:21 am, Rich Hickey richhic...@gmail.com wrote:
I'll be there - looking forward to it!
Ooh, pressure. Guess I gotta make it good.
-SS
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To
On Apr 29, 5:58 pm, Stu Hood stuh...@gmail.com wrote:
Instead of attaching the metadata directly to the object, what if the
metadata was stored outside the object, in a global map of {object metadata,
...}? In order to handle garbage collection, something similar to Java's
WeakHashMap could
FYI, for those interested in using Git for Clojure sources, here's
Google's advice on how to use Git with Google Code:
http://google-opensource.blogspot.com/2008/05/develop-with-git-on-google-code-project.html
-SS
--~--~-~--~~~---~--~~
You received this message
clojure.contrib-duck-streams has a similar function, read-lines, that
does close the Reader after all the lines have been read (and the
sequence consumed). It's not entirely safe, because if an exception
or something prevents you from reading all the lines, the Reader
remains open.
-Stuart
Hi Boris, welcome to Clojure!
This function looks reasonable to me. In your example, you don't need
to write #(identity %) -- just identity is enough. If you want to
preserve the order of objects in the sequence, you can use a vector
instead of a list.
I would use contains? in the conditional
instead.
-Stuart Sierra
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to
clojure+unsubscr
methods when they
are used as a value, but that might not be easy or efficient to
implement.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send email to clojure
write (+ 1 2 3), the compiler
automatically resolves the + to get the Var #'clojure.core/+
To invoke Java methods by name, use the Java Reflection API:
http://java.sun.com/docs/books/tutorial/reflect/index.html
-Stuart Sierra
On Apr 26, 10:46 am, timc timgcl...@gmail.com wrote:
Is there a way
, since git allows you to delete
or undo almost anything, including commits in the remote repository.
That's actually one of the reasons Google gives for not supporting git
-- all that freedom makes it hard to re-implement git on top of their
infrastructure.
-Stuart Sierra
address space (called a place).
If you want to manipulate data in another place, you have to send
the code there with an operator called at.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group
control over Java as a means of achieving a competitive
advantage over other users in a manner that is detrimental to the
ecosystem around the language.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
programming in
Lisp, then they probably are.
-Stuart Sierra
--~--~-~--~~~---~--~~
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
To unsubscribe from this group
)
(def p1 (person {:name Stuart Sierra}))
(p1 :name)
;;= Stuart Sierra
;; Now change the definition of person.
(defn person [record]
(fn
([key]
(if (= key :name)
(str (:first-name record) (:last-name record))
(key record)))
([key value]
(if (= key :name
-
clojure.clojure-main ...
clojure.contrib.classpath:
Small utilities for examining the Java CLASSPATH.
clojure.contrib.jar:
Small utilities for examining JAR files.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed
that maps can only have strings as keys. Maybe json-str
should enforce that.
-Stuart Sierra
--~--~-~--~~~---~--~~
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
is invoked as a script.
...
Thoughts?
I suggest using a -main function for this purpose. Then with
(ns ... (:gen-class)) you can generate a static Java class with same
behavior.
And public static void main(String[] args) is already the standard
Java way to make a class executable.
-Stuart Sierra
an (old) article with a related example:
http://www.javaworld.com/javaworld/jw-04-2000/jw-0421-zipclass.html
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send
my request. :) But it's worth thinking about, given
the level of interest recently.
I don't care about git/svn/whatever. It's pretty easy to bridge
between them these days.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed
management and documentation markup are components of this.
-Stuart Sierra
--~--~-~--~~~---~--~~
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
To unsubscribe from
need a more sophisticated system. We can
try to piggyback on an existing Java system like Maven or Ivy, or
start from scratch. But someone(s) will then have to take
responsibility for maintaining that repository.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received
FooFactory)
(:needs (org.foo.lib :name FooLib, :url http://foo.com/
lib, :version 1.2)))
I'm NOT proposing a dependency management system to download and
install the JAR files. That way lies madness.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message
in the map
itself?
-Stuart Sierra
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to
clojure+unsubscr
On Apr 13, 9:44 pm, levand luke.vanderh...@gmail.com wrote:
As a demo of JVM languages running on the Google App Engine, they
included a Clojure REPL.
Nifty. Printing doesn't seem to work.
-S
--~--~-~--~~~---~--~~
You received this message because you are
/view_bug.do?bug_id=5025230
-Stuart Sierra
--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to
clojure
on map keys. In general, if the metadata
matters for the value of an object, then it shouldn't be metadata.
Some alternatives: 1) put the information directly in the map values;
2) store metadata on the map values; 3) use maps as keys.
-Stuart Sierra
On Apr 9, 10:48 pm, Stuart Halloway stuart.hallo...@gmail.com wrote:
Yes to almost all of this (r662). I am not totally comfortable with
the false/false conversion.
Cool. I'm not crazy about false/false either, since it's not
symmetric.
-Stuart
a function, memoize it, and you only need to store the paths.
-Stuart Sierra
--~--~-~--~~~---~--~~
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
To unsubscribe from
-
clojure.contrib.singleton/singleton
([f])
Returns a memoized version of a function with no arguments. The
memoized version caches the function's return value.
This is useful for lazily creating global objects that are expensive
to initialize. Warning: Make
(.delete *tmp-properties-file*)))
-Stuart Sierra
On Apr 9, 1:54 pm, Stuart Halloway stuart.hallo...@gmail.com wrote:
In r659 I added a unit test to clojure-contrib that needed to read and
write from the filesystem. I picked a dumb and simple convention, and
welcome review from other
By the way, recent versions of duck-streams assume UTF-8 unless you
rebind *default-encoding*.
-Stuart S.
On Apr 8, 6:15 pm, Perry Trolard trol...@gmail.com wrote:
Hi Stuart,
Not sure if you saw my post athttp://bit.ly/sRnfG(links to list), or
the props.clj file in the Google Group. In
I keep a Clojure stuff dir with the latest revisions of all the
projects I track -- Clojure, contrib, swank, slime, etc. -- and update
them all with a shell script that runs the various svn update and
git pull commands. So I always have access to the latest version of
everything. But I don't
is online, GPL'd, at http://github.com/lawcommons
-Stuart Sierra
--~--~-~--~~~---~--~~
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
To unsubscribe from
.
The Lucene/Solr index is ~6 GB.
The HTML content is ~4 GB, compressed.
99% of the pages are static HTML, pre-rendered in a Hadoop job.
-Stuart Sierra
On Apr 7, 10:47 am, Sean francoisdev...@gmail.com wrote:
Okay wow... it'll take some time to fully appreciate this.
Can you comment on your hardware
Yeah, I'm thinking of renaming duck-streams/file to something like
file-str or filename.
-Stuart Sierra
On Apr 7, 1:13 am, samppi rbysam...@gmail.com wrote:
In addition, it's a bad idea to have these two superficially similar
functions have the same name, file. If, in the end, both
There isn't an RDBMS mostly because I have an irrational prejudice
against them. In this case, the content is mostly static. The Hadoop
jobs process collection of source documents -- a few dozen GB, a big
ol' mess of PDF, XML, JSON, even WordPerfect! -- and, many hours
later, output two things:
in a java editor ? Or was it for performance concerns ? ...
thanks,
--
Laurent
2009/4/7 Stuart Sierra the.stuart.sie...@gmail.com
Here: http://www.altlaw.org/
About 4000 lines of Clojure code, 2500 of Java, powering a web site
with well over a million pages, averaging around 10,000
is particularly Clojure-like, that would just
be (File. foobar).
-Stuart Sierra
On Apr 5, 5:30 pm, James Reeves weavejes...@googlemail.com wrote:
I'd like it if they were combined. You could then use (file foo/bar)
or (file foo bar).
- James
On Apr 5, 9:25 pm, Stuart Halloway stuart.hallo
that I just felt like using
in my program.))
This is a really long string
that I just felt like using
in my program.
-Stuart Sierra
On Apr 4, 11:26 am, samppi rbysam...@gmail.com wrote:
I see—perhaps using (str) would indeed be the best answer
On Apr 3, 10:17 am, Stuart Halloway stuart.hallo...@gmail.com wrote:
(3) coercions for Java's irritating types: File/String, ...
clojure.contrib.duck-streams has file but not the others
-the other Stuart
--~--~-~--~~~---~--~~
You received this message because
(meta (resolve 'slurp)
f
user (meta (first (first (:arglists (meta (resolve 'slurp))
{:tag String}
-Stuart Sierra
On Apr 4, 5:43 pm, Carsten Saager csaa...@gmail.com wrote:
Perhaps I am too stupid, but I can't get it too work to define a
function/macro that returns me the arglists
for TAP output came from Meikel Brandmeyer's ClojureCheck
library.
-Stuart Sierra
--~--~-~--~~~---~--~~
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
As an interim solution, you could write a wrapper class in Java that
extends the parameterized class, then extend that class in Clojure.
-Stuart
On Mar 31, 11:23 am, Chas Emerick cemer...@snowtide.com wrote:
gen-class does not yet support parameterized types. Rich is aware of
the issue,
On Mar 26, 1:34 pm, Victor Rodriguez vict...@gmail.com wrote:
(defmacro with-out-as
[f body]
`(with-open [w# (writer ~f)]
(binding [*out* w#]
�...@body)))
I've added something very similar to this to clojure.contrib.duck-
streams.
-Stuart Sierra
On Mar 29, 3:05 pm, John D. Hume duelin.mark...@gmail.com wrote:
This is a cool functional way of defining these, but I think I'd
prefer to just call the fixture function from the tests needing common
setup because of the standard problems with shared setup in unit
tests. (In brief, the test
Thought some might be interested:
http://lingpipe-blog.com/2009/03/30/jdk-7-twice-as-fast-as-jdk-6-for-arrays-and-arithmetic/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send
)))
(defmacro with-in-reader
Opens a PushbackReader on f, binds it to *in*, and evaluates body.
[f body]
`(with-open [stream# (PushbackReader. (reader ~f))]
(binding [*in* stream#]
~...@body)))
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message
namespace, which is then immediately
removed. The temporary namespace will 'refer' clojure.core.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send email to clojure
] (contains? (parents h t) tag))
(descendants h tag)
The repetition is necessary because clojure.core/global-hierarchy is
private.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure
. It wouldn't be
too hard to wrap that up in a macro.
-Stuart Sierra
--~--~-~--~~~---~--~~
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
To unsubscribe from
(.hasNext iterator)
(cons (.nextSequence iterator) (bio-iterator-seq iterator)
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send email to clojure
On Mar 24, 12:42 pm, Parth Malwankar parth.malwan...@gmail.com
wrote:
user= (with-open [f (writer (file test.txt))]
(binding [*out* f]
(println hello world !!!)))
Or even more simply:
(use 'clojure.contrib.duck-streams)
(spit test.txt Hello, world!\n)
-Stuart Sierra
, but I want to understand the difference between :a and ::b.
Keyword namespaces work like symbol namespaces. :a has no
namespace. ::b expands to :user/b You can also write :user/b
explicitly.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received this message because
On Mar 21, 10:23 pm, Timothy Pratley timothyprat...@gmail.com wrote:
You may be able to achieve what you want by directly accessing
Clojure's reflector class instead of using the special form:
You could also call Java's reflection API directly.
-Stuart Sierra
901 - 1000 of 1221 matches
Mail list logo