On Jul 8, 12:47 pm, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
I'd like to second the suggestion of Richard and Daniel (in
the other thread): use a file.
It solves almost all problems with immediate effect.
Here is my workflow for your example. I added some
annotations. (as a note: I use
On Thu, Jul 9, 2009 at 1:56 AM, Manidumb...@gmail.com wrote:
Thanks Shawn, Robert.
From Robert's post, I am bit confused here. I also read that .emacs is
in %appdata% folder (vista), but all I see is .emacs.d folder (which I
guess is for the emacs server). I tried creating one C-x C-f
Hi!
I started to look closer at Clojure after Rich Hickey's presentation
at QCon London in March, this is my first post. I spend my days
programming Java, but my journey as developer did actually start with
an ML programming course many years ago. It has been great fun to
re-discover the
No, same thing. If you go to clojure.wikispaces.com it redirects to
clojure.org, which is hosted at wikispaces.com.
On Wed, Jul 8, 2009 at 5:15 PM, Raoul Duke rao...@gmail.com wrote:
It looks like anyone with Organizer rights on Clojure's wikispaces wiki
should be able to export an HTML or
I wanted to grab bytes out of a stream, and didn't see an analogue to
reader from duck-streams, so I made my own:
(defn byte-seq
Returns the bytes from stream as a lazy sequence of ints.
stream must implement java.io.InputStream.
[#^java.io.InputStream stream]
(lazy-seq
(let [b (.
On Thu, Jul 9, 2009 at 12:10, Mikecki...@gmail.com wrote:
I wanted to grab bytes out of a stream, and didn't see an analogue to
reader from duck-streams, so I made my own:
(defn byte-seq
Returns the bytes from stream as a lazy sequence of ints.
stream must implement java.io.InputStream.
One question on design intent before feedback. Is your intent to have
this Clojure code called by Java code later?
On Jul 9, 7:31 am, Patrik Fredriksson patri...@gmail.com wrote:
Hi!
I started to look closer at Clojure after Rich Hickey's presentation
at QCon London in March, this is my
Hi Mike,
On Thu, Jul 9, 2009 at 12:10 PM, Mikecki...@gmail.com wrote:
I wanted to grab bytes out of a stream, and didn't see an analogue to
reader from duck-streams, so I made my own:
(defn byte-seq
Returns the bytes from stream as a lazy sequence of ints.
stream must implement
I ran the code you pasted here. It didn't throw an IOException for me.
I am running 1.0.
On Jul 9, 5:10 am, Mike cki...@gmail.com wrote:
I wanted to grab bytes out of a stream, and didn't see an analogue to
reader from duck-streams, so I made my own:
(defn byte-seq
Returns the bytes from
This is very cool. I will definitely be keeping a copy on my laptop as
a quick reference. Thanks for putting it together.
Travis
On Jul 8, 5:04 am, Steve Tayon steve.ta...@googlemail.com wrote:
Hello everyone,
while looking around for a modern lisp, I discovered Clojure and was
instantly
Rich, could this be a minor omission?
public class AReference implements IReference {
}
is not declared 'public abstract class' like ARef, AFn,
APersistentMap, and the others...
Cheers,
Jon
--~--~-~--~~~---~--~~
You received this message because you are
The idea is to gradually, over a few steps, move from a Java
implementation to a pure Clojure implementation. A this step the
Clojure implementation is called by the Java JUnit-test (see complete
test below). In the last step, the Java-references will be removed
from the Clojure implementation
Jonathan showed destructuring/indexing very nicely. Here are some
timings for vector/list creation:
(let [lst '(1 2 3)]
(timings 1e7
(list 1 2 3)
(cons 1 (cons 2 (cons 3 (
(conj (conj (conj () 3) 2) 1)
(vector 1 2 3)
(vec lst)
(conj (conj (conj [] 1) 2) 3)))
I just finished watching the Bay Area Clojure Meetup video, and Rich
spent a few minutes talking about the possibility of Clojure in
Clojure. The prospect of having Clojure self-hosted is incredibly
cool, but it brought a few questions to mind. For one, Rich mentions
that it would potentially
Okay, since you DO call the Clojure code from Java, I like what you
did very much.
If you're running edge Clojure, and not 1.0, I'd recommend writing
the tests in Clojure next, using the clojure.test namespace.
Sean
On Jul 9, 10:16 am, Patrik Fredriksson patri...@gmail.com wrote:
The idea is
Name: com.konato.ode
URL: http://www.konato.com/2009/07/08/com-konato-ode/
Author: Stephane Rousseau
Categories: Scientific computing, Simulation, ODE
License: EPL
Dependencies: clojure.contrib.test-is for unit testing
Description: This is an ordinary differentials
On Jul 8, 11:53 pm, samppi rbysam...@gmail.com wrote:
In clojure.contrib.def, I'd love to have a defmemo macro that acts
just like defn, only with memoize. I'm planning to change a lot of
functions to use memoize, and I'm not looking forward to changing
nice, clean defns with docstrings to
Excellent. This will be a lifesaver—thanks a lot.
On Jul 9, 8:21 am, Chouser chou...@gmail.com wrote:
On Jul 8, 11:53 pm, samppi rbysam...@gmail.com wrote:
In clojure.contrib.def, I'd love to have a defmemo macro that acts
just like defn, only with memoize. I'm planning to change a lot of
Since clojure is a compiled language, and is going to just end up
generating java bytecodes, I wouldn't expect it to be particularly
slower if it was written in itself. Maybe that's naive ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed
On Jul 9, 2009, at 10:07 AM, Paul Mooser wrote:
Since clojure is a compiled language, and is going to just end up
generating java bytecodes, I wouldn't expect it to be particularly
slower if it was written in itself. Maybe that's naive ?
It's not naive. This is called self-hosting and it
To be safe one often retains a
stub compiler for some subset of the language written in another
language, and then implements the rest of the language in the stub
version.
This makes a lot of sense. So basically, a subset of Clojure could be
ported to whatever language you'd want to target,
Name: Jazz
URL: http://kotka.de/projects/clojure/jazz.html
Author: Meikel Brandmeyer
Categories: GUI
License: MIT
Dependencies: c.c.def, c.c.except, c.c.swing-utils, JGoodies Forms
Description:
Jazz eases the creation of GUI forms by virtue of the JGoodies
Forms library. One specifies the desired
On Thu, Jul 9, 2009 at 7:31 AM, Patrik Fredrikssonpatri...@gmail.com wrote:
My shot at a Clojure implementation, with inspiration from a previous
post in this group on a similar problem:
(ns step3.pnehm.clojure-orderer
(:gen-class
:name step3.pnehm.ClojureOrderer
:implements
On Thu, Jul 9, 2009 at 16:43, eyerisdrewpvo...@gmail.com wrote:
I ran the code you pasted here. It didn't throw an IOException for me.
I am running 1.0.
I suspect that You're Doing it Wrong.
You'll see the exception only if you actually try to evaluate the lazy
sequence returned by byte-seq.
If you want to be able to query a function for its source code later
on, that's tougher. You'll need to make a macro that wraps defn and
assigns a copy of the body form to a metadata tag on the function's
name.
I'm resurrecting this thread because I'm actually hitting this problem
That pages says the scopes system is already designed. To you have
any preliminary design docs posted somewhere?
On Jul 9, 2:59 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote:
On Jul 9, 6:10 am, Mike cki...@gmail.com wrote:
Is there a pattern out there in Clojure for handling laziness
On Thu, Jul 9, 2009 at 4:19 PM, Richard Newmanholyg...@gmail.com wrote:
Is there any particular reason why Fn doesn't implement IMeta?
Actually, it does.
user= (instance? clojure.lang.IMeta (fn []))
true
What it doesn't support is changing the metadata after
creation:
user= (with-meta (fn
Actually, it does.
Ah, that explains the UnsupportedOperationException :)
user= (instance? clojure.lang.IMeta (fn []))
true
What it doesn't support is changing the metadata after
creation:
user= (with-meta (fn []) {:foo bar})
java.lang.UnsupportedOperationException (NO_SOURCE_FILE:0)
That was easy!
user= (defmacro metafn [meta args body]
`(proxy [clojure.lang.AFn] [~meta] (invoke ~args ~...@body)))
#'user/metafn
user= (metafn {:foo :bar} [a b c] (println a) (+ a b c))
#AFn clojure.proxy.clojure.lang@77309516
user= (*1 1 2 3)
1
6
user= (meta (metafn {:foo :bar} [a
hi,
i see it has been discussed before, and that there are lots of
options. :-) to restrict it a bit, what is the current practice for
getting ML style pattern matching syntax in Clojure?
many thanks.
--~--~-~--~~~---~--~~
You received this message because you
Hi Tom,
2009/7/2 Tom Faulhaber tomfaulha...@gmail.com:
Are you suggesting that clojure reader parsed code could be first
translated back to String and reinjected to the source code reader ?
Indeed that could simplify final implementation. I don't know what the
impact on performance would
Hi
I just release a new version of AnotherClojureBox!!
What's new
- Code completion
- Inline help while you are writing clojure form (function arguments,
etc).
- Help form Clojure website pressing F1 over a form.
- Form documentation (where available) in the Outout Window pressing
Ctrl+1 over a
http://users.csc.calpoly.edu/~clements/scheme-workshop-2009/
--~--~-~--~~~---~--~~
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
Hi everyone:
I'm trying to optimize an inner loop and need a variable that mutates
to make this work. It does NOT need to be a thread-safe variable.
What's the best way to create a plain ol' mutating variable in
Clojure? I know I can always use an Atom, but I was wondering if
there's a more
I suspect the answer will be that I should use atoms (despite the fact
that it isn't completely low level) since I see RH uses those in his
memoization example, which is pretty much the epitemy of optimizing
with a mutating local variable. :-)
On Jul 9, 7:56 pm, Conrad drc...@gmail.com wrote:
On Jul 9, 2009, at 5:56 PM, Conrad wrote:
Hi everyone:
I'm trying to optimize an inner loop and need a variable that mutates
to make this work. It does NOT need to be a thread-safe variable.
What's the best way to create a plain ol' mutating variable in
Clojure? I know I can always use
On Thu, Jul 9, 2009 at 11:10 AM, tmountain tinymount...@gmail.com wrote:
I just finished watching the Bay Area Clojure Meetup video, and Rich
spent a few minutes talking about the possibility of Clojure in
Clojure. The prospect of having Clojure self-hosted is incredibly
cool, but it brought
On Thu, Jul 9, 2009 at 7:56 PM, Conraddrc...@gmail.com wrote:
I'm trying to optimize an inner loop and need a variable that mutates
to make this work. It does NOT need to be a thread-safe variable.
What's the best way to create a plain ol' mutating variable in
Clojure? I know I can always
I'm running Clojure 1.0.
Could someone please check and see whether this is still a bug in the
most current version?
(use 'clojure.contrib.duck-streams)
(defstruct t :a)
(def x (struct-map t :a 1))
(def s (binding [*print-dup* true] (with-out-str (pr x
(read-string s)
ERROR:
Yea, for me, being on JVM is one of clojure's biggest selling point.
I don't know that I would've learn and use clojure were it not on the
JVM.
On Thu, Jul 9, 2009 at 4:24 PM, John Harropjharrop...@gmail.com wrote:
On Thu, Jul 9, 2009 at 11:10 AM, tmountain tinymount...@gmail.com wrote:
I
40 matches
Mail list logo