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
CraigBuchek has quit [Quit: CraigBuchek]
lgierth has quit [Quit: Ex-Chat]
snusnu has joined #rom-rb
CraigBuchek has joined #rom-rb
CraigBuchek has quit [Read error: Connection reset by peer]
CraigBuchek has joined #rom-rb
zekefast has quit [Quit: Leaving.]
zekefast has joined #rom-rb
zekefast has quit [Quit: Leaving.]
zekefast has joined #rom-rb
<warmwaffles> whois solnic
<warmwaffles> lol
<warmwaffles> ment to do a /whois
<warmwaffles> solnic or dkubb: How could I go about alias'ing an attribute? I am using alias_method but I hate having to do that twice to set the setter and getter
<warmwaffles> or snusnu
zekefast has quit [Remote host closed the connection]
zekefast has joined #rom-rb
zekefast has quit [Quit: Leaving.]
CraigBuchek has quit [Quit: CraigBuchek]
snusnu has quit [Quit: Leaving.]
zekefast has joined #rom-rb
dkubb has joined #rom-rb
ezkl_ has joined #rom-rb
ezkl has quit [*.net *.split]
Gibheer has quit [*.net *.split]
Gibheer has joined #rom-rb
ezkl_ is now known as ezkl
skade has joined #rom-rb
skade has quit [Quit: Computer has gone to sleep.]
zekefast has quit [Quit: Leaving.]
mbj has joined #rom-rb
mbj has quit [Ping timeout: 264 seconds]
skade has joined #rom-rb
mbj has joined #rom-rb
zekefast has joined #rom-rb
zekefast has quit [Client Quit]
mbj has quit [Ping timeout: 265 seconds]
zekefast has joined #rom-rb
bestie has joined #rom-rb
bestie has quit [Client Quit]
postmodern has quit [Quit: Leaving]
bestie has joined #rom-rb
snusnu1 has joined #rom-rb
snusnu1 has quit [Client Quit]
snusnu1 has joined #rom-rb
snusnu1 has quit [Client Quit]
snusnu has joined #rom-rb
lgierth has joined #rom-rb
bestie has quit [Quit: bestie]
irclogger__ has quit [Ping timeout: 240 seconds]
lgierth has quit [Quit: Ex-Chat]
snusnu has quit [Quit: Leaving.]
zekefast has quit [Quit: Leaving.]
breakingthings has joined #rom-rb
CraigBuchek has joined #rom-rb
snusnu has joined #rom-rb
zekefast has joined #rom-rb
snusnu has quit [Quit: Leaving.]
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
<elskwid> Hi everyone!
skade has joined #rom-rb
knowtheory has quit [Quit: Computer has gone to sleep]
knowtheory has joined #rom-rb
my_log_bot has joined #rom-rb
bf4 has joined #rom-rb
my_log_bot has quit [Remote host closed the connection]
irclogger__ has joined #rom-rb
knowtheory has quit [Ping timeout: 246 seconds]
zekefast has quit [Quit: Leaving.]
irclogger__ has quit [Remote host closed the connection]
bf4 has quit [Quit: leaving]
<warmwaffles> dkubb: I have (1..n] relations, that I would like to append the rows into one relation, is it possible without me having to do rows.concat(other_rows)
knowtheory has joined #rom-rb
zekefast has joined #rom-rb
irclogger__ has joined #rom-rb
snusnu has joined #rom-rb
bf4 has joined #rom-rb
mbj has joined #rom-rb
<mbj> dkubb: I fixed that mutant issue you reported locally, need to do some specs than I can push.
<mbj> dkubb: Thx for reproduction CLI!
<mbj> dkubb: I had multiple reports about this issue, but noone was easy to reproduce!
mbj has quit [Ping timeout: 240 seconds]
mbj has joined #rom-rb
irclogger____ has joined #rom-rb
irclogger____ has quit [Ping timeout: 248 seconds]
zekefast has quit [Quit: Leaving.]
<dkubb> warmwaffles: you could do: relations.reduce(:|)
<dkubb> or relations.reduce(:union)
<dkubb> warmwaffles: obviously they would need to have the same headers
<warmwaffles> yea
<dkubb> mbj: awesome to hear
<warmwaffles> I assume this will not duplicate the row data, but rather keep an internal linking between the rows right?
<dkubb> warmwaffles: relations are sets, so they will never contain duplicate information
<dkubb> mbj: I'm killing mutations in axiom right now, only about 43 to go. I killed about 20-30 yesterday
<dkubb> mbj: so far no bugs, just things I missed in the specs
<dkubb> I did find a few refactorings I missed though
<dkubb> warmwaffles: if those relations were originally pulled from the in-memory adapter, then inserting into the "aggregate" relation will propagage back to the correct one
<dkubb> actually, sorry, it will propagage back to all of them, given it's a union
<warmwaffles> Nah these relations are just pure json data returned from google that I am shoving into memcache after coercing things
<warmwaffles> pump each page of data into an axiom relation
<dkubb> actually, that's a bigger thing.. there's some interesting rules in RA about how writes need to propagate. they are pretty consistent once you understand them. it basically gives you writable views
<dkubb> ahh cool
<dkubb> once they're in a relation are you performing aggregate ops on them, or restricting them or something?
<warmwaffles> Also I saw that you had some aggregate data stuff, how would I go about summing a column of data up
<warmwaffles> all of the above
<warmwaffles> I work at KISSmetrics
<warmwaffles> We are taking the data and grouping them etc... from what we get back from google
<warmwaffles> analyzing traffic etc....
snusnu has quit [Quit: Leaving.]
<dkubb> ahh neat
<dkubb> summing a column up? one sec, I'll show you an example
<warmwaffles> I like this library because it's relational algebra so it looks similar to SQL
<warmwaffles> plus it's nerdy so I like it
<dkubb> assuming you're starting with a relation like the one at the top of https://github.com/dkubb/axiom#examples you can do: relation.summarize { |r| r.add(:total, r.weight.sum) }
<warmwaffles> ah
<dkubb> yeah, familiarity is cool. SQL has a lot of special rules and exceptions. axiom is based on Tutorial D, and other "D" languages.. it should be less complex
<warmwaffles> okay, so the aggregate methods are attached to the relation
<dkubb> at some point I will probably add #sum, #count, etc on the relation
<dkubb> well, they're attached to the attribute objects
<dkubb> they will also eventually be attached to the functions, so you'll be able to do things like: relation.summarize { |r| r.add(:length, r.name.length.sum) }
mbj has quit [Ping timeout: 240 seconds]
<dkubb> I need to refactor how the methods are attached to the attribute and function objects. right now they're in modules and I have to explicitly mix them into each object I want them in, eg: https://github.com/dkubb/axiom/blob/master/lib/axiom/attribute/boolean.rb#L8-L10
<warmwaffles> Ah
<warmwaffles> yea it's a little hard for me to see that those are mixed in on the documentation
<dkubb> what I'm going to do is make it so each Axiom::Attribute has a way to attach methods by type, and then I can say "this function returns a boolean type", and it would get all those methods
<dkubb> yeah, I need to improve the docs even further, perhaps with some guides
<warmwaffles> yardoc is your friend :D
<warmwaffles> there is maintaining code
<warmwaffles> and maintaining docs
<dkubb> oh yeah, I went crazy on the api YARD docs, but I need to go deeper
<warmwaffles> both are rediculous
<dkubb> I use yardstick to make sure every method has some docs
<warmwaffles> Zooom and enhance
<warmwaffles> oh of course...it's written by you ;)
<dkubb> well yeah, I needed it :)
<warmwaffles> hahah
<dkubb> I like writing api docs, but I suck at writing guides
snusnu has joined #rom-rb
<warmwaffles> dkubb: it's hard to write guides because you have to come up with generalized examples
<dkubb> yeah, I suppose I could use Chris Date's base relations that he uses in his examples (there's 3) and then just walk through each of the operations
<warmwaffles> I'm a huge fan of tons of examples
<dkubb> I need to make something that outputs the results in an ascii table
<warmwaffles> even put them in an examples directory that I can directly run with ruby
<dkubb> yeah I like that too
<warmwaffles> dkubb: I believe there is a ruby lib that already prints the columns out prettily
<dkubb> yeah there is
<dkubb> I just need to wire it up so it's as simple as doing relation#to_table
<dkubb> or whatever
<warmwaffles> mm...I don't think that is such a good idea because then you are making a runtime dep
<dkubb> oh I wouldn't add it to axiom itself
<warmwaffles> oh lol
<warmwaffles> thank god
<dkubb> it would be something in anothe gem
<warmwaffles> just monkey patches when included?
<dkubb> you'd have to explicitly require it to get the behaviour. I wouldn't want everyone to take on that dep
<warmwaffles> that'd be cool
<dkubb> yeah, I guess it could do that. normally what I like to do in these situations is what I did in ice_nine: https://github.com/dkubb/ice_nine .. so you add a gem to get something like: Axiom::AsciiTable.new(relation).to_s .. but to get #to_table you have to explicitly require 'axiom/ascii_table/relation_ext'
<warmwaffles> ah
<dkubb> automatic monkey patching is something I generally try to avoid
mbj has joined #rom-rb
<dkubb> I mean, I'm sure there will be some cases where I do it, but as a general rule I would try to avoid it.. and would only add it after lots of thought
<warmwaffles> Is it better to build the Axiom::Header object and pass it into the relation or just pass the [[:column, String]] directly into the relation
<warmwaffles> I assume they both accomplish the same shit
<dkubb> I guess it depends on whether you want to share the same header object
<dkubb> if you pass in the primitives, each relation will coerce them to it's own header object
<dkubb> but yeah, the end result is the same
<dkubb> almost all the objects in axiom are immutable, so it's generally safe to share things
snusnu has quit [Quit: Leaving.]
mbj has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
dkubb has quit [Quit: Linkinus - http://linkinus.com]
snusnu has joined #rom-rb
snusnu has quit [Client Quit]
zekefast has joined #rom-rb
snusnu has joined #rom-rb
<warmwaffles> coercible-0.2.0/lib/coercible/coercer/object.rb:78:in `to_hash'
<warmwaffles> why must you forsake me
<warmwaffles> ArgumentError: wrong number of arguments (0 for 1)
<warmwaffles> when ever I call to_json on a Virtus object
mbj has joined #rom-rb
<warmwaffles> found it, stupid nested shit
<snusnu> warmwaffles: i might be completely wrong and you're doing something different here .. but judging from the complaints about coercible, and what you recently said that you're doing .. ducktrap might be the better option ;)
<snusnu> oops sorry, didn't read on .. virtus is in the mix …
<snusnu> anyways, ducktrap is cool, heh
<snusnu> mbj: ^^
<snusnu> :p
<snusnu> even tho virtus is in the mix … you might achieve better mileage with ducktrap/anima (considering that you only coerce data into a format consumable for axiom)
<mbj> warmwaffles: ducktrap was build for this issues, yeah.
postmodern has joined #rom-rb
mbj has quit [Ping timeout: 241 seconds]
zekefast has quit [Quit: Leaving.]
<warmwaffles> snusnu && mbj: I would use ducktrap but it makes the complexity of the model go up due to the DSL it is attaching
cored has joined #rom-rb
dkubb has joined #rom-rb
<dkubb> warmwaffles: how do you mean the complexity of the model goes up because of the DSL?
<dkubb> I'm not super familiar with ducktrap's internals, but I would imagine it's builder methods could return some kind of object that is optimal for transforming the data, but otherwise has a pretty simple interface
<dkubb> it's not like ActiveRecord where you get this domain object that has 600 extra methods mixed into it
<warmwaffles> Yea, but then you throw it in code climate or other tools and the model complexity goes up because you have blocks nested in blocks
<dkubb> ahh ok
<snusnu> i don't have much time now, and i don't wanna sound rude at all .. but really? because of code climate? imagine the branching code you'd have to write without ducktrap or coercible ...
<snusnu> and of course, the DSL is completely external to the objects
<snusnu> sry guys, i have to go tho .. i'm right in the middle of cooking and just came back to look up some recipe stuff ;)
Eiam has quit [Ping timeout: 260 seconds]
<dkubb> based on what I know about mbj's style, it's quite likely the DSL is thin and there are usable classes/modules/methods under the hood that could be used directly
<warmwaffles> yea
<warmwaffles> I assume I would be able to manually coerce some data
<warmwaffles> actually now that I look at it, I do like that anima is readonly
<warmwaffles> I assume it's a small lib as well
<dkubb> I tend not to use code climate as similar tools as the final arbiter on code quality. it's more of a guide. it's important to understand why it flags some code worse than others, but it can be wrong too
<dkubb> yeah anima is tiny
<warmwaffles> much smaller than virtus
<warmwaffles> I lik eit
<warmwaffles> and obviously I can make attributes writeable by just defining setters
<warmwaffles> nice
<dkubb> yeah it was designed around the immutable object style we use
<warmwaffles> I like it
<dkubb> virtus was started earlier. it's kind of a bridge between ROM and AR/DM in terms of how it works and what it allows you to do
<warmwaffles> one thing I liked about virtus was the rapid prototyping I could do with it
<dkubb> yeah, DM is similar in how it works
Eiam has joined #rom-rb
<dkubb> I do actually think we can use virtus in the future to build a DM1-like interface on top of rom
<dkubb> there's nothing stopping us from building an Active Record on top of ROM
<dkubb> it would more or less be based on people's contributions.. I myself don't really like the Active Record style of dev, but I think once all the ROM pieces are in place it won't be as difficult as it was building DM1
<warmwaffles> ActiveRecord is great for beginners but as you start diving into the guts, shit starts getting crazy
<dkubb> it's a decent veneer on top of crazy
<dkubb> it's just had so much cruft layered on top, and has to serve so many roles
<warmwaffles> mbj: 0.0.2 isn't really a good version to start out at. 0.1.0 then => 0.1.1 would be better, that way I can specify '~> 0.1' and get the latest security patches
<warmwaffles> :D
<dkubb> I wonder if '~> 0.0' would work
<dkubb> it looks weird though
<warmwaffles> it does work
<warmwaffles> but yea, it looks weird
lgierth has joined #rom-rb
<warmwaffles> dkubb: with ducktrap can I specify how I want the string coerced into the primitive?
<warmwaffles> specifcally with a date field passed as a string
<dkubb> warmwaffles: I don't know
<warmwaffles> YYYYMMDD
<dkubb> Date#strptime is nice for coercing strings into a Date
<dkubb> I guess Date.parse works too
<warmwaffles> Yea I just wanted to take the string that is given from a hash and coerce it to a Date
<dkubb> warmwaffles: yeah snusnu or mbj would be able to answer that better than I would
<dkubb> I'm sure it's possible. mbj was using ducktrap for doing similar work
zekefast has joined #rom-rb
<warmwaffles> I assume it might have something to do with Ducktrap::Node::Coercion
<warmwaffles> but that class is empty, unlike the primitive class
breakingthings has quit []
breakingthings has joined #rom-rb
cored has quit [Quit: leaving]
cored has joined #rom-rb
knowtheory has quit [Quit: Computer has gone to sleep]
knowtheory has joined #rom-rb
<cored> hi all
<dkubb> cored: hi
breakingthings has quit []
<cored> planning to finish with devtools extraction today at least for flay
<cored> and start on the other two
knowtheory has quit [Ping timeout: 272 seconds]
lgierth has quit [Quit: Ex-Chat]
<dkubb> sweet
<dkubb> I'm working on killing some mutations in axiom, then I have a few refactorings around nesting ops (wrap/group)
<cored> sounds great
<dkubb> I would've done them when writing them, but I didn't see them until the last day or two
<cored> I saw a rom-demo repo the other day
<cored> so there's some activity regarding using rom for actual real world stuff?
<dkubb> yeah, I'm seeing real questions every day now
<dkubb> it's really nice to see
<cored> yeap
<dkubb> it'll pick up pretty fast once we get the sql stuff finished
<cored> for sure
<dkubb> that's what I plan to move onto after the things I mentioned are done
<cored> I need to experiment a little bit with it also, have a lot on my plate at the moment between classes and searching for a new job
<dkubb> I need to get mbj's help to lay out the foundation for that gem since he knows more about that stuff than I do
<dkubb> cored: are you looking for work right now? what kind?
<cored> dkubb: yeap
<cored> I have like 5 months without a job
<cored> the company that I was working did some layoff early this year
<cored> well, Rails work mostly for the moment
justinjaffray has joined #rom-rb
<cored> or in general a Ruby jo
<cored> s/jo/job
<dkubb> rails work is in pretty high demand, it shouldn't be too difficult to get work if you've got experience
<cored> sure, I've been in a couple of interviews
<cored> but did not get a good feeling about some of them
<cored> also considering my condition, I'm not in the state at the moment, I work as a contractor normally from Dominican Republic
<cored> best part of some of this interviews is that they show up which are my defiencies and I'm trying to get up to speed on fundamental stuffs regarding CS
<cored> I'm getting a bunch of mutant warnings is this the correct way to run it
<cored> mutant --include lib --require devtools --rspec ::Devtools::Tasks::Flay
<cored> I want it to guide me on where to put some more tests
<cored> for the task
<dkubb> cored: yeah, that looks right
bf4 has quit [Ping timeout: 246 seconds]
irclogger__ has quit [Ping timeout: 260 seconds]
<cored> I think I told you about the warning on unparser, but I guess I can analize the output at the bottom
knowtheory has joined #rom-rb
<warmwaffles> mbj: with anima, I'd like to be able to define properties each on it's own line, because I have one model that has more than 8 properties and it breaks over 120 characters so it looks wierd
<cored> dkubb: do you have a suggestion for making assertions for this particular task
<cored> I'm about to mock out the role for the flay instance
irclogger_____ has joined #rom-rb
<warmwaffles> gs
<warmwaffles> lol
<warmwaffles> wrong window
skade has joined #rom-rb
skade has quit [Client Quit]
zekefast has quit [Quit: Leaving.]
cored has quit [*.net *.split]