havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.1, 2.3.4 & 2.2.7: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
toretore has quit [Ping timeout: 246 seconds]
cisco has joined #ruby
cisco has quit [Max SendQ exceeded]
cisco has joined #ruby
cisco has quit [Max SendQ exceeded]
cisco has joined #ruby
cisco has quit [Max SendQ exceeded]
cisco has joined #ruby
cisco has quit [Max SendQ exceeded]
jrafanie has joined #ruby
skade_ has joined #ruby
northfurr has joined #ruby
skade_ has quit [Ping timeout: 260 seconds]
tristanp has joined #ruby
JeanCarloMachado has quit [Ping timeout: 268 seconds]
romeoh_ has joined #ruby
JeanCarloMachado has joined #ruby
cschneid_ has joined #ruby
electrostat has quit [Quit: uwotm8]
tristanp has quit [Ping timeout: 258 seconds]
romeoh has quit [Ping timeout: 240 seconds]
electrostat has joined #ruby
t-recx has quit [Read error: Connection reset by peer]
Azure has joined #ruby
feelx has quit []
rhyselsmore has joined #ruby
nankyokusei has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
ovaltine1 is now known as ovaltine
JeanCarloMachado has quit [Ping timeout: 255 seconds]
spheric_ has quit [Ping timeout: 258 seconds]
JeanCarloMachado has joined #ruby
spheric has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
spheric has quit [Client Quit]
xco has quit [Quit: xco]
spheric has joined #ruby
xco has joined #ruby
xco has quit [Client Quit]
esObe_ has quit [Remote host closed the connection]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
xco has joined #ruby
xco has quit [Client Quit]
ddffg has quit [Ping timeout: 255 seconds]
xco has joined #ruby
xco has quit [Client Quit]
spheric has quit [Ping timeout: 260 seconds]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
xco has joined #ruby
xco has quit [Client Quit]
JeanCarloMachado has joined #ruby
romeoh_ has quit [Remote host closed the connection]
xco has joined #ruby
xco has quit [Client Quit]
duderonomy has joined #ruby
|RicharD| has quit [Quit: Sto andando via]
patr0clus has quit [Quit: tempusfugit]
patr0clus has joined #ruby
patr0clus has quit [Max SendQ exceeded]
houhoulis has quit [Remote host closed the connection]
cfec0b8d has quit [Ping timeout: 260 seconds]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
XZIST has joined #ruby
jameser has joined #ruby
JeanCarloMachado has joined #ruby
d^sh has quit [Ping timeout: 240 seconds]
apparition has joined #ruby
d^sh has joined #ruby
Pumukel has joined #ruby
skade_ has joined #ruby
wethu has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
latemus has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
<wethu> Hi, trying to find an answer with google, however not sure how to word this, what exactly is this: `def Foo(bar); Foo.new(bar); end; Foo("bar") returns an instance of Foo, init'd with "bar" but what is Foo(bar) ? a `method` or `constant_method` ?
JeanCarloMachado has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
skade_ has quit [Ping timeout: 255 seconds]
AlexRussia_ has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
AlexRussia has quit [Ping timeout: 240 seconds]
rkazak has joined #ruby
arvindsaik has quit [Ping timeout: 240 seconds]
<wethu> seem it might just be a capitalised method
<elomatreb> wethu: It's a regular method, defined on (try `p self.class`). The uppercase naming is just a convention
<elomatreb> *on self
arvindsaik has joined #ruby
JeanCarloMachado has quit [Ping timeout: 255 seconds]
<wethu> thanks elomatreb, yeah that makes sense now. Not sure ill write much of this, what conventions are these usually used in?
<elomatreb> Uppercase methods like that are usually used for "casting" methods (e.g. Integer() or Array())
<elomatreb> But they're usually not defined on Object like that, rather on Kernel http://ruby-doc.org/core-2.4.1/Kernel.html
<elomatreb> Although if you want a method like that for a module you wrote yourself it's generally considered good practice not to monkeypatch the global namespace, but rather use the #[] method on your module instead
<elomatreb> Uh, .[]. So if you wrote "MyFancyLibrary", it'd be called as MyFancyLibrary[some_object_to_convert]
enterprisey has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
JeanCarloMachado has joined #ruby
romeoh has joined #ruby
jcao219 has quit [Ping timeout: 260 seconds]
cschneid_ has quit [Remote host closed the connection]
KeyJoo has quit [Remote host closed the connection]
enterprisey has joined #ruby
apparition has quit [Changing host]
apparition has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
KnownSyntax has quit [Ping timeout: 268 seconds]
esObe_ has joined #ruby
<wethu> Thanks again for that, i was distracted with real work just now. Very interesting :)
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
cschneid_ has joined #ruby
esObe_ has quit [Read error: No route to host]
<newrubycoder> anyone got some win32 experience? i need ruby to press keys for me
esObe_ has joined #ruby
hutch34 has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
esObe_ has quit [Ping timeout: 240 seconds]
pifon has quit [Quit: Connection closed for inactivity]
enterprisey has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
romeoh_ has joined #ruby
gizmore|2 has joined #ruby
charliesome has joined #ruby
romeoh has quit [Ping timeout: 240 seconds]
gizmore has quit [Ping timeout: 240 seconds]
spiette has quit [Ping timeout: 260 seconds]
enterprisey has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
libastral has quit [Ping timeout: 258 seconds]
gusrub has joined #ruby
libastral has joined #ruby
xaxisx has joined #ruby
spheric has joined #ruby
xaxisx has quit [Client Quit]
xaxisx has joined #ruby
coderphive has quit [Quit: coderphive]
skade_ has joined #ruby
spheric_ has joined #ruby
spheric has quit [Ping timeout: 246 seconds]
antgel has quit [Ping timeout: 260 seconds]
gusrub has quit [Remote host closed the connection]
skade_ has quit [Ping timeout: 240 seconds]
PorcoRex has joined #ruby
<PorcoRex> Good evening.
porfa has quit [Quit: porfa]
<newrubycoder> yo
northfurr has joined #ruby
cschneid_ has quit [Remote host closed the connection]
nankyokusei has joined #ruby
aglorei has joined #ruby
jcao219 has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
nankyokusei has quit [Ping timeout: 260 seconds]
porfa has joined #ruby
romeoh_ has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
t-recx has joined #ruby
hutch34 has joined #ruby
esObe_ has joined #ruby
yzra has quit [Quit: yzra]
aupadhye has joined #ruby
esObe_ has quit [Ping timeout: 260 seconds]
astrobunny has joined #ruby
porfa has quit [Quit: porfa]
quobo has quit [Quit: Connection closed for inactivity]
bkxd has quit [Ping timeout: 260 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
rkazak has joined #ruby
jenrzzz has joined #ruby
c_nick has joined #ruby
<c_nick> Do i need the TCL/TK Bindings when i install Ruby ?
<c_nick> I am trying to understand why do we need it or what is it
<elomatreb> It's a graphics library. Unless you're using it somewhere you probably don't really need it
BTRE has quit [Quit: Leaving]
<c_nick> Sqlite3 on ruby 2.3.3 WIndows, so safe for me to ignore that option
__Yiota has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 260 seconds]
rkazak has quit [Quit: Sleep.....ing....]
Pumukel has joined #ruby
djbkd_ has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
<c_nick> thanks elomatreb
skade_ has joined #ruby
charliesome has joined #ruby
XZIST has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
c_nick has quit [Quit: ciaos]
djbkd_ has quit [Ping timeout: 260 seconds]
XZIST has joined #ruby
Pumukel has quit [Ping timeout: 255 seconds]
skade_ has quit [Ping timeout: 260 seconds]
pankaj has joined #ruby
hugo_dc has joined #ruby
XZIST has quit [Client Quit]
BTRE has joined #ruby
northfurr has quit [Quit: northfurr]
dviola has quit [Quit: WeeChat 1.7.1]
francuz has joined #ruby
t-recx has quit [Quit: t-recx]
northfurr has joined #ruby
aupadhye has quit [Quit: Leaving]
hugo_dc has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
esObe_ has joined #ruby
newrubycoder has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
mostlybadfly has quit [Quit: Connection closed for inactivity]
esObe_ has quit [Ping timeout: 260 seconds]
GodFather has quit [Ping timeout: 260 seconds]
enterprisey has quit [Remote host closed the connection]
enterprisey has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
spheric_ has quit [Ping timeout: 264 seconds]
pifon has joined #ruby
gix has quit [Ping timeout: 260 seconds]
PorcoRex has quit [Remote host closed the connection]
gix has joined #ruby
BTRE has quit [Ping timeout: 260 seconds]
ski7777 has quit [Ping timeout: 255 seconds]
XZIST has joined #ruby
jcao219 has quit [Ping timeout: 260 seconds]
patarr has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guardianJ has joined #ruby
xall has joined #ruby
Pumukel has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
skade_ has joined #ruby
Pumukel has quit [Ping timeout: 264 seconds]
skade_ has quit [Ping timeout: 240 seconds]
xall has quit [Ping timeout: 240 seconds]
xall has joined #ruby
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
bkxd has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
aupadhye has joined #ruby
aupadhye has quit [Client Quit]
nankyokusei has joined #ruby
blackwind_123 has quit [Ping timeout: 260 seconds]
blackwind_123 has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
skade_ has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ski7777 has joined #ruby
xall_ has joined #ruby
esObe_ has joined #ruby
xall has quit [Ping timeout: 255 seconds]
xall has joined #ruby
pankaj has quit [Quit: Leaving]
esObe_ has quit [Ping timeout: 240 seconds]
xall_ has quit [Ping timeout: 258 seconds]
tildes has joined #ruby
guardianJ has quit [Read error: Connection reset by peer]
XZIST has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
latemus has quit [Ping timeout: 264 seconds]
guardianJ has joined #ruby
treaki_ has joined #ruby
jenrzzz has joined #ruby
xall has quit [Ping timeout: 240 seconds]
treaki has quit [Ping timeout: 240 seconds]
xall has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
latemus has joined #ruby
hndk has joined #ruby
guardianJ has quit [Remote host closed the connection]
guardianJ has joined #ruby
hutch34 has joined #ruby
Guest96 has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 260 seconds]
xall has quit [Quit: xall]
Guest96 has joined #ruby
xall has joined #ruby
xall_ has joined #ruby
hndk has quit [Quit: Leaving]
cfec0b8d has joined #ruby
xall has quit [Ping timeout: 260 seconds]
Guest96 has quit [Remote host closed the connection]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
Guest96 has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
guardianJ has quit [Read error: Connection reset by peer]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
xall_ has quit [Quit: xall_]
guardianJ has joined #ruby
roamingdog has joined #ruby
xall has joined #ruby
roamingdog has quit [Remote host closed the connection]
tristanp has joined #ruby
enterprisey has joined #ruby
esObe_ has joined #ruby
northfurr has quit [Quit: northfurr]
aupadhye has joined #ruby
esObe_ has quit [Ping timeout: 264 seconds]
aupadhye has quit [Client Quit]
bernd27 has quit [Remote host closed the connection]
xall_ has joined #ruby
xall has quit [Ping timeout: 260 seconds]
xall has joined #ruby
guardianJ has quit [Remote host closed the connection]
djbkd has quit [Quit: Leaving...]
xall_ has quit [Ping timeout: 260 seconds]
<dminuoso> !goodmorning
aupadhye has joined #ruby
aupadhye has quit [Client Quit]
tildes has quit [Ping timeout: 258 seconds]
Blobson has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
yogg-saron has joined #ruby
patarr has joined #ruby
anisha has joined #ruby
Pumukel has joined #ruby
patarr has quit [Ping timeout: 255 seconds]
xall_ has joined #ruby
Ishido has joined #ruby
xall has quit [Ping timeout: 255 seconds]
Pumukel has quit [Ping timeout: 240 seconds]
jcao219 has joined #ruby
bigkevmcd has joined #ruby
bigkevmcd has quit [*.net *.split]
yogg-saron has quit [*.net *.split]
skade_ has quit [*.net *.split]
bkxd has quit [*.net *.split]
pifon has quit [*.net *.split]
d^sh has quit [*.net *.split]
ben__ has quit [*.net *.split]
infernix has quit [*.net *.split]
yo61 has quit [*.net *.split]
swills has quit [*.net *.split]
Guest37310 has quit [*.net *.split]
minimalism has quit [*.net *.split]
HashNuke has quit [*.net *.split]
hayden___ has quit [*.net *.split]
zenspider[m] has quit [*.net *.split]
dman[m] has quit [*.net *.split]
hayden___ has joined #ruby
swills has joined #ruby
Guest37310 has joined #ruby
hayden___ has quit [Changing host]
hayden___ has joined #ruby
bkxd has joined #ruby
ben__ has joined #ruby
minimalism has joined #ruby
d^sh has joined #ruby
pifon has joined #ruby
yo61 has joined #ruby
User458764 has joined #ruby
Mortomes|Work has joined #ruby
zenspider[m] has joined #ruby
dman[m] has joined #ruby
oleo has quit [Quit: irc client terminated!]
xall_ has quit [Ping timeout: 255 seconds]
infernix has joined #ruby
tim_ has joined #ruby
nankyokusei has joined #ruby
tim_ has left #ruby [#ruby]
nankyokusei has quit [Ping timeout: 258 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
esObe_ has joined #ruby
bweston92 has quit [Quit: Connection closed for inactivity]
esObe_ has quit [Ping timeout: 240 seconds]
ThePortWhisperer has joined #ruby
<ThePortWhisperer> hello
<ThePortWhisperer> i have a large framework that runs on ruby 2.3 on my box
<ThePortWhisperer> theres another app that requires 2.4 (jekyll) and last time I installed it things seemed to go haywire with the versions stepping on each other
<ThePortWhisperer> is there some way to install this other ruby version while keeping everything segregated properly
<Radar> ThePortWhisperer: yes
<Radar> ThePortWhisperer: use chruby + ruby-install
<Radar> ThePortWhisperer: what OS are you on?
<ThePortWhisperer> kali linux
loveablelobster has joined #ruby
andrzejku has joined #ruby
TomyWork has joined #ruby
andikr has joined #ruby
xall_ has joined #ruby
bigkevmcd has joined #ruby
jgnagy has quit [Remote host closed the connection]
ddffg has joined #ruby
Pumukel has joined #ruby
unshadow has joined #ruby
spheric has joined #ruby
xenops has joined #ruby
<dminuoso> ThePortWhisperer: So the real solution is to actually keep them entirely separate.
<dminuoso> ThePortWhisperer: If you however must share a physical server, look into chruby. Be sure to have the shell set the correct chruby for each
bronson has quit [Remote host closed the connection]
Pumukel has quit [Ping timeout: 255 seconds]
<ThePortWhisperer> dminuoso, interesting.
<ThePortWhisperer> i guess i can fire up another VM that is used only for jekyll
<ThePortWhisperer> i had to go through hell and high water to recover last time so if the only way to safely avoid that is to put jekyll on another box i'll take the step
TomyWork has quit [Remote host closed the connection]
User458764 has joined #ruby
Puffball has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
Puffball has joined #ruby
jackrandom has joined #ruby
last_staff has joined #ruby
Guest96 has quit [Remote host closed the connection]
skade_ has joined #ruby
Guest96 has joined #ruby
mark_66 has joined #ruby
<dminuoso> ThePortWhisperer: Im a big fan of completely isolating apps. Here we dockerize everything.
<dminuoso> It avoids such issues entirely.
<ThePortWhisperer> i see. i dont know docker at all yet
Burgestrand has joined #ruby
<ThePortWhisperer> so if i dockerize the jekyll install it should avoid breaking my other app
<dminuoso> ThePortWhisperer: A docker container is very much like a VM. Except a VM virtualizes the hardware, whereas docker virtualizes the operating system.
<dminuoso> ThePortWhisperer: Im not saying you should use it, but you should definitely explore it to know what it's all about.
charliesome has joined #ruby
Bish has quit [Quit: leaving]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
charliesome has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
Pumukel has joined #ruby
esObe_ has joined #ruby
patientj has joined #ruby
mim1k has joined #ruby
mim1k has quit [Ping timeout: 246 seconds]
esObe_ has quit [Ping timeout: 268 seconds]
blackmesa has joined #ruby
toretore has joined #ruby
patientj has left #ruby [#ruby]
Burgestrand has quit [Quit: Closing time!]
roshanavand has joined #ruby
xco has joined #ruby
User458764 has joined #ruby
Burgestrand has joined #ruby
jamesaxl has joined #ruby
<Seenox> Hello everyone. Sorry if this is a very simple question, but how can I add " in a puts? for example puts ""Hello""?
<Burgestrand> Seenox you can either escape it by putting a \ before it, or change the quotes so that you don't use " to surround your string
<Burgestrand> >> "Hello \" World"
<ruby[bot]> Burgestrand: # => "Hello \" World" (https://eval.in/789239)
<Burgestrand> >> 'Hello " World'
<ruby[bot]> Burgestrand: # => "Hello \" World" (https://eval.in/789240)
antib has joined #ruby
<Seenox> Burgestrand: Hello again my beloved teacher!
<Seenox> Burgestrand: I have something like this, but I need to add " at the beginning of my output and ", at the end of it.
<Burgestrand> Seenox for what purpose do you need the quotes?
<Burgestrand> Seenox I'm thinking if it's mean to make the output machine-readable there might be a better way
Ishido has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
<Seenox> Burgestrand: My script outputs something like this for the "hosts" : [{"Name"=>"git"}, {"Name"=>"ntp"}, {"Name"=>"synfacts"}]
<Seenox> Burgestrand: Then I need to read all the "Name" values, add " before everyone of them and add ", at the end of it and then use it for another purpose.
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
xco has left #ruby [#ruby]
<Burgestrand> Seenox you want e.g.: "git", "ntp", "synfacts"
<Seenox> without space after ,
<Seenox> Also add another, at the end of it.
Ishido has joined #ruby
<Burgestrand> Seenox what about if there's a backslash in any of the names?
<Burgestrand> Seenox or a comma in one of the names?
<Seenox> Burgestrand: You mean from the source arrays? It won't be any in them, they are puppet classes names.
<Burgestrand> Seenox I'm fishing for if you're actually trying to output CSV, or this slightly arbitrary format you're describing :)
<Seenox> Burgestrand: One second please.
jsrn_ has joined #ruby
jsrn has joined #ruby
jsrn_ has quit [Client Quit]
patarr has quit [Ping timeout: 260 seconds]
<Seenox> Burgestrand: I will then use this output in another one like the "hosts" I have above to add multiple values.
mim1k has joined #ruby
Ishido has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
Ishido has joined #ruby
<Seenox> Burgestrand: https://eval.in/789277
esObe_ has joined #ruby
<Seenox> Burgestrand: If you look at the output, it is missing a starting " and also an ending ",
<Burgestrand> Seenox I think you might be making a mistake, but here's your gun: https://eval.in/789279
<Burgestrand> Seenox if you need a comma at the end you can add it :)
gizmore|2 has quit [Ping timeout: 260 seconds]
<Seenox> Burgestrand: Can you please explain what mistake I am making here?
HashNuke has joined #ruby
<Burgestrand> Seenox usually trying to massage output into some arbitrary unknown but unforgiving format for parsing via machine somewhere else is riddled with weird edge-cases you tend to forget about, that'd be solved by using a known format and a known serializer for it!
binaryplease has joined #ruby
gizmore|2 has joined #ruby
<Burgestrand> Seenox e.g. people that write/read their own CSV reader/writer without using a well-tested one, and end up making a mess :)
<Seenox> Burgestrand: Hmm, I can't understand you. You mean the output is a mess?
<Burgestrand> Seenox no. CSV for example is a text format where you separate values into columns and rows, like an excel sheet.
<Seenox> Burgestrand: to explain a little bit more about it, the script should have a variable like this and then we add our own name at the end of it to use it like this: hammer hostgroup update --title MANUALLYADDEDTITLE --puppet-classes "THEOUTPUTWEHAVE","MANUALLYADDEDNAME"
<Burgestrand> Seenox ah, so your intent is to use the output in a shell command?
<Seenox> Burgestrand: Exactly.
<Seenox> Burgestrand: Am I still making a mess here or I am good to go?
<Burgestrand> Seenox I'm sure you're aware that shell commands can be a bit finnicky with special characters, e.g. $, '. If you're a 100% sure that your names won't be interpreted by the shell in some weird way then you're good to go.
sepp2k has joined #ruby
<Seenox> Burgestrand: I think in this particular thing, it will be ok.
<Burgestrand> Seenox I can almost see it, `hammer hostgroup update --title "Oh no" --puppet-classes "${rm -rf /}","git"
<Seenox> Burgestrand: Can you please explain what exactly \ did in that puts?
<Burgestrand> Seenox :)
<Seenox> Burgestrand: so I can use \ "," to it and it will add the ending comma?
<Seenox> Burgestrand: Since the data coming from another command in a json format, I think it will be safe to use it like that, or maybe I am lost here.
<Burgestrand> Seenox if you have a puppet class with the name "${rm -rf /}" you could be in some trouble :)
<Seenox> Burgestrand: That's true... How to avoid such a thing in general?
<Burgestrand> Seenox ideally you'd output it in a format tailored for the next usage
nankyokusei has joined #ruby
<Burgestrand> Seenox e.g. ruby has a module called `shellwords` that's meant to make strings safely passable to bash
gizmore|2 has quit [Ping timeout: 240 seconds]
<Seenox> Burgestrand: For example before the last step, I put it through shelljoin?
<Burgestrand> Seenox yeah, it might be that shelljoin is not good for you here since it splits the values by space, and hammer might require commas, but you could pass each name through shellescape
<Burgestrand> Seenox e.g. https://eval.in/789328
mtkd has quit []
nankyokusei has quit [Ping timeout: 258 seconds]
<Seenox> Burgestrand: So in the end, the third value in hash will be ineffective?
<Burgestrand> Seenox yeah, that's the idea, but according to the documentation that only holds if the value is not quoted
<Seenox> Burgestrand: the name, or quoted in the hash array?\
morfin has joined #ruby
<morfin> hello
<morfin> Gemfile accepts any Ruby code?
<Burgestrand> Seenox the final output
<Seenox> Burgestrand: I see.
<Burgestrand> morfin yes
<morfin> oh
gizmore|2 has joined #ruby
porfa has joined #ruby
<morfin> that's why thing reloading code suggested me to add some code for FreeBSD to use rb-kqueue
<Seenox> Burgestrand: Thanks a lot for your time and help every single time!
<Burgestrand> Seenox :)
KeyJoo has joined #ruby
<Seenox> Burgestrand: I really appreciate it. Thanks man.
<Burgestrand> Seenox You're welcome! I might not be a man though, you never know :).
enterprisey has quit [Remote host closed the connection]
renchan has joined #ruby
<Seenox> Burgestrand: :) haha.
arup_r has joined #ruby
jackrandom has quit [Remote host closed the connection]
<Seenox> Burgestrand: At the end it worked very great. https://gist.github.com/anonymous/4824d1c58dff0cfca93254af53fce98f
<Seenox> Burgestrand: Now I just need to add shellescape before the last step.
vali has joined #ruby
andrzejku has quit [Quit: WeeChat 1.7]
User458764 has joined #ruby
<Burgestrand> Seenox nice :). Looks like line #5 is unnecessary though.
xall_ has quit [Ping timeout: 258 seconds]
<Seenox> Burgestrand: The first output is like this: https://gist.github.com/anonymous/cd12350a7672e5f40e41e947b15365c3
<Seenox> Burgestrand: I can still call the name key and get the values without removing the IDs, right?
<Burgestrand> Seenox yup, `hosts.map { … }` retrieves the name only, so no need to filter out the ID.
<Seenox> Burgestrand: Great!
nadir has quit [Quit: Connection closed for inactivity]
<Burgestrand> Seenox additionally, if you do: `puppet_classes = pcnames + [puppetclass_name]`, then you can manipulate your class names only once and not worry about the trailing comma
swarm has joined #ruby
lxsameer has joined #ruby
pandaant has joined #ruby
<swarm> Anyone want to make some cash? I have a quickish programming problem I need help with, and I'm willing to pay someone $200 to solve it.
xall_ has joined #ruby
<dgs_> no, but i'd like to see the problem regardless
<Seenox> Burgestrand: What would be the difference in my case? Isn't it same?
porfa has quit [Quit: porfa]
<swarm> dgs_, provided this schema: http://sqlfiddle.com/#!9/dcc6d/1 -- I need a program that outputs a table like: https://puu.sh/vJlzM/0ca8bf663f.png
<Burgestrand> Seenox similar, but not the same, it'd allow you to remove that `+ ","` from line #7 and only use `#{puppetclass_names}` (notice plural) instead of `#{pcnames}#{puppetclass_name}` at the final line
blackmesa has quit [Ping timeout: 240 seconds]
<Seenox> Burgestrand: ah I missed that "s".
<Burgestrand> Seenox and thus you'd only have a single list of names to pass on, instead of one list and then a lonesome value that you need to tack on to the end :)
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Seenox> Burgestrand: Perfect. thanks for the tip.
<Burgestrand> Seenox also, a final tip that might not be relevant depending on the environment you're in, `Kernel.exec` in Ruby can take multiple parameters for shell commands, which makes it safer than trying to build a command string that you then pass to the shell, downside is that it doesn't return the output as text.
Ishido has quit [Read error: Connection reset by peer]
<Burgestrand> Seenox e.g. `exec("/usr/bin/hammer", "update", "--title", hostgroup_title, "--puppet-classes", puppet_class_names)`
<Burgestrand> Seenox also takes care of escaping if you have any nasty characters in the command
<Burgestrand> >> exec "echo", "Hello $USER"
<ruby[bot]> Burgestrand: # => (https://eval.in/789401)
<Burgestrand> I guess it makes sense that ruby bot does not allow exec, oh well :)
<Seenox> Burgestrand: lol
<Seenox> Burgestrand: The downside is it doesn't return the output as text, what is the advantage?
mfaeh has joined #ruby
<Seenox> Burgestrand: I had another case in my script that I had to end it with 2>/dev/null
<Burgestrand> Seenox safer, the string is not interpreted by the shell so the horror scenario of a pcname with `${rm -rf /}` is not an issue
<mfaeh> join *pug
<Burgestrand> Seenox there are ways to retrieve stdout/stderr but it's slightly more cumbersome than what you have when you execute your %x[command] :)
romank has joined #ruby
aupadhye has joined #ruby
<Seenox> Burgestrand: So in this case, I could use exec instead and avoid 2>/dev/null?
meinside has joined #ruby
<Burgestrand> Seenox oh, sorry, it's not exec, I mean `system` (`exec` replaces the calling process with the called process)
<Burgestrand> Seenox same thing here though, not quite, because `system` returns a true/false if the command exited with success or not, and not the output of the command
arup_r has quit [Remote host closed the connection]
<Seenox> Burgestrand: Also using system, I can't do the same thing with for example in this case "hammer"?
<Burgestrand> Seenox no, because `hosts = …` you expect that `hosts` has the parsed output of hammer, but if you use system then it just returns true/false, not the output.
<Seenox> Burgestrand: I see. So in my case it wouldn't be correct.
<Seenox> Burgestrand: True or false, as in if the command exists or not?
<Burgestrand> Seenox true/false as in command exit status
<Seenox> Burgestrand: What if the program outputs a text regardless of success or fail?
jgnagy has joined #ruby
<Burgestrand> Seenox return value is exit status only, e.g. 0 == true, anything else == false.
<Seenox> Burgestrand: Got it.
marr has joined #ruby
jgnagy has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DaveTaboola has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 240 seconds]
sepp2k has quit [Quit: Leaving.]
<swarm> dgs_: what did you think of the problem?
itarato has joined #ruby
rhyselsmore has joined #ruby
tvw has joined #ruby
jackjackdripper has joined #ruby
<dgs_> hmm
<dgs_> seems like a home problem?
<dgs_> *home work
<dgs_> i'd work out the html to draw that table by hand (or text editor)
jenrzzz has joined #ruby
<swarm> sorta, but i'm not in school. but learning it.
<dgs_> then just do that select and iterate over it building similar html
<dgs_> obviously need basic css to give it the same colors/borders etc
jackjackdripper1 has joined #ruby
<swarm> the html/css/js part is no issue for me. it's the logic of building the tree and iterating through it... it seems inefficient
marr has quit [Ping timeout: 260 seconds]
jackjackdripper1 has quit [Read error: Connection reset by peer]
roamingdog has joined #ruby
jackjackdripper2 has joined #ruby
ledestin has joined #ruby
bubble1994 has joined #ruby
jackjackdripper has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
jackjackdripper2 has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
astrobunny has quit [Remote host closed the connection]
roamingdog has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 268 seconds]
<dgs_> what are you using to pull out the data? in active record it would be something like
<dgs_> employee.find(:all).each{|e| print "<tr><td>#name</td><td>#boss</td></tr>"}
<dgs_> now that has to be worth at least $50
tvw has quit [Ping timeout: 268 seconds]
petems has quit []
petems has joined #ruby
AlexRussia_ has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
pwnd_nsfw` has joined #ruby
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
hutch34 has joined #ruby
pwnd_nsfw has quit [Ping timeout: 255 seconds]
troter__________ has quit []
troter__________ has joined #ruby
A124 has quit [Ping timeout: 258 seconds]
flying has joined #ruby
hutch34 has quit [Ping timeout: 272 seconds]
A124 has joined #ruby
mortimer has joined #ruby
jcao219 has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
ishahnaz has joined #ruby
roshanavand has left #ruby [#ruby]
patarr has quit [Ping timeout: 258 seconds]
xall_ has quit [Ping timeout: 258 seconds]
apparition has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kiltzman has quit [Ping timeout: 240 seconds]
xall_ has joined #ruby
kiltzman has joined #ruby
bronson has joined #ruby
roshanavand has joined #ruby
itarato has quit [Quit: WeeChat 1.7]
User458764 has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
conta has joined #ruby
porfa has joined #ruby
SenpaiSilver has quit [Quit: Leaving]
nankyokusei has joined #ruby
roshanavand has left #ruby [#ruby]
scrooloose has quit [Quit: WeeChat 1.4]
nankyokusei has quit [Ping timeout: 260 seconds]
scrooloose has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
gregf_ has joined #ruby
treaki_ is now known as treaki
millerti has joined #ruby
blackmesa has joined #ruby
dionysus69 has joined #ruby
Silthias has joined #ruby
ishahnaz has quit [Ping timeout: 264 seconds]
AlexRussia_ has joined #ruby
User458764 has joined #ruby
mortimer has quit [Quit: WeeChat 1.6]
jameser has quit [Ping timeout: 264 seconds]
ferr has joined #ruby
cfec0b8d has quit [Ping timeout: 240 seconds]
SenpaiSilver has joined #ruby
jcao219 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
xall_ has quit [Ping timeout: 260 seconds]
patarr has joined #ruby
Ishido has joined #ruby
patarr has quit [Ping timeout: 272 seconds]
ishahnaz has joined #ruby
ishahnaz has quit [Client Quit]
wethu has quit [Quit: This computer has gone to sleep]
petruff has joined #ruby
bronson has joined #ruby
jackrandom has joined #ruby
d10n-work has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
bweston92 has joined #ruby
HoierM has joined #ruby
conta has quit [Ping timeout: 240 seconds]
romeoh has joined #ruby
wethu has joined #ruby
toretore has quit [Quit: Leaving]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ldnunes has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
JeanCarloMachado has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ixti has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
mim1k has quit [Ping timeout: 240 seconds]
conta has joined #ruby
randomguy has joined #ruby
Mortomes|Work has quit [Ping timeout: 260 seconds]
fusta has joined #ruby
conta has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Quit: dionysus69]
dionysus69 has joined #ruby
pavelz_ has quit [Quit: leaving]
dangerousdave has joined #ruby
bubble1994 has left #ruby [#ruby]
romank has quit [Ping timeout: 240 seconds]
synthroid has joined #ruby
ruurd has quit [Remote host closed the connection]
randomguy has quit [Quit: Textual IRC Client: www.textualapp.com]
randomguy has joined #ruby
randomguy is now known as randomguy_
romank has joined #ruby
randomguy_ is now known as randomswede
armyriad has quit [Ping timeout: 255 seconds]
<ineb> i have a design question. I have a singleton object in my App and basically all other Objects need access to that object. So what are good design approaches here? Make that singleton global and have all other objects access it. Or make every constructor take that singleton object? Or use inheritance, mixins?
armyriad has joined #ruby
ishahnaz has joined #ruby
nadir has joined #ruby
Guest96 has quit [Remote host closed the connection]
Guest96 has joined #ruby
<paulgafton> ineb: have the singleton instance static, and the rest of the objects access it as Class.SINGLETON
loveablelobster has quit [Quit: Textual IRC Client: www.textualapp.com]
GodFather has joined #ruby
<ineb> okay
<Seenox> I am trying to compare two arrays, but am stucked... https://gist.github.com/anonymous/b28819c4f945b638040ebd518dfa9372 Can anyone please check and tell what am I doing wrong?
<Seenox> Burgestrand: ^
Trynemjoel has joined #ruby
jackrandom has quit [Remote host closed the connection]
A124 has quit [Ping timeout: 255 seconds]
houhoulis has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
newrubycoder has joined #ruby
hutch34 has joined #ruby
dangerousdave has joined #ruby
houhoulis has quit [Ping timeout: 246 seconds]
nankyokusei has joined #ruby
<dminuoso> ineb: The solution is to avoid singletons in the first place.
<dminuoso> ineb: They are usually a strong code smell.
XZIST has joined #ruby
<dminuoso> Singletons imply global access. Global access means you cant reason about code flow and how state can evolve over the lifetime of your application.
<dminuoso> (Read-only singletons, or special singletons that dont impact your application such as loggers are fine however)
<canton7> ineb, creating singletons through DI means that your classes are still testable, which is a big plus
<ineb> so what are your suggestions?
t-recx has joined #ruby
<canton7> constructor injection
<canton7> if you're modelling something of which there is only 1, then a singleton makes sense. One example is the configuration management for your application
<ineb> in my case, it is an access token
<canton7> the smell with singletons is that they're traditionally done using static instances, which ihurts testability
<ineb> every class needs it to do useful things
<canton7> I'd be more likely to write a class which encapsulates the API the access token is used for, hide the access token inside that class, then inject a singleton instance of that class into whatever needs it
nankyokusei has quit [Ping timeout: 272 seconds]
marr has joined #ruby
A124 has joined #ruby
<ineb> yes, iam encapsulating it, but we can talk about a token here for the sake of simplicity
TomyWork has joined #ruby
<canton7> well, I would never inject a token, but I would inject a class which encapsulates an API (and the token is an implementation detail of that class)
<canton7> so it *does* matter
cronolio has joined #ruby
khronos has joined #ruby
Blobson has joined #ruby
<cronolio> there have someone expirience with rbot and rss plugin ?
northfurr has joined #ruby
Blobson has quit [Client Quit]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
interki has joined #ruby
interki has quit [Client Quit]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roamingdog has joined #ruby
<randomswede> If i want to 301 redirect a ruby app to a new domain, whats the best way to do this? Is rack-rewrite gem a viable option? Or should i do this at the load balancer level?
mim1k has joined #ruby
<ineb> canton7: from what you are saying, i came up with this approach: https://paste.xinu.at/iQxk20/
mfaeh has quit []
rhyselsmore has joined #ruby
mfaeh has joined #ruby
mfaeh has quit [Client Quit]
jackrandom has joined #ruby
fusta has quit [Ping timeout: 272 seconds]
jphase_ has quit [Remote host closed the connection]
starmix has joined #ruby
<ineb> no singletons involved
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jphase has joined #ruby
rhyselsmore has quit [Client Quit]
milardovich has joined #ruby
latemus has quit [Ping timeout: 240 seconds]
<canton7> ineb, that's called property injection (and you might well have done 'service.authentication = whatever', rather than that oddly-named method :P)
<canton7> ineb, the issue with that is that the service needs the authentication to be present in order to function, but you can end up in a state where it isn't present, if you don't set that property
<canton7> so it's preferable to pass it as a ctor parameter
jphase has quit [Ping timeout: 272 seconds]
<canton7> also like I said, I'll pass around an API service, not the token itself
chouhoulis has quit [Remote host closed the connection]
Pumukel has quit [Remote host closed the connection]
<canton7> ineb, (and if you pass that same Auth instance to multiple services, it is effectively a singleton)
randomswede has quit [Ping timeout: 272 seconds]
cfec0b8d has joined #ruby
<ineb> canton7: i dont understand what you mean by 'API service' in that context. You are talking about something like TokenManager or whatever?
<canton7> presumably your access token is to access an API of some sort?
ramortegui has joined #ruby
<ineb> that is correct, but there is no API service to that. this it what i want to write
last_staff has quit [Quit: last_staff]
XZIST has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<canton7> right, so I'd write a class which represents the API, and which owns the token
PatrikasZvaigzde has quit [Ping timeout: 255 seconds]
<canton7> that's the only class which owns the token
nowhereman has quit [Ping timeout: 240 seconds]
<ineb> i understand
nowhereman has joined #ruby
<ineb> i think iam all set now
<ineb> thanks
jameser has joined #ruby
conta has joined #ruby
kke_ is now known as kke
dangerousdave has joined #ruby
jgnagy has joined #ruby
jgnagy has quit [Ping timeout: 240 seconds]
swarm has quit [Quit: Page closed]
claw has quit [Ping timeout: 264 seconds]
stupidsenpai has joined #ruby
stupidsenpai has quit [Client Quit]
gnufied has joined #ruby
bronson has joined #ruby
fmcgeough has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
haylon has joined #ruby
Ellimist has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
randomguy has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nhhc has joined #ruby
conta has quit [Remote host closed the connection]
conta has joined #ruby
gabrielgizotti has joined #ruby
jackrandom has quit [Ping timeout: 272 seconds]
bernd27 has joined #ruby
randomguy is now known as randomswede
gabrielgizotti has quit [Client Quit]
aupadhye has quit [Quit: Leaving]
pandaant has quit [Remote host closed the connection]
BSAlb has joined #ruby
DLSteve has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
DLSteve has quit [Client Quit]
DLSteve has joined #ruby
BSaboia has quit [Ping timeout: 264 seconds]
wethu has quit [Quit: This computer has gone to sleep]
shaman42 has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
randomswede has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
eindoofus has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
eindoofus has quit [Client Quit]
vali has quit [Quit: vali]
patarr has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
petruff has quit [Ping timeout: 272 seconds]
shinnya has joined #ruby
romank has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
aupadhye has joined #ruby
milardovich has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
Pumukel has joined #ruby
AlexRussia_ has quit [Ping timeout: 272 seconds]
millerti has joined #ruby
romank has joined #ruby
govg has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dangerousdave has joined #ruby
Burgestrand has quit [Quit: Closing time!]
milardovich has joined #ruby
gchristensen has joined #ruby
chouhoulis has joined #ruby
dangerousdave has quit [Client Quit]
<gchristensen> Hi, is it possible to tell pry to turn off the nice features and act like more like irb? ie: disable color and paging
<gchristensen> preferably via environment variablesl
jphase has joined #ruby
ben_____ has joined #ruby
ben__ has quit [Ping timeout: 255 seconds]
theunraveler has joined #ruby
jrafanie has joined #ruby
milardovich has quit [Ping timeout: 272 seconds]
AlexRussia_ has joined #ruby
<Papierkorb> gchristensen: why not use irb in that case?
fusta has joined #ruby
conta has quit [Ping timeout: 272 seconds]
<kspencer> if you were to initialize a OpenStruct with a layered dictionary, would it convert every layer
<morfin> hm
<kspencer> s/dictionary/hash/
<Papierkorb> kspencer: No
<morfin> can i somehow avoid having different Gemfile.lock for FreeBSD and Linux?
<gchristensen> Papierkorb: I have a 3rd party program that I'm calling that drops me in to a pry session as an "API"
<gchristensen> so I'm trying to use expect to drive it
<Papierkorb> kspencer: You can either 1) not use OpenStruct and use #dig instead if that's enough or 2) use the `recursive-open-struct` gem which does what you want
DeeJayh has quit [Read error: Connection reset by peer]
<morfin> I got suggestion to add this http://paste.ubuntu.com/24536971/ to Gemfile but i will have different lock files for FreeBSD and Linux
<Papierkorb> kspencer: Well, of course, or you can build the open structs yourself too
<morfin> that sounds bad because i work in Git and don't want to ignore Gemfile.lock
<morfin> and Gemfile..
PatrikasZvaigzde has joined #ruby
<gchristensen> Papierkorb: <3 thank you!
DeeJayh has joined #ruby
porfa has quit [Quit: porfa]
<gchristensen> "Pry.color = false; Pry.pager = false; Pry.auto_indent = false;\r" <- this has largely solved the problems I've had
<morfin> hmm
<morfin> bad solution - don't ever commit Gemfile and Gemfile.lock from FreeBSD
futilegames has joined #ruby
ferr has quit [Quit: WeeChat 1.7]
User458764 has joined #ruby
futilegames has quit [Remote host closed the connection]
jameser has joined #ruby
porfa has joined #ruby
cdg has joined #ruby
milardovich has joined #ruby
nankyokusei has joined #ruby
ixti has quit [Ping timeout: 272 seconds]
choke has joined #ruby
Ishido has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 255 seconds]
conta has joined #ruby
roamingdog has quit [Remote host closed the connection]
unshadow has quit [Quit: leaving]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 240 seconds]
conta has quit [Ping timeout: 240 seconds]
bernd27 has quit [Remote host closed the connection]
hsiktas has quit []
hsiktas has joined #ruby
Guest96 has quit [Remote host closed the connection]
petruff has joined #ruby
Guest96 has joined #ruby
Meow-J has quit []
Meow-J has joined #ruby
spiette has joined #ruby
biberu has joined #ruby
hobodave has joined #ruby
ishahnaz has quit []
enterprisey has joined #ruby
pankaj has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
jrafanie has joined #ruby
__Yiota has joined #ruby
jrafanie_ has joined #ruby
d10n-work has joined #ruby
pankaj has quit [Ping timeout: 240 seconds]
polishdub has joined #ruby
northfurr has quit [Quit: northfurr]
jrafanie has quit [Ping timeout: 240 seconds]
jud has joined #ruby
dlitvak has joined #ruby
petruff has quit [Ping timeout: 240 seconds]
patarr_ has joined #ruby
masterasia has quit [Ping timeout: 268 seconds]
patarr has quit [Ping timeout: 240 seconds]
mark_66 has quit [Quit: Leaving.]
chouhoulis has quit [Remote host closed the connection]
anisha has quit [Quit: This computer has gone to sleep]
rjungemann has quit []
rjungemann has joined #ruby
__Yiota has quit [Quit: Textual IRC Client: www.textualapp.com]
jcao219 has quit [Ping timeout: 240 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
northfurr has joined #ruby
petruff has joined #ruby
quobo has joined #ruby
haylon_ has joined #ruby
guardianJ has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
joseCova has joined #ruby
pankaj has joined #ruby
<joseCova> #go-lang
cyphase has quit [Ping timeout: 255 seconds]
nfsnobody- has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
gchristensen has left #ruby ["WeeChat 0.4.2"]
haylon has quit [Ping timeout: 272 seconds]
ixti has joined #ruby
ixti has quit [Client Quit]
nfsnobody has quit [Ping timeout: 252 seconds]
fulgore_ has quit [Ping timeout: 252 seconds]
voxxit has quit [Ping timeout: 252 seconds]
voxxit has joined #ruby
cyphase has joined #ruby
cschneid_ has joined #ruby
bmurt has joined #ruby
KeyJoo has quit [Read error: Connection reset by peer]
KeyJoo has joined #ruby
Pumukel has quit [Remote host closed the connection]
conta has joined #ruby
bronson has joined #ruby
bove has quit []
ohjn__ has joined #ruby
bove has joined #ruby
raspado has joined #ruby
[ohjn] has quit [Ping timeout: 258 seconds]
jgnagy has joined #ruby
guardianJ has quit [Read error: Connection reset by peer]
bronson has quit [Ping timeout: 272 seconds]
jrafanie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 240 seconds]
imanc has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
jrafanie has joined #ruby
synthroid has quit [Remote host closed the connection]
jusa has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
haylon has joined #ruby
gaucheph has joined #ruby
pmarreck has quit []
haylon_ has quit [Ping timeout: 268 seconds]
pmarreck has joined #ruby
brent__ has joined #ruby
hobodave has joined #ruby
brent__ has quit [Remote host closed the connection]
brent__ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
Tagami[m] has quit [Remote host closed the connection]
jakebriggs[m] has quit [Write error: Connection reset by peer]
jonjits[m] has quit [Remote host closed the connection]
voltai[m] has quit [Remote host closed the connection]
KevinMGranger has quit [Read error: Connection reset by peer]
daveyboi[m] has quit [Read error: Connection reset by peer]
travisr has quit [Read error: Connection reset by peer]
thulsa_legume[m] has quit [Read error: Connection reset by peer]
johnson[m] has quit [Write error: Connection reset by peer]
heftig has quit [Write error: Connection reset by peer]
zenspider[m] has quit [Write error: Connection reset by peer]
el_ocho[m] has quit [Read error: Connection reset by peer]
Giphy[m] has quit [Remote host closed the connection]
aviraldg has quit [Read error: Connection reset by peer]
dman[m] has quit [Read error: Connection reset by peer]
bascht1 has quit [Remote host closed the connection]
M107262[m] has quit [Read error: Connection reset by peer]
velu_aon[m] has quit [Read error: Connection reset by peer]
testnick[m] has quit [Remote host closed the connection]
voxxit has quit [Ping timeout: 252 seconds]
caw has quit []
caw has joined #ruby
patarr_ has quit [Ping timeout: 246 seconds]
newrubycoder has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
voxxit has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
bascht1 has joined #ruby
patarr has joined #ruby
anisha has joined #ruby
xaxisx has quit [Quit: Leaving]
JoshS has quit [Ping timeout: 240 seconds]
skade_ has quit [Ping timeout: 240 seconds]
hobodave_ has joined #ruby
hobodave has quit [Ping timeout: 260 seconds]
xaxisx has joined #ruby
TomyLobo has joined #ruby
porfa has quit [Quit: porfa]
amclain has joined #ruby
mikecmpbll has joined #ruby
chouhoulis has joined #ruby
bronson has joined #ruby
AlexRussia_ has quit [Ping timeout: 258 seconds]
jcao219 has joined #ruby
synthroid has joined #ruby
kegster has joined #ruby
jackjackdripper has joined #ruby
<kegster> I have a restful api that let's me run custom scripts, but everytime i run a function in the script, i need to check to make sure it doesn't error out, as only 1 script function can touch the db at a time-- so basically i need to wrap each function with something that checks the output to make sure it's not an error (json format)-- and keep retrying until it can get a valid response
<kegster> is this even possible?
blackmesa has joined #ruby
[Butch] has joined #ruby
heftig has joined #ruby
johnson[m] has joined #ruby
M107262[m] has joined #ruby
Giphy[m] has joined #ruby
KevinMGranger has joined #ruby
voltai[m] has joined #ruby
jakebriggs[m] has joined #ruby
aviraldg has joined #ruby
Tagami[m] has joined #ruby
daveyboi[m] has joined #ruby
travisr has joined #ruby
thulsa_legume[m] has joined #ruby
dman[m] has joined #ruby
zenspider[m] has joined #ruby
jonjits[m] has joined #ruby
el_ocho[m] has joined #ruby
testnick[m] has joined #ruby
velu_aon[m] has joined #ruby
<kegster> basically, i know it's an error only if there's some data in my json object
<baweaver> What have you tried?
jackjackdripper has quit [Read error: Connection reset by peer]
<kegster> i've tried begin rescue ensure, etc
jackjackdripper has joined #ruby
<kegster> but i am not sure how to catch it based on the json output
<baweaver> that'll only work if there's a raised exception
marxarelli has joined #ruby
<baweaver> you can always use conditional branches y'know `if condition`
mrsolo has quit []
<baweaver> like if json[:error]
<kegster> baweaver, so i guess i need to see if the "error" is throwing an exception OR if it's just json output huh
mrsolo has joined #ruby
<kegster> sounds to me like it may actually be raising an exception, bc my code dies
<baweaver> Got a stack trace?
<baweaver> ?gist
<ruby[bot]> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<kegster> too much to explain what i mean by that, bc this is such a niche
<baweaver> throw it up there and it might be easier to trace
<kegster> unfortunately no. i'm writing jruby for a scripting api for a 3rd party engine
<kegster> there is no "console"
<kegster> i have to manage my output, but if i get an error, it just dies on me lol
<kegster> so looks like ill need to do some trial/error ---
<kegster> can i jsut do begin, rescue, end, or do i need a resuce => something
<baweaver> binding.remote_pry
<kegster> rescue *
<baweaver> It allows you to open a "remote" session that you can bind to and screw around in
<baweaver> ie a 3rd party you can't get into potentially
<kegster> the problem is, i can only initiate the request via RESTFul api call--- and it then runs the script internally haha
<kegster> hm
<kegster> more specifically, NUIX -- i am not sure if i can coddle it from there
<kegster> i def am goign to try :)
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has quit [Ping timeout: 272 seconds]
trampi has joined #ruby
haylon_ has joined #ruby
haylon has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
jcao219 has quit [Ping timeout: 240 seconds]
Archrover has quit [Changing host]
Archrover has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
flying has quit []
porfa has joined #ruby
xenops has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tildes has joined #ruby
xenops has joined #ruby
conta has quit [Ping timeout: 260 seconds]
porfa has quit [Ping timeout: 246 seconds]
xall_ has joined #ruby
bronson has quit [Remote host closed the connection]
d10n-work has quit []
nitric has joined #ruby
d10n-work has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
nhhc has quit [Remote host closed the connection]
porfa has joined #ruby
nebben has quit []
nebben has joined #ruby
bronson has joined #ruby
northfurr has quit [Quit: northfurr]
rippa has joined #ruby
rkazak has joined #ruby
gusrub has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
dlitvak has quit []
dlitvak has joined #ruby
nankyokusei has joined #ruby
zarubin has joined #ruby
cronolio has left #ruby [#ruby]
renchan has quit [Quit: Leaving...]
skade_ has joined #ruby
hobodave_ has quit [Quit: Computer has gone to sleep.]
mikecmpbll has quit [Ping timeout: 272 seconds]
LastWhisper____ has joined #ruby
nankyokusei has quit [Ping timeout: 272 seconds]
cseder has joined #ruby
oleo has joined #ruby
conta2 has joined #ruby
<cseder> Hi! I'm working through a Ruby book, trying to learn, but in this example: https://gist.github.com/cseder/c2433ebb94e072531a7d62ae8cfefd12 Do I in effect override the built in String class?
bronson has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
hobodave has joined #ruby
<canton7> you add something to the built-in String class, yeah
<canton7> it's called money-patching
<elomatreb> Classes are never "finished" in Ruby, you can open and add or redefine them at any point
nhhc has joined #ruby
<cseder> canton7 is this what is called a mixin?
<canton7> no
<cseder> But I don't declare that I'm extending anything, so if I just "add" to the String class, how come I don't have to mention that I do and create overridden functions from String
<cseder> It just magically gives String a frequency counter function?
rkazak has quit [Quit: Sleep.....ing....]
<ljarvis> cseder: yes, it's not really magic though because you wrote it inside the String class explicitly
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ljarvis> that's just how re-opening classes in Ruby works
lxsameer has quit [Quit: WeeChat 1.7]
<cseder> ljarvis so if this adds functionality to a class, what is it called if it's not a "mixin"?
<ljarvis> cseder: it's called monkey-patching, as canton7 pointed out
conta2 has quit [Quit: conta2]
<llua> he forgot the k
<cseder> ah, ok, didn't see it, didn't tag my name
<ljarvis> cseder: mixins are basically just modules. You "mix in" behaviour
<cseder> so is this a common way of extending classes in Ruby or is it a better way?
<ljarvis> you generally shouldn't monkey-patch core ruby classes
<cseder> ljarvis right
<ljarvis> but, if you want to extend the String class, that's generally how you would do it, yes
<cseder> monkey-patching sounds like something one should avoid...
yo61 has quit []
yo61 has joined #ruby
<baweaver> yep
<ljarvis> it's helpful sometimes, you should generally approach it with caution, though
<baweaver> ^
tildes has quit [Ping timeout: 246 seconds]
pankaj has quit [Ping timeout: 240 seconds]
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
AlexRussia_ has joined #ruby
Fridtjof has quit [Ping timeout: 258 seconds]
jphase_ has joined #ruby
jphase has quit [Read error: Connection reset by peer]
xall_ has quit [Ping timeout: 255 seconds]
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
Fridtjof has joined #ruby
sija has joined #ruby
haylon has joined #ruby
pankaj has joined #ruby
gusrub has quit [Ping timeout: 264 seconds]
sija has quit [Client Quit]
haylon has quit [Remote host closed the connection]
gusrub has joined #ruby
haylon_ has quit [Ping timeout: 240 seconds]
jphase_ has quit [Remote host closed the connection]
skade_ has quit [Ping timeout: 240 seconds]
haylon has joined #ruby
SeepingN has joined #ruby
northfurr has joined #ruby
<haylon> I thought I had a grasp on this, but it seems like I don't. I have a ruby script that I made that reads in a few variables and sets them as ENV variables for the duration of the run. Then within this script, I call Packer, but packer doesn't seem to be either understanding my ENV variables, or Ruby just isn't doing it the way I think its handling ENV variables being passed to child processes.
duderonomy has quit [Ping timeout: 260 seconds]
BTRE has joined #ruby
User458764 has joined #ruby
<haylon> Am I correct in thinking that external programs beign called from Ruby should inherit the ENV variables being set by the script calling it?
<SeepingN> One would expect that. But in my experience, expect the unexpected
<SeepingN> ruby and command line stuff can be a lot trickier than it seems
<SeepingN> I had FileUtils.mkdir_p creating some VERY wacky permissions if I didn't put in :mode => 0664. I checked umask and it was normal at "2" (just 2, no octal value, I foudn that interesting)
jphase has joined #ruby
<SeepingN> it may start a fresh shell with absolutely nothing loaded. I usually have to source a dotfile if I don't want to futz with things much)
mim1k has joined #ruby
<haylon> So far, everything I've tested, shell scripts, other ruby scripts, echo, and some other external programs seem to understand the ENV variables being set by my ruby script, just not packer.
<haylon> So, it might be something with Packer itself.
romank has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<SeepingN> an setting your own. ok so that's nice, you can set than and "pass them on" (normally, apparently not with this Packer thing)
AndrewIsHere has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
<SeepingN> how do you call Packer?
<SeepingN> I've resorted to using PTY for local calls so I can "stream" it's output while capturing it
tildes has joined #ruby
<haylon> I was using Open3.popen2e
<haylon> to do the shell execution so I can print the output,and write it to a file
<SeepingN> ah nice
<SeepingN> I tried so hard last year to avoid going into pty and open3 stuff but it seems inevitable if you "want it all"
<haylon> at first I was using %x[ packer build -machine-readable -debug template.json ]
<haylon> but that wouldn't output any text until it was over
aupadhye has quit [Quit: Leaving]
binaryplease has quit [Ping timeout: 240 seconds]
enterprisey has joined #ruby
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
wald0 has joined #ruby
* SeepingN installs anti2html :\
<SeepingN> yeah that's the problemwith exec and system
<haylon> So, figured out what my issue was
<haylon> I just wasn't using the correct Profile name from my .aws/credentials file in my packer template
<haylon> its working now. thank you SeepingN
<SeepingN> ahh. yeah, the little stuff, eh?
tvw has quit []
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Fridtjof has quit [Ping timeout: 240 seconds]
romeoh has quit []
Fridtjof has joined #ruby
Guest96 has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 245 seconds]
Guest96 has joined #ruby
jrafanie has joined #ruby
pankaj has quit [Ping timeout: 264 seconds]
<morfin> i am going to try install Ruby using rbenv on Windows(with MinGW) that would work how do you think?
<morfin> or that's path of pain and suffering
<baweaver> I've seen Windows in general to be the path of pain and suffering for Ruby
<baweaver> unless you have 10 with Bash built in
<morfin> well, i am on 7
lancetw has quit []
<baweaver> Most of the reason is that most gem devs explicitly don't test against Windows anything
pankaj has joined #ruby
lancetw has joined #ruby
<morfin> but msys2 with pacman should work probably hmm
<morfin> lol
<morfin> yes i hate builduing stuff on Windows too
oleo has quit [Quit: irc client terminated!]
<morfin> even to build ICU you should be freaking genius
<morfin> i don't say about WebKit with all dependencies
ltem has joined #ruby
govg has quit [Ping timeout: 258 seconds]
Heero__ has quit []
libastral has quit [Ping timeout: 246 seconds]
Heero__ has joined #ruby
oleo has joined #ruby
bmurt has joined #ruby
kirun has joined #ruby
roamingdog has joined #ruby
ThePortWhisperer has quit [Ping timeout: 260 seconds]
binaryplease has joined #ruby
postmodern has joined #ruby
milardovich has quit [Remote host closed the connection]
rkellermeyer has joined #ruby
travisr is now known as turt2live
machty has quit []
machty has joined #ruby
nhhc has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cseder has left #ruby ["Textual IRC Client: www.textualapp.com"]
binaryplease has quit [Ping timeout: 268 seconds]
cdg has quit [Ping timeout: 272 seconds]
epocS60 has joined #ruby
tlarevo has joined #ruby
<epocS60> hello ruby lovers
<baweaver> alo
tlarevo has left #ruby [#ruby]
enterprisey has quit [Remote host closed the connection]
binaryplease has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
fmccann has joined #ruby
ThePortWhisperer has joined #ruby
esObe_ has quit [Remote host closed the connection]
esObe_ has joined #ruby
Lloyd has quit []
Lloyd has joined #ruby
govg has joined #ruby
mlhess has joined #ruby
epocS60 has quit [Ping timeout: 260 seconds]
skade_ has joined #ruby
fmccann has quit [Quit: fmccann]
skade_ has quit [Ping timeout: 264 seconds]
roamingdog has quit [Remote host closed the connection]
skade_ has joined #ruby
Morrolan_ has quit [Quit: Goodbye]
raspado has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 246 seconds]
raspado has joined #ruby
cschnei__ has joined #ruby
Morrolan has joined #ruby
fmccann has joined #ruby
fmccann has quit [Client Quit]
facest has quit [Read error: Connection reset by peer]
facest has joined #ruby
cschneid_ has quit [Ping timeout: 260 seconds]
binaryplease has quit [Ping timeout: 272 seconds]
nhhc has joined #ruby
Fridtjof has quit [Ping timeout: 240 seconds]
raspado has quit [Ping timeout: 272 seconds]
hobodave has quit [Quit: Computer has gone to sleep.]
gheegh has joined #ruby
bronson has joined #ruby
MrBusiness has quit [Ping timeout: 255 seconds]
bronson has quit [Ping timeout: 255 seconds]
gusrub has quit [Remote host closed the connection]
hobodave has joined #ruby
JoshS has joined #ruby
mlhess has left #ruby ["Textual IRC Client: www.textualapp.com"]
__Yiota has joined #ruby
aarongodin has quit []
aarongodin has joined #ruby
auv has quit []
auv has joined #ruby
Fridtjof has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hobodave has quit [Quit: Computer has gone to sleep.]
nhhc has quit [Remote host closed the connection]
dviola has joined #ruby
petruff has quit [Ping timeout: 246 seconds]
Silthias has quit [Ping timeout: 246 seconds]
haylon_ has joined #ruby
lxsameer has joined #ruby
haylon has quit [Ping timeout: 264 seconds]
Fridtjof has quit [Ping timeout: 260 seconds]
bash2 has joined #ruby
Pumukel has joined #ruby
LukyCZ has joined #ruby
skade_ has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
skade_ has joined #ruby
ishahnaz has joined #ruby
__Yiota has joined #ruby
kiltzman has quit [Quit: .]
Fridtjof has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
kiltzman has joined #ruby
kiltzman has quit [Max SendQ exceeded]
yqt has joined #ruby
kiltzman has joined #ruby
cfec0b8d has joined #ruby
Pumukel has quit [Ping timeout: 245 seconds]
JoshS has quit [Quit: Leaving]
northfurr has quit [Quit: northfurr]
jusa has quit [Ping timeout: 240 seconds]
ishahnaz has quit [Ping timeout: 268 seconds]
JeanCarloMachado has quit [Ping timeout: 272 seconds]
pankaj has quit [Quit: Leaving]
cagomez has joined #ruby
tildes has joined #ruby
northfurr has joined #ruby
jackjackdripper has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has joined #ruby
fusta has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
fusta has joined #ruby
blackwind_123 has quit [Ping timeout: 240 seconds]
skade_ has quit [Ping timeout: 268 seconds]
ltem has quit [Ping timeout: 240 seconds]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
cfec0b8d has quit [Remote host closed the connection]
cagomez has quit [Ping timeout: 240 seconds]
cek has joined #ruby
cfec0b8d has joined #ruby
<cek> wondering why is Numberic#% faster than Numeric#modulo ?
<baweaver> &ri Numeric#%
<baweaver> &ri Numeric#modulo
skade_ has joined #ruby
<baweaver> let's look at the source on them
<cek> yeah. be my guest.
bunniez has left #ruby [#ruby]
<baweaver> Probably because modulo is calling divmod, but they look like aliases
<baweaver> not sure really
<cek> next q. How do I optimize %? I'm looking for numbers having 0 mods for a specific number.
northfurr has quit [Quit: northfurr]
<al2o3-cr> Numeric#% and Numeric#modulo have exactly the same C source
<baweaver> Looked like it.
skade_ has quit [Ping timeout: 240 seconds]
<baweaver> though I think it's splitting hairs to try and optimize that
<baweaver> more than likely the surrounding algorithm is the issue
__Yiota has joined #ruby
roamingdog has joined #ruby
dviola has quit [Quit: WeeChat 1.7.1]
<cek> >> Benchmark.measure { i=0; max = 10**7; while i<max do i % 128 == 0 ; i+=1; end }
<ruby[bot]> cek: # => uninitialized constant Benchmark (NameError) ...check link for more (https://eval.in/790059)
<cek> >> require 'benchmark; print Benchmark.measure { i=0; max = 10**7; while i<max do i % 128 == 0 ; i+=1; end }
<ruby[bot]> cek: # => /tmp/execpad-1fb91661db18/source-1fb91661db18:2: unterminated string meets end of file ...check link for more (https://eval.in/790061)
<cek> >> require 'benchmark'; print Benchmark.measure { i=0; max = 10**7; while i<max do i % 128 == 0 ; i+=1; end }
<ruby[bot]> cek: # => 0.910000 0.000000 0.910000 ( 0.913510) ...check link for more (https://eval.in/790062)
brkkyk has joined #ruby
<cek> >> require 'benchmark'; print Benchmark.measure { i=0; max = 10**7; while i<max do i.modulo(128) == 0 ; i+=1; end }
<brkkyk> hey everyone
ishahnaz has joined #ruby
<baweaver> alo
<baweaver> also bot is acting up a bit
blackmes1 has joined #ruby
jcao219 has joined #ruby
<SeepingN> is it?
<baweaver> well, was earlier.
blackmesa has quit [Ping timeout: 245 seconds]
<brkkyk> how actioncable act like under pressure?
haylon has joined #ruby
ecdsa521 has left #ruby ["mIRC 1.0 @ XENIX"]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cdg has joined #ruby
hobodave has joined #ruby
zapata has quit [Ping timeout: 245 seconds]
haylon_ has quit [Ping timeout: 245 seconds]
wald0 has quit [Quit: Lost terminal]
jcao219 has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
lagweezl1_away is now known as lagweezle
gusrub has joined #ruby
xenops has quit [Quit: Textual IRC Client: www.textualapp.com]
patr0clus has joined #ruby
gusrub has quit [Remote host closed the connection]
hobodave has quit [Quit: Computer has gone to sleep.]
Silthias has joined #ruby
northfurr has joined #ruby
JeanCarloMachado has joined #ruby
zapata has joined #ruby
synthroid has quit [Ping timeout: 255 seconds]
ltem has joined #ruby
<morfin> hmm
synthroid has joined #ruby
enterprisey has joined #ruby
<morfin> bin/rbenv contains only one line "../libexec/rbenv" which gives me "../libexec/rbenv: No such file or directory"
cagomez has joined #ruby
<morfin> any idea why it could happen?
haylon_ has joined #ruby
haylon_ has quit [Remote host closed the connection]
<morfin> but file exists
zapata has quit [Quit: WeeChat 1.7.1]
haylon has quit [Ping timeout: 260 seconds]
<brkkyk> what is the output of "which rbenv"
catileptic has joined #ruby
zapata has joined #ruby
catileptic has left #ruby [#ruby]
<morfin> it's /home/Alexander/.rbenv/bin/rbenv
<morfin> rbenv
<brkkyk> and when you execute rbenv
cagomez has quit [Ping timeout: 245 seconds]
<brkkyk> whats the output of that
username1 has joined #ruby
<morfin> i get jsut message "/home/Alexander/.rbenv/bin/rbenv: line 2: ../libexec/rbenv: No such file or directory"
<morfin> my bash can't handle relative path?
cek has left #ruby [#ruby]
skade_ has joined #ruby
ishahnaz has quit []
jackrandom has joined #ruby
<brkkyk> hmm interesting
<brkkyk> maybe you should try fetch the HEAD of rbenv
<brkkyk> cd ~/.rbenv
<brkkyk> git reset --hard origin/master
<brkkyk> git fetch origin
mim1k has joined #ruby
<brkkyk> and then can you try this
<brkkyk> git config --global core.autocrlf input
<morfin> still breaks
<morfin> i am on Msys2 so i am wondering maybe it's console is not working
<morfin> basically i am reinstalling rbenv on FreeBSD(not from ports tree but using Git) also
<morfin> but it worked for me
<brkkyk> oops maybe it's about paths in Msys2
<brkkyk> i cant really rely on cygwin or something like that
jenrzzz has joined #ruby
<morfin> but why on FreeBSD after checking out and builduing "extension"
<morfin> i have full script on .rbenv/bin/rbenv
<morfin> hmm
space has joined #ruby
<morfin> nevermind it's symlink
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<morfin> msys2 can't symlinks
sagax has joined #ruby
<brkkyk> why you are using msys2
<space> Hi.
<morfin> because it's closest to Linux environment on Windows?
<brkkyk> nope not actually
<brkkyk> if you're using windows 10 then try ubuntu bash for windows
tildes has quit [Ping timeout: 255 seconds]
<brkkyk> @space hey
<morfin> windows 7 as i said
<brkkyk> then i suggest you to use virtual machines
<brkkyk> even if you run ruby with msys2
<brkkyk> then problems becomes with gems
<brkkyk> native extensions not really work well on windows
<brkkyk> so linux is the way to go
fmccann has joined #ruby
synthroid has quit []
<morfin> i knew i gonna have pain
fmccann_ has joined #ruby
<morfin> btw i allowed msys2 use native NT symlinks
<brkkyk> xubuntu works really well on vm even with 1gig of ram
AlexRussia_ has quit [Ping timeout: 272 seconds]
<morfin> xubuntu
<morfin> NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
__Yiota has joined #ruby
<morfin> i use that on my work
fmccann has quit [Quit: Textual IRC Client: www.textualapp.com]
fmccann_ is now known as fmccann
fmccann_ has joined #ruby
fmccann has quit [Quit: fmccann]
fmccann_ has quit [Client Quit]
<morfin> i guess there was only one Linux distro worse than that
<morfin> Debian..
fmccann has joined #ruby
qmr has joined #ruby
brkkyk has quit [Remote host closed the connection]
morfin has quit [Ping timeout: 260 seconds]
brkkyk has joined #ruby
<brkkyk> why is that?
<brkkyk> i like xubuntu
AlexRussia_ has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<qmr> https://ptpb.pw/c2r8 <-- ??!
swills has quit [Ping timeout: 255 seconds]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
lagweezle is now known as lagweezle_away
roamingdog has quit [Read error: Connection reset by peer]
roamingdog has joined #ruby
swills has joined #ruby
duderonomy has joined #ruby
blackmes1 has quit [Ping timeout: 272 seconds]
fmccann has quit [Quit: Textual IRC Client: www.textualapp.com]
ldnunes has quit [Quit: Leaving]
fmccann has joined #ruby
swills has quit [Max SendQ exceeded]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
swills has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
Qommand0r has quit [Quit: WeeChat 1.7.1]
SCHAPiE has quit [Read error: Connection reset by peer]
marxarelli has joined #ruby
blackmes1 has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<qmr> Any idea what that is?
ltem has quit [Quit: Leaving]
roamingdog has quit [Remote host closed the connection]
<qmr> ok, it looks like it's because I'm trying to run on 1.8.7
__Yiota has joined #ruby
roamingdog has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
brkkyk has quit [Ping timeout: 260 seconds]
brkkyk_ has joined #ruby
space has quit [Remote host closed the connection]
bash2 has quit [Remote host closed the connection]
Pumukel has joined #ruby
roamingdog has quit [Ping timeout: 240 seconds]
jcao219 has joined #ruby
brent__ has quit [Remote host closed the connection]
[Butch] has quit [Quit: I'm out . . .]
jrafanie has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
northfurr has quit [Quit: northfurr]
Pumukel has quit [Ping timeout: 255 seconds]
mim1k has quit [Ping timeout: 272 seconds]
morfin has joined #ruby
__Yiota has joined #ruby
biberu has quit []
<morfin> s**t i think i broke my motherboard
northfurr has joined #ruby
brkkyk has joined #ruby
<morfin> i hate ASRock already
brent__ has joined #ruby
shinnya has joined #ruby
jusa has joined #ruby
<morfin> so, i think i almost built Ruby
binaryplease has joined #ruby
brkkyk_ has quit [Ping timeout: 240 seconds]
haylon has joined #ruby
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
<haylon> Hello everyone. Why would STDIN.noecho(&gets).chomp throw a file not found error when using Thor for command line processing?
<haylon> I'm getting: `gets': No such file or directory @ rb_sysopen - login (Errno::ENOENT) when using Thor
jusa has quit [Ping timeout: 272 seconds]
brkkyk has quit [Read error: Connection reset by peer]
jackrandom has quit [Remote host closed the connection]
brkkyk_ has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<morfin> are you sure it's not &:gets?
<morfin> STDIN.noecho(&:gets).chomp
jphase has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
<haylon> Yeah, that's it, sorry
<haylon> This was workign until I threw it in a class, and then used Thor to call that class
__Yiota has joined #ruby
northfurr has quit [Quit: northfurr]
ResidentBiscuit has quit [Ping timeout: 264 seconds]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
<haylon> I've read that I'm supposed to use Thor's `ask` function, but then that changes my code base for now
__Yiota has quit [Client Quit]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
<morfin> crap i hope install does not hang up PC when i build Ruby
mochiyoda_ has quit [Ping timeout: 246 seconds]
ResidentBiscuit has joined #ruby
<haylon> are you using rbenv,or rvm to install?
jcao219 has quit [Ping timeout: 240 seconds]
lxsameer has quit [Quit: WeeChat 1.7]
bronson has joined #ruby
<morfin> rbenv
<morfin> basically proper symlink fixed my issue... i think
<haylon> When I compile/build Ruby, I notice that it throttles my PC pretty hard until its done
<morfin> well, my PC died already twice
<morfin> some hardware issues
<haylon> because of this?
mnem has quit [Ping timeout: 240 seconds]
<morfin> basically first time it compiled ruby but for some reason did not move output/finish procedure
hutch34 has quit [Quit: WeeChat 1.5]
mnemon has joined #ruby
<al2o3-cr> haylon: if you're using >= 2.3 you can use STDIN.getpass :)
mochiyoda_ has joined #ruby
<haylon> Do I need to require anything, or still 'io/console'?
jcao219 has joined #ruby
<al2o3-cr> io/console needs requiring
<haylon> I'll give that a whirl, thank you al2o3-cr, brb
bronson has quit [Ping timeout: 240 seconds]
<morfin> hmm /home/Alexander/.rbenv/plugins/ruby-build/bin/ruby-build: line 1011: /home/Alexander/.rbenv/versions/2.3.0/bin/ruby: No such file or directory
Qommand0r has joined #ruby
<morfin> weird
__Yiota has joined #ruby
northfurr has joined #ruby
bcavileer has quit []
<morfin> could be some gem a reason for that?
bcavileer has joined #ruby
<morfin> rdoc maybe?
roamingdog has joined #ruby
<haylon> al2o3-cr, that worked, however, I'm still getting an error for a differnt plain gets block.
<haylon> morfin, permissions?
theunraveler has quit []
<morfin> no
<morfin> since it's 1. Windows. 2. I am an administrator. 3. I own whole msys2 dir
roamingdog has quit [Ping timeout: 264 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has quit [Quit: leaving]
ramortegui has quit [Remote host closed the connection]
millerti has joined #ruby
<TomyLobo> can i disable the "Object#timeout is deprecated, use Timeout.timeout instead" warning somehow?
SCHAPiE has joined #ruby
<TomyLobo> it's occurring in a gem I'm using
<haylon> morfin, can't say I can help you. I usually just use RubyInstaller.org
haylon has quit [Remote host closed the connection]
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
<al2o3-cr> TomyLobo: $VERBOSE = nil
<morfin> hmm
roamingdog has joined #ruby
<lupine> switch to an implementation that doesn't use Timeout at all
<lupine> seriosuly
<TomyLobo> there is none
<TomyLobo> there is just this one
<TomyLobo> lupine, btw, why?
MrBusiness has joined #ruby
<TomyLobo> thanks, al2o3-cr
<al2o3-cr> np
<TomyLobo> al2o3-cr, uh, this looks like it also disables other stuff
cagomez has quit [Remote host closed the connection]
<morfin> too bad there is no more verbose mode than just verbose
cagomez has joined #ruby
<morfin> like -vv
<lupine> TomyLobo: because it uses Thread#kill under the hood
<morfin> or even -vvv
<lupine> and that leads to all sorts of incredibly bad outcomes
<lupine> random memory leaks and segfaults are the least of it
<TomyLobo> ok
<TomyLobo> well it's a short-running script
<TomyLobo> so idc :)
<TomyLobo> about memory leaks at least
<TomyLobo> segfaults, never had one
<lupine> standards.... slipping
<lupine> must... resist
gaucheph has quit [Quit: Zzzz...]
northfurr has quit [Quit: northfurr]
<morfin> hm
<morfin> proper threads are better
ResidentBiscuit has quit [Ping timeout: 240 seconds]
danzilio has quit []
danzilio has joined #ruby
LukyCZ has quit [Quit: Connection closed for inactivity]
cagomez has quit [Ping timeout: 260 seconds]
blackmes1 has quit [Ping timeout: 240 seconds]
fmccann has quit [Quit: Textual IRC Client: www.textualapp.com]
Dimik has joined #ruby
<SeepingN> anyone have experience with command line conversion tools like recode and ansi2html? I'm trying to convert ANSI Colorized output with UTF-8 type characters into HTML colors with encoded characters. But feed one of those 2 tools into the other leads to too-many-conversions
ResidentBiscuit has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
GodFather has joined #ruby
blackmes1 has joined #ruby
porfa has quit [Quit: porfa]
<morfin> i guess i just need to install lots of packages
brkkyk_ has quit [Read error: Connection reset by peer]
gaucheph has joined #ruby
brkkyk has joined #ruby
ResidentBiscuit has quit [Ping timeout: 246 seconds]
brent__ has quit [Remote host closed the connection]
blackmes1 has quit [Ping timeout: 272 seconds]
cyphase has quit [Ping timeout: 240 seconds]
lxsameer has quit [Quit: WeeChat 1.7]
fmccann has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
blackmes1 has joined #ruby
Pumukel has joined #ruby
brkkyk has quit [Remote host closed the connection]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
gaucheph has quit [Quit: Zzzz...]
__Yiota has joined #ruby
Pumukel has quit [Ping timeout: 255 seconds]
<morfin> psych is one of "standard" gems?
<havenwood> morfin: Psych is in the stdlib.
<baweaver> YAML parser, I think so
<baweaver> oi
<baweaver> havenwood
<baweaver> vacation, shoo
<havenwood> baweaver: \o
<havenwood> :-)
* havenwood shoos
<morfin> in stdlib? i thought it's separate thing
chouhoulis has quit [Ping timeout: 240 seconds]
cagomez has joined #ruby
jamesaxl has quit [Quit: WeeChat 1.7.1]
fmccann has quit [Quit: Textual IRC Client: www.textualapp.com]
fmccann_ has joined #ruby
DeeJayh has quit [Read error: Connection reset by peer]
fmccann_ has quit [Client Quit]
BSaboia has joined #ruby
northfurr has joined #ruby
polishdub has quit [Quit: kill -9]
fmccann has joined #ruby
patarr has quit [Ping timeout: 245 seconds]
kirun has quit [Quit: Konversation terminated!]
cagomez has quit [Ping timeout: 260 seconds]
BSAlb has quit [Ping timeout: 246 seconds]
patr0clus has quit [Quit: tempusfugit]
patr0clus has joined #ruby
__Yiota has quit [Ping timeout: 245 seconds]
bmurt has joined #ruby
__Yiota has joined #ruby
choke has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has quit [Client Quit]
quobo is now known as evhb
mikecmpbll has joined #ruby
evhb is now known as quobo
ishahnaz has joined #ruby
ddffg has quit [Quit: Leaving]
MrJoshua has joined #ruby
antib has quit [Ping timeout: 240 seconds]
fmccann has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cyphase has joined #ruby
binaryplease has quit [Ping timeout: 240 seconds]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
cschnei__ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
polysics has joined #ruby
brent__ has joined #ruby
roamingdog has quit [Ping timeout: 240 seconds]
northfurr has quit [Quit: northfurr]
cschneid_ has quit [Ping timeout: 240 seconds]
blackmes1 has quit [Ping timeout: 246 seconds]
fmccann has joined #ruby
Ellimist has quit [Remote host closed the connection]
alveric3 has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
wethu has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has quit [Read error: Connection reset by peer]
alveric2 has quit [Ping timeout: 260 seconds]
fmccann has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Archrover has quit [Ping timeout: 255 seconds]
cdg has quit [Remote host closed the connection]
morfin has quit []
bmurt has joined #ruby
XZIST has joined #ruby
ged has quit [Quit: WeeChat 1.4]
KeyJoo has quit [Remote host closed the connection]
ged has joined #ruby
skade_ has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
jcao219 has quit [Ping timeout: 264 seconds]
polysics has quit []
avdi has quit []
avdi has joined #ruby
Pumukel has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has joined #ruby
nhhc has joined #ruby
nhhc has quit [Remote host closed the connection]
Pumukel has quit [Ping timeout: 264 seconds]
jusa has joined #ruby
cschneid_ has joined #ruby
ged_ has joined #ruby
ged_ has quit [Client Quit]
patarr has quit [Ping timeout: 240 seconds]
northfurr has joined #ruby
patarr has joined #ruby
ged_ has joined #ruby
ged_ is now known as Guest16574
jusa has quit [Ping timeout: 240 seconds]
cschneid_ has quit [Ping timeout: 255 seconds]
Guest16574 has quit [Client Quit]
esObe_ has quit [Remote host closed the connection]
marr has quit [Ping timeout: 260 seconds]
esObe_ has joined #ruby
esObe_ has quit [Ping timeout: 255 seconds]
patarr has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
Archrover has joined #ruby
DLSteve has joined #ruby
fusta has quit [Ping timeout: 255 seconds]
enterprisey has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
yqt has quit [Ping timeout: 272 seconds]
petruff has joined #ruby
northfurr has quit [Quit: northfurr]
cpruitt has quit [Quit: cpruitt]
patarr has joined #ruby
skmp has quit []
northfurr has joined #ruby
skmp has joined #ruby
cagomez has joined #ruby
polysics has joined #ruby