havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.0, 2.3.3 & 2.2.6: 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
<Guest13669> i think i got a solution now
pancakebreakfast has quit [Quit: Textual IRC Client: www.textualapp.com]
<Guest13669> i can make 2 variables, the first one i discard the last half of the array, and on the second one i discard the first half of the array
<Guest13669> then i got 2 variable arrays i can use
<Guest13669> good or bad?
<ljarvis> that's not what the test asks for
<ljarvis> it's first 3 digits and last 3 digits, so you have to be explicit
<ljarvis> you can't work in halfs when the length is an arbitrary number even if we know its bounds
<Guest13669> what if i make a if line first, if it's over or under 6 digits then just return false?
<anotherpi> `ticket_begin = ticket.slice(0, 3)` to have the first part
<anotherpi> you have to think how to get the end part
<anotherpi> here, it's dynamic, not static like 0 and 3
JoshS has quit [Ping timeout: 256 seconds]
saslam has joined #ruby
kht has joined #ruby
<Guest13669> hmm
<Guest13669> i have no idea what ` this symbol does
jameser has joined #ruby
<ljarvis> Guest13669: you need to open a beginning programming book. I recommand https://pine.fm/LearnToProgram/
ResidentBiscuit has joined #ruby
<anotherpi> Guest13669: is just for the irc, that's mean it's some code
LiquidInsect has joined #ruby
<anotherpi> use code between the `
<anotherpi> (in Ruby, it is use for something but nevermind)
<Guest13669> just a question are there any ruby audio books
<anotherpi> lol
<anotherpi> i really don't know, but for a programming language book, i think it's a wreid idea :p
<ResidentBiscuit> Ive never heard of a programming audio book lol
<ResidentBiscuit> There might be some Ruby podcasts out there
<anotherpi> Guest13669: what is your programming level?
msmith has joined #ruby
fullstack has quit [Ping timeout: 258 seconds]
seekingkyle has joined #ruby
xen0fon has quit [Quit: xen0fon]
<Guest13669> anotherpi: i basically started like 1 week ago
ragesoss has quit [Quit: No Ping reply in 180 seconds.]
msmith has quit [Ping timeout: 248 seconds]
<Guest13669> i did some c# in unity years ago but it's all forgotten
Mon_Ouie has quit [Ping timeout: 258 seconds]
ragesoss has joined #ruby
<anotherpi> ok, so you have to read or watch screencast
<seekingkyle> c# is the same as java
<anotherpi> it's obvious this tests are too hard for you
<Guest13669> should i do launch school?
<anotherpi> Ruby have less constrains than this language, i expect you gonna have more fun with it
fullstack has joined #ruby
<anotherpi> i read a book to begin my path in programming
alveric2 has joined #ruby
<anotherpi> it was well written
<Guest13669> is it possible to suddenly start learning programming with no previous interest for it?
<anotherpi> today there are many cool video on the internet for learning programming
GodFather has quit [Read error: Connection reset by peer]
<anotherpi> why do you start programming today?
<Guest13669> i wanna create something from nothing
alveric1 has quit [Ping timeout: 240 seconds]
<seekingkyle> create a porn app that tracks how much time you spend watching porn
<Guest13669> would be difficult, i'd need browser compatibility and stuff
<seekingkyle> or you can make a background one
<seekingkyle> that listens for specific urls
<anotherpi> lol, seekingkyle doesn't like JS ;p
<seekingkyle> eww
<Guest13669> guys what do you think about scala
thejamesbond has joined #ruby
<seekingkyle> gross
<anotherpi> LOL
<seekingkyle> go is better
thejamesbond has quit [Client Quit]
fullstack has quit [Changing host]
fullstack has joined #ruby
<anotherpi> lol, ok i leave the conversation ;)
ResidentBiscuit has quit [Remote host closed the connection]
<ljarvis> we're not here to beat on other languages, so lets keep it ruby or take it to #ruby-offtopic
r__rios has joined #ruby
r__rios has joined #ruby
r__rios has quit [Changing host]
kht has quit [Ping timeout: 240 seconds]
<anotherpi> ljarvis: well said
<seekingkyle> ljarvis: we're here to discuss how we can replace ruby with other languages
kht has joined #ruby
<seekingkyle> 1 language 1 mess 1 problem
<seekingkyle> all united by 1
<seekingkyle> because we have so many languages we have so many messes and so many problems
<seekingkyle> i don't like that
<ljarvis> seekingkyle: no, we're not. So if you want to discuss something other than Ruby, take it to the other channel
<seekingkyle> HERETIC
<ljarvis> are you finished?
<anotherpi> only one language is not a problem, the problem is only one implementation
<seekingkyle> you're a heretic and don't belong in this channel if you think we shouldn't make ruby the most important language of all time
<seekingkyle> we need to banish the heretic
blackbom1 has joined #ruby
<seekingkyle> who agrees?
<ljarvis> nobody agrees, so please stop before you're forced to leave yourself
rrios has quit [Ping timeout: 255 seconds]
<seekingkyle> BANISH HIM I SAY
<ljarvis> !mute seekingkyle
<ljarvis> seekingkyle: feel free to banish me in private message, other people are here to learn and talk about ruby
charliesome has joined #ruby
<anotherpi> i did not understand what happened
<ljarvis> !unmute seekingkyle
Mon_Ouie has joined #ruby
<ljarvis> seekingkyle: are you finished?
<seekingkyle> WHAT USE IS THIS COMMUNITY IF IT'S RAN BY HERETICS?!?!?!??!?!??!?!?
charliesome has quit [Client Quit]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros> same as in #ruby-banned: ex falso quodlibet. your premise is wrong.
BackEndCoder has quit [Excess Flood]
charliesome has joined #ruby
<ljarvis> you're up late, anotherpi
<ljarvis> er, apeiros
<apeiros> it's saturday. and we just had our big release today.
<ljarvis> congrats
<apeiros> thanks
<apeiros> lets wait for the testweek, though
<ljarvis> :)
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> (you know, the one where the real people use it…)
BackEndCoder has joined #ruby
<ljarvis> good idea
BTRE has quit [Quit: Leaving]
<seekingkyle> apeiros: what did you release?
<anotherpi> ljarvis: you checked my geolocalization? :p
<ljarvis> anotherpi: heh no, I was speaking to apeiros. Where are you based?
<apeiros> seekingkyle: internal software at the company I work.
<seekingkyle> oh
<seekingkyle> i thought it was something public... i was going to roast your app
<anotherpi> oh yea sorry, didn't read below
<anotherpi> from France
<seekingkyle> may i pm you anotherpi?
jameser has joined #ruby
<ljarvis> ah, you are up late then (same TZ as apeiros)
<ljarvis> +1 hour on me :)
<anotherpi> german?
ResidentBiscuit has joined #ruby
<seekingkyle> anotherpi: no i'm on vacation right now
<seekingkyle> i'm 100% murican
<seekingkyle> i'm checking out the FKK clubs and partytreffs, nothing to do with ruby though
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
banisterfiend has quit [Client Quit]
banisterfiend has joined #ruby
banisterfiend has quit [Client Quit]
banisterfiend has joined #ruby
kht has quit [Ping timeout: 240 seconds]
cyphase_eviltwin has joined #ruby
nertzy has joined #ruby
chouhoulis has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
centrx has joined #ruby
charliesome has joined #ruby
zapata has joined #ruby
brent__ has joined #ruby
centrx has quit [Ping timeout: 255 seconds]
hays has quit [Read error: Connection reset by peer]
hays has joined #ruby
hays has joined #ruby
hays has quit [Changing host]
BTRE has joined #ruby
jameser has joined #ruby
blackbom1 has quit [Ping timeout: 240 seconds]
ahuman has quit [Ping timeout: 258 seconds]
sneakerhax has joined #ruby
anotherpi has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
skweek has quit [Read error: Connection reset by peer]
Lord_of_Life has quit [Excess Flood]
Toordog has joined #ruby
ahuman has joined #ruby
brent__ has quit [Remote host closed the connection]
Lord_of_Life has joined #ruby
blackbom1 has joined #ruby
nowhereman has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
volty has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
ResidentBiscuit has quit [Remote host closed the connection]
<Toordog> Looking for ruby coder for hire
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spitfireee has joined #ruby
<volty> Hi, more math than ruby.I need random numbers distributed unequally. Let's say I need numbers from 0..9 but those close to 0 [let's say] four times more often than those close to 99, then, smoothly, around could have equal distribution.
spitfireee has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<volty> let's say I generate 0..999 and then reduce unequally to 0..9. Any idea, out of pocket, about the function?
<volty> (ops, reduce = recalc)
<baweaver> Toordog: There are some freelance sites out and about where you could find some.
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> volty: Offhand, I'd have to think about that one.
<baweaver> and unfortunately thinking is not going well for me right now, so bear with me.
<volty> baweaver: me too, but tired right now :)
<baweaver> So the initial is that you have a range of numbers you want to select from
<baweaver> but you want to weight certain numbers from 1 to x more heavily in random
<volty> yap
<baweaver> How much Ruby do you know?
<volty> smoothly
<volty> a lot
<volty> but from time to time
<baweaver> kwargs might help here
Trynemjoel has joined #ruby
<baweaver> make a method that takes: range: range, weight-n: array[range]
<baweaver> where n will be the multiplier
<baweaver> make it a string for easier parsing
ResidentBiscuit has joined #ruby
<volty> I was asking only about the function that can project a higher set to unequally distributed lower set. Never mind. I'll let it sleep. Thanks. :)
<baweaver> none built in
<baweaver> but essentially just to an n.times for each "weight" to shove them into a set you return
<baweaver> s/set/array/
<volty> going to ask in #math
Guest69 has joined #ruby
msmith has joined #ruby
patarr has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
railswebdev has joined #ruby
milardovich has joined #ruby
<baweaver> see if I got this right
<baweaver> >>def ws(**kw);s=kw[:r].to_a;kw.each{|k,vs|next if k!~/^w/;w=k.split('-')[-1];w.times{vs.to_a.each{|v|s<<v}};s;end; ws(r:1..5,'w-4'=>1..3)
<ruby[bot]> baweaver: # => /tmp/execpad-29c4ddbeb1be/source-29c4ddbeb1be:2: syntax error, unexpected keyword_end, expecting '}' ...check link for more (https://eval.in/730486)
<baweaver> fine fine, correcting syntax then
Trynemjoel has quit [Ping timeout: 245 seconds]
<baweaver> >>def ws(**kw);s=kw[:r].to_a;kw.each{|k,vs|next if k!~/^w/;k.split('-')[-1].to_i.times{vs.to_a.each{|v|s<<v}}};s;end; ws(r:1..5,'w-4'=>1..3)
<ruby[bot]> baweaver: # => wrong number of arguments (given 1, expected 0) (ArgumentError) ...check link for more (https://eval.in/730487)
jameser has joined #ruby
* baweaver opens pry
<baweaver> >>def ws(kw={});s=kw[:r].to_a;kw.each{|k,vs|next if k !~/^w/;k.split('-')[-1].to_i.times{vs.to_a.each{|v|s<<v}}};s;end; ws(r:1..5,'w-4'=>1..3)
<ruby[bot]> baweaver: # => [1, 2, 3, 4, 5, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3] (https://eval.in/730488)
rvca has quit [Quit: Leaving]
<baweaver> volty: ^
patarr has quit [Ping timeout: 264 seconds]
<baweaver> nicer version in a moment.
blackbom1 has quit [Ping timeout: 240 seconds]
cyphase_eviltwin is now known as cyphase
skweek has joined #ruby
skweek has quit [Read error: Connection reset by peer]
sylario has quit [Quit: Connection closed for inactivity]
hutch34 has joined #ruby
<baweaver> volty: https://eval.in/730494
<baweaver> could add a shuffle to the end, or just use sample to pull from ti
<baweaver> either way
BitWhisperer has quit [Read error: Connection reset by peer]
<baweaver> though set is a bad word for me to use there, the idea still works.
Azure has quit [Ping timeout: 252 seconds]
<volty> baweaver: nice, thanks, I'll try tomorrow with a right quadratic function (to start with, and then adjust). bye and thanks :)
volty has quit [Quit: Konversation terminated!]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
markhkim has left #ruby [#ruby]
hutch34 has quit [Ping timeout: 240 seconds]
millerti has joined #ruby
JoshS has joined #ruby
centrx has joined #ruby
centrx has joined #ruby
centrx has quit [Changing host]
Derperperd has quit [Ping timeout: 260 seconds]
rvca has joined #ruby
Toordog- has joined #ruby
xen0fon has joined #ruby
centrx has quit [Ping timeout: 240 seconds]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jtdowney has quit [Remote host closed the connection]
pytuger has joined #ruby
jtdowney has joined #ruby
jtdowney has quit [Changing host]
jtdowney has joined #ruby
Azure has joined #ruby
jtdowney has quit [Remote host closed the connection]
jtdowney has joined #ruby
centrx has joined #ruby
centrx has quit [Remote host closed the connection]
rvca has quit [Remote host closed the connection]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Toordog> baweaver do you trust freelancer website? I trust community ;)
<baweaver> Consider that people on said sites also tend to be here :)
<Toordog> i have a work order open on upwork, but i would rather hire someone that is known here (has references)
<baweaver> You might ping Pontiki and see if she's open for contract, I know she had been earlier
<Toordog> also, might be faster to find someone here than waiting someone to see my work order on upwork ;)
<baweaver> but she's not online, so Twitter may work.
<Toordog> i can try that :)
<Toordog> it's a 2-3 hours work for someone intermediate in Ruby. 250$
<baweaver> y'might as well post the posting you have on there and see if it gets any attention
jameser has joined #ruby
<baweaver> Typically we don't mind people posting jobs in here just as long as it's Ruby relevant and you're not spamming it.
<Toordog> i was hesitating to copy the link to avoid giving a negative perception. But since you invite :)
<baweaver> Personally I see no issue with it as long as it's a Ruby problem / job and you're not posting it every hour on repeat.
<Toordog> /timer 30 :P
<Toordog> I won't repeat it, just hope someone that is seeking will notice it ;)
Nilium_ has joined #ruby
<baweaver> You might want to mention the version of PuppetDB you're running
zeroDi has quit [Quit: WeeChat 1.7]
jenrzzz has quit [Ping timeout: 240 seconds]
<baweaver> Also throw it up on Twitter and tag it with ruby job
<baweaver> might get some attention there too.
<Toordog> I'm such a noob with twitter :
<Toordog> :s
UnknownSoldier has quit [Remote host closed the connection]
JoshS has quit [Ping timeout: 256 seconds]
manolo has joined #ruby
<baweaver> In any case good luck with it.
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ohgi has joined #ruby
banisterfiend has joined #ruby
milardovich has quit [Read error: Connection reset by peer]
<Toordog> done :)
<Toordog> thx
milardovich has joined #ruby
Nilium has quit [Remote host closed the connection]
Nilium_ is now known as Nilium
banisterfiend has quit [Ping timeout: 240 seconds]
JoshS has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
msmith has quit []
ResidentBiscuit has quit [Ping timeout: 255 seconds]
montyboy has quit [Remote host closed the connection]
Derperperd has joined #ruby
ohgi has quit [Quit: Lost terminal]
Derperperd has quit [Ping timeout: 240 seconds]
enterprisey has joined #ruby
d^sh has quit [Ping timeout: 240 seconds]
saslam has quit [Ping timeout: 255 seconds]
harai_ has quit [Ping timeout: 276 seconds]
d^sh has joined #ruby
govg has quit [Remote host closed the connection]
govg has joined #ruby
clauswitt has joined #ruby
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Nilium has quit [Quit: <kristin> Cower is like... I dunno. sometimes he seems senile and other times he seems like a middle schooler.]
Nilium has joined #ruby
Guest69 has joined #ruby
railswebdev has joined #ruby
manolo has quit [Quit: manolo]
simmib has joined #ruby
jshjsh has joined #ruby
JoshS has quit [Ping timeout: 256 seconds]
simmib has quit [Ping timeout: 264 seconds]
clauswitt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 240 seconds]
dopamean_ has quit [Ping timeout: 276 seconds]
nertzy has quit [Ping timeout: 264 seconds]
patarr has joined #ruby
zack6849 has quit [Ping timeout: 240 seconds]
Bilge has quit [Ping timeout: 240 seconds]
blackwind_123 has quit [Ping timeout: 248 seconds]
zack6849 has joined #ruby
zack6849 has joined #ruby
zack6849 has quit [Changing host]
blackbom1 has joined #ruby
xlegoman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has quit [Ping timeout: 240 seconds]
Bilge has joined #ruby
blackwind_123 has joined #ruby
nofxxx has joined #ruby
arescorpio has joined #ruby
ReK2 has quit [Read error: Connection reset by peer]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ReK2 has joined #ruby
ReK2 has quit [Changing host]
ReK2 has joined #ruby
nofxx has quit [Ping timeout: 252 seconds]
Subfusc has quit [Ping timeout: 258 seconds]
unreal has quit [Ping timeout: 245 seconds]
matp has quit [Remote host closed the connection]
hutch34 has joined #ruby
matp has joined #ruby
Subfusc has joined #ruby
UnknownSoldier has joined #ruby
UnknownSoldier has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 240 seconds]
dopamean_ has joined #ruby
jenrzzz has joined #ruby
mim1k|wo1k has joined #ruby
mim1k|work has quit [Ping timeout: 245 seconds]
jordanm has quit [Quit: Konversation terminated!]
harai_ has joined #ruby
harai_ has quit [Ping timeout: 248 seconds]
milardovich has quit []
Xiti has quit [Read error: Connection reset by peer]
MyMind has quit [Read error: Connection reset by peer]
harai_ has joined #ruby
Xiti has joined #ruby
MyMind has joined #ruby
gix has quit [Ping timeout: 248 seconds]
djbkd has joined #ruby
xlegoman has joined #ruby
markfletcher has joined #ruby
gix has joined #ruby
simmib has joined #ruby
harai_ has quit [Ping timeout: 264 seconds]
markfletcher has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
patarr has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
agent_white has joined #ruby
markfletcher has joined #ruby
jshjsh has quit [Ping timeout: 256 seconds]
patarr has quit [Ping timeout: 252 seconds]
JoshS has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
markfletcher has quit [Client Quit]
Vile` has quit [Ping timeout: 248 seconds]
armyriad has joined #ruby
gizmore|2 has joined #ruby
seekingkyle has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
aryaching has quit [Read error: Connection reset by peer]
gizmore has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
simmib has quit [Remote host closed the connection]
reverberations has joined #ruby
Derperperd has joined #ruby
xlegoman has quit [Quit: Textual IRC Client: www.textualapp.com]
harai_ has joined #ruby
Anonymoose2 has quit [Ping timeout: 240 seconds]
Derperperd has quit [Ping timeout: 255 seconds]
harfangk has joined #ruby
jshjsh has joined #ruby
simmib has joined #ruby
JoshS has quit [Ping timeout: 256 seconds]
Guest69 has joined #ruby
skweek has joined #ruby
railswebdev has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
simmib has quit [Remote host closed the connection]
shinnya has joined #ruby
cibs has quit [Ping timeout: 245 seconds]
cibs has joined #ruby
jameser has joined #ruby
jshjsh has quit [Quit: Leaving]
galeido has quit [Changing host]
galeido has joined #ruby
jameser has quit [Max SendQ exceeded]
harai_ has quit [Ping timeout: 256 seconds]
jameser has joined #ruby
hutch34 has joined #ruby
jameser has quit [Client Quit]
mlindahl has joined #ruby
mlindahl has left #ruby [#ruby]
djbkd_ has joined #ruby
hutch34 has quit [Ping timeout: 256 seconds]
_whitelogger has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
dnewkerk has joined #ruby
pytuger has quit [Ping timeout: 240 seconds]
arescorpio has quit [Quit: Leaving.]
jenrzzz has joined #ruby
charliesome has joined #ruby
_whitelogger has joined #ruby
pytuger has joined #ruby
enterprisey has quit [Ping timeout: 252 seconds]
simmib_ has joined #ruby
jameser has joined #ruby
jameser has quit [Client Quit]
bungoman has joined #ruby
simmib_ has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
djbkd_ has quit []
jameser has quit [Max SendQ exceeded]
aryaching_ has joined #ruby
harai_ has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
ryan_notabot has quit [Ping timeout: 245 seconds]
jameser has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
Guest13669 has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 248 seconds]
jameser has quit [Ping timeout: 245 seconds]
Derperperd has joined #ruby
ur5us has joined #ruby
Derperperd has quit [Ping timeout: 256 seconds]
tlahtoani has quit [Quit: Connection closed for inactivity]
A124 has quit [Ping timeout: 255 seconds]
jameser has joined #ruby
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
enterprisey has joined #ruby
djbkd_ has joined #ruby
ifctj has joined #ruby
aryaching_ has quit [Ping timeout: 258 seconds]
aryaching has joined #ruby
rippa has joined #ruby
Cohedrin_ has joined #ruby
CloCkWeRX has joined #ruby
harai_ has quit [Ping timeout: 245 seconds]
shinnya has quit [Ping timeout: 256 seconds]
renchan has joined #ruby
minimalism has quit [Quit: minimalism]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
jameser has joined #ruby
aryaching has joined #ruby
simmib has joined #ruby
blackbom1 has quit [Ping timeout: 260 seconds]
jameser has quit [Max SendQ exceeded]
antgel has quit [Ping timeout: 252 seconds]
blackwind_123 has quit [Ping timeout: 255 seconds]
jameser has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
paradisaeidae has joined #ruby
paradisaeidae_ has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
simmib has quit [Remote host closed the connection]
simmib has joined #ruby
simmib has quit [Remote host closed the connection]
simmib has joined #ruby
simmib has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
simmib_ has joined #ruby
marxarelli|afk is now known as marxarelli
simmib_ has quit [Ping timeout: 240 seconds]
harai_ has joined #ruby
simmib has joined #ruby
simmib has quit [Remote host closed the connection]
simmib_ has joined #ruby
Lyubo1 is now known as Lyubo1_AW
blackwind_123 has joined #ruby
simmib_ has quit [Ping timeout: 255 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enterprisey has quit [Ping timeout: 248 seconds]
charliesome has joined #ruby
simmib has joined #ruby
simmib has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
simmib_ has joined #ruby
simmib_ has quit [Ping timeout: 276 seconds]
antgel has joined #ruby
triangles has joined #ruby
harai_ has quit [Ping timeout: 256 seconds]
paradisaeidae_ has quit [Quit: ChatZilla 0.9.93 [Firefox 51.0.1/20170125094131]]
paradisaeidae has quit [Quit: ChatZilla 0.9.93 [Firefox 51.0.1/20170125094131]]
simmib has joined #ruby
naftilos76 has joined #ruby
pytuger has quit [Quit: Leaving.]
simmib has quit [Remote host closed the connection]
simmib has joined #ruby
simmib has quit [Ping timeout: 255 seconds]
<apeiros> moin
karapetyan has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mlindahl has joined #ruby
karapetyan has quit [Remote host closed the connection]
blackbom1 has joined #ruby
mlindahl has quit [Ping timeout: 258 seconds]
karapetyan has joined #ruby
A124 has joined #ruby
blackbom1 has quit [Ping timeout: 248 seconds]
lxsameer has joined #ruby
mlindahl has joined #ruby
karapetyan has quit [Remote host closed the connection]
lxsameer has quit [Client Quit]
lxsameer has joined #ruby
karapetyan has joined #ruby
Derperperd has joined #ruby
mlindahl_ has joined #ruby
A124 has quit [Client Quit]
karapetyan has quit [Remote host closed the connection]
A124 has joined #ruby
charliesome has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
mlindahl has quit [Ping timeout: 258 seconds]
Derperperd has quit [Ping timeout: 245 seconds]
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ifctj has quit [Ping timeout: 240 seconds]
__main__ has quit [Ping timeout: 245 seconds]
dionysus69 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shinnya has joined #ruby
__main__ has joined #ruby
charliesome has joined #ruby
lxsameer has quit [Quit: WeeChat 1.6]
charliesome has quit [Client Quit]
toretore has joined #ruby
charliesome has joined #ruby
charliesome has quit [Client Quit]
garit has joined #ruby
marxarelli is now known as marxarelli|afk
Lyubo1_AW is now known as Lyubo1_VOC
aglorei has quit [Remote host closed the connection]
aglorei has joined #ruby
davezd has joined #ruby
djbkd_ has quit [Remote host closed the connection]
aryaching_ has joined #ruby
harai_ has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
elementaru has joined #ruby
ur5us has joined #ruby
malconis has quit [Read error: Connection reset by peer]
ur5us has quit [Ping timeout: 264 seconds]
blackbom1 has joined #ruby
aglorei has quit [Quit: WeeChat 1.4]
aglorei has joined #ruby
malconis has joined #ruby
aglorei has quit [Client Quit]
aglorei has joined #ruby
agent_white has quit [Quit: night]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aglorei has quit [Client Quit]
aglorei has joined #ruby
aglorei has quit [Client Quit]
aglorei has joined #ruby
aglorei has quit [Client Quit]
aglorei has joined #ruby
ResidentBiscuit has joined #ruby
aglorei has quit [Client Quit]
aglorei has joined #ruby
aglorei has quit [Client Quit]
aglorei has joined #ruby
dhollinger has quit [Ping timeout: 240 seconds]
mas886 has joined #ruby
mas886 has joined #ruby
mas886 has quit [Changing host]
aglorei has quit [K-Lined]
ResidentBiscuit has quit [Ping timeout: 255 seconds]
aglorei has joined #ruby
aglorei has quit [K-Lined]
jameser has joined #ruby
aglorei has joined #ruby
hutch34 has joined #ruby
aglorei has quit [K-Lined]
aglorei has joined #ruby
aglorei has quit [Client Quit]
aglorei has joined #ruby
aglorei has quit [K-Lined]
aglorei has joined #ruby
aglorei has quit [K-Lined]
aglorei has joined #ruby
aglorei has quit [Client Quit]
hutch34 has quit [Ping timeout: 255 seconds]
blackbom1 has quit [Ping timeout: 264 seconds]
xen0fon has quit [Quit: xen0fon]
jameser has quit [Quit: Textual IRC Client: www.textualapp.com]
blackbom1 has joined #ruby
mlindahl_ has quit [Remote host closed the connection]
mlindahl has joined #ruby
unreal has joined #ruby
quick has joined #ruby
zeroDi has joined #ruby
byte512 has joined #ruby
mlindahl has quit [Remote host closed the connection]
mlindahl has joined #ruby
mlindahl has quit [Remote host closed the connection]
mlindahl has joined #ruby
dhollinger has joined #ruby
karapetyan has joined #ruby
blackbom1 has quit [Ping timeout: 240 seconds]
blackbom1 has joined #ruby
charliesome has joined #ruby
blackmesa has joined #ruby
Puffball has quit [Remote host closed the connection]
brent__ has joined #ruby
Puffball has joined #ruby
brent__ has quit [Ping timeout: 264 seconds]
dc4 has joined #ruby
Axy has quit [Ping timeout: 240 seconds]
dnewkerk has quit [Quit: dnewkerk]
lxsameer has joined #ruby
blackbom1 has quit [Ping timeout: 276 seconds]
nofxxx has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
al2o3-cr has joined #ruby
pandaant has joined #ruby
Jackneill has joined #ruby
blackbom1 has joined #ruby
karapety_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapety_ has quit [Read error: Connection reset by peer]
marxarelli|afk has quit [Ping timeout: 245 seconds]
karapetyan has joined #ruby
Derperperd has joined #ruby
Derperperd has quit [Changing host]
Derperperd has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
nowhereman has quit [Ping timeout: 240 seconds]
Derperperd has quit [Ping timeout: 264 seconds]
mas886 has quit [Read error: Connection reset by peer]
tuxaddicted has joined #ruby
aryaching_ has quit [Ping timeout: 252 seconds]
sagax has joined #ruby
<sagax> hi all!
<sagax> how to check true/false that is boolean?
triangles has quit [Quit: Leaving]
<sagax> true.class is TrueClass, false.class is FalseClass
<sagax> but where Boolean?
blackmesa has quit [Ping timeout: 245 seconds]
<toretore> there is no Boolean
<sagax> hm, well, how to check this TrueClass or FalseClass without [TrueClass, FalseClass].include?(some_true_false_object.class)
<toretore> why do you want to do this?
<sagax> i wish check, that some_object is a true or false, i wish check that some_object is a boolean type
blackmesa has joined #ruby
<toretore> again, why?
blackbom1 has quit [Ping timeout: 255 seconds]
<sagax> not string or integer or other
<toretore> what is the actual use case for this?
<sagax> i check argument in def, i wish check that argument it's true or false
dnewkerk has joined #ruby
<toretore> you're just saying the same thing over and over, explain *why* you want to do this
Derperperd has joined #ruby
<apeiros> sagax: the reason toretore asks for the "why" is because it's common in ruby to just rely on truthiness, and not require explicit true/false
quick has quit [Quit: Leaving]
<sagax> I want to make sure that correct argument was sent
<apeiros> ok, lets rephrase toretore's question: why do you only want to accept true/false and not truthy/untruthy?
<apeiros> is there a reason to go counter to common ruby idioms?
pragmaticus has quit [Ping timeout: 248 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sagax> i know nothing about truthy/untruthy
A124 has quit [Ping timeout: 240 seconds]
<sagax> but i sent to def (true or false) argument and i must check this argument
<toretore> no, you must not
<apeiros> sagax: that's not what's commonly done
<toretore> you must not not, in fact
<apeiros> truthy: everything except nil/false
<apeiros> untruthy: nil and false
<toretore> wait, i'm getting my boolean logic wrong
<apeiros> and almost all methods which do a boolean decision accept truthy/untruthy. they don't care about wether the value is precisely true/false
<sagax> not, i must get exactly true or false
<apeiros> *why*
<sagax> i don't sent just object
<toretore> lol
Derperperd has quit [Ping timeout: 240 seconds]
<toretore> sagax: gis the code in question where you feel like you have to do this
<toretore> ?gist
<ruby[bot]> https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
A124 has joined #ruby
<apeiros> ok, look, you're almost certainly doing it wrong, but: either your solution, or case obj; when true, false then "is boolean" else "isn't"; end, or obj.equal?(true) || obj.equal?(false)
<apeiros> and let me reiterate it: you. are. doing. it. wrong. I gave you the tools to do it wrong. your decision on whether you want to actually do it wrong. you've been thoroughly warned :-p
<sagax> [TrueClass, FalseClass].include?(some_object.class) it looks better, i think
<apeiros> it looks like done wrong.
* apeiros afk for a few minutes
karapetyan has quit [Remote host closed the connection]
harai_ has quit [Ping timeout: 276 seconds]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
<sagax> i do not make checking that object is exist
karapetyan has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
<manveru> >> class X; def equal?(o); true; end; def class; TrueClass; end; end; [X.new.equal?(false), [TrueClass].include?(X.new.class)]
<sagax> just check true or false
<ruby[bot]> manveru: # => [true, true] (https://eval.in/730653)
<toretore> i do not convince that it is not the trolling
karapetyan has joined #ruby
<manveru> you can always circumvent your checks
<manveru> that's why they're shit :)
karapetyan has quit [Read error: Connection reset by peer]
<sagax> toretore: not, not trolling
karapetyan has joined #ruby
<manveru> just do `true == obj || false == obj` and you're done, until you have some lunatic overwrite TrueClass#== and FalseClass#==
bkxd_ has quit [Ping timeout: 240 seconds]
<manveru> >> class TrueClass; def ==(o); false; end; end; true == true
<ruby[bot]> manveru: # => false (https://eval.in/730654)
<elomatreb> >> class TrueClass; def ==(o); [true, false].sample; end; end; true == true
<ruby[bot]> elomatreb: # => true (https://eval.in/730655)
bkxd has joined #ruby
<elomatreb> >> class TrueClass; def ==(o); [true, false].sample; end; end; true == true
<ruby[bot]> elomatreb: # => true (https://eval.in/730656)
<manveru> :)
<manveru> the only thing you cannot fool is `if` and `unless`
CloCkWeRX has quit [Ping timeout: 255 seconds]
<manveru> but then you can't say for sure if it's nil or false or true, just if it's truthy/falsy
<manveru> anw, if you'd explain _why_ you need this in the first place, we might be discussing something more productive :)
<toretore> sagax: you have been saying one thing over and over, ignoring every advice and not provided any information when asked, so until you change that you are classified as a troll
<elomatreb> >> module Kernel; def nil; true; end; end; "true!" if nil
<ruby[bot]> elomatreb: # => nil (https://eval.in/730657)
<elomatreb> wat
<elomatreb> I was sure that worked
<manveru> module Kernel; def nil; true; end; end; "true!" if ()
<manveru> >> module Kernel; def nil; true; end; end; "true!" if ()
<ruby[bot]> manveru: # => nil (https://eval.in/730659)
<manveru> hm
<sagax> toretore: english is not my native language, i write it badly, sorry
whiteline has quit [Remote host closed the connection]
blackbom1 has joined #ruby
andrzejku has joined #ruby
blackmesa has joined #ruby
Yxhuvud has quit [Read error: Connection reset by peer]
Yxhuvud has joined #ruby
gavit has joined #ruby
hutch34 has joined #ruby
pandaant has quit [Remote host closed the connection]
blackwind_123 has quit [Ping timeout: 260 seconds]
flying has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
jaxxstorm has joined #ruby
gizmore|2 has quit [Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
<apeiros> elomatreb: literal > lvar > method
<apeiros> keyword ~ literal
<elomatreb> Yeah, makes sense, I must have confused that with something
hutch34 has joined #ruby
evie_hammond has joined #ruby
hutch34 has quit [Ping timeout: 256 seconds]
blackwind_123 has joined #ruby
garit has left #ruby ["exit"]
Derperperd has joined #ruby
A124 has quit [Ping timeout: 248 seconds]
Derperperd has quit [Ping timeout: 276 seconds]
A124 has joined #ruby
gizmore has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
vktec has joined #ruby
<vktec> This isn't the best of channel for this, but I couldn't find a better one, so here goes: What does 'spec' mean in regards to testing? Why is 'rspec' not called, say, 'rtest'?
<havenwood> vktec: So when they ask for your specs you can point at the spec/ directory!
<vktec> But why is it called the spec/ directory? ;)
<havenwood> vktec: More seriously, there're slight syntactic and semantic differences between the test and spec style. Minitest is a good place to look to compare the two styles. You can even mix and match.
<vktec> Okay
<vktec> > minitest/spec is a functionally complete spec engine. It hooks onto minitest/test and seamlessly bridges test assertions over to spec expectations.
<havenwood> vktec: If you write your tests in a style that reads a bit more like English then they double as specs, or at least that's the idea.
<vktec> That seems to imply that assert style is "testing" whereas expect is "speccing". Is that correct?
<vktec> havenwood: Ah, okay. Thanks for clarifiying :)
<havenwood> vktec: Yes, that's one of the semantic differences.
<vktec> Okay, cool
<havenwood> vktec: These two examples show some style differences: https://github.com/seattlerb/minitest#unit-tests
Toordog- has quit [Ping timeout: 252 seconds]
<vktec> I can see what you mean by it reading more like English :D
alex`` has quit [Ping timeout: 255 seconds]
nanoz has joined #ruby
brent__ has joined #ruby
nowhereman has joined #ruby
blackmesa has joined #ruby
sepp2k has joined #ruby
<nanoz> hi
<havenwood> nanoz: hi
<nanoz> how to intialize instance variable in ruby
<havenwood> nanoz: @number = 42
<havenwood> nanoz: There's no boilerplate that must precede assignment.
brent__ has quit [Ping timeout: 240 seconds]
<nanoz> can it be intialized after class ?
<havenwood> nanoz: yes
<havenwood> nanoz: It's common practice to go ahead and initialize instance variables in your #initialize method, but you don't have to.
<nanoz> but i'm unable to use '<' or '>' symbol with instance variable
xen0fon has joined #ruby
<havenwood> nanoz: Show your code? Have a link to a gist?
<nanoz> the error is Player.rb:6:in `<'
<nanoz> Player.rb:6:in `play_turn'
<nanoz> sure
<nanoz> here
<havenwood> nanoz: Try: def initialize; @health = 20; end
<havenwood> (Newlines where there are semicolons.)
alex`` has joined #ruby
JeanCarloMachado has joined #ruby
<nanoz> that worked!
flak has joined #ruby
rippa has quit [Ping timeout: 256 seconds]
D100 has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nowhereman has quit [Ping timeout: 240 seconds]
danielpclark has quit [Remote host closed the connection]
lxsameer has quit [Ping timeout: 258 seconds]
brent__ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
houhoulis has joined #ruby
dc4 has quit [Ping timeout: 258 seconds]
brent__ has quit [Ping timeout: 240 seconds]
millerti has joined #ruby
Snickers has joined #ruby
sERAphim_5B has joined #ruby
User458764 has joined #ruby
User458764 has quit [Remote host closed the connection]
Tempesta has quit [Quit: AdiIRC is updating to v2.7 Beta Build (2017/02/03) 64 Bit]
Tempesta has joined #ruby
dc4 has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
mikeiniowa has quit [Remote host closed the connection]
whiteline has joined #ruby
mikeiniowa has joined #ruby
ResidentBiscuit has joined #ruby
karapetyan has quit [Remote host closed the connection]
jaxxstorm has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
whiteline has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
ResidentBiscuit has quit [Ping timeout: 255 seconds]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
JeanCarloMachado has quit [Ping timeout: 248 seconds]
karapetyan has joined #ruby
nadir has joined #ruby
xen0fon has quit [Quit: xen0fon]
blackbom1 has quit [Ping timeout: 240 seconds]
whiteline has joined #ruby
flying has quit []
sERAphim_5B has quit [Quit: Leaving]
tuxaddicted has quit [Quit: Leaving]
whiteline has quit [Remote host closed the connection]
gigetoo has quit [Ping timeout: 256 seconds]
blackmesa has quit [Ping timeout: 255 seconds]
whiteline has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
dviola has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
hutch34 has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
gigetoo has joined #ruby
karapetyan has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
karapetyan has joined #ruby
Mia has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
Derperperd has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
sagax has quit [Read error: No route to host]
gigetoo has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 258 seconds]
gigetoo has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
JeanCarloMachado has joined #ruby
blackmesa has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
<nanoz> well its weird in calling method and passing arg
<nanoz> player.walk!
karapetyan has joined #ruby
<nanoz> player.walk!:back
Derperperd has quit [Ping timeout: 245 seconds]
gigetoo has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
karapetyan has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
xen0fon has joined #ruby
anotherpi has joined #ruby
<anotherpi> hello!
UnknownSoldier has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
xen0fon has quit [Quit: xen0fon]
ecuanaso has joined #ruby
_sfiguser has quit [Remote host closed the connection]
gigetoo has joined #ruby
ocbtec has joined #ruby
gigetoo has quit [Ping timeout: 245 seconds]
User458764 has joined #ruby
vuoto has joined #ruby
User458764 has quit [Remote host closed the connection]
User458764 has joined #ruby
gigetoo has joined #ruby
aryaching has joined #ruby
nebben has joined #ruby
gigetoo has quit [Ping timeout: 256 seconds]
gigetoo has joined #ruby
karapetyan has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
nofxx has quit []
User458764 has joined #ruby
karapetyan has quit [Ping timeout: 245 seconds]
<anotherpi> hey, this gem named Wrong is amazing: https://github.com/sconover/wrong
<anotherpi> it's totally the way i wanna see my test files
<anotherpi> PS: doesn't work on my computer (MRI 2.3)
houhoulis has quit []
gigetoo has quit [Ping timeout: 256 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ocbtec_ has joined #ruby
tomphp has joined #ruby
gigetoo has joined #ruby
ocbtec has quit [Ping timeout: 240 seconds]
xen0fon has joined #ruby
JeanCarloMachado has quit [Ping timeout: 252 seconds]
ocbtec has joined #ruby
ocbtec_ has quit [Ping timeout: 258 seconds]
JeanCarloMachado has joined #ruby
c355e3b has joined #ruby
DLSteve has joined #ruby
gigetoo has quit [Ping timeout: 240 seconds]
cyphase has quit [Ping timeout: 276 seconds]
xen0fon has quit [Quit: xen0fon]
gigetoo has joined #ruby
houhoulis has joined #ruby
cyphase has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ianmethyst has joined #ruby
msmith has joined #ruby
ecuanaso has quit [Quit: Textual IRC Client: www.textualapp.com]
User458764 has joined #ruby
User458764 has quit [Client Quit]
gigetoo has quit [Ping timeout: 255 seconds]
nankyokusei has joined #ruby
nanoz has quit [Quit: <3]
sagax has joined #ruby
IvanSuftin has quit [Remote host closed the connection]
ocbtec has quit [Quit: leaving]
newrubycoder has joined #ruby
ocbtec has joined #ruby
<newrubycoder> hey guys i'm wondering if someone could help me with a simple return problem?
JeanCarloMachado has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
Guest69 has joined #ruby
railswebdev has joined #ruby
<newrubycoder> unexpected return (LocalJumpError) what does it mean
nowhereman has joined #ruby
<newrubycoder> i guess i dont have to type return? i just type true?
djellemah has joined #ruby
nowhereman has quit [Ping timeout: 252 seconds]
minimalism has joined #ruby
TheWild has joined #ruby
hutch34 has joined #ruby
hhee has joined #ruby
<hhee> guys, which book i need to start working with ruby and rails from totally zero?
TheWild has left #ruby [#ruby]
gigetoo has joined #ruby
nankyokusei has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 240 seconds]
<newrubycoder> hhee i use this one https://launchschool.com/books/ruby/read
saneax-_-|AFK is now known as saneax
JeanCarloMachado has quit [Ping timeout: 264 seconds]
<hhee> newrubycoder, thx got it
JeanCarloMachado has joined #ruby
dc4 has quit [Ping timeout: 240 seconds]
heftig has quit [Read error: Connection reset by peer]
heftig has joined #ruby
ianmethyst has quit [Quit: WeeChat 1.7]
<hhee> newrubycoder, how do you think - how much time do i need to got basic ruby knowledge?
<newrubycoder> i dont know im really new lol
<hhee> :)
<newrubycoder> im probably newer than you
blackmesa has quit [Ping timeout: 248 seconds]
empty_cup has quit [Quit: leaving]
markfletcher has joined #ruby
ywxxon has joined #ruby
renchan has quit [Ping timeout: 245 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
agent_white has joined #ruby
gigetoo has joined #ruby
proudtobewhite has joined #ruby
markfletcher has quit [Quit: Textual IRC Client: www.textualapp.com]
naftilos76 has quit [Quit: Αποχώρησε]
blackbom1 has joined #ruby
gigetoo has quit [Ping timeout: 264 seconds]
bpmedley has joined #ruby
houhoulis has quit [Remote host closed the connection]
xall_ has joined #ruby
Derperperd has joined #ruby
pragmaticus has joined #ruby
renchan has joined #ruby
xen0fon has joined #ruby
xen0fon has quit [Client Quit]
ResidentBiscuit has joined #ruby
vikaton has joined #ruby
xall_ has quit [Ping timeout: 245 seconds]
Derperperd has quit [Ping timeout: 256 seconds]
nobitanobi has joined #ruby
milardovich has joined #ruby
Anonymoose2 has joined #ruby
xall_ has joined #ruby
reverberations has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
renchan has quit [Ping timeout: 260 seconds]
Vile` has joined #ruby
TheMoonMaster has joined #ruby
renchan has joined #ruby
saneax is now known as saneax-_-|AFK
gigetoo_ has joined #ruby
milardovich has quit [Remote host closed the connection]
xall has joined #ruby
houhoulis has joined #ruby
xall_ has quit [Ping timeout: 260 seconds]
xen0fon has joined #ruby
gigetoo has quit [Ping timeout: 276 seconds]
xen0fon has quit [Client Quit]
Mon_Ouie has quit [Quit: WeeChat 1.6]
vuoto has quit [Ping timeout: 248 seconds]
gigetoo_ has quit [Ping timeout: 245 seconds]
renchan has quit [Read error: Connection reset by peer]
renchan_ has joined #ruby
JeanCarloMachado has quit [Ping timeout: 255 seconds]
wilbert has joined #ruby
JeanCarloMachado has joined #ruby
harryw789 has joined #ruby
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
syndikate has quit [Quit: M'Kay]
lenwood has joined #ruby
hinbody has joined #ruby
hinbody has quit [Client Quit]
hinbody has joined #ruby
BitWhisperer has joined #ruby
nobitanobi has quit [Ping timeout: 240 seconds]
cajone has quit [Ping timeout: 258 seconds]
kira has joined #ruby
<kira> hi
<kira> question on webcrawler, is it polite to keep a connection alive for a certain amount of time?
<kira> like seven seconds?
harai_ has joined #ruby
grh has joined #ruby
renchan_ has quit [Ping timeout: 240 seconds]
msmith has quit [Remote host closed the connection]
msmith has joined #ruby
msmith has quit [Remote host closed the connection]
msmith has joined #ruby
msmith has quit [Remote host closed the connection]
msmith has joined #ruby
JeanCarloMachado has quit [Ping timeout: 252 seconds]
leah2 has quit [Ping timeout: 256 seconds]
gigetoo has joined #ruby
msmith has quit [Remote host closed the connection]
msmith has joined #ruby
lenwood has quit [Ping timeout: 248 seconds]
UnknownSoldier has quit [Remote host closed the connection]
msmith has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
blackbom1 has quit [Ping timeout: 256 seconds]
msmith has joined #ruby
szulak has joined #ruby
msmith has quit [Remote host closed the connection]
mlindahl has quit [Remote host closed the connection]
mlindahl has joined #ruby
negatifze has joined #ruby
xall has quit [Read error: Connection reset by peer]
ResidentBiscuit has quit [Remote host closed the connection]
marr has joined #ruby
blackbom1 has joined #ruby
mlindahl has quit [Ping timeout: 255 seconds]
cajone has joined #ruby
LoneHerm_ has joined #ruby
harryw789 has quit [Ping timeout: 264 seconds]
browndawg has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby
JeanCarloMachado has joined #ruby
dionysus70 has joined #ruby
Derperperd has joined #ruby
leah2 has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
dionysus70 is now known as dionysus69
ur5us has joined #ruby
<apeiros> kira: I think that's fine. the problem is more with unthrottled repeated requests.
kappy has quit [Remote host closed the connection]
Derperperd has quit [Ping timeout: 248 seconds]
JeanCarloMachado has quit [Ping timeout: 258 seconds]
blackmesa has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
JeanCarloMachado has joined #ruby
lenwood has joined #ruby
__Yiota has joined #ruby
ResidentBiscuit has joined #ruby
<kira> never mind. I wait every six second to request a page
blackmes1 has joined #ruby
<kira> I sometime get DNS resolution failure, which cause my program to exit
<kira> I used the mechanize gem and I don't know if there's any better options
nankyokusei has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
joneshf-laptop has joined #ruby
<newrubycoder> can i put the elsif before the if?
tomphp has joined #ruby
<adam12> newrubycoder: no
<adam12> newrubycoder: maybe you want unless instead of if
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 255 seconds]
dionysus70 is now known as dionysus69
<newrubycoder> adam12: i've almost got this kata down, it just fails one check, i wanna make a workaround
JeanCarloMachado has quit [Ping timeout: 260 seconds]
<newrubycoder> if the number lands on 3 it must return false regardless of the previous if
alex`` has quit [Quit: WeeChat 1.6]
JeanCarloMachado has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
Zamyatin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Derperperd has joined #ruby
UnknownSoldier has joined #ruby
despai has joined #ruby
duderonomy has quit [Ping timeout: 248 seconds]
<adam12> newrubycoder: lots of ways to solve it, but ruby returns last value from block, but you can eager return
cagmz has joined #ruby
<adam12> newrubycoder: but best if you show some code
nobitanobi has joined #ruby
hutch34 has joined #ruby
JeanCarloMachado has quit [Ping timeout: 248 seconds]
<newrubycoder> adam12: this is the test i can't pass Test.assert_equals(is_lucky("12a12a"), false)
JeanCarloMachado has joined #ruby
gizmore has quit [Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
alibby has joined #ruby
<adam12> newrubycoder: you have the specs for this? It's not obvious what it does
dc4 has joined #ruby
<adam12> Also, when you gist, can you make sure it's indented correctly and the proper file type (for syntax highlighting). It makes it easier on the people helping.
alibby has quit [Read error: No route to host]
binaryplease has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
alibby has joined #ruby
blackbom1 has quit [Ping timeout: 255 seconds]
last_staff has joined #ruby
<newrubycoder> adam12: it compares the first 3 digits and next 3 digits of a 6 digit number with eachother, if the sum is the same its true, if not false, the problem is that i wanna make any number with letters become false
blackmes1 has quit [Ping timeout: 245 seconds]
<adam12> And it's always numbers, never any letters
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JeanCarloMachado has quit [Ping timeout: 255 seconds]
blackbom1 has joined #ruby
<adam12> newrubycoder: I would do an eager return at the top of `is_lucky`, if it finds any non-integers inside the string. Something like this: return false if ticket =~ /\D/
milardovich has joined #ruby
<newrubycoder> adam12: ty it worked :D
duderonomy has joined #ruby
<adam12> newrubycoder: I took the liberty of making it a bit more idiomatic Ruby for you. You should learn from it, so take a look and see. https://gist.github.com/adam12/e3e1951a2d9bcbe00f3a0fb2d8655994
JeanCarloMachado has joined #ruby
<newrubycoder> ty it's more optimal than mine
<newrubycoder> btw what does this mean =~ /\D/
milardovich has quit [Ping timeout: 248 seconds]
<adam12> newrubycoder: the first part is a regular expression match (=~), and the second part is a regular expression that matches anything non-decimal (anything not 0-9)
lenwood has quit [Quit: Konversation terminated!]
manjaro-kde5_ has joined #ruby
<newrubycoder> adam12: is there any way to reject empty expressions?
<newrubycoder> like if it's ("")
duderonomy has quit [Ping timeout: 256 seconds]
<adam12> newrubycoder: You could put another eager return to compare ticket == ""
<adam12> newrubycoder: or you could append to the current eager return with an or conditional ( || )
<adam12> But I would guess that the \D in the regular expression will work for you
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12> Actually, it won't. My bad.
browndawg has quit [Quit: Leaving]
<adam12> I'd probably return false if it's not 6 characters long, instead of testing for ""
tlahtoani has joined #ruby
<newrubycoder> well i bypassed the test :D but you're right it's not optimal, i'm just praying the 3 first aren't the same as the next 3 in an illegal 6+ digit number
<newrubycoder> is text.length a suitable command?
art-solopov has joined #ruby
alexherb1 has joined #ruby
mlindahl has joined #ruby
<newrubycoder> i guess it would be only .length
alexherb1 has quit [Client Quit]
alexherbo2 has joined #ruby
blackmes1 has joined #ruby
<newrubycoder> yay it's done Kreygasm
alexherbo2 is now known as alex``
nobitanobi has quit [Remote host closed the connection]
nobitanobi has joined #ruby
dc4 has quit [Ping timeout: 276 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
mlindahl has quit [Ping timeout: 256 seconds]
nobitanobi has quit [Ping timeout: 248 seconds]
JeanCarloMachado has joined #ruby
<newrubycoder> adam12: the return false if command was just what i was looking for, didnt know you could do that
blackbombay has joined #ruby
Channel6 has joined #ruby
blackbom1 has quit [Ping timeout: 240 seconds]
grh has quit [Ping timeout: 240 seconds]
danielpclark has joined #ruby
kht has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Remote host closed the connection]
antgel has quit [Ping timeout: 252 seconds]
JeanCarloMachado has joined #ruby
nofxx has joined #ruby
blackbombay has quit [Ping timeout: 260 seconds]
blackbombay has joined #ruby
kht has quit [Ping timeout: 264 seconds]
JeanCarloMachado has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
kht has joined #ruby
eblip has quit [Remote host closed the connection]
eb0t has joined #ruby
phaza has quit [Read error: Connection reset by peer]
nankyokusei has joined #ruby
xen0fon has joined #ruby
phoo1234567 has joined #ruby
kht has quit [Ping timeout: 245 seconds]
xen0fon has quit [Client Quit]
nankyokusei has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 248 seconds]
JeanCarloMachado has joined #ruby
blackmes1 has quit [Ping timeout: 255 seconds]
Miah_ has joined #ruby
nofxx has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
dviola has quit [Ping timeout: 255 seconds]
karapetyan has joined #ruby
houhoulis has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 245 seconds]
anotherpi has quit [Ping timeout: 252 seconds]
JeanCarloMachado has joined #ruby
karapetyan has quit [Ping timeout: 240 seconds]
Yxhuvud has quit [Remote host closed the connection]
Yxhuvud has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
gizmore has joined #ruby
JeanCarloMachado has quit [Ping timeout: 248 seconds]
blackmes1 has joined #ruby
JeanCarloMachado has joined #ruby
lxsameer has joined #ruby
tomphp has joined #ruby
shinnya has joined #ruby
LiquidInsect has quit [Ping timeout: 240 seconds]
blackbombay has quit [Ping timeout: 276 seconds]
mlindahl_ has joined #ruby
johnny56_ has quit [Ping timeout: 264 seconds]
blackmes1 has quit [Ping timeout: 255 seconds]
blackbombay has joined #ruby
pragmaticus has quit [Ping timeout: 255 seconds]
<phreakocious> having some trouble with Rubymine.. I'd like to start an IRB console in the context of a class, but the console doesn't work quite right. anyone know a trick to make this work right?
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phreakocious> using a breakpoint would be nice, but I need other threads to keep executing :/
JeanCarloMachado has quit [Ping timeout: 252 seconds]
blackmes1 has joined #ruby
clauswitt has joined #ruby
tomphp has joined #ruby
JeanCarloMachado has joined #ruby
CrazyEddy has quit [Ping timeout: 240 seconds]
<danielpclark> phreakocious, if you're using ruby 2.4 require 'irb'; binding.irb
D100 has quit [Quit: Leaving]
<phreakocious> on 2.3 because of some 2.4 gem issues sadly, but thanks
<Radar> what 2.4 gem issues?
<phreakocious> version compatibility problems between two gems that depended on different versions of faraday
szulak has joined #ruby
blackbombay has quit [Ping timeout: 240 seconds]
tomphp has quit [Client Quit]
nofxxx has joined #ruby
binaryplease has quit [Quit: binaryplease]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
nofxx has quit [Ping timeout: 256 seconds]
shinnya has quit [Ping timeout: 245 seconds]
manjaro-kde5_ has quit [Ping timeout: 240 seconds]
andrzejku has quit [Quit: This computer has gone to sleep]
<al2o3-cr> phreakocious: `autoload(:IRB, 'irb'); IRB.start` maybe?
<leah2> any important gems that don't work on 2.4 yet?
Flonk has joined #ruby
<phreakocious> al2o3-cr: that does work but for whatever reason when it's run within Rubymine, you get no prompts
marsjaninzmarsa has quit [Quit: ZNC 1.7.x-git-487-cbf5c38 - http://znc.in]
JeanCarloMachado has quit [Ping timeout: 252 seconds]
<al2o3-cr> phreakocious: no clue then, sorry
grh has joined #ruby
<phreakocious> thanks though :D
JeanCarloMachado has joined #ruby
<al2o3-cr> np
<Papierkorb> leah2: Depends. `classy_hash` is for me, and doesn't work on 2.4 yet. Otherwise everything worked so far
Cohedrin_ has joined #ruby
<leah2> ok, never heard of that one
<leah2> doesnt seem to use an ext?
mlindahl_ has quit [Remote host closed the connection]
marsjaninzmarsa has joined #ruby
ResidentBiscuit has joined #ruby
<leah2> ah, i see your issue
<Papierkorb> Yeah but it differentiates Bignum and Fixnum
<leah2> yeah
mlindahl has joined #ruby
<leah2> i have code from 2003 that breaks ;)
kht has joined #ruby
andrzejku has joined #ruby
JeanCarloMachado has quit [Ping timeout: 264 seconds]
ResidentBiscuit has quit [Ping timeout: 255 seconds]
dhollinger has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
manjaro-kde5_ has joined #ruby
SesMan has joined #ruby
dhollinger has joined #ruby
hutch34 has joined #ruby
dviola has joined #ruby
clauswitt has quit [Quit: Textual IRC Client: www.textualapp.com]
hutch34 has quit [Ping timeout: 255 seconds]
Nilium has quit [Read error: Connection reset by peer]
Nilium has joined #ruby
<chrisseaton> leah2: I couldn't install Jekyll because of some C extensions that have broken
blackbombay has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
blackmes1 has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
ruby-lang866 has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
elementaru has quit [Read error: Connection reset by peer]
Nilium has quit [Ping timeout: 258 seconds]
ifctj has joined #ruby
xen0fon has joined #ruby
ruby-lang866 has quit [Ping timeout: 260 seconds]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
Nilium has joined #ruby
dviola has quit [Changing host]
dviola has joined #ruby
aglorei has joined #ruby
houhoulis has joined #ruby
szulak has quit [Quit: Textual IRC Client: www.textualapp.com]
Channel6 has quit [Quit: Leaving]
cpruitt has quit [Quit: cpruitt]
eb0t has quit [Quit: WeeChat 1.4]
JeanCarloMachado has joined #ruby
apoch632 has joined #ruby
rvca has joined #ruby
dn` has quit [Ping timeout: 258 seconds]
blackbombay has quit [Ping timeout: 255 seconds]
blackbombay has joined #ruby
ianmethyst has joined #ruby
xen0fon has quit [Quit: xen0fon]
proudtobewhite has quit [Disconnected by services]
SesMan has quit [Ping timeout: 245 seconds]
SesMan has joined #ruby
manjaro-kde5_ has quit [Ping timeout: 256 seconds]
JeanCarloMachado has quit [Ping timeout: 252 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
jaxxstorm has joined #ruby
xlegoman has joined #ruby
kht has quit [Ping timeout: 258 seconds]
JeanCarloMachado has joined #ruby
lenwood has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
blackbom1 has joined #ruby
James123 has joined #ruby
JeanCarloMachado has quit [Ping timeout: 276 seconds]
JeanCarloMachado has joined #ruby
blackbombay has quit [Ping timeout: 240 seconds]
SesMan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apoch632 has quit [Quit: Leaving.]
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
nankyokusei has joined #ruby
JeanCarloMachado has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
JeanCarloMachado has quit [Ping timeout: 258 seconds]
JeanCarloMachado has joined #ruby
Snickers has quit [Quit: Snickers]
sepp2k has quit [Read error: Connection reset by peer]
flak has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
andrzejku has quit [Quit: Leaving]
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
gusrub has joined #ruby
houhoulis has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
Vile` has quit [Remote host closed the connection]
grh has quit [Ping timeout: 240 seconds]
|ifei5g00d has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
JeanCarloMachado has joined #ruby
Guest43 has joined #ruby
Guest43 is now known as Rufus
ywxxon has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 264 seconds]
johnny56_ has joined #ruby
ifctj has quit [Ping timeout: 255 seconds]
montyboy has joined #ruby
JeanCarloMachado has joined #ruby
gusrub has quit []
redhedded1 has quit [Quit: Textual IRC Client: www.textualapp.com]
blackmes1 has joined #ruby
<newrubycoder> what is ruby gnuplot?
CrazyEddy has joined #ruby
|ifei5g00d has quit [Ping timeout: 245 seconds]
vktec has left #ruby ["So long and thanks for all the fish"]
blackmesa has joined #ruby
banisterfiend has joined #ruby
blackmes1 has quit [Ping timeout: 256 seconds]
xen0fon has joined #ruby
xen0fon has quit [Client Quit]
<sagax> why i get in pry this:
<sagax> {"one" => "one", "two" => "two"} --> {"one"=>"one", "two"=>"two"}
<sagax> but
<sagax> {"one": "one", "two": "two"} --> {:one=>"one", :two=>"two"}
anotherpi has joined #ruby
<sagax> what different between : and => in hash?
<apeiros> : is only for symbol keys
<apeiros> => is for any kind of key
<apeiros> >> {foo: "bar"}.keys.first.class
<ruby[bot]> apeiros: # => Symbol (https://eval.in/730884)
<apeiros> >> {"foo" => "foo", 1 => 1, true => true}.keys.map(&:class)
<ruby[bot]> apeiros: # => [String, Fixnum, TrueClass] (https://eval.in/730885)
<sagax> thanks,
<anotherpi> { hello: 1 } == { :hello => 1 }
JeanCarloMachado has quit [Ping timeout: 256 seconds]
<anotherpi> just jsonlike syntax sugar ;)
LoneHerm_ has quit [Remote host closed the connection]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 260 seconds]
Toordog- has joined #ruby
JeanCarloMachado has joined #ruby
lenwood has quit [Ping timeout: 255 seconds]
James123 has quit [Quit: Lost terminal]
hutch34 has joined #ruby
JeanCarloMachado has quit [Ping timeout: 248 seconds]
anotherpi has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 252 seconds]
hhee has quit [Quit: Leaving]
yCrazyEdd has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
yCrazyEdd is now known as CrazyEddy
<Radar> >> [5, 4, 5, 5, 4].sum
<ruby[bot]> Radar: # => undefined method `sum' for [5, 4, 5, 5, 4]:Array (NoMethodError) ...check link for more (https://eval.in/730898)
<Radar> ... weird, I thought that was there. Surely .inject(0, :+) isn't the cleanest way to write that in pure Ruby?
<Radar> I may be getting my Rails/Ruby wires crossed.
skweek has quit [Ping timeout: 276 seconds]
nahra has quit [Remote host closed the connection]
kht has joined #ruby
JeanCarloMachado has joined #ruby
<apeiros> Radar: sum is 2.4+, last I checked eval-in topped out at 2.3
<Radar> apeiros: Ah! Thank you :)
<Technodrome> >> require 'activesupport'
<ruby[bot]> Technodrome: # => cannot load such file -- activesupport (LoadError) ...check link for more (https://eval.in/730918)
<Papierkorb> Technodrome: 'active_support', and then '.../all' afterwards (or what you need). Though I dunno if the eval bot has that gem
<Technodrome> yeah, not sure if it does
<Technodrome> looks like it doesn't
sucks has joined #ruby
<Papierkorb> >> require 'activesupport'
<ruby[bot]> Papierkorb: # => cannot load such file -- activesupport (LoadError) ...check link for more (https://eval.in/730922)
sucks has quit [Remote host closed the connection]
<Papierkorb> >> require 'active_support'
<ruby[bot]> Papierkorb: # => cannot load such file -- active_support (LoadError) ...check link for more (https://eval.in/730923)
<Papierkorb> Nope, would've surprised me tbh
<Technodrome> >> require 'rubygems'
sucks has joined #ruby
<ruby[bot]> Technodrome: # => false (https://eval.in/730924)
<Papierkorb> >> RUBY_VERSION
<ruby[bot]> Papierkorb: # => "2.3.0" (https://eval.in/730925)
sucks has quit [Remote host closed the connection]
kht has quit [Ping timeout: 264 seconds]
bove has quit [Ping timeout: 255 seconds]
kireevco has quit [Ping timeout: 255 seconds]
Heero has quit [Ping timeout: 252 seconds]
poikon has quit [Ping timeout: 252 seconds]
kylo_ has joined #ruby
Heero has joined #ruby
poikon has joined #ruby
[diecast] has quit [Ping timeout: 252 seconds]
bove has joined #ruby
kireevco has joined #ruby
mitsuhiko has quit [Ping timeout: 252 seconds]
sucks has joined #ruby
[diecast] has joined #ruby
mitsuhiko has joined #ruby
ianmethyst has quit [Quit: WeeChat 1.7]
nowhereman has joined #ruby
sucks has quit [Quit: Leaving]
sucks has joined #ruby
dhollinger has quit [Ping timeout: 240 seconds]
Channel6 has joined #ruby
xlegoman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dhollinger has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
ianmethyst has joined #ruby
jaxxstorm has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ianmethyst has quit [Client Quit]
matp has quit [Remote host closed the connection]
matp has joined #ruby
JeanCarloMachado has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
art-solopov has quit [Quit: Konversation terminated!]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
GarouDan has joined #ruby
brandon_ has quit [Ping timeout: 255 seconds]
nankyokusei has joined #ruby
JeanCarloMachado has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kylo_ has quit [Ping timeout: 255 seconds]
xlegoman has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
Technodrome has quit [Ping timeout: 255 seconds]
nahra has joined #ruby
<newrubycoder> hey guys umm i have a question
<newrubycoder> why does the .min command think -1 is less than -8?
<lupine> irb(main):001:0> [-1,-8].min
<lupine> => -
<lupine> => -8 *
milardovich has joined #ruby
JeanCarloMachado has quit [Ping timeout: 240 seconds]
<newrubycoder> ("-1 50 -4 20 22 -7 0 10 -8").split(" ").min.to_i
<lupine> well, those are strings
<newrubycoder> => -1
<lupine> string comparisons differ to numeric comparisons
<newrubycoder> oh okay
<lupine> try inserting .map(&:to_i)
<newrubycoder> after .min?
UnknownSoldier has quit [Read error: Connection reset by peer]
wilbert has quit [Ping timeout: 240 seconds]
<lupine> no, before
<newrubycoder> kk
<lupine> think about what it's doing
<newrubycoder> ty :D
milardovich has quit [Remote host closed the connection]
<newrubycoder> i still dont know what the map command does 🤔
<newrubycoder> i will read into it cuz i had to use it my last 2 katas
charliesome has joined #ruby
nowhereman has quit [Remote host closed the connection]
<newrubycoder> i passed but i feel like "return nil if (t) == ("")" is poorly optimized
Jackneill has quit [Remote host closed the connection]
lxsameer has quit [Quit: WeeChat 1.6]
jaxxstorm has joined #ruby
anuxivm has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
CrazyEddy has joined #ruby
<baweaver> newrubycoder: return if t.blank?
<baweaver> shorter version
<newrubycoder> ty it's better
<baweaver> also, split assumes space delimited
<baweaver> >> 'words are here'.split
<ruby[bot]> baweaver: # => ["words", "are", "here"] (https://eval.in/730941)
<baweaver> so you don't have to pass an arg to it
<newrubycoder> ah ok
<baweaver> It's the little things some times
<baweaver> but those take a bit to remember
<baweaver> do you understand map yet?
anuxivm has left #ruby [#ruby]
<Zarthus> i like being verbose in ruby with .split
<Zarthus> makes it more readable to a non-rubyist
<baweaver> depends on the situation, but I find if I'm working in a Ruby codebase that trying to be non-rubyist accomodating is a bit of a strange thing
<Zarthus> i suppose i write a lot of open source software :P
<baweaver> Oh I do too.
phoo1234567 has quit [Quit: Gotta go]
<Zarthus> Just in general being verbose or explicit makes you think less about what the default value may be
<newrubycoder> nah i will read about .map
<baweaver> newrubycoder: it can be a bit dense.
<baweaver> what do you think it is currently?
<Zarthus> but overall it'll be defined in the styleguide
blackmesa has quit [Ping timeout: 258 seconds]
<baweaver> Zarthus: starting to sound like the Zen of Python there ;)
<baweaver> (* which isn't a bad thing, mind, but be careful how far you take it)
<Zarthus> baweaver: I write a lot of different languages!
jaxxstorm has quit [Remote host closed the connection]
<baweaver> fair
<Zarthus> remembering the defaults and caveats of every language gets a bit tricky sometimes.
<baweaver> It can be, but whenever I switch to speaking Spanish I try and keep the defaults and caveats
<baweaver> I try and avoid having an accent in a language if I can help it
<Zarthus> hehe
<baweaver> not saying that's necessary, but it's what I do.
<newrubycoder> baweaver: idk tbh it's pretty dense yeah
<Zarthus> to each their own, I think ruby looks better this way :P
<baweaver> I've seen some people with a rather thick Java accent go at Ruby, that I can't stand though.
<baweaver> >> [1,2,3].map { |x| x * 2 } # newrubycoder
<ruby[bot]> baweaver: # => [2, 4, 6] (https://eval.in/730942)
<baweaver> so what it's doing is for each value (put as x) it returns a new array with every value mapped through that function
<Zarthus> You mean you don't like long class names and exceptions? :P
<baweaver> Zarthus: I've literally slapped someone with the GoF book before
<baweaver> (granted it was a joke and we were all having a laugh of it)
<newrubycoder> ah ok thanks why is x put twice?
<baweaver> So in JS it'd be: [1,2,3].map(function (x) { return x * 2; });
<Zarthus> baweaver: Just imagine if it were InternetProtocolAddress.new
<baweaver> so each value in that array goes through that function
<baweaver> >> require 'ipaddr'; IPAddr.new('10.0.0.0/24').include?(IPAddr.new('10.0.0.1'))
<ruby[bot]> baweaver: # => true (https://eval.in/730943)
<baweaver> Like that?
<baweaver> It also works with case statements, which is really dang nice considering it knows CIDR blocks / subnetting
JeanCarloMachado has joined #ruby
<baweaver> newrubycoder: map is a non-mutating function as well, so the original is not transformed and a new array is given with every value "mapped" through the function (block)
<baweaver> >> a = [1,2,3]; a.map { |x| x * 2 }
<ruby[bot]> baweaver: # => [2, 4, 6] (https://eval.in/730944)
<baweaver> >> a = [1,2,3]; a.map { |x| x * 2 }; a
<ruby[bot]> baweaver: # => [1, 2, 3] (https://eval.in/730945)
<baweaver> so a is not mutated
blackmesa has joined #ruby
<newrubycoder> i've heard about mutations like def mutate(array) array.pop end but not used it yet
<baweaver> >> a = [1,2,3]; b = a.pop; {a: a, b: b}
<ruby[bot]> baweaver: # => {:a=>[1, 2], :b=>3} (https://eval.in/730946)
<baweaver> so now a doesn't have its last value, it was given to b
<baweaver> Now as far as the map(&:to_i) bit, that's shorthand for: values.map { |x| x.to_i }
volty has joined #ruby
<baweaver> In a lot of the examples I give I'll be purposely verbose at first, and naturally someone will mention it later.
<baweaver> newrubycoder: so do you understand map any better, or am I being a bit vague?
<newrubycoder> no i understand it better i think, if im not wrong .map(&:to_i) takes every value in the array and runs it through the .to_i if im right
<baweaver> yep
<baweaver> same with to_s and to_f
<newrubycoder> but isn't it easier and more efficient to use .to_i than map(&:to_i)? or is it different
<baweaver> reduce is a harder one to get
<baweaver> You can't really to_i an array
CloCkWeRX has joined #ruby
<baweaver> so you have to transform each string in your array to an integer
<newrubycoder> ah ok thanks i get it better :D
<baweaver> Now you _could_ inline that to your sort, yes.
enterprisey has joined #ruby
<baweaver> >> %w(-1 -8 1 20 200).sort_by { |x| x.to_i }
<ruby[bot]> baweaver: # => ["-8", "-1", "1", "20", "200"] (https://eval.in/730947)
JeanCarloMachado has quit [Ping timeout: 264 seconds]
UnknownSoldier has joined #ruby