havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.3, 2.4.5, 2.3.8, 2.6.0-preview3: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
<sputnik13> I'm assuming the latter, i.e. I can store the https instance as a member variable and reuse it
<sputnik13> but again, not terribly familiar with ruby so :(
<al2o3-cr> sputnik13: sure, it's just a socket underneath.
<Scriptonaut> hey all, I need help from some of you old ruby devs. I am working on an ancient ruby app, in 1.8.7. There is some kind of change that happened to strings in 1.9.3. I am using a library that was built for 2.4 or something relatively new, but when I run the code with the 1.8.7 interpreter, I get an encoding exception, specifically this: 'Exception encountered: undefined method `encoding' for "INFO VER RUBY
<Scriptonaut> 1.0.104b":String'
<Scriptonaut> could someone help me understand the encoding exceptions that happen from running this code through a 1.8.7 interpreter?
<Scriptonaut> this is the line that causes the exception: send_command "INFO VER RUBY #{@@VERSION}.#{@@BUILD}"
<Scriptonaut> here is the send_command method: https://gist.github.com/robins35/a2f6059fee2b4170ae626d7704b36ced
sanscoeur has quit [Ping timeout: 268 seconds]
ellcs has joined #ruby
<al2o3-cr> Scriptonaut: it does say undefined method `encoding'. 1.8.7 doesn't have String#encoding.
<Scriptonaut> oh, it's because I'm calling if !command.encoding.ascii_compatible?
<Scriptonaut> I wonder if I can get rid of that check
<al2o3-cr> tias.
lxsameer has quit [Ping timeout: 250 seconds]
<al2o3-cr> Scriptonaut: years back iconv wsa use for encoding.
<al2o3-cr> *was
<al2o3-cr> *used
DigitallyBorn has joined #ruby
ansraliant has joined #ruby
<al2o3-cr> command.encoding.name != 'UTF-8' is redundant in 1.8.7
<Scriptonaut> ya, I'm confused by this code, I'm not sure why encoding should matter at all. It seems to be using a string with class variables interpolated in it. Class variables that don't change, so it's essentially a string literal. Why would they need to check the encoding? Oh well, thanks for pointing me in the right direction
<Scriptonaut> ya
<al2o3-cr> 1.8.7 was bytes not encodes.
DigitallyBorn has quit [Ping timeout: 246 seconds]
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nchambers has joined #ruby
<Scriptonaut> sweet it's working now, thanks
<Radar> "I am working on an ancient ruby app, in 1.8.7" <- holy moly
<Radar> That belongs in a museum!
<Scriptonaut> haha, foreal
<Scriptonaut> I can't even put into words how messed up this app is
<Scriptonaut> you would all die inside if you saw it
<Radar> A tomb recently unearthed in Egypt has hieroglyphics that were only decoded this week: RUBY_VERSION == 1.8.7
<Radar> That is how old your app is 😂
<Scriptonaut> it's like the original dev gutted ruby on rails 2.0 (or possibly even older), and pulled those libraries into a few directories in the project. Then the backend server is handled by asp (not .NET, legacy asp), by sending the requests to a VM running windows 95
<Radar> Scriptonaut: It would be... educational!
<Scriptonaut> haha
<Scriptonaut> also there is Java and PHP on the backend
<Radar> Scriptonaut: You're getting paid for this, yeah?
<Scriptonaut> no idea how it works, it has two databases, a really nice postgresql db, and a microsoft SQL db (running on that windows 95 VM)
<Scriptonaut> ya, getting paid pretty well, otherwise I would have *not* agreed to this
<Scriptonaut> it's painful
<al2o3-cr> this gets worse!
sputnik13 has quit [Quit: Textual IRC Client: www.textualapp.com]
<mroutis_> is there a better way to write this? >>> 'A..A..'.gsub(/A(\.+)A/) { |x| x.gsub('.', 'A') }
<Radar> Scriptonaut: Hearing stories like this makes me wonder at what it's going to be like in like 10 or 20 years time when the world has _even more_ legacy software. We have ways and means of assessing and repairing collapsing buildings, bridges / etc. But we don't seem to have a clear way of assessing software quality in the same way. Pieces don't fall off software, usually. So I wonder how we'll handle this into the future.
<Scriptonaut> why are you calling gsub twice on it mroutis_
<mroutis_> what I want is to convert the dots between two letters into the letter that wraps them, just if the letter is the same
<mroutis_> Scriptonaut: because I couldn't find the regex expression to do it on a single gsub :c
<Scriptonaut> oh, that's more complicated, I'm not sure
<Scriptonaut> Radar: ya
<mroutis_> also, another non-regex solution would be awesome
<Scriptonaut> I mean I'm sure it can be way worse, apparently there is *a lot* of COBOL code out there
<Scriptonaut> it used to be the number one business language
<Scriptonaut> COBOL programmers are needed to maintain the gigantic legacy codebases, and a lot of them start at 1/4 million $ a year apparently
<nchambers> Radar: I'm sure people will still be supporting legacy COBOL codebases by then
<Radar> &>> 'A..A..'.gsub(/A(\.+)A/) { |x| x.gsub('.', 'A') }
<rubydoc> # => "AAAA.." (https://carc.in/#/r/5iv4)
<mroutis_> thanks, Radar, I thought it was >>>
<Radar> mroutis_: usually >> but ruby[bot] is failing
TheDracle has quit [Ping timeout: 246 seconds]
elcontrastador has joined #ruby
eckhardt_ has joined #ruby
<Radar> I can't think of a clean way to do that.
<Radar> A slightly shorter way is using tr
<Radar> &>> 'A..A..'.gsub(/A(\.+)A/) { |x| x.tr('.', 'A') }
<rubydoc> # => "AAAA.." (https://carc.in/#/r/5iv7)
<Scriptonaut> instead of using the first gsub I would probably just use a regexp
<Scriptonaut> and then based on the match data do something
<Scriptonaut> to make it a bit more clear
<Scriptonaut> the first gsub isn't really doing much
<Radar> What do you mean? It's doing everything. Without it, the replacement wouldn't happen
<Scriptonaut> the first gsub is more about detecting the patter
<Scriptonaut> pattern
<Scriptonaut> then it passes it so the second gsub
<Radar> Yes, but then the block for that first gsub is replacing it
<Scriptonaut> and the actual replacement happens there
<Scriptonaut> ya
<Scriptonaut> but he hardcoded those 'A' in there
<Scriptonaut> if he needs to do that for any character, it will get more tricky
<Scriptonaut> because that gsub block only takes the outermost match
<jidar> is there a nice way of doing two arrays intersections but with include? rather then exact matches?
smutnysyn has quit [Quit: WeeChat 2.2]
<Scriptonaut> I figured out a way to do it
queip has quit [Read error: Connection reset by peer]
<Scriptonaut> not sure if better
<Scriptonaut> but it will work on any letter
<mroutis_> Scriptonaut: any letter is fine!
<Scriptonaut> &>> 'A..A..'.gsub(/(\w)(\.+)(\w)/) { Regexp.last_match[0].gsub('.', Regexp.last_match[1]) }
<rubydoc> # => "AAAA.." (https://carc.in/#/r/5iv8)
<Scriptonaut> &>> 'B..B..'.gsub(/(\w)(\.+)(\w)/) { Regexp.last_match[0].gsub('.', Regexp.last_match[1]) }
<rubydoc> # => "BBBB.." (https://carc.in/#/r/5iv9)
<Scriptonaut> oh wait my solution isn't complete
<Scriptonaut> &>> 'A..B..'.gsub(/(\w)(\.+)(\w)/) { Regexp.last_match[0].gsub('.', Regexp.last_match[1]) }
<rubydoc> # => "AAAB.." (https://carc.in/#/r/5iva)
<Scriptonaut> :(
ellcs has quit [Ping timeout: 252 seconds]
<Scriptonaut> ok I figured it out
<Scriptonaut> &>> 'A..A..'.gsub(/(\w)(\.+)(\w)/) { Regexp.last_match[1] == Regexp.last_match[3] ? Regexp.last_match[0].gsub('.', Regexp.last_match[1]) : Regexp.last_match[0] }
<rubydoc> # => "AAAA.." (https://carc.in/#/r/5ivb)
<mroutis_> Scriptonaut: you can use $1 instead of `Regexp.last_match`
<Scriptonaut> I knew there was an easier way haha
AJA4350 has quit [Ping timeout: 240 seconds]
DigitallyBorn has joined #ruby
<al2o3-cr> mroutis_: $~
AJA4350 has joined #ruby
<Scriptonaut> too bad there's no shorthand for Regexp.last_match[0]
<al2o3-cr> Scriptonaut: $~[0]
<al2o3-cr> mroutis_: i *see* what you mean.
<mroutis_> al2o3-cr: I tried, but it doesn't work as expected ($1, $2, you know)
<al2o3-cr> Scriptonaut: $~ if you want the matchdata object or $1 if the match string.
<Scriptonaut> &>> 'A..A..'.gsub(/(\w)(\.+)(\w)/) { $~[1] == $~[3] ? $~[0].gsub('.', $~[1]) : $~[0] }
<rubydoc> # => "AAAA.." (https://carc.in/#/r/5ivc)
<Scriptonaut> &>> 'Z..A..'.gsub(/(\w)(\.+)(\w)/) { $~[1] == $~[3] ? $~[0].gsub('.', $~[1]) : $~[0] }
<rubydoc> # => "Z..A.." (https://carc.in/#/r/5ivd)
DigitallyBorn has quit [Ping timeout: 244 seconds]
<Scriptonaut> &>> 'Z..Z..A..A..'.gsub(/(\w)(\.+)(\w)/) { $~[1] == $~[3] ? $~[0].gsub('.', $~[1]) : $~[0] }
<rubydoc> # => "ZZZZ..AAAA.." (https://carc.in/#/r/5ive)
<Scriptonaut> there ^^
<Scriptonaut> thanks al2o3-cr
* Radar finds a bucket
<Radar> Scriptonaut: Did you take this code from your 1.8.7 app?
<Scriptonaut> the regexp stuff?
<Radar> it's gross :P
<Scriptonaut> no I just typed it in my console, but it is running in 1.8.7
<Scriptonaut> it was pretty gross to begin with
<Scriptonaut> I would probably just write a method for this
queip has joined #ruby
<Radar> 'A..A..'.gsub(/A(\.+)A/) { |x| x.tr('.', 'A') } <- I like mine
<Radar> It's easy enough to read
<Scriptonaut> yours isn't the actual solution
<Scriptonaut> it only works with A
<Scriptonaut> it has to work with any character
<mroutis_> any letter ^
Exuma has joined #ruby
venmx has joined #ruby
safetypin has joined #ruby
DigitallyBorn has joined #ruby
<ivanskie> trying to write a script to download gist file. supply gist url (without the raw url).. it scans the page for raw url. then tries to download the raw file.
<ivanskie> now for some reason i cannot make it give me the contents. i don't understand
sgen has joined #ruby
<orbyt_> Why not just use the API?
<ivanskie> hmm
<Radar> Scriptonaut: ohhhhh right
DigitallyBorn has quit [Ping timeout: 268 seconds]
ellcs has joined #ruby
<ivanskie> can you get a gist without having an api key?
jcarl43 has quit [Quit: WeeChat 2.3]
<ivanskie> i can already get the `raw_url` https://developer.github.com/v3/gists/#get-a-single-gist
<Radar> ivanskie: y u no use GitHub's gem?
safetypin has quit [Quit: ZZZzzz…]
<ivanskie> im writing this to include in my own gem.. i'm trying not to have too many pre-reqs.
<ivanskie> i guess i could..
viaduct has joined #ruby
<ivanskie> i do want to add a little bit of git and github automation later on...
<Radar> Well this will help with the gist thing :) Rugged is what I've been using for git automation myself.
<ivanskie> but why would it return an empty string
<ivanskie> k
<ivanskie> thanks
<al2o3-cr> ivanskie: so download method just returns a string (the response body)?
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> i think they wanted File.open(foo, ?w) { |io| IO.copy_stream open(url), io }
AJA4350 has quit [Read error: Connection reset by peer]
<al2o3-cr> what host does this return? URI.parse "http://1.1.1.1&@8.8.4.4#@8.8.8.8/"
<al2o3-cr> &>> URI.parse("http://1.1.1.1&@8.8.4.4#@8.8.8.8/").host
<rubydoc> # => "8.8.4.4" (https://carc.in/#/r/5ivn)
<al2o3-cr> that is borked.
ellcs has quit [Ping timeout: 252 seconds]
tdy1 has quit [Ping timeout: 268 seconds]
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mroutis_ has quit [Read error: Connection reset by peer]
mroutis has joined #ruby
queip has quit [Read error: Connection reset by peer]
sgen has quit [Ping timeout: 268 seconds]
cmhobbs has joined #ruby
queip has joined #ruby
<cmhobbs> is there any sane way to put restrictions on Kernel#eval? at the moment, i've got a user providing a string containing boolean logic that looks something like "A && (B || C)" and i pass that to eval after some munging. i check to see if the string has && or || in it and won't run it if it doesn't but that still leaves room for abuse
<cmhobbs> any ideas?
<cmhobbs> i trust the user and they have to be behind several layers of security to use this
<cmhobbs> but it makes me nervous
<cmhobbs> one could still do something like "some_nasty_method || some_nasty_method"
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sgen has joined #ruby
mroutis has quit [Quit: leaving]
<al2o3-cr> cmhobbs: could you not use $SAFE = 1?
<al2o3-cr> or in a binding.
<cthulchu> folks, how do I connect my nginx to ruby backend if I don't wanna use a framework like rails?
<cthulchu> I also don't want to use CGI
safetypin has joined #ruby
safetypin has quit [Client Quit]
safetypin has joined #ruby
safetypin has quit [Quit: ZZZzzz…]
SCHAPiE has quit [Ping timeout: 244 seconds]
sgen has quit [Remote host closed the connection]
sgen has joined #ruby
ansraliant has quit [Quit: My planet needs me]
white_lilies has joined #ruby
SCHAPiE has joined #ruby
TheDracle has joined #ruby
sgen_ has joined #ruby
sgen has quit [Ping timeout: 272 seconds]
queip has quit [Read error: Connection reset by peer]
TheDracle has quit [Ping timeout: 252 seconds]
esrse has joined #ruby
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
millerti has quit [Ping timeout: 240 seconds]
<jidar> is there a nice way of doing two arrays intersections but with include? rather then exact matches?
<Radar> jidar: input and expected output please
esrse has quit [Ping timeout: 260 seconds]
<jidar> ["a1", "b1", "c1"] & ["a", "b"] # => ["a1", "b1"]
<jidar> Radar: ^
<Radar> jidar: I think zip + include would be your best bet:
<jidar> I'd like to write that somehow better than O(n^2) ie: ary1.each { ary2.each }
queip has joined #ruby
<Radar> sorry, zip + select
<Radar> &>> ["a1", "b1", "c1"].zip(["a", "b"]).select { |a, b| b && a.include?(b) }
<rubydoc> # => [["a1", "a"], ["b1", "b"]] (https://carc.in/#/r/5iwl)
<cmhobbs> al2o3-cr: $SAFE = 1 won't let me use require
<cmhobbs> so that's not going to fly
c0ncealed4 has quit [Remote host closed the connection]
<al2o3-cr> cmhobbs: then use it in a binding.
<cmhobbs> cthulchu: do you just want to proxy requests from nginx to your ruby script or are you saying you want a framework different than rails?
<cthulchu> the former
safetypin has joined #ruby
dviola has quit [Quit: WeeChat 2.3]
c0ncealed4 has joined #ruby
<cmhobbs> cthulchu: unicorn, puma, and raptor are all options for ruby webservers. you can proxy nginx to them. did you build your own webserver? i'm trying to understand the use case
<cmhobbs> al2o3-cr: i'll have to read up on that, thanks
<cthulchu> I don't want anything to do with web really
<al2o3-cr> cmhobbs: np, with ensure.
eblip has quit [Ping timeout: 272 seconds]
<cthulchu> nginx will do it for me
<cthulchu> all I want to do is to return a string to nginxz
<cthulchu> based on what nginx passed to me
<cmhobbs> you may still need a ruby webserver for that
<cmhobbs> if i understand it right, when nginx proxies a request, it hands off the full http request
roshanavand has quit [Read error: Connection timed out]
<cmhobbs> you;d have to process that and hand back a response as well
roshanavand has joined #ruby
tdy1 has joined #ruby
<cthulchu> interesting
<cthulchu> hm
<cthulchu> maybe...
<cmhobbs> unicorn is the least fancy of the three i mentioned
<cthulchu> maybe I could parse that request... manually...
<cmhobbs> check it out maybe
<cthulchu> as a string
<cthulchu> no, hm
<cmhobbs> for nginx, look up the docs on proxy_pass
<cmhobbs> you'll want to set proxy_pass to the location of your local listening server (ruby script)
<cmhobbs> and then set some headers for it
<cmhobbs> with proxy_set_header
<cthulchu> thanks :)
<cmhobbs> you still need to have something speaking tcp or using a socket to talk to nginx
<cmhobbs> yep
<cthulchu> ah
<cthulchu> okaym, socket sounds fine
<cthulchu> but I will need something rubbyish to listen to it...
<cthulchu> so ruby should run all the time
<cmhobbs> unicorn or puma should do that for you
<cmhobbs> s/should/can
<cthulchu> ok
<cmhobbs> they're both rack middleware http servers
<cthulchu> well then I don't need nginx
<cmhobbs> and there's tons of examples of using proxy_pass to talk to them via port or socket
<cmhobbs> eh, technically no
<cthulchu> right
<cmhobbs> but if you're going to have a lot of traffic, you'll want it
<cthulchu> nah, it's for internal use only
<cmhobbs> why use the web then?
JankyDoodle has joined #ruby
<cthulchu> I want to let anybody ability to the QA backend
bmurt has joined #ruby
<cthulchu> so that they could create and manipulate test accounts
<cmhobbs> thin is another option http://code.macournoyer.com/thin/
<cthulchu> mkay, gotta go. will look it up tomorrow, thanks
<cmhobbs> sure
sgen_ has quit [Ping timeout: 260 seconds]
tag has quit [Quit: Connection closed for inactivity]
eblip has joined #ruby
elphe has quit [Ping timeout: 245 seconds]
elphe has joined #ruby
safetypin has quit [Ping timeout: 264 seconds]
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
<jidar> Radar: I'm not sure that works quite the way it needs too, here is a working example (but in O(n^2)) : https://gist.github.com/a54397a044799a422f1ed0cfec918392
<jidar> at the end of the day, I'm simply trying to find a short hostname inside of a fqdn to see if they exist and then return that as an array
<jidar> I read over zip, I don't think that's doing what needs to be done imho
queip has quit [Read error: Connection reset by peer]
darkhanb has joined #ruby
Freshnuts has joined #ruby
Freshnuts has quit [Max SendQ exceeded]
queip has joined #ruby
Freshnuts has joined #ruby
mroutis has joined #ruby
Freshnuts has quit [Max SendQ exceeded]
Freshnuts has joined #ruby
thejs has joined #ruby
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
JankyDoodle has quit [Read error: Connection reset by peer]
thejs has quit [Quit: Leaving]
ur5us has quit [Remote host closed the connection]
ChatCodingLab has joined #ruby
<ChatCodingLab> Hi! I've been using Ruby for almost 6 years... now got a project wanted to have cross platform GUI... I'm fascinated with the output from the WxWidget but seems WxRuby is not being updated
<ChatCodingLab> Is there any where I can get the library for the WxRuby up to date with WxWidget?
<al2o3-cr> ChatCodingLab: isn't that hanmac lib?
<ChatCodingLab> hanmac?
<al2o3-cr> the maintainer
<al2o3-cr> i might be wrong tho.
roshanavand has quit [Ping timeout: 264 seconds]
<ChatCodingLab> Oh hanmac if really that I'm interested to know...
<ChatCodingLab> Probably can maintain together
<ChatCodingLab> But no sure what's the state now
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> ChatCodingLab: idk, but you might well hit him up.
<ruby[bot]> Iambchop: we in #ruby do not like irccloud.com, it has no syntax highlighting, distracting formatting and loads slowly for most. Please use https://gist.github.com
<Iambchop> nodes.select{|n| n.sub(/\.*\Z/,'').match(hosts.to_s)}
<Iambchop> ["agent01.localdomain", "agent02.localdomain"]
<ChatCodingLab> Thanks!
<jidar> > /\.*\Z/
* jidar groks
<jidar> no, that won't work either
<nchambers> what is \Z?
nickjj has quit [Read error: Connection reset by peer]
marz_d`ghostman has joined #ruby
<Iambchop> \Z end of whole string; $ end of any line
<marz_d`ghostman> https://gist.github.com/marzdgzmn/96b252c0d6c5b28271d7876cb9545ff0 How do I define a local variable for the given describe block. It appears the last declaration overrides all previous declarations of it.
<nchambers> ah
DigitallyBorn has joined #ruby
<Iambchop> jidar: upload some rspec or minitest showing desired inputs and outputs :-)
DigitallyBorn has quit [Ping timeout: 240 seconds]
<al2o3-cr> Iambchop: \Z Matches end of string. If string ends with a newline, it matches just before newline | \z Matches end of string
roshanavand has joined #ruby
ivanskie has joined #ruby
za1b1tsu has joined #ruby
<al2o3-cr> Iambchop: example.
<al2o3-cr> &>> ["foo\nbar\nbaz\n".match(/baz\Z/), "foo\nbar\nbaz\n".match(/baz\z/)]
<rubydoc> # => [#<MatchData "baz">, nil] (https://carc.in/#/r/5iyo)
esrse has joined #ruby
sarink has joined #ruby
<sarink> why is this validation not working how i expect? https://pastebin.com/wzm1fmSF
<ruby[bot]> sarink: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<al2o3-cr> sarink: what do you expect?
<sarink> i expect it to only validate "if: false", aka never
<sarink> am i misunderstanding something?
<sarink> validate that the scenario must exist*
<al2o3-cr> sarink: validate if false is a false negative? no?
akaiiro has quit [Remote host closed the connection]
sarink has left #ruby [#ruby]
<Iambchop> sarink: the docs show passing the param when using Proc.new, but not passing the param when using ->
mroutis has quit [Remote host closed the connection]
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Exuma has joined #ruby
MoritaShinobu has joined #ruby
shadeslayer has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
queip has quit [Read error: Connection reset by peer]
<al2o3-cr> Iambchop: that I is missing a good L with mint sauce =)
bihi has quit [Quit: Bye!]
queip has joined #ruby
akem has quit [Remote host closed the connection]
akem has joined #ruby
chouhoulis has quit [Ping timeout: 272 seconds]
solocshaw has joined #ruby
teej has quit [Ping timeout: 250 seconds]
jnix has quit [Ping timeout: 250 seconds]
Mutsuhito has quit [Ping timeout: 250 seconds]
goez has quit [Ping timeout: 276 seconds]
jmcgnh_ has joined #ruby
sparc has quit [Ping timeout: 250 seconds]
wmoxam has quit [Ping timeout: 276 seconds]
jp has quit [Ping timeout: 260 seconds]
yokel has quit [Ping timeout: 260 seconds]
Puffball has joined #ruby
sparc has joined #ruby
jnix has joined #ruby
ChatCodingLab has quit [Quit: This computer has gone to sleep]
Mutsuhito has joined #ruby
teej has joined #ruby
jmcgnh has quit [Ping timeout: 276 seconds]
wmoxam has joined #ruby
goez has joined #ruby
Inline has quit [Quit: Leaving]
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nertzy has quit [Quit: This computer has gone to sleep]
Exuma has joined #ruby
jp has joined #ruby
conta has joined #ruby
white_lilies has quit [Ping timeout: 244 seconds]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jmcgnh_ is now known as jmcgnh
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dnewkerk has joined #ruby
ivanskie has joined #ruby
solocshaw has quit [Quit: solocshaw]
orbyt_ has joined #ruby
Xiti has quit [Quit: Xiti]
orbyt_ has quit [Client Quit]
sauvin has joined #ruby
cxl has quit [Quit: bye]
queip has quit [Read error: Connection reset by peer]
TheDracle has joined #ruby
Xiti has joined #ruby
phaul has joined #ruby
sarink has joined #ruby
TheDracle has quit [Ping timeout: 245 seconds]
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
queip has joined #ruby
elphe has quit [Ping timeout: 245 seconds]
havenwood has quit [Quit: ZNC 1.7.1 - https://znc.in]
havenwood has joined #ruby
elphe has joined #ruby
ivanskie has quit [Ping timeout: 260 seconds]
Exuma has joined #ruby
elphe has quit [Ping timeout: 268 seconds]
elphe has joined #ruby
ansraliant has joined #ruby
elphe has quit [Ping timeout: 252 seconds]
MoritaShinobu has quit [Ping timeout: 268 seconds]
elphe has joined #ruby
awkwords_ has joined #ruby
elphe has quit [Ping timeout: 245 seconds]
MoritaShinobu has joined #ruby
<nchambers> is there a way to alias the name of a function, besides just wrapping another function around a call?
za1b1tsu has quit [Ping timeout: 252 seconds]
elphe has joined #ruby
queip has quit [Read error: Connection reset by peer]
<al2o3-cr> nchambers: how ya mean?
<nchambers> al2o3-cr: its not a big deal really, but internally in a class i want to refer to a function as get_complete_token (as opposed to its internal method get_token_piece), but externally want to expose it as just get
sarink has quit [Remote host closed the connection]
elphe has quit [Ping timeout: 268 seconds]
sarink has joined #ruby
<al2o3-cr> nchambers: functions you speak of are methods in ruby. that being, sending messages to obj.
<nchambers> erm, sorry yes, methods not functions
<al2o3-cr> nchambers: you can send any message to any obj.
<al2o3-cr> even private.
<nchambers> thats fine. im not trying to hide get_token_piece
<nchambers> get_complete_token just seems like it wouldn't make much sense outside the context of the class internals
sarink has quit [Read error: Connection reset by peer]
<al2o3-cr> nchambers: what do you want `get_token_peice` to do?
sarink has joined #ruby
<al2o3-cr> *piece
alehander42 has joined #ruby
<nchambers> "[1 2 3]" -> get_token_piece -> token [, token 1, ..., token ] -> get_complete_token -> list<1, 2, 3>
<nchambers> roughly
<al2o3-cr> nchambers: private methods are private to the a Module/Class
<nchambers> these are in a class called tokenizer
<alehander42> what is the idea of those new `>>` proc methods
<al2o3-cr> i'd make them private then.
<al2o3-cr> that method anyhow.
queip has joined #ruby
<al2o3-cr> alehander42: what?
venmx has quit [Ping timeout: 244 seconds]
sarink has quit [Remote host closed the connection]
<nchambers> al2o3-cr: sure, but what about exposing it publicly
<nchambers> i guess i could just always do def get\nself.get_complete_token\nend
<al2o3-cr> nchambers: use attr_* for reading and writing.
<alehander42> I read that `>>` is planned for use with `&:..` or something
<nchambers> ok
<al2o3-cr> nchambers: make private your methods not accessible API(as such) or any other class. state use; attr_* to r/w etc.
<alehander42> also what happens with ruby3
sarink has joined #ruby
<alehander42> and the typing ideas
<nchambers> al2o3-cr: really im just looking for how to give two names to the same function
<al2o3-cr> nchambers: why would you want to do that.
ansraliant has quit [Quit: My planet needs me]
<nchambers> the public function users call is Tokenizer.get, but inside the Tokenizer source code it makes more sense to be called get_complete_token
<nchambers> but they both do the same thing
<al2o3-cr> ?xy nchambers
<ruby[bot]> nchambers: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<nchambers> im not really trying to solve any problem
<nchambers> the method name is get_complete_token. that doesn't seem very nice to call externally, since externally you're only ever dealing with complete tokens
<nchambers> so it would be nice to call .get
<nchambers> internally however, the name makes perfect sense
<nchambers> im not sure how else to explain it
sarink has quit [Ping timeout: 252 seconds]
<al2o3-cr> yeah, not sure i'm following ;|
<al2o3-cr> nchambers: you got an example, i got 5 mins.
<nchambers> im probably just overthinking it :/
<nchambers> yeah ill whip one up
<al2o3-cr> ok.
<nchambers> not perfect ruby but hopefully it shows what i mean
<al2o3-cr> i see
<al2o3-cr> what is self.get_token_piece?
elphe has joined #ruby
<al2o3-cr> oh, nvm lol
<nchambers> if it helps im (re) writing a lisp
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nchambers> so get_token_piece might be something like (, foo, 1, 2, (, bar, 3, 4, ), and ), whereas get_complete_token would give (bar 3 4) (foo 1 2 result_of_bar)
<al2o3-cr> nchambers: do you know what self is?
Freshnuts has quit [Remote host closed the connection]
<nchambers> yeah
<al2o3-cr> i gotta go in a bout 5.
Freshnuts has joined #ruby
<al2o3-cr> what is self in class definition?
<nchambers> referring to the current object
<al2o3-cr> nchambers: so what is the current obj at class level?
<nchambers> tokenizer
yohji has joined #ruby
yohji has quit [Remote host closed the connection]
<al2o3-cr> what is self at get_complete_token?
<nchambers> still tokenizer
<al2o3-cr> no.
<nchambers> ?
<marz_d`ghostman> There is a bypass to simulate a failing command via (exit 1); is there anything that will make it output anything?
<nchambers> i can bug you about this tomorrow if its going to be lengthy
<nchambers> hate for you to be late for anything on my account
<havenwood> marz_d`ghostman: abort 'foo'
elphe has quit [Ping timeout: 250 seconds]
elphe_ has joined #ruby
<al2o3-cr> nchambers: give me couple of hours, i'll explain.
<nchambers> ok
<havenwood> marz_d`ghostman: Or say more about what you're wanting to do?
<al2o3-cr> need to go.
<marz_d`ghostman> havenwood: Oh, I'm trying to stub a command for rspec though
<nchambers> o/
<nchambers> thanks al2o3-cr
clemens3_ has joined #ruby
<marz_d`ghostman> havenwood: Like I want to feed a failing command that outputs to stderr to test if my code is handling it properly
cd has quit [Ping timeout: 256 seconds]
<havenwood> hrm
al2o3-cr has quit [Quit: WeeChat 2.3]
za1b1tsu has joined #ruby
cd has joined #ruby
<marz_d`ghostman> Guess I can feed it with (echo 'error' >&2; exit 1)
DigitallyBorn has joined #ruby
jmcgnh has quit [Read error: Connection reset by peer]
jmcgnh has joined #ruby
malen has joined #ruby
dnewkerk has quit [Quit: dnewkerk]
roshanavand has quit [Remote host closed the connection]
DigitallyBorn has quit [Ping timeout: 260 seconds]
roshanavand has joined #ruby
Nilium has quit [Ping timeout: 245 seconds]
Nilium has joined #ruby
alehander42 has quit []
alehander42 has joined #ruby
ellcs has joined #ruby
stoffus has joined #ruby
queip has quit [Read error: Connection reset by peer]
nchambers has quit [Quit: WeeChat 2.2]
ellcs has quit [Ping timeout: 264 seconds]
Burgestrand has joined #ruby
queip has joined #ruby
elphe_ has quit [Ping timeout: 264 seconds]
hiroaki has joined #ruby
jlebrech has joined #ruby
elphe has joined #ruby
Fernando-Basso has joined #ruby
venmx has joined #ruby
awkwords_ has quit [Quit: sleepy time]
lxsameer has joined #ruby
hiroaki has quit [Ping timeout: 272 seconds]
conta has quit [Ping timeout: 276 seconds]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
cd has quit [Quit: cd]
keden has joined #ruby
roshanavand has quit [Client Quit]
conta has joined #ruby
queip has quit [Read error: Connection reset by peer]
jlebrech has quit [Remote host closed the connection]
queip has joined #ruby
whysthatso has joined #ruby
elphe has quit [Ping timeout: 276 seconds]
esrse has quit [Ping timeout: 252 seconds]
ellcs has joined #ruby
havenwood has quit [Quit: ZNC 1.7.1 - https://znc.in]
Nilium has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
Nilium has joined #ruby
asphyxia has joined #ruby
asphyxia has quit [Quit: leaving]
asphyxia has joined #ruby
elphe has joined #ruby
elphe has quit [Ping timeout: 268 seconds]
voolik has joined #ruby
queip has quit [Read error: Connection reset by peer]
TheDracle has joined #ruby
TheDracle has quit [Ping timeout: 268 seconds]
conta has quit [Ping timeout: 240 seconds]
queip has joined #ruby
vonfry has joined #ruby
elphe has joined #ruby
nickjj has joined #ruby
apparition has joined #ruby
AJA4350 has joined #ruby
roshanavand has joined #ruby
BH23 has joined #ruby
ua_ has joined #ruby
ua has quit [Ping timeout: 246 seconds]
queip has quit [Read error: Connection reset by peer]
conta has joined #ruby
Freshnuts has quit [Quit: Leaving]
lomex has joined #ruby
queip has joined #ruby
za1b1tsu has quit [Ping timeout: 268 seconds]
DigitallyBorn has joined #ruby
vonfry1 has joined #ruby
DigitallyBorn has quit [Ping timeout: 246 seconds]
vonfry has quit [Ping timeout: 268 seconds]
Tempesta has quit [Remote host closed the connection]
conta has quit [Quit: conta]
vonfry1 has quit [Quit: WeeChat 2.2]
whysthatso has quit [Quit: whysthatso]
conta has joined #ruby
elphe has quit [Ping timeout: 246 seconds]
fredmorcos has joined #ruby
za1b1tsu has joined #ruby
BH23 has quit [Ping timeout: 250 seconds]
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<fredmorcos> hello, so this is my first time with ruby (i come from a systems programming background, but i know python well), what's the golden standard gems for building a RESTful API using Sinatra, including writing tests for it and interfacing with MongoDB?
za1b1tsu has quit [Ping timeout: 268 seconds]
kapil____ has joined #ruby
LinuxKnight has quit [Remote host closed the connection]
lomex has joined #ruby
LinuxKnight has joined #ruby
im0nde has quit [Ping timeout: 252 seconds]
elphe has joined #ruby
awkwords has joined #ruby
za1b1tsu has joined #ruby
whysthatso has joined #ruby
queip has quit [Read error: Connection reset by peer]
im0nde has joined #ruby
queip has joined #ruby
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
theartist has joined #ruby
<theartist> Hi guys! If i run 'gem install -V bundler' in my server (latest debian) it gets stuck and does nothing, but locally works flawlessly.
theartist is now known as Fr0stBit
<Fr0stBit> What could go wrong?
sheepman has quit [Ping timeout: 245 seconds]
bak1an has joined #ruby
<Fr0stBit> Nvm i found it, its a problem with the ipv6 servers of api.rubygems.org
Fr0stBit has left #ruby ["WeeChat 2.3"]
akem has quit [Quit: Leaving]
BH23 has joined #ruby
cow[moo] has joined #ruby
stoffus has quit [Ping timeout: 245 seconds]
stoffus has joined #ruby
wildermind has joined #ruby
<sagax> hi all!
<sagax> how to get schema declaration field for database in CouchDB?
<sagax> fields*
asphyxia has quit [Ping timeout: 272 seconds]
elphe has quit [Ping timeout: 272 seconds]
bmurt has joined #ruby
leitz has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
queip has quit [Read error: Connection reset by peer]
aufi has joined #ruby
jcalla has quit [Ping timeout: 268 seconds]
arup_r has joined #ruby
queip has joined #ruby
fredmorcos has quit [Remote host closed the connection]
za1b1tsu has quit [Ping timeout: 272 seconds]
Fernando-Basso has quit [Remote host closed the connection]
arup_r has quit [Read error: Connection reset by peer]
BH23 has quit [Ping timeout: 264 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
stoffus has quit [Quit: leaving]
Nicmavr has joined #ruby
leitz has quit [Quit: Leaving]
aufi has quit [Ping timeout: 240 seconds]
Burgestrand has quit [Quit: Closing time!]
chouhoulis has joined #ruby
vondruch_ has joined #ruby
edwardly has quit [Read error: Connection reset by peer]
arup_r has quit [Remote host closed the connection]
jlebrech has joined #ruby
<jlebrech> how do you permanently change indentation on vs code for ruby to 2 spaces?
arup_r has joined #ruby
vondruch has quit [Ping timeout: 268 seconds]
vondruch_ is now known as vondruch
arup_r_ has joined #ruby
TheDracle has joined #ruby
arup_r has quit [Ping timeout: 244 seconds]
edwardly has joined #ruby
arup_r_ has quit [Ping timeout: 252 seconds]
TheDracle has quit [Ping timeout: 250 seconds]
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Inline has joined #ruby
yokel has joined #ruby
chouhoulis has quit [Remote host closed the connection]
Guest24308 has quit [Ping timeout: 250 seconds]
altlock has joined #ruby
DigitallyBorn has joined #ruby
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
DigitallyBorn has quit [Ping timeout: 246 seconds]
bak1an has joined #ruby
<Inside> Heyo
<Inside> Any recommendations for a YAML schema validator?
<Inside> jlebrech: ctrl+,
<Inside> then you want "editor.insertSpaces:" true, "editor.tabSize": 2
<Inside> in your user settings
Rapture has joined #ruby
sgen_ has joined #ruby
habnabit has quit [Ping timeout: 250 seconds]
DigitallyBorn has joined #ruby
_habnabit has joined #ruby
apparition has quit [Quit: Bye]
jottr has joined #ruby
_habnabit has quit [Read error: Connection reset by peer]
_habnabit has joined #ruby
jlebrech has quit [Remote host closed the connection]
marz_d`ghostman has quit [Quit: Page closed]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
BH23 has joined #ruby
queip has quit [Read error: Connection reset by peer]
crankharder has joined #ruby
chouhoulis has joined #ruby
Exuma has joined #ruby
queip has joined #ruby
jlebrech has joined #ruby
<jlebrech> Inside: thanks :)
za1b1tsu has joined #ruby
keden has quit [Ping timeout: 272 seconds]
jottr has quit [Quit: WeeChat 2.2]
altlock has quit [Quit: altlock]
roshanavand has quit [Remote host closed the connection]
TheDracle has joined #ruby
keden has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
elphe has joined #ruby
akaiiro has joined #ruby
chouhoulis has quit [Remote host closed the connection]
za1b1tsu has quit [Read error: Connection reset by peer]
conta has quit [Ping timeout: 245 seconds]
roshanavand has joined #ruby
elphe has quit [Ping timeout: 252 seconds]
whysthatso has quit [Quit: whysthatso]
roshanavand has quit [Remote host closed the connection]
whysthatso has joined #ruby
Cork has quit [Quit: .]
za1b1tsu has joined #ruby
Cork has joined #ruby
za1b1tsu has quit [Ping timeout: 244 seconds]
DigitallyBorn has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
Cork has quit [Quit: .]
roshanavand has joined #ruby
dviola has joined #ruby
MoritaShinobu has quit [Quit: Leaving]
elphe has joined #ruby
ivanskie has joined #ruby
irdr has quit [Ping timeout: 246 seconds]
jcarl43 has joined #ruby
<ivanskie> radar you were right. it's way easier with octokit
irdr has joined #ruby
bheesham has quit [Quit: WeeChat 1.4]
sputnik13 has joined #ruby
bheesham has joined #ruby
sgen_ has quit [Ping timeout: 250 seconds]
queip has quit [Read error: Connection reset by peer]
jottr has joined #ruby
elphe has quit [Ping timeout: 260 seconds]
polishdub has joined #ruby
ellcs has quit [Ping timeout: 252 seconds]
queip has joined #ruby
Cork has joined #ruby
za1b1tsu has joined #ruby
akaiiro has quit [Ping timeout: 252 seconds]
DigitallyBorn has joined #ruby
sgen_ has joined #ruby
sgen_ has quit [Remote host closed the connection]
ss_much has quit [Quit: Connection closed for inactivity]
za1b1tsu has quit [Ping timeout: 252 seconds]
za1b1tsu has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akaiiro has joined #ruby
govg has joined #ruby
za1b1tsu has quit [Ping timeout: 244 seconds]
elphe has joined #ruby
za1b1tsu has joined #ruby
sarink has joined #ruby
sarink has quit [Remote host closed the connection]
elphe has quit [Ping timeout: 246 seconds]
yokel has quit [Ping timeout: 252 seconds]
conta has joined #ruby
jlebrech has quit [Remote host closed the connection]
yokel has joined #ruby
orbyt_ has joined #ruby
gregf_ has joined #ruby
whysthatso has quit [Quit: whysthatso]
phaul has quit [Ping timeout: 240 seconds]
darkhanb has joined #ruby
sameerynho has joined #ruby
conta has quit [Quit: conta]
gix has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
sarink has joined #ruby
elphe has joined #ruby
queip has quit [Read error: Connection reset by peer]
sarink has quit [Ping timeout: 272 seconds]
BH23 has quit [Ping timeout: 272 seconds]
za1b1tsu has quit [Ping timeout: 246 seconds]
elphe has quit [Ping timeout: 268 seconds]
whysthatso has joined #ruby
keden has quit [Quit: WeeChat 2.3]
elphe has joined #ruby
queip has joined #ruby
elphe has quit [Ping timeout: 268 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
Dbugger has joined #ruby
vondruch has quit [Ping timeout: 268 seconds]
eckhardt_ has joined #ruby
awkwords has quit [Quit: sleepy time]
gregf_ has quit [Ping timeout: 256 seconds]
elphe has joined #ruby
reber has joined #ruby
reber__ has joined #ruby
reber__ has quit [Remote host closed the connection]
conta has joined #ruby
elphe has quit [Ping timeout: 244 seconds]
voolik has quit [Ping timeout: 244 seconds]
jetchisel has quit [Ping timeout: 245 seconds]
rippa has joined #ruby
sarink has joined #ruby
jetchisel has joined #ruby
DigitallyBorn has quit [Ping timeout: 268 seconds]
sputnik13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clemens3_ has quit [Ping timeout: 264 seconds]
sarink has quit [Ping timeout: 240 seconds]
nchambers has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cd has joined #ruby
wildermind has quit [Quit: Connection closed for inactivity]
postmodern has joined #ruby
sputnik13 has joined #ruby
despai has joined #ruby
akaiiro has quit [Ping timeout: 244 seconds]
dviola has quit [Quit: WeeChat 2.3]
conta has quit [Quit: conta]
elphe has joined #ruby
Fernando-Basso has joined #ruby
despai has quit [Quit: ...]
bheesham has quit [Quit: WeeChat 1.4]
elphe has quit [Ping timeout: 240 seconds]
DigitallyBorn has joined #ruby
elphe has joined #ruby
beowuff has joined #ruby
renardiere has joined #ruby
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
sauvin has quit [Read error: Connection reset by peer]
nchambers has quit [Quit: WeeChat 2.2]
venmx has quit [Ping timeout: 252 seconds]
hiroaki has joined #ruby
orbyt_ has joined #ruby
TheBloke has joined #ruby
TheBloke has quit [Remote host closed the connection]
TheBloke has joined #ruby
matcouto has joined #ruby
DigitallyBorn has quit [Ping timeout: 264 seconds]
<ivanskie> is it possible to push `caller` when raising?
<ivanskie> i have a rescue of entire app .. uhm. basically a catch all. and caller for that is obviously its own file / line / col. and not the actual caller way deeper in the app.
<ivanskie> so im scratching my head. how do I handle errors/exceptions nicely, and still be able to have --trace argv so i can print a nice backtrace
matcouto has quit [Quit: This computer has gone to sleep]
Exuma has joined #ruby
bak1an has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
queip has quit [Read error: Connection reset by peer]
Exuma has quit [Client Quit]
phaul has joined #ruby
<dminuoso> ivanskie: I dont understand the question.
<dminuoso> Just return it?
<dminuoso> begin ... rescue StandardError => e; return e.backtrace; end
<ivanskie> like this
* dminuoso does not understand the question or the probilem
* dminuoso does not understand the question or the problem
<ivanskie> if i raise TTY::CLI::Error from anywhere in the application... the trace will be exe/teletype:15
<ivanskie> about two lines
<ivanskie> and not from where i called `raise`
<ivanskie> which is what i'd expect
sgen has joined #ruby
<ivanskie> but it's okay. I understand how this works now. i'll just have to put rescue block a lot close to raise
queip has joined #ruby
conta has joined #ruby
hiroaki has quit [Ping timeout: 240 seconds]
despai has joined #ruby
<phaul> hiya dminuoso
<phaul> what happened? you disappeared for a while
Exuma has joined #ruby
sanscoeur has joined #ruby
despai has quit [Quit: ...]
elphe has quit [Ping timeout: 268 seconds]
elphe has joined #ruby
DTZUZO has quit [Ping timeout: 268 seconds]
sputnik13 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reber has quit [Remote host closed the connection]
despai has joined #ruby
bmurt has joined #ruby
ur5us has joined #ruby
ur5us has quit [Client Quit]
dminuoso has left #ruby ["WeeChat 2.0.1"]
elphe has quit [Ping timeout: 276 seconds]
jackrandom has quit [Quit: ZNC - https://znc.in]
conta has quit [Quit: conta]
queip has quit [Read error: Connection reset by peer]
jackrandom has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
darkhanb has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
queip has joined #ruby
elphe has joined #ruby
matcouto has joined #ruby
matcouto has quit [Client Quit]
ausmat has joined #ruby
TheBloke has quit [Remote host closed the connection]
TheBloke has joined #ruby
nchambers has joined #ruby
roshanavand has quit [Remote host closed the connection]
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
roshanavand has joined #ruby
Dbugger has quit [Remote host closed the connection]
TheBloke has joined #ruby
GodFather_ has joined #ruby
sputnik13 has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
darkhanb has joined #ruby
ausmat has quit [Remote host closed the connection]
im0nde has quit [Quit: im0nde]
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Exuma has joined #ruby
ausmat has joined #ruby
<ivanskie> just noticed a bit of an annoying behaviour between TTY::File and TTY::Spinner
<ivanskie> if i start a spinner and then want to stop it After TTY::File stuff finished.. it no longer keeps track of that buffer and just prints new line after TTY::File finishes. :(
Fernando-Basso has quit [Read error: Connection reset by peer]
awkwords has joined #ruby
despai has quit [Ping timeout: 245 seconds]
queip has quit [Read error: Connection reset by peer]
sgen has quit [Read error: Connection reset by peer]
venmx has joined #ruby
queip has joined #ruby
sgen has joined #ruby
<ivanskie> I understand why.. but just annoying lol
sanscoeur has quit [Remote host closed the connection]
sanscoeur has joined #ruby
jottr has quit [Quit: WeeChat 2.2]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gnufied has quit [Remote host closed the connection]
Exuma has joined #ruby
Cthulu201 has quit [Read error: Connection reset by peer]
sgen has quit [Read error: Connection reset by peer]
despai has joined #ruby
ausmat has quit [Remote host closed the connection]
despai has quit [Client Quit]
sgen has joined #ruby
despai has joined #ruby
gigetoo has quit [Ping timeout: 264 seconds]
gigetoo has joined #ruby
ss_much has joined #ruby
cow[moo] has joined #ruby
<cjohnson> I'm pretty sure there's a way to write this in one line without calling the method twice, isn't there?
<cjohnson> foo = super
cow[moo] has quit [Client Quit]
<cjohnson> return foo if foo
blackmesa has joined #ruby
<nchambers> does `return foo if (foo = super)` work?
funnel has quit [Ping timeout: 268 seconds]
elphe has quit [Ping timeout: 240 seconds]
<nchambers> seems to work in https://clbin.com/khFjw (although i didn't test it with a class)
funnel has joined #ruby
Cthulu201 has joined #ruby
DigitallyBorn has joined #ruby
akaiiro has joined #ruby
polishdub has quit [Quit: leaving]
mochiyoda has joined #ruby
Azure has joined #ruby
DigitallyBorn has quit [Ping timeout: 245 seconds]
despai has quit [Ping timeout: 252 seconds]
queip has quit [Read error: Connection reset by peer]
<phaul> how about super.tap { |foo| return foo if foo }
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nchambers> what does .tap do?
<nchambers> i guess i can just google that actually
<phaul> &ri tap
<nchambers> ty
millerti has quit [Ping timeout: 268 seconds]
asphyxia has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
jcarl43 has quit [Quit: WeeChat 2.3]
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
queip has joined #ruby
ua_ has quit [Ping timeout: 272 seconds]
<phaul> or... super&.tap { |foo| return foo }
asphyxia has quit [Ping timeout: 244 seconds]
ua has joined #ruby
DigitallyBorn has joined #ruby
mroutis has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DigitallyBorn has quit [Ping timeout: 272 seconds]
RougeR has joined #ruby
jaddison has joined #ruby
elphe has joined #ruby
DigitallyBorn has joined #ruby
sameerynho has quit [Ping timeout: 268 seconds]
RougeR has quit [Read error: Connection reset by peer]
DigitallyBorn has quit [Ping timeout: 268 seconds]
whysthatso has left #ruby [#ruby]
whysthatso has joined #ruby
DigitallyBorn has joined #ruby
crankharder has quit [Ping timeout: 252 seconds]
DTZUZO has joined #ruby
rubydoc has quit [Ping timeout: 245 seconds]
cow[moo] has joined #ruby
DigitallyBorn has quit [Ping timeout: 246 seconds]
anyoen is now known as survival2k18
<ivanskie> piotr are you on here by any chance?
jetchisel has joined #ruby
<mroutis> ivanskie: piotr the mythical solnica?
<ivanskie> lol
<ivanskie> Piotr Murach
<ivanskie> he could be mythical... never know
renardiere has quit [Ping timeout: 244 seconds]
<ivanskie> He was just active on github. I have more questions about his other gems. not worth opening an issue
queip has quit [Read error: Connection reset by peer]
<ivanskie> by the way.. speaking of mythical people..
<ivanskie> anypne know https://github.com/zontik ?
armatechnicos has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
armatechnicos has quit [Client Quit]
cow[moo] has joined #ruby
rubydoc has joined #ruby
awkwords has quit [Quit: sleepy time]
nchambers has quit [Quit: WeeChat 2.2]
memo1 has joined #ruby
Fusl has quit [Ping timeout: 256 seconds]
oz has quit [Ping timeout: 252 seconds]
argoneus has quit [Quit: No Ping reply in 180 seconds.]
argoneus has joined #ruby
oz has joined #ruby
queip has joined #ruby
Fusl has joined #ruby
<phaul> &>> print [?\\, ?/] * ?o
<rubydoc> # => \o/nil (https://carc.in/#/r/5j4w)