hi all,
What's the difference between these two snippets?
1.
(ns my-ns
(require [package.name.a]))
2.
(ns my-ns
(:require [package.name.a]))
They all works!But I wonder what's the differences between them.
thx!
--
--
You received this message because you are subscribed to the Google
By coincidence they are both equivalent and expand to exactly the same code.
The latter is preferred, and it's debatable if the former should even be
legal.
Thanks,
Ambrose
On Fri, Dec 6, 2013 at 5:07 PM, BillZhang jingege...@gmail.com wrote:
hi all,
What's the difference between these two
hi all,
What's the differences between those two snippets?
1.
(ns a
(require [a.b]))
2.
(ns a
(:require [a.b]))
They all works in my code!
thx~
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
I believe one is a directive and the other is a function.:require doesn't need the values to be quoted (:require xyz)require needs values to be quoted so that they're not evaluated when passed as arguments (require 'xyz)I could be wrong though. 06.12.2013, 18:17, "BillZhang"
Hi Folks
firstly a big thank you for all the help so far. I posted the original
question because I've been looking at Midje which has the ability to stub
out a function but have the stub function return different data each time
it is called (it also counts the number of times the stubbed
Inside the ns form they are the same. Outside the ns form, only (require
'[a.b]) works (with quoting, as Kelker said).
Jonathan
On Fri, Dec 6, 2013 at 10:24 AM, Kelker Ryan theinter...@yandex.com wrote:
I believe one is a directive and the other is a function.
:require doesn't need the
Hi
I have our own jdbc driver when I am trying to use clojure java.jdbc it is
giving me error like below
Exception in thread main java.lang.ClassCastException:
a.b.my_custom_driver cannot be cast to clojure.lang.IFn
at clojure.gemfireXD.jdbc$createStatement.invoke(client.clj:13)
at
Parenthesis call the thing they wrap as a function. You have getConnection
wrapped in a redundant set of parenthesis, so the return value of
getConnection is being called. It is not a function, but it is a
ConnectionCustom, so you get your error.
Some hints to make clojure code more readable:
To add some further clarification to the style hints suggested: many of us
read code in multiple languages, and using formatting that is idiomatic to
the language being used helps us keep the rules straight. f(a b) is an
algol family syntax, the lisp family has a direct equivalent of (f a b),
You might find this useful:
http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html
--
--
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
This is great news! :)
On Thu, Dec 5, 2013 at 3:42 PM, Nicola Mometto brobro...@gmail.com wrote:
I'm happy to announce that after Ambrose BS commissioned me to continue
working on my CinC libraries as part of his typed-clojure campaign
(http://www.indiegogo.com/projects/typed-clojure),
That's awesome!
---
Joseph Smith
j...@uwcreations.com
@solussd
On Dec 6, 2013, at 8:44 AM, David Nolen dnolen.li...@gmail.com wrote:
This is great news! :)
On Thu, Dec 5, 2013 at 3:42 PM, Nicola Mometto brobro...@gmail.com wrote:
I'm happy to announce that after Ambrose BS
This is great news. Congratulations and many thanks to Cognitect for making it
possible!
'(Devin Walters)
On Dec 5, 2013, at 14:42, Nicola Mometto brobro...@gmail.com wrote:
I'm happy to announce that after Ambrose BS commissioned me to continue
working on my CinC libraries as part of his
https://github.com/flyingmachine/penny-black
Penny Black allows you to declaratively create functions which send HTML
and text emails using mustache templates. It's inspired by ActionMailer.
You might find it useful if you have an application that sends email :)
Here's an example of defining
Glad it worked, if you have any further questions feel free to ask. I'm
using it extensively and it and Clojure seem to be a perfect match these
days, especially on very large datasets.
--Joseph
On Friday, December 6, 2013 12:56:40 AM UTC-6, Himakshi Mangal wrote:
Hi Joseph Guhlin,
Thanks
I use a default reader to do something like what you're asking for in my
'tagged' library. You could hack a similar default reader that restricted
itself just to your favorite namespaces. That way you don't have to
explicitly track all your defrecord classes.
https://github.com/miner/tagged
Good day everyone,
I inadvertently passed a double to a timeout channel and discovered the
following behavior:
user= (require '[clojure.core.async :as a])
nil
user= (a/timeout 100.0)
#ManyToManyChannel
clojure.core.async.impl.channels.ManyToManyChannel@1009d11d
user= Exception in thread
@Rob
I have a working prototype of bits, which are encoded from 32 flags and
decoded back to them. I've added a couple of helper methods such as
`set-bits-at` and `get-set-bits` and so on to facilitate it.
Although I recommend using enums for that (which is possible in majority of
cases).
I'll
@Thomas, let me know if you run into any problems. Since the project is
quite young, I'm very open to add a couple of features. Rob, Ulisses and
Cesar have done a very nice job providing some very nice ideas!
On Sat, Dec 7, 2013 at 12:05 AM, Oleksandr Petrov
oleksandr.pet...@gmail.com wrote:
In ClojureWerkz[1], there're some projects, for example, Titan[2]. Zach
Maril [3] is taking care of them, mostly.
[1] http://clojurewerkz.org
[2] https://github.com/clojurewerkz/titanium
[3] https://twitter.com/zackmaril
On Mon, Dec 2, 2013 at 3:01 PM, Paweł Rozynek pro...@gmail.com wrote:
Instead of trying to do it that way, how about just a thin layer of macrology
around defrecord? Within the def-record-reader firm you have access to all the
info you need for each reader, without extensive code-walking etc
--
--
You received this message because you are subscribed to the
21 matches
Mail list logo