<    April 2017    >
Su Mo Tu We Th Fr Sa  
 2  3  4  5  6  7  8  
 9 10 11 12 13 14 15  
16 17 18 19 20 21 22  
23 24 25 26 27 28 29  
00:21 filterfish joined
03:35 glennpratt joined
03:38 filterfish joined
04:31 glennpratt joined
07:27 ta_ joined
09:59 Bish joined
12:05 nirvdrum joined
12:06 nirvdrum joined
13:31 DSyndrome joined
13:39 glennpratt joined
13:44 DSyndrome joined
14:28 banditron joined
15:55 Bish joined
15:55 <Bish> ahhh .filter! will be removed in sequel5?
15:59 <Bish> i am using that quite heavily i didn't see that comin ;;
16:06 <jeremyevans> Bish: The 4.42.0 release notes mentioned the dataset mutation methods were going away
16:41 <Bish> jeremyevans: yeah, i've read that :( but it makes me sad
16:41 <Bish> why is that?
16:41 <Bish> will there be an alternative or will have to do superlong chains?
16:41 <Bish> or many variables to store them
16:56 <adam12> Bish: I like to just reassign to the same variable - does that not work for you?
16:57 <adam12> I'm happy to see the mutation disappearing - weird things can happen.
16:57 <jeremyevans> Bish: dataset mutation isn't thread safe, and datasets are designed to be thread safe
16:58 <jeremyevans> Bish: Additionally, freezing all datasets enables optimizations and makes Sequel faster
17:09 <Bish> adam12: i really hate lines looking that x = x.something
17:09 <Bish> if ruby had an operator for that.. that'd be great
17:09 <Bish> jeremyevans: ;; i have so many lines in my code doing that
17:09 <adam12> Bish: Ah. Yeah, I don't mind it. Makes it more obvious that I'm changing something.
17:10 <Bish> well, but if you do 20 lines like that
17:10 <Bish> it doesn't look very dry either
17:11 <Bish> dataset mutation isn't thread safe as in, shared datasets? why would anyone do that :D
17:14 <Bish> rip !
17:18 <jeremyevans> Bish: shared datasets is how Sequel is designed, and are used extensively
17:19 <jeremyevans> Bish: You probably don't even realize you are using them extensively :)
17:19 <Bish> well, but those you share are ususally not edited, like the model dataset
17:19 <Bish> am i wrong?
17:20 <jeremyevans> Bish: True, but as there is nothing that prevents them from being mutated (unless you freeze them), it's like leaving a loaded gun around :)
17:20 <Bish> yeah, well :/ i agree sort of
17:20 <jeremyevans> Bish: If you really don't like ds = ds.where, you could try the query extension
17:20 <Bish> but if you ask me, ruby is a loaded gun laying around
17:20 <jeremyevans> Bish: fair enough :)
17:21 <Bish> with all that monkeypatching and metaprogramming
17:21 <Bish> i posted code of your generated methods in ruby a few days ago
17:21 <Bish> and people where like "disgusting", while that is what ruby is about imo
17:22 <Bish> im pretty sure i liked .filter! because it was dangerous, i like to live dangerous
17:22 <jeremyevans> Bish: if you have a lot of similar methods, you could define a bunch of similar methods. But metaprogramming is built into the language (attr_accessor and the like)
17:23 <jeremyevans> Bish: It would be different if filter! was actually faster, but it turns out it is slower
17:23 <jeremyevans> Bish: filter! is implemented in terms of filter, not the other way around
17:24 <Bish> yeah i know it just copies opts if i remember correctly
17:24 <Bish> it's really the beauty of code that bugs me
17:24 <Bish> i get easily confused, and things like x = x.a do their thing to me
17:25 <Bish> i really wonder why none has a operator for that
17:25 <jeremyevans> Bish: Well, like I mentioned, the query extension may provide a nicer looking API for you
17:25 <Bish> i mean the lonely operator isn't exactly prettier than.. for example x.=a
17:25 <Bish> *googles query extension
17:26 <jeremyevans> Bish: http://sequel.jeremyevans.net/rdoc-plugins/classes/Sequel/DatasetQuery.html
17:26 <Bish> oh no, not at all, that's why i love sequel
17:26 <Bish> to not write SQL
17:26 <Bish> this is to close :D
17:27 <adam12> jeremyevans: Can we use if/unless in that block?
17:27 <Bish> and yes i do understand it's the same thing
17:27 <jeremyevans> adam12: Yep, you just need to know it changes the receiver
17:27 <adam12> So I guess we could assign self to something outside of the block?
17:27 <adam12> and then reference that new variable
17:27 <jeremyevans> adam12: correct
17:28 <adam12> Cool
17:29 <Bish> jeremyevans: you would write x = x.y like ~8 lines following each other?
17:32 <jeremyevans> Bish: I would usually use a method chain, unless some of the lines were conditional
17:43 <* Bish> could totally write a mutable to return immutable ones, right?
17:43 <Bish> dataset*
17:45 <jeremyevans> Bish: I'm not sure what you mean
17:45 <Bish> i could write something that acts like a mutable dataset but really is doing x=x.y
17:48 <jeremyevans> Bish: you could probably introduce a proxy object, similar to how the query extension works internally
17:51 tercenya joined
17:51 <Bish> maybe i will, yes
17:53 <Bish> would u suggest a name for that?
17:54 ta_ joined
17:55 <Bish> in case i am going to write it?
17:55 <jeremyevans> Bish: I can't think of a good name currently
17:56 <Bish> gruntmeister3000?
18:41 filterfish_ joined
18:57 glennpratt joined
18:58 glennpratt joined
20:48 kith joined
21:16 glennpratt joined
21:38 glennpratt joined
22:40 claw joined
22:50 claw joined