On Fri, Oct 19, 2012 at 12:03 AM, Maurits wrote:
> Bit of a late reaction, but there is nothing special about a tag with a
> namespace prefixed. For example I have been using:
>
> (zf/xml-> zipper :ListRecords :record :metadata :oai_dc:dc :dc:language
> zf/text)
>
> which works perfectly well.
Ye
I've implemented the fixes as suggested and created 3 tickets with patches:
1) Omit var statements http://dev.clojure.org/jira/browse/CLJS-397
Except for the new js rendered by stack traces on the repl, this should be
a no brainer
2) Create a new macro extend-instance
http://dev.clojure.org/jira/
ssion:
https://github.com/franks42/cljs-info/raw/master/docs/cljs-info-clojure%20meetup-20121018.pdf
Enjoy, FrankS.
On Oct 18, 2012, at 12:28 AM, Frank Siebenlist
wrote:
> "cljs-info" is a collection of Clojure-functions to provide basic help and
> reflection facilities for Clo
So, the current version, after the suggestion by Alan Malloy, is the
following:
(defmacro buffer-reduce [b f val]
`(let [b# (.duplicate ~b)
f# ~f]
(loop [remaining# (.remaining b#)
result# ~val]
(if (zero? remaining#)
result#
(recur (dec remain
OK, just looked it up and realized that it's just how # works, and not a
special kind of macro.
On Thu, Oct 18, 2012 at 5:25 PM, Mark Engelberg wrote:
> On Thu, Oct 18, 2012 at 4:11 PM, Herwig Hochleitner <
> hhochleit...@gmail.com> wrote:
>
>>
>> FWIW, when just wanting to print out debug values
On Thu, Oct 18, 2012 at 4:11 PM, Herwig Hochleitner
wrote:
>
> FWIW, when just wanting to print out debug values, I use a custom reader
> tag similar to the above macro:
>
> (let [x #log/spy (+ a b)]
> (usage-of x))
>
>
>
That's nice! I haven't done anything with reader macros. Can you post th
On Thu, Oct 18, 2012 at 7:15 PM, Herwig Hochleitner
wrote:
> 2012/10/19 Bruno França dos Reis
>
>> The reason why I wrote a macro instead of a function is because 'get' and
>> 'duplicate' are not declared in any common superclass of the different
>> buffers, so I was getting lots of reflection!
>
C is a "C-language", and it seems a lot simpler than clojure to me. K&R is
about 200 pages. I expect you mean C++, Java, etc. Not meaning to start a
language war, but my own experiences with C++ and Java have mostly
convinced me that the added complexity in those languages don't lead to
better
2012/10/19 Bruno França dos Reis
> The reason why I wrote a macro instead of a function is because 'get' and
> 'duplicate' are not declared in any common superclass of the different
> buffers, so I was getting lots of reflection!
>
> Are there alternatives to the macro that avoid reflection?
>
Y
2012/10/18 Mark Engelberg
> When I want to add print commands for debugging, I usually either do it
> the way David Nolen described, i.e., binding _ to a printf statement, or I
> use a little utility macro like this (picked up from stackoverflow):
>
> (defmacro dbg[x] `(let [x# ~x] (println "dbg:
Thanks for the input. Didn't know that I was multiply-evaluating f.
The reason why I wrote a macro instead of a function is because 'get' and
'duplicate' are not declared in any common superclass of the different
buffers, so I was getting lots of reflection!
Are there alternatives to the macro th
Thanks to everyone for the suggestions!
--
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 be patient with your
first post.
To unsubscr
Another java newbie question, I expect. I tried using jvisualvm to profile
my clojure app. It's spending all its time in
jdbc.util.ReadAheadInputStream.fill(). The call tree points to
clojure-agent-send-off-pool-. I'm not sure what this is telling me.
--
You received this message because you a
As a general-macro aside, you are multiply-evaluating the `f`
argument, by expanding it in-place inside the recursive clause. This
is almost certainly not what you want, and you could avoid it by
starting with (let [f# ~f] ...). Better still, ask why this is a macro
at all. This should really just
Bit of a late reaction, but there is nothing special about a tag with a
namespace prefixed. For example I have been using:
(zf/xml-> zipper :ListRecords :record :metadata :oai_dc:dc :dc:language
zf/text)
which works perfectly well.
Maurits
Op zondag 22 juli 2012 22:02:59 UTC+2 schreef Marcel
Damn, just noticed a small mistake in the macro: I use the original buffer,
not the duplicated one. Here's the correct version:
(defmacro buffer-reduce [b f val]
`(let [b# (.duplicate ~b)]
(loop [remaining# (.remaining b#)
result# ~val]
(if (zero? remaining#)
re
Hello!
I've recently started playing with Clojure, and a couple of days ago I've
been pointed to Reducers in Clojure 1.5 after a discussion on #clojure at
Freenode.
I've read Rich's posts announcing the Reducers library, and he says that
there's a ***lack of reducible IO sources***. I'm workin
It's slightly different, but libraries such as Flow or Prismatic's Graph
can be used to achieve a similar effect.
Flow: https://github.com/stuartsierra/flow
Graph:
http://blog.getprismatic.com/blog/2012/10/1/prismatics-graph-at-strange-loop.html
Example using Flow:
(def the-flow
(flow b ([a]
Now I remember the more important video:
www.infoq.com/presentations/Thinking-in-Data
Also (haven't watched):
www.infoq.com/presentations/Programming-with-Values-in-Clojure
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send e
deja-vu :)
On Thu, Oct 18, 2012 at 11:16 PM, JvJ wrote:
>
> On a side note, I was partially inspired by Haskell's do notation, which
> is imperative-looking syntactic sugar for monadic bind operators.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure"
On Thu, Oct 18, 2012 at 1:45 PM, Grant Rettke wrote:
>
> Anyone voted for internal define lately?
>
On the one hand, internal define would be nice because it would help
alleviate the nested let problem and possibly be more intuitive for
newcomers.
On the other hand, sometimes (rarely) you actua
The doto form is great, but as far as I know, it only lets you thread a
single object. I'm looking at creating several objects consecutively.
On Thursday, 18 October 2012 17:11:08 UTC-4, Grant Rettke wrote:
>
> I figured you would use doto for that.
>
> On Thu, Oct 18, 2012 at 4:09 PM, JvJ >
>
Most of what could be accomplished by an internal define could be done with
a let statement. But if you don't want to add the brackets, you can create
your own function definition macro that converts defs to lets.
On Thursday, 18 October 2012 17:12:04 UTC-4, Grant Rettke wrote:
>
> On Thu, Oct
On a side note, I was partially inspired by Haskell's do notation, which is
imperative-looking syntactic sugar for monadic bind operators.
--
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
On a side note, I was partially inspired by Haskell's do notation, which is
imperative-looking syntactic sugar for monadic binds.
On Thursday, 18 October 2012 12:01:33 UTC-4, JvJ wrote:
>
> I'm not sure if anyone's done this before, but I'm fed up with writing
> code that looks like this:
>
> (l
On Thu, Oct 18, 2012 at 4:05 PM, David Nolen wrote:
> On Thu, Oct 18, 2012 at 4:45 PM, Grant Rettke wrote:
>> Anyone voted for internal define lately?
> At this point I think it's highly unlikely to change - the behavior is
> pretty well documented:
I see. Just a thought that an internal define
I figured you would use doto for that.
On Thu, Oct 18, 2012 at 4:09 PM, JvJ wrote:
> Exactly. Not only debugging, but java interop that involved calling methods
> with side effects.
>
> On Thursday, 18 October 2012 15:02:47 UTC-4, David Nolen wrote:
>>
>> On Thu, Oct 18, 2012 at 2:55 PM, Alan Ma
Exactly. Not only debugging, but java interop that involved calling
methods with side effects.
On Thursday, 18 October 2012 15:02:47 UTC-4, David Nolen wrote:
>
> On Thu, Oct 18, 2012 at 2:55 PM, Alan Malloy
> > wrote:
>
>> It's rare to get tired of this, because nobody does it: it's not
>> com
On Thu, Oct 18, 2012 at 4:45 PM, Grant Rettke wrote:
> On Thu, Oct 18, 2012 at 3:45 PM, Grant Rettke wrote:
> > On Thu, Oct 18, 2012 at 3:42 PM, Mark Engelberg
> > wrote:
> >> A def, even inside defn, creates and binds a global variable.
> >
> > Woa, I see, thanks!
>
> Anyone voted for internal
On Oct 17, 2012, at 2:35 PM, Andreas Liljeqvist wrote:
> Just to clear something up: Are you maintaining midje-mode?
> I thought it was Dmitri?
> That's where I left my pull request anyway.
I'm a committer for `midje-mode`.
-
Brian Marick, Artisanal Labrador
Contract programming in Ruby and
On Thu, Oct 18, 2012 at 3:45 PM, Grant Rettke wrote:
> On Thu, Oct 18, 2012 at 3:42 PM, Mark Engelberg
> wrote:
>> A def, even inside defn, creates and binds a global variable.
>
> Woa, I see, thanks!
Anyone voted for internal define lately?
--
You received this message because you are subscri
On Thu, Oct 18, 2012 at 3:42 PM, Mark Engelberg
wrote:
> A def, even inside defn, creates and binds a global variable.
Woa, I see, thanks!
--
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
A def, even inside defn, creates and binds a global variable.
--
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 be patient with your
f
On Thu, Oct 18, 2012 at 3:32 PM, David Nolen wrote:
> On Thu, Oct 18, 2012 at 4:22 PM, Grant Rettke wrote:
>>
>>
>> When you use def inside a defn is it equivalent to a let binding like
>> this?
>>
>> (defn foo []
>> (def a 1)
>> (println a))
>>
>> (defn foo []
>> ((fn [a]
>> (println
You probably want to watch this:
vimeo.com/46163090
Also, try to think of your programs in terms of pipelines as much as
possible.
You get input, you produce output.
That probably applies to every program ever written, but when you get how
that works in Clojure, it's like an enlightment, at leas
On Thu, Oct 18, 2012 at 4:22 PM, Grant Rettke wrote:
>
> When you use def inside a defn is it equivalent to a let binding like this?
>
> (defn foo []
> (def a 1)
> (println a))
>
> (defn foo []
> ((fn [a]
> (println a)) 1))
Not equivalent.
--
You received this message because you a
bravo!
On Thu, Oct 18, 2012 at 9:29 PM, Brian Kirkbride <
br...@otherpeoplespixels.com> wrote:
> Congratulations Rich. Many thanks to you and the many people that have
> contributed to making Clojure what it is today.
>
> Learning and using Clojure has truly brought the joy back to creating
> sof
On Thu, Oct 18, 2012 at 3:17 PM, David Nolen wrote:
>
> On Thu, Oct 18, 2012 at 4:15 PM, Grant Rettke wrote:
>>
>> On Thu, Oct 18, 2012 at 2:50 PM, Mark Engelberg
>> wrote:
>> > Either way works well. I think Evan's way results in somewhat more
>> > compact
>> > code for the common case, wherea
On Thu, Oct 18, 2012 at 4:15 PM, Grant Rettke wrote:
> On Thu, Oct 18, 2012 at 2:50 PM, Mark Engelberg
> wrote:
> > Either way works well. I think Evan's way results in somewhat more
> compact
> > code for the common case, whereas Cgrand's way feels a little more
> versatile
> > (and his "flatt
On Thu, Oct 18, 2012 at 2:50 PM, Mark Engelberg
wrote:
> Either way works well. I think Evan's way results in somewhat more compact
> code for the common case, whereas Cgrand's way feels a little more versatile
> (and his "flatter cond" is what I use). I strongly urge you to pick one of
> these
Alright, Eli. You've piqued my interest. I'll have to take a closer look
sometime soon.
~Gary
On Wednesday, October 17, 2012 10:22:54 AM UTC-4, Eli Barzilay wrote:
>
> Gary Johnson uvm.edu> writes:
> >
> > I see. After taking a closer look, I can see that you could do LP in
> > Scribble
>
Congratulations Rich. Many thanks to you and the many people that have
contributed to making Clojure what it is today.
Learning and using Clojure has truly brought the joy back to creating
software and I needed that!
Best,
Brian
On Tuesday, October 16, 2012 8:53:55 PM UTC-5, Rich Hickey wrote
When I want to add print commands for debugging, I usually either do it the
way David Nolen described, i.e., binding _ to a printf statement, or I use
a little utility macro like this (picked up from stackoverflow):
(defmacro dbg[x] `(let [x# ~x] (println "dbg:" '~x "=" x#) x#))
I agree with Eva
On Oct 18, 12:02 pm, David Nolen wrote:
> On Thu, Oct 18, 2012 at 2:55 PM, Alan Malloy wrote:
> > It's rare to get tired of this, because nobody does it: it's not
> > common because your interleaved statements are side-effecting only,
> > which is not encouraged in Clojure, and rarely needed. Cer
On Thu, Oct 18, 2012 at 2:09 PM, Ben Wolfson wrote:
> On Thu, Oct 18, 2012 at 12:01 PM, Grant Rettke wrote:
>> It isn't side effecting it is sequencing.
>
> Clojure's let is already sequential, like Scheme's let*: "The bindings
> are sequential, so each binding can see the prior bindings." R5RS
>
On Thu, Oct 18, 2012 at 2:07 PM, David Nolen wrote:
> On Thu, Oct 18, 2012 at 3:06 PM, Grant Rettke wrote:
>>
>> (-> ((fn []
>> (let [a 1]
>> (println "this is a: " a)
>> a)))
>>((fn [a]
>> (let [b 2]
>> (println "this is b: " b)
>> (list a b
>>
On Thu, Oct 18, 2012 at 12:01 PM, Grant Rettke wrote:
> On Thu, Oct 18, 2012 at 1:55 PM, Alan Malloy wrote:
>> It's rare to get tired of this, because nobody does it: it's not
>> common because your interleaved statements are side-effecting only,
>> which is not encouraged in Clojure, and rarely
On Thu, Oct 18, 2012 at 3:06 PM, Grant Rettke wrote:
> (-> ((fn []
> (let [a 1]
> (println "this is a: " a)
> a)))
>((fn [a]
> (let [b 2]
> (println "this is b: " b)
> (list a b
>((fn [[a b]]
> (let [c 3]
> (println "this is c:
On Thu, Oct 18, 2012 at 1:32 PM, Grant Rettke wrote:
> On Thu, Oct 18, 2012 at 11:11 AM, David Nolen wrote:
>> On Thu, Oct 18, 2012 at 12:01 PM, JvJ wrote:
>>>
>>> I'm not sure if anyone's done this before, but I'm fed up with writing
>>> code that looks like this:
>>
>>
>> What problem does thi
On Thu, Oct 18, 2012 at 2:55 PM, Alan Malloy wrote:
> It's rare to get tired of this, because nobody does it: it's not
> common because your interleaved statements are side-effecting only,
> which is not encouraged in Clojure, and rarely needed. Certainly
> sometimes it's the best way to do somet
On Thu, Oct 18, 2012 at 1:55 PM, Alan Malloy wrote:
> It's rare to get tired of this, because nobody does it: it's not
> common because your interleaved statements are side-effecting only,
> which is not encouraged in Clojure, and rarely needed. Certainly
> sometimes it's the best way to do someth
It's rare to get tired of this, because nobody does it: it's not
common because your interleaved statements are side-effecting only,
which is not encouraged in Clojure, and rarely needed. Certainly
sometimes it's the best way to do something, but not so often that I'd
become frustrated; if anything
On Thu, Oct 18, 2012 at 11:11 AM, David Nolen wrote:
> On Thu, Oct 18, 2012 at 12:01 PM, JvJ wrote:
>>
>> I'm not sure if anyone's done this before, but I'm fed up with writing
>> code that looks like this:
>
>
> What problem does this solve given you can do the following?
>
> (let [a 1
> _
For the situation where the lets are nested because you're checking the
values in some way after each binding, I wrote a macro called let?. I find
it very useful and use it in nearly all my
code. https://github.com/egamble/let-else
--
You received this message because you are subscribed to the
Thank you for this clarification!
On Thu, Oct 18, 2012 at 6:26 PM, David Nolen wrote:
> On Thu, Oct 18, 2012 at 12:23 PM, JvJ wrote:
>
>> I didn't realize you could bind to empty identifiers like that. Alright,
>> that makes more sense. I figured I was missing something.
>>
>
> Just to be cle
(cons 1 nil)
On Wed, Oct 17, 2012 at 8:16 PM, Curtis wrote:
> Cons seems to be strange
>
> How do i use Cons with an atom to make a list?
>
> (cons 1 1)
>
>
> On Tuesday, October 16, 2012 5:08:26 PM UTC-7, Baishampayan Ghose wrote:
>
>> `car` is called `first` here and `cdr` could mean either `r
It is; *data_readers.clj*
{db/id datomic.db/id-literal
db/fn datomic.function/construct
base64 datomic.codec/base-64-literal}
On Wed, Oct 17, 2012 at 5:54 PM, Robert Luo wrote:
> Is #db/id defined in datomic library?
>
> --
> You received this message because you are subscribed to the Googl
On Thu, Oct 18, 2012 at 12:07 PM, Sean Corfield wrote:
> Clojure feels like a VERY simple language with almost no
> syntax. Having recently read more Scheme / CL code, I can see how folks
> coming from those languages think Clojure is cluttered.
Why do they think it is cluttered? What does that m
See "Functional Programming for the Object-Oriented Programmer" (
https://leanpub.com/fp-oo)
Il giorno 18/ott/2012 19:01, "Sean Corfield" ha
scritto:
> On Thu, Oct 18, 2012 at 8:58 AM, Brian Craft wrote:
>
>> "Clojure Programming", and "The Joy of ..."
>
>
> Hmm, I was going to suggest Joy of but
On Thu, Oct 18, 2012 at 9:37 AM, Brian Craft wrote:
> I suspect that if you come from java or C++ it seems like a simple
> language, but it feels pretty cluttered compared to other languages.
>
Interesting observation and probably true. Although I did Lisp back at
university (in the early/mid-80
On Thu, Oct 18, 2012 at 1:02 PM, Paul deGrandis wrote:
> - thumb through Ring, Leiningen, and ClojureScript as prime examples of
> well written Clojure applications
+1
I think it's informative to look at non-trivial yet small Clojure
libraries. ClojureScript doesn't quite fit the small require
I came very recently to clojure, having crossed CL in the 80's, c/c++ in
the 90's and java in the 00's. A long travel to find with clojure a kind of
very comfortable destination very close to where I started from + seqs
and laziness.
thanks Rich, and all of you too to brought me back on joy of
Brian,
Those are two excellent books. If you are looking at more general project
organization and approaches, I'd suggest:
- Just Enough Architecture (specifically its discussion on architectural
evident coding)
- watch the Halloway talks on evident code
- thumb through Ring, Leiningen, and
On Thu, Oct 18, 2012 at 8:58 AM, Brian Craft wrote:
> "Clojure Programming", and "The Joy of ..."
Hmm, I was going to suggest Joy of but if you don't think that helps with
some of those design issues, I'm not sure what to suggest. Others suggested
Clojure Programming but, again, if that doesn't
On 18/10/12 17:37, Brian Craft wrote:
It's not just you. I'm also surprised at the amount of syntax and the
number of ways of doing some things. I suspect that if you come from
java or C++ it seems like a simple language, but it feels pretty
cluttered compared to other languages. The '->' macro
On Thu, Oct 18, 2012 at 8:26 AM, larry google groups <
lawrencecloj...@gmail.com> wrote:
> Interesting. I am using Clojure 1.3. And I'm using clojure-jack-in inside
> of emacs. What are you using?
I was using Clojure 1.4 via jack-in from emacs. I just tried it again with
lein repl in a clean Clo
On Thursday, October 18, 2012 10:18:09 AM UTC-4, Jonathan Fischer Friberg
wrote:
>
> Presets have been implemented in the latest version.
> It's selectable in the plugin options.
>
>
Works nicely. Thanks, Jonathan!
BTW, I created the beginnings of a CDS "development tools" guide
https://github.c
It's not just you. I'm also surprised at the amount of syntax and the
number of ways of doing some things. I suspect that if you come from java
or C++ it seems like a simple language, but it feels pretty cluttered
compared to other languages. The '->' macro, for example. I've learned to
read ri
There's nothing special going on, no "empty" identifiers. It's just a
common convention to use _ when uninterested in the return value.
(let [_ 1]
_)
;=> 1
Pretty evil to actually use bindings called _ though :)
Thanks,
Ambrose
On Fri, Oct 19, 2012 at 12:23 AM, JvJ wrote:
> I didn't realize
On Thu, Oct 18, 2012 at 12:23 PM, JvJ wrote:
> I didn't realize you could bind to empty identifiers like that. Alright,
> that makes more sense. I figured I was missing something.
>
Just to be clear _ has not special meaning beyond convention. I could have
used x but that doesn't convey that w
Exactly. A big part of the reason was that I needed to do things between
when other variables were initialized.
On Thursday, 18 October 2012 12:17:17 UTC-4, Ben wrote:
>
> On Thu, Oct 18, 2012 at 9:12 AM, keeds >
> wrote:
> > I'm confused. How does the following not work?
> >
> > (let [a 1 b
I didn't realize you could bind to empty identifiers like that. Alright,
that makes more sense. I figured I was missing something.
On Thursday, 18 October 2012 12:11:49 UTC-4, David Nolen wrote:
>
> On Thu, Oct 18, 2012 at 12:01 PM, JvJ >wrote:
>
>> I'm not sure if anyone's done this before, bu
On Thu, Oct 18, 2012 at 9:12 AM, keeds wrote:
> I'm confused. How does the following not work?
>
> (let [a 1 b 2 c 3]
> (println a)
> (println b)
> (println c)
> (+ a b c))
It works, but all of the expressions on the RHS of the let
expression's binding vector have to be applied before you
I'm confused. How does the following not work?
(let [a 1 b 2 c 3]
(println a)
(println b)
(println c)
(+ a b c))
On Thursday, October 18, 2012 5:01:33 PM UTC+1, JvJ wrote:
>
> I'm not sure if anyone's done this before, but I'm fed up with writing
> code that looks like this:
>
> (let [a
On Thu, Oct 18, 2012 at 12:01 PM, JvJ wrote:
> I'm not sure if anyone's done this before, but I'm fed up with writing
> code that looks like this:
>
What problem does this solve given you can do the following?
(let [a 1
_ (println a)
b 2
_ (println b)
c 3
_ (printl
I'm not sure if anyone's done this before, but I'm fed up with writing code
that looks like this:
(let [a 1]
(println "this is a: " a)
(let [b 2]
(println "this is b: " b)
(let [c 3]
(println "this is c: " c)
(+ a b c
I'd rather do something more l
"Clojure Programming", and "The Joy of ..."
On Thursday, October 18, 2012 7:53:38 AM UTC-7, Sean Corfield wrote:
>
> Which books on Clojure have you read so far?
>
> On Wed, Oct 17, 2012 at 8:51 PM, Brian Craft
> > wrote:
>
>> I'm finding the books on clojure to be very focused on low-level lang
Thanks Jim,
That fixed the issue. I did not know that I can access the classes without
importing them..
Sunil.
On Thu, Oct 18, 2012 at 9:14 PM, Jim foo.bar wrote:
> On 18/10/12 16:27, Sunil S Nandihalli wrote:
>
>> Hi Everybody,
>> class name clashes on importing same named classes from differ
thanks tassillo, that fixed it .. I didn't know that we can use the classes
with out importing them.
Sunil.
On Thu, Oct 18, 2012 at 9:07 PM, Tassilo Horn wrote:
> Sunil S Nandihalli writes:
>
> Hi!
>
> > class name clashes on importing same named classes from different
> > java-packages into sa
I'm not sure if anyone's already done this, but I recently got tired of
writing code that looked like this:
(let [a 1]
(ns cljutils.core)
(defn- form-check
"Ensures the form represents an assignment.
Such as (:= a 1)"
[form]
(and
(= 3 (count form))
(= := (first form))
(symbol?
On 18/10/12 16:27, Sunil S Nandihalli wrote:
Hi Everybody,
class name clashes on importing same named classes from different
java-packages into same clojure namespace. Is this expected. I think
that it should be possible to import them and can be used by
completely qualifying the class name w
Sunil S Nandihalli writes:
Hi!
> class name clashes on importing same named classes from different
> java-packages into same clojure namespace. Is this expected.
Yes, that's expected. Import the one you are using more frequently and
access the other one qualified.
> it should be possible to i
Am I doing it wrong ? is there a way to get around this?.. I guess I
pressed the send button before I completed the email..
Thanks,
Sunil.
On Thu, Oct 18, 2012 at 8:57 PM, Sunil S Nandihalli <
sunil.nandiha...@gmail.com> wrote:
> Hi Everybody,
> class name clashes on importing same named classes
Hi Everybody,
class name clashes on importing same named classes from different
java-packages into same clojure namespace. Is this expected. I think that
it should be possible to import them and can be used by completely
qualifying the class name with the appropriate java-package name.
Thanks,
Sun
Interesting. I am using Clojure 1.3. And I'm using clojure-jack-in inside
of emacs. What are you using?
On Thursday, October 18, 2012 11:22:26 AM UTC-4, Sean Corfield wrote:
>
> I tried your code and got the expected result:
>
> user> (def registry (atom {}))
> #'user/registry
> user> (import 'ja
I tried your code and got the expected result:
user> (def registry (atom {}))
#'user/registry
user> (import 'java.util.Date)
java.util.Date
user> (defn add-to-logged-in-registry [this-users-params]
(let [right-now (. (Date.) getTime)
new-user-entry (conj this-users-params { "updated" r
On Thu, Oct 18, 2012 at 10:16 AM, larry google groups
wrote:
> Okay, this is very confusing to me. If I try this:
>
> (defn add-to-logged-in-registry [this-users-params]
>
> (let [right-now (. (Date.) getTime)
> new-user-entry (conj this-users-params { "updated" right-now })]
> (sw
Okay, this is very confusing to me. If I try this:
(defn add-to-logged-in-registry [this-users-params]
(let [right-now (. (Date.) getTime)
new-user-entry (conj this-users-params { "updated" right-now })]
(swap! registry (fn [map-of-user-maps]
(conj map-of-user
In these days I've released a new version of neurotic
To use it simply put on your project.clj
[bronsa/neurotic "0.3.3"]
With the 0.3.3 release neurotic fully supports implementing deftrait from:
deftype, defrecor, extend and extend-type.
Error messages has also been improved.
A new version of b
I'm following clojure's LispReader implementation in blind, you should ask
that question to clojure devs
2012/10/14 AtKaaZ
> Hi!
> What would you do about this ?
>
> https://github.com/quil/quil/commit/d0312f0f119db066a8d613dec8803571b92bea39
> Would you edit the file or change the reader?
>
> Th
Which books on Clojure have you read so far?
On Wed, Oct 17, 2012 at 8:51 PM, Brian Craft wrote:
> I'm finding the books on clojure to be very focused on low-level language
> features. Are there any good references for how to design code in clojure
> (or perhaps in functional languages more gene
Does new-user-entry include a "username" entry that points to nil? get only
uses default value if the key is not present:
user=> (get {:x nil} :x :not-found)
nil
user=> (get {:x nil} :y :not-found)
:not-found
user=> (or (get {:x nil} :x) :not-found)
:not-found
user=>
On Oct 18, 2012, at 10:11 A
larry google groups writes:
> (let [right-now (. (Date.) getTime)
> new-user-entry (conj this-users-params { "updated" right-now })]
> (swap! registry (fn [map-of-user-maps]
> (assoc (assoc map-of-user-maps (get new-user-entry
> "username" "anonymous") {}) (ge
Presets have been implemented in the latest version.
It's selectable in the plugin options.
The clojure preset should make LispIndent more or less exactly emacs.
(I think, I still haven't tested emacs - will check out your guide soon
John :) )
Jonathan
On Thu, Oct 18, 2012 at 5:55 AM, John Gabr
I have some Javascript on a website that pings my Clojure app. My app adds
in the user info like this:
(defn add-to-logged-in-registry [this-users-params]
"We assume some user is looking at a site such as wpquestions.com and the
Javascript on that site is sending an Ajax request to this app,
Thanks for your reply Andy!
BRgds,
Henrik
On Thursday, October 18, 2012 2:17:22 PM UTC+2, Andy Fingerhut wrote:
>
> Hopefully someone else can answer why there is a difference in the output
> of the str function. I suspect in ClojureScript's case, it is simply the
> default behavior to use \x
Hopefully someone else can answer why there is a difference in the output of
the str function. I suspect in ClojureScript's case, it is simply the default
behavior to use \x and two hex digits to display a character in a string with a
code point in the range 128 through 255, inherited from Java
Hi people!
I just cloned the current clojurescript repo, in a Windows 2008 server
machine, and follow the instructions:
https://github.com/clojure/clojurescript/wiki/Windows-Setup
https://github.com/clojure/clojurescript/wiki/Quick-Start
But when I run .\script\repl.bat and tried (require '[cljs.
Hi there!
I'm wondering why ClojureScript seems to handle international characters
differently from Clojure.
Simple example in Clojure (= my preferred behaviour):
user=> (str "ø")
"ø"
The same example in ClojureScript:
ClojureScript:cljs.user> #_=> (str 'ø')
"\xF8'"
Can anyone explain to me
Congrats!
--
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 be patient with your
first post.
To unsubscribe from this group, send emai
1 - 100 of 103 matches
Mail list logo