Hello Jimm
I've been testing the clojure library clj-record and it is very
usefull. But I have a question, I'm a 'noob' on clojure language and
I'm wondering if it is possible to write a macro or something to get
namespaces generated for every table in my database, for
I apologize for presenting you with a moving target. That was
definitely not my attention.
I should have realized I messed up the content of the files but
unfortunately had no clue what all these exceptions meant.
Therefore I really appreciate your detailed description of the
conclusion you draw
Hi,
On 20 Okt., 14:04, Stefan Rohlfing wrote:
> I really learned at lot about dealing with namespaces today.
I hope you also learned a bit about error messages. ;)
"No such var: user/create": That means you get past the namespace
declaration. Hence they load fine. But in the user namespace the
You were right again. I left a code snippet from the book in
charge.clj and forgot to remove it later.
Now everything seems to work fine, even when importing the active-
record.user namespace as 'user':
(ns active-record.program.cor
Hi,
On 20 Okt., 11:35, Stefan Rohlfing wrote:
> Evaluating your suggested declaration:
>
> (ns active-record.program.core
> (:require [active-record.user :as u])
> (:require [active-record.charge :as charge]))
>
> I get the following error message:
>
> ;; Unable to resolve symbol: user=>
Evaluating your suggested declaration:
(ns active-record.program.core
(:require [active-record.user :as u])
(:require [active-record.charge :as charge]))
I get the following error message:
;; Unable to resolve symbol: user=> in this context
;; [Thrown class java.lang.Exception]
The sam
Hi,
On 20 Okt., 11:09, Stefan Rohlfing wrote:
> Yes, I also tried charge/create. The error message is different, but
> it still does not work:
More evidence for a problem with the user alias. Try a different one
like (:require [active-record.user :as u]).
Sincerely
Meikel
--
You received thi
Yes, I also tried charge/create. The error message is different, but
it still does not work:
;; No such namespace: charge
;; [Thrown class java.lang.Exception]
On Oct 20, 5:03 pm, Meikel Brandmeyer wrote:
> Hi,
>
> On 20 Okt., 10:46, Stefan Rohlfing wrote:
>
> > You are right, there was a syn
Hi,
On 20 Okt., 10:46, Stefan Rohlfing wrote:
> You are right, there was a syntax error in charge.clj. However, after
> correcting the error I get the same error message as with the other
> namespace declaration:
Did you try the same with charge/create? Examples in books are not
necessarily cor
You are right, there was a syntax error in charge.clj. However, after
correcting the error I get the same error message as with the other
namespace declaration:
;; No such var: user/create
;; [Thrown class java.lang.Exception]
On Oct 20, 4:37 pm, Meikel Brandmeyer wrote:
> Hi,
>
> On 20 Okt.,
Hi,
On 20 Okt., 10:09, Stefan Rohlfing wrote:
> ;; EOF while reading
> ;; [Thrown class java.lang.Exception]
Are you sure, that you don't have some syntax error somewhere?
Sincerely
Meikel
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post
:last_name "Berger"
:password "secret"
:email_address "r...@runa.com"})
And then there is the clj-record macro 'init-model' that creates a
model out of a Clojure namespace. However,
On 20 October 2010 10:09, Stefan Rohlfing wrote:
> Dear Clojure group,
>
> I am currently reading chapter 9.1 MySQL & clj-record of 'Clojure in
> Action'.
>
> clj-record seems pretty awesome, but I once again got lost in
> namespace jun
Dear Clojure group,
I am currently reading chapter 9.1 MySQL & clj-record of 'Clojure in
Action'.
clj-record seems pretty awesome, but I once again got lost in
namespace jungle.
Here is a concrete example:
--
On Tue, Sep 1, 2009 at 4:43 PM, Luc
Prefontaine wrote:
> Hi John,
>
> Clj-record will make its way into production in a couple of weeks.
>
> It's been working flawlessly in high volume tests here.
Hi Luc,
That's great to hear. I recently set up a Google Group for clj-r
Hi John,
Clj-record will make its way into production in a couple of weeks.
It's been working flawlessly in high volume tests here.
We added an adapter on our medical message bus to capture historical
census data in messages. It records patient visits, employees dealing
with patients, se
Hi Emeka,
Sorry for the slow response. I don't get that message with the latest
clojure, clojure-contrib, and clj-record. (load-file just returns
nil.)
What version of clojure are you running? Do you have the base
directory of clj-record on your classpath?
Also, that file just contain
user=> (load-file "clj_record/core.clj")
I got clj_record/util not in system path. Why is it so?
Emeka
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@go
> I guess it comes down to what belongs in metadata. While errors are
> certainly data about other data, they don't feel to me like metadata a
> la :doc, :tag, :file, :line, and :test. They're the sort of thing I'd
> show in an application's UI as part of normal user interactions,
> rather than so
On Mon, Jan 5, 2009 at 1:29 AM, Brian Doyle wrote:
> ... Instead of
> just returning a hash of errors what about returning the record with the
> errors hash in
> the metadata? That way you just have the data and the errors in one
That's an interesting idea. On the one hand it seems weird to m
John,
I was looking at the validates method and I had a thought I'd bounce off
you. Instead of
just returning a hash of errors what about returning the record with the
errors hash in
the metadata? That way you just have the data and the errors in one
"object" similar
to an ActiveRecord model.
Looks good. I didn't know about the *file* var.
On Sun, Jan 4, 2009 at 11:22 AM, John D. Hume wrote:
>
> Brian,
> I incorporated your changes and then made changes to load and run all
> clj_record/test/*-test.clj files. Thanks again.
> -hume.
>
> >
>
--~--~-~--~~~---
Brian,
I incorporated your changes and then made changes to load and run all
clj_record/test/*-test.clj files. Thanks again.
-hume.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this gro
Hi Brian,
On Sat, Jan 3, 2009 at 12:53 AM, Brian Doyle wrote:
> I changed the end of the clj-record/test/main.clj script to this:
>
> main.clj >>>>
> (def files ["core-test" "validation-test" "associations-test"])
> (doseq [file files]
&
John,
I was looking around at your tests just to get a feel for using the test-is
stuff in the contrib library. I noticed that when I ran main.clj it would
run
not only the tests in clj-record, but all of the tests in the
clojure.contrib
as well. I was curious so I attempted to figure out what
Hi Brian,
On Tue, Dec 30, 2008 at 11:41 AM, Brian Doyle wrote:
> (ns com.example.user)
> (clj-record.core/init-model)
>
> but when I do that I get the error:
>
> java.lang.ClassNotFoundException: clj-record.core
...
> (first (reverse (re-split #"\." (name (ns-name *ns*)
>
> and could be ch
I see what you are doing with the validations and defining them in the
init-modelcall.
I think that's a good idea actually and like it better than my solution to
putting the
callbacks in the model namespace.
A couple of small things that I noticed when starting to play around with
clj-record
On Mon, Dec 29, 2008 at 7:15 PM, Brian Doyle wrote:
> I noticed that in the init-model macro you are creating a 'defn table []
> ...' function in the
> model namespace and was wondering why you didn't just make it a def instead,
> since
> it doesn't take any args?
That didn't occur to me. I do l
That seems to be working better now John. I looked over most of the code
and it seems
like a good start. I'm no expert when it comes to functional programming or
Clojure,
so I'm not sure how to critic the code exactly. If I was doing the porting
I would prolly
do it in very OO way, since that'
Ok, please pull the latest and try again.
git clone git://github.com/duelinmarkers/clj-record.git
The problem was due to something I've seen a couple other messages
about: When running a file as a script, it starts out in the
clojure.core namespace. I was doing (def db {...}) before any (ns ...)
x27;m sure it's something I'm doing wrong but I do have derby.jar on my
> classpath. Thanks.
>
>
> On Sat, Dec 27, 2008 at 1:48 PM, John D. Hume
> wrote:
>>
>> Hi all,
>> As a learning exercise, I've started working on a sort of clojure
>> clone
see it here:
> http://github.com/duelinmarkers/clj-record/tree/master
>
> The model used in the tests is defined in files here:
>
> http://github.com/duelinmarkers/clj-record/tree/master/clj_record/test/model
>
> And the tests most worth reading are:
>
> http://github.co
Hi all,
As a learning exercise, I've started working on a sort of clojure
clone of ActiveRecord (from Rails). You can see it here:
http://github.com/duelinmarkers/clj-record/tree/master
The model used in the tests is defined in files here:
http://github.com/duelinmarkers/clj-record/tree/m
33 matches
Mail list logo