havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.0, 2.6.5, 2.5.7: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
lucasb has quit [Quit: Connection closed for inactivity]
mwlang has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
davidw has quit [Ping timeout: 272 seconds]
canton7 has quit [Quit: ZNC - http://znc.in]
canton7 has joined #ruby
sameerynho has quit [Ping timeout: 272 seconds]
TCZ has quit [Quit: Bye Bye]
ur5us has joined #ruby
anveo has joined #ruby
davidw has joined #ruby
jmcgnh has quit [Ping timeout: 260 seconds]
jmcgnh has joined #ruby
sergioro has quit [Quit: leaving]
sergioro has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
turbo_choo has joined #ruby
teclator has quit [Ping timeout: 268 seconds]
davidw has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 272 seconds]
phenom has quit [Ping timeout: 260 seconds]
phenom has joined #ruby
Guest81289 has joined #ruby
Guest81289 has quit [Client Quit]
turbo_choo has quit [Ping timeout: 260 seconds]
turbo_choo has joined #ruby
Guest81289 has joined #ruby
Guest81289 has quit [Client Quit]
Guest81289 has joined #ruby
turbo_choo has quit [Ping timeout: 272 seconds]
Guest81289 has quit [Client Quit]
Elundia has joined #ruby
Elundia has quit [Client Quit]
Elundia has joined #ruby
turbo_choo has joined #ruby
Elundia has quit [Client Quit]
Elundia has joined #ruby
Elundia has quit [Client Quit]
wildtrees has quit [Quit: Leaving]
phenom has quit [Quit: See ya! Wouldn't want to blah blah..]
Elundia has joined #ruby
gix has quit [Ping timeout: 260 seconds]
orbyt_ has joined #ruby
phenom has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
bluetown has quit [Remote host closed the connection]
zlogan has quit [Read error: Connection reset by peer]
zlogan2003 has joined #ruby
Elundia has quit [Quit: Going offline, see ya! (www.adiirc.com)]
mwlang has quit [Quit: mwlang]
bluetown has joined #ruby
lineus has quit [Ping timeout: 240 seconds]
normanrockwell has joined #ruby
normanrockwell has quit [Quit: Leaving...]
lineus has joined #ruby
anveo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bruce_lee has quit [Ping timeout: 268 seconds]
bruce_lee has joined #ruby
jaequery has quit [Remote host closed the connection]
jaequery has joined #ruby
chalkmon1 has joined #ruby
bruce_lee has quit [Ping timeout: 240 seconds]
bruce_lee has joined #ruby
chalkmonster has quit [Ping timeout: 272 seconds]
jaequery has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 260 seconds]
Elundia has joined #ruby
teclator has joined #ruby
<gitter1234> GooOoOooOooood morning!
AMHOL has joined #ruby
ur5us has joined #ruby
chalkmonster has joined #ruby
chalkmon1 has quit [Ping timeout: 240 seconds]
Elundia has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<gitter1234> chalkmonster :)
Elundia has joined #ruby
Elundia has quit [Excess Flood]
Elundia has joined #ruby
Elundia has quit [Excess Flood]
Elundia has joined #ruby
Elundia has quit [Excess Flood]
Elundia has joined #ruby
Elundia has quit [Excess Flood]
Elundia has joined #ruby
Elundia has quit [Excess Flood]
NODE has quit [Excess Flood]
NODE has joined #ruby
adamparsons has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
<adamparsons> Hello there, I'm not sure who maintains ruby-lang.org, but just thought I'd give an FYI that the DNS server for cache.ruby-lang.org is SERVFAIL'ing to requests from cloudflares 1.1.1.1 public dns
<adamparsons> my builds were failing and I thought I was going insane
Rob__ has quit [Ping timeout: 268 seconds]
<adam12> adamparsons: Is it still? Works fine here, unless I'm missing something.
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
regedit has joined #ruby
adamparsons has quit [Remote host closed the connection]
<gitter1234> greetings adam12! :-)
sgen has quit [Ping timeout: 260 seconds]
zlogan2003 has quit [Ping timeout: 272 seconds]
im0nde_ has joined #ruby
im0nde has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
_whitelogger has joined #ruby
AJA4350 has quit [Quit: AJA4350]
rainmanjam has quit []
gnufr33d0m has quit [Quit: gnufr33d0m]
gnufr33d0m has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
GodFather has quit [Read error: Connection reset by peer]
GodFather has joined #ruby
<havenwood> &>> 'GooOoOooOooood morning!'.squeeze.partition('OoOoO').then { "#{_1}#{_3}" }
<rubydoc> # => "Good morning!" (https://carc.in/#/r/8ebe)
greenhat has quit [Ping timeout: 265 seconds]
<wmoxam> cd /home/wmoxam/projects/crowdmark-api
ur5us has quit [Ping timeout: 260 seconds]
AMHOL has quit [Quit: Ping timeout (120 seconds)]
rainmanjam has joined #ruby
<gitter1234> havenwood: lol
cthu| has quit [Ping timeout: 240 seconds]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
Swyper has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe_ has joined #ruby
fphilipe_ has quit [Ping timeout: 272 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
brool has quit [Ping timeout: 268 seconds]
gnufr33d0m has quit [Quit: gnufr33d0m]
s2013 has quit [Quit: Textual IRC Client: www.textualapp.com]
greenhat has joined #ruby
brool has joined #ruby
schne1der has joined #ruby
bsdbandit-01 has joined #ruby
Swyper has joined #ruby
sauvin has joined #ruby
Swyper has quit [Ping timeout: 265 seconds]
xco has joined #ruby
xco has quit [Client Quit]
andikr has joined #ruby
s3nd1v0g1us has quit [Quit: WeeChat 2.6]
TomyWork has joined #ruby
mossplix has joined #ruby
schne1der has quit [Ping timeout: 258 seconds]
<Cork> is there a better way to group method names inside a class then having a subclass one initialize in a method and export all local varialbes to it for the subspace?
<Cork> feels way to unoptimal...
NODE has quit [Excess Flood]
NODE has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
<havenwood> Cork: I don't understand the question. Do you have an example of what you're talking about implemented as code that you can share?
<Cork> havenwood: just a framework for now but https://paste.debian.net/plain/1126060
<Cork> it is meant to get more sub groups later
<Cork> but all of them are going to work with @shell
<Cork> and class is the only way i can figure to get instance.website.create instance.user.update
<Cork> but it feels silly...
<havenwood> Cork: In #website, I'd suggest using ||=, like: @website ||= Website.new(@shell)
* Cork nods
<Cork> but it isn't really the core of the question
<Cork> can i group method names without instanciating classes for each level?
<havenwood> I'm still trying to understand the primary question.
duderonomy has joined #ruby
<Cork> i won't have local variables for the child classes, so they don't provide anything
<Cork> if i didn't need the main class i would just use function modules
xco has joined #ruby
<Cork> i guess i could replace the dot with _ and make the grouping part of the method names, but that is quite messy too
greenhat has quit [Ping timeout: 260 seconds]
<havenwood> Cork: Does each instance of IIS have a single instance of Website?
<Cork> no
<Cork> it is just a set of methods for actions on the iis server
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> Cork: How about a Website module that you include IIS?
<havenwood> include in*
<Cork> sure, but won't that just put its methods directly inside the iis instance?
<havenwood> Cork: You want to chain them through .website?
<Cork> i want some form of grouping, don't really care what
<Cork> except i don't want to repeate the seperation name in every method name
<havenwood> Cork: Grouping around what? There's a single #website method in this example with no arguments. What are you grouping?
<havenwood> I don't quite follow.
<Cork> havenwood: as i said at the start, this is just a start of it, there are going to be more modules later, and some names are going to be the same for each group
<Cork> i'm at "how am i goung to structure this" stage right now :)
mossplix has quit [Remote host closed the connection]
<havenwood> Lacking any context on what you're doing, that makes no sense to me.
<Cork> the question is quite straight forward can one do something similar to module Mod1; module Mod2; module_function; def a: end; end; end; Mod1::Mod2::a
<Cork> inside a class
<havenwood> Maybe that's straight forward to someone else who can answer?
mossplix has joined #ruby
<havenwood> Cork: How do you want to use your IIS class? Maybe show the interface you're targeting. I know you're saying your request is straightforward but it eludes me.
<havenwood> Cork: You're showing a module nested in another module with a class method and asking how to do that in a class? Alone, that would be straightforward, but what does it have to do with the IIS class you've shown?
<havenwood> &>> class Class1; class Class2; def self.a; 42 end; end; end; Class1::Class2.a # Cork
<rubydoc> # => 42 (https://carc.in/#/r/8ebg)
alexherbo2 has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
alex`` has quit [Ping timeout: 265 seconds]
<havenwood> Cork: That's ^ the straightforward answer, but I can't imagine that's what you're looking for? If so, I'd question the pattern.
<havenwood> Cork: Are you saying you have a bunch of #website-esque methods with corresponding Website-esque classes and you want to be able to chain them but find this pattern cumbersome in bulk?
Swyper has joined #ruby
<havenwood> It's hard to advise on an abstraction without seeing the variance between them, if any. (Assuming this is on the right track?)
jenrzzz has joined #ruby
donofrio has quit [Read error: Connection reset by peer]
ur5us has quit [Ping timeout: 260 seconds]
donofrio has joined #ruby
<havenwood> Cork: My other total-aside suggestion would be to use #dig: $cofig.dig(:winrm, :user)
<havenwood> Cork: If each Website-style class varies broadly, and might be instantiated differently, and you want to method chain for an interface (which can be very nice). then this particular pattern seems totally appropriate.
Swyper has quit [Ping timeout: 265 seconds]
<Cork> havenwood: server1 = IIS.new(host: "server1"); server2 = IIS.new(host: "server2"); server1.website.method1; server1.website.method2
<Cork> to give a short example
jenrzzz has quit [Ping timeout: 272 seconds]
<havenwood> Cork: Ah, thanks. I understand.
<Cork> if i didn't need the host value i would just do IIS::Website::method1 there
<havenwood> gotcha, if it was a pure function, but it depends on an instance value on the receiver
<Cork> one instance that is the powershell at the specified server ya
Swyper has joined #ruby
<havenwood> Cork: Does Website have any other internal state other than that instance variable?
<Cork> nope
<Cork> all state is in the iis class, and the rest could just go away if i found a better way to group the method names
Buggys has quit [Ping timeout: 248 seconds]
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
Buggys has joined #ruby
schne1der has joined #ruby
Swyper has quit [Remote host closed the connection]
regedit has quit [Quit: Connection closed for inactivity]
mossplix has quit [Remote host closed the connection]
brool has quit [Ping timeout: 272 seconds]
sergioro has quit [Quit: leaving]
suukim has joined #ruby
william1_ has joined #ruby
fphilipe_ has joined #ruby
ur5us has joined #ruby
william1_ has quit [Ping timeout: 240 seconds]
fphilipe_ has quit [Ping timeout: 265 seconds]
<Cork> havenwood: am i missing something or isn't that basically the same as old one?
infinityfye has joined #ruby
mossplix has joined #ruby
<havenwood> Cork: it's the same as the old one, but with metaprogramming away repetition of defining the repeated helpers and passing self for extensibility if there are ever new methods that use other interface.
* Cork nods
<havenwood> Cork: Just meant to suggest ideas. Your basic pattern is right if you want the method chaining interface. There are other ways to implement it but nothing wrong with straightforward.
cd has quit [Quit: cd]
<Cork> havenwood: ya, just felt silly to instance a class for a namespace :/
<Cork> *method namespace
<havenwood> Cork: Yeah, fair. I agree. Then again, it makes a nice-looking interface.
<Cork> true, just wished there was a cleaner way to do it in the language
factormystic has quit [Ping timeout: 260 seconds]
factormystic has joined #ruby
TCZ has joined #ruby
TomyWork has quit [Remote host closed the connection]
Fraeon has joined #ruby
TomyWork has joined #ruby
erts has joined #ruby
NL3limin4t0r_ark is now known as NL3limin4t0r
mossplix has quit [Remote host closed the connection]
shaman42 has quit [Ping timeout: 268 seconds]
shaman42 has joined #ruby
zlogan has joined #ruby
erts has quit [Quit: .]
gitter1234 has quit [Quit: Connection closed for inactivity]
TCZ has quit [Quit: Bye Bye]
mossplix has joined #ruby
mossplix has quit [Read error: Connection reset by peer]
mossplix_ has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
Jonopoly has joined #ruby
william1 has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
dviola has joined #ruby
TCZ has joined #ruby
mossplix_ has quit [Remote host closed the connection]
bruce_lee has quit [Ping timeout: 272 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
vondruch has joined #ruby
dionysus69 has joined #ruby
fphilipe_ has joined #ruby
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
johnny56 has quit [Ping timeout: 240 seconds]
johnny56 has joined #ruby
bsdbandit-01 has joined #ruby
william1_ has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
MrCrackPot has quit [Remote host closed the connection]
andikr has quit [Ping timeout: 260 seconds]
andikr has joined #ruby
fphilipe_ has quit [Ping timeout: 240 seconds]
teclator has joined #ruby
MrCrackPot has joined #ruby
fphilipe_ has joined #ruby
fphilipe_ has quit [Ping timeout: 272 seconds]
andikr has quit [Ping timeout: 265 seconds]
mossplix has joined #ruby
pwnd_nsfw has joined #ruby
phaul has joined #ruby
infinityfye has quit [Ping timeout: 260 seconds]
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
infinityfye has joined #ruby
emilych has joined #ruby
<emilych> Hi, does someone use sunspot-solr gem? I installed solr on ubuntu linux /opt/solr/ . do I have to configure the path in sunspot.yml "path: /opt/solr" or "path: /opt/solr/server" ? And how can I test the connection?
<emilych> solr is running fine and i can access the solr admin panel in browser
mossplix has quit [Ping timeout: 272 seconds]
conta has joined #ruby
Ai9zO5AP has quit [Ping timeout: 272 seconds]
mossplix has joined #ruby
conta has quit [Quit: conta]
ellcs has joined #ruby
jenrzzz has joined #ruby
gnufr33d0m has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
bsdband16 has joined #ruby
bsdbandit-01 has quit [Ping timeout: 272 seconds]
mossplix has quit [Remote host closed the connection]
infinityfye has quit [Ping timeout: 265 seconds]
Mia has joined #ruby
Mia has joined #ruby
jenrzzz has joined #ruby
wald0 has joined #ruby
Axy has quit [Ping timeout: 265 seconds]
mossplix has joined #ruby
Ai9zO5AP has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 265 seconds]
wald0 has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
AJA4350 has joined #ruby
wald0 has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
juvenal has joined #ruby
wald0 has joined #ruby
dviola has quit [Quit: WeeChat 2.7]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
mossplix has quit [Remote host closed the connection]
NODE has quit [Excess Flood]
NODE has joined #ruby
andikr has joined #ruby
Ai9zO5AP has quit [Ping timeout: 265 seconds]
wald0 has quit [Read error: Connection reset by peer]
NODE has quit [Excess Flood]
Emmanuel_Chanel has quit [Ping timeout: 265 seconds]
mossplix has joined #ruby
NODE has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
sameerynho has joined #ruby
wald0 has joined #ruby
tvw has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
william1_ has quit [Ping timeout: 240 seconds]
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
greengriminal has joined #ruby
vondruch has quit [Quit: vondruch]
wald0 has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
Ai9zO5AP has joined #ruby
wald0 has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
TCZ has quit [Quit: Bye Bye]
mossplix has quit [Read error: Connection reset by peer]
mossplix_ has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
fphilipe_ has joined #ruby
xco has joined #ruby
markopasha has joined #ruby
sameerynho has quit [Ping timeout: 240 seconds]
xco has quit [Client Quit]
akemhp has quit [Ping timeout: 268 seconds]
wald0 has joined #ruby
Emmanuel_Chanel has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
akemhp has joined #ruby
fphilipe_ has quit [Ping timeout: 272 seconds]
xco has joined #ruby
mwlang has joined #ruby
wald0 has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
phaul has quit [Ping timeout: 260 seconds]
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
mossplix_ has quit [Remote host closed the connection]
wald0 has joined #ruby
mossplix has joined #ruby
infinityfye has joined #ruby
anveo has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
conta1 has joined #ruby
Ai9zO5AP has quit [Ping timeout: 272 seconds]
chihhsin_ has quit [Ping timeout: 258 seconds]
wald0 has quit [Read error: Connection reset by peer]
chihhsin has joined #ruby
wald0 has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
ellcs has quit [Ping timeout: 245 seconds]
phaul has joined #ruby
conta1 has quit [Ping timeout: 258 seconds]
xco has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
bsdband16 has quit [Ping timeout: 260 seconds]
bsdbandit-01 has joined #ruby
fig-le-deunch has joined #ruby
sgen has joined #ruby
Ai9zO5AP has joined #ruby
mwlang has quit [Quit: mwlang]
pwnd_nsfw` has joined #ruby
pwnd_nsfw has quit [Ping timeout: 260 seconds]
andikr has quit [Remote host closed the connection]
Pillus has quit []
Pillus has joined #ruby
fig-le-deunch has quit [Quit: Konversation terminated!]
jenrzzz has joined #ruby
TCZ has joined #ruby
william1 has quit [Ping timeout: 265 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
alexherbo2 has joined #ruby
alex`` has joined #ruby
bsdband62 has joined #ruby
bsdbandit-01 has quit [Ping timeout: 258 seconds]
tau has joined #ruby
mossplix has quit [Read error: Connection reset by peer]
mossplix has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
al2o3-cr has joined #ruby
hahuang65 has quit []
hahuang65 has joined #ruby
mwlang has joined #ruby
bsdbandit-01 has joined #ruby
bsdband62 has quit [Ping timeout: 272 seconds]
gnufr33d0m has quit [Quit: gnufr33d0m]
greenhat has joined #ruby
iamdevnul has quit []
wald0 has quit [Read error: Connection reset by peer]
iamdevnul has joined #ruby
wald0 has joined #ruby
s3bi has joined #ruby
lucasb has joined #ruby
fphilipe_ has joined #ruby
william1 has joined #ruby
schne1der has quit [Ping timeout: 265 seconds]
greenhat has quit [Ping timeout: 260 seconds]
yokel has quit [Ping timeout: 260 seconds]
markopasha has quit [Remote host closed the connection]
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
yokel has joined #ruby
markopasha has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
jetpack_joe has quit []
jetpack_joe has joined #ruby
mwlang has quit [Quit: mwlang]
wald0 has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.7]
conta1 has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
Xiti` has joined #ruby
Xiti has quit [Ping timeout: 268 seconds]
wald0 has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
wald0 has quit [Read error: Connection reset by peer]
s3bi has quit [Remote host closed the connection]
fphilipe_ has quit [Ping timeout: 260 seconds]
wald0 has joined #ruby
vondruch_ has joined #ruby
wald0 has quit [Client Quit]
vondruch has quit [Ping timeout: 260 seconds]
vondruch_ is now known as vondruch
schne1der has joined #ruby
conta1 has quit [Ping timeout: 265 seconds]
chalkmonster has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has joined #ruby
SeepingN has joined #ruby
greengriminal has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
infinityfye has quit [Ping timeout: 260 seconds]
rahult has joined #ruby
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
TCZ has quit [Quit: Bye Bye]
tvw has quit []
xco has joined #ruby
xco has quit [Client Quit]
mossplix has quit [Remote host closed the connection]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
gitter1234 has joined #ruby
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
<gitter1234> Howdy peeps! Working on my first blog here and am stuck at editing comments; when I click the Edit link for say the third or fourth comment, the body text on the page is always from the first comment. Any chance anybody here has time to have a look? https://gist.github.com/1234dev/8f5f9e470bd2f0b2dbad840d1e879e5b
xco has joined #ruby
xco has quit [Client Quit]
mossplix has joined #ruby
xco has joined #ruby
xco has quit [Client Quit]
emilych has quit [Remote host closed the connection]
xco has joined #ruby
xco has quit [Client Quit]
<gitter1234> nevermind i think i solved it.. faulty controller code
xco has joined #ruby
xco has quit [Client Quit]
tau has quit [Remote host closed the connection]
xco has joined #ruby
<adam12> gitter1234: You're @comment = Comment.find(params[:post_id]) is likely wrong.
xco has quit [Client Quit]
<gitter1234> adam12: lol daamn you're good!
xco has joined #ruby
xco has quit [Client Quit]
<adam12> gitter1234: You'd want to specify that you're looking for post_id on comments. Comment.find(post_id: params[:post_id]) or Comment.where(post_id: params[:post_id]).first .. I haven't used Rails in 2 years so I can't remember :)
<gitter1234> yeah i just changed it to @comment = @post.comments.find(params[:id]) and now the correct comment appears in the edit page
xco has joined #ruby
greengriminal has quit [Quit: Leaving]
xco has quit [Client Quit]
<adam12> That'll work too :)
<adam12> Actually.. I'm surprised it does.
<gitter1234> hmm
<adam12> Oh. You're editing Comments.
<adam12> That might be fine.
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
<gitter1234> Updated the gist somewhat..
xco has quit [Client Quit]
<gitter1234> how would you do this controller?
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
<gitter1234> my first time working with controllers here.. that new @comment line I got from https://stackoverflow.com/questions/20846885/editing-a-comment-that-belongs-to-a-post -- seems very similar to my setup
<adam12> gitter1234: Which action inside the controller?
<gitter1234> this other guy told me that my show.html.erb needed a loop and that it would likely fix everything, but it errors out: https://stackoverflow.com/questions/20846885/editing-a-comment-that-belongs-to-a-post
xco has joined #ruby
xco has quit [Client Quit]
<gitter1234> adam12: edit i beleive..
<adam12> gitter1234: It looks OK to me.
<adam12> gitter1234: or are you talking update?
<gitter1234> maybe yeah
xco has joined #ruby
<gitter1234> definitely yeah actually
xco has quit [Client Quit]
chalkmonster has quit [Quit: WeeChat 2.7]
<adam12> gitter1234: That looks OK to, if you uncommented the code.
xco has joined #ruby
xco has quit [Client Quit]
<adam12> gitter1234: Basically Rails boilerplate. Have you used the rails scaffold before? Looks close.
<gitter1234> yep i just used scaffold for posts :D i copied a whole lot over to the comments..
xco has joined #ruby
xco has quit [Client Quit]
<gitter1234> uncommenting the code unfortunately gives me: undefined local variable or method `comments_params' for #<CommentsController:0x000004e1f86531f8> Did you mean? comment_params undefined local variable or method `comments_params' for #<CommentsController:0x000004e1f86531f8> Did you mean? comment_params
<gitter1234> sorry the double paste there
xco has joined #ruby
xco has quit [Client Quit]
<gitter1234> err.. its comment_params not comments_param
xco has joined #ruby
xco has quit [Client Quit]
<ljarvis> c
<ljarvis> oops
xco has joined #ruby
<gitter1234> yes!!! wooohooo!! :D :D
xco has quit [Client Quit]
<gitter1234> thanks for being there for me adam12 .. and certifying my code :)
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
ttoocs has quit [Ping timeout: 258 seconds]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
markopasha has quit [Remote host closed the connection]
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sgen has quit [Ping timeout: 260 seconds]
xco has joined #ruby
xco has quit [Client Quit]
chalkmonster has joined #ruby
mossplix has quit [Remote host closed the connection]
xco has joined #ruby
xco has quit [Client Quit]
duderonomy has joined #ruby
xco has joined #ruby
xco has quit [Client Quit]
fphilipe_ has joined #ruby
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
troulouliou_dev has joined #ruby
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
ellcs has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
brool has joined #ruby
fphilipe_ has quit [Ping timeout: 272 seconds]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
fig-le-deunch has joined #ruby
jmcgnh has quit [Read error: Connection reset by peer]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
jmcgnh has joined #ruby
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
zlogan has quit [Ping timeout: 272 seconds]
xco has joined #ruby
mossplix has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
BrianWGray has joined #ruby
xco has joined #ruby
xco has quit [Client Quit]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has joined #ruby
xco has quit [Client Quit]
mossplix has quit [Ping timeout: 260 seconds]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
dionysus69 has quit [Ping timeout: 272 seconds]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
hsiktas has quit []
duderonomy has joined #ruby
hsiktas has joined #ruby
TomyWork has quit [Ping timeout: 256 seconds]
duderonomy has quit [Client Quit]
pwnd_nsfw has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 265 seconds]
duderonomy has joined #ruby
zlogan has joined #ruby
<gitter1234> Should I prevent unauthorized access to my comments#index and comments#show like this? https://gist.github.com/1234dev/8f5f9e470bd2f0b2dbad840d1e879e5b
alexherbo20 has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.5]
alex`` has quit [Ping timeout: 240 seconds]
alexherbo2 has quit [Ping timeout: 258 seconds]
alexherbo20 is now known as alexherbo2
DaRock has quit [Read error: Connection reset by peer]
DaRock has joined #ruby
DaRock has quit [Read error: Connection reset by peer]
DaRock has joined #ruby
alex`` has joined #ruby
troulouliou_div2 has joined #ruby
<gitter1234> `resources :comments, except: [:index, :show]` seems to have done the trick..
tag has quit []
tag has joined #ruby
fig-le-deunch has quit [Quit: Konversation terminated!]
cthu| has joined #ruby
mossplix has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
troulouliou_div2 has joined #ruby
howdoi has joined #ruby
jaequery has joined #ruby
jaequery has quit [Remote host closed the connection]
jaequery has joined #ruby
davor has quit [Ping timeout: 260 seconds]
davor_ has joined #ruby
davor_ is now known as davor
wildtrees has joined #ruby
xco has quit [Quit: Textual IRC Client: www.textualapp.com]
mossplix_ has joined #ruby
renich has joined #ruby
jaequery has quit [Remote host closed the connection]
mossplix has quit [Ping timeout: 265 seconds]
integral has quit []
integral has joined #ruby
davor has quit [Quit: Bye]
DaRock has quit [Ping timeout: 258 seconds]
orbyt_ has joined #ruby
bsdband98 has joined #ruby
davor has joined #ruby
bsdbandit-01 has quit [Ping timeout: 272 seconds]
Fraeon has quit [Ping timeout: 265 seconds]
Fraeon has joined #ruby
teardown has quit [Ping timeout: 265 seconds]
anveo has quit [Ping timeout: 265 seconds]
phaul has quit [Ping timeout: 268 seconds]
teardown has joined #ruby
mossplix_ has quit [Remote host closed the connection]
davor has quit [Quit: Bye]
davor has joined #ruby
davor has quit [Client Quit]
davor has joined #ruby
<TheBrayn> I'm using ruby 2.5 on Debian 10 (in Docker) and have a private gem repository which has a certificate signed by an internal CA. I added the certificate to the system but somehow bundler does not pick it up. Is there anything else I need to know/do?
chalkmonster has quit [Quit: WeeChat 2.7]
<TheBrayn> https://github.com/docker-library/ruby/blob/82eecb7596c3cb466dd87d4b0350d189a330b925/2.5/buster/Dockerfile this image from Dockerhub and I'm adding the certificate into a file in /usr/local/share/ca-certificates/cert.crt and run update-ca-certificates
<TheBrayn> I tried wget on the gem source url which works
megamos has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
Net has quit []
Net has joined #ruby
dionysus69 has joined #ruby
zlogan has quit [Read error: Connection reset by peer]
mossplix has joined #ruby
greenhat has joined #ruby
greenhat has quit [Read error: Connection reset by peer]
phaul has joined #ruby
howdoi has quit []
howdoi has joined #ruby
pwnd_nsfw` has joined #ruby
william1_ has joined #ruby
phaul has quit [Ping timeout: 265 seconds]
pwnd_nsfw has quit [Ping timeout: 260 seconds]
william1_ has quit [Ping timeout: 272 seconds]
guardian` has quit [Ping timeout: 258 seconds]
nowhere_man has joined #ruby
fig-le-deunch has joined #ruby
bsdband98 has quit [Ping timeout: 260 seconds]
kevinsjoberg has quit [Read error: Connection reset by peer]
englishm has quit [Ping timeout: 252 seconds]
kapil_ has quit [Ping timeout: 252 seconds]
megamos has quit [Quit: leaving]
jetpack_joe has quit [Ping timeout: 245 seconds]
thebananaking has quit [Ping timeout: 245 seconds]
rann has quit [Ping timeout: 240 seconds]
Lewix has quit [Ping timeout: 246 seconds]
sameerynho has joined #ruby
stryek has quit [Ping timeout: 245 seconds]
hahuang65 has quit [Ping timeout: 245 seconds]
JayDoubleu has quit [Ping timeout: 252 seconds]
jerme_ has quit [Ping timeout: 252 seconds]
matti has quit [Ping timeout: 252 seconds]
KnownSyntax has quit [Ping timeout: 252 seconds]
integral has quit [Ping timeout: 260 seconds]
Iambchop has quit [Ping timeout: 260 seconds]
darkf has quit [Ping timeout: 246 seconds]
raggi- has quit [Ping timeout: 246 seconds]
d0liver has quit [Read error: Connection reset by peer]
jnix has quit [Ping timeout: 250 seconds]
siasmj has quit [Ping timeout: 272 seconds]
bsdbandit-01 has joined #ruby
jerme_ has joined #ruby
d0liver has joined #ruby
Argorok has quit [Ping timeout: 265 seconds]
r3my has quit [Ping timeout: 264 seconds]
manveru has quit [Ping timeout: 264 seconds]
gajus has quit [Ping timeout: 252 seconds]
MentalPower has quit [Ping timeout: 246 seconds]
darthThorik has quit [Ping timeout: 246 seconds]
strmpnk has quit [Ping timeout: 248 seconds]
mattwc has quit [Ping timeout: 248 seconds]
Sina has quit [Ping timeout: 248 seconds]
afisher has quit [Ping timeout: 250 seconds]
jhill has quit [Ping timeout: 250 seconds]
meinside has quit [Ping timeout: 246 seconds]
zipkid has quit [Ping timeout: 246 seconds]
ctp has quit [Ping timeout: 246 seconds]
rann has joined #ruby
howdoi has quit [Ping timeout: 260 seconds]
Fenhl has quit [Ping timeout: 260 seconds]
timeless has quit [Read error: Connection reset by peer]
timeless has joined #ruby
NODE has quit [Excess Flood]
kevinsjoberg has joined #ruby
integral has joined #ruby
suukim has quit [Remote host closed the connection]
ctp has joined #ruby
hahuang65 has joined #ruby
lightstalker has quit [Ping timeout: 240 seconds]
raggi- has joined #ruby
Argorok has joined #ruby
mattwc has joined #ruby
jnix has joined #ruby
jetpack_joe has joined #ruby
ec has quit [Read error: Connection reset by peer]
suukim has joined #ruby
JayDoubleu has joined #ruby
Fenhl has joined #ruby
NODE has joined #ruby
siasmj has joined #ruby
kapil_ has joined #ruby
howdoi has joined #ruby
howdoi has quit [Excess Flood]
darkf has joined #ruby
Lyubo1 has quit [Ping timeout: 268 seconds]
Sina has joined #ruby
MentalPower has joined #ruby
darthThorik has joined #ruby
meinside has joined #ruby
lightstalker has joined #ruby
thebananaking has joined #ruby
Lyubo1 has joined #ruby
r3my has joined #ruby
afisher has joined #ruby
manveru has joined #ruby
gajus has joined #ruby
NODE has quit [Excess Flood]
stryek has joined #ruby
jhill has joined #ruby
ec has joined #ruby
strmpnk has joined #ruby
Fraeon has quit [Ping timeout: 272 seconds]
Fraeon has joined #ruby
NODE has joined #ruby
jmcgnh has quit [Ping timeout: 265 seconds]
Iambchop has joined #ruby
NODE has quit [Remote host closed the connection]
zipkid has joined #ruby
NODE has joined #ruby
phaul has joined #ruby
jerme_ has quit [Read error: Connection reset by peer]
kevinsjoberg has quit [Read error: Connection reset by peer]
d0liver has quit [Read error: Connection reset by peer]
jmcgnh has joined #ruby
<william1> Does anyone know of any jobs going in London or UK (especially remote) currently?
<william1> I'm finishing up a contract role by March 31st
stryek has quit [Ping timeout: 245 seconds]
r3my has quit [Ping timeout: 245 seconds]
ctp has quit [Ping timeout: 268 seconds]
manveru has quit [Ping timeout: 272 seconds]
ec has quit [Ping timeout: 272 seconds]
afisher has quit [Ping timeout: 272 seconds]
Swyper has joined #ruby
phaul has quit [Ping timeout: 258 seconds]
dinfuehr has quit [Ping timeout: 260 seconds]
<william1> DM me if you're looking for someone currently
gix has joined #ruby
dinfuehr has joined #ruby
NODE has quit [Excess Flood]
KnownSyntax has joined #ruby
KnownSyntax has quit [Excess Flood]
NODE has joined #ruby
Ai9zO5AP has quit [Ping timeout: 260 seconds]
i9zO5AP has joined #ruby
jaequery has joined #ruby
howdoi has joined #ruby
KnownSyntax has joined #ruby
NODE has quit [Remote host closed the connection]
NODE has joined #ruby
i9zO5AP has quit [Read error: Connection reset by peer]
i9zO5AP has joined #ruby
Swyper has quit [Remote host closed the connection]
troulouliou_dev has quit [Quit: Leaving]
sgen has joined #ruby
sagax has quit [Read error: Connection reset by peer]
ec has joined #ruby
d0liver has joined #ruby
ec has quit [Excess Flood]
afisher has joined #ruby
sagax has joined #ruby
kevinsjoberg has joined #ruby
guardian has joined #ruby
tau has joined #ruby
bsdband54 has joined #ruby
i9zO5AP has quit [Quit: WeeChat 2.5]
bsdbandit-01 has quit [Ping timeout: 245 seconds]
Fernando-Basso has joined #ruby
suukim has quit [Quit: Konversation terminated!]
sauvin has quit [Read error: Connection reset by peer]
ctp has joined #ruby
tau has quit [Remote host closed the connection]
troulouliou_div2 has quit [Remote host closed the connection]
kapil_ has quit [Quit: Connection closed for inactivity]
ur5us has joined #ruby
william1_ has joined #ruby
SanguineAnomaly has quit [Ping timeout: 260 seconds]
SanguineAnomaly has joined #ruby
guardian has quit [Ping timeout: 272 seconds]
Ai9zO5AP has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
fig-le-deunch has quit [Quit: Konversation terminated!]
sariyar has quit [Quit: Connection closed for inactivity]
william1_ has quit [Ping timeout: 272 seconds]
Ai9zO5AP has quit [Ping timeout: 258 seconds]
greengriminal has joined #ruby
sgen has quit [Ping timeout: 260 seconds]
MrCrackPot has quit [Read error: Connection reset by peer]
jaequery has quit [Remote host closed the connection]
gitter1234 has quit [Quit: Connection closed for inactivity]
ur5us has quit [Ping timeout: 260 seconds]
englishm has joined #ruby
ur5us has joined #ruby
marxarel_ has joined #ruby
marxarel_ has quit [Client Quit]
Ai9zO5AP has joined #ruby
teej has quit [Remote host closed the connection]
fphilipe_ has joined #ruby
abc_not_cba has joined #ruby
sgen has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe_ has quit [Ping timeout: 258 seconds]
matti has joined #ruby
abc_not_cba has left #ruby [#ruby]
meinside has quit [Quit: Connection closed for inactivity]
NODE has quit [Excess Flood]
NODE has joined #ruby
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
alexherbo2 has joined #ruby
darkf has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
chihhsin has quit [Ping timeout: 268 seconds]
Swyper has joined #ruby
chihhsin has joined #ruby
greengriminal has quit [Quit: Leaving]
bsdbandit-01 has joined #ruby
bsdband54 has quit [Ping timeout: 240 seconds]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Read error: Connection reset by peer]
Swyper_ has joined #ruby
NODE has quit [Quit: changing servers]
s2013 has joined #ruby
NODE has joined #ruby
_phaul is now known as phaul
jerme_ has joined #ruby
markopasha has joined #ruby
<phaul> william1: I don't know how much it matches your needs but I'm at smartpension. There are a few contractors, but I don't beleive we do full remote. But I'm happy to do refferal, and or recommend you to HR.. We are still growing in a rapid pace, I think 8 new joiners next week?
fphilipe_ has joined #ruby
tau has joined #ruby
<william1> That would be great :)
<s2013> hi if i have an array of array and the items are in order.. i want to find pattern that is most common across. what would be the best way to approach it
<william1> That's my latest CV
<s2013> so.. [['a', 'b', 'c'], ['b', 'c', 'd'], ['b', 'c','a']] < in this case the 2 most common would be 'b', 'c'
<william1> Thanks phaul
<phaul> okay I do some diggin tomorrow how to go about this, and what exact positions we have open
<william1> Thanks
<s2013> anyone?
cthulchu_ has joined #ruby
<phaul> s2013: is [['a', 'a'
fphilipe_ has quit [Ping timeout: 258 seconds]
shirak has joined #ruby
<phaul> ']] allowed?
<s2013> no
thebananaking has quit [Quit: Connection closed for inactivity]
<s2013> basically we have data of products people looked at in certain order. so we want to find the most common 3 product pattern for example
<havenwood> &>> [['a', 'b', 'c'], ['b', 'c', 'd'], ['b', 'c','a']].flatten.tally
<phaul> I can't see how sortednes helps...
<rubydoc> # => {"a"=>2, "b"=>3, "c"=>3, "d"=>1} (https://carc.in/#/r/8ena)
<s2013> its not sorted i just used as an example
<s2013> no tally wouldnt work
<s2013> we want to find the pattern
<s2013> like someone looked at a first then went to b etc
<s2013> in the example above someone went to b first then c .. thats the most common pattern
william1_ has joined #ruby
<havenwood> s2013: I just want to tally!
<havenwood> &>> [['a', 'b', 'c'], ['b', 'c', 'd'], ['b', 'c','a']].flat_map { _1.each_cons(2).to_a }.tally
<rubydoc> # => {["a", "b"]=>1, ["b", "c"]=>3, ["c", "d"]=>1, ["c", "a"]=>1} (https://carc.in/#/r/8enb)
<phaul> oh, you mean most common substring, if you look at char arrays as strings..
<s2013> yes
<s2013> i gues one way to put it
<s2013> i feel like i need to reach deep into my cs education but im so rusty on that stuff
cthu| has quit [Ping timeout: 268 seconds]
<s2013> but what havenwood said might work i think
<havenwood> &>> [['a', 'b', 'c'], ['b', 'c', 'd'], ['b', 'c','a']].flat_map { _1.each_cons(2).to_a }.tally.max_by(&:last).first # s2013
<rubydoc> # => ["b", "c"] (https://carc.in/#/r/8eng)
<havenwood> s2013: I reached deep into my... legal education to find that one. :P
<s2013> what does the _1 do?
<havenwood> s2013: Alternatively: flat_map { |a| a.each_cons
<havenwood> s2013: It's the first positional block argument new syntax in 2.7.
<s2013> oh ok
<s2013> gotcha
<s2013> cause i enver saw that before
solars has quit [Quit: Connection closed for inactivity]
entel has quit [Quit: Connection closed for inactivity]
lucasb has quit [Quit: Connection closed for inactivity]
<havenwood> I like #tally particularly since David Jones came up with the name while we were camping at Rails Camp. I keep trying to get folk to propose names, he did, and this one stuck. :)
<havenwood> baweaver and whathappens were there too :)
reber has joined #ruby
<havenwood> PS - Rails Camp is great! If you're a Rubyist and miss summer camp, go to one!
<havenwood> a member of my team, bobbilee runs Rails Camp West. i wish I could go to the one near Portland this summer: https://west.railscamp.us/
<s2013> havenwood im getting an error.
<s2013> data.flat_map{ |a| a.each_cons(4).to_a }.tally
<s2013> data is my 2d array
<s2013> undefined method `tally' for #<Array:0x0000559e5a3b8690>
<havenwood> s2013: it's a 2.6 feature. sec, I have a little writeup showing how to implement in each version of Ruby.
<havenwood> s2013: what version are you on?
<s2013> oh.. im using repl.it
<s2013> im on 2.6.3
<havenwood> s2013: I did a 2.7 example.
<havenwood> s2013: It'll work on 2.6.
<s2013> got it okay let me try
reber has quit [Client Quit]
<s2013> wait im on 2.6.3 as well on local computer it says undefined method taly
<leftylink> TALLY HO
<leftylink> that is a valid english expression right? otherwise, I appear to call someone a ho
<leftylink> so that was a risky thing to say
<leftylink> perhaps I should not take such risks
<leftylink> "to tell others the quarry has been sighted"... interesting
<s2013> is there another way of doing it besides tally? not sure why its not working on my 2.6.3
<leftylink> reimplement tally in terms of 2.6 availble things
<leftylink> in fact for fun you could refine tally onto Enumerable, since thta seems fun
<leftylink> oh... that's a little disappointing to me that tally doesn't take a block...............................
<leftylink> I understand that the functionality I want is only a `map` away, but still :)
<leftylink> or maybe :*
<leftylink> :(
<leftylink> overcorrecting on your fingers... haven't seen that since I did PWM
<leftylink> &>> [1].tally(&:succ)
<rubydoc> # => {1=>1} (https://carc.in/#/r/8eok)
<leftylink> unfortunate
<leftylink> so I have to
<leftylink> &>> [1].map(&:succ).tally
<rubydoc> # => {2=>1} (https://carc.in/#/r/8eom)
william1_ has quit [Ping timeout: 260 seconds]
<leftylink> oh well
<leftylink> curious. it was happy to simply ignore its arg though???
<leftylink> ah it was a block, of course
<leftylink> and functions are always happy to take blocks that they ignore
sgen has quit [Ping timeout: 260 seconds]
schne1der has quit [Ping timeout: 268 seconds]
Swyper_ has quit [Remote host closed the connection]
hagabaka has quit [Ping timeout: 265 seconds]
hagabaka has joined #ruby
donofrio_ has joined #ruby
<havenwood> s2013: Here's how to tally from Ruby 1.9 through 2.7: https://gist.github.com/havenwood/a0cdf6640f54f15db57dbba0b09c4735
<havenwood> s2013: (It was added in 2.7, not 2.6. Numbers are confusing.)
<havenwood> &26>> RUBY_VERSION
<rubydoc> # => "2.6.0" (https://carc.in/#/r/8ep7)
<s2013> i ended up doing each_with_object
<havenwood> &26>> [['a', 'b', 'c'], ['b', 'c', 'd'], ['b', 'c','a']].flat_map { |a| a.each_cons(2).to_a }.group_by(&:itself).transform_values(&:size).max_by(&:last).first
donofrio has quit [Ping timeout: 258 seconds]
<rubydoc> # => ["b", "c"] (https://carc.in/#/r/8ep8)
<havenwood> s2013: That's often a good choice.
<havenwood> Look how nicely Ruby improved this task, through 1.9, 2.0, 2.2, 2.4, and now 2.7 changes. Good stuff!
<havenwood> Started with: Hash[collection.group_by { |n| n }.map { |k, v| [k, v.size] }]
<havenwood> Ended with: collection.tally
bsdband42 has joined #ruby
davidw has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> s2013: I'm curious to see your solution?
<havenwood> I should share out the Ruby Sync slides I do for work :)
dviola has joined #ruby
bsdband60 has joined #ruby
bsdbandit-01 has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
bsdband42 has quit [Ping timeout: 268 seconds]
bsdband60 has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
bsdband80 has joined #ruby
jenrzzz has joined #ruby
sgen has joined #ruby
duderonomy has joined #ruby
guardian has joined #ruby
<s2013> havenwood one second
<s2013> somethign of thats ort
<s2013> could probabyl be more elegant but it seems to work
wildtrees has quit [Ping timeout: 265 seconds]
ur5us has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
NODE has quit [Excess Flood]
NODE has joined #ruby
bsdband80 has quit [Ping timeout: 260 seconds]
NODE has quit [Excess Flood]
bsdbandit-01 has joined #ruby
NODE has joined #ruby
<phaul> { |n| n } -> (&:itself)
NODE has quit [Remote host closed the connection]
NODE has joined #ruby
<phaul> sorry, I'm just so trained to be a human rubocop now I can't help it :)
<havenwood> it expired before I clicked
sergioro has joined #ruby
ellcs has quit [Ping timeout: 245 seconds]
Ai9zO5AP has quit [Ping timeout: 240 seconds]
TCZ has joined #ruby
alexherbo25 has joined #ruby
alex`` has quit [Ping timeout: 258 seconds]
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo25 is now known as alexherbo2
vondruch_ has joined #ruby
alex`` has joined #ruby
TCZ has quit [Quit: Bye Bye]
vondruch has quit [Ping timeout: 272 seconds]
vondruch_ is now known as vondruch
houhoulis has joined #ruby
Fernando-Basso has quit [Quit: Leaving]
hiroaki has quit [Ping timeout: 258 seconds]
sameerynho has quit [Ping timeout: 240 seconds]
wildtrees has joined #ruby
NODE has quit [Excess Flood]
camilasan has quit [Ping timeout: 260 seconds]
NODE has joined #ruby
Ai9zO5AP has joined #ruby
camilasan has joined #ruby
hiroaki has joined #ruby
NODE has quit [Remote host closed the connection]
NODE has joined #ruby
DaRock has joined #ruby
Swyper has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 260 seconds]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
rahult has joined #ruby
Swyper has joined #ruby
Swyper has quit [Read error: Connection reset by peer]