havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.3; 2.2.6; 2.1.10: https://www.ruby-lang.org || Paste >3 lines of text on https://gist.github.com || Rails questions? Ask on #RubyOnRails || logs @ https://irclog.whitequark.org/ruby/
redpants has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
cyphase has quit [Ping timeout: 250 seconds]
<baweaver_away> apeiros: it cost you the bandwidth of receiving those characters
baweaver_away is now known as baweaver
<baweaver> Anyways, cheaper atomic ops just use Redis
fnord_ is now known as CrazyEddy
cyphase has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
<scootaloo> baweaver: which he would pay anyway even if I didn't sent them
<baweaver> Hrm. Time is money?
<scootaloo> heh
nettoweb has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nettoweb has quit [Client Quit]
Madplatypus has joined #ruby
charliesome has joined #ruby
ss_much has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
montanonic has joined #ruby
nettoweb has joined #ruby
charliesome has quit [Client Quit]
nankyokusei has joined #ruby
JeanCarloMachado has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zeroDi has quit [Quit: WeeChat 1.6]
charliesome has joined #ruby
jtdoncas has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
postmodern has joined #ruby
zukin has joined #ruby
chouhoulis has joined #ruby
charliesome has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
cinderhaze has joined #ruby
cinderhaze has left #ruby ["WeeChat 0.3.8"]
charliesome has quit [Client Quit]
atmosx has quit [Quit: Textual IRC Client: www.textualapp.com]
JoshS has joined #ruby
enterprisey has joined #ruby
charliesome has joined #ruby
rwb has joined #ruby
jaguarmagenta has joined #ruby
Coldblackice has joined #ruby
seggy has quit [Quit: leaving]
Coldblackice has quit [Client Quit]
seggy has joined #ruby
LoneHerm_ has joined #ruby
skweek has joined #ruby
seggy has quit [Client Quit]
Derperperd has quit [Quit: Derperperd]
face has joined #ruby
chouhoulis has quit [Remote host closed the connection]
seggy has joined #ruby
Coldblackice has joined #ruby
sdwrage_ has quit [Quit: This computer has gone to sleep]
Coldblackice has quit [Max SendQ exceeded]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Coldblackice has joined #ruby
cinderhaze has joined #ruby
montanonic has quit [Ping timeout: 245 seconds]
SteenJobs has quit [Quit: peaceee]
SCHAAP137 has joined #ruby
cinderhaze has left #ruby ["WeeChat 0.3.8"]
scootaloo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
charliesome has quit [Client Quit]
LoneHerm_ has quit [Remote host closed the connection]
sdwrage_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
SCHAAP137 has quit [Quit: Leaving]
montanonic has joined #ruby
zukin has quit [Quit: leaving]
Rodya_ has joined #ruby
ResidentBiscuit has joined #ruby
SCHAAP137_ has joined #ruby
SCHAAP137_ has quit [Changing host]
SCHAAP137_ has joined #ruby
JoshS has quit [Quit: Leaving]
SCHAAP137_ is now known as SCHAAP137
hightower2 has joined #ruby
hightower2 has quit [Max SendQ exceeded]
maloik has quit [Remote host closed the connection]
<b0nn> ok, if I launch a thread, do I need to store that thread object somewhere so that I can join that thread at some later (arbitrary) time?
hightower2 has joined #ruby
maloik has joined #ruby
<b0nn> I have a hash storing my object that is launched by the thread, I can stop that ok, but I want to be sure that the thread is killed off at the same time
hightower3 has quit [Ping timeout: 260 seconds]
marr has quit [Ping timeout: 250 seconds]
ResidentBiscuit has quit [Ping timeout: 258 seconds]
sepp2k has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
xsdg has quit [Ping timeout: 245 seconds]
jcao219 has joined #ruby
aryaching_ has quit [Ping timeout: 265 seconds]
xsdg has joined #ruby
aryaching has joined #ruby
enterprisey has joined #ruby
montanonic has quit [Ping timeout: 240 seconds]
SCHAAP137 has quit [Quit: ZNC - http://znc.in]
SCHAAP137 has joined #ruby
XV8 has joined #ruby
nankyokusei has joined #ruby
tubbo has quit [Ping timeout: 258 seconds]
<brent__> antoniobeyah: I've been building on this pattern http://blog.iempire.ru/2015/08/19/s3-direct-uploads/
<matthewd> b0nn: You should join the thread if you need to be sure it has finished doing what it was doing, from some other thread (including main), before said other thread continues
duper has quit [Ping timeout: 240 seconds]
grug has quit [Ping timeout: 244 seconds]
<brent__> am i missing something on how to store the S3 credentials?
rikai has quit [Ping timeout: 260 seconds]
sdwrage_ has quit [Quit: Leaving]
nankyokusei has quit [Ping timeout: 265 seconds]
rikai has joined #ruby
tubbo has joined #ruby
grug has joined #ruby
<brent__> nvm, sounds like they are probably using figaro
giraffe has quit [Quit: ZNC - http://znc.in]
hahuang65 has quit [Quit: WeeChat 1.4]
duper has joined #ruby
scottpgallagher has joined #ruby
djbkd has quit [Quit: My people need me...]
<b0nn> matthewd: yes, I undertsand that, the issue I was having was identifying that thread
<b0nn> matthewd: My solution was to store two objects in a hash, and store that hash in my main hash, such that when I wanted to finish with the object I accessed by the object and the thread associated with it
<matthewd> Okay, yes, if you need to join the thread, then you need to store it when you create it
<b0nn> Ah, good, thanks, that validates my thoughts
<matthewd> You may be better served with higher level concepts like a Future, though
<matthewd> See the concurrent-ruby gem for such things
<b0nn> ok, I'll note that down for next time
giraffe has joined #ruby
tpendragon has joined #ruby
chouhoulis has joined #ruby
kbdkode has quit [Quit: ew freenode]
Guest43 has joined #ruby
trout has quit [Quit: found 1 in /dev/zero]
tau has joined #ruby
chouhoulis has quit [Remote host closed the connection]
tau has quit [Remote host closed the connection]
ELLIOTTCABLE is now known as KL4JC
cibs has quit [Ping timeout: 268 seconds]
cibs has joined #ruby
raul782 has joined #ruby
JoshS has joined #ruby
JesseH has joined #ruby
tubbo has quit [Ping timeout: 260 seconds]
beilabs has joined #ruby
rikai has quit [Ping timeout: 240 seconds]
grug has quit [Ping timeout: 246 seconds]
duper has quit [Ping timeout: 268 seconds]
SegFaultAX has quit [K-Lined]
G has quit [K-Lined]
Yzguy has joined #ruby
arescorpio has joined #ruby
raul782 has quit [Ping timeout: 248 seconds]
d^sh has quit [Ping timeout: 246 seconds]
SegFaultAX has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
Rodya_ has quit [Remote host closed the connection]
d^sh has joined #ruby
kb2tfa has joined #ruby
Yzguy has quit [Quit: Cya]
jcao219 has quit [Ping timeout: 260 seconds]
XV8 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has quit [Remote host closed the connection]
Rodya_ has joined #ruby
zapata has joined #ruby
ResidentBiscuit has joined #ruby
montanonic has joined #ruby
Rodya_ has quit [Ping timeout: 258 seconds]
nankyokusei has joined #ruby
ResidentBiscuit has quit [Ping timeout: 258 seconds]
symm- has quit [Ping timeout: 260 seconds]
G has joined #ruby
Rodya_ has joined #ruby
G has quit [Client Quit]
beilabs has quit [Remote host closed the connection]
G has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
mrwn has joined #ruby
mrwn has quit [Remote host closed the connection]
beilabs_ has joined #ruby
ResidentBiscuit has joined #ruby
<b0nn> ok, I'm having trouble with scope
matp has joined #ruby
matp_ has quit [Read error: Connection reset by peer]
<b0nn> So, I'm not sure how to add the twitter_grab_instance to the couple hash, without being inside the Thread creation
rikai has joined #ruby
tubbo has joined #ruby
<b0nn> if I add the object inside the Thread creation, how do I associate the Thread object with it?
jgnagy has joined #ruby
duper has joined #ruby
ResidentBiscuit has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
grug has joined #ruby
Coldblackice has quit [Ping timeout: 250 seconds]
ResidentBiscuit has joined #ruby
jgnagy has quit [Ping timeout: 268 seconds]
libastral has quit [Ping timeout: 256 seconds]
Vile` has quit [Ping timeout: 246 seconds]
libastral has joined #ruby
Coldblackice has joined #ruby
SCHAAP137 has quit [Quit: ZNC - http://znc.in]
ResidentBiscuit has quit [Ping timeout: 260 seconds]
bocaneri has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<antoniobeyah> brent__: if running in aws, use an IAM role instead
SCHAAP137 has joined #ruby
vikaton has joined #ruby
harai_ has quit [Ping timeout: 258 seconds]
ResidentBiscuit has joined #ruby
enterprisey has joined #ruby
ResidentBiscuit has quit [Ping timeout: 245 seconds]
aryaching has quit [Ping timeout: 250 seconds]
sepp2k has quit [Read error: Connection reset by peer]
Batholith has quit [Ping timeout: 240 seconds]
<brent__> antoniobeyah: what do you mean by 'running in aws'?
<brent__> like hosting the site on aws?
<antoniobeyah> yes
<antoniobeyah> dont use keys if your servers run in aws
<brent__> i'll probably just host it on heroku
harai has joined #ruby
beilabs_ has quit [Remote host closed the connection]
<antoniobeyah> ok, you will need to use access keys then
<b0nn> oh, I see, when I am inside the Thread.create block I am inside the new thread
<brent__> did you say anything before the IAM role, thing? I signed off
Batholith has joined #ruby
<antoniobeyah> nope, you can check the room log using the link in the header
<antoniobeyah> *topic
<brent__> ooh, thanks
Madplatypus has quit [Quit: Connection closed for inactivity]
blackwind_123 has quit [Ping timeout: 240 seconds]
helpa has quit [Remote host closed the connection]
unreal has quit [Ping timeout: 250 seconds]
helpa has joined #ruby
harai has quit [Ping timeout: 247 seconds]
antoniobeyah has quit [Quit: antoniobeyah]
unreal has joined #ruby
drorp24[m] has quit [Remote host closed the connection]
coreyja[m] has quit [Read error: Connection reset by peer]
Luca[m] has quit [Read error: Connection reset by peer]
M-mistake has quit [Write error: Connection reset by peer]
h42r62[m] has quit [Remote host closed the connection]
Giphy[m] has quit [Remote host closed the connection]
tobyn[m] has quit [Read error: Connection reset by peer]
kineticrootkit[m has quit [Read error: Connection reset by peer]
eliotk[m] has quit [Read error: Connection reset by peer]
Donalmartin[m] has quit [Read error: Connection reset by peer]
jomakasi[m] has quit [Read error: Connection reset by peer]
Michael5[m] has quit [Read error: Connection reset by peer]
daveyboi[m] has quit [Write error: Connection reset by peer]
M-shine has quit [Write error: Connection reset by peer]
bascht has quit [Write error: Connection reset by peer]
velu_aon[m] has quit [Read error: Connection reset by peer]
vma[m] has quit [Read error: Connection reset by peer]
laithshadeed[m] has quit [Write error: Connection reset by peer]
M-manveru has quit [Write error: Connection reset by peer]
guanjian[m] has quit [Write error: Connection reset by peer]
davix[matrix] has quit [Write error: Connection reset by peer]
fladson[m] has quit [Read error: Connection reset by peer]
cpfeilschifter[m has quit [Write error: Connection reset by peer]
n[m] has quit [Read error: Connection reset by peer]
fjj[m] has quit [Write error: Connection reset by peer]
riotgsmport[m] has quit [Remote host closed the connection]
meaggan[m] has quit [Read error: Connection reset by peer]
philidor[m] has quit [Read error: Connection reset by peer]
serah[m] has quit [Remote host closed the connection]
nankyokusei has joined #ruby
mrsolo has quit []
ghostlight has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 246 seconds]
hanmac has quit [Ping timeout: 260 seconds]
ghostlight has joined #ruby
antoniobeyah has joined #ruby
mwlang has joined #ruby
xrlk has quit [Quit: HEIL HITLER]
xrlk has joined #ruby
kireevco has quit []
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sdothum has joined #ruby
KL4JC has quit []
djbkd has joined #ruby
loloz has joined #ruby
<loloz> I'm using VSC and xampp and I can't get to enable debugging php. in php info it says xdebug is on. in visual studio i have extension. i have setup path to xampp php.exe.everything is as it's should be but i can't get debugging on. can someone help?
SCHAAP137 has quit [Quit: ZNC - http://znc.in]
SCHAAP137 has joined #ruby
hanmac has joined #ruby
johnzorn has joined #ruby
Rodya_ has joined #ruby
jphase has joined #ruby
postmodern has quit [Quit: Leaving]
gix has quit [Ping timeout: 256 seconds]
reverberations has quit [Quit: Leaving]
cubicme has joined #ruby
drorp24[m] has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<cubicme> hey any idea why this might freeze and spike cpu usage? gsub(/<a\s.*?href=["'](mailto:)?([^"']*?)["'][^>]*?>((.|\s)*?)<\/a>/i, "\\3")
gix has joined #ruby
kb2tfa has quit [Quit: Leaving]
tummy has joined #ruby
sdothum has joined #ruby
kb2tfa has joined #ruby
Rodya_ has quit [Ping timeout: 260 seconds]
<b0nn> hm, file writing trouble: https://bpaste.net/show/7d77c726d733 once I call open(@filename, 'a') the application hangs
_crdpink has joined #ruby
fmcgeough has quit [Ping timeout: 244 seconds]
fmcgeough has joined #ruby
BTRE has quit [Ping timeout: 244 seconds]
eclm has quit [Ping timeout: 260 seconds]
kb2tfa has left #ruby [#ruby]
eclm has joined #ruby
raul782 has joined #ruby
<b0nn> nm, it's the @is_running = True call
<b0nn> I keep using True/False instead of true/false
crdprink has quit [Ping timeout: 260 seconds]
Lildirt has quit [Ping timeout: 250 seconds]
Synthead has quit [Ping timeout: 256 seconds]
twistedpixels has quit [Ping timeout: 265 seconds]
buglessdr has joined #ruby
<b0nn> cubicme: as a wild guess (and probably wildly inaccurate) how greedy is that regexp?
Lildirt has joined #ruby
twistedpixels has joined #ruby
twistedpixels has quit [Changing host]
twistedpixels has joined #ruby
raul782_ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raul782 has quit [Ping timeout: 265 seconds]
Jayson_Virissimo has joined #ruby
Synthead has joined #ruby
KnownSyntax has quit [Read error: Connection reset by peer]
loloz has left #ruby ["Leaving"]
tax has joined #ruby
BTRE has joined #ruby
jomakasi[m] has joined #ruby
Luca[m] has joined #ruby
davix[matrix] has joined #ruby
kineticrootkit[m has joined #ruby
tobyn[m] has joined #ruby
eliotk[m] has joined #ruby
coreyja[m] has joined #ruby
Michael5[m] has joined #ruby
laithshadeed[m] has joined #ruby
daveyboi[m] has joined #ruby
meaggan[m] has joined #ruby
fjj[m] has joined #ruby
riotgsmport[m] has joined #ruby
n[m] has joined #ruby
guanjian[m] has joined #ruby
philidor[m] has joined #ruby
M-manveru has joined #ruby
bascht has joined #ruby
Giphy[m] has joined #ruby
M-shine has joined #ruby
velu_aon[m] has joined #ruby
cpfeilschifter[m has joined #ruby
M-mistake has joined #ruby
Donalmartin[m] has joined #ruby
serah[m] has joined #ruby
h42r62[m] has joined #ruby
vma[m] has joined #ruby
fladson[m] has joined #ruby
mwlang has quit [Quit: mwlang]
skweek has quit [Ping timeout: 265 seconds]
tristanp has joined #ruby
raul782_ has quit [Remote host closed the connection]
arescorpio has quit [Quit: Leaving.]
beilabs has joined #ruby
tristanp has quit []
minimalism has quit [Quit: minimalism]
nankyokusei has joined #ruby
minimalism has joined #ruby
jenrzzz has joined #ruby
tax has quit [Quit: Leaving]
nankyokusei has quit [Ping timeout: 245 seconds]
jgnagy has joined #ruby
<cubicme> b0nn: i guess not at all since i put ‘?’ everywhere
cubicme has left #ruby [#ruby]
cubicme has joined #ruby
<b0nn> cubicme: best way to find out is try it in a regexp tester
KL4JC has joined #ruby
tmtwd has joined #ruby
<b0nn> cubicme: eg. http://rubular.com/
<cubicme> any suggestion; btw, it works most of the time, just hangs on some pages
<cubicme> b0nn: thanks
r3vDev has joined #ruby
raul782 has joined #ruby
jgnagy has quit [Ping timeout: 260 seconds]
SkrubLord has joined #ruby
govg has joined #ruby
muelleme has joined #ruby
xcyclist has quit [Quit: Page closed]
raul782 has quit [Read error: Connection reset by peer]
raul782_ has joined #ruby
johnny56 has quit [Ping timeout: 246 seconds]
johnny56 has joined #ruby
KL4JC is now known as ELLIOTTCABLE
SkrubLord is now known as ButtMuffler
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
dcluna has quit [Ping timeout: 250 seconds]
Devalo has joined #ruby
LoneHerm_ has joined #ruby
ResidentBiscuit has joined #ruby
chouhoulis has joined #ruby
raul782_ has quit [Remote host closed the connection]
<jtdoncas> by hangs you just mean it takes a while to run?
Devalo has quit [Ping timeout: 246 seconds]
ResidentBiscuit has quit [Ping timeout: 258 seconds]
ButtMuffler is now known as savage
raul782 has joined #ruby
<jtdoncas> cubicme: ^
<cubicme> jtdoncas: no, i’ve seen it taking 20hours without getting result
beilabs has quit [Remote host closed the connection]
<jtdoncas> not sure. could be improved I think though: /<a\s.*?href=(["'])(?:mailto:)?([^\1]*?)\1[^>]*?>(.*?)<\/a>/
beilabs has joined #ruby
pilne has quit [Quit: Quitting!]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 256 seconds]
hogetaro has quit [Read error: Connection reset by peer]
p0p0pr37 has quit [Read error: Connection reset by peer]
hogetaro has joined #ruby
p0p0pr37 has joined #ruby
byte512 has quit [Quit: WeeChat 1.6]
<b0nn> ugh, why is Ruby so inconsistant
<b0nn> @connection = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https')
davidmichaelkarr has quit []
<b0nn> never returns
c355e3b has quit [Quit: Connection closed for inactivity]
<b0nn> oh I see, I should call Net::HTTP.new first?
KnownSyntax has joined #ruby
<b0nn> nope that's a fail :(
montanonic has quit [Ping timeout: 268 seconds]
blackwind_123 has joined #ruby
dviola has quit [Quit: WeeChat 1.6]
davidmichaelkarr has joined #ruby
<jtdoncas> cubicme: you probably should set a maximum length to your greediness too. For large files the regex engine could be checking a huge number of combinations
izaac has quit [Ping timeout: 268 seconds]
naprimer_2 has quit [Ping timeout: 258 seconds]
<jtdoncas> cubicme: but I would try fixing the regex first. Should be: /<a\s.*?href=(["'])(?:mailto:)?([^\1]*?)\1[^>]*?>([\s\S]*?)<\/a>/
<antoniobeyah> b0nn: what are you trying to do?
blackwind_123 has quit [Ping timeout: 265 seconds]
Guest43 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest43 has joined #ruby
Guest43 has quit [Client Quit]
blackwind_123 has joined #ruby
dnicole has quit [Remote host closed the connection]
<antoniobeyah> the docs for net::http explains most of the ops https://ruby-doc.org/stdlib-2.3.3/libdoc/net/http/rdoc/Net/HTTP.html
<b0nn> I've read them and they are missing information
<antoniobeyah> like what?
<b0nn> like I wanted a reference to the new Net::HTTP object
<b0nn> then to use that object
<b0nn> but it won'tlet me
<antoniobeyah> to do what with it?
<b0nn> @connection = Net::HTTP.new(uri.host, uri.port, use_ssl: uri.scheme == 'https')
<b0nn> request = @connection::Post.new uri.request_uri
<b0nn> *hang*
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
alan_w has quit [Quit: WeeChat 1.4]
<jtdoncas> Net::HTTP::Post.new
xall_ has joined #ruby
<jtdoncas> then @connection.request(request)
nankyokusei has joined #ruby
<b0nn> so.. why can I not use the object I have just created?
brent__ has quit [Quit: Connection closed for inactivity]
<b0nn> why the second call to Net::HTTP
<jtdoncas> I mean, the connection object is an instance of Net::HTTP
<jtdoncas> Post is a class under Net::HTTP
Rr4sT has joined #ruby
izaac has joined #ruby
<b0nn> yes..
<b0nn> why doesn't this have access to that class
<b0nn> @connection = Net::HTTP.new(uri.host, uri.port, use_ssl: uri.scheme == 'https')
<cubicme> jtdoncas: it worked! thanks. but it’s weird, almost anything other than the one i used works
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
brendan- has joined #ruby
<jtdoncas> cubicme: awesome :) Yeah, it will do funny things if there's mismatched quotes
<jtdoncas> cubicme: so like <a href="www.google.ca?arg=';woops'">blah</a> would screw up your previous regex
<jtdoncas> b0nn: Do you understand the difference between an instance and a class?
jenrzzz has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
<b0nn> yes
raul782 has quit [Remote host closed the connection]
XV8 has joined #ruby
<b0nn> tare you saying my instance has no access to any of the classes under it
<b0nn> I am not able to instantiate a class that I should get for free?
<jtdoncas> ????
<b0nn> ???????
<antoniobeyah> b0nn: are you just trying to submit a form
<antoniobeyah> ?
<b0nn> have you understood what I have been trying to do?
<b0nn> antoniobeyah: I'm trying to use the streaming api
<b0nn> antoniobeyah: I need to be able to arbitrarily close the connection
<b0nn> antoniobeyah: that's why I need a reference to the connection
naprimer_2 has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
r3vDev has quit [Ping timeout: 246 seconds]
<jtdoncas> man... it's very simple
<jtdoncas> there's even an example in the ruby docs 'streaming response bodies'
<b0nn> jtdoncas: it's always simple when you already know what you are looking for
<antoniobeyah> is there a reason using ::start with a block doesn’t do what you want?
<antoniobeyah> trying to understand where you are hung up
<b0nn> jtdoncas: you've completely misunderstood what I have been saying
<b0nn> jtdoncas: the example DOES NOT SHOW HOW TO ARBITRARILY INTERRUPT THE PROCESS
chouhoulis has quit [Remote host closed the connection]
djbkd has joined #ruby
<baweaver> easy on the caps there.
<b0nn> antoniobeyah: I am trying to get a reference to the connection such that I can call.finish when ever I need to
Jayson_Virissimo has quit []
<b0nn> baweaver: sorry, it's frustrating being told I have't been reading the docs and it's simple when I do, when what I am looking for isn't there
<jtdoncas> how is it not there?
<jtdoncas> @connection.finish
<b0nn> oh for gawds sake
bmurt has joined #ruby
<b0nn> I cannot get the reference.. it hangs
jshjsh has joined #ruby
<b0nn> for the third time
<antoniobeyah> can you post a gist?
<b0nn> scroll up I've posted the code a few times
KnownSyntax has quit [Quit: All Quassel clients vanished from the face of the earth...]
<antoniobeyah> like a complete one that shows the failure
<b0nn> I can show you the current attempt
<antoniobeyah> that’d be great
<baweaver> b0nn: Y'might want to take a few minutes off soon, you're getting a bit flustered.
<baweaver> Makes it hard to find things
JoshS has quit [Ping timeout: 265 seconds]
<b0nn> It's been frustrating for the whole weekend, but I do understand your point
<b0nn> currently it hangs at line 17
<baweaver> Note that I'm not answering because I haven't gotten through everything yet.
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
vikaton has quit [Quit: Connection closed for inactivity]
<baweaver> 21 is off
<baweaver> >> !!true
<ruby[bot]> baweaver: # => true (https://eval.in/690594)
<baweaver> glancing the docs for 19 / etc
<b0nn> that's a remnant of a previous attemt at trying to insert a break by changing the boolean
Immune has quit [Quit: ZzzZZZzzzz]
izaac has quit [Ping timeout: 246 seconds]
* baweaver tabs over to pry
Immune has joined #ruby
<b0nn> it never gets past line 17 (I just put a puts statement between 17 and 18)
LoneHerm_ has quit [Remote host closed the connection]
<baweaver> &ri Net::HTTP::Post#oauth!
<_derpy> No results
<baweaver> hrm.
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<jtdoncas> yeah I don't know what that oauth! function is
<baweaver> Where'd you find Net::HTTP::Post#oauth! ?
<baweaver> b0nn ^
<al2o3-cr> gem i oauth first
<antoniobeyah> i was assuming some gem monkeypatch
<baweaver> probably
Rodya_ has joined #ruby
<baweaver> Trying to verse myself on a bit of oauth
<b0nn> it's from some code I found the yesterday
charliesome has joined #ruby
s2013 has joined #ruby
<jtdoncas> what -exactly- do you see when you run that code? it just hangs? for how long? does it finally return something?
<baweaver> jtdoncas: underscore is italics in markdown, that's just strikeout ;)
<b0nn> jtdoncas: when I use the Net::HTTP instead of the reference, things work in a timely manner
xall_ has quit [Ping timeout: 256 seconds]
<b0nn> but it hangs for several minutes when I use the reference
<antoniobeyah> b0nn: i think the use_ssl on line 7 shouldn’t be there
<antoniobeyah> i see that as an option for ::start but not for ::new
Rodya_ has quit [Ping timeout: 258 seconds]
<antoniobeyah> notice the use of ::start instead of ::new
<antoniobeyah> try removing the use_ssl bit
<jtdoncas> aye. you also need to do connection.start if you are using new
* b0nn tries not to scream
<jtdoncas> (why are you using new instead of start?)
<b0nn> jtdoncas: are you not able to read at all?
<antoniobeyah> jtdoncas: he desires to manage the connection himself vs it autoclosing
<jtdoncas> start doesn't autoclose
<antoniobeyah> when given a block it will
<jtdoncas> it auto... starts
<jtdoncas> and he's not using a block
<antoniobeyah> with that said you do have the ability to close manually
<jtdoncas> but he still has to start it
<antoniobeyah> yeah for the code shown he could use start
<antoniobeyah> b0nn: any luck with the removal of the use_ssl?
<antoniobeyah> (i haven’t done raw net/http stuff in a while)
redpants has quit [Ping timeout: 244 seconds]
alan_w has joined #ruby
<b0nn> https://bpaste.net/show/d3afd2e0cfae never makes it past line 13
<jtdoncas> b0nn: connection.use_ssl = true; connection.start and do as before
shinnya has joined #ruby
izaac has joined #ruby
<b0nn> it cannot be =true
<b0nn> I'll pass it a hash
<jtdoncas> #start doesn't accept any arguments
<antoniobeyah> @connection.use_ssl = true is needed
<b0nn> ok, I see my mistake there
<b0nn> *that* appears to be working
<antoniobeyah> cool
<b0nn> I'll just have to wait for some data to come from the actual stream to be sure
vuoto has joined #ruby
<b0nn> boom
<b0nn> it works
<jtdoncas> nice
<b0nn> thank you very much
<antoniobeyah> that first version should have thrown an exception
<antoniobeyah> you might be swallowing them
<antoniobeyah> so I would check for that somewhere
s2013 has quit [Read error: Connection reset by peer]
Yzguy has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jshjsh is now known as JoshS
Asher1 has joined #ruby
scottpgallagher has quit [Quit: Connection closed for inactivity]
qguv has quit [Ping timeout: 260 seconds]
Asher has quit [Ping timeout: 260 seconds]
jtdoncas has quit [Quit: WeeChat 1.5]
s2013 has joined #ruby
jtdoncas has joined #ruby
redpants has joined #ruby
d0nn1e has quit [Ping timeout: 250 seconds]
djbkd has quit [Quit: Leaving...]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
qguv has joined #ruby
<b0nn> and another step backwards
d0nn1e has joined #ruby
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
izaac has quit [Ping timeout: 265 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jtdoncas> what's your code
aphprentice has quit [Quit: Connection closed for inactivity]
Lildirt has quit [Ping timeout: 256 seconds]
nankyokusei has joined #ruby
Lildirt has joined #ruby
<b0nn> heh
<b0nn> this is hard to figure what's causing the error
<jtdoncas> paste the code!
valkyr2e has quit [Ping timeout: 256 seconds]
Havvy has joined #ruby
<b0nn> there are four points, the REST server I have cobbled together, the client I have cobbled together, the Twitter connection, and the file I am saving to
KiChjang has joined #ruby
TheMoonMaster has quit [Ping timeout: 252 seconds]
Havvy has left #ruby ["Leaving"]
<jtdoncas> what's in stream.rb
<KiChjang> i want to start contributing to ruby, but i'm not sure where to start, can anybody help?
valkyr2e has joined #ruby
nankyokusei has quit [Ping timeout: 248 seconds]
ss_much has quit [Quit: Connection closed for inactivity]
blackbom1 has quit [Ping timeout: 245 seconds]
TheMoonMaster has joined #ruby
<b0nn> what happens is, I call the stop method from the client
<b0nn> all the debug stuff is printed out
<b0nn> but both the server and client stay connected until it explodes
jenrzzz has quit [Ping timeout: 250 seconds]
<jtdoncas> well I would call @connection.finish before @file.close
charliesome has joined #ruby
<b0nn> I've tried both ways
<jtdoncas> yeah that's not the issue
<jtdoncas> still an issue tho
<baweaver> KiChjang: ?starting_open_source
jgnagy has joined #ruby
<baweaver> ...dangit, one sec
<KiChjang> baweaver, is that a question?
<baweaver> It was a bot command
<baweaver> ?starting_open_source
<ruby[bot]> baweaver: I don't know anything about starting_open_source
<baweaver> hrm.
<KiChjang> well, i'm having trouble finding low hanging fruit
yardenbar has joined #ruby
<KiChjang> it doesn't look like they're tagged
<KiChjang> in redmine at least
<baweaver> Ah, so to the language itself
<baweaver> You might ask the mailing list
<baweaver> most of the core team tends to be more active on there.
<b0nn> http.request request do |response|
<b0nn> I think it's that block
<jtdoncas> yeah it's line 25
<b0nn> ok
<jtdoncas> from /home/shane/workday/stream.rb:25:in `block (2 levels) in start_tracking'
<b0nn> I'll @response
<b0nn> and @response.finish
<b0nn> oh
<b0nn> can I do that?
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
<jtdoncas> don't think so
jgnagy has quit [Ping timeout: 246 seconds]
xall has joined #ruby
<b0nn> hmm, couldn't if response either
<jtdoncas> it's probably because you closed the connection
<jtdoncas> but it's still trying to read the body somehow
<b0nn> ok
izaac has joined #ruby
<b0nn> do I put a begin/rescue inside that block?
<jtdoncas> have you ever used pry or byebug?
KiChjang has left #ruby ["Leaving"]
<jtdoncas> if not you can rescue inside that block and just print some state variables
<jtdoncas> like @connection.inspect
<jtdoncas> @is_running
ropeney has quit [Ping timeout: 244 seconds]
<b0nn> if i put a begin rescue around things
<b0nn> I get undefined local variable or method `response'
yardenbar has quit [Ping timeout: 250 seconds]
<jtdoncas> just wrap lines 25-27
<jtdoncas> in a begin rescue
Devalo has joined #ruby
vuoto has quit [Remote host closed the connection]
ropeney has joined #ruby
vuoto has joined #ruby
edgr has quit [Ping timeout: 244 seconds]
<b0nn> ok, found the issue, an earlier attempt had left an artifact that was causing the error
<b0nn> this time theclose exited cleanly
<jtdoncas> ah cool
<jtdoncas> good stuff
<b0nn> but, I'm swallowing an exception :|
jenrzzz has joined #ruby
<jtdoncas> think you should do
<jtdoncas> Thread.abort_on_exception=true
<jtdoncas> at the beginning of forever
<b0nn> Oh, someone told me to do that yesterday and I had forgotten to do that :(
User458764 has joined #ruby
edgr has joined #ruby
<jtdoncas> :) yeah should definitely be used
JoshS has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 260 seconds]
JoshS has joined #ruby
claudiuinberlin has joined #ruby
xall has quit [Quit: WeeChat 1.5]
Bish has quit [Ping timeout: 246 seconds]
xall has joined #ruby
Bish has joined #ruby
xall has quit [Read error: Connection reset by peer]
enterprisey has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackbom1 has joined #ruby
xall has joined #ruby
cubicme has quit [Quit: cubicme]
_crdpink has quit [Quit: Konversation terminated!]
blackbom1 has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
rippa has joined #ruby
nankyokusei has joined #ruby
vuoto has quit [Remote host closed the connection]
xall has quit [Quit: WeeChat 1.5]
djbkd has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
grh has joined #ruby
baweaver is now known as baweaver_away
bairyn has quit [Read error: Connection reset by peer]
holll420 has joined #ruby
holll420 has left #ruby [#ruby]
agit0 has joined #ruby
maattdd has joined #ruby
Yzguy has quit [Quit: Cya]
conta has joined #ruby
TomyLobo has joined #ruby
cloud has joined #ruby
cloud has quit [Client Quit]
tectonic has quit []
cloud_ has joined #ruby
cloud_ is now known as cloud
maattdd has quit [Ping timeout: 240 seconds]
yardenbar has joined #ruby
jenrzzz has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
agit0 has quit [Quit: zzzZZZ….]
jenrzzz has quit [Ping timeout: 246 seconds]
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
Coldblackice has quit []
<baweaver_away> If you're getting a lot of junk PMs, do this: /umode +R
<baweaver_away> or this: /mode your_name_here +R
pawnbox has quit [Ping timeout: 256 seconds]
<baweaver_away> prevents non-registered users from PMing you.
baweaver_away is now known as baweaver
jcao219 has joined #ruby
bairyn has joined #ruby
tubbo has quit [Ping timeout: 250 seconds]
tubbo has joined #ruby
Hyuk has joined #ruby
agit0 has joined #ruby
firstdayonthejob has joined #ruby
nankyokusei has joined #ruby
djbkd has quit [Quit: Leaving...]
pawnbox has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
the_drow has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
User458764 has joined #ruby
jidar is now known as jidar_
jidar_ is now known as jidar
the_drow has quit [Ping timeout: 248 seconds]
cibs has quit [Ping timeout: 268 seconds]
Bish has quit [Ping timeout: 240 seconds]
Bish has joined #ruby
cibs has joined #ruby
nchambers is now known as God
<baweaver> God: interesting.
domgetter has quit [Ping timeout: 260 seconds]
codfection has quit [Quit: Leaving]
blackbom1 has joined #ruby
lenwood has joined #ruby
johnmccabe has joined #ruby
<God> baweaver, thanks
wopi has quit [Ping timeout: 252 seconds]
blackbom1 has quit [Ping timeout: 260 seconds]
naprimer_2 has quit [Quit: Leaving]
God is now known as nchambers
wopi has joined #ruby
codfection has joined #ruby
symm- has joined #ruby
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
vuoto has joined #ruby
blackbom1 has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
toretore has joined #ruby
s2013 has joined #ruby
s2013 has quit [Max SendQ exceeded]
jenrzzz has quit [Ping timeout: 240 seconds]
harai has joined #ruby
omphe has joined #ruby
jtdoncas has quit [Ping timeout: 250 seconds]
the_drow has joined #ruby
nankyokusei has joined #ruby
ResidentBiscuit has joined #ruby
nankyokusei has quit [Ping timeout: 248 seconds]
ResidentBiscuit has quit [Ping timeout: 258 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jaguarmagenta has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
symm- has quit [Quit: Leaving...]
omphe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackbom1 has quit [Ping timeout: 260 seconds]
eggshke has joined #ruby
blackbom1 has joined #ruby
tmtwd has quit [Ping timeout: 256 seconds]
marr has joined #ruby
Guest43 has joined #ruby
arup_r has joined #ruby
Hyuk has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
<arup_r> I am doing some convertion from odt to pdf. Here is my code https://gist.github.com/aruprakshit/4e909f1cddda49ddbd662300224e98a9 . This is the exact line https://gist.github.com/aruprakshit/4e909f1cddda49ddbd662300224e98a9#file-odt_converter-rb-L15. It works. But now I need to do the same thing in production, and I installed it https://github.com/rishihahs/heroku-buildpack-libreoffice in Heroku. But no idea there how to run `soffice` command. So
<arup_r> if any of use ever used this buildpack, can you give me a pointer?
johnmccabe has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest43 has quit [Ping timeout: 246 seconds]
<arup_r> I went to heroku bash like `heroku run bash` and when typed `soffice` got "bash: soffice: command not found"
<toretore> did you follow the instructions on https://github.com/rishihahs/heroku-buildpack-libreoffice ?
<arup_r> toretore: yes I did and pushed them to heroku also
<toretore> it clearly says "The binaries will be in $temp_dir/release."
<toretore> oh, nm
<arup_r> ok I only followed the usage section https://github.com/rishihahs/heroku-buildpack-libreoffice#usage
<arup_r> heroku run soffice --version gives error "bash: soffice: command not found"
<arup_r> don't have any idea atm. :)
tomphp has joined #ruby
tomphp has quit [Client Quit]
User458764 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
ddffg has joined #ruby
kn330 has joined #ruby
tomphp has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
blackbom1 has quit [Ping timeout: 260 seconds]
nikivi has joined #ruby
brendan- has joined #ruby
<ddffg> r
nankyokusei has joined #ruby
eggshke has quit []
toogley has quit [Quit: toogley]
cyphase has quit [Ping timeout: 258 seconds]
r3vDev has joined #ruby
aidalgol has quit [Quit: zZzZZzzzz]
nankyokusei has quit [Ping timeout: 258 seconds]
blackbom1 has joined #ruby
conta has quit [Ping timeout: 250 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
vuoto has quit [Remote host closed the connection]
cyphase has joined #ruby
lenwood has quit [Ping timeout: 250 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ropeney has quit [Quit: Leaving]
kn330 has quit [Ping timeout: 250 seconds]
arup_r has quit []
Qommand0r has quit [Quit: WeeChat 1.6]
SCHAAP137 has quit [Quit: ZNC - http://znc.in]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
SCHAAP137 has joined #ruby
Qommand0r has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
omphe has joined #ruby
claudiuinberlin has joined #ruby
redpants has quit [Ping timeout: 250 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
omphe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
raatiniemi has quit [Quit: raatiniemi]
raatiniemi has joined #ruby
jgnagy has joined #ruby
redpants has joined #ruby
Mon_Ouie has joined #ruby
jgnagy has quit [Ping timeout: 265 seconds]
cyphase has quit [Ping timeout: 265 seconds]
cyphase has joined #ruby
bhaak has quit [Remote host closed the connection]
bhaak has joined #ruby
ghr has quit [Quit: quit]
ghr has joined #ruby
nikivi has quit [Quit: irc]
zeroDi has joined #ruby
cloud has quit [Quit: WeeChat 1.6]
nankyokusei has joined #ruby
complain_ has joined #ruby
omphe has joined #ruby
nankyokusei has quit [Ping timeout: 268 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
william3 has joined #ruby
blackbom1 has quit [Ping timeout: 256 seconds]
r3vDev has quit [Ping timeout: 260 seconds]
tomphp has quit [Client Quit]
tomphp has joined #ruby
montanonic has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
pragmaticus has joined #ruby
firstdayonthejob has quit [Ping timeout: 245 seconds]
d0nn1e has quit [Ping timeout: 250 seconds]
omphe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
d0nn1e has joined #ruby
savage has quit [Quit: Connection closed for inactivity]
savage has joined #ruby
pragmaticus has quit [Quit: Leaving]
fgo has joined #ruby
_crdpink has joined #ruby
brendan- has joined #ruby
pragmaticus has joined #ruby
nankyokusei has joined #ruby
conta has joined #ruby
jottr has joined #ruby
grh has quit [Ping timeout: 240 seconds]
f4 has quit [Quit: Ухожу я от вас]
nankyokusei has quit [Ping timeout: 250 seconds]
conta has quit [Ping timeout: 256 seconds]
Rodya_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
vuoto has joined #ruby
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
gregf_ has quit [Ping timeout: 260 seconds]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
skweek has joined #ruby
conta has joined #ruby
Devalo has quit [Ping timeout: 246 seconds]
r3vDev has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
redpants has quit [Ping timeout: 265 seconds]
psychicist__ has joined #ruby
redpants has joined #ruby
foxxx0 is now known as foxxx
foxxx is now known as foxxx0
p0p0pr37_ has joined #ruby
p0p0pr37_ has quit [Changing host]
p0p0pr37_ has joined #ruby
tomphp has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
redpants has quit [Ping timeout: 240 seconds]
william3 has quit [Remote host closed the connection]
Hyuk has joined #ruby
brendan- has joined #ruby
scootaloo has joined #ruby
harai has quit [Ping timeout: 246 seconds]
scootaloo is now known as Guest45320
Guest45320 has quit [Client Quit]
scootalo_ has joined #ruby
scootalo_ is now known as scootaloo
c355e3b has joined #ruby
Azure has quit [Ping timeout: 258 seconds]
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
Rodya_ has joined #ruby
Rodya__ has joined #ruby
redpants has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Rodya__ has quit [Remote host closed the connection]
Devalo has quit [Ping timeout: 246 seconds]
conta has quit [Ping timeout: 256 seconds]
Rodya_ has quit [Ping timeout: 258 seconds]
jaguarmagenta has joined #ruby
nankyokusei has joined #ruby
jaguarmagenta has quit [Read error: Connection reset by peer]
Mon_Ouie has quit [Quit: WeeChat 1.6]
jaguarmagenta has joined #ruby
Mon_Ouie has joined #ruby
nankyokusei has quit [Ping timeout: 268 seconds]
Rr4sT has quit [Quit: Connection closed for inactivity]
Devalo has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
tomphp has quit [Client Quit]
brendan- has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
tomphp has joined #ruby
blackwind_123 has quit [Ping timeout: 240 seconds]
tomphp has quit [Client Quit]
tk__ has joined #ruby
tomphp has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tomphp has quit [Client Quit]
lenwood has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
skweek has quit [Ping timeout: 260 seconds]
agit0 has joined #ruby
agit0 has quit [Client Quit]
x77686d has joined #ruby
Vile` has joined #ruby
blackwind_123 has joined #ruby
jgnagy has joined #ruby
<herwin> bit of a long shot: i want a possibility to use somethings like String#sub that passes a MatchData object to the block, instead of the matched String
Rodya_ has joined #ruby
montanonic has quit [Ping timeout: 265 seconds]
shashin has joined #ruby
<herwin> this has been more or less accepted, on the condition that it is in a new method to keep backwards compatibility (https://bugs.ruby-lang.org/issues/12745)
<herwin> anyone here that could think of a good name for that method?
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
agit0 has joined #ruby
vuoto has quit [Quit: Lost terminal]
Rodya_ has quit [Remote host closed the connection]
pragmaticus has quit [Quit: Leaving]
jgnagy has quit [Ping timeout: 260 seconds]
pragmaticus has joined #ruby
conta has joined #ruby
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
<Papierkorb> herwin: #matchsub #msub
Devalo has quit [Ping timeout: 246 seconds]
<Papierkorb> and #gmsub as #gsub variant
redpants has quit [Ping timeout: 260 seconds]
shashin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
biberu has joined #ruby
Devalo has joined #ruby
shashin has joined #ruby
<apeiros> gsubplusgood
bgray has joined #ruby
<toretore> gsubthewayitshouldhavebeenallalong
<apeiros> yeah, I remember learning .match and MatchData first and being surprised that gsub doesn't yield MatchData
pragmaticus has quit [Remote host closed the connection]
conta has quit [Ping timeout: 250 seconds]
<toretore> i guess $~ is autovivified meaning the current implementation is slightly more efficient when it's not used
<toretore> s/more efficient/more faster/g
<toretore> sorry, s/(\w+) efficient/\1 faster/g
nankyokusei has joined #ruby
Rodya_ has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 248 seconds]
Salih has joined #ruby
<apeiros> lol
<apeiros> yeah, I understood what you meant. and yes, it probably is.
Mon_Ouie has quit [Quit: WeeChat 1.6]
<matthewd> Maybe it'd be better placed on Regexp
<toretore> what about the mutating versions?
ResidentBiscuit has joined #ruby
<matthewd> Skip them; the caller can use .replace if they really need to
<toretore> that's fine by me
<toretore> but i'm guessing lots of people will demand that they mirror the current methods
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<matthewd> True... in that case, seems better to add a kwarg than to add a new suite of 4 methods
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby
ResidentBiscuit has quit [Ping timeout: 258 seconds]
Devalo has quit [Remote host closed the connection]
brendan- has joined #ruby
Devalo has joined #ruby
lenwood has quit [Ping timeout: 260 seconds]
<toretore> i think new methods on String are the best of the presented options, and that (g)(m)sub(!) are good names
sdothum has joined #ruby
codfection has quit [Quit: Leaving]
GodFather has quit [Remote host closed the connection]
Devalo has quit [Ping timeout: 246 seconds]
agit0 has quit [Read error: Connection reset by peer]
Azure has joined #ruby
<bgray> what's the proper way to URI encode '@' (to %40)?
<toretore> CGI.escape seems to do it
GodFather has joined #ruby
<bgray> toretore: yep, that's what I came up with too. I'll probably use that.
<bgray> toretore: thanks!
<herwin> i expect #gsub to be named after the /g-modifier of regexp. with that info, i would expect msub to include the /m-modifier, which is something totally different
Rodya_ has joined #ruby
rippa has joined #ruby
Rodya_ has quit [Remote host closed the connection]
_ZerGabriel_ has joined #ruby
DexterLB has joined #ruby
pandaant has joined #ruby
r3vDev has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
synthroid has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
hightower2 has quit [Ping timeout: 248 seconds]
hightower2 has joined #ruby
brendan- has joined #ruby
nankyokusei has joined #ruby
A124 has quit [Read error: No route to host]
nankyokusei has quit [Ping timeout: 265 seconds]
johnzorn has quit [Quit: Ciao]
_ZerGabriel_ has quit []
A124 has joined #ruby
skweek has joined #ruby
naprimer has joined #ruby
johnzorn has joined #ruby
tk__ has quit [Quit: ばいばい]
jtdoncas has joined #ruby
johnzorn has quit [Quit: Ciao]
Azure has quit [Remote host closed the connection]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
emilkarl has joined #ruby
jtdoncas has quit [Ping timeout: 250 seconds]
sdothum has joined #ruby
johnzorn has joined #ruby
Rodya_ has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 245 seconds]
pawnbox has quit [Remote host closed the connection]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
shashin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
chouhoulis has joined #ruby
shashin has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
sepp2k has joined #ruby
emilkarl has quit [Read error: Connection reset by peer]
emilkarl_ has joined #ruby
pawnbox has joined #ruby
emilkarl_ has quit [Read error: Connection reset by peer]
emilkarl has joined #ruby
tau has joined #ruby
nankyokusei has joined #ruby
minimalism has quit [Quit: minimalism]
User458764 has joined #ruby
nankyokusei has quit [Ping timeout: 265 seconds]
conta has joined #ruby
jottr has quit [Quit: WeeChat 1.5]
<armin> hi. ruby newb here, i'm trying to understand the following behaviour: https://paste.fedoraproject.org/498328/63427148/raw/
<armin> any hint?
<apeiros> armin: are you using an old version of ruby?
emilkarl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<elomatreb> armin: Can't exactly reproduce: https://eval.in/690677
kallisti5 has quit [Quit: leaving]
<apeiros> sadly mathn patches Integer division, but your return value looks funny. should be (1/2)
jgnagy has joined #ruby
<armin> apeiros: irb 0.9.6(09/06/30)
pilne has joined #ruby
<apeiros> and ruby? (RUBY_VERSION)
<elomatreb> "sadly"? Isn't that exactly the point of requiring mathn as opposed to creating a complex directly?
<apeiros> that's in irb, outside irb, `ruby -v`
<armin> ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
<apeiros> elomatreb: modifying core behavior can cause breakage in any number of places, hence "sadly"
<apeiros> and in current rubies, 1/2r is available
<apeiros> >> 1/2r.class
<ruby[bot]> apeiros: # => Class can't be coerced into Fixnum (TypeError) ...check link for more (https://eval.in/690678)
<apeiros> >> (1/2r).class
<ruby[bot]> apeiros: # => Rational (https://eval.in/690679)
<apeiros> ok, that was unexpected :D
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
ResidentBiscuit has joined #ruby
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
<elomatreb> apeiros: OK, I didn't know about 1/2r, that sounds like a more useful approach
jgnagy has quit [Remote host closed the connection]
ResidentBiscuit has quit [Ping timeout: 258 seconds]
beilabs has quit [Remote host closed the connection]
ryan_notabot has joined #ruby
beilabs has joined #ruby
pawnbox has quit [Remote host closed the connection]
beilabs has quit [Ping timeout: 250 seconds]
zeroDi has quit [Quit: WeeChat 1.6]
ghormoon has quit [Ping timeout: 260 seconds]
chouhoul_ has joined #ruby
fgo has quit [Quit: WeeChat 1.5]
blackbom1 has joined #ruby
symm- has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
ghormoon has joined #ruby
chouhoul_ has joined #ruby
chouhoulis has quit [Ping timeout: 258 seconds]
zacts has quit [Quit: WeeChat 1.6]
pandaant has quit [Remote host closed the connection]
chouhoulis has joined #ruby
emilkarl has joined #ruby
nankyokusei has joined #ruby
zacts has joined #ruby
_ZerGabriel_ has joined #ruby
chouhoul_ has quit [Ping timeout: 250 seconds]
<al2o3-cr> >> 2r
<ruby[bot]> al2o3-cr: # => (2/1) (https://eval.in/690681)
<al2o3-cr> >> 2r.class
<ruby[bot]> al2o3-cr: # => Rational (https://eval.in/690682)
<al2o3-cr> >> 2i
<ruby[bot]> al2o3-cr: # => (0+2i) (https://eval.in/690683)
nankyokusei has quit [Ping timeout: 240 seconds]
<al2o3-cr> >> 2i.class
abc2 has quit [Quit: Leaving]
raul782 has joined #ruby
redpants has joined #ruby
yardenbar has quit [Ping timeout: 258 seconds]
beilabs has joined #ruby
_ZerGabriel_ has quit []
raul782 has quit [Remote host closed the connection]
redpants has quit [Ping timeout: 260 seconds]
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
Samos has joined #ruby
grh has joined #ruby
<linduxed> what version of ruby can one expect to have pre-installed on osx?
<linduxed> can i at least assume it's something higher than 2.1 ?
maattdd has joined #ruby
_sfiguser has joined #ruby
solocshaw has joined #ruby
<apeiros> no
<apeiros> linduxed: 2.0.0 is installed in most recent osx.
maattdd has quit [Ping timeout: 260 seconds]
conta has quit [Ping timeout: 250 seconds]
redpants has joined #ruby
shinnya has quit [Ping timeout: 250 seconds]
platzhirsch has joined #ruby
maattdd has joined #ruby
yeticry has quit [Ping timeout: 245 seconds]
ruid has quit [Ping timeout: 265 seconds]
complain_ has left #ruby [#ruby]
yeticry has joined #ruby
nankyokusei has joined #ruby
<ytti> win 20
r3vDev has joined #ruby
yeticry has quit [Remote host closed the connection]
yeticry has joined #ruby
nankyokusei has quit [Ping timeout: 268 seconds]
yskapell has joined #ruby
<yskapell> Hi all
<yskapell> Can you suggest any good tutorial for beginner in Ruby?
<Zarthus> the official tutorial is pretty good
solocshaw1 has joined #ruby
<yskapell> Zarthus: Can you sent me the link?
<elomatreb> Also this, although it is a little out of date by now: http://ruby-doc.com/docs/ProgrammingRuby/
ghormoon has quit [Ping timeout: 240 seconds]
solocshaw has quit [Ping timeout: 245 seconds]
solocshaw1 is now known as solocshaw
maattdd has quit [Ping timeout: 244 seconds]
tomios has joined #ruby
ghormoon has joined #ruby
psychicist__ has quit [Ping timeout: 250 seconds]
TomyWork has joined #ruby
creat has quit [Ping timeout: 250 seconds]
PresidentBiscuit has joined #ruby
psychicist__ has joined #ruby
ruid has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
b0nn has quit [Ping timeout: 248 seconds]
b0nn has joined #ruby
shashin has quit [Ping timeout: 265 seconds]
tectonic has joined #ruby
ta_ has joined #ruby
blackbom1 has quit [Ping timeout: 260 seconds]
omphe has joined #ruby
creat has joined #ruby
tomios has quit [Ping timeout: 265 seconds]
solocshaw has quit [Ping timeout: 240 seconds]
conta has joined #ruby
solocshaw has joined #ruby
pawnbox has joined #ruby
ruid has quit [Ping timeout: 248 seconds]
blackbom1 has joined #ruby
conta has quit [Ping timeout: 256 seconds]
alexherbo2 has joined #ruby
nankyokusei has joined #ruby
matp_ has joined #ruby
omphe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
matp has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
b0nn has quit [Ping timeout: 246 seconds]
b0nn has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
Devalo has joined #ruby
marr has quit [Ping timeout: 250 seconds]
jaguarmagenta has quit [Ping timeout: 265 seconds]
XV8 has quit [Quit: Textual IRC Client: www.textualapp.com]
ruid has joined #ruby
Rodya_ has quit [Remote host closed the connection]
the_drow has quit [Quit: This computer has gone to sleep]
XV8 has joined #ruby
Rodya_ has joined #ruby
lxsameer has joined #ruby
dviola has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
Rodya_ has quit [Remote host closed the connection]
conta has joined #ruby
Rodya_ has joined #ruby
b0nn has quit [Quit: leaving]
nettoweb has joined #ruby
ruid has quit [Ping timeout: 246 seconds]
emilkarl has quit [Ping timeout: 244 seconds]
Salih has quit [Quit: Leaving]
BlkDynmt has joined #ruby
jgnagy has joined #ruby
emilkarl has joined #ruby
maattdd has joined #ruby
PresidentBiscuit has quit []
tomios has joined #ruby
cdg has joined #ruby
araujo has quit [Quit: Leaving]
nankyokusei has joined #ruby
jgnagy has quit [Ping timeout: 240 seconds]
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
<armin> hi. can i colorize the prompt in irb?
jottr has joined #ruby
ruid has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
nankyokusei has quit [Ping timeout: 256 seconds]
jtdoncas has joined #ruby
cdg has quit [Remote host closed the connection]
emilkarl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raul782 has joined #ruby
jottr has quit [Quit: WeeChat 1.5]
grh has quit [Ping timeout: 260 seconds]
jgnagy has joined #ruby
alan_w has quit [Quit: WeeChat 1.4]
raul782 has quit [Remote host closed the connection]
tectonic has quit []
Channel6 has joined #ruby
<elomatreb> armin: You may want to try pry (gem install pry), it's generally seen as a "better IRB"
rfoust has joined #ruby
b0nn has joined #ruby
domgetter has joined #ruby
maattdd has quit [Ping timeout: 268 seconds]
Immune has quit [Ping timeout: 268 seconds]
solocshaw has quit [Ping timeout: 260 seconds]
skweek has joined #ruby
r3vDev has quit [Ping timeout: 248 seconds]
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
User458764 has joined #ruby
<armin> elomatreb: looks quite nice, but how do i colorize the prompt?
<elomatreb> Oh, I think I misunderstood you. This looks promising though: https://github.com/pry/pry/wiki/Customization-and-configuration#Config_prompt
<armin> elomatreb: oh i got it i think, setting Pry.prompt in ~/.pryrc looks promising at least
ascarter has joined #ruby
<armin> ah thank you
rykou has joined #ruby
nankyokusei has joined #ruby
emilkarl has joined #ruby
emilkarl has quit [Client Quit]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rykou> is there a method that acts like string.include? but that takes a regelar expression instead of a string?
Rodya_ has quit [Remote host closed the connection]
<toretore> =~
enterprisey has joined #ruby
solocshaw has joined #ruby
<elomatreb> Ruby 2.4 will get #match?, right?
PsionTheory has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
Rodya_ has joined #ruby
ionte has quit [Ping timeout: 260 seconds]
PsionTheory has quit [Read error: Connection reset by peer]
<zacts> hi rubyists
<rykou> elomatreb: it does but it kinda confuses me with the result.
<toretore> ?code rykou
<ruby[bot]> rykou: We can't help you without your code, please post it to https://gist.github.com
<toretore> give more info pls
ionte has joined #ruby
fridim_ has joined #ruby
<fridim_> hi. Anyone having issue installing nokogiri on archlinux ? it's like gcc version is not supported (a warning make it fail) : http://pastie.org/pastes/10976254/text?key=gdg6y8if9wwppaa0ntxniw Or did i miss something ?
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<herwin> how can the result of #match? confuse you, you expect it to return something other than a boolean?
<elomatreb> rykou: Are you actually using #match? (not #match without the question mark), since it isn't in stable Ruby yet iirc?
redpants has quit [Ping timeout: 244 seconds]
<rykou> welp, that was the problem yeah...
<rykou> was giving .match a quick look and overlooked the ?
ruid has quit [Ping timeout: 240 seconds]
harai has joined #ruby
<rykou> guess i'll have to do with .match for now
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Qommand0r has quit [Quit: WeeChat 1.6]
omphe has joined #ruby
<elomatreb> rykou: If you just want to check if a string and a regex match in any way, you can also use the =~ operator
xall has joined #ruby
<elomatreb> Like so: https://eval.in/690712
<zacts> re: nokogiri, it would be cool to have more gems rely on oga, rather than nokogiri
redpants has joined #ruby
<zacts> fridim_: are you using nokogiri directly, or is it a dependency?
<zacts> I personally prefer oga > nokogiri if you are using it directly
<fridim_> zacts, dependency yep
<zacts> ah yeah
Qommand0r has joined #ruby
<fridim_> i'm trying without -Werror to see how things would go
<djellemah> fridim_: if you already have libxml2 installed you could try gem install nokogiri -- --use-system-libraries
<rykou> elomatreb: hmm, both will work but I see match is not as fast
solocshaw has quit [Ping timeout: 260 seconds]
<fridim_> djellemah, yes, already tried, the error is : http://pastie.org/pastes/10976267/text?key=8g19bvbvgtso0mt9e0x4w
zeroDi has joined #ruby
<djellemah> fridim_: what gcc version?
solocshaw has joined #ruby
<fridim_> gcc (GCC) 6.2.1 20160830
omphe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bairyn has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 260 seconds]
Snickers has joined #ruby
nankyokusei has joined #ruby
<djellemah> works for me with libxml2-2.9.4 nokogiri-2.6.8.1 but gcc-4.9.3 (gentoo fwiw)
<djellemah> do you have a gcc-5.4.x?
<djellemah> Sorry, nokogiri-1.6.8.1, not 2.6.8.1
<fridim_> i try with gcc-5.4
raul782 has joined #ruby
conta has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 240 seconds]
jaguarmagenta has joined #ruby
beilabs has quit [Remote host closed the connection]
emilkarl has joined #ruby
raul782 has quit [Remote host closed the connection]
hahuang65 has joined #ruby
raul782 has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<djellemah> fridim_: I'm guessing something to do with cc1: all warnings being treated as errors - maybe the default setting changed in gcc-6.2.x
<fridim_> yes, tha't my guess as well
<fridim_> but not sure CC=gcc-5 gem install ... is enough to force gcc version, because i have the same error
Rodya_ has joined #ruby
<djellemah> ¯\_(ツ)_/¯ never tried CC= with a gem
maattdd has joined #ruby
tdy has quit [Quit: tdy]
<djellemah> but then maybe CC=no_compiler gem install would fail ...
tdy has joined #ruby
<fridim_> haha of course djellemah++ 'blabla' command not found. So same error with gcc-5.4
<fridim_> s/blabla/no_compiler/
phoo1234567 has joined #ruby
tomios has quit [Ping timeout: 248 seconds]
raul782 has quit [Remote host closed the connection]
tomios has joined #ruby
firstdayonthejob has joined #ruby
maattdd has quit [Ping timeout: 260 seconds]
nankyokusei has joined #ruby
djbkd has joined #ruby
x77686d has quit [Quit: x77686d]
x77686d has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
tdy has quit [Ping timeout: 258 seconds]
ruurd has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 258 seconds]
emilkarl has quit [Read error: Connection reset by peer]
emilkarl has joined #ruby
sumobob has joined #ruby
tomios_ has joined #ruby
<djellemah> fridim_: for me, gem install ignores CC= completely. Maybe on your system something like CC='gcc -W-no-error' or whatever the correct flag is
raul782 has joined #ruby
SCHAAP137 has quit [Quit: ZNC - http://znc.in]
SCHAAP137 has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
solocshaw has quit [Ping timeout: 260 seconds]
SCHAAP137 has quit [Changing host]
SCHAAP137 has joined #ruby
blackbombay has joined #ruby
cibs has quit [Ping timeout: 268 seconds]
blackbom1 has quit [Ping timeout: 240 seconds]
cibs has joined #ruby
tomios has quit [Ping timeout: 260 seconds]
DLSteve has joined #ruby
emilkarl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has quit [Quit: WeeChat 1.4]
JoshS has quit [Quit: Leaving]
User458764 has joined #ruby
bairyn has joined #ruby
Rodya_ has quit [Remote host closed the connection]
JoshS has joined #ruby
nankyokusei has joined #ruby
ruurd has joined #ruby
jcao219 has quit [Ping timeout: 250 seconds]
jcao219 has joined #ruby
conta has joined #ruby
nowhereman has quit [Ping timeout: 258 seconds]
jaguarmagenta has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
nankyokusei has quit [Ping timeout: 258 seconds]
<fridim_> yep, editing the Makefile to see all the CFLAGS and then : CFLAGS="-fPIC -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -g -Wall -O3 -std=gnu11 -g -DXP_UNIX -Wall -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline" gem install nokogiri -- --use-system-libraries
<fridim_> copied all of them except -Werror :P
<fridim_> and it's OK
<djellemah> yay
<fridim_> (not cool, idk if this deserve a bugreport)
LoneHerm_ has joined #ruby
tectonic has joined #ruby
<djellemah> What's your value for RbConfig::CONFIG['CFLAGS']
LoneHerm_ has quit [Remote host closed the connection]
<fridim_> "-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC"
LoneHerm_ has joined #ruby
<yskapell> How can I pass parameters for SQL Queries in Ruby?
raul782 has quit [Remote host closed the connection]
f4 has joined #ruby
<yskapell> for example in Python I do SQL_IP = "select hostname, ipaddress from data where ipaddress like '%{i}%'" .format(i=ipaddr)
<yskapell> How can I do the same in Ruby?
<djellemah> >> param = "whatever"; "select * from #{whatever}"
<ruby[bot]> djellemah: # => undefined local variable or method `whatever' for main:Object (NameError) ...check link for more (https://eval.in/690748)
ruid has quit [Ping timeout: 244 seconds]
<djellemah> >> param = "whatever"; "select * from #{param}"
<ruby[bot]> djellemah: # => "select * from whatever" (https://eval.in/690749)
<djellemah> doh
<djellemah> but you might want to use Sequel gem instead. because SQL injection.
<yskapell> like this is correct ? SQL_IP = "select hostname, ipaddress from data where ipaddress like '%#{IP}%' ?
<djellemah> fridim_: I'm basically just guessing now, if you hadn't noticed ;-)
LoneHerm_ has quit [Ping timeout: 258 seconds]
<fridim_> djellemah, at least i do not feel alone :)
<djellemah> yskapell: close, you'd use sql_ip and ip not SQL_IP and IP, cos in ruby Uppercase means a constant.
<rykou> closing the string helps too
<rykou> i guess
<yskapell> djellemah: mostly the modification of sql queries I need to know if it is correct
<djellemah> rykou: yer not wrong ;-)
<djellemah> >> ip = '8.8.8.8'; sql_ip = "select hostname, ipaddress from data where ipaddress like '%#{ip}%'"
<ruby[bot]> djellemah: # => "select hostname, ipaddress from data where ipaddress like '%8.8.8.8%'" (https://eval.in/690750)
jcao219 has quit [Ping timeout: 240 seconds]
<yskapell> thank you
nankyokusei has joined #ruby
tomios has joined #ruby
tomios has left #ruby [#ruby]
muelleme has quit [Ping timeout: 244 seconds]
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 258 seconds]
* djellemah fights with bundler and nokogiri
<ytti> which reminds me, i should figure out how to stream in nokogiri
<ytti> §3/win 20
last_staff has joined #ruby
GodFather has joined #ruby
tectonic has quit []
ruid has quit [Ping timeout: 248 seconds]
nankyokusei has joined #ruby
rfoust has joined #ruby
jeffaustin81 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
solocshaw has joined #ruby
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
<armin> hi. ruby newb here. can anyone describe to me what those "@author" and "@title" things inside the "Book" class here are? https://ruby-doc.org/core-2.2.0/Hash.html
nankyokusei has quit [Ping timeout: 258 seconds]
<armin> is that like a short-form of "self" or something?
cajone has joined #ruby
enterprisey has quit [Ping timeout: 246 seconds]
<rykou> armin: they are instance variables
<rykou> also, not really. self does exist if you look a bit further along the page
<armin> rykou: so in order to access an instance variable from somewhere in the code, i need to a) feed the initialize method with them when instantiating a new object of that kind, b) "enable" access to them using attr_reader, and c) assign the values passed to the initialize method to these @-prefixed instance-variables?
<armin> ah.
Devalo has quit [Ping timeout: 246 seconds]
<elomatreb> You can create/assign instance variables at any time during an objects lifecycle, undefined instance variables are just nil
<armin> rykou: i'm still trying to get comfortable with the basics, really.
<elomatreb> attr_reader internally creates a new method that returns the instance variable (In other languages known as a getter)
<armin> okay.
<rykou> I don't think the variables are that much different from other languages, just the notation at the start is a bit different
<b0nn> how do I capture this exception (and only this exception) /usr/lib/ruby/2.3.0/net/protocol.rb:158:in `wait_readable': Bad file descriptor (Errno::EBADF)
<rykou> since having a @ or @@ prefix, for example, can change the type of variable
<elomatreb> rykou: That instance variables don't have to be predefined (like e.g. in Java) is confusing for some
jaguarmagenta has quit []
<b0nn> also, WRT your variable discussion, symbols :var_name caught me by surprise too
<rykou> elomatreb: I know, I had that as well at the start, but It's more in notation that it's different then really how they work.
<elomatreb> That too, the concept of the symbol datatype isn't in any other language I can think of
pawnbox has quit [Remote host closed the connection]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
ruid has joined #ruby
<rykou> b0nn: can you not rescue Errno::EBADF?
<djellemah> fridim_: When I run ruby extconf.rb in nokogiri-1.6.8.1 source, the Makefile I get has no -Werror. When I add -Werror to CFLAGS in that Makefile, compile fails.
<b0nn> rykou: that's what I needed to know, that the exception to handle was Errno::EBADF
<b0nn> I wasn't sure if it was 'wait_readable', 'Bad file descriptor' or Errno::EBADF
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
antoniobeyah has joined #ruby
grh has joined #ruby
Rodya_ has joined #ruby
hahuang65 has joined #ruby
<elomatreb> b0nn: wait_readable is the method in which the error was raised, "bad file descriptor" is the errors message and Errno::EBADF is it's class
<rykou> yeah, after having some of those errors you figure out how to read them pretty fast
<b0nn> FTR I'm enjoying ruby, much more OO than Python (which was easily more OO than Perl), but not as restrictive or as much overhead, as Java
<b0nn> elomatreb: thank you
lxsameer has quit [Quit: WeeChat 1.6]
william3 has joined #ruby
<armin> b0nn: i'm just coming to ruby from python and i feel like i accidently got into the wrong cinema hall.
ruid has quit [Ping timeout: 265 seconds]
<b0nn> ha! persevere. I'm liking that I can encapsulate again
x77686d has quit [Quit: x77686d]
aryaching has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
nankyokusei has joined #ruby
<rykou> ruby does have some things that are a little 'weird' at the start
<b0nn> I'm also liking that I have access to native threading, no more GIL (sure there's GIL issues in ruby if you use ruby's threads, but there's a way around the restriction!)
<rykou> at least for me, but after learning the differences I started liking it more then python
x77686d has joined #ruby
xall has quit [Ping timeout: 256 seconds]
konsolebox has joined #ruby
Rodya_ has quit [Ping timeout: 258 seconds]
johnny56 has quit [Ping timeout: 246 seconds]
grh has quit [Remote host closed the connection]
enterprisey has joined #ruby
johnny56 has joined #ruby
<djellemah> b0nn: what's your way round the GIL restriction? Just checking so you don't end up disappointed...
nankyokusei has quit [Ping timeout: 268 seconds]
solocshaw has quit [Ping timeout: 260 seconds]
firstdayonthejob has quit [Ping timeout: 245 seconds]
scootaloo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baloi has joined #ruby
solocshaw has joined #ruby
Immune has joined #ruby
<imanc> is there a way to simplify this statement any further using &:even? or is that not an option or a hash? {a: 1, b: 2}.keep_if {|k,v| v.even?}
<imanc> * for a hash
synthroid has quit []
futilegames has joined #ruby
gloscombe has joined #ruby
futilegames has quit [Client Quit]
Azure has joined #ruby
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marr has joined #ruby
Samos has quit [Ping timeout: 260 seconds]
<b0nn> oh, that reminds me, one thing I would like in ruby that is available in python (and Java too now I hear) is comprehensions
<b0nn> and decorators
<b0nn> two things :)
sumobob has quit [Ping timeout: 244 seconds]
<b0nn> are list/set/dict comprehnsions possible in ruby?
nankyokusei has joined #ruby
<b0nn> ditto for decorators
Yzguy has joined #ruby
muelleme has joined #ruby
<imanc> b0nn: no list comps in java 8 - unless i'm blind
<djellemah> b0nn: Hm, lots of confusion there about GIL and threading. Bottom line: you only get true parallelism in jruby and rubinius, not in mri.
<djellemah> >> [1,2,3,4].map{|x| x * 2 if x < 3}.compact # close-ish to a comprehension
<ruby[bot]> djellemah: # => [2, 4] (https://eval.in/690835)
<djellemah> Not sure what decorators are in Python, but SimpleDelegator might do what you want.
TomyWork has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 245 seconds]
Devalo has joined #ruby
ruid has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
<b0nn> decorators in Python have (IME) one of two possible effects on functions. First effect is you can use a decorator to say "When event that matches this condition occurs, use this function" eg. in Bottle.py with the http.route decorator
psychicist__ has quit [Ping timeout: 260 seconds]
TomyWork has joined #ruby
<b0nn> Second effect is for a function to behave ina certain way, eg @api.one in OpenERP (Sorry cannot think of a more general case) where the function understands that it is inside a for loop, and is only going to receive one value at a time
TomyWork has quit [Remote host closed the connection]
firstdayonthejob has joined #ruby
<b0nn> vs @api.multi where the function is expecting a set of values and will iterate over them itself
muelleme has quit [Ping timeout: 240 seconds]
minimalism has joined #ruby
TomyWork has joined #ruby
<b0nn> I think of them in a similar way to annotations in java.
baloi has left #ruby [#ruby]
skweek has joined #ruby
scootaloo has joined #ruby
<imanc> python decorators and java annotations are very different
ruid has quit [Ping timeout: 246 seconds]
<b0nn> I think of them in a similar way
codfection has joined #ruby
<b0nn> but, you're welcome to point all the diffrences out
firstdayonthejob has quit [Ping timeout: 260 seconds]
savage has quit [Quit: Connection closed for inactivity]
kobain has joined #ruby
<imanc> a python decorator is just a closure that wraps the original functions. A java annotation applies metadata which is used by the runtime and tools like javadoc
<imanc> totally different but they appear the same syntatically
<djellemah> The only way I can think of to do something like in ruby that is using inheritance of one kind or another. One example would be using a singleton class...
<djellemah> >> a = "hey"; def a.downcase; puts "before"; super; end; a.downcase
<ruby[bot]> djellemah: # => before ...check link for more (https://eval.in/690858)
nankyokusei has joined #ruby
JoshS has quit [Quit: Leaving]
<b0nn> imanc: see, you're talking about implementation, I'm talking about effect.
<djellemah> s/like in ruby that/like that in ruby/
platzhirsch has quit [Quit: WeeChat 1.4]
<djellemah> but singletons are tricky and have some caveats. So best not to sprinkle them around unless you have a good reason.
zeroDi has quit [Quit: WeeChat 1.6]
nankyokusei has quit [Ping timeout: 258 seconds]
<yskapell> Can I create a file SQL queries in method and execute them when I pass any parameters?
scootaloo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Yzguy has quit [Quit: Cya]
solocshaw has quit [Ping timeout: 260 seconds]
threh has joined #ruby
firstdayonthejob has joined #ruby
<b0nn> yskapell: are you trying to create a file OF SQL queries that you can execute later? Or Create a file that captures the output from some SQL queries? Or load a file that has some SQL in it, then execute those queries?
Channel6 has quit [Quit: Leaving]
sumobob has joined #ruby
nankyokusei has joined #ruby
scootaloo has joined #ruby
skweek has quit [Ping timeout: 250 seconds]
DLSteve has joined #ruby
conta has quit [Ping timeout: 250 seconds]
william3 has quit [Remote host closed the connection]
<yskapell> b0nn: I want to create all the SQL queries in a rb file and then when I add some arguments to get the results I want
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
robh71 has joined #ruby
william3 has joined #ruby
<yskapell> I found how to do it, but now I need to see how to pass arguments from command line to the ruby
<yskapell> thank you
<djellemah> yskapell: ARGV
ibraheem has joined #ruby
<rykou> or getoptlong if you want to go fancy
nettoweb has quit [Ping timeout: 260 seconds]
nettoweb1 has joined #ruby
<djellemah> yskapell: ARGV.class == Array
ddffg has quit [Quit: Leaving]
Immune has quit [Ping timeout: 248 seconds]
william3 has quit [Ping timeout: 250 seconds]
Bish has quit [Ping timeout: 260 seconds]
jtdoncas has quit [Ping timeout: 250 seconds]
ibraheem has left #ruby [#ruby]
Bish has joined #ruby
nankyokusei has joined #ruby
<yskapell> djellemah: thank you I will check it tomorrow
ruid has quit [Ping timeout: 256 seconds]
<yskapell> djellemah: Is it possible to have something like "./main.rb -server server1 " and get server1 as value ?
nankyokusei has quit [Ping timeout: 244 seconds]
<elomatreb> yskapell: You may want an argument parser, Ruby ships with a basic one but there are also very good libraries available
SpiffTR has joined #ruby
<yskapell> elomatreb: Which libraries?
ibraheem has joined #ruby
<elomatreb> yskapell: Might be a little overkill for your usecase, but I really enjoy http://whatisthor.com/
<rykou> I use getoptlong for it. not sure what else is out there tough
<yskapell> thank you guys
<yskapell> I am going to sleep. CU
nankyokusei has joined #ruby
<rykou> good night
<antoniobeyah> thor++
ramfjord has joined #ruby
ramfjord_ has joined #ruby
d^sh has quit [Read error: Connection reset by peer]
antoniobeyah has quit [Quit: antoniobeyah]
nankyokusei has quit [Ping timeout: 250 seconds]
enterprisey has quit [Remote host closed the connection]
muelleme has joined #ruby
TomyWork has quit [Remote host closed the connection]
nankyokusei has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
redpants has quit [Quit: leaving]
mdw has joined #ruby
muelleme has quit [Ping timeout: 260 seconds]
nankyokusei has quit [Ping timeout: 260 seconds]
jtdoncas has joined #ruby
Rodya_ has joined #ruby
ruid has quit [Ping timeout: 258 seconds]
nankyokusei has joined #ruby
kobain has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
ta_ has quit [Remote host closed the connection]
mdw has joined #ruby
nankyoku_ has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
Rodya_ has quit [Ping timeout: 258 seconds]
mdw_ has joined #ruby
djbkd has quit [Ping timeout: 246 seconds]
nankyokusei has joined #ruby
ZombiePig has joined #ruby
<ZombiePig> I'm having trouble integrating plugins with my rails/angular app. If anyone would be willing to help it would be greatly appreciated!
mdw has quit [Ping timeout: 250 seconds]
<apeiros> ?rails ZombiePig
<ruby[bot]> ZombiePig: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<ZombiePig> thanks!
nankyoku_ has quit [Ping timeout: 265 seconds]
janemba has joined #ruby
<janemba> hi
<jtdoncas> hi
mdw_ has quit [Quit: cya! http://www.somerobots.com]
nankyokusei has quit [Ping timeout: 260 seconds]
<janemba> I'd like to install a Gem but I have a library issue -> http://pastebin.com/h7mGtp3z
<ruby[bot]> janemba: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/cf6e72a4402c7dd6fc55e3043992dbd5
<ruby[bot]> janemba: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<janemba> I have the headers installed but in <krb5/krb5.h> is there to tell to the installer to look into /usr/include/krb5 instead of /usr/include ?
adavia has joined #ruby
skweek has joined #ruby
ruid has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
TomyLobo has quit [Ping timeout: 246 seconds]
yeticry has quit [Ping timeout: 258 seconds]
kobain has joined #ruby
kobain has quit [Excess Flood]
yeticry has joined #ruby
kobain has joined #ruby
ibraheem has quit [Remote host closed the connection]
robnester has quit [Quit: I wonder what this button does...?]
x77686d has quit [Quit: x77686d]
exchgr has joined #ruby
robnester has joined #ruby
Devalo has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
janemba has left #ruby ["WeeChat 1.3"]
william3 has joined #ruby
LoneHerm_ has joined #ruby
ta_ has joined #ruby
yeticry has quit [Ping timeout: 260 seconds]
william3 has quit [Ping timeout: 250 seconds]
yeticry has joined #ruby
x77686d has joined #ruby
tectonic has joined #ruby
montanonic has joined #ruby
fridim_ has quit [Ping timeout: 244 seconds]
nettoweb1 has quit [Quit: Textual IRC Client: www.textualapp.com]
yeticry has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
yeticry has joined #ruby
antoniobeyah has joined #ruby
ta_ has quit [Remote host closed the connection]
ruid has quit [Ping timeout: 246 seconds]
enterprisey has joined #ruby
biberu has quit []
emilkarl has joined #ruby
emilkarl has quit [Remote host closed the connection]
ZombiePig has quit []
chouhoulis has quit [Ping timeout: 260 seconds]
|PiP| has joined #ruby
<|PiP|> anyone have any experience with Axlsx?
last_staff has quit [Quit: last_staff]
allcentury has joined #ruby
blackbombay has quit [Ping timeout: 245 seconds]
JoshS has joined #ruby
Immune has joined #ruby
robh71_ has joined #ruby
robh71 has quit [Ping timeout: 250 seconds]
alan_w has joined #ruby
chouhoulis has joined #ruby
codfection has quit [Remote host closed the connection]
ruid has joined #ruby
zeroDi has joined #ruby
gloscombe has quit [Quit: gloscombe]
blackbombay has joined #ruby
enterprisey has quit [Ping timeout: 240 seconds]
chrisja has joined #ruby
ropeney has joined #ruby
yeticry has quit [Ping timeout: 268 seconds]
|PiP| has quit []
enterprisey has joined #ruby
yeticry has joined #ruby
enterprisey has quit [Remote host closed the connection]
ta_ has joined #ruby
SpiffTR has quit [Ping timeout: 245 seconds]
ramfjord_ has quit [Ping timeout: 250 seconds]
ramfjord has quit [Ping timeout: 268 seconds]
Rodya_ has joined #ruby
tectonic has quit [Ping timeout: 260 seconds]
tectonic has joined #ruby
yeticry has quit [Ping timeout: 260 seconds]
xrlk has quit [Quit: HEIL HITLER]
yeticry has joined #ruby
xrlk has joined #ruby
G has quit [Ping timeout: 245 seconds]
ta_ has quit [Remote host closed the connection]
rfoust has joined #ruby
p0p0pr37_ has quit [Quit: Going offline, see ya! (www.adiirc.com)]
tomios_ has quit [Quit: Page closed]
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
_sfiguser has quit [Ping timeout: 260 seconds]
ruid has quit [Ping timeout: 256 seconds]
_sfiguser has joined #ruby
SpiffTR has joined #ruby
rdavila has joined #ruby
G_ has joined #ruby
LoneHerm_ has quit [Ping timeout: 258 seconds]
SpiffTR has quit [Ping timeout: 244 seconds]
claudiuinberlin has quit []
paradisaeidae has joined #ruby
scootaloo has quit [Quit: Textual IRC Client: www.textualapp.com]
montanonic has quit [Ping timeout: 244 seconds]
CloCkWeRX has joined #ruby
sumobob has quit [Remote host closed the connection]
toretore has quit [Ping timeout: 244 seconds]
ta_ has joined #ruby
ruid has joined #ruby
ruid has joined #ruby
ruid has quit [Changing host]
Snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Snickers has joined #ruby
preyalone has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
G_ is now known as G
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
montanonic has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
_ZerGabriel_ has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
Snickers has quit [Client Quit]
Snickers has joined #ruby
Snickers has quit [Client Quit]
Snickers has joined #ruby
Immune has quit [Quit: ZzzZZZzzzz]
Snickers has quit [Client Quit]
Immune has joined #ruby
fmcgeough has joined #ruby
Jayson_Virissimo has joined #ruby
ruid has quit [Ping timeout: 250 seconds]
ryan_notabot has quit [Quit: Leaving]
enterprisey has joined #ruby
nowhereman has joined #ruby
nankyokusei has joined #ruby
phoo1234567 has quit [Quit: Gotta go]
nankyokusei has quit [Ping timeout: 260 seconds]
ruid has joined #ruby
jeffaustin81 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<b0nn> so, I have an error being getnerated: no implicit conversion of nil into String (TypeError)
<b0nn> It's caused by me returning a filesize before the file has a size
<b0nn> That's cool
<b0nn> The issue is, I thought I had captured it
<b0nn> unless File.size(@filename) == nil
firstdayonthejob has quit [Ping timeout: 260 seconds]
<b0nn> return File.size(@filename)
<b0nn> end
<b0nn> return "0"
<b0nn> why is the comparison not working?
allcentury has quit [Ping timeout: 260 seconds]
<jtdoncas> b0nn: is @filename nil?
<jtdoncas> paste the exact error with the trace
<b0nn> no, the size of the file is 0.. I think, I'll double check
tdy has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
raul782 has joined #ruby
moei has quit [Quit: Leaving...]
moei has joined #ruby
<konsolebox> b0nn: which one is in line 47?
baweaver is now known as baweaver_away
<b0nn> sorry, unless File.size(@filename) == nil
<jtdoncas> that means @filename is nil
<b0nn> I think jtdoncas might have been correct, the filename might be bung
raul782 has quit [Ping timeout: 246 seconds]
<konsolebox> checking File.size() against nil doesn't make sense
<al2o3-cr> b0nn: i think you need File.size?
<al2o3-cr> if you're checking against nil
Jayson_Virissimo has quit []
arescorpio has joined #ruby
koooge has joined #ruby
ruid has quit [Ping timeout: 256 seconds]
SpiffTR has joined #ruby
<b0nn> ugh
<b0nn> found it
<b0nn> missing a comma in an array
<jtdoncas> :)
<jtdoncas> how's your poject coming along b0nn?
SpiffTR has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby
<b0nn> the nil was being generated by me trying to access an indice that didn't exist
<b0nn> jtdoncas: good thanks, still half a mountain to climb, but I'm feeling more confident about it
fmcgeough has quit [Quit: fmcgeough]