<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?
<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]
<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
<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…]
<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?
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
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]
<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.