<Radar>
I prefer double quotes because I work in other languages where the difference between single + double quotes matter.
<Verity>
ah
<Verity>
I'll use double from now on
<Radar>
i.e. Golang and Elixir.
millerti has joined #ruby
<alex123>
@radar, I have an admin user, who has an option to create / edit routes dynamically on runtime from the website as part of admin options. I am struggling with implementing it
<Radar>
alex123: it sounds like you're re-inventing a CMS
akkad has quit [Quit: Emacs must have died]
duderonomy has quit [Ping timeout: 258 seconds]
<alex123>
@radar, could you link something please, I am still a huge noob with ruby, so all the help is very appreciated
<alex123>
@radar, I already have a working application, can this stuff be added on as extra functionality ?
Cohedrin has quit [Read error: Connection reset by peer]
sunrunner20 has joined #ruby
HoierM has joined #ruby
Cohedrin has joined #ruby
gizmore|2 has joined #ruby
mjuszczak has quit []
Channel6 has joined #ruby
mjuszczak has joined #ruby
Bounga`` has joined #ruby
gizmore has quit [Ping timeout: 258 seconds]
enterprisey has joined #ruby
charliesome has joined #ruby
duckpuppy has joined #ruby
Bounga`` has quit [Ping timeout: 255 seconds]
hashrocket has quit [Quit: Connection closed for inactivity]
alex123 has quit [Ping timeout: 260 seconds]
minimalism has joined #ruby
cyphase has quit [Ping timeout: 260 seconds]
c_nick has joined #ruby
cyphase has joined #ruby
stupidsenpai has joined #ruby
imightbestupid12 has joined #ruby
<c_nick>
I have an excel based test cases in ruby which are distributed via incredibuild onto different threads on the available CPU's. When i run it normally it works fine but when i run it via teamcity i sometimes fail to get the excel object and few tests go missing
<c_nick>
teamcity agent is running in non interactive mode.. i also tried the interactive mode.. and that seemed to give me less failures
jeffaustin81 has joined #ruby
milardovich has quit [Read error: Connection reset by peer]
imightbestupid12 has quit [K-Lined]
stupidsenpai has quit [K-Lined]
HoloIRCUser1 has joined #ruby
jhack has quit [Quit: Leaving]
milardovich has joined #ruby
cyphase has quit [Ping timeout: 260 seconds]
sunrunner20 has quit [Max SendQ exceeded]
gusrub has quit [Remote host closed the connection]
cyphase has joined #ruby
sunrunner20 has joined #ruby
milardovich has quit []
milardovich has joined #ruby
jhack has joined #ruby
jhack has joined #ruby
jhack has quit [Changing host]
cschneid_ has joined #ruby
__Yiota has joined #ruby
soloscshaw has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
HoloIRCUser1 has quit [Ping timeout: 252 seconds]
jamesaxl has joined #ruby
soloscshaw has quit [Ping timeout: 260 seconds]
cyphase has quit [Ping timeout: 245 seconds]
duderonomy has joined #ruby
jusa has joined #ruby
cyphase has joined #ruby
Mia has quit [Read error: Connection reset by peer]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
nobitanobi has joined #ruby
c_nick has quit [Quit: ciaos]
herbmillerjr has quit [Quit: Konversation terminated!]
jusa has quit [Ping timeout: 252 seconds]
cyphase has quit [Ping timeout: 260 seconds]
nobitanobi has quit [Ping timeout: 260 seconds]
milardovich has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
beauby has quit [Ping timeout: 260 seconds]
jhack has quit [Quit: Leaving]
jameser has joined #ruby
cyphase has joined #ruby
libastral has quit [Ping timeout: 240 seconds]
shinnya has joined #ruby
libastral has joined #ruby
gsilva has quit [Quit: Leaving]
alex189 has joined #ruby
raul782_ has joined #ruby
<alex189>
hi, help please, you can search ruby route by find(params[:id]), but what if I want to searh it by :title , is that possible ?
milardovich has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
mjuszczak has quit []
jrafanie has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
duckpuppy has quit [Ping timeout: 268 seconds]
Cohedri__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sunrunner20 has quit [Max SendQ exceeded]
sunrunner20 has joined #ruby
Cohedrin has joined #ruby
mrgrieve1 has joined #ruby
impermanence has joined #ruby
vircung has quit [Ping timeout: 258 seconds]
amclain has quit [Quit: Leaving]
<impermanence>
I've seen now multiple sources that say Rubyists avoid more traditional loop structures like while, until, for, etc. for iterators like "each". Buuuuuut...isn't each just backed by a for loop or something? Seriously, what's the advantage?
mrgrieves has quit [Ping timeout: 252 seconds]
Rodya_ has quit [Remote host closed the connection]
olivi____ has joined #ruby
skweek has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
Rodya_ has joined #ruby
<adam12>
impermanence: each is backed by the Enumerable module, which has tons of goodies
<adam12>
like chaining methods
agent_white has joined #ruby
<impermanence>
adam12: neat...I'm just saying that it's loops all the way down...
<adam12>
impermanence: It is, kinda, but not the same type of loops
<adam12>
.. I guess
Cohedrin has quit [Read error: Connection reset by peer]
<adam12>
while / until, etc can replace each, but not select, reject, any, etc.
<elomatreb>
each isn't backed by a for loop, in fact the for loop construct is just syntax sugar for calling each
soloscshaw has joined #ruby
SpikeMaster has joined #ruby
olivi____ has quit [Ping timeout: 245 seconds]
Cohedrin has joined #ruby
xall has quit [Ping timeout: 240 seconds]
<alex189>
guys , help please!, in my nav I have <% @pages.each do |p| %> <li><%= link_to p.title %></li> <% end %>, but when I select it, I get SELECT "pages".* FROM "pages", how can I access the title ?
mim1k has quit [Ping timeout: 252 seconds]
<impermanence>
elomatreb: you mean at like the "c level" or whatever...?
<elomatreb>
No, in Ruby. The C source for Ruby of course uses C-like for/while loops
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SpikeMaster has left #ruby ["ERC (IRC client for Emacs 26.0.50)"]
soloscshaw has quit [Ping timeout: 240 seconds]
<impermanence>
elomatreb: well...that all may be...but what I'm asking is: in whatever language "each" is actually implemented in behind Ruby...each is some type of classical loop...or no?
alex189 has quit [Ping timeout: 260 seconds]
<gr33n7007h>
impermanence: a for loop
<gr33n7007h>
oh, it was already said
Channel6 has quit [Quit: Leaving]
<impermanence>
gr33n7007h: k, so then basically the benefit of each is that it has some cool functions/methods tied to it?
mices has quit [Quit: Leaving]
<gr33n7007h>
not really
<gr33n7007h>
it just a for loop underneath
armando has joined #ruby
<elomatreb>
You can redefine each for different contexts. Think e.g. of lazy enumeration
__Yiota has joined #ruby
<impermanence>
make sense
<impermanence>
makes
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
Don_John has joined #ruby
Chagel has joined #ruby
Rodya_ has quit [Quit: Leaving...]
gix has quit [Ping timeout: 240 seconds]
sunrunner20 has quit [Max SendQ exceeded]
sunrunner20 has joined #ruby
gix has joined #ruby
cam27 has joined #ruby
rkellermeyer has quit [Quit: This computer has gone to sleep]
gusrub has joined #ruby
HoierM has quit [Ping timeout: 240 seconds]
gusrub has quit [Ping timeout: 240 seconds]
xall has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raul782_ has quit [Remote host closed the connection]
nadir has quit [Quit: Connection closed for inactivity]
Bock has joined #ruby
Bock has quit [Max SendQ exceeded]
oliv_____ has quit [Remote host closed the connection]
jusa has joined #ruby
Bock has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
moei has left #ruby ["Leaving..."]
gnufied has quit [Ping timeout: 260 seconds]
Cohedrin has joined #ruby
sunrunner20 has quit [Max SendQ exceeded]
sunrunner20 has joined #ruby
rgr_ has joined #ruby
dmtd has quit [Quit: Connection closed for inactivity]
mattp__ has joined #ruby
astrobunny has joined #ruby
rgr_ has quit [Remote host closed the connection]
renchan has joined #ruby
_whitelogger has joined #ruby
hndk has quit [Remote host closed the connection]
xall has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
SleepySensei has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
sunrunner20 has quit [Max SendQ exceeded]
soloscshaw has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
sunrunner20 has joined #ruby
Cohedrin has joined #ruby
nobitanobi has joined #ruby
soloscshaw has quit [Ping timeout: 260 seconds]
nobitanobi has quit [Remote host closed the connection]
Chagel has joined #ruby
Chagel has quit [Remote host closed the connection]
bsartek has quit [Quit: This computer has gone to sleep]
Bounga`` has joined #ruby
flying has quit []
Bounga`` has quit [Ping timeout: 245 seconds]
ferr has joined #ruby
anisha has joined #ruby
patarr has joined #ruby
akkad_ has joined #ruby
JoshS has joined #ruby
patarr has quit [Ping timeout: 252 seconds]
naprimer_3 is now known as PatriqueEtoile
JoshS has quit [Quit: Leaving]
Bounga`` has joined #ruby
Chagel has joined #ruby
Bounga`` has quit [Ping timeout: 245 seconds]
raddazong has quit [Quit: leaving]
madhatter has joined #ruby
yogg-saron has joined #ruby
libastral has quit [Ping timeout: 240 seconds]
sunrunner20 has quit [Max SendQ exceeded]
tvw has joined #ruby
rkellermeyer has quit [Quit: This computer has gone to sleep]
libastral has joined #ruby
sunrunner20 has joined #ruby
toretore has joined #ruby
xall_ has joined #ruby
xall_ has quit [Client Quit]
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
infy has joined #ruby
JoshS has joined #ruby
soloscshaw has joined #ruby
esObe_ has joined #ruby
raul782 has joined #ruby
SuperLag has quit [Quit: Lost terminal]
soloscshaw has quit [Ping timeout: 260 seconds]
esObe_ has quit [Ping timeout: 255 seconds]
raul782 has quit [Ping timeout: 255 seconds]
jeffaustin81 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser_ has joined #ruby
jeffaustin81 has joined #ruby
Cohedrin has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
infy has quit [Read error: Connection reset by peer]
cschneid_ has joined #ruby
sunrunner20 has quit [Max SendQ exceeded]
soloscshaw has joined #ruby
sunrunner20 has joined #ruby
cgfbee has quit [Remote host closed the connection]
cschneid_ has quit [Ping timeout: 240 seconds]
oleo has quit [Quit: Verlassend]
jeffaustin81 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yogg-saron has joined #ruby
cgfbee has joined #ruby
SleepySensei has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AlexRussia has quit [Ping timeout: 260 seconds]
Silthias has joined #ruby
Silthias1 has quit [Ping timeout: 240 seconds]
<kke_>
gem build should have some sort of option to give the output filename (and gem build --install) . doing something like "gem build foo.gemspec && gem install foo-*.gem" will install whatever versions you have in that dir
AlexRussia has joined #ruby
hanmac has quit [Ping timeout: 258 seconds]
last_staff has joined #ruby
sunrunner20 has quit [Max SendQ exceeded]
sunrunner20 has joined #ruby
<kke_>
i guess i have to do something like "gem build foo.gem && gem install `ls -t foo-*.gem|head -1`" in dockerfile
<foxmask>
bonjello
aedorn_ has quit [Ping timeout: 258 seconds]
oleo has joined #ruby
conta has joined #ruby
mim1k has joined #ruby
hanmac has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
<kke_>
i wonder what happens if i push a gem with conditional dependencies to rubygems?
cam27 has quit [Quit: cam27]
aedorn has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nobitanobi has joined #ruby
nobitanobi has quit [Ping timeout: 258 seconds]
sunrunner20 has quit [Max SendQ exceeded]
charliesome has joined #ruby
sunrunner20 has joined #ruby
patarr has joined #ruby
aufi has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
cgfbee has quit [Ping timeout: 240 seconds]
mark_66 has joined #ruby
minimalism has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
AlexRussia has quit [Ping timeout: 260 seconds]
brent__ has joined #ruby
AlexRussia has joined #ruby
antgel has joined #ruby
cgfbee has joined #ruby
brent__ has quit [Ping timeout: 260 seconds]
maattdd has joined #ruby
minimalism has joined #ruby
cgfbee has quit [Ping timeout: 258 seconds]
cgfbee has joined #ruby
DoubleMalt has joined #ruby
Burgestrand has joined #ruby
mim1k has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mim1k has quit [Ping timeout: 240 seconds]
mdw has joined #ruby
xenops has joined #ruby
mjora7 has joined #ruby
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
sunrunner20 has quit [Max SendQ exceeded]
lhambley has joined #ruby
sunrunner20 has joined #ruby
jameser_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
DoubleMalt has quit [Read error: No route to host]
weaksauce has quit [Ping timeout: 240 seconds]
jaruga has joined #ruby
jaruga has quit [Remote host closed the connection]
biberu has joined #ruby
mburns has quit [Ping timeout: 264 seconds]
postmodern has quit [Quit: Leaving]
jaredrhine_ has quit [Remote host closed the connection]
Bounga`` has joined #ruby
mburns has joined #ruby
jaredrhine has joined #ruby
jsrn_ has joined #ruby
mikecmpbll has joined #ruby
TomyLobo3 has joined #ruby
andikr has joined #ruby
mjora7 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
vondruch has quit [Ping timeout: 240 seconds]
sunrunner20 has quit [Max SendQ exceeded]
starmix_ is now known as starmix
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
esObe_ has joined #ruby
aupadhye has joined #ruby
sunrunner20 has joined #ruby
Guest1359 is now known as alamar
aupadhye has quit [Remote host closed the connection]
marr has joined #ruby
Don_John has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
outreachdan has joined #ruby
nobitanobi has joined #ruby
vondruch has joined #ruby
qchmqs has joined #ruby
outreachdan has quit [Ping timeout: 240 seconds]
guardianx has joined #ruby
dangerousdave has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
vondruch has quit [Remote host closed the connection]
xall has joined #ruby
yogg-saron has joined #ruby
pandaant has joined #ruby
dhollinger has quit [Ping timeout: 260 seconds]
AlexRussia has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ruby
impermanence has joined #ruby
mdw has joined #ruby
djbkd has joined #ruby
impermanence has quit [Client Quit]
dhollinger has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
Cohedrin has joined #ruby
mjora7 has joined #ruby
drcode has joined #ruby
mjora7 has quit [Client Quit]
binaryplease has joined #ruby
sunrunner20 has quit [Max SendQ exceeded]
mjora7 has joined #ruby
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sunrunner20 has joined #ruby
mjora7 has quit [Ping timeout: 268 seconds]
Beams has joined #ruby
djbkd has quit [Remote host closed the connection]
<Verity>
how do you learn to use a gem with no docs
<gr33n7007h>
Verity: no one should be using 1.9 anymore. just saying.
<Verity>
gr33n7007h, its an assignment, nothing production
<Verity>
just want to get it done now
hndk has joined #ruby
<gr33n7007h>
even so
oliv_____ has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
cam27 has joined #ruby
cam27 has quit [Client Quit]
jusa has quit [Ping timeout: 260 seconds]
nahra has quit [Ping timeout: 258 seconds]
oliv_____ has quit [Ping timeout: 246 seconds]
naftilos76 has quit [Quit: Αποχώρησε]
<gr33n7007h>
Verity: are you going to use network_interfaces?
justizin has quit [Quit: Connection closed for inactivity]
tvw has quit [Ping timeout: 255 seconds]
<Verity>
going to try
<Verity>
I dont know where to begin with no docs
<Verity>
so I was guesssing at how to use it, but with no object to call .methods? on I'm not sure how to beguin
blackmesa has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
<gr33n7007h>
NetworkInterface.interfaces ?
lee_j has joined #ruby
synthroid has joined #ruby
jusa has joined #ruby
rwb has quit [Ping timeout: 260 seconds]
lhambley has joined #ruby
<Verity>
that sort of worked
<Verity>
I have to run for a bit, I'll return later to test more
<gr33n7007h>
no worries
blackmesa has quit [Ping timeout: 240 seconds]
Seenox has joined #ruby
synthroi_ has joined #ruby
<Seenox>
Hello. What is the best way to have a "grep" like functionality in a ruby output?
<apeiros>
Seenox: pipe through grep
<Seenox>
apeiros: ruby file.rb | grep "xx" ?
<apeiros>
f.ex., yes
<Seenox>
apeiros: Thanks.
<apeiros>
yw
lhambley has quit [Client Quit]
synthroid has quit [Ping timeout: 240 seconds]
gnufied has joined #ruby
oliv_____ has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sunrunner20 has quit [Max SendQ exceeded]
<Seenox>
apeiros: Are there any other way to implement something like that in a ruby file itself?
<apeiros>
of course. but how much of greps functionality do you want to copy/implement? the tool is rather powerful…
sunrunner20 has joined #ruby
soloscshaw has quit [Ping timeout: 240 seconds]
sheepman has joined #ruby
impermanence has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
unshadow has joined #ruby
impermanence has quit [Client Quit]
mim1k has joined #ruby
dangerousdave has joined #ruby
charliesome has joined #ruby
binaryplease1 has joined #ruby
tomphp has joined #ruby
binaryplease1 is now known as binaryplease
Guest96 has joined #ruby
Guest96_ has quit [Remote host closed the connection]
<Seenox>
apeiros: Sorry for late reply. Yes, I need to figure that out first.
pupsicle has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
<Seenox>
apeiros: The goal is to read manifest.mf files data, sort them, clean them and pass it to another file.
Burgestrand has quit [Quit: Closing time!]
Burgestrand has joined #ruby
rkellermeyer has joined #ruby
nowhereman has quit [Ping timeout: 260 seconds]
flying has joined #ruby
lhambley has joined #ruby
<kke_>
Seenox: well, ruby is a programming language, you can read, manipulate and output data as you please. reading and writing files is usually the second chapter in any programming tutorial right after the hello world part.
hashrocket has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest96 has quit [Remote host closed the connection]
Guest96_ has joined #ruby
binaryplease has joined #ruby
<toretore>
arne_: reduce
Guest96 has joined #ruby
sunrunner20 has quit [Max SendQ exceeded]
rfoust has joined #ruby
<hinbody>
I have a couple small scripts to accept input and save it to a file. They currently work fine, but I have an infinite loop asking for input and just use Ctrl-C to stop it when I'm done. Is there any reason not to do this?
<hinbody>
currently and in the forseeable future, I will be the only one using these.
<ljarvis>
hinbody: if you dont need to do any cleanup, then it's fine
<ljarvis>
but you can capture Ctrl-C and do cleanup if you need to
sunrunner20 has joined #ruby
<ljarvis>
and then exit gracefully
<hinbody>
ljarvis: hmmmmmm, what about closing the files? I haven't seena any negative side affects
<ljarvis>
hinbody: do you close them outside of the loop?
howdoi has quit [Quit: Connection closed for inactivity]
<toretore>
hinbody: it's much easier to give advice after seeing the actual code
<hinbody>
I do ljarvis
<ljarvis>
basically, this is fine: loop { do_everything }; this is not: loop { do something; } do something else
<ljarvis>
yeah the code would absolutely help
<gr33n7007h>
arne_: or map
millerti has joined #ruby
dasher^0_o has joined #ruby
bascht1 has joined #ruby
<hinbody>
okay, that makes sense ljarvis, thanks
<arne_>
toretore: where do i save the sum in the reduce.. i mean it looks very ugly
<arne_>
sum = 0
Guest96_ has quit [Ping timeout: 240 seconds]
<gr33n7007h>
arne_: a.map { |k, v| [k, k*v] }
<hinbody>
I understand sharing the code is better, but some of it I can't, and this was more generalized about using Ctrl-C to end the script.
<arne_>
gr33n7007h: oh no no, i dont want to multiply by k
<hinbody>
ljarvis toretore thanks for the input. This helps
<arne_>
i basicially want arr.map! { |x| [x.first,sum+=x.last]}
nanoz has joined #ruby
aupadhye|t has quit [Ping timeout: 240 seconds]
<ljarvis>
arne_: that's why you want reduce as toretore suggested
<Seenox>
kke_: Yeah, thanks.
<gr33n7007h>
ah, sorry misunderstood
<arne_>
ljarvis: yeah still. i don't know how that would look pretty. i wrote one, but thats even worse
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rkellermeyer has quit [Ping timeout: 245 seconds]
rkellermeyer has joined #ruby
Guest96_ has quit [Ping timeout: 260 seconds]
Guest96 has joined #ruby
millerti has joined #ruby
__Yiota has joined #ruby
dionysus69 has quit [Ping timeout: 245 seconds]
Gran_Mal has joined #ruby
Guest96 has quit [Remote host closed the connection]
hotpancakes has joined #ruby
ferr has quit [Quit: WeeChat 1.7]
<Doow>
Hi, I'm trying to execute an external command. I want to print the output continously. I want to return the output so I can parse it. I want to check the return code of external command.
<ljarvis>
michele: firstly, you can use //i to ignore case
anisha has quit [Read error: Connection reset by peer]
<ljarvis>
so /BananA/i will match "banana"
electrostat has quit [Quit: uwotm8]
<michele>
ljarvis yeah but then how to properly substitute the correct version in gsub?
electrostat has joined #ruby
anisha has joined #ruby
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ljarvis>
ah I missed that, basically you cant. FWIW though do you actually need the case statement?
<Seenox>
apeiros: Thanks.
scorphus has joined #ruby
synthroid has joined #ruby
Guest96 has joined #ruby
<michele>
ljarvis yes there are other unrelated conditions in there
<michele>
ljarvis i wanted to optimize all those cases though
<Doow>
ikopico, is there any way I can get the return value as a number (without resorting to string parsing of "pid 236 exit 3")?
Guest96_ has quit [Ping timeout: 268 seconds]
dhollinger has quit [Ping timeout: 260 seconds]
aaronm04 has quit [Quit: WeeChat 1.4]
synthroi_ has quit [Ping timeout: 240 seconds]
boombox_ has joined #ruby
aglorei has quit [Remote host closed the connection]
aglorei has joined #ruby
dhollinger has joined #ruby
<Doow>
nm, I solved it myself :)
jphase has joined #ruby
<ikopico>
Doow: wait_thr.value.exitstatus
<ikopico>
Oh
<ikopico>
:)
nowhereman has joined #ruby
chihhsin has quit [Ping timeout: 240 seconds]
duckly has joined #ruby
chihhsin has joined #ruby
AlexRussia has joined #ruby
yeticry_ has joined #ruby
gizmore|2 is now known as gizmore
dangerousdave has quit [Ping timeout: 240 seconds]
vali has joined #ruby
yeticry has quit [Ping timeout: 264 seconds]
olivi____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
boombox_ has quit [Remote host closed the connection]
oliv_____ has quit [Ping timeout: 260 seconds]
lhambley has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hexcat has joined #ruby
dcunit3d has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cschneid_ has joined #ruby
conta has quit [Remote host closed the connection]
<cek>
guys wtf happening with #to_s in Array. print calls it, puts doesn't
qchmqs has quit [Ping timeout: 260 seconds]
conta has joined #ruby
rippa has joined #ruby
<apeiros>
michele: it's not possible to say from the given excerpt, but you could probably just `str.gsub(/banana|bananum/, 'peach').gsub(/Banana|Bananum/, 'Peach')`
flying has quit []
millerti has joined #ruby
<apeiros>
cek: that's not because of something happening to Array#to_s. it's how puts behaves when getting an array as arg (and afaik did since 1.8 or even before)
blackmesa has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
dcunit3d has quit [Ping timeout: 268 seconds]
<Verity>
alex
<Verity>
is removing a requirement from the specs a valid solution to meeting it
last_staff has quit [Ping timeout: 240 seconds]
soloscshaw has joined #ruby
lxsameer has joined #ruby
last_staff has joined #ruby
JeanCarloMachado has quit [Ping timeout: 252 seconds]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
soloscshaw has quit [Ping timeout: 268 seconds]
<alex``>
Verity ?
rizonz has quit [Quit: Lost terminal]
DTZUZU has joined #ruby
mim1k has joined #ruby
millerti has joined #ruby
oliv_____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
ekinmur has joined #ruby
AndrewIsHere has quit []
Dreamer3 has quit [Quit: Leaving...]
nobodyzxc has joined #ruby
sunrunner20 has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oliv_____ has quit [Ping timeout: 240 seconds]
synthroid has joined #ruby
enterprisey has joined #ruby
synthroi_ has quit [Ping timeout: 255 seconds]
mjuszczak has joined #ruby
JoshS has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mjora7 has joined #ruby
cagomez has joined #ruby
Don_John has joined #ruby
jusa has quit [Ping timeout: 255 seconds]
nobodyzxc has quit [Quit: leaving]
alazred has joined #ruby
alazred has joined #ruby
alazred has quit [Changing host]
JeanCarloMachado has joined #ruby
brent__ has quit [Remote host closed the connection]
mostlybadfly has joined #ruby
brent__ has joined #ruby
rkazak has joined #ruby
mwlang has quit [Quit: mwlang]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Ping timeout: 258 seconds]
beauby has joined #ruby
mjora7 has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
brent__ has quit [Remote host closed the connection]
olivi____ has joined #ruby
swills has quit [Excess Flood]
swills has joined #ruby
yogg-saron has joined #ruby
haylon has joined #ruby
brent__ has joined #ruby
lightstalker has joined #ruby
beauby has quit [Ping timeout: 260 seconds]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rutix has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
rkazak has quit [Quit: Sleep.....ing....]
postmodern has joined #ruby
olivi____ has quit [Ping timeout: 258 seconds]
haylon_ has quit [Ping timeout: 268 seconds]
marr has joined #ruby
Yxhuvud has quit [Remote host closed the connection]
alazred has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
dhollinger has quit [Ping timeout: 240 seconds]
ResidentBiscuit has quit [Ping timeout: 255 seconds]
brent__ has quit [Remote host closed the connection]
snockerton has quit [Quit: Leaving.]
dhollinger has joined #ruby
pupsicle has quit [Remote host closed the connection]
pupsicle has joined #ruby
ResidentBiscuit has joined #ruby
mwlang has joined #ruby
AndBobsYourUncle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ltem has quit [Quit: Leaving]
blindMoe has joined #ruby
soloscshaw has joined #ruby
theunraveler has quit []
pupsicle has quit [Remote host closed the connection]
brent__ has joined #ruby
pupsicle has joined #ruby
olivi____ has joined #ruby
rkellermeyer has quit [Quit: This computer has gone to sleep]
ColeHub has joined #ruby
cam27 has joined #ruby
gusrub has quit [Remote host closed the connection]
<blindMoe>
when I try to install rvm I get permission denied errors in /usr/local/rvm. Should that folder be writable by all users on the system or just root:rvm?
mim1k has quit [Ping timeout: 240 seconds]
RobertBirnie has quit [Ping timeout: 240 seconds]
olivi____ has quit [Remote host closed the connection]
olivi____ has joined #ruby
soloscshaw has quit [Ping timeout: 268 seconds]
cam27 has quit [Client Quit]
<ljarvis>
?rvm blindMoe
<ruby[bot]>
ljarvis: I don't know anything about rvm
<ljarvis>
c'mon
rwb has quit [Ping timeout: 258 seconds]
<ljarvis>
blindMoe: #rvm
synthroi_ has joined #ruby
<baweaver>
?rvm ljarvis
<ruby[bot]>
ljarvis: Please join #rvm for RVM questions.
* baweaver
shrugs
griff has joined #ruby
brent__ has quit [Remote host closed the connection]
synthroid has quit [Ping timeout: 260 seconds]
mim1k has joined #ruby
<ljarvis>
hrm
<ljarvis>
?rvm ljarvis
<ruby[bot]>
ljarvis: Please join #rvm for RVM questions.
<ljarvis>
?rvm blindMoe
<ruby[bot]>
blindMoe: Please join #rvm for RVM questions.
<ljarvis>
wot
<baweaver>
strange eh ljarvis?
<ljarvis>
did you add it sekretly?
<baweaver>
.....
<ljarvis>
:P
<baweaver>
no
blindMoe has left #ruby ["Yeap"]
<ljarvis>
no?
<baweaver>
yes
<baweaver>
yes no
<ljarvis>
no?
<baweaver>
no yes?
<ljarvis>
hmm
<ljarvis>
agreed
<baweaver>
no yes no?
<ljarvis>
can someone please take SOAP away from me
<ruby[bot]>
baweaver: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<baweaver>
gg bot, gg
knight33 has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
synthroi_ has quit []
cpaterson has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
rkazak has joined #ruby
anisha has joined #ruby
mim1k has joined #ruby
griff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
griff has joined #ruby
rkellermeyer has joined #ruby
mochiyoda_ has quit [Quit: Konversation terminated!]
mochiyoda_ has joined #ruby
anisha has quit [Ping timeout: 260 seconds]
mochiyoda_ is now known as mochiyoda
sfdebug has quit [Quit: Leaving]
gusrub has joined #ruby
enterprisey has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 240 seconds]
AndBobsYourUncle has joined #ruby
duckpuppy has joined #ruby
hays_ has joined #ruby
hays_ has joined #ruby
hays_ has quit [Changing host]
<SeepingN>
I'm trying to use ruby to run a sed command which updates a value in a dotfile. Run on command line, it works correctly. From ruby, it makes the backup as directed with -i.backup but never modifies the file. Any idea?
HoloIRCUser4 has quit [Ping timeout: 268 seconds]
mim1k has joined #ruby
<SeepingN>
ah, backslash. need more of them. :)
<SeepingN>
duh
choke has joined #ruby
mahlon has quit [Remote host closed the connection]
loincloth has joined #ruby
mahlon has joined #ruby
<SeepingN>
double blackslash before ( and ) for sed matching? hmm. whatever, IT WORKS!
<SeepingN>
oh right, one to escape ruby, one to escape find. ugh
lagweezle is now known as lagweezle_away
troulouliou_dev has joined #ruby
last_staff has quit [Quit: last_staff]
<troulouliou_dev>
hi how can i insstall all the gems of a specific group (developement) with bundle ?
<troulouliou_dev>
baweaver, spec.add_runtime_dependency 'group name ' in gemspec works too ?
<baweaver>
Not sure offhand
<baweaver>
I'd have to look it up
lxsameer has joined #ruby
rwb has joined #ruby
<troulouliou_dev>
id does upon bundle install but i can't see the in gem list
mim1k has quit [Ping timeout: 260 seconds]
biberu has quit []
beauby has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
esObe_ has joined #ruby
evenix has joined #ruby
rkazak has joined #ruby
mim1k has joined #ruby
JeanCarloMachado has joined #ruby
JeanCarloMachado has quit [Client Quit]
patr0clus has quit [Read error: Connection reset by peer]
Cohedrin has joined #ruby
patr0clus has joined #ruby
mjuszczak has joined #ruby
JeanCarloMachado has joined #ruby
mjuszczak has quit [Client Quit]
mjuszczak has joined #ruby
esObe_ has quit [Ping timeout: 240 seconds]
beauby has quit [Ping timeout: 260 seconds]
esObe_ has joined #ruby
brent__ has joined #ruby
<evenix>
Hey guys I have a very puzzling issue. Me and my coworker are using a docker container with the EXACT same system since its on the docker-container (same ruby version, same script..) when I run the same script he's running I'm getting an error; when he does it works and he gets a 200 response. The puzzling thing is that we have the exact same version of ruby (and system..etc.. and openssl) here a gist with more info https://gist.gith
<evenix>
ub.com/richardsondx/4fb4b3503f5ddb28079855c4d6401512 the error seem to be happening when the socket is running readline
<evenix>
but the puzzling thing is: why is it working for him with the exact same version of ruby and not for me? (Note: It works for me sometimes when I go into byebug and go through the stacktrace etc.. sometimes the request works and return a succesfull result )
soloscshaw has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
enterprisey has joined #ruby
ColeHub has quit [Quit: Bye.]
hays_ has quit [Ping timeout: 240 seconds]
[Butch] has quit [Quit: I'm out . . .]
mim1k has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
<evenix>
Also; the curl request works on my machine but not when I use ruby. I think there's an issue in net/http but its hard to pinpoint where is the issue because although we're running the code from the same image; I'm the only one experiencing the issue.
<evenix>
any ideas? :)
<jgnagy>
what is the actual error
<zenspider>
evenix: repaste the url w/ the huge blob of text around it
<zenspider>
ugh... w/o
KCmetro_ has quit [Read error: Connection reset by peer]
<evenix>
zenspider: that same url works on other machine with the exact same code and ruby version (we're all using the same container )
KCmetro has joined #ruby
<zenspider>
don't assume the error is in a library older than you. :P
soloscshaw has quit [Ping timeout: 260 seconds]
<jgnagy>
yeah, so "Connection reset by peer (Errno::ECONNRESET)"
<zenspider>
this does sound like a networking / ssl issue tho
rkazak has quit [Quit: Sleep.....ing....]
<jgnagy>
do you have access to the logs on the server side?
skalfyfan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<evenix>
@jgnagy I've been testing it with this script
<zenspider>
that probably won't even hit logging if it is ECONNRESET, it might not be hitting the stack yet
<jgnagy>
well, that error means you got a TCP RST back from the remote end
<jgnagy>
or something along the way
<evenix>
@jgnagy mmh.. how do you explain that its working with no problem when someone with the exact same image runs it on their computer?
<jgnagy>
are they on a different machine?
<jgnagy>
maybe a different network
<evenix>
yes but we're using docker containers
<zenspider>
I'm not sure how docker does networking ... if it is bridged to the host computer, then you need to check the differences between the hosts. I'll assume that the docker containers are exactly the same down to the byte (you should be able to confirm that simply by the sha, right?)
<evenix>
on the same wifi
<jgnagy>
docker only solves for differences in your local (machine's) environment
<evenix>
oh ok so you think that it could be the network*?
<jgnagy>
you should be able to run tcpdump on your host machine
<jgnagy>
assuming eth0 is the network interface your machine uses to connect to the world
pupsicle has quit [Quit: pupsicle]
<zenspider>
that seems like overkill... but it should work
<evenix>
tcpdump -i eth0
yogg-saron has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jgnagy>
yeah
<evenix>
ok so you're suggesting to compare our network? with that command?
<jgnagy>
you can watch the packets leaving your machine (and where the RST is coming from)
<jgnagy>
that is to compare the responses you're getting
<jgnagy>
are you running your requests at the same time?
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<evenix>
No we're running them separately
<jgnagy>
and are there times it works for both of you?
<evenix>
but we tried to make a loop and my loop always fails and his always works
<evenix>
curls always work for both of us
<evenix>
The only time it fails is when we run the same exact script (we checked the md5sum )
<jgnagy>
I don't see anything obviously wrong with your ruby code, nor do I know of any OpenSSL or ruby issues that would cause RSTs, especially in the way you're describing
<jgnagy>
I would recommend the tcpdump
rkellermeyer has quit [Quit: This computer has gone to sleep]
<jgnagy>
because that way you can compare how the communication itself is happening
rkellermeyer has joined #ruby
<jgnagy>
(meaning, are you both hitting the same remote IP?, where is the RST coming from?, etc.)
<jgnagy>
tcpdump -i eth0 -n -s 65535 tcp port 443
<jgnagy>
should help narrow it down a bit
rkellermeyer has quit [Client Quit]
<evenix>
ok makes sense. This is actually a great suggestion, I'll try to explore that route. Thanks a lot
<jgnagy>
and will give you IPs instead of names
unshadow has joined #ruby
<jgnagy>
no problem
Parsify has joined #ruby
brent__ has joined #ruby
<jgnagy>
even when you use the same docker container, your docker daemon can be configured differently
<jgnagy>
such as the DNS servers it uses
<jgnagy>
which could impact why your containers do different things
JeanCarl1Machado has joined #ruby
JeanCarl1Machado has quit [Client Quit]
mjuszczak has quit []
JeanCarloMachado has quit [Remote host closed the connection]
haylon has quit [Remote host closed the connection]
unshadow_ has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
mim1k has quit [Ping timeout: 258 seconds]
<evenix>
Ok. If its not the network.. could it be something else that we didn't think about?
<zenspider>
iirc, curl bundles its own ssl keychain
gusrub has quit [Remote host closed the connection]
JeanCarloMachado has quit [Client Quit]
<baweaver>
ohai zenspider
<zenspider>
hey
JeanCarloMachado has joined #ruby
<evenix>
how would that impact the request since we have the same code the way the request works should in principle be the same no? (except the network part that we still have to explore )
rkazak has joined #ruby
jusa has joined #ruby
<evenix>
I think jgnagy is probably right I'll have an answer tomorrow when we'll test. Thanks AGain! I'll share the output if I figure this out.
olivi____ has quit [Remote host closed the connection]
enterprisey has quit [Remote host closed the connection]
oliv_____ has joined #ruby
<evenix>
@zenspider and the library is not older than me :p haha but good one
evenix has quit [Remote host closed the connection]
jusa has quit [Ping timeout: 260 seconds]
JeanCarloMachado has quit [Quit: Lost terminal]
JeanCarloMachado has joined #ruby
gusrub has joined #ruby
oliv_____ has quit [Ping timeout: 260 seconds]
duckpuppy has quit [Ping timeout: 260 seconds]
Ishido has quit [Remote host closed the connection]
duckpuppy has joined #ruby
skweek has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
olivi____ has joined #ruby
jamesaxl has joined #ruby
mwlang has quit [Quit: mwlang]
binaryplease has joined #ruby
blackmesa has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
govg has quit [Ping timeout: 240 seconds]
mjuszczak has joined #ruby
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
negatifze has joined #ruby
hays_ has joined #ruby
hays_ has joined #ruby
hays_ has quit [Changing host]
KCmetro has quit [Read error: Connection reset by peer]
enterprisey has joined #ruby
duper has quit [Read error: Connection reset by peer]
MrBismuth has joined #ruby
duper has joined #ruby
olivi____ has quit [Ping timeout: 260 seconds]
rkazak has quit [Quit: Sleep.....ing....]
LBRapid has quit [Ping timeout: 246 seconds]
LBRapid has joined #ruby
hays_ has quit [Remote host closed the connection]
Nightmare has quit [Ping timeout: 246 seconds]
kenichi has quit [Ping timeout: 246 seconds]
canton7 has quit [Ping timeout: 260 seconds]
hobodave has quit [Ping timeout: 240 seconds]
cgfbee has quit [Ping timeout: 246 seconds]
miah has quit [Ping timeout: 246 seconds]
Drakevr has quit [Ping timeout: 240 seconds]
[spoiler] has quit [Ping timeout: 240 seconds]
csaunders_ has joined #ruby
bmn_ has quit [Ping timeout: 264 seconds]
varesa has quit [Ping timeout: 246 seconds]
Meeh_ has quit [Quit: No Ping reply in 180 seconds.]
skweek has quit [Ping timeout: 252 seconds]
ammar has quit [Ping timeout: 240 seconds]
yokel has quit [Ping timeout: 246 seconds]
gimmic_ has joined #ruby
Rush_ has joined #ruby
govg has joined #ruby
tabakhase__ has joined #ruby
lagweezl1_away has joined #ruby
MrBusiness has quit [Read error: Connection reset by peer]
gimmic has quit [Remote host closed the connection]
petems has quit [Ping timeout: 240 seconds]
tabakhase has quit [Ping timeout: 240 seconds]
csaunders has quit [Ping timeout: 240 seconds]
Rush has quit [Remote host closed the connection]
RushPL has quit [Remote host closed the connection]
ByronJohnson has quit [Ping timeout: 240 seconds]
lagweezle_away has quit [Ping timeout: 240 seconds]
roger_rabbit has quit [Ping timeout: 240 seconds]
pwillard has quit [Ping timeout: 240 seconds]
jrmhurst92 has quit [Ping timeout: 240 seconds]
nrk has quit [Ping timeout: 240 seconds]
ByronJoh1son has joined #ruby
Meeh has joined #ruby
russt has quit [Ping timeout: 260 seconds]
yokel has joined #ruby
RushPL has joined #ruby
knight33 has joined #ruby
Takumo has quit [Ping timeout: 240 seconds]
rcs has quit [Ping timeout: 252 seconds]
Junaos has quit [Ping timeout: 268 seconds]
lucas has quit [Ping timeout: 258 seconds]
tabakhase__ has joined #ruby
tabakhase__ has quit [Changing host]
mclee has quit [Ping timeout: 240 seconds]
bmn has joined #ruby
tabakhase__ is now known as tabakhase
kenichi has joined #ruby
AndrewIsHere has joined #ruby
pwillard has joined #ruby
[spoiler] has joined #ruby
_2easy has quit [Ping timeout: 240 seconds]
artmann_ has quit [Quit: No Ping reply in 180 seconds.]
LyndsySimon has quit [Ping timeout: 240 seconds]
mattwc has quit [Ping timeout: 240 seconds]
Lloyd has quit [Ping timeout: 240 seconds]
wsmoak has quit [Ping timeout: 240 seconds]
yo61 has quit [Ping timeout: 240 seconds]
MrBloo has quit [Ping timeout: 240 seconds]
rrichardsr3 has quit [Ping timeout: 240 seconds]
heyimwill has quit [Ping timeout: 240 seconds]
w5isp has quit [Ping timeout: 240 seconds]
digitalfiz has quit [Ping timeout: 240 seconds]
Majost has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
c-c has quit [Ping timeout: 240 seconds]
artmann_ has joined #ruby
Junaos has joined #ruby
c-c has joined #ruby
dcunit3d has joined #ruby
_2easy has joined #ruby
_2easy has joined #ruby
_2easy has quit [Changing host]
lucas has joined #ruby
ammar has joined #ruby
c-c is now known as Guest3405
ohcibi has quit [Quit: No Ping reply in 180 seconds.]
nrk has joined #ruby
mclee has joined #ruby
mroth has quit [Ping timeout: 240 seconds]
rflot has quit [Ping timeout: 240 seconds]
kapowaz has quit [Ping timeout: 240 seconds]
cgfbee has joined #ruby
ablackack has quit [Ping timeout: 240 seconds]
arthurnn has quit [Ping timeout: 240 seconds]
xybr_ has quit [Ping timeout: 240 seconds]
ohcibi has joined #ruby
rcs has joined #ruby
canton7 has joined #ruby
wsmoak has joined #ruby
Nightmare has joined #ruby
Drakevr has joined #ruby
russt has joined #ruby
jrmhurst92 has joined #ruby
xybr_ has joined #ruby
arthurnn has joined #ruby
infernix has quit [Excess Flood]
miah has joined #ruby
tercenya has quit [Remote host closed the connection]
yo61 has joined #ruby
synstack has quit [Excess Flood]
Lloyd has joined #ruby
tercenya has joined #ruby
Takumo has joined #ruby
Takumo has joined #ruby
Takumo has quit [Changing host]
ablackack has joined #ruby
synstack has joined #ruby
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Majost has joined #ruby
rhyselsmore has joined #ruby
LyndsySimon has joined #ruby
MrBloo has joined #ruby
digitalfiz has joined #ruby
mroth has joined #ruby
kapowaz has joined #ruby
rflot has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
heyimwill has joined #ruby
raul782 has quit [Ping timeout: 260 seconds]
soloscshaw has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
mjuszczak has quit []
brent__ has quit [Remote host closed the connection]
cpaterson has quit [Quit: cpaterson]
varesa has joined #ruby
raul782 has joined #ruby
hotpanca_ has joined #ruby
brent__ has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
brent__ has quit [Remote host closed the connection]
hotpancakes has quit [Read error: Connection reset by peer]
mjuszczak has joined #ruby
negatifze has joined #ruby
brent__ has joined #ruby
soloscshaw has quit [Ping timeout: 260 seconds]
cpaterson has joined #ruby
hotpanca_ has quit [Remote host closed the connection]
hotpancakes has joined #ruby
infernix has joined #ruby
blackwind_123 has joined #ruby
brent__ has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
raul782_ has joined #ruby
raul782 has quit [Read error: Connection reset by peer]
gusrub has quit [Remote host closed the connection]
FastJack has quit [Ping timeout: 260 seconds]
<troulouliou_dev>
hi wht is the regex to get a word then exactly 10 chars
FastJack has joined #ruby
griff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hotpancakes has quit [Remote host closed the connection]
<troulouliou_dev>
like /myword(.){30}/ ?
<balazs>
Yup; that's what I'm using.
<balazs>
Hold on; let me try to get a minimal example...
<zenspider>
that's not just a word that is 10 chars... that's ANYTHING that is 36 chars
GodFather has joined #ruby
<zenspider>
define "word"
<jgnagy>
yes ^^
<jgnagy>
\w+
<jgnagy>
?
<zenspider>
hopefully.... \w{10} should suffice
<troulouliou_dev>
zenspider, a fixed string => banana
rexb0t has joined #ruby
<troulouliou_dev>
zenspider, it is a an ascii string (force_encoding(Encoding::BINARY) and i would like to extract a specific word and the 10 next char
Puffball has quit [Remote host closed the connection]
<zenspider>
troulouliou_dev: by using binary you're throwing "char" out the window... if "byte" is sufficient or you want to pretend that it's ASCII underneath, then . or \w will suffice
<jgnagy>
the first match data index 1 for that is "1234567890"
<zenspider>
people still use .match... some things never chang. :P
<zenspider>
like my typos
<troulouliou_dev>
zenspider, if i have \x00 instead of any char in 123456789 it will still work ?
<zenspider>
troulouliou_dev: you know you can try this out in irb instead of asking me, right?
<zenspider>
irb is amazing. try it
<troulouliou_dev>
zenspider, yeah it doesn work :)
<zenspider>
then why did you ask that question?
<jgnagy>
balazs I see the JSON data in your paste
Puffball has joined #ruby
<troulouliou_dev>
maybe some kind of encoding issue at my side or something to add at then end of the regexp /blah/n ..
hotpancakes has joined #ruby
<jgnagy>
but do you have the ruby code you're using to submit it?
<jgnagy>
or something similar
gusrub has joined #ruby
<zenspider>
troulouliou_dev: either ask the question you mean to ask, or go experiment and figure it out. do not expect anyone here to be psychic
patr0clus has quit [Quit: WeeChat 1.4]
<troulouliou_dev>
zenspider, ok :)
beauby has joined #ruby
<aedorn>
Is there a better way to keep the main Ruby thread idle while other threads are running? Outside of sleep or SomeForeverRunningThread.join?
mjuszczak has joined #ruby
<balazs>
jgnagy: It's a 1000-line file with initialization and crap, but that is the hash I'm passing to "client.update"
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
<jgnagy>
aedorn: run a loop that loops until some event happens so the main thread can clean up on shutdown
JeanCarloMachado has joined #ruby
<balazs>
Something like a client.create works fine, but I couldn't find docs on exactly how those fields are supposed to be set up in the hash. So I'm just going by other examples
alex`` has quit [Quit: WeeChat 1.7]
<zenspider>
>> "banana\x00123456789".b[/banana.{10}/] # works for me
<aedorn>
jgnagy: Then it constantly jumps back to that loop.. it's effectively doing the same as the others, which causes what I'm doing to slow down.
cdg has quit [Remote host closed the connection]
patr0clus has joined #ruby
<zenspider>
aedorn: why outside of a sleep or join?
<zenspider>
you want to run until the other threads are done, so why not join on them?
cschneid_ has joined #ruby
<aedorn>
zenspider: Because it's still, for whatever reason, causes things to slow down. If I run everything in irb, it's say a 5 minutes process.. but when I start it and include a sleep/join, it's more like 15
Qommand0r has quit [Quit: WeeChat 1.7.1]
<aedorn>
If I move to something ridiculous like STDIN.gets, same result as running in irb
Puffball has quit [Remote host closed the connection]
<Verity>
huh?
<Verity>
!log
<Verity>
!zlog
enterprisey has quit [Quit: Leaving]
<Verity>
who tag me
SCHAPiE has quit [Read error: Connection reset by peer]
mjuszczak has quit []
hashrocket has quit [Quit: Connection closed for inactivity]
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar>
Verity: It would help if you didn't go awol in the middle of a conversation, perhaps?
cschneid_ has quit [Ping timeout: 246 seconds]
Qommand0r has joined #ruby
<Verity>
ty Radar
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
<balazs>
jgnagy: just figured it out. So the "update" an entry in the traditional sense, I need to use "index"
lxsameer has joined #ruby
<jgnagy>
cool
<jgnagy>
sorry, got distracted by work
soloscshaw has quit [Ping timeout: 240 seconds]
<jgnagy>
those guys... expecting me to do things just because they pay me
<Verity>
I need to get paid for ruby and quick
<jgnagy>
aedorn: your problem depends a lot on your scenario
<jgnagy>
which ruby are you using?
cagomez has quit []
<jgnagy>
what are your threads doing? more specifically, are they blocking?
<aedorn>
2.4.1, some do, some do not
SCHAPiE has joined #ruby
<aedorn>
As to what they're doing.. one is a consumer (via Bunny) for RabbitMQ, the rest are kicked off on certain events.. they all go through the same process of creating a network namespace, setting up a MAC-VLAN, creating X amount of interfaces on top of that, creating a bridge, and a virtual pair, plus 2 socat processes
<aedorn>
and then they go from there
<zenspider>
aedorn: I have a doubt. t.join should be essentially free.
<aedorn>
well, it's not I'm afraid
cagomez has joined #ruby
<jgnagy>
I agree with zenspider
<zenspider>
aedorn: again. I have a doubt. you'll need to show some code to prove it.
<jgnagy>
joining on all the non-main threads should be the event you use to stop
<zenspider>
I puke up 10k threads all the time. it isn't join that slows me down at all.
<jgnagy>
that said, if you're using 2.4 and relying purely on threads for concurrency and doing things that block for a while, you're not going to get much performance benefit from threading
<zenspider>
depends on how they block... if it is just io, then it is basically free
hotpancakes has quit [Ping timeout: 260 seconds]
<jgnagy>
his sounds like a bunch of system calls
<jgnagy>
well aedorn's
<jgnagy>
I shouldn't use gender-specific pronouns
<zenspider>
they're male according to search :)
|RicharD| has quit [Quit: Sto andando via]
<zenspider>
unless that name is the John Smith of ... whereever
<jgnagy>
I think Bunny is evented
<aedorn>
I'm not even sure where to begin to generalize it enough where I can show anything, which is the only problem. Let's say that isn't the issue (the join), then why is running via irb which is doing the exact same faster than running as a process and using join
hotpancakes has joined #ruby
<jgnagy>
how are you distributing working into the threads?
<zenspider>
can't tell ya that w/o code or performance data
<jgnagy>
do you have a Queue they're popping them off of?
<jgnagy>
or are you using the main thread and some event from bunny to push work into a new thread?
<aedorn>
It gets kicked off via the Bunny consumer.. and running the Consumer via blocking (which uses join) or not will have the issue. The same as sleeping on the main thread, doing a loop, etc..
hotpancakes has quit [Ping timeout: 260 seconds]
troulouliou_dev has quit [Remote host closed the connection]
jusa has joined #ruby
cagomez has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 268 seconds]
DLSteve has joined #ruby
<jgnagy>
I'm asking because if you have a Threadpool, or an Array of threads or something, and assuming you're using `q.subscribe(block: true) do...` and shuffling work off to that pool or array, their hello world should work fine