havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 2.7.2, 2.6.6, 3.0.0-preview1: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3 | Can't talk? Register/identify with NickServ
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
roshanavand_ is now known as roshanavand
ta has quit [Ping timeout: 272 seconds]
Nahra has joined #ruby
ta has joined #ruby
GodFather has quit [Ping timeout: 264 seconds]
adu has joined #ruby
baojg has quit [Remote host closed the connection]
drincruz has quit [Ping timeout: 264 seconds]
dfucci has quit [Remote host closed the connection]
baojg has joined #ruby
ta has quit [Ping timeout: 256 seconds]
GodFather has joined #ruby
ta has joined #ruby
ur5us_ has quit [Ping timeout: 264 seconds]
advorak has quit [Ping timeout: 240 seconds]
adu has quit [Ping timeout: 246 seconds]
Nahra has quit [Ping timeout: 240 seconds]
Nahra has joined #ruby
ur5us_ has joined #ruby
skyikot has joined #ruby
daemonwrangler has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
Nahra has quit [Quit: leaving]
DaRock has joined #ruby
orbyt_ has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby
meinside has joined #ruby
fuzzface has joined #ruby
fuzzface has quit [Client Quit]
bambanx has joined #ruby
spk has quit [Ping timeout: 244 seconds]
spk has joined #ruby
CommunistWolf has quit [Quit: No Ping reply in 180 seconds.]
CommunistWolf has joined #ruby
Rudd0 has quit [Ping timeout: 265 seconds]
mercury_ has joined #ruby
mercury_ has quit [Client Quit]
mercury_ has joined #ruby
mercury_ is now known as jjspano
jjspano has quit [Client Quit]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
al2o3-cr has quit [Quit: WeeChat 2.9]
al2o3-cr has joined #ruby
duderonomy has joined #ruby
powerhouse has quit [Read error: Connection reset by peer]
powerhouse has joined #ruby
akem__ has joined #ruby
akem_ has quit [Ping timeout: 240 seconds]
bambanx has quit [Quit: Leaving]
madhatter has quit [Ping timeout: 268 seconds]
madhatter has joined #ruby
ChmEarl has quit [Quit: Leaving]
Rudd0 has joined #ruby
orbyt_ has joined #ruby
adu has joined #ruby
swaggboi has quit [Quit: C-x C-c]
adu has quit [Quit: adu]
dcunit3d has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
gix- has joined #ruby
gix has quit [Disconnected by services]
roshanavand_ has joined #ruby
shortdudey123 has joined #ruby
roshanavand has quit [Ping timeout: 256 seconds]
roshanavand_ is now known as roshanavand
swaggboi has joined #ruby
<summerisle> good evening all, does anyone know of a way to define YARD/RDoc documentation external to source files? I have some gRPC generated code that I need to document, but should not/can not document in the actual source file because they will ultimately be regenerated.
<summerisle> researching this has been fruitless
dcunit3d has joined #ruby
donofrio has quit [Remote host closed the connection]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fercell has joined #ruby
ur5us_ has quit [Ping timeout: 264 seconds]
<nakilon> summerisle you might find something in Google Cloud's github repos
<nakilon> IIRC their SDK has some templating that then generates docs for every language or something like that
pinkpandabot has quit [Quit: groups!!!]
donofrio has joined #ruby
supercoven has joined #ruby
fercell has quit [Ping timeout: 256 seconds]
fercell has joined #ruby
skyikot has quit [Ping timeout: 240 seconds]
fercell has quit [Ping timeout: 260 seconds]
fercell has joined #ruby
fercell has quit [Ping timeout: 260 seconds]
fercell has joined #ruby
BenDover has joined #ruby
fercell has quit [Ping timeout: 240 seconds]
fercell has joined #ruby
cthu| has quit [Ping timeout: 265 seconds]
rippa has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
fippy has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rippa has joined #ruby
charrit69 has joined #ruby
ur5us_ has joined #ruby
charrit69 has quit [Ping timeout: 240 seconds]
dfucci has joined #ruby
fercell has quit [Ping timeout: 240 seconds]
hiroaki has joined #ruby
weaksauce has quit [Ping timeout: 264 seconds]
vondruch has joined #ruby
ur5us_ has quit [Ping timeout: 264 seconds]
royo25 has joined #ruby
gix- has quit [Ping timeout: 240 seconds]
cd has quit [Quit: cd]
BH23 has joined #ruby
Jonopoly has joined #ruby
cisco has joined #ruby
akem__ is now known as akem
fercell has joined #ruby
fippy has quit [Ping timeout: 256 seconds]
charrit69 has joined #ruby
cisco has quit [Quit: leaving]
cnsvc has quit [Ping timeout: 240 seconds]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
fippy has joined #ruby
Technodrome has joined #ruby
cloud69 has joined #ruby
BenDover has quit [Quit: BenDover]
dfucci has quit [Ping timeout: 246 seconds]
dfucci has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
Ediz has quit [Remote host closed the connection]
Ediz has joined #ruby
Ediz is now known as Guest25513
vondruch has quit [Ping timeout: 240 seconds]
baojg_ has joined #ruby
baojg has quit [Ping timeout: 264 seconds]
TCZ has joined #ruby
fercell has quit [Ping timeout: 240 seconds]
fercell has joined #ruby
jinie has quit [Ping timeout: 240 seconds]
<noctux> hello again. Is there a way, to properly define a generic .hash method? I'm currently at a point, where I have a to "internalize" a list of objects, so transform them to another representation, deduplicate them and then hand out unique ids. So the correct way would probably be: use a Hash or Set (same datatstructure for mri) and put the elements there. However this means that I do have to implement
<noctux> .hash and .eql? for a large number of classes. Is there a nice way to do that generically? I've found https://stackoverflow.com/a/25606643 for equal?, but I'm not sure whether something such as "instance_variables.map(&:hash).reduce(:^)" for .hash is a good idea: This means I assume that all instance_variables of e.g. Object also provide a sane .hash implementation...
<noctux> may I assume something like that?
<noctux> or will it most likely break in all different directions...
BenDover has joined #ruby
jinie has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
jcalla has quit [Ping timeout: 240 seconds]
jcalla has joined #ruby
meinside has joined #ruby
cloud69 has quit [Quit: Connection closed for inactivity]
drincruz has joined #ruby
Nahra has joined #ruby
foolish is now known as nyuszika7h
drincruz has quit [Ping timeout: 272 seconds]
vondruch has joined #ruby
baojg_ has quit [Remote host closed the connection]
baojg has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.9]
fippy has quit [Quit: Leaving]
drincruz has joined #ruby
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
supercoven has quit [Ping timeout: 240 seconds]
charrit69 has quit [Ping timeout: 240 seconds]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baojg_ has joined #ruby
baojg has quit [Ping timeout: 264 seconds]
TCZ has joined #ruby
<summerisle> nakilon: hmm, maybe. if you're referring to protobuf specification documentation being copied into to the generated code that won't work for the grpc gem because it uses dynamic method lookup at runtime so there's not really any actuall "class" to document, let alone methods.
ignorand has joined #ruby
drincruz has quit [Ping timeout: 256 seconds]
charrit69 has joined #ruby
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
drincruz has joined #ruby
TvL2386 has quit [Remote host closed the connection]
<ignorand> o/
Swyper has joined #ruby
supercoven has joined #ruby
supercoven has quit [Max SendQ exceeded]
supercoven has joined #ruby
supercoven has quit [Max SendQ exceeded]
supercoven has joined #ruby
supercoven has quit [Max SendQ exceeded]
supercoven has joined #ruby
supercoven has quit [Max SendQ exceeded]
supercoven has joined #ruby
supercoven has quit [Max SendQ exceeded]
al2o3-cr has quit [Quit: WeeChat 2.9]
al2o3-cr has joined #ruby
TCZ has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
Nahra has quit [Ping timeout: 240 seconds]
lucasb has joined #ruby
<adam12> ignorand: ohai
<ignorand> adam12: :)
Mikaela has quit [Quit: Mikaela]
rkoller has joined #ruby
Mikaela has joined #ruby
TomyWork has joined #ruby
skyikot has joined #ruby
baojg has joined #ruby
baojg_ has quit [Ping timeout: 264 seconds]
SuperLag has quit [Remote host closed the connection]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
GodFather has joined #ruby
BTRE has quit [Quit: Leaving]
rkoller has quit [Quit: Textual IRC Client: www.textualapp.com]
BTRE has joined #ruby
Xiti has quit [Quit: Leaving]
<TomyWork> I'm doing "json = JSON.parse(response.body, object_class: OpenStruct)" to create a json object i can traverse using json.foo.bar.baz. Works fine so far. however, many of the keys look like "moo:meh" and I can't use json.foo.moo:meh.baz on that. I can use json.foo['moo:meh'].baz on it, though, but is there a more elegant way? maybe a way to replace all the keys?
Xiti has joined #ruby
<TomyWork> basically i need a way to replace all the : in the keys by _, that would be nice
ChmEarl has joined #ruby
<jhass> shouldn't be hard to write your own version of OpenStruct that handles that
DaRock has quit [Ping timeout: 256 seconds]
<TomyWork> done that, works nicely :)
Lynx_ has joined #ruby
<Lynx_> Hi! I have no idea about Ruby, but am trying to install a gem directly form github. Is this possible? Specifically this one: https://github.com/abshah/transrate (The original this is forked from can be installed with just gem install, but this fork contains some bug fixes)
<nofrex> are you using Bundler, Lynx_ ?
<Lynx_> I have no idea ;)
<TomyWork> Lynx_, i dont know, but recent versions of "bundle init" are generating a Gemfile with something with github in it
<nofrex> are you using this gem as a dependency in some other software, or are you using it stand-alone as a command-line utility, Lynx_ ?
<Lynx_> The author recommended using 'gem install transrate -s https://github.com/abshah/transrate' to install this fork, but this only installs the original version for me.
<Lynx_> nofrex: This is for stand-alone use on the command line, yes
<jhass> Lynx_: you can just clone the repo, cd into it, gem build transrate.gemspec; gem install *.gem
<al2o3-cr> Lynx_: or `gem install specific_install` then `gem git_install <git-repo>`
<Lynx_> jhass, al2o3-cr: That's what I was looking for. Thanks!
<al2o3-cr> Lynx_: yw :)
<al2o3-cr> either work fine.
akem_ has joined #ruby
akem has quit [Ping timeout: 256 seconds]
<Lynx_> While I'm here, when I run this I get a warning "The 'trollop' gem has been deprecated and has been replaced by 'optimist'." Can I fix this by just changing the names in the code, i.e. is optimist a drop-in replacement, or would I need to adapt code?
charrit69 has quit [Quit: Konversation terminated!]
gueorgui has quit [Ping timeout: 240 seconds]
gueorgui has joined #ruby
Lam13da84 has joined #ruby
<Lynx_> jhass: Seems to work, thanks again
cthulchu_ has joined #ruby
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
ignorand has quit [Remote host closed the connection]
vondruch has quit [Read error: Connection reset by peer]
gueorgui has quit [Remote host closed the connection]
gueorgui has joined #ruby
weaksauce has joined #ruby
Lam13da84 has quit [Remote host closed the connection]
<leah2> cool: >> "%.40f" % (14+18/99r)
<leah2> => "14.1818181818181818181818181818181818181818"
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
Swyper has quit [Remote host closed the connection]
royo25 has quit [Quit: Bye...]
dfucci has quit [Ping timeout: 272 seconds]
iNs has quit [Ping timeout: 240 seconds]
iNs has joined #ruby
Swyper has joined #ruby
<nakilon> what is the faster interprocess communication?
<nakilon> if I write a C program and spawn it as a separate process to communicate with Ruby
<nakilon> (the fastest on the Ruby side)
Swyper has quit [Ping timeout: 264 seconds]
<leah2> shared memory, but very hard to get right. i'd use plain pipes
TomyWork has quit [Remote host closed the connection]
cloaked1 has joined #ruby
cloaked1 has joined #ruby
BSaboia has joined #ruby
dcunit3d has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
dcunit3d has joined #ruby
teclator has quit [Ping timeout: 265 seconds]
teclator has joined #ruby
Swyper has joined #ruby
cloaked1 has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
dionysus69 has joined #ruby
Swyper has quit [Remote host closed the connection]
fercell has quit [Quit: WeeChat 2.9]
dionysus69 has quit [Ping timeout: 246 seconds]
dfucci has joined #ruby
DTZUZU has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
Rudd0 has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
gix has joined #ruby
cd has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Swyper has quit [Ping timeout: 256 seconds]
DTZUZU has joined #ruby
dfucci has joined #ruby
linuus[m] has joined #ruby
Technodrome has quit [Remote host closed the connection]
TCZ has joined #ruby
jcalla has quit [Ping timeout: 256 seconds]
Nahra has joined #ruby
howdoi has joined #ruby
jcalla has joined #ruby
<nakilon> I can define Struct without fields
ur5us_ has joined #ruby
<nakilon> &>> Struct.new("A")
<rubydoc> # => Struct::A (https://carc.in/#/r/a03b)
<nakilon> I can define Struct without name
<nakilon> &>> Struct.new(:a)
<rubydoc> # => #<Class:0x000055ac05cf78b0> (https://carc.in/#/r/a03c)
<nakilon> how do I define Struct without name and fields?
<nakilon> &>> Struct.new()
<rubydoc> stderr: -e:4:in `new': wrong number of arguments (given 0, expected 1+) (ArgumentError)... check link for more (https://carc.in/#/r/a03d)
<adam12> &>> A = Class.new(Struct)
<rubydoc> # => A (https://carc.in/#/r/a03e)
<adam12> Not sure of the benefit of it, or if things will go south on you :)
<adam12> Oh, actually you wanted it nameless... you could assign to a local or not assign at all.
yxhuvud has quit [Remote host closed the connection]
yxhuvud has joined #ruby
moldorcoder7 has quit [Ping timeout: 260 seconds]
shakes has joined #ruby
shakes has quit [Client Quit]
rippa has joined #ruby
<al2o3-cr> nakilon: Struct.new(nil)
rippa has quit [Client Quit]
dfucci_ has joined #ruby
moldorcoder7 has joined #ruby
dfucci has quit [Ping timeout: 265 seconds]
rippa has joined #ruby
rippa has quit [Client Quit]
rippa has joined #ruby
Swyper has joined #ruby
<nakilon> nice
baojg_ has joined #ruby
BH23 has quit [Quit: Connection closed for inactivity]
baojg has quit [Ping timeout: 264 seconds]
cnsvc has joined #ruby
baojg has joined #ruby
baojg_ has quit [Ping timeout: 264 seconds]
ruby-lang120 has joined #ruby
ruby-lang120 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
ur5us_ has quit [Ping timeout: 264 seconds]
jcalla has quit [Quit: Leaving]
ruby-lang995 has joined #ruby
ruby-lang995 has quit [Client Quit]
blender_ has quit [Quit: WeeChat 2.3]
blender has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
GodFather has quit [Ping timeout: 240 seconds]
skyikot has quit [Ping timeout: 240 seconds]
BenDover has quit [Quit: BenDover]
gueorgui has quit [Ping timeout: 240 seconds]
gueorgui has joined #ruby
Rudd0 has joined #ruby
dfucci_ has quit [Ping timeout: 240 seconds]
Rudd0^ has joined #ruby
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
Rudd0 has quit [Ping timeout: 264 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
baojg_ has joined #ruby
baojg has quit [Ping timeout: 264 seconds]
dfucci has joined #ruby
dfucci has quit [Ping timeout: 246 seconds]
towo has quit [Remote host closed the connection]
towo has joined #ruby
TCZ has joined #ruby
dfucci has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
cnsvc has joined #ruby
dfucci has quit [Ping timeout: 260 seconds]
ur5us_ has joined #ruby
ta has quit [Ping timeout: 265 seconds]
ta has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
<nakilon> I start an external process with Open3.popen3 and wonder why get_process_mem gem shows the same amount for both processes -- exactly 14mb on start and exactly 120mb after some job on both sides
dfucci has joined #ruby
<nakilon> maybe something about memory management on macOS I'm not aware about'
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nakilon> I don't get it; here they don't even communicate https://dpaste.org/ke2C
<nakilon> in htop I see these two processes with corresponding pids to have different RES
skyikot has joined #ruby