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
cadillac__ has quit [Ping timeout: 268 seconds]
<havenwood> >> students = {}; students.default_proc = -> h, k { h[k] = [] }; students['Class 1'] << 'Bob'; students # lucas__
<ruby[bot]> havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
snockerton has joined #ruby
<havenwood> #=> {"Class 1"=>["Bob"]}
t-recx has quit [Quit: t-recx]
jdawgaz has joined #ruby
<havenwood> lucas__: Another way to write that is:
<havenwood> >> students = Hash.new { |h, k| h[k] = [] }; students['Class 1'] << 'Bob'; students
<ruby[bot]> havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<havenwood> #=> {"Class 1"=>["Bob"]}
acalycine has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
<acalycine> How do I replace capturing groups of a pattern in `sub`?
cfec0b8d has quit [Remote host closed the connection]
<havenwood> acalycine: #sub doesn't care about capture groups
<havenwood> acalycine: show the code?
<havenwood> acalycine: or have an example input and desired output?
<acalycine> Sec.
<lucas__> havenwood: thanks!
marr has quit [Ping timeout: 245 seconds]
<havenwood> lucas__: no prob!
<acalycine> Forget the `to_s`, it's only useful in my original code.
<havenwood> acalycine: require 'nokogiri'; Nokogiri::HTML(date).text #=> "2016-08-09T13:55:13+00:00"
<elomatreb> Can't you just sub /<.+>/?
<acalycine> Nokogiri, cool.
Kug3lis is now known as Kug3lis_off
<elomatreb> Oh, that'd be too greedy, nevermind
<acalycine> Just for future reference, is there a way to do this with pure Ruby/sub?
<acalycine> Also, is there a way to change in place with '!' or something?
Rodya_ has quit [Remote host closed the connection]
<havenwood> acalycine: Or with Oga: require 'oga'; Oga.parse_xml(date).css('updated').text
Azure has quit [Ping timeout: 245 seconds]
<elomatreb> Not nearly as robust, but .gsub(/<.+?>/, "") seems to work
Kug3lis_off is now known as Kug3lis
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
<havenwood> >> "<updated>2016-08-09T13:55:13+00:00</updated>"[/(?<=<updated>).*(?=<\/updated)/]
<ruby[bot]> havenwood: # => "2016-08-09T13:55:13+00:00" (https://eval.in/813663)
<havenwood> acalycine: ^
jdawgaz has quit [Client Quit]
<acalycine> Ah, very cool.
jdawgaz has joined #ruby
jgt4 has joined #ruby
jdawgaz has quit [Client Quit]
<havenwood> acalycine: Or a silly one: date.chomp('</updated>').reverse.chomp('<updated>'.reverse).reverse
nitric has quit [Ping timeout: 260 seconds]
<acalycine> I love it. You can do so many things in so many ways.
<havenwood> >> "<updated>2016-08-09T13:55:13+00:00</updated>".chomp('</updated>').reverse.chomp('<updated>'.reverse).reverse
<havenwood> #=> "2016-08-09T13:55:13+00:00"
<ruby[bot]> havenwood: # => "2016-08-09T13:55:13+00:00" (https://eval.in/813664)
<acalycine> Say I have `Time.parse(date).to_f`. How can I change that variable in place?
<acalycine> Usually I'd put a `!` but not sure where to put it.
<havenwood> acalycine: Use `Time.iso8601(date)` if it's iso8601.
<havenwood> acalycine: Why a float?
<havenwood> >> Time.iso8601("2016-08-09T13:55:13+00:00").to_f
zipace has quit [Disconnected by services]
ziprar has joined #ruby
<acalycine> I'm using it later on in my code, but haven't figured out the details of tha tyet.
<ruby[bot]> havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<acalycine> *yet
Azure has joined #ruby
<havenwood> acalycine: A Rational or BigDecimal will give nanosecond precision, if you care.
<havenwood> I guess your input won't have that detail?
cschneid_ has quit [Read error: Connection reset by peer]
<havenwood> Time.iso8601("2016-08-09T13:55:13+00:00").to_r #=> (1470750913/1)
<acalycine> probably not
cschneid_ has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
<havenwood> acalycine: unix_time_date_float = Time.iso8601(date).to_f
marxarelli is now known as marxarelli|afk
<havenwood> acalycine: If it's not the same thing spare yourself headache and use a different variable. Or extract the conversion to a method and use that like: unix_time_float(date)
<acalycine> Ah.
Cohedrin has joined #ruby
oliv_____ has quit [Remote host closed the connection]
haylon has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
oliv_____ has joined #ruby
haylon has quit [Client Quit]
Kug3lis is now known as Kug3lis_off
ben__ has joined #ruby
oliv_____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
ziprar has quit [Ping timeout: 240 seconds]
segmond has joined #ruby
fxa has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Quit: Leaving.]
ben__ has quit [Ping timeout: 255 seconds]
Cohedrin has joined #ruby
fxa90id has quit [Ping timeout: 240 seconds]
<acalycine> Do you know of a Nokogiri way to parse just the href from `<link href="google.com"/>` and the title from `<title>Test!</title>`?
<acalycine> Nokogiri::HTML does not give me the result I want
Cohedrin has quit [Client Quit]
jcao219 has joined #ruby
mrconfused has joined #ruby
dances_with_taco has quit [Remote host closed the connection]
bruce_lee has quit [Ping timeout: 240 seconds]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
HoierM has joined #ruby
dc2 has joined #ruby
mrconfused has quit [Ping timeout: 260 seconds]
<acalycine> havenwood: ?
thoraxe_ has joined #ruby
muelleme has joined #ruby
thoraxe has quit [Ping timeout: 240 seconds]
uZiel has joined #ruby
Rodya_ has joined #ruby
brent__ has joined #ruby
jcao219 has quit [Ping timeout: 255 seconds]
<havenwood> acalycine: css('title').text
<havenwood> acalycine: css('link').map { |link| link['href'] }
gusrub has quit [Ping timeout: 268 seconds]
muelleme has quit [Ping timeout: 268 seconds]
<havenwood> acalycine: require 'nokogiri'; Nokogiri::HTML('<title>Test!</title><link href="google.com"/>').css('title').text #=> "Test!"
<havenwood> acalycine: You can use css selectors or xpath with nokogiri or oga.
uZiel has quit [Ping timeout: 248 seconds]
ben__ has joined #ruby
<acalycine> What would the `css` be in tis case?
<acalycine> In ur first example
harfangk has joined #ruby
<havenwood> acalycine: That's a css selector.
<acalycine> How do I refer to the document in that example, though?
brent__ has quit [Ping timeout: 240 seconds]
<havenwood> acalycine: With XPath and not just title but a title in a head in html for example: require 'nokogiri'; Nokogiri::HTML('<html><head><title>very specific</title></head></html>').xpath('/html/head/title').text
<havenwood> #=> "very specific"
<havenwood> acalycine: I don't think I understand the question.
<acalycine> nevermind, that last one should work
<acalycine> Thanks
<havenwood> acalycine: You can use .css or .xpath for a css selector or xpath. No prob.
<acalycine> Will that last example work for the link as well?
<acalycine> Since the href is inside the node
<havenwood> acalycine: require 'nokogiri'; Nokogiri::HTML('<link href="google.com"/><link href="ruby-lang.org"').css('link[href]').map { |link| link['href'] } #=> ["google.com", "ruby-lang.org"]
<acalycine> Ah, cool.
ResidentBiscuit has joined #ruby
<havenwood> acalycine: You can do any of these with #css or #xpath, your choice.
<havenwood> The #css are usually a bit less gross.
ben__ has quit [Ping timeout: 246 seconds]
<havenwood> depends
oliv_____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
perniciouscaffei has quit [Read error: Connection reset by peer]
nadir has joined #ruby
<havenwood> acalycine: You can use #at_css when you know there's only one: Nokogiri::HTML('<title>example<title>').at_css('title').text
<acalycine> Interesting.
<havenwood> acalycine: So if you wanted just one link: Nokogiri::HTML('<link href="google.com"/><link href="ruby-lang.org"').at_css('link')['href']
<havenwood> #=> "google.com"
<havenwood> (ignoring the second "ruby-lang.org" link)
mrconfused has joined #ruby
poloych has quit [Remote host closed the connection]
im0nde has quit [Ping timeout: 246 seconds]
wtc has joined #ruby
<wtc> hi all, looking for full coverage of xls and xlsx including formula updates
<wtc> aside from rubyXL and spreadsheet, where look?
pwnd_nsfw` has joined #ruby
pwnd_nsfw has quit [Ping timeout: 260 seconds]
uZiel has joined #ruby
arescorpio has joined #ruby
jgt4 has quit [Ping timeout: 240 seconds]
johnzorn has quit [Ping timeout: 260 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
ur5us has quit [Remote host closed the connection]
johnzorn has joined #ruby
<acalycine> If I'm a couple blocks deep, do I need to `return` a value just once, or multiple times?
d^sh has quit [Ping timeout: 260 seconds]
d^sh has joined #ruby
jdawgaz has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
ResidentBiscuit has quit []
s1kx has quit [Quit: s1kx]
jcao219 has joined #ruby
dances_with_taco has joined #ruby
amclain has quit [Quit: Leaving]
cadillac__ has joined #ruby
AnoHito_ has joined #ruby
AnoHito has quit [Ping timeout: 260 seconds]
bvcosta has joined #ruby
uZiel has joined #ruby
jameser has joined #ruby
ur5us has joined #ruby
bvcosta has quit [Ping timeout: 240 seconds]
gizmore has joined #ruby
muelleme has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
charliesome has joined #ruby
gizmore|2 has quit [Ping timeout: 246 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
muelleme has quit [Ping timeout: 246 seconds]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
uZiel has quit [Ping timeout: 248 seconds]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
dc2 has quit [Ping timeout: 260 seconds]
patarr has joined #ruby
uZiel has joined #ruby
belmoussaoui__ has joined #ruby
belmoussaoui has quit [Ping timeout: 258 seconds]
GinoMan has quit [Remote host closed the connection]
patarr has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
jcao219 has quit [Ping timeout: 240 seconds]
genpaku has quit [Remote host closed the connection]
cschneid_ has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
oliv_____ has quit [Remote host closed the connection]
patr0clus has joined #ruby
patr0clus has quit [Max SendQ exceeded]
genpaku has joined #ruby
patr0clus has joined #ruby
patr0clus has quit [Max SendQ exceeded]
enterprisey has joined #ruby
shinnya has quit [Ping timeout: 245 seconds]
patr0clus has joined #ruby
AndChat|474201 has joined #ruby
patr0clus has quit [Ping timeout: 246 seconds]
jcao219 has joined #ruby
AndChat|474201 has quit [Quit: tempusfugit]
marxarelli|afk has quit [Ping timeout: 240 seconds]
patr0clus has joined #ruby
patr0clus has quit [Client Quit]
olivi____ has joined #ruby
t-recx has joined #ruby
jackjackdripper has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
patarr has joined #ruby
cadillac__ has quit [Ping timeout: 268 seconds]
olivi____ has quit [Remote host closed the connection]
patarr has quit [Ping timeout: 240 seconds]
kegster has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 246 seconds]
hutch34 has joined #ruby
kegster has joined #ruby
GodFather has quit [Ping timeout: 245 seconds]
bmurt has joined #ruby
oli______ has joined #ruby
sleetdrop has joined #ruby
muelleme has joined #ruby
patarr has joined #ruby
guacamole has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
muelleme has quit [Ping timeout: 255 seconds]
djbkd has quit [Ping timeout: 246 seconds]
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
mim1k has joined #ruby
sspreitz has quit [Ping timeout: 246 seconds]
patarr has quit [Ping timeout: 260 seconds]
sspreitz has joined #ruby
mrconfused has quit [Read error: Connection reset by peer]
mim1k has quit [Ping timeout: 260 seconds]
t-recx has quit [Quit: t-recx]
mrconfused has joined #ruby
raspado has joined #ruby
unsymbol_ has quit [Ping timeout: 240 seconds]
<wtc> acalycine: probably once each, brosef
HoierM has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 246 seconds]
jackjackdripper1 has joined #ruby
oli______ has quit [Remote host closed the connection]
jackjackdripper1 has quit [Client Quit]
jackjackdripper has quit [Ping timeout: 246 seconds]
gix- has quit [Ping timeout: 240 seconds]
jcao219 has quit [Ping timeout: 240 seconds]
jackjackdripper has joined #ruby
priodev has quit [Ping timeout: 268 seconds]
raspado has quit [Remote host closed the connection]
gix has joined #ruby
ltp has quit [Ping timeout: 260 seconds]
chalkmonster has joined #ruby
raspado has joined #ruby
oliv_____ has joined #ruby
empty_cup has joined #ruby
priodev has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
raspado has quit [Ping timeout: 260 seconds]
<empty_cup> i've been looking online and found a couple of examples of mocking single methods using rspec-mocks. is there a similar ability in minitest that ships with ruby?
ltp has joined #ruby
jdsampayo has joined #ruby
jdsampayo has quit [Client Quit]
empty_cup has quit [Quit: leaving]
jcao219 has joined #ruby
gothicsouth has joined #ruby
sleetdrop has quit [Remote host closed the connection]
oliv_____ has quit [Remote host closed the connection]
ledestin has joined #ruby
chalkmonster has quit [Quit: Daddy's flown, 'cross the ocean.]
mrconfused has quit [Ping timeout: 240 seconds]
muelleme has joined #ruby
<havenwood> ah, empty_cup left? too bad.
ascarter_ has joined #ruby
cfec0b8d has joined #ruby
enterprisey has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
muelleme has quit [Ping timeout: 260 seconds]
roshanavand has quit [Quit: roshanavand]
howdoi has joined #ruby
Rodya_ has quit [Remote host closed the connection]
acalycine has quit [Quit: bye]
acalycine has joined #ruby
BTRE has joined #ruby
snockerton has quit [Quit: Leaving.]
arescorpio has quit [Quit: Leaving.]
cgfbee has quit [Remote host closed the connection]
oliv_____ has joined #ruby
oliv_____ has quit [Remote host closed the connection]
cgfbee has joined #ruby
gnufied has quit [Ping timeout: 246 seconds]
quobo has quit [Quit: Connection closed for inactivity]
bvcosta has joined #ruby
bvcosta has quit [Ping timeout: 240 seconds]
nanoz has joined #ruby
knight33 has joined #ruby
Pandorian has joined #ruby
Pandorian has left #ruby [#ruby]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
brent__ has joined #ruby
KnownSyntax has joined #ruby
brent__ has quit [Ping timeout: 258 seconds]
rohitpaulk has joined #ruby
d^sh has quit [Ping timeout: 268 seconds]
muelleme has joined #ruby
d^sh has joined #ruby
muelleme has quit [Ping timeout: 245 seconds]
dc2 has joined #ruby
aupadhye has joined #ruby
priodev has quit [Ping timeout: 260 seconds]
blackwind_123 has joined #ruby
ryzokuken has joined #ruby
priodev has joined #ruby
Rodya_ has joined #ruby
mim1k has joined #ruby
enterprisey has joined #ruby
Rodya_ has quit [Ping timeout: 255 seconds]
uZiel has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
quobo has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
dviola has quit [Quit: WeeChat 1.8]
faces has quit [Ping timeout: 246 seconds]
faces has joined #ruby
ur5us has quit [Remote host closed the connection]
kegster has quit [Ping timeout: 255 seconds]
fxa has quit [Quit: Leaving]
ELLIOTTCABLE is now known as ec
aupadhye has quit [Quit: Leaving]
knight33 has quit [Ping timeout: 268 seconds]
aupadhye has joined #ruby
kegster has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
rohitpaulk has quit [Ping timeout: 245 seconds]
dasher00 has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #ruby
blackwind_123 has quit [Quit: Live long and prosper \v//]
Bespoormsed has joined #ruby
oleo has quit [Quit: irc client terminated!]
agent_white has joined #ruby
dreamthese has quit [Remote host closed the connection]
npgm has quit [Quit: Connection closed for inactivity]
dreamthese has joined #ruby
<acalycine> How do I select the hash from an array containing a string and a hash?
_aeris_ has quit [Ping timeout: 240 seconds]
<elomatreb> acalycine: Try #grep(Hash)
<acalycine> Enumerable?
<elomatreb> It's from Enumerable, yeah
<acalycine> cool.
faces has quit [Ping timeout: 246 seconds]
<elomatreb> It's basically a select with ===, which for classes (like Hash) is an instance check
<elomatreb> Very useful
faces has joined #ruby
_aeris_ has joined #ruby
dasher00 has joined #ruby
Bock has joined #ruby
yogg-saron has joined #ruby
jdsampayo has joined #ruby
mistnim has joined #ruby
jdsampayo has quit [Client Quit]
<mistnim> what is an easy way to save some small information accross a program restart?
<synstack> read/write to a text file?
muelleme has joined #ruby
sleetdrop has joined #ruby
jackjackdripper1 has joined #ruby
<acalycine> What exactly does `:in `each': no block given (LocalJumpError)` mean?
glejeune has joined #ruby
<apeiros> acalycine: it means that it happened in the method "each" and that you didn't give it a block, while it expected one (tried to yield to the block)
jackjackdripper has quit [Ping timeout: 255 seconds]
roshanavand has joined #ruby
<mistnim> synstack: something like YAML.dump, but I don't like yaml very much
<synstack> json?
<acalycine> Weird. This is the line that it's happening on. `id = (array.grep(Hash).reduce[:link]).match(/comments\/(.*?)\//)[1]`
<acalycine> There's no each happening.
<mistnim> synstack: but there is no JSON.dump
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<mistnim> ops there is
<synstack> :)
<apeiros> acalycine: you probably see a "reduce" in your backtrace too
<acalycine> Ah.
<acalycine> So that method uses `reduce`?
<acalycine> What does it have to do with each, i.e.
<apeiros> other way round
<acalycine> Ah.
<apeiros> reduce uses each
<apeiros> sometimes methods are made of other methods ;-)
<apeiros> the way to read a backtrace: keep scanning until you find a line which happens in *your* code (identifiable by the file)
<apeiros> work your way from there
muelleme has quit [Ping timeout: 255 seconds]
<acalycine> Huh. I run that line in IRB and it works perfectly. But it doesn't work in my script.
<acalycine> Perhaps it's 'up-stream'
<apeiros> I quite doubt that reduce[:link] works
<apeiros> but it's early in the morning so maybe I'm missing something
<acalycine> Found it.
<acalycine> Yeah, I fixed that line as well.
jackjackdripper1 has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
patarr has joined #ruby
Rodya_ has joined #ruby
anisha has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
Frank__ has joined #ruby
patarr has quit [Ping timeout: 268 seconds]
Rodya_ has quit [Ping timeout: 255 seconds]
Frank___ has joined #ruby
jackjackdripper1 has joined #ruby
segmond has quit [Quit: l8r]
Frank__ has quit [Ping timeout: 255 seconds]
jackjackdripper has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
<Cork> anyone here have an idea why ruby depends on jquery in debian?
jackjackdripper1 has quit [Quit: Leaving.]
<herwin> iirc it installed documents that are partially generated via javascript/jquery
jackjackdripper has joined #ruby
<Cork> ah
Frank___ has quit [Ping timeout: 258 seconds]
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Ping timeout: 240 seconds]
nanoz has left #ruby ["Leaving"]
def_jam is now known as eb0t
eb0t is now known as eblip
glejeune has quit [Ping timeout: 260 seconds]
Ishido has joined #ruby
mim1k has joined #ruby
Robtop__ has joined #ruby
dionysus69 has quit [Remote host closed the connection]
pwnd_nsfw` has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
arup_r has joined #ruby
<arup_r> Is there any direct way to get the filename of a tempfile. I tried:
<arup_r> >> file = Tempfile.new(['hello', '.jpg']); puts File.basname(file.path)
<ruby[bot]> arup_r: # => uninitialized constant Tempfile (NameError) ...check link for more (https://eval.in/813834)
<arup_r> >> require 'tempfile; file = Tempfile.new(['hello', '.jpg']); puts File.basname(file.path)
<ruby[bot]> arup_r: # => /tmp/execpad-3666fba4a996/source-3666fba4a996:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/813835)
<herwin> Tempfile#path
Frank___ has joined #ruby
<arup_r> path gives the full path. I want the name..
<arup_r> >> require 'tempfile'; file = Tempfile.new(['hello', '.jpg']); puts File.basname(file.path)
<ruby[bot]> arup_r: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<arup_r> I have so many typos :(
gizmore has quit [Ping timeout: 240 seconds]
ByronJohnson has quit [Ping timeout: 240 seconds]
conta has quit [Quit: conta]
mim1k has quit [Ping timeout: 260 seconds]
conta has joined #ruby
arup_r has quit [Ping timeout: 240 seconds]
Frank___ has quit [Ping timeout: 255 seconds]
erry is now known as VOTE_CTHULHU-201
VOTE_CTHULHU-201 is now known as erry
ByronJohnson has joined #ruby
plshalprubygods has joined #ruby
mim1k has joined #ruby
<plshalprubygods> hallo anyone up ?
<baweaver> ?ask
<ruby[bot]> Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
cjhowe7 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ascarter_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis_off is now known as Kug3lis
mistnim has quit [Quit: Page closed]
Rodya_ has joined #ruby
enterprisey has quit [Quit: Leaving]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Bespoormsed has quit [Quit: Leaving]
Mortomes|Work has joined #ruby
charliesome has joined #ruby
Rodya_ has quit [Ping timeout: 255 seconds]
jgnagy has quit [Remote host closed the connection]
jgt4 has joined #ruby
cjhowe7 has joined #ruby
Kug3lis is now known as Kug3lis_off
mistnim has joined #ruby
ur5us has joined #ruby
aufi has joined #ruby
dc2 has quit [Ping timeout: 260 seconds]
<mistnim> is there a consistent way, know its class, to recreate an object from it's JSON.dump string
<mistnim> class.new is not good, because numbers don't have new method
bkxd has joined #ruby
<herwin> would using yaml instead of json work?
<mistnim> herwin: no, the string they generates for the single object are more or less the same
<mistnim> if not exactly the same
<mistnim> let me try
quobo has quit [Quit: Connection closed for inactivity]
glejeune has joined #ruby
<zenspider> mistnim: not using json to serialize objects is a better start
<mistnim> zenspider: what should I use?
ur5us has quit [Ping timeout: 260 seconds]
<zenspider> marshal if you are only using this across ruby. yaml otherwise
<zenspider> plshalprubygods: ignoring the errors and awkward syntax... that's ruby!
<plshalprubygods> I get the following error /usr/lib/ruby/1.8/net/http.rb:560:in `initialize': can't convert Hash into String (TypeError)
minimalism has quit [Quit: minimalism]
<mistnim> zenspider: ok but I have the same problem with yaml, It won't generate back the object often, but its string represantation
<zenspider> 1.8...
<mistnim> so I need a consisten way to get the object back
bkxd_ has joined #ruby
<zenspider> mistnim: are you interacting with other systems/languages?
<mistnim> zenspider: I might possibly
<mistnim> but just on read on the other end
dc2 has joined #ruby
<zenspider> I don't care about "might"s... I don't work with what-ifs
bkxd has quit [Ping timeout: 246 seconds]
<zenspider> I work with right-nows
jenrzzz has joined #ruby
<mistnim> it's very likely that I will in the future
minimalism has joined #ruby
mitt3ns has joined #ruby
morfin has joined #ruby
<zenspider> >> require "yaml"; X=Struct.new(:x); X.new([1, 2, 3]).to_yaml
<ruby[bot]> zenspider: # => "--- !ruby/struct:X\nx:\n- 1\n- 2\n- 3\n" (https://eval.in/813848)
<morfin> i was looking where File.open is located - maybe if i debug ruby itself i understand what's wrong with path resolving
<zenspider> I haven't seen any problems with yaml ... you're gonna have to provide an example of the problems you're having
<zenspider> morfin: probably nothing is wrong with path resolving...
<zenspider> and by probably, I mean 99.99% chance there is no problem
<zenspider> what's going on?
agent_white has quit [Ping timeout: 246 seconds]
Kug3lis_off is now known as Kug3lis
<mistnim> zenspider: I save a Time object to yaml, I load it and it's just a string not a Time Object
Kug3lis is now known as Kug3lis_off
mim1k has quit [Ping timeout: 255 seconds]
mim1k has joined #ruby
<mistnim> >>> require "yaml"; YAML.load(YAML.dump(Time.now))
<mistnim> >> require "yaml"; YAML.load(YAML.dump(Time.now))
<ruby[bot]> mistnim: # => 2017-06-08 07:27:26 +0000 (https://eval.in/813850)
<mistnim> >> require "yaml"; YAML.load(YAML.dump(Time.now)).class
<ruby[bot]> mistnim: # => Time (https://eval.in/813851)
<plshalprubygods> zenspider: Do you know why it errors out ?
<mistnim> interesting
<plshalprubygods> on this line 'response = Net::HTTP.start( uri.host, uri.port, :use_ssl => true, :verify_mode => OpenSSL::SSL::VERIFY_NONE) {|http|'
<herwin> mistnim: maybe use something newer than ruby 1.8
<herwin> and all will be fine
<zenspider> mistnim: heh... maybe it's ok?
<zenspider> herwin: eh. nah. that should work fine in 1.8 iirc
al2o3-cr has quit [Quit: WeeChat 1.8]
<mistnim> yeah, sorry, I was sure it didn't work last time I tried
<zenspider> I'd need to look at the old rdoc tho, and I don't care that much
<zenspider> plshalprubygods: you're using a beyond unsupported version of ruby. You're gonna have to consult your docs. `ri Net::HTTP.start` and look at the args
<zenspider> mistnim: no worries. I DO expect to get a string back from json tho
<plshalprubygods> I cant... ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
<zenspider> plshalprubygods: if you can't be bothered to read your own docs, nobody can help you
<plshalprubygods> Ive gone through the 1.8.7 docs they are of no use
<zenspider> clearly that's not the case. I used them to good success.
<zenspider> even with Net::HTTP
<zenspider> ok. for fun, I did look it up... you clearly didn't.
pandaant has joined #ruby
<zenspider> def HTTP.start(address, port = nil, p_addr = nil, p_port = nil, p_user = nil, p_pass = nil, &block)
pandaant has quit [Remote host closed the connection]
AlexRussia has quit [Ping timeout: 246 seconds]
aurelien` is now known as aurelien
aurelien has quit [Changing host]
aurelien has joined #ruby
acalycine has quit [Quit: bye]
acalycine has joined #ruby
mim1k has quit [Ping timeout: 245 seconds]
Silthias has joined #ruby
ryzokuken_ has joined #ruby
jdsampayo has joined #ruby
quobo has joined #ruby
jdsampayo has quit [Client Quit]
jenrzzz has quit [Ping timeout: 245 seconds]
ryzokuken has quit [Ping timeout: 240 seconds]
ddffg has joined #ruby
Neptu has joined #ruby
bkxd_ has quit [Ping timeout: 240 seconds]
<Neptu> hello a variable like this is special @@ssh_ip@@??
<ljarvis> Neptu: that is not a valid variable name
antgel has joined #ruby
<ljarvis> perhaps you mean without the trailing @@
Burgestrand has joined #ruby
<ljarvis> in which case, it's a class variable
mim1k has joined #ruby
govg has joined #ruby
govg has quit [Client Quit]
patarr has joined #ruby
renchan has joined #ruby
s1kx has joined #ruby
Burgestr_ has joined #ruby
Rodya_ has joined #ruby
mikecmpbll has joined #ruby
mistnim has quit [Quit: Page closed]
Burgestrand has quit [Ping timeout: 255 seconds]
patarr has quit [Ping timeout: 240 seconds]
jgt4 has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rohitpaulk has quit [Ping timeout: 255 seconds]
charliesome has joined #ruby
Rodya_ has quit [Ping timeout: 258 seconds]
jcao219 has quit [Ping timeout: 240 seconds]
<Neptu> ljarvis: im trying to get a hold of an undocumented variable on the vagrant project and I wonder if its possible to dump all all variables in the executed program to try to find the one im looking for...
rgr_ has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
<zenspider> Neptu: "dump"?
<zenspider> Do you just want to grep for your thing?
<zenspider> grep -r @@ssh_ip.+= lib
<Neptu> zenspider: yes i want to grep for my thing
<Neptu> zenspider: ok long story
jackjackdripper1 has quit [Ping timeout: 245 seconds]
<Neptu> im using the openstack pluging for vagrant and I want to get the the ip from the plugin but i donno what is the variable holding it
<Neptu> that is why i want to find a way to dump all variables and trace back where they store this on a fast way
<Neptu> my ruby is not strong enough to understand what they are doing im trying to learn by doing
<zenspider> seems like any logic is gonna be coming from that line
<Neptu> zenspider: i agree
cfec0b8d has joined #ruby
<Neptu> but the @env variable should have what i need
<Neptu> but donno if env is a global variable i can access outside the pluggin
<Neptu> as far as i read should be $env not @env
<zenspider> what are you trying to get ahold of, and why?
<Neptu> im trying to get a hold on the ip allocated by openstack
<zenspider> it is neither... it is just `env`... it is whatever is passed in
biberu has joined #ruby
_br__ has quit [Ping timeout: 260 seconds]
kmhn has quit [Ping timeout: 260 seconds]
<zenspider> seems like it'd be connected to: @utils.get_ip_address(env)
<Neptu> and im trying to use the ip because im building a cluster of things and I need to know the ips forhand before executing the ansible script
_br__ has joined #ruby
<Neptu> but all does objects are not available from the vagrant side of things only inside the pluggin
kmhn has joined #ruby
yogg-saron has quit [Read error: Connection reset by peer]
<zenspider> that might be a better hint
<zenspider> well... yeah. if they don't want to give you access to something... you either need to find a different way, or a way to cheat
<zenspider> luckily in ruby cheating isn't that hard
plshalprubygods has quit [Quit: Page closed]
<Neptu> zenspider: attr_accessor :floating_ip
zipace has joined #ruby
mathys has joined #ruby
<Neptu> what this attr_accessor means?
ablackack has quit [Ping timeout: 240 seconds]
<zenspider> generates a reader and writer method for an ivar
tvw has joined #ruby
ablackack has joined #ruby
<zenspider> not sure... that util spec or nova_spec.rb is probably where you want to look for clues
nowhereman has quit [Ping timeout: 240 seconds]
<Neptu> maybe that will be declared externally there
<Neptu> feels like a good point to start
ccooke has quit [Ping timeout: 240 seconds]
<morfin> i know hack which can help with Ruby and Msys2 but that'
ccooke has joined #ruby
<morfin> that's some crap
govg has joined #ruby
volix has quit [Ping timeout: 240 seconds]
govg has quit [Client Quit]
<zenspider> Neptu: sure. good luck
<morfin> subst to create new drive with root D:\msys2 and then build/install
volix has joined #ruby
<morfin> so /home/myuser/.rbenv == G:\home\myuser\.rbenv
<zenspider> 75 minutes later and you're still not making sense
mtkd has quit [Ping timeout: 258 seconds]
<Neptu> zenspider: one last question what @variable mean?
noctux has quit [Remote host closed the connection]
<Neptu> the @
[dmp] has quit [Ping timeout: 240 seconds]
<zenspider> Neptu: that's an instance variable
<zenspider> check that URL you were sent before
<acalycine> @ = atts
noctux has joined #ruby
<morfin> zenspider, me?
mtkd has joined #ruby
<zenspider> acalycine: hrm?
Terens has joined #ruby
<Terens> hello
<Terens> when developing a gem
<Terens> lets call it ape
<Terens> in bin/gorilla file should I use require 'bundler/setup' or not ?
<zenspider> Terens: independent gems should not be using bundler at all... use it for development, sure... but your code shouldn't touch it
mark_66 has joined #ruby
<morfin> gems are isolated
bvcosta has joined #ruby
<Terens> so the correct is to declare dependencies in gemspec and require them ?
<Terens> and in development call my gem with bundle exec?
<zenspider> declare dependencies in gemspec. require any files you need where you need them. if you need bundle exec to run your stuff, you're probably doing it wrong
jcao219 has joined #ruby
<zenspider> `ruby -Ilib bin_or_test/blah` or `rake test` should be 99% of what you need
<acalycine> is there a better way to handle dependency installs? as in, doing `bundle install` and being able to run your script with just `ruby ruby.rb`.
vali has joined #ruby
unsymbol has joined #ruby
<zenspider> yes, that should work fine
<zenspider> if it doesn't, then you're probably not requiring things you need
jgt4 has joined #ruby
nowhereman has joined #ruby
mathys has quit [Quit: Leaving]
lxsameer has joined #ruby
<Terens> zenspider if I have a dependecny 'event-machine' for example
<Terens> then shouldn't I require it somewher ein my code?
dc2 has quit [Ping timeout: 268 seconds]
andikr has joined #ruby
<Terens> zenspider also how could i require development dependencies ?
brendan- has quit [Ping timeout: 240 seconds]
[dmp] has joined #ruby
Rodya_ has joined #ruby
jcao219 has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #ruby
kegster has quit [Ping timeout: 260 seconds]
im0nde has joined #ruby
Rodya_ has quit [Ping timeout: 255 seconds]
kegster has joined #ruby
brendan- has joined #ruby
jgnagy has joined #ruby
bkxd has joined #ruby
<herwin> I don't really understand that question: if you want to require development dependencies in the executable, wouldn't that make them runtime dependencies?
Beams has joined #ruby
brendan- has quit [Ping timeout: 258 seconds]
jgnagy has quit [Ping timeout: 260 seconds]
KeyJoo has joined #ruby
bvcosta has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 258 seconds]
tomphp has joined #ruby
tomphp has quit [Client Quit]
<dminuoso> herwin: Then they are not development dependencies.
<dminuoso> herwin: A development dependency might `byebug' for example. Or maybe some mock adapter.
tomphp has joined #ruby
<dminuoso> Or maybe some gem that helps with generating some static assets that are bundled into the final gem.
jgt has joined #ruby
dc2 has joined #ruby
jgt4 has quit [Ping timeout: 255 seconds]
<zenspider> development dependencies are probably going to be required in your rakefile or wherever you "development process" happens. that might be in your tests, rakefile, "build script"... I dunno.
jgt has quit [Quit: WeeChat 1.4]
workmad3 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
flying has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
arquebus has joined #ruby
anisha has quit [Ping timeout: 240 seconds]
Burgestr_ has quit [Ping timeout: 255 seconds]
anisha has joined #ruby
<Neptu> #<Object:0x00000002ed3dc8> how i can dump the contect of this object?
<tobiasvl> Neptu: normally #inspect — but you won't get any more information about an Object, it doesn't really have any content
<tobiasvl> what kind of content do you expect it to have?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
antgel has quit [Ping timeout: 255 seconds]
<Neptu> tobiasvl: thanks
acalycine has quit [Quit: bye]
<zenspider> Neptu: try `require "pp"; pp that_obj`
cjhowe7 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jud^ has quit [Quit: Leaving]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdsampayo has joined #ruby
anisha has quit [Ping timeout: 240 seconds]
anisha has joined #ruby
aviraldg has quit [Changing host]
aviraldg has joined #ruby
aviraldg has joined #ruby
jdsampayo has quit [Client Quit]
<Neptu> zenspider: managed to get an object using the variable floating_ip but donno what it is or contains... strange world... and it takes about 4 min to make another test so long story...
<Neptu> variable1=#<Object:0x00000001c090f8>
nofxxxx has joined #ruby
<Neptu> "grafana:vars" => {"variable1" => "#{cc.floating_ip.inspect}"}
marr has joined #ruby
<zenspider> Neptu: hope it is worth the effort. sounds like a pain.
* zenspider goes to bed
nofxxx has quit [Ping timeout: 246 seconds]
<Neptu> zenspider: it is a pain...
<Neptu> zenspider: night...
acalycine has joined #ruby
arquebus has quit [Quit: konversation disconnects]
patarr has joined #ruby
tlaxkit has joined #ruby
dc2 has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
kegster has quit [Ping timeout: 258 seconds]
Rodya_ has quit [Ping timeout: 258 seconds]
romank has joined #ruby
kegster has joined #ruby
bkxd has joined #ruby
acalycine has quit [Quit: bye]
hutch34 has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
bvcosta has joined #ruby
Pumukel has joined #ruby
bkxd has quit [Ping timeout: 268 seconds]
ferr1 has joined #ruby
acalycine has joined #ruby
dc2 has joined #ruby
Burgestrand has joined #ruby
acalycine has quit [Client Quit]
belmoussaoui__ is now known as belmoussaoui
JaReAx has joined #ruby
JaReAx has quit [Client Quit]
JaReAx has joined #ruby
chouhoulis has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
robnester has quit [Ping timeout: 260 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
Ishido has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
anisha has joined #ruby
acalycine has joined #ruby
robnester has joined #ruby
stormbytes has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Ishido has joined #ruby
oliv_____ has joined #ruby
<Neptu> UNSET_VALUE is same as assign an empty object?
jameser has quit [Ping timeout: 255 seconds]
Dutjub has joined #ruby
<tobiasvl> huh?
<tobiasvl> it's a constant
<tobiasvl> seems to be a vagrant thing by googling. never heard of it
uZiel has quit [Ping timeout: 248 seconds]
Dutjub has quit [Remote host closed the connection]
bvcosta has quit [Remote host closed the connection]
Dutjub has joined #ruby
FastJack has quit [Read error: Connection reset by peer]
jdsampayo has joined #ruby
conta has quit [Quit: conta]
FastJack has joined #ruby
jdsampayo has quit [Client Quit]
mitt3ns has quit [Ping timeout: 246 seconds]
hosttor has joined #ruby
acalycine has quit [Quit: bye]
acalycine has joined #ruby
<apeiros> Neptu: ruby doesn't have a concept of "empty object". do you mean nil? Object.new? {} (an empty hash)? something else?
planigan has quit [Ping timeout: 245 seconds]
<apeiros> and as tobiasvl said, UNSET_VALUE would be a constant. constants are a kind of variables. variables and objects are different concepts. variables reference objects. they aren't objects themselves.
Rodya_ has joined #ruby
KeyJoo has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
gnufied has joined #ruby
antgel has joined #ruby
tvw has quit [Ping timeout: 240 seconds]
Rodya_ has quit [Ping timeout: 258 seconds]
ahrs has quit [Remote host closed the connection]
acalycine has quit [Quit: bye]
ahrs has joined #ruby
acalycine has joined #ruby
hs366 has joined #ruby
nowhereman has quit [Ping timeout: 268 seconds]
<Neptu> apeiros: just checking that is exactly this UNSET_VALUE
<Neptu> ls -la
<apeiros> ?
charliesome has joined #ruby
<apeiros> "that"? "this UNSET_VALUE"? contextual information is completely lacking…
hobodave has joined #ruby
Ishido has quit [Ping timeout: 255 seconds]
<tobiasvl> Neptu: perhaps you want to join #vagrant
vuoto has joined #ruby
<tobiasvl> UNSET_VALUE seems to be a vagrant constant that's used to differentiate variables that are unset on purpose vs those that happen to be nil
<tobiasvl> or something
Ishido has joined #ruby
rohitpaulk has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
bvcosta has joined #ruby
vuoto has quit [Quit: Lost terminal]
<Neptu> tobiasvl: #unfortunately vagrant channel is dead
bvcosta has quit [Ping timeout: 246 seconds]
HoierM has joined #ruby
<dminuoso> Neptu: They have a google group, an issue tracker on github..
Vingador has joined #ruby
gregf_ has joined #ruby
Terens has quit [Ping timeout: 240 seconds]
<Neptu> dminuoso: already on it... but slow Im trying to solve this problem myself
<Neptu> and learn ruby on the process
<Neptu> attr_accessor :floating_ip
<Neptu> this : what means?
<tobiasvl> a symbol
<tobiasvl> is #vagrant really dead? there are 320 people there
conta has joined #ruby
<Neptu> tobiasvl: been for a couple of days only me speaking... strange is a good project but really irc is dead
<tobiasvl> too bad
<Neptu> tobiasvl: yes too bad :(
itaipu has joined #ruby
anisha has joined #ruby
flyingX has joined #ruby
flying has quit [Read error: Connection reset by peer]
anisha_ has joined #ruby
ldnunes has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
anisha has quit [Ping timeout: 246 seconds]
hosttor has quit [Ping timeout: 260 seconds]
bigkevmcd has joined #ruby
nowhereman has joined #ruby
<dminuoso> docker-compose build --no-cache
* dminuoso kicks back
<dminuoso> https://xkcd.com/303/ I need a tshirt with this/
ur5us has joined #ruby
flyingX has quit []
mim1k has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
azwieg103 has quit [Remote host closed the connection]
patarr has joined #ruby
charliesome has joined #ruby
itaipu has quit [Ping timeout: 240 seconds]
t-recx has joined #ruby
SaschaVoid has joined #ruby
oliv_____ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
charliesome has quit [Ping timeout: 246 seconds]
petruff1 has joined #ruby
GinoMan has joined #ruby
patarr has quit [Ping timeout: 255 seconds]
cdg has joined #ruby
itaipu has joined #ruby
djbkd has joined #ruby
mim1k has joined #ruby
Rodya_ has quit [Ping timeout: 246 seconds]
Mortomes|Work has quit [Ping timeout: 260 seconds]
Ishido has quit [Ping timeout: 240 seconds]
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
ldnunes has quit [Quit: Leaving]
johnzorn has quit [Ping timeout: 255 seconds]
ldnunes has joined #ruby
BSaboia has quit [Quit: Leaving]
Ishido has joined #ruby
ur5us has quit [Remote host closed the connection]
hs366 has quit [Quit: Leaving]
charliesome has joined #ruby
milardovich has joined #ruby
acalycine has quit [Quit: bye]
bkxd has joined #ruby
Otti has joined #ruby
oliv_____ has joined #ruby
centrx has joined #ruby
pupsicle has joined #ruby
Fernando-Basso has joined #ruby
t-recx has quit [Quit: t-recx]
cdg_ has joined #ruby
cdg has quit [Ping timeout: 246 seconds]
pupsicle has quit [Remote host closed the connection]
flying has joined #ruby
pupsicle has joined #ruby
Kug3lis has joined #ruby
jdawgaz has joined #ruby
kassav_ has joined #ruby
GodFather has joined #ruby
De_Moivre has joined #ruby
shinnya has joined #ruby
kegster has quit [Ping timeout: 268 seconds]
nyuszika7h_ is now known as nyuszika7h
<De_Moivre> hello I am installing vagrant host-updater addon on Arch linux and I get this ruby error : https://paste.zkl.dk/siqovetehu.sql what does this signify?
<tobiasvl> De_Moivre: seems like the error message is cut off horizontally, so no idea
<tobiasvl> /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/source.rb:192:in `load': Marshal.load r
<morfin> ruby has specific version of File for Windows i guess?
<morfin> win32/file.c and win32/file.h
<De_Moivre> how can I bypass this?
KeyJoo has joined #ruby
<tobiasvl> morfin: what do you mean? .h is the C header file, .c is the implementation
<De_Moivre> dont use win32 :~0
simon__ has joined #ruby
flying has quit [Read error: Connection reset by peer]
<De_Moivre> tobiasvl: how do you mean cut off horizontally?
flying has joined #ruby
<simon__> any good practices in ruby?
<morfin> i know what they are
<morfin> De_Moivre, i almost made it work
<De_Moivre> the plugin?
<De_Moivre> morfin:
<morfin> i just need to understand what's wrong with Ruby File class
<De_Moivre> how can I give you that info?
<De_Moivre> I have never used ruby and cant learn it now ;P
<De_Moivre> too busy...
kegster has joined #ruby
<pupsicle> simon__: yes
<tobiasvl> De_Moivre: I mean that I don't see the whole lines in your paste
<tobiasvl> they stop abruptly
<De_Moivre> thats all that my term outputs
<De_Moivre> they gave out more
<De_Moivre> will paste it in a sec
jameser has joined #ruby
petruff1 has quit [Ping timeout: 240 seconds]
simon__ has left #ruby [#ruby]
<tobiasvl> are you sure your terminal wraps lines
<De_Moivre> here you go
<De_Moivre> every so second attempt it outputs this
<tobiasvl> hm, that backtrace is missing the actual exception though
<tobiasvl> segfault, weird
<tobiasvl> I think it'd be better to ask a vagrant support channel
<De_Moivre> ok
<De_Moivre> I will make an issue on the git-hub aswell
<De_Moivre> is there an packages I may be missing?
gheegh has quit [Quit: Textual IRC Client: www.textualapp.com]
hobodave has quit [Quit: Computer has gone to sleep.]
bkxd has quit [Ping timeout: 260 seconds]
jdsampayo has joined #ruby
drale2k has quit [Quit: ZNC - http://znc.in]
bkxd has joined #ruby
drale2k has joined #ruby
rohitpaulk has quit [Ping timeout: 240 seconds]
kegster has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
t-recx has joined #ruby
jgnagy has joined #ruby
AlexRussia has joined #ruby
symm- has joined #ruby
<symm-> hi, is there a version of Array::delete that returns the remaining array?
gnufied has quit [Ping timeout: 245 seconds]
mim1k has quit [Ping timeout: 246 seconds]
<apeiros> symm-: don't think so. you can use #tap.
pb122 has quit [Ping timeout: 246 seconds]
<herwin> [:a, :b] - [:a] does kind of what you're looking for
Rodya_ has quit [Ping timeout: 260 seconds]
petruff1 has joined #ruby
<symm-> oh that looks good herwin
<symm-> is #tap an Array function? can't find it listed
<ineb> Object#tap
kegster has joined #ruby
sleetdrop has quit [Quit: Computer has gone to sleep.]
<symm-> ah that's actually lovely
mostlybadfly has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<centrx> symm-: Could also use keep_if with the opposite of your delete condition
hutch34 has joined #ruby
<symm-> I see, I just went with delete_if for now to keep it chainable
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
gnufied has joined #ruby
<centrx> oh theer is a delete_if!
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
milardovich has quit []
jdawgaz has joined #ruby
jdsampayo has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jdawgaz has quit [Client Quit]
swills has joined #ruby
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
t-recx has quit [Quit: t-recx]
tlaxkit has quit [Quit: ¡Adiós!]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
<apeiros> symm-, herwin: beware, Array#- is a set operation
<apeiros> >> [1,2,2,3,2,4,5,2] - [2]
<ruby[bot]> apeiros: # => [1, 3, 4, 5] (https://eval.in/814033)
uZiel has joined #ruby
<symm-> yes, I want to remove all instances of 2
<symm-> >>[5,4,3,2,2,2]-[2]
<ruby[bot]> symm-: # => [5, 4, 3] (https://eval.in/814034)
DLSteve has joined #ruby
<symm-> seems to preserve order
<apeiros> ok, then last beware: Array#- being a set operation uses eql?, delete uses ==
<apeiros> (well, hash+eql?)
rohitpaulk has joined #ruby
cadillac__ has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ben__ has joined #ruby
jameser has joined #ruby
vali has quit [Ping timeout: 246 seconds]
rgr_ has quit [Quit: rgr_]
Nightmare has quit [Excess Flood]
gizmore has joined #ruby
Nightmare has joined #ruby
ryzokuken_ has quit [Ping timeout: 240 seconds]
uZiel has quit [Ping timeout: 248 seconds]
antgel has quit [Ping timeout: 240 seconds]
jdawgaz has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
roshanavand has quit [Remote host closed the connection]
<Cork> is it possible to customize what gets printed in the console when one run > TheClass.new (or a variable of the instance)?
griffindy has joined #ruby
<ljarvis> Cork: override the inspect method
<Cork> so class TheClass; def inspect ?
<ljarvis> correct
<Cork> sweet thx
cdg_ has quit [Ping timeout: 260 seconds]
gnufied has quit [Quit: Leaving]
uZiel has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
Rodya_ has joined #ruby
jdawgaz has quit [Client Quit]
djbkd has quit [Remote host closed the connection]
mim1k has joined #ruby
ryzokuken_ has joined #ruby
jdawgaz has joined #ruby
djbkd has joined #ruby
jdawgaz has quit [Client Quit]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Otti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anisha_ has quit [Quit: This computer has gone to sleep]
aupadhye has quit [Ping timeout: 246 seconds]
p0p0pr37_ has joined #ruby
p0p0pr37_ has joined #ruby
p0p0pr37_ has quit [Changing host]
centrx has quit []
djbkd has quit [Ping timeout: 240 seconds]
anisha has joined #ruby
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
p0p0pr37 has quit [Ping timeout: 246 seconds]
p0p0pr37_ is now known as p0p0pr37
dionysus69 has quit [Ping timeout: 260 seconds]
jdawgaz has joined #ruby
balazs__ has quit [Remote host closed the connection]
tomphp has joined #ruby
ionte has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 255 seconds]
hutch34 has joined #ruby
chouhoulis has joined #ruby
glejeune has quit [Quit: Leaving]
SaschaVoid has quit [Ping timeout: 255 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
itaipu has quit [Ping timeout: 255 seconds]
itaipu has joined #ruby
oleo has joined #ruby
rohitpaulk has quit [Ping timeout: 255 seconds]
cschneid_ has joined #ruby
gothicsouth has joined #ruby
patarr has joined #ruby
hobodave has joined #ruby
rohitpaulk has joined #ruby
gnufied has joined #ruby
SaschaVoid has joined #ruby
swills has quit [Quit: Leaving]
cschneid_ has quit [Ping timeout: 255 seconds]
patarr has quit [Ping timeout: 240 seconds]
flying has quit [Read error: Connection reset by peer]
hutch34 has quit [Ping timeout: 268 seconds]
xiljin has joined #ruby
kassav_ has quit [Quit: kassav_]
dc2 has quit [Ping timeout: 240 seconds]
flying has joined #ruby
patarr has joined #ruby
hutch34 has joined #ruby
sepp2k has joined #ruby
Kug3lis has quit [Ping timeout: 246 seconds]
__Yiota has joined #ruby
sleetdrop has joined #ruby
LastWhisper____ has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
sleetdrop has quit [Client Quit]
__Yiota has quit [Client Quit]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
hobodave has joined #ruby
antgel has joined #ruby
snockerton has joined #ruby
De_Moivre has quit [Ping timeout: 240 seconds]
planigan has joined #ruby
ozcanesen has joined #ruby
<guardian> hello, is the following idiomatic enough please?
<guardian> params[:class] = params[:class].nil? ? 'active' : (params[:class].split(' ') << 'active').uniq.join(' ')
blackwind_123 has joined #ruby
raul782 has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has quit [Ping timeout: 260 seconds]
<leah2> params[:class] = (params[:class].to_s.split | ["active"]).join(' ') perhaps?
<guardian> looks good
<leah2> or params[:class] || ""
<matthewd> It means something quite different though
<leah2> if you think .to_s is to agressive
<leah2> matthewd: sure?
margeas has joined #ruby
<jhass> so this is CSS classes I guess? I'd abuse that it doesn't care about the trailing space: "active #{params[:class]}"
<matthewd> leah2: Ah sorry, yeah, misread the first one
<jhass> if the trailing space is so terrible to you: ["active", *params[:class]].uniq.join(" ")
<guardian> what's *params?
<jhass> splat
<jhass> >> [*nil]
<ruby[bot]> jhass: # => [] (https://eval.in/814100)
<jhass> >> [*"foo"]
<ruby[bot]> jhass: # => ["foo"] (https://eval.in/814101)
<guardian> thanks, I learnt something new
griffindy has quit [Remote host closed the connection]
rippa has joined #ruby
tvon has joined #ruby
tvon has quit [Client Quit]
Kug3lis_off is now known as Kug3lis
De_Moivre has joined #ruby
raul782 has quit [Remote host closed the connection]
GodFather has quit [Ping timeout: 245 seconds]
p1k has quit [Quit: WeeChat 1.6]
cschneid_ has joined #ruby
Kug3lis has quit [Quit: Textual IRC Client: www.textualapp.com]
segmond has joined #ruby
oliv_____ has quit [Remote host closed the connection]
latemus has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
olivi____ has joined #ruby
griffindy has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
alamar has quit [Ping timeout: 255 seconds]
De_Moivre has quit [Ping timeout: 255 seconds]
symm- has quit [Ping timeout: 255 seconds]
psychicist__ has joined #ruby
<morfin> miniruby use same sources as ruby?
griffindy has quit [Ping timeout: 258 seconds]
chalkmonster has joined #ruby
ferr1 has quit [Quit: WeeChat 1.8]
hobodave has quit [Quit: Computer has gone to sleep.]
raul782 has joined #ruby
hobodave has joined #ruby
rohitpaulk has joined #ruby
cfec0b8d has quit [Ping timeout: 240 seconds]
SaschaVoid has quit [Quit: omw home]
conta has quit [Ping timeout: 240 seconds]
flying has quit []
Dutjub has quit [Quit: Dutjub]
lacour has joined #ruby
alamar has joined #ruby
alamar is now known as Guest6267
cdg has joined #ruby
mark_66 has quit [Quit: Leaving.]
mark_66 has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
mim1k has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
ascarter has quit [Client Quit]
mtkd has quit [Ping timeout: 260 seconds]
chalkmonster has quit [Remote host closed the connection]
mtkd has joined #ruby
aufi has quit [Ping timeout: 258 seconds]
ascarter has joined #ruby
chalkmonster has joined #ruby
bvcosta has joined #ruby
bvcosta has quit [Remote host closed the connection]
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
nowhereman has quit [Ping timeout: 255 seconds]
arup_r has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
bkxd has joined #ruby
rkazak_ has joined #ruby
mark_66 has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 240 seconds]
mikecmpb_ has quit [Ping timeout: 240 seconds]
Burgestrand has quit [Quit: Closing time!]
drcode has quit [Quit: ZNC 1.6.5 - http://znc.in]
drcode has joined #ruby
cadillac__ has quit [Ping timeout: 240 seconds]
arup_r has quit [Remote host closed the connection]
raspado has joined #ruby
amclain has joined #ruby
andikr has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
margeas has quit [Quit: leaving]
Norno has joined #ruby
<Norno> How would you write `first.second.map { |a| a + 1 }` to avoid rubocop's "Parenthesize the param to make sure that the block will be associated with the method call" error?
<Norno> oh wait, it was because I was using puts without parenthesis
<baweaver> what's the actual code?
<baweaver> because it shouldn't care about that
<Norno> `puts first.second.map { |a| a + 1 }`
<baweaver> ah, then that might, though you may just move the map up and assign it to a var
<apeiros> Norno: that's about puts' params
<apeiros> puts(foo { … })
<apeiros> or as baweaver said - assign it to a var before printing
<Norno> yep, I realized. That's what I meant with "oh wait, it was because I was using puts without parenthesis"
mikecmpbll has quit [Quit: inabit. zz.]
<Norno> thanks though
kies has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
tomphp has joined #ruby
Norno has quit [Quit: Page closed]
SaschaVoid has joined #ruby
troys has joined #ruby
brent__ has joined #ruby
gusrub has joined #ruby
cfec0b8d has joined #ruby
xiljin has quit [Quit: ...]
mim1k has joined #ruby
shinnya has quit [Ping timeout: 268 seconds]
MrSparkle has quit [Ping timeout: 246 seconds]
Robtop__ is now known as pwnd_nsfw
mim1k has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Read error: Connection reset by peer]
cfec0b8d has quit [Ping timeout: 255 seconds]
nowhereman has joined #ruby
mikecmpbll has joined #ruby
nitric has joined #ruby
MrSparkle has joined #ruby
ben__ has quit [Remote host closed the connection]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has quit [Ping timeout: 268 seconds]
im0nde has quit [Ping timeout: 246 seconds]
mikecmpbll has quit [Ping timeout: 246 seconds]
kies has joined #ruby
bvcosta has joined #ruby
bvcosta has quit [Ping timeout: 246 seconds]
cfec0b8d has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
chalkmonster has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #ruby
mim1k has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
shortdudey123 has quit [Ping timeout: 240 seconds]
lxsameer has quit [Quit: WeeChat 1.7]
cfec0b8d has quit [Ping timeout: 240 seconds]
Vingador has quit [Remote host closed the connection]
itaipu has quit [Ping timeout: 260 seconds]
mim1k has quit [Ping timeout: 240 seconds]
shortdudey123 has joined #ruby
FastJack has quit [Read error: Connection reset by peer]
FastJack has joined #ruby
gusrub has quit [Remote host closed the connection]
shortdudey123 has quit [Excess Flood]
shortdudey123 has joined #ruby
gusrub has joined #ruby
mackesque has joined #ruby
millerti has joined #ruby
Rodya_ has quit [Remote host closed the connection]
petruff1 has quit [Ping timeout: 260 seconds]
cbyrda has joined #ruby
SeepingN has joined #ruby
Beams has quit [Quit: .]
raul782 has quit [Remote host closed the connection]
cfec0b8d has joined #ruby
c_nick has joined #ruby
petruff1 has joined #ruby
pb122 has joined #ruby
stormbytes has joined #ruby
mikecmpbll has joined #ruby
kirun has joined #ruby
gothicsouth has joined #ruby
duderonomy has quit [Ping timeout: 246 seconds]
kegster has quit [Ping timeout: 240 seconds]
kegster has joined #ruby
bambanx has joined #ruby
itaipu has joined #ruby
bmurt has joined #ruby
lupine has quit [Read error: Connection reset by peer]
ozcanesen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
symm- has joined #ruby
lupine has joined #ruby
kegster has quit [Ping timeout: 255 seconds]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
uZiel has quit [Ping timeout: 248 seconds]
kegster has joined #ruby
olivi____ has quit [Remote host closed the connection]
gothicsouth has joined #ruby
olivi____ has joined #ruby
olivi____ has quit [Remote host closed the connection]
renchan has quit [Quit: Leaving...]
oliv_____ has joined #ruby
antgel has quit [Ping timeout: 255 seconds]
ivanskie has joined #ruby
<ivanskie> hi all
duderonomy has joined #ruby
Pumukel has quit [Ping timeout: 246 seconds]
<ivanskie> so i wrote some code that downloads some stuff from industrial devices. i used yaml for config file, and csv for list of devices, names, and their ip addresses. originally thought would only be used at one site.
bkxd has joined #ruby
tomphp has joined #ruby
pupsicle has quit [Ping timeout: 260 seconds]
kegster has quit [Ping timeout: 245 seconds]
tomphp has quit [Client Quit]
<ivanskie> now realized can use it at another site. but since its being run from windows2008 server using travelingruby.. i don't know if i want to duplicate the code, and files for the other site. or make this more complex and promt for which site at runtime to check diff config file or info.
<ivanskie> kind of thinking about using sinatra to manage the config file, list of devices, and provide friendly front end to run the code and then get resulting data back.
dionysus69 has joined #ruby
<ivanskie> And the question is two pronged to "y'all" is, should i just make a copy of the whole thing, and tell the ppl who'll be using it to use one for one site and use another for another. or show off my skills and extend the functionality.
Kug3lis has joined #ruby
<dionysus69> I started reading my birthday present! well grounded rubyist! 2nd edition :)
<ivanskie> and if i extend the functionality to using sintra, what would be the best way (easiset/simplest) to work with the data. site:{device_credentials,uids,url,devices:[device_name, ip]}
<ivanskie> great book!
bkxd has quit [Ping timeout: 258 seconds]
pupsicle has joined #ruby
hutch34 has quit [Ping timeout: 245 seconds]
<ivanskie> currently im using config yaml file for credentials, uids[], and csv for devices(device_name,ip,url).
<ivanskie> considering going the json route. kind of wish using active_model wasn't an overkill for a small program here.
<ivanskie> looking for suggestions :)
ecuanaso has joined #ruby
oliv_____ has quit [Remote host closed the connection]
kegster has joined #ruby
oliv_____ has joined #ruby
<ivanskie> guess could bake my own nano thing.
tomphp has joined #ruby
tomphp has quit [Client Quit]
rohitpaulk has quit [Ping timeout: 246 seconds]
symm- has quit [Ping timeout: 240 seconds]
oliv_____ has quit [Ping timeout: 240 seconds]
dc2 has joined #ruby
bambanx has quit [Quit: Leaving]
romank has quit [Ping timeout: 240 seconds]
kegster has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #ruby
Rodya_ has joined #ruby
NightMonkey has quit [Quit: ZNC - http://znc.in]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mackesque> list
kegster has joined #ruby
dc2 has quit [Ping timeout: 240 seconds]
raul782 has joined #ruby
NightMonkey has joined #ruby
Rodya_ has quit [Ping timeout: 246 seconds]
GinoMan2440 has joined #ruby
t-recx has joined #ruby
GinoMan has quit [Ping timeout: 255 seconds]
hutch34 has joined #ruby
cpruitt has joined #ruby
mathys has joined #ruby
RobertBirnie has joined #ruby
<baweaver> mackesque: looking for something?
<mackesque> baweaver: a cure for fat fingers? :)
<baweaver> heh, fair enough
<baweaver> was thinking you might be after: /cs access #channel list
<baweaver> or something
dreamthese has quit [Remote host closed the connection]
dreamthese has joined #ruby
<c_nick> I need to parse a yml ,csv and xml file, is there a generic parser kind that parses all or do i need to parse these separately -> yaml parser, csv parser and xml parser
spastorino has joined #ruby
<pupsicle> require 'universal_parser'
TinkerTyper has quit [Ping timeout: 245 seconds]
gusrub has quit [Remote host closed the connection]
rohitpaulk has quit [Remote host closed the connection]
hobodave_ has joined #ruby
raul782 has quit [Remote host closed the connection]
hobodave has quit [Ping timeout: 260 seconds]
TinkerTyper has joined #ruby
Bock has quit [Read error: Connection reset by peer]
SaschaVoid has quit [Quit: leaving]
SaschaVoid has joined #ruby
<c_nick> pupsicle, wow this is fantastic! i dont need to code, everything is taken care of!
c_nick has quit [Quit: ciaos]
drcode has quit [Read error: Connection reset by peer]
gusrub has joined #ruby
kegster has quit [Ping timeout: 260 seconds]
ecuanaso has joined #ruby
<SeepingN> puts needful.do; end
kegster has joined #ruby
Kug3lis is now known as Kug3lis_off
mim1k has joined #ruby
<pupsicle> lol
ddffg has quit [Ping timeout: 268 seconds]
segmond has quit [Quit: l8r]
ben__ has joined #ruby
brent___ has joined #ruby
brent____ has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
brent__ has quit [Ping timeout: 240 seconds]
ozcanesen has joined #ruby
gusrub has quit [Remote host closed the connection]
brent___ has quit [Ping timeout: 260 seconds]
gnufied has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
dkam has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryzokuken_ has quit [Quit: Leaving]
Kug3lis_off is now known as Kug3lis
cadillac__ has joined #ruby
mim1k has joined #ruby
mackesque has quit [Quit: mackesque]
klaas has joined #ruby
HoierM has quit [Ping timeout: 245 seconds]
brent__ has joined #ruby
milardovich has joined #ruby
olivi____ has joined #ruby
mjuszczak has joined #ruby
nitric has quit [Quit: quit]
nitric has joined #ruby
brent____ has quit [Ping timeout: 260 seconds]
mim1k has quit [Ping timeout: 240 seconds]
gnufied has joined #ruby
olivi____ has quit [Remote host closed the connection]
olivi____ has joined #ruby
kegster has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
kegster has joined #ruby
troys is now known as troys_
jenrzzz has quit [Ping timeout: 240 seconds]
zapata has quit [Ping timeout: 255 seconds]
milardovich has quit [Remote host closed the connection]
mathys has quit [Quit: Leaving]
Rodya_ has quit [Ping timeout: 246 seconds]
mackesque has joined #ruby
petruff1 has quit [Ping timeout: 255 seconds]
spastorino has quit []
shinnya has joined #ruby
gusrub has joined #ruby
mjuszczak has quit []
prubini87 has joined #ruby
mjuszczak has joined #ruby
gusrub has quit [Remote host closed the connection]
dc2 has joined #ruby
zapata has joined #ruby
lxsameer has joined #ruby
Kug3lis_ has joined #ruby
<prubini87> Hi! Does anyone know how I can write a (simple?) command-line program that actively reads data from a socket (or anything else that streams constantly) and also actively listens to user input, that is, keeps the command line open for input, allowing for the input of commands... (writing to the socket, basically)? My problem is with this logic of listening to both things, the socket stream and
<prubini87> the user input simultaneously.
gusrub has joined #ruby
chouhoul_ has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
Kug3lis_ has quit [Read error: Connection reset by peer]
Kug3lis_ has joined #ruby
<apeiros> &ri IO.select prubini87
mtkd has quit [Ping timeout: 255 seconds]
chouhoulis has quit [Ping timeout: 258 seconds]
ozzy3 has joined #ruby
<prubini87> @apeiros, @`derpy, thank you! I'll take a look at that! ;D
mtkd has joined #ruby
Kug3lis is now known as Kug3lis_off
<apeiros> prubini87: `derpy is a bot ;-)
centrx has joined #ruby
KeyJoo has quit [Ping timeout: 246 seconds]
morfin has quit []
ur5us has joined #ruby
jcao219 has joined #ruby
mjuszczak has quit []
jdawgaz has joined #ruby
Pumukel has joined #ruby
jdawgaz has quit [Read error: Connection reset by peer]
cjhowe7 has joined #ruby
dc2 has quit [Ping timeout: 260 seconds]
Kug3lis_ has quit [Read error: Connection reset by peer]
Kug3lis has joined #ruby
dc2 has joined #ruby
mattp_ has quit [Read error: Connection reset by peer]
mattp_ has joined #ruby
KeyJoo has joined #ruby
bkxd has joined #ruby
chmuri has joined #ruby
<chmuri> hi
ur5us has quit [Remote host closed the connection]
<jhass> hi
<baweaver> hi
Otti has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
mjuszczak has joined #ruby
bchlli has joined #ruby
dc2 has quit [Ping timeout: 246 seconds]
raul782 has joined #ruby
jdawgaz has joined #ruby
mesamoo has joined #ruby
dasher00 has quit [Ping timeout: 255 seconds]
bchlli has left #ruby ["WeeChat 1.5"]
mim1k has joined #ruby
jenrzzz has joined #ruby
<SeepingN> lo
brent__ has quit [Remote host closed the connection]
dasher00 has joined #ruby
jdawgaz has quit [Ping timeout: 260 seconds]
<ivanskie> hi
mim1k has quit [Ping timeout: 258 seconds]
olivi____ has quit [Remote host closed the connection]
<ivanskie> is there something similar to active_record but for non-rails apps?
milardovich has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
ozzy3 has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
bchlli has joined #ruby
<jhass> sequel
itaipu has quit [Ping timeout: 246 seconds]
<ivanskie> I have a predefined class Config. I want to have a folder Sites with site1.rb..etc files each following the same format of Config class.
ben__ has quit [Remote host closed the connection]
<ivanskie> then have an array of Sites, each with its own instance of Config object.
<ivanskie> not sure what to put into the site.rb file
milardovich has quit [Ping timeout: 240 seconds]
chouhoul_ has quit [Ping timeout: 255 seconds]
<ivanskie> do i do "class Sitename" and "extends Config"? orrr
<ivanskie> i haven't done this kind of stuff outside of rails before. but i wrote a program which reads config.yml file, and csv file with device names and ip addresses. and this was for a single site.
patarr_ has joined #ruby
Rodya_ has joined #ruby
<ivanskie> now i have to do this for multiple sites. and i'm thinking about having config files in Sites folder, have the code read each file....
KeyJoo has quit [Excess Flood]
dionysus69 has quit [Ping timeout: 258 seconds]
<ivanskie> gah
KeyJoo has joined #ruby
itaipu has joined #ruby
<ivanskie> and also trying to make it easier for whomever is going to use it.
kies has quit [Ping timeout: 240 seconds]
patarr has quit [Ping timeout: 260 seconds]
al2o3-cr has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ivanskie> would have been nice if i could combine csv and yaml into a single file. hmm. make my own .site filename with markers all lines before marker interpret with YAML, all lines after marker interpret with CSV. hah
<ivanskie> solves two problems
mjuszczak has quit []
<ivanskie> except can't open in excel
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has quit [Ping timeout: 246 seconds]
<ivanskie> trying to stay dry
cbyrda has quit [Quit: leaving]
oliv_____ has joined #ruby
dc2 has joined #ruby
ascarter has joined #ruby
ascarter has quit [Client Quit]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
im0nde has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
pupsicle has quit [Ping timeout: 258 seconds]
kegster has quit [Ping timeout: 240 seconds]
oliv_____ has quit [Remote host closed the connection]
olivi____ has joined #ruby
ur5us has joined #ruby
mjuszczak has joined #ruby
<zenspider> ivanskie: you can use active_record on non-rails apps too.
troys_ is now known as troys
<zenspider> there are also libraries for reading excel spreadsheets, but I have no clue how good they are. I avoid stuff like that
kegster has joined #ruby
mjuszczak has quit [Client Quit]
mkillebrew has joined #ruby
mjuszczak has joined #ruby
bchlli has quit [Quit: WeeChat 1.5]
_br___ has joined #ruby
ccooke_ has joined #ruby
sebd has joined #ruby
jenrzzz_ has joined #ruby
mjuszcza_ has joined #ruby
KillerFox has quit [Write error: Broken pipe]
DEac- has quit [Write error: Broken pipe]
sebd_ has quit [Write error: Broken pipe]
ccooke has quit [Write error: Broken pipe]
forgot has quit [Write error: Broken pipe]
_br__ has quit [Write error: Broken pipe]
rippa has quit [Write error: Broken pipe]
DEac- has joined #ruby
forgot has joined #ruby
KillerFox has joined #ruby
FastJack has quit [Remote host closed the connection]
jenrzzz has quit [Remote host closed the connection]
forgot is now known as Guest95348
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
mjuszczak has quit [Ping timeout: 246 seconds]
bokayio has quit [Ping timeout: 240 seconds]
Didac has quit [Ping timeout: 240 seconds]
texasmynsted has quit [Ping timeout: 260 seconds]
diegok has quit [Ping timeout: 260 seconds]
<ivanskie> I've worked with excel files in ruby before. it can be annoying, but does work.
bokayio has joined #ruby
<ivanskie> i could in theory just have a site definition file as an excel file..... hm
GinoMan2440 has quit [Ping timeout: 255 seconds]
<ivanskie> that does solve the problem, but i'd have to rewrite most of my core code since its working in csv
bkxd has joined #ruby
diegok has joined #ruby
Didac has joined #ruby
FastJack has joined #ruby
<ivanskie> i've landed on defining site config in .yml file. then instanciating a Config object for each of these. hmm
texasmynsted has joined #ruby
mackesque has quit [Quit: mackesque]
gothicsouth has joined #ruby
bkxd has quit [Ping timeout: 246 seconds]
tvw has joined #ruby
hobodave_ has quit [Quit: Computer has gone to sleep.]
ascarter has joined #ruby
rkazak_ is now known as rkazak
Kug3lis_off has quit [Read error: Connection reset by peer]
mjuszcza_ has quit []
mathys has joined #ruby
faelkle has joined #ruby
pupsicle has joined #ruby
faelkle has quit [Client Quit]
faelkle has joined #ruby
faelkle has joined #ruby
faelkle has quit [Changing host]
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SaschaVoid has quit [Ping timeout: 255 seconds]
boombox_ has joined #ruby
justizin has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SaschaVoid has joined #ruby
hobodave has joined #ruby
kies has joined #ruby
Rodya_ has joined #ruby
psychicist__ has quit [Ping timeout: 240 seconds]
ddffg has joined #ruby
Rodya_ has quit [Ping timeout: 245 seconds]
jcao219 has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
ben__ has joined #ruby
kegster has quit [Read error: Connection reset by peer]
SaschaVoid has quit [Ping timeout: 240 seconds]
SaschaVoid has joined #ruby
ben__ has quit [Ping timeout: 260 seconds]
biberu has quit []
perniciouscaffei has joined #ruby
milardovich has joined #ruby
faelkle has quit [Quit: Nighty night....]
mtkd has quit [Read error: Connection reset by peer]
my123 has quit [Ping timeout: 240 seconds]
faelkle has joined #ruby
faelkle has joined #ruby
faelkle has quit [Changing host]
omab has joined #ruby
<lucas__> can someone think of a native (C) gem that is (1) popular; (2) has no external deps; (3) is very fast to build? (it's for a tutorial)
raul782 has quit [Remote host closed the connection]
cadillac__ has quit [Ping timeout: 245 seconds]
drcode has joined #ruby
ldnunes has quit [Quit: Leaving]
rkazak has quit [Quit: Sleep.....ing....]
SaschaVoid has quit [Ping timeout: 246 seconds]
stryek_ has joined #ruby
SaschaVoid has joined #ruby
my123 has joined #ruby
my123 has joined #ruby
Didac has quit [Changing host]
Didac has joined #ruby
<matthewd> lucas__: kgio is a dep of unicorn
<lucas__> thanks, actually I've found ffi
<lucas__> which makes it easy to write a hello world app
stryek has quit [Ping timeout: 260 seconds]
olivi____ has quit [Remote host closed the connection]
olivi____ has joined #ruby
<matthewd> Ah yep, much better
SaschaVoid has quit [Quit: sleep is fundamental]
dkam has quit [Quit: Be back later ...]
arup_r has joined #ruby
faelkle has quit [Quit: Nighty night....]
vikaton has joined #ruby
olivi____ has quit [Ping timeout: 240 seconds]
dkam has joined #ruby
pupsicle has quit [Read error: Connection reset by peer]
boombox_ has quit [Remote host closed the connection]
tomphp has joined #ruby
prubini87 has quit [Read error: Connection reset by peer]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jenrzzz_ has quit [Ping timeout: 268 seconds]
prubini87 has joined #ruby
Ishido has quit [Remote host closed the connection]
<darix> lucas__: fast blank
DropsOfSerenity has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
DropsOfSerenity has left #ruby [#ruby]
itaipu has quit [Ping timeout: 246 seconds]
prubini87 has quit [Read error: Connection reset by peer]
my123 has quit [Ping timeout: 240 seconds]
prubini87 has joined #ruby
dc2 has quit [Ping timeout: 240 seconds]
s1kx has quit [Quit: s1kx]
ecuanaso has joined #ruby
DropsOfSerenity has joined #ruby
DropsOfSerenity has quit [Read error: Connection reset by peer]
gaurav has quit [Ping timeout: 240 seconds]
gaurav has joined #ruby
Rodya_ has joined #ruby
_br___ has quit [Ping timeout: 240 seconds]
piotrj_ has quit [Ping timeout: 240 seconds]
_br__ has joined #ruby
piotrj has joined #ruby
<ivanskie> when I include a Class within a Module, does that Class then extends the module?
jusa has quit [Ping timeout: 246 seconds]
milardovich has quit [Remote host closed the connection]
<apeiros> ivanskie: you can't include a class
<ivanskie> hm
<apeiros> do you mean "nest a class within a module"? as in: "module Foo; class Bar; …"?
<ivanskie> i think so.
<apeiros> no. nesting does not affect class hierarchy.
<apeiros> all it affects is constant lookup (both, how constants within Bar are looked up, and how Bar is looked up, the absolute "path" being ::Foo::Bar)
<ivanskie> i should probably upload it to github
Rodya_ has quit [Ping timeout: 246 seconds]
my123 has joined #ruby
my123 has joined #ruby
Olipro has joined #ruby
milardov_ has joined #ruby
centrx has quit [Remote host closed the connection]
<apeiros> I'm not around for too much longer, though (but there are probably others around)
N0ATN has quit [Quit: ZNC 1.7.x-git-775-96c92ef8 - https://znc.in]
N0ATN has joined #ruby
arup_r has quit []
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has quit [Ping timeout: 258 seconds]
tvw has quit []
<apeiros> ivanskie: before I go, just to clear up your terminology:
mjuszczak has joined #ruby
<apeiros> class Foo; extend SomeModule; end # extending in ruby, also works with any object: some_obj.extend SomeModule
millerti has joined #ruby
<apeiros> class Foo; include SomeModule; end # including in ruby, only works with classes and modules, though the way it works with modules is sleightly weird
<apeiros> class Foo < SomeClass; end # inheriting in ruby (NOT called extending, mind you!)
<apeiros> module Foo; class Bar; end; end # nesting in ruby, makes the class available as Foo::Bar, also works with classes as namespace: class Foo; class Bar; end; end
brent__ has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> extend/include both only accept modules as argument (extend/include are methods, Object#extend and Module#include)
brent___ has joined #ruby
prubini87 has quit [Read error: Connection reset by peer]
brent___ has quit [Remote host closed the connection]
brent___ has joined #ruby
prubini87 has joined #ruby
felltir has joined #ruby
dunk_ is now known as dunk
brent__ has quit [Ping timeout: 260 seconds]
raul782 has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
workmad3_ has joined #ruby
ecuanaso has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
prubini87 has quit [Read error: Connection reset by peer]
jcao219 has joined #ruby
hutch34 has joined #ruby
prubini87 has joined #ruby
bkxd has joined #ruby
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdsampayo has joined #ruby
omab has quit [Ping timeout: 246 seconds]
raul782 has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 246 seconds]
im0nde has quit [Quit: im0nde]
itaipu has joined #ruby
ledestin has joined #ruby
im0nde has joined #ruby
mathys has quit [Quit: Leaving]
mjuszczak has quit []
prubini87 has quit [Read error: Connection reset by peer]
nertzy has joined #ruby
Rutix has quit []
prubini87 has joined #ruby
<ivanskie> so originally i just had one set of files config.yml, devices.csv and one app.rb file.. reading config, list of devices, downloading all files. now i have multiple sites to do this for, from the same code. so instead of just copying the folder with the app, i decided to make it more complicated and have a folder with site.yml and site.csv, and for code to read each and download for each site. https://gist.github.com/i5okie/fed889b444d
<ivanskie> but this is the most complex Ruby project i've worked on to date (outside of rails apps). i don't HAVE to do it, but i challenged myself.
Rutix has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
<ivanskie> and now trying to figure out how to execute.
milardov_ has quit [Remote host closed the connection]
ozcanesen has quit [Quit: Textual IRC Client: www.textualapp.com]
gothicsouth has joined #ruby
prubini87 has quit [Read error: Connection reset by peer]
mjuszczak has joined #ruby
jdsampayo has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<Radar> What is this?
prubini87 has joined #ruby
<Radar> What are those?
<Radar> Is this psuedo-code?
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Pumukel has quit [Ping timeout: 255 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
<Radar> Each device, or each site?
AndBobsYourUncle has joined #ruby
hobodave has joined #ruby
prubini87 has quit [Read error: Connection reset by peer]
raul782 has joined #ruby
hobodave has quit [Client Quit]
prubini87 has joined #ruby
cschneid_ has quit [Remote host closed the connection]
Otti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
LastWhisper____ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
prubini87 has quit [Read error: Connection reset by peer]
Rodya_ has joined #ruby
prubini87 has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
itaipu has quit [Ping timeout: 260 seconds]
<ivanskie> sorry didn't notice u were saying stuff
Rodya_ has quit [Ping timeout: 245 seconds]
<ivanskie> have to connect to each device.
<ivanskie> and uhm thats just high overview. not actual code.
<ivanskie> . represents methods and : variables
mesamoo has quit [Ping timeout: 268 seconds]
<ivanskie> i was going to upload code to github but then started working on this, and if I upload now it won't make any sense to anyone
prubini87 has quit [Read error: Connection reset by peer]
mjuszczak has quit []
prubini87 has joined #ruby
RobertBirnie has quit [Quit: Textual IRC Client: www.textualapp.com]
<ivanskie> expanding the app to reading multiple site config files and csv files using modules and classes, is probably overkill. but i was considering making this a sinatra app or a Gem in the future.
kirun has quit [Quit: Konversation terminated!]
ddffg has quit [Ping timeout: 260 seconds]
eb0t has joined #ruby
prubini87 has quit [Read error: Connection reset by peer]
def_jam has joined #ruby
Uranio has joined #ruby
Uranio has left #ruby [#ruby]
prubini87 has joined #ruby
eblip has quit [Ping timeout: 255 seconds]
eb0t_ has quit [Ping timeout: 260 seconds]
raul782 has quit [Remote host closed the connection]
cschneid_ has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.8]
bkxd has joined #ruby
<ivanskie> this is the code that only reads single config and .csv file: https://github.com/i5okie/pxgMapFetcher that i'm trying to expand to multi-site.. etc
patarr_ has quit [Ping timeout: 240 seconds]
cschneid_ has quit [Ping timeout: 260 seconds]
Olipro has quit [Ping timeout: 260 seconds]
nunchuck has quit [Ping timeout: 240 seconds]
felltir has quit []
felltir has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
ivanskie has quit [Quit: Page closed]
poloych has joined #ruby
poloych has quit [Remote host closed the connection]
poloych has joined #ruby
prubini87 has quit [Read error: Connection reset by peer]
prubini87 has joined #ruby
cfec0b8d has quit [Remote host closed the connection]
prubini87 has quit [Read error: Connection reset by peer]
alveric1 has joined #ruby
gnufied has quit [Ping timeout: 246 seconds]
alveric4 has quit [Ping timeout: 246 seconds]
zipace has quit [Ping timeout: 246 seconds]