Hi,
>> gen-class loads eg. foo/bar/Baz.clj for class foo.bar.Baz. However,
>> maybe one also has support functions in the foo.bar namespace. Hence
>> one needs also foo/bar/bar.clj.
>
> I seem to be able to solve the problem by putting this at the top of
> Baz.clj:
>
> (ns foo.bar (:use foo.bar))
I've been using chimp a little bit, and it works pretty well except
for the \ef command. It gives me the following error:
E119: Not enough arguments for function: 31_EvalFile
All the other commands work fine though! Thanks for the plugin!
-Mitch
On Aug 18, 3:47 pm, Meikel Brandmeyer <[EMAIL P
Rich,
This is code from my socket repl that sparked my interest in support
for destructuring in clojure/binding.
(defn socket-streams ;; returns a vector of 3 streams
[s]
[(LineNumberingPushbackReader. (InputStreamReader. (.getInputStream
s) "UTF-8"))
(OutputStreamWriter. (.get
On Oct 8, 2008, at 6:19 PM, Michael Beauregard wrote:
> The nasty part that I haven't spent any time thinking about is the
> LayoutManager gong show in swing. That sounds much harder to solve
> declaratively without writing a bunch of LMs that support simplifying
> the declarative style.
Possibl
On Oct 8, 7:55 pm, Ande Turner <[EMAIL PROTECTED]> wrote:
> Are there any examples of GUI libraries designed for the functional
> programming model that you know of I could go examine first? Purely
> from a syntax point of view. Lispers? Is there such as thing
> already?
There are a handful of
Hi,
Excellent, thanks!
It almost works now, however something fishy is going on when it tries
to launch screen from vim. I've done the following setting:
:let g:chimp#ScreenCommand="/usr/bin/screen"
which means that chimp.vim executes:
call system('/usr/bin/screen -x 8844.chimp -X eval "sele
On Wed, Oct 8, 2008 at 5:32 PM, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote:
>
> gen-class loads eg. foo/bar/Baz.clj for class foo.bar.Baz. However,
> maybe one also has support functions in the foo.bar namespace. Hence one
> needs also foo/bar/bar.clj.
I seem to be able to solve the problem by p
Personally I've always had a through dislike for Swing, and now I'm
looking into its implementation I dislike it even more. Replacing
Swing entirely would be something I could seriously delve into!
I like the idea of using a XAML style layout-file to create UIs. A
threadsafe Swing replacement w
Putting on a heretical hat, it seems that trying to utilize a GUI
library designed for Java's imperative programming model from a
functional language is an exercise in frustration trying to pound a
square peg through a round whole. While I like Chouser's example (it's
very cool, and makes a good d
I spent a few hours writing a macro that would allow a more
declarative gui than the usual swing approach. I didn't finish it, but
concluded that this could be quite doable. For example, I was aiming
for a macro that would allow the following declarative style:
[Note that I don't have the actual
On Wed, Oct 8, 2008 at 5:37 PM, Bob <[EMAIL PROTECTED]> wrote:
> Does anyone have a non-trivial example of a Swing program done the
> Clojure way?
This probably only counts as trivial, but it's what I've got, so I
hope it helps a little. I wrote it up for a talk I gave, so it can be
run a demo,
Hello,
Am 08.10.2008 um 23:16 schrieb Jonas Bengtsson:
Trying to get Chimp running under cygwin. It seems like it depends on
the following packages: vim, screen, util-linux (for getopt).
I use it at work with a Windows vim and Cygwin screen. The idea is to
start clojure with the chimp wrapper.
> What project types lend themselves to using Java over Clojure, vice
> versa, or in combination?
>
A project where a GUI-building tool (such as Matisse in Netbeans) is
needed would be a case where Java may still be required. Anything done
in Java can be done in Clojure quite readily, with proxy
As I've just picked up on Clojure myself. First of all I was wondering if
anyone was using the Qt's Jambi bindings for GUIs ?
I'm just delving into the details of how Swing is implemented at the moment,
can't say I agree with half of the "design" decisions myself. Swing isn't
thread safe, althoug
I'm interested in doing a GUI program in clojure, but the functional
style of clojure doesn't seem to blend too well with the normal Java
GUI libraries. Does anybody have any advice on using clojure for GUI
programming? I've seen Rich's ants demo, but that isn't really an
event driven GUI progra
Yes, I'm very interested in this question as well. I'm learning
clojure and its my first attempt at functional programming. And I was
thinking of writing a swing GUI program to try it out. But it would
seem the GUI state is going to be a mass of mutable state which
doesn't map well to the funct
Yes, I like this. The double backslashing is really a pain and
confused me at first. Get off that road now while clojure is still
pretty new.
Bob
On Oct 8, 9:03 am, Chouser <[EMAIL PROTECTED]> wrote:
> On Wed, Oct 8, 2008 at 8:08 AM, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
> > Will existing C
Dear Clojurians,
gen-class loads eg. foo/bar/Baz.clj for class foo.bar.Baz. However,
maybe one also has support functions in the foo.bar namespace. Hence one
needs also foo/bar/bar.clj. But now we are in trouble, since we have to
duplicate any shared initialisation between bar.clj and Baz.clj. We
Hi Meikel,
Trying to get Chimp running under cygwin. It seems like it depends on
the following packages: vim, screen, util-linux (for getopt).
However, when I try to run chimp, screen flashes only to terminate. Is
that the way it's supposed to work?
What are the exact steps to use chimp? Is the
> just in clojure, I've ended up implementing something like that in
> several languages) - I'd have thought 2d rectangular arrays were a lot
> more popular a data structure than that
ja, it has always boggled my mind that such things are generally
lacking standardization in languages.
--~--~---
Chapter 4 now up.
http://www.earthvssoup.com/2008/10/08/on-lisp-clojure-chapter-4/
In this episode we see Rich Hickey slap a n00b. ;)
-m
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to
On Oct 8, 8:06 am, "Mark H." <[EMAIL PROTECTED]> wrote:
>
> If you don't like vector-of-vectors or maps, you could write some
> syntactic sugar for mapping two-dimensional indexing onto a one-
> dimensionally-indexed vector, e.g., for an n x n array with Fortran-
> style indexing:
>
> (i, j) -> i
On Oct 8, 1:17 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
> It conflicts with the default value capability of get:
>
> ({:a 1 :b 2} :c 5)
>
> -> 5
Ah, this I didn't know. I've been using (or (map key) default) when I
could have been writing (map key default).
I guess that means that calling a ha
On Wed, Oct 8, 2008 at 11:03 AM, Chouser <[EMAIL PROTECTED]> wrote:
>
> Of course if this change is unacceptable, these proposed rules could
> be applied to a new dispatch macro. One option would be something
> like #r/foo/ that would allow your choice of delimiters to further
> reduce the need f
On Oct 7, 6:30 pm, Martin DeMello <[EMAIL PROTECTED]> wrote:
> How do you make a two-dimensional array of a given size? (e.g. (make-
> array '(i j)) in common lisp)
>
> I want to do stuff like, e.g., representing a chessboard, where I can
> index into cells and update them.
If you don't like vect
On Wed, Oct 8, 2008 at 8:08 AM, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
> Will existing Clojure regex (consumer) code need to change, i.e. will
> people need to modify their existing #"" literals and if so in what
> way?
Yes, many existing #"" literals would have new meaning or become
invalid un
On Oct 8, 9:59 am, Krzysztof Kliś <[EMAIL PROTECTED]> wrote:
> Due to my interest in Erlang and functional programming in general,
> for some time I have been following a blog by Jonas Bonér
> athttp://jonasboner.com/
> This guy is an expert on Terracotta and he managed to cluster JRuby
> and S
Due to my interest in Erlang and functional programming in general,
for some time I have been following a blog by Jonas Bonér at
http://jonasboner.com/
This guy is an expert on Terracotta and he managed to cluster JRuby
and Scala using Terracotta (he described it on his blog). I think it
would be
I think this is a great idea.
On Oct 8, 5:08 am, Rich Hickey <[EMAIL PROTECTED]> wrote:
> On Oct 7, 11:18 pm, Chouser <[EMAIL PROTECTED]> wrote:
>
>
>
> > Is it bad etiquette to reply to myself? I thought it might be useful
> > to compare the proposed syntax with that of other languages with goo
On Oct 8, 7:53 am, "Simo Melenius" <[EMAIL PROTECTED]> wrote:
> 2008/10/8 CuppoJava <[EMAIL PROTECTED]>:
>
>
>
> > I'm very new to clojure, and I'm just wondering what's the most
> > efficient way of creating a vector of zeroes.
> ...
> > It looks pretty bad to me. My java code is more terse tha
2008/10/8 CuppoJava <[EMAIL PROTECTED]>:
> I'm very new to clojure, and I'm just wondering what's the most
> efficient way of creating a vector of zeroes.
...
> It looks pretty bad to me. My java code is more terse than this.
> Thanks for your help.
I would write something like this to create a
On Oct 8, 4:45 am, James Reeves <[EMAIL PROTECTED]> wrote:
> Is there any disadvantage to making:
>
> (map-or-vector :foo "bar" 5)
>
> Equivalent to:
>
> (((map-or-vector :foo) "bar") 5)
>
> For hash maps and vectors? As far as I can see, this doesn't conflict
> with any other syntax, and it wou
On Oct 7, 11:18 pm, Chouser <[EMAIL PROTECTED]> wrote:
> Is it bad etiquette to reply to myself? I thought it might be useful
> to compare the proposed syntax with that of other languages with good
> regex support.
>
> I tried all the examples from my previous message in Perl, Python,
> Ruby, a
On Oct 8, 2:24 am, mb <[EMAIL PROTECTED]> wrote:
> Hello Rich,
>
> in the definition of isa? in boot.clj in the last line (no. 2879),
> there isa? recurs into the contents of the vectors. It uses
> implicitely the global-hierarchy instead of the provided
> one.
>
Fixed - thanks for the report,
On Oct 6, 11:36 pm, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote:
> It's either attached to this message or uploaded to the group as:
>
> redirectable-stderr.patch
>
> Thanks,
>
> --Steve
>
> On Oct 6, 2008, at 8:42 PM, Rich Hickey wrote:
>
> > On Oct 6, 8:37 pm, "Stephen C. Gilardi" <
On Oct 7, 9:39 pm, Tom Hicks <[EMAIL PROTECTED]> wrote:
> This destructuring on sequences works:
>
> user=> (let [[:as m] [1 2]] m)
> [1 2]
>
> but this one on associations doesn't (and it seems like it should):
>
> user=> (let [{:as m} {:b 1 :c 2}] m)
>
> java.lang.NullPointerException
> clojur
On Oct 8, 4:35 am, CuppoJava <[EMAIL PROTECTED]> wrote:
> I'm very new to clojure, and I'm just wondering what's the most
> efficient way of creating a vector of zeroes.
I'm not sure about efficiency, but I'd write it like:
(vec (take cols (constantly 0)))
- James
--~--~-~--~~--
On Oct 8, 8:35 am, CuppoJava <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm very new to clojure, and I'm just wondering what's the most
> efficient way of creating a vector of zeroes.
This is one way.
user=> (vec (replicate 10 0))
[0 0 0 0 0 0 0 0 0 0]
also
user=> (into [] (replicate 10 0))
[0 0 0 0
After discovering Clojure I have spent the last few days immersed in
it.
This question is directed at prominently at Java programmers who have
transitioned to Clojure:
What project types lend themselves to using Java over Clojure, vice
versa, or in combination?
Which programs which you would hav
Hi,
I'm very new to clojure, and I'm just wondering what's the most
efficient way of creating a vector of zeroes.
This is my current code:
(loop [row []
i 0]
(if (= i cols)
row
(recur (assoc row i 0) (inc i
It looks pretty bad to me. My java code is more terse than
Hello again,
another thing I noticed: the loop could also stop
as soon as ret is false. Because at that point
it stays so due to the (and).
I assume that the vectors are likely small. So
this is maybe not much of a difference...
Sincerely
Meikel
--~--~-~--~~~---~--~-
Is there any disadvantage to making:
(map-or-vector :foo "bar" 5)
Equivalent to:
(((map-or-vector :foo) "bar") 5)
For hash maps and vectors? As far as I can see, this doesn't conflict
with any other syntax, and it would cut down on the brackets when
dealing with maps within maps.
- James
--~
42 matches
Mail list logo