FAQ
Sent using BlackBerry® from Orange

-----Original Message-----
From: clojure@googlegroups.com
Sender: clojure@googlegroups.com
Date: Sat, 07 Jan 2012 00:21:58
To: Digest Recipients<clojure@googlegroups.com>
Reply-To: clojure@googlegroups.com
Subject: Digest for clojure@googlegroups.com - 8 Messages in 6 Topics

=============================================================================
Today's Topic Summary
=============================================================================

Group: clojure@googlegroups.com
Url: http://groups.google.com/group/clojure/topics

- ClojureScript DOM-manipulation library? [2 Updates]
http://groups.google.com/group/clojure/t/7e58d78a93febd9e
- add records in mysql???? [2 Updates]
http://groups.google.com/group/clojure/t/5da31681ef2f3679
- [Tutorial] Making core.logic work with custom data structures [1 Update]
http://groups.google.com/group/clojure/t/830edc3723e27fb0
- On using atoms together with side effect functions [1 Update]
http://groups.google.com/group/clojure/t/d36691798d211be9
- Storing clojure lists and maps in Redis [1 Update]
http://groups.google.com/group/clojure/t/a83e8b42715ced32
- question from wikibooks page on macros? [1 Update]
http://groups.google.com/group/clojure/t/a33b558e27eca7bc


=============================================================================
Topic: ClojureScript DOM-manipulation library?
Url: http://groups.google.com/group/clojure/t/7e58d78a93febd9e
=============================================================================

---------- 1 of 2 ----------
From: Shantanu Kumar <kumar.shantanu@gmail.com>
Date: Jan 06 01:20PM -0800
Url: http://groups.google.com/group/clojure/msg/2f5c10f4a99deedd

Thanks everybody for responding. I will look at the mentioned
projects.

Shantanu



---------- 2 of 2 ----------
From: Takahiro Hozumi <fatrow@googlemail.com>
Date: Jan 06 02:01PM -0800
Url: http://groups.google.com/group/clojure/msg/9433ad8738b58f84
($ <selector> (css <attribute> <atom>))> > could wire an atom to a css (or other) dom attribute, by placing a> watcher on the atom and automatically updating the dom on change.Interesting idea!


=============================================================================
Topic: add records in mysql????
Url: http://groups.google.com/group/clojure/t/5da31681ef2f3679
=============================================================================

---------- 1 of 2 ----------
From: jayvandal <sixs@ida.net>
Date: Jan 06 01:56PM -0800
Url: http://groups.google.com/group/clojure/msg/e3965f6770ec3590

I tried this code :
(defn add-ausers [user]
(sql/with-connection db
(sql/insert-record :books user
["INSERT INTO books(BOOK_ID, BOOK_NAME, BOOK_PRICE, BOOK_AUTHOR)
VALUES('%','joe','12', 'siley')"];

(println rows))))

user=> (mysql.core/add-ausers)
java.sql.SQLException: Can not issue data manipulation statements with
executeQu
ery(). (NO_SOURCE_FILE:0)

What is Query??



---------- 2 of 2 ----------
From: jayvandal <sixs@ida.net>
Date: Jan 06 01:58PM -0800
Url: http://groups.google.com/group/clojure/msg/976ac033a880f35d

i am using leinningen and mysql example. I can select records as:

(defn list-ausers []
(sql/with-connection db
(sql/with-query-results rows

["SELECT * FROM books WHERE BOOK_ID = '1'"]
(println rows))))

but I can't insert records,i doesn't like the query as:

(defn add-ausers []
(sql/with-connection db
;(sql/with-query-results rows

sql ["INSERT INTO books(BOOK_ID, BOOK_NAME, BOOK_PRICE,
BOOK_AUTHOR) VALUES('2','joe','12', 'siley')"]
(println rows)

why or?
;)
))



=============================================================================
Topic: [Tutorial] Making core.logic work with custom data structures
Url: http://groups.google.com/group/clojure/t/830edc3723e27fb0
=============================================================================

---------- 1 of 1 ----------
From: Tassilo Horn <tassilo@member.fsf.org>
Date: Jan 06 10:44PM +0100
Url: http://groups.google.com/group/clojure/msg/8170558c4f30f0f

Hi all,

after spending the last two days making clojure.core.logic work with our
custom Java data structures, I decided to write a short blog posting
about it. Here it is:

http://tsdh.wordpress.com/2012/01/06/using-clojures-core-logic-with-custom-data-structures/

A bunch of compliments and thank-yous to Ambrose, who was something like
my 24/7 support center over last 2 days. :-)

Bye,
Tassilo



=============================================================================
Topic: On using atoms together with side effect functions
Url: http://groups.google.com/group/clojure/t/d36691798d211be9
=============================================================================

---------- 1 of 1 ----------
From: Alan Malloy <alan@malloys.org>
Date: Jan 06 01:34PM -0800
Url: http://groups.google.com/group/clojure/msg/dd51fc1bb317ad92
(let [result (side-effect-fn! (:input item))]
(assoc item :result result))))
(swap! state update-item!) ;; same problem
Not doable with atoms if you have a side-effecty thing that you can't
separate out. You'll have to use something lower-level like Java
synchronization or locks.



=============================================================================
Topic: Storing clojure lists and maps in Redis
Url: http://groups.google.com/group/clojure/t/a83e8b42715ced32
=============================================================================

---------- 1 of 1 ----------
From: Alex Miller <alex@puredanger.com>
Date: Jan 06 01:08PM -0800
Url: http://groups.google.com/group/clojure/msg/aaed9042b0b1910c

BTW, I have not done an actual release of Carbonite to put it out in
the repos but I hope to get around to that soon. I have been a bit
busy with Clojure/West. :) I plan to set it up in our Revelytix CI
server so it can be regularly tested as well.





=============================================================================
Topic: question from wikibooks page on macros?
Url: http://groups.google.com/group/clojure/t/a33b558e27eca7bc
=============================================================================

---------- 1 of 1 ----------
From: Andrew <achengs@gmail.com>
Date: Jan 06 08:49AM -0800
Url: http://groups.google.com/group/clojure/msg/a58f17c460da3a5c

I see. That section is just horribly written, calling something a macro
when it isn't one yet. Here's my thinking in **bold**, inlined.

Simple Macro

If you understand the reader and evaluator, there actually isn't all that
much more to understand about the operation and creation of macros, for a
macro is simply a regular function that is called in a special way. When
called as a macro, a function takes its arguments *un*evaluated and returns
an expression to be evaluated in place of the call to the macro. A very
simple (and pointless) macro would be one that simply returns its argument.
**Here's a first attempt which is NOT a macro:**

(def pointless (fn [n] n))

Whatever is passed to this macro---a list, a symbol, whatever---will be
returned unmolested and then evaluated after the call. **At least, that's
what we want to happen, and that's what would happen to a real macro. But
this is not a real macro yet.** Effectively, calling this macro is
pointless:* *And if this were a real macro, this is what would happen:**

(pointless (+ 3 5)) ; pointless returns the list (+ 3 5), which is then evaluated in its place(+ 3 5) ; may as well just write this instead

But as we defined *pointless* above, it is just a regular function, not a
macro. **The argument to pointless (+ 3 5) gets evaluated to 5 and then
enters the body of the function, which simply returns 5.** To make it a
macro, we need to attach the key-value pair :macro true as metadata to the
Var mapped to *pointless* by the def. There are a number of ways to do
this, but most commonly we would simply define the function as a macro with
the provided macro *clojure/defmacro*:

(defmacro pointless [n] n) ; define a macro pointless that takes one parameter and simply returns it **...without evaluating it -- now it behaves as we intended in the previous code snippet on this page**




--
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 email to
clojure+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

--
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 email to
clojure+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Search Discussions

  • Cedric Greevey at Jan 7, 2012 at 1:06 pm

    On Sat, Jan 7, 2012 at 8:01 AM, wrote:
    Sent using BlackBerry® from Orange
    ________________________________
    From: clojure@googlegroups.com
    Sender: clojure@googlegroups.com
    Date: Sat, 07 Jan 2012 00:21:58 +0000
    To: Digest Recipients<clojure@googlegroups.com>
    ReplyTo: clojure@googlegroups.com
    Subject: Digest for clojure@googlegroups.com - 8 Messages in 6 Topics

    Today's Topic Summary

    Group: http://groups.google.com/group/clojure/topics

    ClojureScript DOM-manipulation library? [2 Updates]
    add records in mysql???? [2 Updates]
    [Tutorial] Making core.logic work with custom data structures [1 Update]
    On using atoms together with side effect functions [1 Update]
    Storing clojure lists and maps in Redis [1 Update]
    question from wikibooks page on macros? [1 Update]
    [snip]

    Where's the original material in this? It's nearly all quoted text,
    the original material is inline somewhere rather than at the end,
    there's no obvious marker for the original material such as different
    indentation, and the post as a whole, including quoted text, is tl;dr.

    Next time, please quote only the sections relevant to whatever you're
    saying, and please indent the quotes so your original text stands out,
    especially if it isn't all at the bottom (or, ugh, the top). Your
    mailer should do the latter for you automatically, in fact; I'm not
    sure why it didn't in this case.

    --
    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 email to
    clojure+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/clojure?hl=en

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupclojure @
categoriesclojure
postedJan 7, '12 at 1:01p
activeJan 7, '12 at 1:06p
posts2
users2
websiteclojure.org
irc#clojure

2 users in discussion

Cedric Greevey: 1 post Dawidcha: 1 post

People

Translate

site design / logo © 2022 Grokbase