solnic changed the topic of #rom-rb to: Ruby Object Mapper | Mailing List: https://groups.google.com/forum/?fromgroups#!forum/rom-rb | Logs: http://irclog.whitequark.org/rom-rb
postmodern has joined #rom-rb
snusnu has joined #rom-rb
postmodern has quit [Quit: Leaving]
snusnu has quit [Quit: Leaving.]
mbj has joined #rom-rb
snusnu has joined #rom-rb
<snusnu> yo mbj
<snusnu> do you know how axiom-types is supposed to be used?
<snusnu> i have to generate a hash of axiom relations based on DM1 model definitions, and without thinking much i just mapped from a DataMapper::Property::* to a builtin ruby type, however, i just hit DataMapper::Property::Boolean and that reminded me of axiom-types
<snusnu> mbj: no idea but i'll try: Axiom::Types.infer(Integer) and the likes now
<snusnu> and it doesn't work
<snusnu> lib/axiom/types/type.rb:113:in `constraint': wrong number of arguments (2 for 0..1) (ArgumentError)
snusnu has quit [Quit: Leaving.]
snusnu has joined #rom-rb
<snusnu> mbj: around?
<mbj> snusnu: hola
<snusnu> mbj: do you have any idea how axiom-types is supposed to be used?
<mbj> snusnu: axiom-types is an inspectable primitive type predicate used in axiom.
<mbj> snusnu: inspectable in sense of relectable and useful as an information source when pushing down.
<mbj> snusnu: predicate in sense of #include?(object) can be used to determine if a cetrain value fulfills the needs of that relation.
<snusnu> mbj: i'm more concerned with "setting it up" … i iterate over my DM1::Model.descendants, and generate an axiom base relation from them
<snusnu> mbj: so at some point i have to map from DataMapper::Property::* to something axiom understands, either a primitive, or an Axiom::Type
<snusnu> so my question is, should i map to Axiom::Types::Type subclasses directly, or shall i just map to primitives
<snusnu> i couldn't get it to even start when trying to map to axiom type subtypes
<snusnu> so currently i map like this: DataMapper::Property::String => String
<mbj> snusnu: gimme a sec to refresh the creation api
<snusnu> this gets weird when it comes to DataMapper::Property::Boolean tho
<snusnu> that's what i'm doing, and i wonder if the values in this hash should already be Axiom::Types::Type subclasses
<snusnu> but i can't get that to work
<mbj> snusnu: Axiom::Types.infer(TrueClass)
<mbj> =>
<mbj> Axiom::Types::Boolean (BasicObject)
<snusnu> mbj: lib/axiom/types/type.rb:113:in `constraint': wrong number of arguments (2 for 0..1) (ArgumentError)
<snusnu> mbj: anyways, i guess my question is, do I have to even do that, or does axiom do it internally anyway
<snusnu> fwiw, i don't care about any constraints or anything, as i define/migrate the schema with DM1 anyway, and only use axiom for reading data
<mbj> snusnu: I teted against latest master.
<snusnu> mbj: sorry, don't mean to be rude, but that doesn't answer my question at all ;)
<mbj> snusnu: mhh
<mbj> snusnu: I thought you wanna construct a Axiom::Type::Boolean ;)
<snusnu> mbj: heh i do, but i mainly wanna know if i even have to map to axiom type subclasses, or if axiom will do that by itself anyway
<snusnu> using the inference cache
<mbj> snusnu: I'm very busy, so tried to give you as much as possible input from reading minimal text ;)
<snusnu> mbj: i guess it boils down to this: when constructing an Axiom::Header instance, do i need to pass axiom type subclasses, or primitives
<mbj> snusnu: I'm to loaded with some mutant stuff, cannot switch context while giving you good input. Sorry.
<snusnu> no worries, it was worth a try ;)
CraigBuchek has joined #rom-rb
snusnu has quit [Quit: Leaving.]
snusnu has joined #rom-rb
jordanyee has quit [Quit: MacBook went to sleep.]
CraigBuchek is now known as CraigBuchek|1194
snusnu has quit [Quit: Leaving.]
solnic has joined #rom-rb
snusnu has joined #rom-rb
snusnu has quit [Quit: Leaving.]
mbj has quit [Ping timeout: 240 seconds]
jordanyee has joined #rom-rb
mbj has joined #rom-rb
jordanyee has quit [Quit: MacBook went to sleep.]
jordanyee has joined #rom-rb
jordanyee has quit [Quit: MacBook went to sleep.]
jordanyee has joined #rom-rb
jordanyee has quit [Client Quit]
jordanyee has joined #rom-rb
jordanyee has quit [Quit: MacBook went to sleep.]
jordanyee has joined #rom-rb
lgierth has joined #rom-rb
postmodern has joined #rom-rb
mbj has quit [Quit: leaving]
jordanyee has quit [Quit: MacBook went to sleep.]
jordanyee has joined #rom-rb
jordanyee has quit [Client Quit]
solnic has quit [Quit: Leaving...]
solnic has joined #rom-rb
solnic has quit [Client Quit]
jordanyee has joined #rom-rb
CraigBuchek|1194 has quit [Quit: Leaving.]
jordanyee has quit [Quit: MacBook went to sleep.]
solnic has joined #rom-rb
jordanyee has joined #rom-rb
solnic has quit [Ping timeout: 276 seconds]
jordanyee has quit [Quit: MacBook went to sleep.]
solnic has joined #rom-rb
solnic has quit [Ping timeout: 252 seconds]
snusnu has joined #rom-rb
snusnu has quit [Quit: Leaving.]
snusnu has joined #rom-rb
solnic has joined #rom-rb
solnic has quit [Ping timeout: 260 seconds]
snusnu has quit [Quit: Leaving.]
snusnu has joined #rom-rb