havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.3, 2.5.5, 2.7.0-preview1: 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!
tpanarch1st_ has quit [Ping timeout: 272 seconds]
DaRock has joined #ruby
poontangmessiah has joined #ruby
fphilipe_ has joined #ruby
galaxie has joined #ruby
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bitwinery has quit [Quit: Leaving]
chalkmonster has quit [Quit: WeeChat 2.5]
ElFerna has quit [Remote host closed the connection]
chalkmonster has joined #ruby
sleepee has joined #ruby
chalkmonster has quit [Client Quit]
fphilipe_ has quit [Ping timeout: 268 seconds]
poontangmessiah has quit [Remote host closed the connection]
BlackSalmon has joined #ruby
<BlackSalmon> Hi, I have a quick question for you. Where ruby i mainly used for?
sleepee has quit [Ping timeout: 245 seconds]
code_zombie has quit [Quit: Leaving]
grilix has quit [Ping timeout: 272 seconds]
aupadhye has joined #ruby
aphprentice__ has quit [Quit: Connection closed for inactivity]
greypack has quit [Ping timeout: 245 seconds]
sleepee has joined #ruby
matled- has joined #ruby
matled has quit [Remote host closed the connection]
matled- is now known as matled
greypack has joined #ruby
BlackSalmon has quit [Remote host closed the connection]
swistak35 has quit [Ping timeout: 244 seconds]
swistak35 has joined #ruby
teardown has quit [Ping timeout: 244 seconds]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
amateur__ has quit [Remote host closed the connection]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
gix- has quit [Ping timeout: 272 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
Nicmavr has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
Nicmavr has joined #ruby
Azure|dc is now known as Azure
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
cats has quit [Ping timeout: 245 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
sleepee has quit [Read error: Connection reset by peer]
armyriad has quit [Quit: Leaving]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
fphilipe_ has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
englishm has quit [Excess Flood]
kyrylo has joined #ruby
englishm has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
cats has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
fphilipe_ has quit [Ping timeout: 245 seconds]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
cyclonis has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
cyclonis has quit [Excess Flood]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
AJA4350 has quit [Remote host closed the connection]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
duderonomy has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
cyclonis has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
donofrio has quit [Remote host closed the connection]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
queip has quit [Ping timeout: 258 seconds]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
englishm has quit [Excess Flood]
kyrylo has joined #ruby
englishm has joined #ruby
queip has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
dinfuehr has quit [Ping timeout: 258 seconds]
kyrylo has joined #ruby
dinfuehr has joined #ruby
dinfuehr has quit [Ping timeout: 248 seconds]
kyrylo has quit [Read error: Connection reset by peer]
dinfuehr has joined #ruby
kyrylo has joined #ruby
queip has quit [Ping timeout: 268 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
fphilipe_ has joined #ruby
dinfuehr_ has joined #ruby
dinfuehr has quit [Ping timeout: 268 seconds]
howdoi has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
tsujp has joined #ruby
fphilipe_ has quit [Ping timeout: 258 seconds]
kyrylo has quit [Read error: Connection reset by peer]
queip has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
fphilipe_ has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
dinfuehr_ has quit [Ping timeout: 244 seconds]
dinfuehr has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
fphilipe_ has quit [Ping timeout: 244 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
fphilipe_ has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
bitwinery has joined #ruby
kyrylo has joined #ruby
absolutejam has quit [Ping timeout: 268 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
queip has quit [Ping timeout: 245 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
ZAJDAN has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
queip has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
dionysus69 has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
reber has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
dionysus69 has quit [Client Quit]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
ravenous_ has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
ineb has joined #ruby
baojg has quit [Remote host closed the connection]
TomyWork has joined #ruby
baojg has joined #ruby
queip has quit [Ping timeout: 258 seconds]
vondruch has quit [Quit: vondruch]
planigan has quit [Read error: Connection reset by peer]
qbeek has joined #ruby
queip has joined #ruby
lxsameer has joined #ruby
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
jinie has joined #ruby
jinie has quit [Client Quit]
jinie has joined #ruby
queip has quit [Ping timeout: 244 seconds]
cd has quit [Quit: cd]
cyalc has joined #ruby
Bounga has joined #ruby
queip has joined #ruby
aolko has joined #ruby
queip has quit [Ping timeout: 245 seconds]
<aolko> hey there, is there a concept of `packages` in ruby?
vondruch has joined #ruby
<ineb> yes, they are called gems.
<aolko> not gems
<aolko> packages->modules->functions->variables
<aolko> packages as module containers
<ineb> ah. the answer is no then. :)
<aolko> alternative (not classes)?
<ineb> a wrapping module which includes other modules
<baweaver> Nesting modules
<aolko> perhaps maybe that can be fixed with metaprogramming somehow?
<baweaver> Why?
<ytti> what is the problem
<qbeek> why not just nest modules under a common namespace ?
<aolko> the lack of that specific construct and associated keyword
<ytti> no
<aolko> as well as importing
<ytti> no
<ytti> be specific
<baweaver> Do you mean for importing specific _parts_ of a module like Javascript?
<baweaver> import { x, y } from z?
<aolko> so when i do `require "Package"` or `require "Package.*" it imports the whole package
<baweaver> There's no way around that in Ruby.
<ytti> you could build package which lazily requires
<aolko> there should be crutches
<baweaver> or, more accurately, the trouble one would have to go through to make it as such would be far beyond overkill and would be very slow to work with.
<aolko> for this case
<baweaver> Rails does something similar for constant loading
<ytti> i understand the problem now
<ytti> but i can't relate
<aolko> well you see, i'm not touching rails with a 10m stick
<baweaver> Imposing your will upon a language is a poor way to get started in it
<aolko> my case is jruby
<baweaver> What you think to be common sense and necessity may very well make no sense to people who work in the language frequently
<aolko> i plug my packages/modules into java clusterfucks of classes
<baweaver> Does that make them wrong? Does that make you wrong?
<baweaver> Not necessarily in either case.
<aolko> actually wait, the other way around
<aolko> besides i'm not starting, i'm continuing
<ytti> i' dsay lazy require or autoload
cyalc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> Zeitwork was the recent solution
<ytti> are most reasonasble idiomatic approaches which cover some of the same problem ground
<ytti> but do not perfectly overlap
<aolko> right, but still can you maybe provide a macro or some other crutch?
<aolko> it's nice yet requires a bit too much to get going
bitwinery has quit [Quit: Leaving]
<baweaver> Late here, headed to bed.
<ineb> baweaver:gn8
kyrylo has joined #ruby
ravenous_ has quit [Ping timeout: 252 seconds]
queip has joined #ruby
<aolko> right so, we have lazy require, zeitwerk still no crutches
<aolko> honestly, i'd say this is like a "procedural blocks"
cyalc has joined #ruby
queip has quit [Ping timeout: 248 seconds]
alem0lars has joined #ruby
MrCrackPot has quit [Quit: Something went wrong again oh the joys]
cyalc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deepreds1 has joined #ruby
queip has joined #ruby
<aolko> for example, this https://github.com/sshaw/class2 extensively works with classes
cyalc has joined #ruby
MrCrackPot has joined #ruby
MrCrackPot has quit [Max SendQ exceeded]
MrCrackPot has joined #ruby
MrCrackPot has quit [Max SendQ exceeded]
MrCrackPot has joined #ruby
dionysus69 has joined #ruby
queip has quit [Ping timeout: 248 seconds]
drale2k_ has joined #ruby
claudiuinberlin has joined #ruby
drale2k_ has quit [Client Quit]
qbeek_ has joined #ruby
queip has joined #ruby
ur5us has quit [Remote host closed the connection]
qbeek has quit [Ping timeout: 252 seconds]
ur5us has joined #ruby
schneider has joined #ruby
cyalc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Ping timeout: 245 seconds]
drale2k_ has joined #ruby
amateur_rubyist has joined #ruby
drale2k_ has quit [Client Quit]
<NL3limin4t0r> aolko: You can also partialy require parts of a module/gem. For example `require 'active_support/core_ext/object/deep_dup'`
cyalc has joined #ruby
cyalc has quit [Client Quit]
kyrylo has quit [Read error: Connection reset by peer]
amateur_rubyist has quit [Ping timeout: 246 seconds]
amateur_rubyist has joined #ruby
<NL3limin4t0r> It doesn't always work easily, since some modules might not have the needed dependencies set up (since they assumed to be loaded).
yann-kaelig has joined #ruby
<NL3limin4t0r> For example let's say you want to load all core extensions of active support.
<NL3limin4t0r> This would be `require 'active_support/core_ext'`, but fails with "NameError: uninitialized constant ActiveSupport::Autoload".
<NL3limin4t0r> So you need to require autoload first. `require 'active_support/dependencies/autoload'`
qbeek_ has quit [Remote host closed the connection]
qbeek has joined #ruby
Bounga` has joined #ruby
Bounga has quit [Ping timeout: 252 seconds]
_whitelogger has joined #ruby
<aolko> i aim for `import "package.module.module.module"`
<aolko> and yes i've worked with composer and more or less know about autoloading
tdy has quit [Ping timeout: 272 seconds]
dionysus69 has quit [Quit: dionysus69]
drale2k_ has joined #ruby
queip has quit [Ping timeout: 272 seconds]
<Bish> is there a tool that allows me to analyze what method of a certain class gets called?
<Bish> from where?
<Bish> i want to see all occurrences of .update but there are many classes and instances that have that method
<Bish> is pry able to do that somehow, as it basicially has that information?
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leftylink> I think I heard rumours of tracepoint being useful in that situation
aupadhye has quit [Remote host closed the connection]
<leftylink> or perhaps you could redefine the method to first print Kernel#caller then cacll the original method
<Bish> well you're talking about runtime analysis, i want it staticially
<Bish> which would be possible, i guess
d^sh has quit [Ping timeout: 246 seconds]
Bounga` has quit [Ping timeout: 252 seconds]
d^sh has joined #ruby
fphilipe_ has quit [Ping timeout: 246 seconds]
Bounga` has joined #ruby
queip has joined #ruby
paraxial28 has quit [Quit: The Lounge - https://thelounge.chat]
<phaul> I would look into writing a TracePoint trigger.. but I don't know for sure if that's workable
poontangmessiah has joined #ruby
BlackSalmon has joined #ruby
<BlackSalmon> What ruby is mainly used for?
<phaul> ah leftylink already mentioned TracePoint... nm
kyrylo has joined #ruby
paraxial28 has joined #ruby
<phaul> Ruby is a general purpose programming language designed without any particular appication domain in mind. It was largely popularized by the Rails web framework though.
kyrylo has quit [Read error: Connection reset by peer]
amateur_rubyist has quit [Remote host closed the connection]
kyrylo has joined #ruby
ZAJDAN has quit [Quit: Konversation terminated!]
<phaul> BlackSalmon: these categories can give you an idea of what applications you can expect : https://www.ruby-toolbox.com/categories
ZAJDAN has joined #ruby
<aolko> and yet for some reason most ruby devs insist on writing strictly oop code
<aolko> this ain't java
amateur_rubyist has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
deepreds1 has quit [Ping timeout: 246 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
tsujp has joined #ruby
x86sk has quit [Quit: Connection closed for inactivity]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mozzarella has quit [Remote host closed the connection]
mozzarella has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
deepreds1 has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
deepreds1 has quit [Ping timeout: 245 seconds]
kyrylo has joined #ruby
deepreds1 has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
suukim has joined #ruby
tsujp has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
aolko has quit [Ping timeout: 260 seconds]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
lalitmee has joined #ruby
kyrylo has joined #ruby
AJA4350 has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
<phaul> someone with the rights should !badconn kyrylo
kyrylo has joined #ruby
<phaul> !ops
<ruby[bot]> phaul: ops currently in #ruby: havenwood, Mon_Ouie, Radar, baweaver, helpa, jhass, matthewd, miah, ruby[bot] and zenspider
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
vondruch has quit [Ping timeout: 248 seconds]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lalitmee has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
<BlackSalmon> If i have to choose between django and ruby on rails, what should i choose?
<BlackSalmon> I am not an advanced programmer, so I want to be able to calmly write a few simple lines on what already exists and actually is very easy to understand
desperek has joined #ruby
kyrylo has joined #ruby
desperek has quit [Changing host]
desperek has joined #ruby
<phaul> Try both for a few days, and then decide which experience you liked better? Sometimes documentation and additional materials are more important then the framework itself
<BlackSalmon> Instead of looking outside the documentation after some libraries of unknown origin that have a lot of errors, no instructions and they don't do exactly what I would like them to do
<phaul> https://www.railstutorial.org/book is pretty good to get started on Rails
<BlackSalmon> Yeah, i tested django. Trying write a website since last year. Start was pretty smooth but most of the problems showed up later
tehas has joined #ruby
<BlackSalmon> eg. you easly run your project localy by just `python manage.py runserver` BUT in the production you can't run this so easly
kyrylo has quit [Read error: Connection reset by peer]
<tehas> Hi Folks, can I take ruby gems from Ruby2.4 and copy+install it on Ruby2.6 ? is it compulsory to that a gem should be compiled for a particular ruby version ?
kyrylo has joined #ruby
<BlackSalmon> Advanced options have no documentation or is so damn poor that i, begginger, can't use too much cuz i don't have a clue how to use it
kyrylo has quit [Read error: Connection reset by peer]
drale2k_ has joined #ruby
tpanarch1st_ has joined #ruby
fphilipe_ has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
vondruch has quit [Quit: vondruch]
kyrylo has joined #ruby
vondruch has joined #ruby
beanie__ has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
lalitmee has joined #ruby
beanie__ has quit [Remote host closed the connection]
kyrylo has joined #ruby
tpanarch1st has joined #ruby
tpanarch1st_ has quit [Ping timeout: 272 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
vondruch has quit [Quit: vondruch]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
vondruch has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
suukim has quit [Quit: Konversation terminated!]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
dionysus69 has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
<tehas> Hi Folks, can I take ruby gems from Ruby2.4 and copy+install it on Ruby2.6 ? is it compulsory to that a gem should be compiled for a particular ruby version ?
kyrylo has quit [Read error: Connection reset by peer]
suukim has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
poontangmessiah has quit [Remote host closed the connection]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
Fischmiep has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
jcalla has quit [Ping timeout: 245 seconds]
kyrylo has joined #ruby
alem0lars has quit [Ping timeout: 248 seconds]
queip has quit [Ping timeout: 246 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
Fischmiep has quit [Ping timeout: 245 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
drale2k_ has joined #ruby
Fischmiep has joined #ruby
kyrylo has joined #ruby
lalitmee has quit [Ping timeout: 244 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
lucasb has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
queip has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
AJA4350 has quit [Remote host closed the connection]
kyrylo has joined #ruby
AJA4350 has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
<Bish> is there a name for methods that return the parameter without modifying it but only if a special case doesn't happen?
<Bish> kinda like
<Bish> case param when Numeric then param.to_s else param end
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
grilix has joined #ruby
claudiuinberlin has quit [Ping timeout: 272 seconds]
kyrylo has joined #ruby
xco has joined #ruby
<tehas> Bish : there is no official name I guess. But they could be called "specialMutationMethods"
kyrylo has quit [Read error: Connection reset by peer]
Fischmiep has quit [Ping timeout: 272 seconds]
<tehas> which mutate the param only in special cases
cyclonis has quit [Ping timeout: 244 seconds]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
cyclonis_ has joined #ruby
<tehas> Officially, there is something called "Mutating Functions" which allow modification in special cases when special keyword is used
<tehas> so for your case, you can call it "specialMutationMethod"
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
tweeeaks has joined #ruby
drnerdius has joined #ruby
tweeeaks is now known as tweaks
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
<desperek> can i create an intersection of arrays/sets in an array in a nice way?
kyrylo has quit [Read error: Connection reset by peer]
stryek has joined #ruby
<desperek> ok nvm
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
<Bish> desperek: & i guess
<Bish> tehas: well, that's a really general name
<desperek> Bish, yeah i was about the .inject(:&) thing as whole really
brool has joined #ruby
kyrylo has joined #ruby
bmurt has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
<havenwood> desperek: I like: map(&:to_set).reduce(:intersection)
<havenwood> desperek: Same as: collect(&:to_set).inject(:&)
<desperek> :& works with an array tho!
cyclonis_ has quit [Read error: Connection reset by peer]
<havenwood> desperek: Not when there are both Arrays and Sets together.
bmurt has quit [Ping timeout: 245 seconds]
<desperek> well okay, my question was formulated bad then
bmurt has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
jcalla has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
kyrylo has joined #ruby
<Bish> desperek: well.. why not
<Bish> &> [1,2,3] & [2,5]
<rubydoc> parser error at position 0 around `>'
<Bish> > [1,2,3] & [2,5]
<Bish> >> [1,2,3] & [2,5]
<ruby[bot]> Bish: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<havenwood> #=> [2]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
kyrylo has joined #ruby
<desperek> Bish, yea thats why i said nvm later :D thanks
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
xco has quit [Quit: xco]
kyrylo has quit [Read error: Connection reset by peer]
troulouliou_div2 has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
lalitmee has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
reber has quit [Remote host closed the connection]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
Esa_ has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
Esa_ has quit [Client Quit]
kyrylo has joined #ruby
lalitmee has quit [Remote host closed the connection]
lalitmee has joined #ruby
k0mpa has joined #ruby
Esa_ has joined #ruby
ElFerna has joined #ruby
reber has joined #ruby
tehas has quit [Ping timeout: 248 seconds]
deepreds1 has quit [Ping timeout: 272 seconds]
xco has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
suukim has quit [Quit: Konversation terminated!]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
<Bish> desperek: funnel maybe
queip has quit [Ping timeout: 258 seconds]
tsujp has joined #ruby
<Bish> because the domain of the function gets smaller when projected to the codomain
lalitmee has quit [Ping timeout: 245 seconds]
k0mpa has quit [Remote host closed the connection]
kyrylo has quit [Read error: Connection reset by peer]
<desperek> .w.
kyrylo has joined #ruby
suukim has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 245 seconds]
dionysus70 is now known as dionysus69
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
amateur_rubyist has quit [Remote host closed the connection]
amateur_rubyist has joined #ruby
kyrylo has joined #ruby
ElFerna has quit [Quit: Leaving]
drale2k_ has joined #ruby
amateur_rubyist has quit [Ping timeout: 248 seconds]
queip has joined #ruby
alem0lars has joined #ruby
alem0lars has quit [Remote host closed the connection]
amateur_rubyist has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
deepreds1 has joined #ruby
qbeek_ has joined #ruby
banister_ has joined #ruby
kyrylo has joined #ruby
banister_ has quit [Client Quit]
<Bish> type-funnel
banisterfiend has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
alem0lars has joined #ruby
kyrylo has joined #ruby
qbeek has quit [Ping timeout: 252 seconds]
Xiti` is now known as Xiti
fphilipe_ has quit [Ping timeout: 250 seconds]
qbeek_ has quit [Remote host closed the connection]
Bounga` has quit [Remote host closed the connection]
fphilipe has joined #ruby
Bounga` has joined #ruby
banisterfiend has quit [Ping timeout: 244 seconds]
yann-kaelig has quit [Quit: yann-kaelig]
iffraff has joined #ruby
queip has quit [Ping timeout: 248 seconds]
qbeek has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
Bounga` has quit [Ping timeout: 252 seconds]
banisterfiend has joined #ruby
<banisterfiend> hello
<banisterfiend> anyone der?
<Bish> no
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xfbs has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
<banisterfiend> i am talking to you through the glory of a split tunnel 😍
xfbs has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
phroa has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
<havenwood> banisterfiend: o/
<banisterfiend> havenwood wassup
kyrylo has joined #ruby
<banisterfiend> i finally got the split tunnel working on mac :)
<banisterfiend> kyrylo slav
dinfuehr has quit [Ping timeout: 248 seconds]
queip has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
<phaul> don't get too excited about kyrylo :) they are in a constant rejoin loop, they will lose connection in a minute
<phaul> they beat me to it :)
DaRock has quit [Ping timeout: 272 seconds]
dinfuehr has joined #ruby
Snowy has joined #ruby
<desperek> who's kyrylo
<banisterfiend> desperek an east-european computer programmer
kyrylo has joined #ruby
<desperek> hmm
<desperek> banisterfiend, how do you know it
<banisterfiend> desperek we're milk brothers
<desperek> who's milk brother
<desperek> oh...
<desperek> banisterfiend, what
kyrylo has quit [Read error: Connection reset by peer]
<desperek> this is very weird
kyrylo has joined #ruby
dinfuehr has quit [Ping timeout: 258 seconds]
schneider has quit [Ping timeout: 244 seconds]
dinfuehr has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
hiroaki has quit [Ping timeout: 245 seconds]
kyrylo has joined #ruby
Snowy has quit [Quit: ragequit]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
qbeek_ has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Client Quit]
lalitmee has joined #ruby
qbeek has quit [Ping timeout: 252 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
queip has quit [Ping timeout: 272 seconds]
hiroaki has joined #ruby
banisterfiend has joined #ruby
Bounga` has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
Bounga` has quit [Ping timeout: 246 seconds]
TomyWork has quit [Ping timeout: 246 seconds]
kyrylo has quit [Read error: Connection reset by peer]
queip has joined #ruby
qbeek_ has quit [Remote host closed the connection]
kyrylo has joined #ruby
qbeek has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 246 seconds]
kyrylo has joined #ruby
desperek has quit [Quit: mew wew]
drale2k_ has joined #ruby
amateur_rubyist has quit [Remote host closed the connection]
amateur_rubyist has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
joast has quit [Quit: Leaving.]
joast has joined #ruby
kyrylo has joined #ruby
tdy has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
DTZUZU has quit [Read error: Connection reset by peer]
amateur_rubyist has quit [Ping timeout: 272 seconds]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
dviola has quit [Quit: WeeChat 2.5]
nowhereman has joined #ruby
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
orbyt_ has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
Norrin has quit [Quit: ""]
nowhereman has quit [Ping timeout: 272 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
kyrylo has quit [Read error: Connection reset by peer]
qbeek has quit [Ping timeout: 264 seconds]
kyrylo has joined #ruby
drnerdius has quit [Ping timeout: 244 seconds]
kyrylo has quit [Read error: Connection reset by peer]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kyrylo has joined #ruby
kyrylo has quit [Client Quit]
nowhereman has joined #ruby
planigan has joined #ruby
nowhereman has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
jj has joined #ruby
jj has left #ruby [#ruby]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
NL3limin4t0r has quit [Quit: WeeChat 1.9.1]
planigan has quit [Read error: Connection reset by peer]
planigan has joined #ruby
angelixd has joined #ruby
planigan has quit [Ping timeout: 258 seconds]
queip has quit [Ping timeout: 245 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
planigan has joined #ruby
poontangmessiah has joined #ruby
fphilipe has quit [Ping timeout: 250 seconds]
queip has joined #ruby
skyikot has joined #ruby
sameerynho has joined #ruby
Exuma has joined #ruby
wildtrees has joined #ruby
qbeek has joined #ruby
orbyt_ has joined #ruby
wildtrees has quit [Max SendQ exceeded]
skyikot has quit [Ping timeout: 260 seconds]
alem0lars has quit [Ping timeout: 244 seconds]
lalitmee has quit [Remote host closed the connection]
ramfjord has joined #ruby
qbeek has quit [Ping timeout: 252 seconds]
lxsameer has quit [Ping timeout: 245 seconds]
qbeek has joined #ruby
houhoulis has joined #ruby
queip has quit [Ping timeout: 245 seconds]
fphilipe has joined #ruby
nahra has quit [Remote host closed the connection]
skyikot has joined #ruby
nahra has joined #ruby
queip has joined #ruby
poontangmessiah has quit [Remote host closed the connection]
schneider has joined #ruby
tehas has joined #ruby
DTZUZO has joined #ruby
tehas has quit [Client Quit]
qbeek has quit [Remote host closed the connection]
suukim has quit [Quit: Konversation terminated!]
chalkmonster has joined #ruby
amateur_rubyist has joined #ruby
amateur_rubyist has quit [Remote host closed the connection]
amateur_rubyist has joined #ruby
k0mpa has joined #ruby
code_zombie has joined #ruby
fphilipe has quit [Ping timeout: 264 seconds]
amateur_rubyist has quit [Remote host closed the connection]
cyclonis_ has joined #ruby
chalkmonster has quit [Remote host closed the connection]
gix has joined #ruby
cyclonis has quit [Ping timeout: 248 seconds]
sauvin has quit [Read error: Connection reset by peer]
cyclonis_ has quit [Quit: -a- Connection Timed Out]
ravenous_ has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
KeyJoo has joined #ruby
ellcs1 has joined #ruby
whoami_ has joined #ruby
<whoami_> Hello, I am trying to use rake on my Debian 10; however, it keep trying to use ruby2.3 even though ruby2.5 is installed; I've tried to purge rake and reinstall it, but it doesn't change anything, I keep getting this error message: "/usr/bin/env: ‘ruby2.3’: No such file or directory"; how can I fix this issue ?
<adam12> whoami_: What rake binary is being used? `which rake`
<whoami_> adam12, /usr/local/bin/rake
<adam12> whoami_: What's the shebang of that file? `head -1 /usr/local/bin/rake`
<whoami_> adam12, #!/usr/bin/env ruby2.3
<adam12> whoami_: How did you install ruby2.3? ruby2.5?
<whoami_> adam12, sudo apt-get install -y rake, which then installed ruby2.5
<whoami_> adam12, right now, only ruby2.5 is installed on my system
<whoami_> adam12, and apt search doesn't find any ruby2.3
<adam12> whoami_: imho, forget about distro packaged ruby and use a ruby version manager. You likely won't fix this.
angelixd has quit [Ping timeout: 246 seconds]
angelixd has joined #ruby
cd has joined #ruby
<whoami_> adam12, I guess so, well I used 'sudo gem update' instead and this did the job, rake work properly now; thanks !
troulouliou_div2 has joined #ruby
whoami_ has quit [Quit: Leaving]
qbeek has joined #ruby
bmurt has quit [Ping timeout: 250 seconds]
ellcs1 has quit [Ping timeout: 264 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs1 has joined #ruby
cereal has joined #ruby
djdduty has joined #ruby
<cereal> Hi, I'm writing an inspec test that needs to check certain fields from a JSON file. I'm new to Ruby and have basically only learned enough to write unit tests so far. How do I look inside a the body of JSON if the body is a list of items with identical keys?
<cereal> So, like, {"status" = 200, "body" = [{"key" = asdf}, {"key" = sdfg}, {"key" = qwert}]}
fphilipe has joined #ruby
queip has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby
amateur_rubyist has joined #ruby
queip has joined #ruby
houhoulis has quit [Remote host closed the connection]
fphilipe has quit [Ping timeout: 264 seconds]
houhoulis has joined #ruby
<havenwood> cereal: For example, if you have: {"status"=>200, "body"=>[{"key"=>"asdf"}, {"key"=>"sdfg"}, {"key"=>"qwert"}]}
<havenwood> cereal: h.dig('body', 2, 'key') #=> "qwert"
agent_white has joined #ruby
djdduty has quit [Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in]
<havenwood> &24>> {"status"=>200, "body"=>[{"key"=>"asdf"}, {"key"=>"sdfg"}, {"key"=>"qwert"}]}.dig('body', 2, 'key')
<rubydoc> # => "qwert" (https://carc.in/#/r/7fc2)
<havenwood> cereal: Or, pass `symbolize_names: true` when you deserialize the JSON, so you can use Symbol keys.
<cereal> Thanks.
<havenwood> cereal: h.dig(:body, 2, :key)
<havenwood> &24>> JSON.parse("{\"status\":200,\"body\":[{\"key\":\"asdf\"},{\"key\":\"sdfg\"},{\"key\":\"qwert\"}]}", symbolize_keys: true)
<rubydoc> stderr: -e:2:in `<main>': uninitialized constant JSON (NameError) (https://carc.in/#/r/7fc3)
<havenwood> &24>> require 'json'; JSON.parse("{\"status\":200,\"body\":[{\"key\":\"asdf\"},{\"key\":\"sdfg\"},{\"key\":\"qwert\"}]}", symbolize_keys: true)
<rubydoc> # => {"status"=>200, "body"=>[{"key"=>"asdf"}, {"key"=>"sdfg"}, {"key"=>"qwert"}]} (https://carc.in/#/r/7fc4)
<havenwood> Oh, right.
<havenwood> &24>> require 'json'; JSON.parse("{\"status\":200,\"body\":[{\"key\":\"asdf\"},{\"key\":\"sdfg\"},{\"key\":\"qwert\"}]}", symbolize_names: true)
<rubydoc> # => {:status=>200, :body=>[{:key=>"asdf"}, {:key=>"sdfg"}, {:key=>"qwert"}]} (https://carc.in/#/r/7fc5)
<havenwood> {:status=>200, :body=>[{:key=>"asdf"}, {:key=>"sdfg"}, {:key=>"qwert"}]}.dig(:body, 2, :key)
djdduty has joined #ruby
<havenwood> #=> "qwert"
Milos has quit [Ping timeout: 245 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drale2k_ has joined #ruby
queip has quit [Ping timeout: 258 seconds]
qbeek has quit [Quit: Leaving...]
fphilipe has joined #ruby
VeryBewitching has joined #ruby
queip has joined #ruby
skyikot has quit [Ping timeout: 260 seconds]
queip has quit [Ping timeout: 245 seconds]
ravenous_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mynameisdebian has joined #ruby
<mynameisdebian> havenwood: A while back I was having an issue where my Apache server was failing to respond to a Slack message quickly enough, and you advised me to do a Process.detach fork{}, and put the code that was taking a long time inside of the braces. However, I am finding that my Apache server is still waiting for the child process to complete before closing the connection, even though the script itself continues processing immediately without waiting for
<mynameisdebian> the code in the block to complete. I am wondering if you have any ideas why that is happening or how I might be able to fix it?
queip has joined #ruby
leitz has joined #ruby
<mynameisdebian> If I have some JSON that I would like to be the body of an HTTP request, I can I pass that JSON to curl via a system call?
<mynameisdebian> "how can I pass"
ur5us has joined #ruby
<leftylink> hmm. I usually use the -d flag for that.
code_zombie has quit [Quit: Leaving]
<nius> Hi, in when I redefine the [] method in the main Object, I can only access it using self[], not just []
<nius> why is that?
schneider has quit [Ping timeout: 245 seconds]
banisterfiend has joined #ruby
ElFerna has joined #ruby
ElFerna has quit [Remote host closed the connection]
ElFerna has joined #ruby
skyikot has joined #ruby
rainer_tm has joined #ruby
<ramfjord> mynameisdebian: regarding your asnc processing load for apache responses: when I do that sort of thing I would prefer to write the work units to a queue, and have a set of workers popping items off that queue for processing asynchronously. Forking on each one seems like it would take a while just because forking itself takes a while. It would be more infra changes though.
fphilipe has quit [Ping timeout: 252 seconds]
<ramfjord> depending on your req/second, you could use a PG database, or redis/rabitMQ, or just a ruby in memory Queue connected via a unix pipe (though beware pipe buffer size is not very big)
<ramfjord> maybe even SQLite if it's small enough and you only have 1 web writer process
<ramfjord> RE. shelling out to curl (system call has a kind of specific meaning that I don't think you're using), should just be able to do something like: https://gist.githubusercontent.com/ramfjord/85581a49e19addcf2cf8066c61312bf4/raw/0d9f75ad0f6c65cd87f710c6990b82607b006302/curl_with_data.rb
<ramfjord> but you should definitely use an HTTP library for that instead of shelling out
<ramfjord> but there are many good ones
leitz has quit [Quit: Leaving]
angelixd has quit [Remote host closed the connection]
angelixd has joined #ruby
AJA4350 has quit [Ping timeout: 246 seconds]
Milos has joined #ruby
queip has quit [Ping timeout: 268 seconds]
Milos has quit [Max SendQ exceeded]
Milos has joined #ruby
queip has joined #ruby
Esa_ has quit []
DTZUZO has quit [Ping timeout: 258 seconds]
DTZUZO has joined #ruby
Milos has quit [Max SendQ exceeded]
fphilipe has joined #ruby
Milos has joined #ruby
AJA4350 has joined #ruby
banisterfiend has quit [Ping timeout: 268 seconds]
<mynameisdebian> ramfjord, the issue is that in order to push my code I have to request a merge and wait like a day, which makes it difficult at this stage to break up my program into worker queues. The reason I'm shelling out instead of just using an HTTP library for this is that it is a CGI script running on Apache that is supposed to receive Slack messages. Slack throws an error in the channel if a response is not received within 3 seconds, and Apache waits for
<mynameisdebian> Ruby to exit before sending the response. I've tried this numerous way but I don't believe it will work any other way (besides worker queues like you suggested, but I'm trying to avoid that)
Milos has quit [Ping timeout: 244 seconds]
xco has quit [Quit: xco]
Milos has joined #ruby
wymillerlinux has quit [Remote host closed the connection]
sameerynho has quit [Ping timeout: 268 seconds]
ElFerna has quit [Quit: Leaving]
fphilipe has quit [Ping timeout: 252 seconds]
<mynameisdebian> How can I execute a shell command in my Ruby CGI script without Apache waiting for the shell command to finish? My CGI script receives messages from Slack and must respond with "200 OK" within 3 seconds, but Apache waits until everything has resolved before sending the 200 message.
angelixd has quit [Ping timeout: 272 seconds]
x86sk has joined #ruby
dionysus69 has quit [Ping timeout: 272 seconds]
troulouliou_div2 has quit [Ping timeout: 268 seconds]
sameerynho has joined #ruby
luminousnine has joined #ruby
bambanx has joined #ruby
bambanx has quit [Client Quit]
bambanx has joined #ruby
dviola has joined #ruby
chalkmonster has joined #ruby
sameerynho has quit [Ping timeout: 248 seconds]
VeryBewitching has quit [Quit: Konversation terminated!]
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4350 has joined #ruby
stryek has quit [Quit: Connection closed for inactivity]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
ellcs1 has quit [Ping timeout: 245 seconds]
<havenwood> mynameisdebian: Sometimes you just need to ignore your zombie grandchildren...
<havenwood> mynameisdebian: I think you'd find that Rack with Threads is way simpler to work with, but CGI with Processes does lead you down an interesting path at least.
<havenwood> mynameisdebian: Double forking is a trick that might work in your case. A worker queue is a more conventional approach.
<havenwood> mynameisdebian: https://gist.github.com/fogus/1216429
<havenwood> mynameisdebian: I suspect that pattern will work as you'd like it. I still advise checking out Rack.
cereal has quit [Remote host closed the connection]
<havenwood> IIR, Process.daemon does a double fork these days.
reber has quit [Remote host closed the connection]
drale2k_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
queip has quit [Ping timeout: 245 seconds]