SuperLag has quit [Read error: Connection reset by peer]
SuperLag has joined #ruby
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blood has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
blood has quit [Client Quit]
Nicmavr has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
duderonomy has joined #ruby
fluxAeon has quit [Ping timeout: 252 seconds]
duderonomy has quit [Ping timeout: 268 seconds]
Lytol has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
rgiscard has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
elphe has joined #ruby
jottr has joined #ruby
tpendragon has quit [Remote host closed the connection]
duderonomy has joined #ruby
ur5us has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 244 seconds]
reber has joined #ruby
rgiscard has quit [Quit: Bye.]
dar123 has joined #ruby
dellavg_ has joined #ruby
tpendragon has joined #ruby
savolla has joined #ruby
sagax has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
sauvin has joined #ruby
marz_d`ghostman has joined #ruby
<marz_d`ghostman>
I have Sync = Rise::MirrorManager::Sync; Rspec.describe Sync do . . . and rubocop is saying that the Rspec.describe line is too long. It's just like 22 characters though. How do I rectify it?
tdy1 has joined #ruby
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
tdy has quit [Ping timeout: 246 seconds]
dbz has quit [Ping timeout: 240 seconds]
duderonomy has quit [Ping timeout: 252 seconds]
P1RATEZ has quit []
wasanzy has quit [Ping timeout: 256 seconds]
clemens3 has joined #ruby
troys has quit [Ping timeout: 244 seconds]
doubledup has joined #ruby
tdy1 is now known as tdy
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doubledup has quit [Quit: Leaving]
apeiros has quit [Remote host closed the connection]
elphe has quit [Ping timeout: 240 seconds]
dar123 has quit [Read error: Connection reset by peer]
dar123 has joined #ruby
jottr has joined #ruby
savolla has quit [Ping timeout: 252 seconds]
stoffus has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elphe has joined #ruby
connor_goodwolf has quit [Ping timeout: 252 seconds]
<JJonah>
al2o3-cr: thanks, but the original is shorter and more declarative than that version. i should have been clearer in that i was asking if i'd missed a built-in method that achieve the result directly.
<havenwood>
JJonah: Just a nit, but: transform_values(&:size)
<apeiros_>
:D
* apeiros_
pondered saying that too
apeiros_ is now known as apeiros
<JJonah>
havenwood: right, ty
<JJonah>
nits always welcome
<apeiros>
wasn't there a count_by/sum_by or similar method supposed to end in Enumerable? did it get axed or is that for a future version?
<havenwood>
apeiros: I think it got held up by naming concerns.
<apeiros>
#histogram would also be a nice name for it.
<JJonah>
apeiros: that's what i thought and i why i asked... but i don't see it....
<havenwood>
I was talking about it with David, the last commenter on that issue - and he liked "Tally"
<apeiros>
also I wish ruby doc system had a way to do doc-only aliases and then we'd drop a shitload of aliases (can still have a shim require to add them back in for backwards compat)
<havenwood>
apeiros: agreed - it gets confusing which are pure aliases and which have slight differences
<havenwood>
I do actually kinda like: tally(&:itself)
<havenwood>
histogram(&:itself)
<havenwood>
either way!
<apeiros>
imo histogram(&:itself) --> histogram()
<havenwood>
mm
elphe has joined #ruby
<apeiros>
or am I missing something?
<apeiros>
(entirely possible, I'm on the verge of losing my sanity over some work here…)
<JJonah>
havenwood: histogram > tally imo because it suggests there is a count for each element in a way Tally sort of does but not necessarily. the problem with histogram is that it suggests the visual representation of the data rather than the data itself which is what this is. also, since group_by already exists as well as some other "_by" methods i think "count_by" might be a winner for consistency reasons. even though histogram is
<JJonah>
slightly more suggestive.
<havenwood>
apeiros: some were suggesting #histogram and #histogram_by, but I guess i could see them combined with a blockless variant
<havenwood>
dunno!
<apeiros>
well, I'll wait patiently and hope they find a way. while I prefer histogram/_by, tally is fine by me too.
<havenwood>
tally and tally_ho
ascarter has joined #ruby
ascarter_ has quit [Ping timeout: 260 seconds]
gnufied has joined #ruby
jlebrech has joined #ruby
<jlebrech>
is there a http client that can cache it's requests? or how to use a separate cache with one?
<havenwood>
jlebrech: Mechanize and Typhoeus can and it's a work-in-progress for HTTP.rb.
<skwurl>
anyone working on any interesting ruby projects?
yokel has quit [Ping timeout: 252 seconds]
yokel has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DTZUZO has joined #ruby
wolfshappen has quit [Ping timeout: 245 seconds]
Lytol has joined #ruby
<JJonah>
Metaprogramming question. Consider this (it works): https://hastebin.com/inurepozin.rb. Is there any way I can get this same effect but without having to place the `extend` at the bottom of the class def? Basically what I want is for the extend to "execute" only after the final `end` of the class, no matter where it is. Pretty sure this isn't possible but figured I'd ask.
bkxd has joined #ruby
wolfshappen has joined #ruby
marz_d`ghostman has quit [Quit: Page closed]
roshanavand has quit [Quit: Lost terminal]
dmitch has joined #ruby
DTZUZO has quit [Ping timeout: 268 seconds]
fredlinhares has joined #ruby
skwurl has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
<havenwood>
JJonah: Use `prepend` instead of `extend`.
<JJonah>
havenwood: that didn't work. note the calling is actually altering the existing methods to make them memoized...
<havenwood>
JJonah: ah, you're trying to avoid the #memoize method then?
<JJonah>
havenwood: not per se, i'm trying to avoid repeating in unnecessarily in the context of an immutable value object, where i know it's safe to memoize every single method. the example i posted is perhaps confusing in that it has only a single method, but that was just to illustrate...
<JJonah>
so i want an wasy way to mark an entire class as memoizable. my initial post achieves that but at the cost of breaking the ruby style guide convention of "extend goes at the top"
<JJonah>
it also makes it easier to miss if you're casually scanning the source
blackmes1 has quit [Ping timeout: 240 seconds]
DoubleMalt has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
nowhere_man has joined #ruby
knight33 has joined #ruby
knight33 has quit [Max SendQ exceeded]
dbugger_ has joined #ruby
mikecmpbll has joined #ruby
blackmes1 has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]
<havenwood>
JJonah: I'll show you how to do it if you solemnly swear you are up to no good...
<al2o3-cr>
havenwood: that was the only other option i could see also.
<havenwood>
JJonah: You can't wait until a class closes to run your #extended or #included unless you use some tricks like TracePoint.
<havenwood>
al2o3-cr: Aye, I can't think of anything less obtuse.
lomex has joined #ruby
lomex has quit [Client Quit]
<al2o3-cr>
i can't think of anything else, that is what i had in mind.
Cthulu201 has quit [Read error: Connection reset by peer]
Cthulu201 has joined #ruby
wasanzy has quit [Ping timeout: 256 seconds]
gnufied has quit [Ping timeout: 244 seconds]
discopatrick has quit [Quit: Connection closed for inactivity]
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #ruby
greengriminal has quit [Client Quit]
greengriminal has joined #ruby
arup_r has joined #ruby
dmitch has quit [Ping timeout: 244 seconds]
gnufied has joined #ruby
fluxAeon has joined #ruby
wildermind has quit [Quit: Connection closed for inactivity]
bmurt has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
<JJonah>
havenwood: that is devilishly brilliant. but i can't in good conscious use that in production code, right?
cajone has joined #ruby
cajone has left #ruby [#ruby]
maryo has joined #ruby
<maryo>
I wanted to install latest stable version of ruby in a linux box (CentOS). What is the recommended way to install ruby? and should it be installed as a root user?
a_ has joined #ruby
venmx has quit [Ping timeout: 250 seconds]
arup_r has quit []
<a_>
can someone help me understand why I need ['results'