<dkubb>
jessekempf: a simpler way to state what zombie does is that it copies mutant to a new namespace, and then runs from that so that it can safely mutate Mutant and it's dependencies. otherwise it could mutate something that it's using, and mess up or crash, etc
<dkubb>
jessekempf: it's kind of like sandboxing mutant so that it can safely run against itself
<dkubb>
one of my pet peeves, and I think this goes for others here, is when a tool doesn't pass with itself. like when a code quality tool is poorly written. mutant was harder to get to this point where it can self-mutate, so there is a bunch of code written without it, but that'll be changing soon
<jessekempf>
dkubb: that's about what I gathered. Good to know I understood it correctly.
<jessekempf>
"Sandbox" is a more understandable term than "Zombie". I'd first thought that Zombification had something to do with the way mutant does mutations and had no idea how that could be from looking at the code.
<dkubb>
I don't know exactly where mbj got the name from
<dkubb>
I think the idea is to eventually make it generic, so you can take any class heirarchy (or hierarchies), and "move" them inside a randomly generated namespace
<dkubb>
I don't know what use it'll be outside of mutant
langitbi1u has quit [Ping timeout: 245 seconds]
langitbiru has joined #rom-rb
knowtheory has quit [Quit: Computer has gone to sleep]
<snusnu>
looks a bit weird, nil::EMPTY seems to be valid, but yeah ....
<snusnu>
bbiab
<dkubb>
snusnu: I think you could probably change that to just EMPTY and it would continue to work
<cored>
dkubb: I saw some hilights on the WIP for the refactoring inside axiom
<dkubb>
cored: oh which one?
<cored>
dkubb: do you hae a table for the performance numbers or something, you said now is slower
<cored>
maybe I'm confuse let me check
<dkubb>
cored: I think I may have been mistaken
<cored>
I think I'm the one mistaken
<cored>
Axiom::Relation
<cored>
Change materialized relations to be mutable
<dkubb>
although I do think there's one further thing to do with type inference.. right now we use *all* the Axiom::Types::Type subclasses, when we really should be using the "primitive" named types only
therabidbanana has joined #rom-rb
<cored>
but isn't the use of those types happening because of checking for the type inside axiom ?
<dkubb>
what I was thinking about doing was having a Types::Type.base_types method (or something, I don't know a good name) that would only return the built-in type subclasses, not the constrained ones
<cored>
I have to try to check axiom everything for this
<cored>
because I'm losing context
<dkubb>
ahh ok
<dkubb>
cored: is it a bit overwhelming?
<cored>
I will check axiom today for sure to keepworking on this
knowtheory has quit [Ping timeout: 264 seconds]
<cored>
in fact is kinda fun
<cored>
:-)
<dkubb>
hehe
<dkubb>
what I normally do in these cases, is I go through the comments in a PR and the ones I can bang out right away I just take care of them
<cored>
will follow that advise
<dkubb>
github will remove comments on changed code, so the only thing left will be the bigger ones
<dkubb>
then I just go through and pick the ones that I understand and leave the harder ones until later
<cored>
interesting approach
<dkubb>
there's no point in getting hung up on something
<dkubb>
momentum is probably the most important things in my oss work. if I get stuck then everything stops
<dkubb>
sometimes my brain keeps working on the problem and by the time I get to it, I know how to solve it
<dkubb>
or at least there's less noise to deal with so I can focus on just the one thing
<cored>
yes, I also want to keep learning about rom ecosystem and try to contribute on others part too
<dkubb>
I'm going to be working on another PR in axiom today, the one to make materialized relations mutable
<dkubb>
one tip I might offer for the types refactor PR, see the one above and how I used the todo list? I find that really useful in breaking down what needs to be done
<cored>
that's the one I got a notification and got confuse
<cored>
I think there's where you mention that there is a performance problem
<cored>
yes
<cored>
I saw that, quite cool
<dkubb>
if you want I could start one for the types refactoring
<dkubb>
so at least it's clear what still needs to be done
<dkubb>
cored: part of this process is to offload as much as possible to the types, which most of these points move us towards
<dkubb>
I knew that during this conversion process we'd discover a few blind spots in axiom-types, which is fine
<dkubb>
I suspect we'll see the same thing when we update virtus to use it too
<dkubb>
this always happens when you extract and generalize something from another lib. when you go back to integrate it with the lib you notice some things you missed, or things you didn't think about
<cored>
dkubb: great
<dkubb>
also the previously tighter coupling hides things that become obvious when you integrate the two (now) loosely coupled parts
<cored>
I will start checking the entire list this afternoon
<dkubb>
cored: feel free to add/remove/edit anything in the list. it's not meant to be a static list.. I can miss things or be wrong ;)
<dkubb>
mbj: I think that and/or mutator is ready for review whenever you get a chance
<mbj>
dkubb: already merged it :D
<dkubb>
oh sweet
<dkubb>
been working on axiom-optimizer this morning so I hadn't looked
<dkubb>
I'm making the changes to get it ready for a mutable materialized relation, and I started to clean it up first
<dkubb>
upgrade the deps, make it run with warnings and the new rspec, fix rubocop warnings, etc
<dkubb>
I run rubocop against the specs even, so that generates a lot of output
<postmodern>
mbj, so what do you use instead of mime-types?
<postmodern>
mbj, im working on some ugly code that extracts and caches assets, but i need to determine the file extension, so i can serve them back up with the correct Content-Type
<dkubb>
postmodern: I use filemagic to identify the type of file by it's contents, then use that to get the mime type
<mbj>
I only improved the sharpness of the api, my stuff is not really comparable to mime-types.
<postmodern>
dkubb, unfortunately that fails for packed CSS/js
<dkubb>
ahh I see
<dkubb>
postmodern: if it fails you could always fallback to extension sniffing
<postmodern>
well most of these assets are on CDNs and have no extensions
<dkubb>
ahh
<postmodern>
plus i found out mime-types thinks text/javascript doesn't need a file extension
<dkubb>
does it handle application/javascript?
<postmodern>
dkubb, it does
jessekempf has joined #rom-rb
<postmodern>
dkubb, i suspect they favored app/js so they could map .js -> app/js
<postmodern>
dkubb, and ignored text/js since it's technically obsolete
<postmodern>
but used everywhere
<postmodern>
also interesting that browsers technically don't check the Content-Type for script tags
<postmodern>
they do enforce it for stylesheets though
<Gibheer>
postmodern: what is padrino using for mime type detection?
<postmodern>
Gibheer, i think it just lets sinatra serve up the public dir
<postmodern>
Gibheer, which i believe does: content_type mime_type(file)
<Gibheer>
hmmm
<mbj>
postmodern: To put my tweet into a context, I just dont use any real mime type solution. Only some optionated bunch of classes.
<Gibheer>
have to find out the mime type in zero too, thats why I'm asking
<mbj>
postmodern: But rubies mime-types was just confusing once I tried to use it :D
<postmodern>
mbj, ugh it's a mess to
<postmodern>
mbj, all the types are loaded from text files, which are scrapped from IANA/RFC websites
<postmodern>
mbj, the text files are in lib/ too boot
<postmodern>
mbj, i'll probably setup a hash like your custom type set
therabidbanana has quit [Quit: leaving]
therabidbanana has joined #rom-rb
solnic has joined #rom-rb
<solnic>
kapowaz: just use ruby-install
<solnic>
works for me
<dkubb>
I think apache has a standard, easily parsable list you could use
<kapowaz>
solnic: that's what I was using and it was failing…
<kapowaz>
probably broken setup on the machine in question (it's an iMac provided for me at my current gig, and somebody installed homebrew badly on it)
<dkubb>
use virtus to make a class that represents a mime type, and then use the apache list to populate a list of frozen mime types
<dkubb>
but I would tend to want to vendor the raw mime.types file
<postmodern>
dkubb, good find
<dkubb>
so that if/when apache changes there I can just update the file
<Gibheer>
yeah
<dkubb>
if you parse it once at require time, and then store the mime types in a global frozen array the cost will be minimal
<dkubb>
or you could index it using a Hash
<Gibheer>
will try that tomorrow
<Gibheer>
my json stuff gets delivered with text/html :/
<dkubb>
oh yeah, that'd be a problem
<dkubb>
well, not if you control the client, but the whole reason to deliver stuff via http is so that you don't have to control the client
<Gibheer>
right
<jessekempf>
dkubb: PR 74's ready for you to look at again
<dkubb>
jessekempf: hehe, it looks good to me, I was going to ask mbj about it
<jessekempf>
dkubb: Heh. We try to avoid K#kind_of? as much as possible here, but Mutant isn't one of my team's projects, so yeah.
<dkubb>
jessekempf: I see kind_of?, is_a? and === (what case uses) all pretty much the same thing
<dkubb>
jessekempf: what I would love to see is subclasses of the rspec runner for the different cases so we can eliminate that conditional
<jessekempf>
dkubb: or make the Mutant::Killer be parameterized by a simple suite runner, and require that the suite runner trap the output of the test suite. The output policy could then be put in one place.
cored has quit [Ping timeout: 268 seconds]
mbj has quit [Ping timeout: 240 seconds]
<dkubb>
ahh yeah
cored has joined #rom-rb
jessekempf1 has joined #rom-rb
jessekempf has quit [Read error: Connection reset by peer]
<cored>
dkubb: are you around?
<cored>
there a dependency mismatch between axiom-type
<cored>
and rubocop
<cored>
backports
travis-ci has joined #rom-rb
<travis-ci>
[travis-ci] dkubb/axiom#121 (mutable-materialized-relations - 3c41d9b : Dan Kubb): The build has errored.