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
cored has quit [Ping timeout: 245 seconds]
lgierth has quit [Quit: Ex-Chat]
skade has joined #rom-rb
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #rom-rb
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #rom-rb
snusnu has joined #rom-rb
bestie has joined #rom-rb
bestie has quit [Quit: bestie]
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
lgierth has joined #rom-rb
snusnu has quit [Quit: Leaving.]
bestie has joined #rom-rb
snusnu has joined #rom-rb
lgierth has quit [Quit: Ex-Chat]
snusnu has quit [Quit: Leaving.]
lgierth has joined #rom-rb
snusnu has joined #rom-rb
cored has joined #rom-rb
cored has joined #rom-rb
cored has quit [Changing host]
snusnu has quit [Quit: Leaving.]
snusnu has joined #rom-rb
snusnu has quit [Quit: Leaving.]
snusnu has joined #rom-rb
mbj has joined #rom-rb
<mbj> snusnu: around
<mbj> snusnu: I have a new morpher node I'd like your opinion about.
<snusnu> yo mbj
<snusnu> tell me about it
<mbj> snusnu: key_push, key_pull : key_push({ 'something' => { 'other' => 'key' } }, 'id') == { 'id' => 'something', 'other' => 'key' }
<mbj> snusnu: Where key pull is the inverse
<mbj> snusnu: I need that often to parse config files.
<mbj> snusnu: Especially the upcoming mutant one ;)
<snusnu> mbj: from you example, i'm not entirely sure what it does tho
<snusnu> how does the "unnesting" happen?
<mbj> snusnu: let me gist it
<snusnu> yeah pls
<mbj> Thats the input
<mbj> each 'key' of the nested hash root, gets pushed down to a value under the key expression.
<mbj> key 'expression' ;)
<mbj> snusnu: Its also handy for document databases
<mbj> snusnu: So I'm not sure if that node should validate for hash children in the input
<mbj> snusnu: Or if we should patch in a guard via the preprocessor
<snusnu> mbj: the node looks good imo, i can see how it's useful for stuff like config etc
<snusnu> mbj: what's the specific document database usecase you have in mind tho?
<snusnu> is it related to wrap/group ?
<mbj> snusnu: partially
<mbj> snusnu: Its not wrap/group in the RA-sense
<snusnu> yeah
<mbj> snusnu: ES for example returns facet results in that format.
<snusnu> btw, i stopped my spike for wrap/group, mainly because group would've been "a different beast", i mean, not really, but it'd operate on an array/set/relation .. and i ended up thinking that it might not be the right layer anyway
<snusnu> i see
<mbj> snusnu: What do you wanted to archieve?
<snusnu> so re the validation for hash, imo morpher should yell at us if the input is no hash ..
<mbj> snusnu: I think morpher should infer all type validations that are dependencies for transforms
<snusnu> mbj: initially i wanted to avoid doing wrap/group in my relations because the don't get optimized currently
<snusnu> i decided that i will just be strict myself in my current app, and maybe at some point find the time to implement proper optimization rules in axiom-optimizer
<mbj> snusnu: so a hash_transform, would automatically add a (guard (primitive Hash)) etc.
<snusnu> imo that's the right thing to do
<snusnu> via preprocessor
<snusnu> same for key_{push, pull}
<mbj> snusnu: yeah
<mbj> snusnu: Also we can have an optimizer that collapses type checks.
<mbj> snusnu: They are *very* fast anyway.
<mbj> snusnu: The type checks will happen just before the actual transform, so the memory locations are *hot* already.
<snusnu> btw, recently i've been thinking more and more about some sort of "type system with constraints" built with morpher
<snusnu> the idea being, that a type is expressed via a set of constraints, which themselves are morpher predicates
<snusnu> the only thing is how to fit coercion in the mix
<snusnu> the way i see it, a coercion is just another precondition that must be true
<snusnu> so it's a transform op, that must not fail
<snusnu> and after applying it, the type's actual constraints must hold
<mbj> snusnu: You just described axiom-types ;)
<snusnu> i had a discussion with solnic on gitter, where we talked about finding name for types (i prefer that), or passing options over and over, solnic (at least initially) preferred that
<snusnu> i will NOT do that tho
<snusnu> yeah but i don't really like axiom-types
<snusnu> i want to be able to build types, have them in some registry, be able to access them by (symbol) name
<snusnu> classes as well as instances seem confusing for this sort of thing
<snusnu> i wanna freely define types, without having to introduce constants for them
<snusnu> no inheritance, is_a?, whatever
<mbj> snusnu: yeah
<snusnu> take some unconstrainted type object, add constraints, register it somewhere under some name, access it by that name
<mbj> snusnu: I build morpher with axiom-types in mind. I think we can replace axiom-types with morpher predicates if we wanted.
<snusnu> that's basically what mom does now
<mbj> yeah, I expected so.
<mbj> And it makes sense, we could also "box" values.
<snusnu> wdym?
<mbj> So I dislike we are passing Strings that qualify to a certain regexp around: To represent an email address.
<mbj> I think, for domain modelling we should have a box that takes a value and the predicate.
<mbj> snusnu: But TBH, we are inventing another language.
<mbj> snusnu: I get bored by ruby programming the more haskell I do.
<snusnu> lol
<mbj> snusnu: Mutant and my commercial stuff is the only thing that holds me back.
<snusnu> it's still interesting to me fwiw, fusing functional, oop, type theory, RA concepts
<mbj> Yeah, but around 80% of our code is about creating a type theory, functional suitable building blocks, ...
<mbj> We are doing that work, IMO on the wrong abstraction level.
<mbj> I do not want to *have* to write an adamantium!
<snusnu> wrong is relative, in a language like ruby, it needs to be done if you wanna do it, switching to another language, is not comparable imo
<mbj> mhh, you should try haskell.
<snusnu> hah, re adamantium, i stopped using it
<mbj> I'm implementing morpher on haskell is many times more easy.
<snusnu> that doesn't surprise me
<mbj> I still use it, as it caches bugs.
<snusnu> dunno what you mean by that
<snusnu> i found it unnecessary, i'm doing immutable by default anyway
<mbj> Adamantium and the purely functional style it imposes => Caches bugs when someone suddennly begins to mutate.
<snusnu> i dunno, for me, i guess it's not worth it (anymore) .. i always liked to setup my object state in #initialize, i very much rely on that, so i don't need #memoize that often, and with my little classes, i can easily grasp if i'm mutating or not
<snusnu> all the freezing, seems useless oftentimes
<mbj> snusnu: Depends if you need to integrate with 3rd level stuff that ruins your style, without knowing.
<mbj> I need to integrate with rails, that happily mutantes around ;)
<snusnu> poor you
<mbj> so its best to mee to pass in frozen constructs
<snusnu> yeah, that's a different arena
<snusnu> i don't get near rails, at all
<snusnu> never will
<snusnu> (again)
<mbj> snusnu: I said the same ;)
<snusnu> i know lol
<snusnu> but i'm keeping my promise :p
robert_ has joined #rom-rb
<mbj> snusnu: I thought the same ;)
<snusnu> mbj: btw, can morpher be changed to simplify these: v
<snusnu> currently, as soon as there is a merge transformer in a tree, it reports intransitive
<snusnu> but what if an "empty merge" would still report transitive?
<mbj> snusnu: It can be made transitive
<snusnu> yes please, let's do that
<mbj> snusnu: Transitivity can also be instance specific
<snusnu> i had ideas, but forgot them
<mbj> snusnu: So a given transformer might be transitive with children A, but intransitive with children B
<snusnu> yeah, that's exactly what would be needed for this case
<snusnu> and with the guard, it'd be cool if something like s(:guard, true) or s(:guard, []) could be optimized away
<snusnu> i'm not entirely sure about the rules tho
<snusnu> i.e. what kinds of params would lead to the node being removed
<snusnu> true comes to mind, an empty sexp comes to mind, dunno what else might be useful
<snusnu> in any case, not that i forget it, please push the key_{push, pull} .. but even more so, push the custom transformer ;)
<mbj> snusnu: Feel free to push for yourself if you are in the need.
snusnu has quit [Quit: Leaving.]
ptico has joined #rom-rb
CraigBuchek is now known as CraigBuchek|397
cored_ has joined #rom-rb
cored has quit [Ping timeout: 255 seconds]
snusnu has joined #rom-rb
g0bl1n has joined #rom-rb
lgierth has quit [Quit: Ex-Chat]
snusnu has quit [Quit: Leaving.]
snusnu has joined #rom-rb
ptico has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
snusnu has quit [Quit: Leaving.]
snusnu has joined #rom-rb
snusnu has quit [Quit: Leaving.]
snusnu has joined #rom-rb
mbj has quit [Quit: leaving]
snusnu has quit [Quit: Leaving.]
postmodern has joined #rom-rb
bestie has quit [Quit: bestie]
snusnu has joined #rom-rb
snusnu has quit [Quit: Leaving.]
snusnu has joined #rom-rb
bestie has joined #rom-rb
CraigBuchek|397 is now known as CraigBuchek|etl3
snusnu has quit [Quit: Leaving.]
bestie has quit [Quit: bestie]
bestie has joined #rom-rb
lgierth has joined #rom-rb
bestie has quit [Quit: bestie]
bestie has joined #rom-rb
bestie has quit [Client Quit]
cored_ is now known as cored
cored has quit [Changing host]
cored has joined #rom-rb
snusnu has joined #rom-rb
snusnu has quit [Quit: Leaving.]
g0bl1n has quit [Ping timeout: 252 seconds]
CraigBuchek|etl3 is now known as CraigBuchek|397
onewheelskyward has joined #rom-rb
g0bl1n has joined #rom-rb
cored has quit [Ping timeout: 260 seconds]
g0bl1n has quit [Quit: Ex-Chat]
snusnu has joined #rom-rb
snusnu has quit [Quit: Leaving.]