baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: 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!
universa1 has quit [Read error: Connection reset by peer]
DarthGan- is now known as DarthGandalf
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
r29v has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.2]
apeiros has joined #ruby
Emmanuel_Chanel has joined #ruby
dbrandon has quit [Ping timeout: 272 seconds]
Puffball has quit [Remote host closed the connection]
bambanx has joined #ruby
apeiros has quit [Ping timeout: 272 seconds]
planigan_ has joined #ruby
Dabo_ has joined #ruby
bambanx has quit [*.net *.split]
patr0clus has quit [*.net *.split]
timmow has quit [*.net *.split]
exchgr` has quit [*.net *.split]
AndroidKitKat has quit [*.net *.split]
yo61 has quit [*.net *.split]
marius has quit [*.net *.split]
ArahaelPi has quit [*.net *.split]
erratic has quit [*.net *.split]
DTZUZU has quit [*.net *.split]
mr_rich101 has quit [*.net *.split]
cjkinni has quit [*.net *.split]
argoneus has quit [*.net *.split]
Apocalypse has quit [*.net *.split]
lightstalker has quit [*.net *.split]
syndikate has quit [*.net *.split]
alnewkirk has quit [*.net *.split]
AKPWD has quit [*.net *.split]
FrankyCyborg has quit [*.net *.split]
bauruine has quit [*.net *.split]
ruskie has quit [*.net *.split]
desnudopenguino has quit [*.net *.split]
woodruffw has quit [*.net *.split]
jyaworski has quit [*.net *.split]
kenichi has quit [*.net *.split]
ghoti has quit [*.net *.split]
SolarAquarion has quit [*.net *.split]
Junaos has quit [*.net *.split]
spectra has quit [*.net *.split]
haylon has quit [*.net *.split]
priodev has quit [*.net *.split]
livcd has quit [*.net *.split]
planigan has quit [*.net *.split]
irick has quit [*.net *.split]
Dabo has quit [*.net *.split]
stalactit has quit [*.net *.split]
Jamo has quit [*.net *.split]
freedrull has quit [*.net *.split]
Dabo_ is now known as Dabo
dinfuehr has quit [Ping timeout: 240 seconds]
zenspider has quit [Ping timeout: 240 seconds]
ruskie has joined #ruby
dinfuehr has joined #ruby
apeiros has joined #ruby
jp has joined #ruby
patr0clus has joined #ruby
yo61 has joined #ruby
Apocalypse has joined #ruby
cjkinni has joined #ruby
argoneus has joined #ruby
timmow has joined #ruby
AndroidKitKat has joined #ruby
marius has joined #ruby
mr_rich101 has joined #ruby
exchgr` has joined #ruby
DTZUZU has joined #ruby
syndikate has joined #ruby
ArahaelPi has joined #ruby
AKPWD has joined #ruby
FrankyCyborg has joined #ruby
alnewkirk has joined #ruby
lightstalker has joined #ruby
ghoti has joined #ruby
jyaworski has joined #ruby
kenichi has joined #ruby
woodruffw has joined #ruby
SolarAquarion has joined #ruby
irick has joined #ruby
Junaos has joined #ruby
spectra has joined #ruby
freedrull has joined #ruby
livcd has joined #ruby
haylon has joined #ruby
bauruine has joined #ruby
priodev has joined #ruby
DTZUZU has quit [Max SendQ exceeded]
herbmillerjr has quit [Quit: Konversation terminated!]
thinkpad has quit [Ping timeout: 257 seconds]
Exagone313 has quit [Ping timeout: 240 seconds]
axsuul has quit [Ping timeout: 240 seconds]
apeiros has quit [Ping timeout: 268 seconds]
thinkpad has joined #ruby
axsuul has joined #ruby
Exagone313 has joined #ruby
r29v has quit [Quit: r29v]
jackrandom has quit [Quit: ZNC - https://znc.in]
jackrandom has joined #ruby
cagomez has quit [Remote host closed the connection]
mroutis has quit [Ping timeout: 272 seconds]
bmurt has joined #ruby
hahuang65 has quit [Remote host closed the connection]
apeiros has joined #ruby
apeiros has quit [Ping timeout: 244 seconds]
blood has quit [Quit: Page closed]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
mrush has joined #ruby
apeiros has joined #ruby
akaiiro has joined #ruby
felltir has joined #ruby
apeiros has quit [Ping timeout: 260 seconds]
felltir has quit [Client Quit]
arescorpio has joined #ruby
cagomez has joined #ruby
alfiemax has joined #ruby
akaiiro has quit [Ping timeout: 244 seconds]
apeiros has joined #ruby
orbyt_ has joined #ruby
ogres has joined #ruby
patr0clus has quit [Quit: WeeChat 2.1]
apeiros has quit [Ping timeout: 248 seconds]
cagomez has quit [Remote host closed the connection]
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
apeiros has joined #ruby
<Radar> GOOD AFTERNOON
<havenwood> o/
kapil___ has joined #ruby
nicesignal has quit [Quit: WeeChat 1.4]
nicesignal has joined #ruby
r29v has joined #ruby
thy0_ has quit [Quit: TTFN]
alfiemax_ has joined #ruby
braincrash has quit [Quit: bye bye]
hahuang65 has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
braincrash has joined #ruby
Rootsudo has joined #ruby
gnufied has quit [Ping timeout: 240 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
akaiiro has joined #ruby
gigetoo has joined #ruby
mroutis has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drbrain has quit [Ping timeout: 248 seconds]
drbrain has joined #ruby
<dviola> good night
<mroutis> gn
orbyt_ has joined #ruby
r29v has quit [Quit: r29v]
tty has quit [Ping timeout: 240 seconds]
tty has joined #ruby
p4p0l0 has joined #ruby
mroutis has quit [Remote host closed the connection]
dellavg has joined #ruby
mojtaba has quit [Quit: Leaving.]
bmurt has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
arescorpio has quit [Quit: Leaving.]
nicesignal has quit [Quit: WeeChat 1.4]
nicesignal has joined #ruby
dbrandon has joined #ruby
mojtaba has joined #ruby
iMadper has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chrisseaton has quit [Quit: Connection closed for inactivity]
p4p0l0 has quit [Ping timeout: 244 seconds]
iMadper has quit [Remote host closed the connection]
iMadper has joined #ruby
Freshnuts has joined #ruby
mojtaba has quit [Quit: Leaving.]
akaiiro has quit [Ping timeout: 272 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ogres has quit [Quit: Connection closed for inactivity]
alfiemax_ has quit [Remote host closed the connection]
kapil___ has quit [Quit: Connection closed for inactivity]
mondz has quit [Ping timeout: 244 seconds]
reber has joined #ruby
sauvin has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
humam has quit [Quit: leaving]
alfiemax has joined #ruby
Inline has quit [Quit: Leaving]
rfoust has quit [Ping timeout: 240 seconds]
apeiros has quit [Remote host closed the connection]
mozzarel1 has joined #ruby
mozzarella has quit [Ping timeout: 272 seconds]
mozzarel1 is now known as mozzarella
howdoi has joined #ruby
apeiros has joined #ruby
apeiros has quit [Remote host closed the connection]
maxirater has joined #ruby
aupadhye has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
Tempesta has joined #ruby
Eiam_ has quit [Ping timeout: 240 seconds]
dviola has quit [Quit: WeeChat 2.2]
cabotto has joined #ruby
mike11 has joined #ruby
conta has joined #ruby
gnufied has joined #ruby
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gnufied has quit [Ping timeout: 260 seconds]
konsolebox has quit [Ping timeout: 256 seconds]
maxirater has quit [Quit: Konversation terminated!]
aufi has joined #ruby
alfiemax has quit [Read error: Connection reset by peer]
Dbugger has joined #ruby
aufi_ has joined #ruby
clemens3 has joined #ruby
aufi has quit [Ping timeout: 240 seconds]
schneider has joined #ruby
mike11 has quit [Ping timeout: 256 seconds]
Burgestrand has joined #ruby
dionysus69 has joined #ruby
Rootsudo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doubledup has joined #ruby
rfoust has joined #ruby
cabotto has quit [Remote host closed the connection]
mike11 has joined #ruby
rfoust has quit [Ping timeout: 248 seconds]
ferhaty has joined #ruby
Burgestrand has quit [Quit: Closing time!]
maufart__ has joined #ruby
alfiemax has joined #ruby
aufi_ has quit [Ping timeout: 244 seconds]
cabotto has joined #ruby
cabotto has quit [Client Quit]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
schneider has quit [Ping timeout: 272 seconds]
Burgestrand has joined #ruby
za1b1tsu has joined #ruby
mikecmpbll has joined #ruby
tty has quit [Quit: tty]
za1b1tsu has quit [Client Quit]
mike11 has quit [Quit: Leaving.]
DoubleMalt has joined #ruby
DoubleMalt has quit [Read error: Connection reset by peer]
mojtaba has joined #ruby
<dionysus69> need help with god
<dionysus69> I am launching rake task with god and when I restart it, it gets duplicated, here's my file http://paste.debian.net/1037886/
<dionysus69> so when god terminates the old process, it gets restarted with # failsafe? or what's happening?
alfiemax has quit [Remote host closed the connection]
amelliaa has joined #ruby
lxsameer has joined #ruby
Rootsudo has joined #ruby
Beams has joined #ruby
Fr4n has joined #ruby
mike11 has joined #ruby
rfoust has joined #ruby
nowhere_man has joined #ruby
amelliaa has quit [Quit: -]
wildermind has joined #ruby
DTZUZO has quit [Ping timeout: 240 seconds]
t0xik has joined #ruby
t0xik is now known as t0x
kevinsjoberg has joined #ruby
Rootsudo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<t0x> ruby is awesome!
<dionysus69> btw, I resolved my problem, when I was running rake task, it would start with spring and start up not one but 4 processes, god would kill only one, so now I am launching without spring and all's good
shpoont has joined #ruby
conta has quit [Quit: conta]
postmodern_ has quit [Quit: Leaving]
ur5us has joined #ruby
Rootsudo has joined #ruby
mojtaba has quit [Quit: Leaving.]
Rootsudo has quit [Client Quit]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
discopatrick has joined #ruby
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
p4p0l0 has joined #ruby
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
mojtaba has joined #ruby
rfoust has quit [Ping timeout: 268 seconds]
TJ- has joined #ruby
psychicist__ has joined #ruby
apeiros has joined #ruby
p4p0l0 has quit [Ping timeout: 272 seconds]
Burgestrand has quit [Quit: Closing time!]
za1b1tsu has joined #ruby
iMadper has quit [Remote host closed the connection]
mojtaba has quit [Quit: Leaving.]
Freshnuts has quit [Quit: Leaving]
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
gnufied has joined #ruby
InfinityFye has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
ur5us has quit [Remote host closed the connection]
Burgestrand has joined #ruby
shpoont has quit [Quit: Textual IRC Client: www.textualapp.com]
bak1an has joined #ruby
bak1an has quit [Client Quit]
yokel has quit [Ping timeout: 272 seconds]
yokel has joined #ruby
gray_-_wolf has joined #ruby
bmurt has joined #ruby
koenrh has quit [Quit: Connection closed for inactivity]
Caius has quit [Quit: ""]
GodFather has quit [Ping timeout: 240 seconds]
mike11 has quit [Read error: Connection reset by peer]
GodFather has joined #ruby
p4p0l0 has joined #ruby
<Radar> more reasons why spring should be removed from the default gemfile
<Radar> causes so many headaches
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
savolla has joined #ruby
AJA4350 has joined #ruby
InfinityFye has quit [Ping timeout: 268 seconds]
p4p0l0 has quit [Ping timeout: 256 seconds]
TJ- has left #ruby ["WeeChat 1.9.1"]
psychicist__ has quit [Ping timeout: 272 seconds]
psychicist__ has joined #ruby
bmurt has joined #ruby
za1b1tsu has quit [Quit: WeeChat 2.1]
psychicist__ has quit [Ping timeout: 256 seconds]
t0x has quit [Quit: Connection closed for inactivity]
agent_white has quit [Ping timeout: 248 seconds]
vonfry has joined #ruby
vonfry has quit [Client Quit]
voiceftp has quit [Ping timeout: 240 seconds]
voiceftp has joined #ruby
voiceftp has quit [Read error: Connection reset by peer]
voiceftp has joined #ruby
voice_ftp has joined #ruby
voice_ftp has quit [Remote host closed the connection]
GodFather has quit [Ping timeout: 265 seconds]
Caius has joined #ruby
voiceftp has quit [Ping timeout: 268 seconds]
Burgestrand has quit [Quit: Closing time!]
gray_-_wolf has quit [Quit: WeeChat 2.2]
Caius has quit [Ping timeout: 244 seconds]
aupadhye has quit [Ping timeout: 240 seconds]
apeiros has quit []
Caius has joined #ruby
ferhaty has quit [Quit: ferhaty]
TheBloke has joined #ruby
Burgestrand has joined #ruby
aupadhye has joined #ruby
gheegh has quit [Quit: Textual IRC Client: www.textualapp.com]
<dionysus69> or configured in a way so it only starts for rails server
<dionysus69> I don't see why it would be used for console either, needs reload! anyway
apparition47 has joined #ruby
fmcgeough has joined #ruby
guzzlefry has joined #ruby
<guzzlefry> Not sure if someone is already aware, but www.ruby-lang.org is giving me a certificate error.
<guzzlefry> "The certificate is only valid for lists.ruby-lang.org."
ShekharReddy has joined #ruby
mnem is now known as mnemon
<darix> guzzlefry: works for me
nopolitica has joined #ruby
DTZUZO has joined #ruby
<guzzlefry> darix: Fails in both Firefox and Chrome.
<darix> guzzlefry: would be interesting which IP you see for www.r-l.o
<darix> host www.ruby-lang.org
<darix> dualstack.m.shared.global.fastly.net has IPv6 address 2a04:4e42:3::434
<darix> dualstack.m.shared.global.fastly.net has address 151.101.13.178
<darix> www.ruby-lang.org is an alias for dualstack.m.shared.global.fastly.net.
<guzzlefry> darix: http://dpaste.com/1PX07JB
<darix> interesting
akaiiro has joined #ruby
apeiros_ has joined #ruby
<darix> so 8.8.8.8 returns your list for me ... while 1.1.1.1 and my local resolvers only get my list
aupadhye has quit [Ping timeout: 240 seconds]
mojtaba has joined #ruby
Rapture has joined #ruby
aupadhye has joined #ruby
<dionysus69> how do I round numbers like 52.53466666 to 52.5347 without supplying argument to floor
ogres has joined #ruby
<apeiros_> a) floor is not rounding, b) you can't without an argument, that's why it accepts one after all
<havenwood> dionysus69: You rounded up. Was that a mistake?
<dionysus69> => BigDecimal("52.52966666").round
<dionysus69> that produces 53
<apeiros_> oy, indeed, missed the direction mistake.
<dionysus69> I just want to get rid of repeating 6666
* apeiros_ apeiros
<dionysus69> >> BigDecimal("52.52966666").round
<ruby[bot]> dionysus69: # => undefined method `BigDecimal' for main:Object (NoMethodError) ...check link for more (https://eval.in/1047531)
<havenwood> dionysus69: floor(5)
<havenwood> dionysus69: Say if you want to round or get the floor?
<dionysus69> but that's with the argument
<havenwood> dionysus69: what do arguments matter?
<dionysus69> I want to dynamically get rid of repeating digits
<havenwood> dionysus69: Aha.
<dionysus69> because repetition starts at an arbitrary precision
<apeiros_> that would have been an excellent lead for your question :-p
<dionysus69> so I can't predict what the precision will be
<havenwood> dionysus69: And you do want to round, not floor?
apeiros_ is now known as apeiros
<apeiros> dang, just noticed I typed /me instead of /nick before, lol
<dionysus69> doesn't matter : )
<dionysus69> round is fine
<dionysus69> >> require "bigdecimal"
<ruby[bot]> dionysus69: # => true (https://eval.in/1047532)
<dionysus69> >> BigDecimal("52.52966666").round
<ruby[bot]> dionysus69: # => undefined method `BigDecimal' for main:Object (NoMethodError) ...check link for more (https://eval.in/1047533)
<dionysus69> ok nvm
<apeiros> you don't have an eval session with the bot.
<apeiros> it's not like pry/irb. you have to run all required code in one line.
<dionysus69> aah
<dionysus69> >> require "bigdecimal"; BigDecimal("52.52966666").round
<ruby[bot]> dionysus69: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<dionysus69> :D
<apeiros> and that my friend is an error on eval.in's side (the service we use)
<dionysus69> oh ok
<dionysus69> not familiar with ruby[bot] that much yet :D
<apeiros> (well, to be precise, it's an error in the bot handling an error in eval.in - but the original problem is eval.in failing)
<apeiros> anyway, down the path of "I want to remove repeated digits" lie dragons.
<apeiros> whichever solution you'll use, you'll probably stumble over cases where it doesn't do what you want it to do.
alfiemax has joined #ruby
<apeiros> rounding to either a fixed number of digits after the period, or to a fixed precision is almost certainly the less troublesome way to go.
<apeiros> re dragons - 1/3 is 0.333…, right?
<apeiros> >> "%.50f" % (1/3.0)
<ruby[bot]> apeiros: # => "0.33333333333333331482961625624739099293947219848633" (https://eval.in/1047534)
<dionysus69> oh that's horrible number :D
<dionysus69> I ll just truncate, not that big of a deal
<apeiros> in other words: good luck figuring where your repeated digits start.
<dionysus69> :P I ll deal with it later then
<apeiros> well then, as said: good luck :-p
<dionysus69> thanks :)
<havenwood> dionysus69: s = '52.52966666'; index = s.partition('.').last =~ (/(.)\1/); s.to_f.round index.succ
<apeiros> :D
<dionysus69> havenwood: you are genius :D
<havenwood> Why did I put that Regexp in parens? :-O
* havenwood goes in search of coffee...
<dionysus69> thanks lots I ll put it in and observe ^.^
<apeiros> yeah, that needs coffee indeed havenwood - it's broken ;-p (missing anchor)
<apeiros> >> s = '52.529966666'; index = s.partition('.').last =~ (/(.)\1/); s.to_f.round index.succ
<ruby[bot]> apeiros: # => 52.53 (https://eval.in/1047538)
<apeiros> oh, well, though, given the "specification" given, it might actually be correct. you just round starting from the first repeated digit.
alfiemax_ has joined #ruby
gnufied has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 260 seconds]
Fr4n has quit [Read error: Connection reset by peer]
gnufied has joined #ruby
Fr4n has joined #ruby
gnufied has quit [Ping timeout: 256 seconds]
jottr has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
apeiros has quit [Read error: Connection reset by peer]
maufart__ has quit [Ping timeout: 272 seconds]
alfiemax has joined #ruby
Burgestrand has quit [Quit: Closing time!]
dionysus69 has quit [Ping timeout: 272 seconds]
apeiros has joined #ruby
Inline has joined #ruby
alfiemax_ has quit [Ping timeout: 272 seconds]
Xiti has quit [Quit: Xiti]
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aupadhye has quit [Ping timeout: 268 seconds]
marius has quit [Quit: baj]
gnufied has joined #ruby
apeiros has quit [Remote host closed the connection]
Xiti has joined #ruby
beowuff has joined #ruby
modin has quit [Read error: Connection reset by peer]
modin has joined #ruby
apeiros has joined #ruby
mustmodify has joined #ruby
mustmodify has left #ruby [#ruby]
justache has joined #ruby
apparition47 has quit [Quit: Bye]
oblak has quit [Read error: Connection reset by peer]
clemens3 has quit [Ping timeout: 240 seconds]
Rapture has joined #ruby
chouhoulis has joined #ruby
savolla has quit [Ping timeout: 240 seconds]
cagomez has joined #ruby
arup_r has joined #ruby
memo1 has joined #ruby
memo1 has quit [Client Quit]
[Butch] has joined #ruby
DTZUZU has joined #ruby
Fr4n has quit [Read error: Connection reset by peer]
Francisco has joined #ruby
akaiiro has quit [Remote host closed the connection]
rippa has joined #ruby
r29v has joined #ruby
p4p0l0 has joined #ruby
leah2 has quit [Ping timeout: 265 seconds]
leah2 has joined #ruby
jp has quit [Ping timeout: 268 seconds]
akaiiro has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
arup_r has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: inabit. zz.]
Beams has quit [Quit: .]
arup_r has joined #ruby
cagomez_ has joined #ruby
jmcgnh_ has joined #ruby
cagomez has quit [Ping timeout: 272 seconds]
jmcgnh has quit [Ping timeout: 240 seconds]
ogres has quit [Quit: Connection closed for inactivity]
arup_r has quit [Ping timeout: 248 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kapil___ has joined #ruby
arup_r has joined #ruby
jottr has joined #ruby
doubledup has quit [Remote host closed the connection]
p4p0l0 has quit [Remote host closed the connection]
arup_r has quit [Ping timeout: 244 seconds]
Ameisen has joined #ruby
<Ameisen> Hi there! Quick question - is there a proper/good way to call a function that returns something, but have separate behavior when it returns nil?
<Ameisen> somethign like var = function(foo).if_nil do_this_instead
beowuff has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
agent_white has joined #ruby
jp has joined #ruby
<ineb> var = function(foo) || do_this_instead
<Ameisen> Now, is there a way to get the "if nil" side to assign to the variable instead?
<Ameisen> I'm still presuming that || is equivalent to || in C++, in which case 'no'
<Ameisen> though then again the entire statement would make little sense in C++, since it would just assign true or false to var.
<ccooke> Ameisen: yes, that will assign to the variable
Nicmavr has quit [Read error: Connection reset by peer]
alex`` has joined #ruby
<Ameisen> ah
<Ameisen> so it isn't a true logical OR?
<ccooke> Ameisen: there are two things like it: 'or' and '||'. '||' has a higher precedence so binds to the expression function(foo), so:
<alex``> Hi
<alex``> What is the best recommandation when delegating named parameters?
<ccooke> var = function(foo) || 'x' is the equivalent of: var = ( function(foo) || 'x')
<alex``> I have a class OVHTelecomControl::Client < OVHApi::Client
Eiam has joined #ruby
<ccooke> Ameisen: wheras or binds more loosely - var = function(foo) or x is the equivalent of: (var = function(foo) or x
<Ameisen> ccooke - I usually use C++ (and Java at work), so I'm used to || being logical or, and in this case it would assign 'var' to true or false.
Nicmavr has joined #ruby
<alex``> Definiting my own?
<alex``> initialize(**parameters)
<alex``> or name them
<Ameisen> so the different syntax meaning and rules takes some getting used to
<ccooke> Ameisen: Indeed
<Ameisen> I mainly use ruby for scripts (usually converting bash or batch to ruby)
arup_r has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
chouhoulis has quit [Remote host closed the connection]
<Ameisen> though the fact that it has both begin/end and { } makes the code look odd.
Rootsudo has joined #ruby
<Ameisen> though I started using vscode as an IDE for it. Has a functional debugger.
<Ameisen> setting it up for Windows was a nightmare though.
nowhere_man has joined #ruby
<Ameisen> the plugins it requires presume a unix environment, but they don't build correctly under mingw, didn't try msys/cygwin.
<Ameisen> the gem that handles paths returns unix paths, which arne't understood if not going through a shell. Had to cygpath them.
Fr4n has joined #ruby
Francisco has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
orbyt_ has quit [Client Quit]
arup_r has quit []
<apeiros> alex``: do you specifically want to only delegate named arguments, or all?
jp has joined #ruby
<Ameisen> Is there a canonical way to handle arguments being passed to a command line in Ruby in regards to properly quoting them?
jottr has quit [Ping timeout: 240 seconds]
<apeiros> Ameisen: you mean you invoke a command from ruby? if you don't need shell stuff, use one of the forms which passes the args as an array and bypasses a subshell.
Fr4n has quit [Ping timeout: 240 seconds]
<apeiros> e.g. system or spawn
<Ameisen> true. I forgot about that.
Rootsudo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Ameisen> using the `` syntax and usch is just so convenient though
<Ameisen> IIRC, it doesn't take them as an array though - you have to splay the array to arguments
<Ameisen> splat*
<apeiros> `` does indeed only accept a string
chouhoulis has joined #ruby
orbyt_ has joined #ruby
cjkinni has quit [Quit: Ping timeout (120 seconds)]
Fr4n has joined #ruby
cjkinni has joined #ruby
mojtaba has quit [Quit: Leaving.]
<havenwood> >> Shellwords.escape 'bah humbug' # Ameisen
<ruby[bot]> havenwood: # => uninitialized constant Shellwords (NameError) ...check link for more (https://eval.in/1047594)
<havenwood> #=> "bah\\ humbug"
cjkinni has quit [Remote host closed the connection]
g- has quit [Quit: WeeChat 1.6]
uplime has quit [Ping timeout: 240 seconds]
ShekharReddy has quit [Quit: Connection closed for inactivity]
SeepingN has joined #ruby
armyriad has quit [Quit: Leaving]
tacoboy has joined #ruby
alfiemax has quit []
ellcs has joined #ruby
<havenwood> !xkcd 1421
lxsameer has quit [Ping timeout: 256 seconds]
sameerynho has joined #ruby
mojtaba has joined #ruby
Rootsudo has joined #ruby
ellcs has quit [Ping timeout: 265 seconds]
snickers has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<guzzlefry> >> 5 + "2"
<ruby[bot]> guzzlefry: # => String can't be coerced into Fixnum (TypeError) ...check link for more (https://eval.in/1047607)
<guzzlefry> >> "2" + 5
<ruby[bot]> guzzlefry: # => no implicit conversion of Fixnum into String (TypeError) ...check link for more (https://eval.in/1047608)
<guzzlefry> >> false == 0
<ruby[bot]> guzzlefry: # => false (https://eval.in/1047609)
<havenwood> guzzlefry: Coming from a loosely typed language?
<guzzlefry> havenwood: PHP, so kind of. I was actually seeing how similar the type system is to Python's.
<havenwood> guzzlefry: class Integer; alias add +; def + other; add other.to_i end end; 5 + "2" #=> 7
<guzzlefry> Lost me. :P
<havenwood> guzzlefry: Ruby is strictly typed, but you can always add loose typing yourself since it's quite flexible and you can modify core classes.
<guzzlefry> ah
<havenwood> guzzlefry: That ^ is just a very silly example of adding support for: 5 + "2"
s2013 has joined #ruby
<havenwood> guzzlefry: Likewise, if you wanted 0 to be false: class FalseClass; alias twoquals ==; def == other; return true if 0; twoquals other end end
<havenwood> false == 0 #=> true
<havenwood> guzzlefry: You'd definitely not want to do either of those. ;-P
<apeiros> shhhhh havenwood, it's weakly & strongly ;-)
<apeiros> now you make me look up whether strict typing exists too
<guzzlefry> Type systems are hard to categorize sometimes. >_>
<guzzlefry> >> 50 + 1.35
<ruby[bot]> guzzlefry: # => 51.35 (https://eval.in/1047612)
Rootsudo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rootsudo has joined #ruby
<Zarthus> I would heavily argue you should never do operator overloading (on existing things)
Rootsudo has quit [Client Quit]
<Zarthus> at least do it in a refinement if you must
lxsameer has joined #ruby
<havenwood> Zarthus: And you'd be right.
crova has joined #ruby
<Zarthus> i'm not surprised ruby allows it, but maybe a bit disappointed :P
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
Rootsudo has joined #ruby
Rootsudo has quit [Client Quit]
Rootsudo has joined #ruby
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
Rootsudo has quit [Client Quit]
Freshnuts has joined #ruby
<j0bk> > false == 0
<j0bk> => false
lxsameer has quit [Ping timeout: 240 seconds]
Freshnuts has quit [Remote host closed the connection]
akaiiro has quit [Ping timeout: 244 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Freshnuts has joined #ruby
lxsameer has joined #ruby
Yxhuvud has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
dviola has joined #ruby
solocshaw has joined #ruby
lxsameer has joined #ruby
jrich523 has joined #ruby
solocshaw has quit [Client Quit]
lxsameer has quit [Ping timeout: 248 seconds]
jcarl43 has joined #ruby
chouhoulis has joined #ruby
sauvin has quit [Remote host closed the connection]
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
akaiiro has joined #ruby
savolla has joined #ruby
lxsameer has joined #ruby
Freshnuts has quit [Quit: Leaving]
g- has joined #ruby
beowuff has joined #ruby
s2013 has joined #ruby
solocshaw has joined #ruby
lxsameer has quit [Ping timeout: 268 seconds]
solocshaw has quit [Client Quit]
lxsameer has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rapture has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
sanscoeur has quit [Read error: Connection reset by peer]
darix has quit [Quit: may the packets be with you...]
sanscoeur has joined #ruby
s2013 has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
lxsameer has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 260 seconds]
desnudopenguino has joined #ruby
synbyte has joined #ruby
lxsameer has joined #ruby
bmurt has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
fmcgeough has quit [Quit: fmcgeough]
discopatrick has quit [Quit: Connection closed for inactivity]
lxsameer has joined #ruby
alex`` has quit [Ping timeout: 260 seconds]
lxsameer has quit [Ping timeout: 244 seconds]
armu has joined #ruby
<armu> need help rebuilding small python project in any language $500 budget DM me
baweaver is now known as lemur
lemur is now known as baweaver
dellavg has quit [Ping timeout: 256 seconds]
<havenwood> armu: You might get more responses if you can say some details up front.
movlw has joined #ruby
[Butch] has joined #ruby
movlw has left #ruby [#ruby]
<armu> i need to rebuild https://github.com/HuangFJ/pyeth/blob/master/send_ping.py this application it can be in any language as long as it works, it only needs to do the job in the python file im linking to, any other use of the pyeth project is not needed and the only reason i want to rebuild it is because the project is not working on all computers properly
tdy has joined #ruby
lxsameer has joined #ruby
<apeiros> armu: uh, IPs and keys in a public gist? that seems unsafe…
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ohcibi has joined #ruby
lxsameer has joined #ruby
mondz has joined #ruby
alex`` has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
guzzlefry has left #ruby ["Leaving"]
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
lxsameer has joined #ruby
mojtaba has quit [Remote host closed the connection]
dionysus69 has joined #ruby
brendan- has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
postmodern has joined #ruby
t0x has joined #ruby
lxsameer has joined #ruby
bmurt has joined #ruby
s2013 has joined #ruby
lxsameer has quit [Ping timeout: 244 seconds]
<havenwood> I was surprised to see a while back that the Etherium gem was using my pure Ruby SHA3 gem.
lxsameer has joined #ruby
darix has joined #ruby
mojtaba has joined #ruby
lxsameer has quit [Ping timeout: 272 seconds]
c0ncealed2 has quit [Remote host closed the connection]
jmcgnh_ is now known as jmcgnh
c0ncealed2 has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 256 seconds]
savolla has quit [Remote host closed the connection]
jottr has joined #ruby
akaiiro has quit [Ping timeout: 244 seconds]
tolerablyjake has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brendan- has quit [Quit: Textual IRC Client: www.textualapp.com]
jottr has quit [Ping timeout: 260 seconds]
jayjo has joined #ruby
jottr has joined #ruby
tty has joined #ruby
<desnudopenguino> havenwood: nice!
dviola has quit [Quit: WeeChat 2.2]
<jayjo> what does the line `{ |e| e.include?(Gitlab::RequestContext.client_ip) }` do? I'm looking in Gitlab trying to figure out why an IP address is not whitelisted. I get the error that it's not a valid IP. Is the error trying to construct an ip address out of what rails sees or from the config?
<jayjo> the :new part
sriehl has quit [Quit: ZNC 1.7.1 - https://znc.in]
sriehl has joined #ruby
mikecmpbll has joined #ruby
rfoust has joined #ruby
<desnudopenguino> jayjo: are you running it locally/on your own hardware?
jottr has quit [Ping timeout: 256 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mikecmpbll has quit [Quit: inabit. zz.]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
rfoust has quit [Quit: Textual IRC Client: www.textualapp.com]
chouhoulis has quit [Ping timeout: 272 seconds]
c0ncealed2 has quit [Remote host closed the connection]
c0ncealed2 has joined #ruby
mikecmpbll has joined #ruby
ellcs has joined #ruby
Dbugger has quit [Ping timeout: 240 seconds]
lypsis has quit [Quit: ZNC - http://znc.in]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
mroutis has joined #ruby
alex`` has quit [Ping timeout: 272 seconds]
zenspider has joined #ruby
ur5us has joined #ruby
evdubs has joined #ruby
ur5us has quit [Remote host closed the connection]
crova has quit [Quit: Leaving]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
jhass has quit [Ping timeout: 255 seconds]
mroutis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
ur5us has joined #ruby
lxsameer has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
nowhere_man has quit [Ping timeout: 268 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
<zenspider> rawr
lxsameer has quit [Ping timeout: 256 seconds]
t0x has quit [Quit: Connection closed for inactivity]
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lypsis has joined #ruby
ryu- has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rootsudo has joined #ruby
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
jcarl43 has quit [Quit: WeeChat 2.2]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
AJA4350 has quit [Quit: AJA4350]
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
gix has quit [Quit: Client exiting]
ellcs has quit [Ping timeout: 240 seconds]
cliluw has quit [Read error: Connection reset by peer]
cliluw has joined #ruby
jasmith has quit [Quit: Leaving]
akaiiro has joined #ruby
DarthGandalf has quit [Remote host closed the connection]
DarthGandalf has joined #ruby
Rootsudo has quit [Quit: Textual IRC Client: www.textualapp.com]
mojtaba has quit [Quit: Leaving.]
dviola has joined #ruby