scouts has quit [Remote host closed the connection]
mbj has joined #rom-rb
plexus_ has joined #rom-rb
mbj has quit [Ping timeout: 240 seconds]
mbj has joined #rom-rb
postmodern has quit [Quit: Leaving]
mbj has quit [Ping timeout: 240 seconds]
plexus_ has quit [Read error: Connection reset by peer]
mbj has joined #rom-rb
plexus_ has joined #rom-rb
skade has joined #rom-rb
kalleth_ is now known as kalleth
<mbj>
solnic: its fascinating to se you having fun on OSS
<solnic>
mbj: fascinating? :)
<mbj>
solnic: heh, yeah that one.
<mbj>
solnic: lame typing here.
<mbj>
solnic: I'm gonna try axiom-ast this evening.
<solnic>
no, not lame, I just don't know what's so fascinating about this from your pov but it's really cool and I'm happy to know that :)
<mbj>
solnic: Actually I think axiom, in the longterm, could be modelled like morpher.
<mbj>
solnic: So having a separate Axiom::Compiler allowing to transform an AST into Axiom::Relation
<solnic>
mbj: yep I can see that
<solnic>
but it's gonna be a huge refactor
<mbj>
solnic: TBH no.
<mbj>
solnic: I think we can do this in small steps
<mbj>
solnic: Each of this step will result in a consistent state.
<solnic>
that's good to know
<solnic>
I'm worried > 2k tests will haunt you down though
<solnic>
we'll see, I hope I'm wrong
<mbj>
solnic: I think we'll just simplify the tests
<mbj>
solnic: With removing some of the logic from Axiom::Relation
<mbj>
Axiom::Relation carries some DSL
<solnic>
in virtus this ended up with rm -r spec/unit :)
<mbj>
This is what I dislike.
<mbj>
So if we remove these, we'll end up in a far narrow "to test code".
<solnic>
oh that's an interesting point
<mbj>
solnic: Morpher Evaluator tests are very less LOC
<mbj>
solnic: Compared to other spec/unit stuff I wrote.
<mbj>
solnic: I think we can archieve the same for axiom.
<solnic>
but isn't Axiom::Relation the actual outter interface? which kinda needs a convenient dsl?
<mbj>
I would like to clean the roles a bit up.
<solnic>
so, what would become the interface?
<mbj>
AST
<mbj>
AST for building relations, Axiom::Relation for quering results.
<solnic>
ah, so no more relation.join(other) and instead s(:relation, s(:join, other))?
<mbj>
s(:join, left, right)
<mbj>
But this will be discussed with dan. A lot.
<mbj>
Its just a random idea.
<mbj>
For now i think Axiom::Relation instances are "too powerful".
<mbj>
To much responsibility from my POV.
<solnic>
yeah man, this makes sense, so using AST to represent the relations, operations etc. and a compiler that would turn that AST into am object that exposes a query interface
<solnic>
IF I'm getting this right, am I?
<mbj>
Seems so
<mbj>
But this is the End stage from my current knowlege.
<solnic>
now THAT is fascinating :)
<mbj>
While doing the transformation we might discover an even better solution.
<solnic>
dude, we will always be finding better solutions
<mbj>
The most interesting part is: We dont have to wrap the gateways inside the RA tree.
<mbj>
This allows to plug in the gateways "late".
<solnic>
that's the beautiful and horrible thing about building software :P
<mbj>
Depends on skill and wisdom.
<solnic>
oh shit, hmm, lemme think about this
<mbj>
If you have a good oversigt and enough wisdom its beautiful.
<mbj>
If you miss one of oversight/wisdom => hell.
<mbj>
solnic: First I'll start with Axiom::Relation#node, and Axiom::Compiler.call(node) # => Axiom::Relation
<mbj>
solnic: In a gem called axiom-ast
<mbj>
solnic: Than I'll talk with Dan if an how we move to an AST as primary representation.
<mbj>
solnic: The most insteresting side effect: Writing adapters becomes FAR easier with having access to #node.
<mbj>
solnic: I'm talking as someone who build most of our adapters ;)
<mbj>
solnic: There are some weak points in "building query via AST", for example current Axiom::Relation can do some sanity checks when building relations.
<mbj>
solnic: s(:something, s(:something_other)) does not do these.l
<mbj>
solnic: So we'll need to duplicate the logic, or centralize it.
<mbj>
solnic: I talked to Dan a lot about the axiom on ast idea, he liked the idea. But all I say here now, is quasi: Out of my current imagination.
<mbj>
So it might be totally wrong.
cored has joined #rom-rb
cored has joined #rom-rb
<solnic>
mbj: so, how gateways would work if we had an AST?
<mbj>
solnic: Instead of the relations wrapping gateway, I'd expect an adapter gets an AST and does his magic, like returning an eunmerable tuple.
<mbj>
solnic: As a transition step and adapter will still have access to a relation, but calls #node to get an AST
<mbj>
solnic: I'd love to move the "gateway consumes a node or not" logic to a centralized point.
<mbj>
solnic: Each adapter would return a state machine that tells weather to push down or not.
<mbj>
solnic: Also I'd like to do this only on reads, not each time a relation gets added.
<mbj>
solnic: Currently the gateway have to decide to push down, or not to push down on each RA operation.
<mbj>
solnic: This also forces us to know all gateways upfront.
<solnic>
gateways wrap relations not the other way around
<solnic>
snusnu: you can't really merge it in, this will break things again
<solnic>
I'm happy to see a refactor that moves rom towards this though
<solnic>
I already introduced morpher
<snusnu>
yeah, obviously that's what i meant
<solnic>
adding wrap/group support will be easy but something I want to do first is to refactor/merge/unify mapping DSL and move some things from mapping DSL to schema definition DSL
<solnic>
just like we discussed
<solnic>
this 2-steps mapping is a good idea (I'm not sure if you remember but we talked about this before you went on holidays)
<snusnu>
yeah, it's the way to go
<solnic>
it fits perfectly, I can see it now
<solnic>
I was always uncertain about coercions and mapping, where it should happen, what should be responsible for that, where it should be configured etc
<snusnu>
i will take a look at what is missing for current rom integration with my stuff, and then i'll port the mapper generation to it
<solnic>
now I clearly see it's just like you said
<snusnu>
my stuff does more, it also generates the entity classes from the definitions, something that is important too imo
<solnic>
lemme take a look at the entities
<snusnu>
it solves the problem of defining stuff in more than one place
<solnic>
that part is new for me
<snusnu>
yeah, i came up with it for our app, we already had the anima definitions of all models, and i would've needed to duplicate those in the mapping definitions
<solnic>
interesting
<snusnu>
so now, i just have the mapping definitions, and generate the anima models from that
<solnic>
I need to step away for just few minutes, let's talk about this in 5-10 minutes ok?
<solnic>
you can write things down here and I'll read it in few minutes
<snusnu>
also, currently, my example code is basically for transient objects only, i.e. the params you send to an app on create/update
<snusnu>
i dunno how long my battery will still last, if i'm not around in a few minutes, i'll post a more detailed description to this channel for you to read in the logs
<snusnu>
so basically, what i currently have, is a functioning mapper that supports wrap/group infinitely and a "type system" based on morpher
<snusnu>
that's the part that fits into rom for sure
<snusnu>
the part where i create the entities and models from those definitions, might need more discussion, as to where it fits in
<snusnu>
however, i'd encourage you to take a closer look at my code, also the integration spec is rather nice imo, gives a good overview
skade has quit [Ping timeout: 240 seconds]
<solnic>
snusnu: let's start with changing mapping/schema DSL and adding wrap/group support first
<solnic>
I'd hold off with adding any model-generator code for now
<snusnu>
yeah, that shouldn't be part of it for now .. i'll see what i can do in the next few days
<solnic>
snusnu: OK I'm gonna merge the PR with morpher now then
<snusnu>
ok?
<solnic>
what?
skade has joined #rom-rb
<snusnu>
sry, the questionmark was by accident :p
<solnic>
lol
<snusnu>
you just go ahead :)
<snusnu>
i'll push my stuff into a branch at some point soonish
<solnic>
snusnu: what's stopping you from going rom-only in your app btw?
plexus_ has quit [Ping timeout: 240 seconds]
<solnic>
sql?
<snusnu>
wdyt?
<snusnu>
inserts
<snusnu>
writes i.e.
<snusnu>
also, i need to reintegrate my new mapper with rom-relation anyway, as i said, currently, i only use it for input mapping
<solnic>
so this will be ready soon
<snusnu>
my app receives json, and i map that into objects using the subway/entity stuff, then pass those through vanguard, and then send it to DM1 to do the writes :/
<solnic>
:)
<snusnu>
the mapper code can obviously also work for persistent objects when reading
<snusnu>
so yeah, it needs integration with rom-relation
<solnic>
btw when are you coming back to Linz?
<snusnu>
i need to switch our complete app to use the subway/entity stuff, and then i'm gonna look at integratiing with rom(relation) for the read sie
<snusnu>
side
<snusnu>
lol, sometime in june
<snusnu>
hehe
<solnic>
oh
<solnic>
so, you're travelling all the time?
<snusnu>
'll be in morocco till end of march, then head on to andalusia, then through portugal to galicia, and then back home
<snusnu>
no, i'm mostly staying in places for at least a month
<snusnu>
first month was travelling around, now i have an appartment rented till end of march
<snusnu>
in andalusia, i'm gonna stay at least for 2 weeks, then go through portugal which will be more travelling, and then get an appartment for a month or so again in galicia
<mbj>
morpher is now master?
<mbj>
nice!
<solnic>
mbj: it's OFFICIAl ;)
<mbj>
haha
<snusnu>
w00t
<mbj>
gonna tweet
<snusnu>
solnic: so, do you want to hold off on more work on the morpher parts? if not, we'd probably be duplicating efforts
<snusnu>
i can merge the mapper parts in by the end of the week i guess
<solnic>
snusnu: I won't have time until weekend
<snusnu>
"awesome" :)
<solnic>
but weekend will be weird - we're going to wroclove.rb conf
<snusnu>
hah nice
<solnic>
so hard to say how much I can work during the conf
<solnic>
so, feel free to grab the rest
<solnic>
I can comment on stuff of course, but won't be able to write any code over the week
<snusnu>
cool, we'll see how much i can do .. i'll be online a few hours each day during this week
<solnic>
still need to finish my presentation
<mbj>
solnic: I'd love to code at conf.
<mbj>
solnic: But I was either sick or busy during confs ;)
<mbj>
So it never worked out ;)
<snusnu>
maybe i can get my stuff into rom master before the conf
<snusnu>
we'll see
<solnic>
snusnu: feel free to push stuff, really
<snusnu>
nice
<solnic>
I'm pretty sure we're on the same page wrt how it should work
<snusnu>
yup, i'm sure about that too
<solnic>
if session specs are passing - you're good :)
<snusnu>
mbj: got time for making s(:merge,…) inversible?
<mbj>
snusnu: not now
<snusnu>
heh ok solnic
<mbj>
snusnu: You can try. All have push access.
<mbj>
snusnu: I'd do that in a PR, but I have time to review.
<snusnu>
i'll see what i can do, i probably have more urgent things to do tho
<snusnu>
alright guys, i'm gonna go offline, maybe i'm online a bit later ..
<snusnu>
bye all
snusnu has quit [Quit: Leaving.]
<solnic>
I'm getting back to work, so bye all as well
<mbj>
solnic: I think we *soon* should explain morpher in a blog post.