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