Sadin has quit [Remote host closed the connection]
Sadin has joined #ruby-lang
Sadin has quit [Remote host closed the connection]
deol has joined #ruby-lang
<Senjai>
matled: Its not wtf, makes sense. It returns 0 when the block is called because that is its return value. The assign to the key is just a side effect. It doesnt get executed next time because the key has a value in the hash now
qba73 has quit [Remote host closed the connection]
weaksauce has joined #ruby-lang
nunayerB_ has quit []
riotjones has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
Aova has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby-lang
ocdmw has joined #ruby-lang
riotjones has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Ping timeout: 245 seconds]
Aova has joined #ruby-lang
cytomich has left #ruby-lang [#ruby-lang]
skade has quit [Quit: Computer has gone to sleep.]
banister has quit [Ping timeout: 250 seconds]
Odisus has joined #ruby-lang
<Odisus>
Hello
cytomich has joined #ruby-lang
<Odisus>
I'm pretty new in ruby. I taken java and C before but im really confused and I keep getting syntax errors
<Odisus>
I reviewed youtube but its not the way my teacher wants it. could anyone please help me?
yusuf_403 has joined #ruby-lang
yusuf_403 has quit [Max SendQ exceeded]
yusuf_403 has joined #ruby-lang
<Odisus>
is anyone here?
yusuf_403 has quit [Max SendQ exceeded]
<bnagy>
many people.
AlexAltea has quit [Ping timeout: 245 seconds]
yusuf_403 has joined #ruby-lang
yusuf_403 has quit [Max SendQ exceeded]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
<Odisus>
sorry...
yusuf_403 has joined #ruby-lang
yusuf_403 has quit [Max SendQ exceeded]
j4cknewt has joined #ruby-lang
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nathanstitt has quit [Quit: I growing sleepy]
prereflect has joined #ruby-lang
cytomich has quit [Quit: Leaving.]
cytomich has joined #ruby-lang
cytomich has left #ruby-lang [#ruby-lang]
p3ery has joined #ruby-lang
prereflect has quit [Remote host closed the connection]
prereflect has joined #ruby-lang
prereflect has quit [Remote host closed the connection]
<jhass>
Odisus: state your problem, don't search for the person with the solution for it
<womble>
Odisus: Well, first thing, Ruby doesn't compile.
<Odisus>
Excuse me, it wont run
<womble>
Odisus: Yep, I get a "wrong number of arguments" error.
<jhass>
arguments passed to .new, are passed to the initialize method of your class
<jhass>
you don't define it, so Object's is used
<jhass>
which doesn't take any arguments
<Odisus>
So dont use .new?
<womble>
Odisus: Or define an initialize method.
<jhass>
or don't pass arguments to .new
<bnagy>
Odisus: this is homework, yes?
<jhass>
it depends on what your Grade class should do exactly
<bnagy>
you should review your material and previous exercises
tkuchiki has joined #ruby-lang
<bnagy>
you'll not learn anything by just having people write it for you
<Odisus>
bnagy: Yeah, i dont expect anyone to do the homework for me. Just trying to understand how to do this
<bnagy>
failing that, ask specific questions. I did X and expected Y but got Z
<jhass>
you never really defined "this"
<bnagy>
not "it won't run" "it doesn't work"
tunaCanBruh has joined #ruby-lang
<Odisus>
Then I'll be specific. how do I call a class and pass parameters to it?
<jhass>
also watch your indentation, using a consistent one helps to better follow your own code. Ruby community standard is 2 spaces
<bnagy>
define an initialize method
<Odisus>
Isn't that my grading method?
<bnagy>
yes
<bnagy>
you just called it the wrong thing
<bnagy>
ruby looks specifically for a method called initialize
<womble>
Odisus: Terminology nit: you don't "call a class" in Ruby; you can call a class method, or you can instantiate an instance of a class. I'm not trying to pick on you here, it's just that precision in terminology helps people to understand what you mean.
<zenspider>
jhass: its like they changed their mind on every line :)
rbowlby has quit [Remote host closed the connection]
<Odisus>
No i appreciate you correcting me, im a total noob and I thank you guys for being patient with me
<Odisus>
ok so i'll call it initialise and see what happens..
<Odisus>
initialize*
jo__ has joined #ruby-lang
<zenspider>
it won't do what you want.... because it will always return your new object, not the value you calculate at the end of that method
iamninja has quit [Quit: ZZZzzz…]
<zenspider>
so it'd be more like Blah.new(vals).value
caral_ has joined #ruby-lang
<Odisus>
Now its saying undefined variable assignment_name.. I pretty sure I defined it at the initialize method
<womble>
Odisus: Updated code, please.
caral has quit [Ping timeout: 250 seconds]
caral_ is now known as caral
<Odisus>
oh yes of course
robbyoconnor has quit [Read error: Connection reset by peer]
<Odisus>
Now it looks much cleaner with proper indentation
<jhass>
;)
<jhass>
and fixed the end too!
<jhass>
should give you a new error
<Odisus>
Yeah ;w;
<Odisus>
am I using the to_s improperly?
<Odisus>
I was thinking that I had to turn it into a string in order to display it as one
<jhass>
I'm pretty certain about the error you get, but don't make us guess it
stardiviner has quit [Ping timeout: 245 seconds]
<Odisus>
D:/Libraries/My Documents/Ruby shit/class/homework1alt1.rb:12:in `+': no implicit conversion of Fixnum into String (TypeError) from D:/Libraries/My Documents/Ruby shit/class/homework1alt1.rb:12:in `initialize' from D:/Libraries/My Documents/Ruby shit/class/homework1alt1.rb:16:in `new' from D:/Libraries/My Documents/Ruby shit/class/homework1alt1.rb:16:in `<main>'
<jhass>
so let's try to understand what that means or when it happens
<jhass>
a more minimal example to produce it maybe:
<jhass>
>> "hi" + 1
<eval-in__>
jhass => no implicit conversion of Fixnum into String (TypeError) ... (https://eval.in/279029)
<Odisus>
Are you saying im adding a string to a number?
chouhoulis has joined #ruby-lang
<jhass>
>> 1 + "hi"
<eval-in__>
jhass => String can't be coerced into Fixnum (TypeError) ... (https://eval.in/279030)
<jhass>
no, that's ^ this one
tkuchiki has quit [Remote host closed the connection]
<jhass>
you're adding a number to a string ;)
prereflect has joined #ruby-lang
<Odisus>
But I fed "sesson01 hw" to assignment_name and 5 then 3 to max_points and points. assignment is a string and the other two are numbers
<jhass>
yes
<Odisus>
unless you're saying its the .value thats turning everything into numbers
<jhass>
no, the .value is not even reached yet
<jhass>
that error message has a line number
<Odisus>
Oh! i see it now. Line 12
<Odisus>
So its when I try to print it is the problem
<jhass>
that line has the error
<jhass>
it doesn't say the print operation is the problem
pico-pete has quit []
<Odisus>
Fixnum into string... wouldn't the to_s fix the problem... hmmm
<jhass>
on what do you call it?
<Odisus>
assignment_name...
<jhass>
you already stated which variable has which value
<jhass>
where are numbers
Newbie0086 has joined #ruby-lang
marr has quit [Ping timeout: 240 seconds]
<jhass>
where would you try to add a number to a string?
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Odisus>
when I initialize @assignment_name for the first time!
Aova has quit [Read error: Connection reset by peer]
<jhass>
is that line 12?
<Odisus>
no thats line 8...
<zenspider>
Odisus: you're not even trying to smell the hints that jhass is giving you
<Odisus>
I'm not understanding...
<zenspider>
he's saying to focus on line 12
hendranata_ has joined #ruby-lang
<Odisus>
I see it.. he's saying im putting a number into it but I dont see how thats possible
<Odisus>
I put sesson01 into it which is a string
<jhass>
what's max_points?
<Odisus>
OH
<Odisus>
ITS TRYING TO ADD MAXPOINTS INTO ASSIGNMENT NAME
<Odisus>
*Kisses jhass*
<Odisus>
I dont know who you are kind internet stranger but I love you
<jhass>
so I guess you slapped some .to_s onto it
<jhass>
there's a prettier way to write that line:
<Odisus>
how would you write it?
duderonomy has joined #ruby-lang
caral has quit [Quit: caral]
<jhass>
puts "#{assignment_name}: #{max_points} #{points_received}" for example (your intent is not completely clear)
<Odisus>
aha
<jhass>
Using #{} inside strings takes arbitrary ruby expressions and calls .to_s on the result for you
<jhass>
and places that into the string there
Aova has joined #ruby-lang
<Odisus>
Thats much better
shinnya has quit [Ping timeout: 245 seconds]
<jhass>
to associate a term to that construct: it's called string interpolation
stardiviner has joined #ruby-lang
<Odisus>
I see!
iliketurtles has quit [Remote host closed the connection]
cmisenas has quit [Quit: cmisenas]
<Odisus>
I
<Odisus>
I'll update my code on githib, im having more problems...
<Odisus>
': undefined method `value' for #<Grade:0x000000027dada0> (NoMethodError)
<zenspider>
did you define value?
<jhass>
so, .value was just an example by zenspider
<jhass>
it's not given to you by ruby
<Odisus>
and when I erase .value its saying undefined method Grades
<jhass>
you need to define it in your class (and can choose any name)
<jhass>
that sounds like you removed .new too
<Odisus>
I didn
<Odisus>
i didnt
<jhass>
or kept a . at the end of one line
<Odisus>
Ok i'll try it again
<Odisus>
': undefined method `Grade' for main:Object (NoMethodError)
<Odisus>
When I clearly defined Grade earlier
<jhass>
what's the exact code producing that?
<Odisus>
Its line 16, where I typed Grade.new("sesson01 hw", 5, 3)
<jhass>
and what's the _exact_ and _full_ line before that?
<Odisus>
end....
Newbie0086 has quit [Ping timeout: 245 seconds]
amsi has quit [Quit: Leaving]
rbowlby has joined #ruby-lang
<Odisus>
am I missing something? Do i need to assign a variable to it to 'wake it'?
tkuchiki has joined #ruby-lang
<jhass>
I'm not getting that if I copy paste you last gist and remove the .value's
<Odisus>
or for it to recognize theres a class named Grade
<Odisus>
It works now, I had another method in there old code
<Odisus>
Thanks!
yfeldblu_ has joined #ruby-lang
yfeldblum has quit [Read error: Connection reset by peer]
<jhass>
Odisus: now review your assignment, I doubt printing something in a classes initializer was the intention
<Odisus>
it isn't, constructing the class was the part that gave me the most problem. It's actually reading a text file and using it to create more 'Grades'
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Odisus>
But I will work on it for another hour or two before i ask for more help
<Odisus>
Like you said, I can't just have other people work on the homework for me
lytol has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
houhoulis has joined #ruby-lang
gwendall_ has quit [Remote host closed the connection]
tunaCanBruh has quit [Ping timeout: 244 seconds]
gwendall has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
ledestin has joined #ruby-lang
apeiros_ has joined #ruby-lang
prereflect has quit [Remote host closed the connection]
oak_alternate has quit [Ping timeout: 245 seconds]
hendranata_ has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: i've nodded off.]
houhoulis has quit [Ping timeout: 252 seconds]
hendranata_ has joined #ruby-lang
Newbie0086 has joined #ruby-lang
gwendall has quit [Ping timeout: 252 seconds]
b_hoffman has joined #ruby-lang
gwendall has joined #ruby-lang
hendranata_ has quit [Remote host closed the connection]
hendranata_ has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
Newbie0086 has quit [Ping timeout: 252 seconds]
gwendall has quit [Ping timeout: 252 seconds]
riotjones has joined #ruby-lang
riotjones has quit [Ping timeout: 245 seconds]
Newbie0086 has joined #ruby-lang
amclain has joined #ruby-lang
fujimura has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
simi has quit [Ping timeout: 250 seconds]
b_hoffman has quit [Quit: b_hoffman]
Aova has joined #ruby-lang
nathanstitt has joined #ruby-lang
ur5us has joined #ruby-lang
brooks has joined #ruby-lang
b_hoffman has joined #ruby-lang
theOak has joined #ruby-lang
iliketurtles has joined #ruby-lang
theOak has quit [Read error: Connection reset by peer]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aova has quit [Read error: Connection reset by peer]
oleo__ has joined #ruby-lang
oleo is now known as Guest14469
arooni-mobile has joined #ruby-lang
Guest14469 has quit [Ping timeout: 265 seconds]
wallerdev has joined #ruby-lang
Aova has joined #ruby-lang
StreetlampSalad has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
ItSANgo_ has quit [Quit: Leaving...]
Bwild has joined #ruby-lang
RobertBirnie has joined #ruby-lang
marcdel has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
amystephen has quit [Ping timeout: 244 seconds]
_djbkd has quit [Read error: Connection reset by peer]
ur5us has quit [Remote host closed the connection]
mshieldsdunn has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ur5us has joined #ruby-lang
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
b_hoffman has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
j4cknewt has joined #ruby-lang
ur5us has quit [Ping timeout: 264 seconds]
j4cknewt has quit [Ping timeout: 240 seconds]
jgpawletko has quit [Quit: jgpawletko]
Musashi007 has joined #ruby-lang
pwnz0r has joined #ruby-lang
sindork has quit [Ping timeout: 265 seconds]
riotjones has joined #ruby-lang
brixen has quit [Ping timeout: 246 seconds]
ItSANgo has joined #ruby-lang
hendranata_ has quit [Quit: Leaving]
hendranata_ has joined #ruby-lang
havenwood has joined #ruby-lang
riotjones has quit [Ping timeout: 264 seconds]
j4cknewt has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
djinni` has quit [Ping timeout: 252 seconds]
crdpink has joined #ruby-lang
Sadin has joined #ruby-lang
xybre has quit [Ping timeout: 245 seconds]
malev has quit [Ping timeout: 240 seconds]
Sadin has quit [Ping timeout: 264 seconds]
djinni` has joined #ruby-lang
xybre has joined #ruby-lang
sindork has joined #ruby-lang
mattyohe has quit [Quit: Connection closed for inactivity]
nathanstitt has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
brixen has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
pwnz0r has quit [Remote host closed the connection]
cytomich has joined #ruby-lang
Aova has joined #ruby-lang
_djbkd has joined #ruby-lang
djinni` has quit [Ping timeout: 252 seconds]
StreetlampSalad has quit [Remote host closed the connection]
_djbkd has quit [Client Quit]
yatish27 has joined #ruby-lang
rahul_j has joined #ruby-lang
p3ery has quit [Quit: (null)]
piotrj has joined #ruby-lang
slawrence00 has joined #ruby-lang
mshieldsdunn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RobertBirnie has joined #ruby-lang
StreetlampSalad has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
Musashi007 has quit [Quit: Musashi007]
arooni-mobile has quit [Ping timeout: 255 seconds]
cytomich has left #ruby-lang [#ruby-lang]
b_hoffman has quit [Quit: b_hoffman]
cytomich has joined #ruby-lang
cytomich has left #ruby-lang [#ruby-lang]
oak_alternate has joined #ruby-lang
piotrj has quit [Ping timeout: 245 seconds]
gix has quit [Ping timeout: 255 seconds]
piotrj has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
StreetlampSalad has quit []
yatish27 has quit [Remote host closed the connection]
b_hoffman has joined #ruby-lang
gix has joined #ruby-lang
fujimura has quit []
cytomich has joined #ruby-lang
fujimura has joined #ruby-lang
jefus has quit [Ping timeout: 255 seconds]
fujimura has quit [Client Quit]
sudoubuntu has joined #ruby-lang
piotrj has quit [Read error: Connection reset by peer]
cytomich has left #ruby-lang [#ruby-lang]
piotrj has joined #ruby-lang
iamninja has quit [Quit: ZZZzzz…]
cytomich has joined #ruby-lang
jefus has joined #ruby-lang
deol has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
fujimura has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
piotrj has quit [Read error: Connection reset by peer]
rahul_j has joined #ruby-lang
rahul_j has quit [Client Quit]
brooks has quit [Quit: brooks]
Aova has joined #ruby-lang
piotrj has joined #ruby-lang
duderonomy has joined #ruby-lang
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby-lang
mshieldsdunn has joined #ruby-lang
marcdel has quit []
jxie has quit [Ping timeout: 245 seconds]
jo__ has quit [Quit: Connection closed for inactivity]
djinni` has joined #ruby-lang
jxie has joined #ruby-lang
zach has quit [Remote host closed the connection]
maso has quit [Remote host closed the connection]
djinni` has quit [Ping timeout: 264 seconds]
havenwood has quit [Remote host closed the connection]
b_hoffman has quit [Quit: b_hoffman]
Musashi007 has quit [Quit: Musashi007]
stonith has quit [Ping timeout: 265 seconds]
stonith has joined #ruby-lang
jxie has quit [Ping timeout: 252 seconds]
jxie has joined #ruby-lang
mshieldsdunn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aova has quit [Read error: Connection reset by peer]
roamingdog has quit [Remote host closed the connection]
Aova has joined #ruby-lang
dellavg_ has joined #ruby-lang
fedexo has joined #ruby-lang
skade has joined #ruby-lang
Averna has quit [Quit: Leaving.]
piotrj has quit [Read error: Connection reset by peer]
piotrj has joined #ruby-lang
roamingdog has joined #ruby-lang
hramrach has quit [Ping timeout: 250 seconds]
hramrach has joined #ruby-lang
oleo__ has quit [Quit: Verlassend]
Lito has joined #ruby-lang
<Lito>
Hi! I’m getting weird results from the Matrix core lib’s Inverse function. Matrix.identity(3).inv is… fractional numbers? I’ve tried on three post-2.0.0 versions. Is this a known bug? Anyone else see this?
<Lito>
Even the example from the docs is broken- the expession shown doesn’t give the result listed.
roamingdog has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 264 seconds]
qba73 has joined #ruby-lang
shinnya has joined #ruby-lang
riotjones has joined #ruby-lang
rahul_j has joined #ruby-lang
Sadin has joined #ruby-lang
apeiros_ has quit [Read error: Connection reset by peer]
apeiros__ has joined #ruby-lang
piotrj has quit [Remote host closed the connection]
Sadin has quit [Remote host closed the connection]
AlexAltea has joined #ruby-lang
Lito has left #ruby-lang [#ruby-lang]
fclausen has quit [Quit: leaving]
Sadin has joined #ruby-lang
apeiros__ has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
mshieldsdunn has joined #ruby-lang
marcdel has joined #ruby-lang
piotrj has joined #ruby-lang
morton has joined #ruby-lang
<morton>
is there a higher language than ruby
Aova has quit [Read error: Connection reset by peer]
<FastJack>
morton: marketing speak ;)
Musashi007 has joined #ruby-lang
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<morton>
i dont mind if it's slower
Asher2 has quit [Read error: No route to host]
Asher has joined #ruby-lang
Aova has joined #ruby-lang
solars has joined #ruby-lang
AlexAltea has quit [Quit: Leaving]
AlexAltea has joined #ruby-lang
lele|m has joined #ruby-lang
Torrieri has quit [Read error: Connection reset by peer]
Torrieri has joined #ruby-lang
Torrieri has joined #ruby-lang
Sadin has quit [Remote host closed the connection]
Sadin has joined #ruby-lang
Sadin has quit [Remote host closed the connection]
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby-lang
cytomich has left #ruby-lang [#ruby-lang]
piotrj_ has joined #ruby-lang
morton has quit [Quit: Leaving]
cytomich has joined #ruby-lang
piotrj has quit [Read error: Connection reset by peer]
qba73 has quit [Ping timeout: 264 seconds]
yfeldblu_ has quit [Ping timeout: 245 seconds]
apeiros_ has joined #ruby-lang
BubonicPestilenc has joined #ruby-lang
marcdel has quit []
caral has joined #ruby-lang
caral has quit [Client Quit]
piotrj_ has quit [Read error: Connection reset by peer]
piotrj_ has joined #ruby-lang
piotrj__ has joined #ruby-lang
piotrj_ has quit [Read error: Connection reset by peer]
hendranata_ has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
hendranata_ has joined #ruby-lang
cornerma1 has joined #ruby-lang
marcdel has joined #ruby-lang
cornerman has quit [Ping timeout: 245 seconds]
cornerma1 is now known as cornerman
djellemah has joined #ruby-lang
wallerdev has quit [Ping timeout: 252 seconds]
amclain has quit [Quit: Leaving]
AlexAltea has quit [Ping timeout: 252 seconds]
Aova has quit [Read error: Connection reset by peer]
Guest76 has joined #ruby-lang
ocko has joined #ruby-lang
Aova has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
coffeejunk has quit [Remote host closed the connection]
coffeejunk has joined #ruby-lang
ocko has quit [Remote host closed the connection]
rahul_j has joined #ruby-lang
ocko has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_shinnc has joined #ruby-lang
_shinnc has quit [Changing host]
_shinnc has joined #ruby-lang
lytol has joined #ruby-lang
simi has joined #ruby-lang
Musashi007 has joined #ruby-lang
<ocko>
hi :)
benlovell has joined #ruby-lang
TvL2386 has joined #ruby-lang
dziemid has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
iamninja has joined #ruby-lang
piotrj has joined #ruby-lang
yfeldblum has joined #ruby-lang
piotrj__ has quit [Ping timeout: 255 seconds]
Torrieri has quit [Ping timeout: 245 seconds]
ghostpl has joined #ruby-lang
isolde has joined #ruby-lang
isolde is now known as Guest67266
<Guest67266>
pastie: hi!
<Guest67266>
pastie: hi!
benlovell has quit [Ping timeout: 264 seconds]
ocdmw has quit [Remote host closed the connection]
Guest67266 has left #ruby-lang [#ruby-lang]
yfeldblu_ has joined #ruby-lang
mshieldsdunn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest76 has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
knarz has joined #ruby-lang
<knarz>
pastie: hi!
hahuang61 has quit [Ping timeout: 245 seconds]
mkaesz has joined #ruby-lang
<knarz>
pastie
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has joined #ruby-lang
dziemid has quit []
knarz has quit [Client Quit]
piotrj has quit []
marcdel has quit []
Guest76 has joined #ruby-lang
vrinek has joined #ruby-lang
wallerdev has joined #ruby-lang
futilegames has joined #ruby-lang
lele has joined #ruby-lang
lele|m has quit [Quit: bye!]
Viv has joined #ruby-lang
qba73 has joined #ruby-lang
|jemc| has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
diegoviola has quit [Remote host closed the connection]
j4cknewt has joined #ruby-lang
vrinek has quit [Quit: Leaving...]
<yorickpeterse>
morning
wallerdev has quit [Ping timeout: 244 seconds]
Aova has joined #ruby-lang
marr has joined #ruby-lang
stamina has joined #ruby-lang
vrinek has joined #ruby-lang
vrinek has quit [Client Quit]
|jemc| has quit [Ping timeout: 256 seconds]
Newbie0086 has quit [Ping timeout: 264 seconds]
lele has quit [Ping timeout: 252 seconds]
j4cknewt has quit [Remote host closed the connection]
frzng has joined #ruby-lang
j4cknewt has joined #ruby-lang
lele has joined #ruby-lang
benlovell has joined #ruby-lang
Musashi007 has quit [Quit: Musashi007]
mkaesz has quit [Remote host closed the connection]
Musashi007 has joined #ruby-lang
fedexo has quit [Ping timeout: 256 seconds]
qba73 has quit []
mkaesz has joined #ruby-lang
djbkd has quit [Read error: Connection reset by peer]
lytol has quit [Read error: Connection reset by peer]
ocdmw has joined #ruby-lang
djbkd has joined #ruby-lang
lytol has joined #ruby-lang
tcopeland1 has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
ayonkhan has joined #ruby-lang
Musashi007 has quit [Client Quit]
rahul_j has quit [Ping timeout: 256 seconds]
throneless has joined #ruby-lang
brixen has quit [Ping timeout: 252 seconds]
rahul_j has joined #ruby-lang
hendranata_ has quit [Ping timeout: 252 seconds]
stardiviner has quit [Ping timeout: 252 seconds]
skade has quit [Ping timeout: 240 seconds]
tcopeland has quit [Ping timeout: 252 seconds]
ocdmw has quit [Remote host closed the connection]
intinig has quit [Remote host closed the connection]
skade has joined #ruby-lang
arBmind has joined #ruby-lang
brixen has joined #ruby-lang
lytol has quit [Remote host closed the connection]
throneless has quit [Remote host closed the connection]
rbowlby has quit [Ping timeout: 245 seconds]
arBmind has quit [Quit: Leaving.]
Aova has quit [Read error: Connection reset by peer]
_shinnc has quit [Quit: _shinnc]
rahul_j has quit [Quit: rahul_j]
wallerdev has joined #ruby-lang
rahul_j has joined #ruby-lang
j4cknewt has joined #ruby-lang
AlexAltea has joined #ruby-lang
wallerdev has quit [Ping timeout: 245 seconds]
Aova has joined #ruby-lang
intinig has joined #ruby-lang
Locke23rus has joined #ruby-lang
oak_alternate has quit [Quit: oak_alternate]
rahul_j has quit [Ping timeout: 264 seconds]
rahul_j has joined #ruby-lang
rbowlby has joined #ruby-lang
arBmind has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
Antivan has joined #ruby-lang
rbowlby_ has quit [Ping timeout: 244 seconds]
j4cknewt has quit [Remote host closed the connection]
rahul_j has joined #ruby-lang
j4cknewt has joined #ruby-lang
piotrjakubowski has joined #ruby-lang
piotrjakubowski has quit [Client Quit]
piotrjakubowski has joined #ruby-lang
stef204 has joined #ruby-lang
j4cknewt has quit [Ping timeout: 256 seconds]
ldnunes has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
rahul_j has joined #ruby-lang
ocdmw has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
Integralist has joined #ruby-lang
piotrjakubowski is now known as piotrj
ocdmw has quit [Ping timeout: 264 seconds]
djellemah has quit [Ping timeout: 264 seconds]
rahul_j has quit [Read error: Connection reset by peer]
ruby-lang712 has joined #ruby-lang
rahul_j has joined #ruby-lang
ruby-lang712 has left #ruby-lang [#ruby-lang]
lytol has quit [Remote host closed the connection]
fusillicode1 has joined #ruby-lang
AlexAltea has quit [Ping timeout: 252 seconds]
fusillicode has quit [Ping timeout: 244 seconds]
Aova has quit [Read error: Connection reset by peer]
rahul_j has quit [Read error: Connection reset by peer]
Aova has joined #ruby-lang
rahul_j has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
rahul_j has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby-lang
rahul_j has joined #ruby-lang
benlovell has quit [Ping timeout: 264 seconds]
AlexAltea has joined #ruby-lang
tkuchiki has quit [Ping timeout: 245 seconds]
benlovell has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
rahul_j has joined #ruby-lang
diegoviola has quit [Remote host closed the connection]
mostlybadfly has joined #ruby-lang
skade has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
piotrj has quit [Quit: leaving]
rahul_j has joined #ruby-lang
postmodern has quit [Quit: Leaving]
Viv has quit [Ping timeout: 255 seconds]
Locke23rus has quit [Remote host closed the connection]
kith_ has joined #ruby-lang
kith has quit [Ping timeout: 250 seconds]
rahul_j has quit [Read error: Connection reset by peer]
Guest76 has quit [Read error: Connection reset by peer]
benlovell has quit [Ping timeout: 250 seconds]
Asher2 has joined #ruby-lang
kith_ is now known as kith
intinig has quit [Remote host closed the connection]
lapide_viridi has joined #ruby-lang
Xzyx987X has joined #ruby-lang
intinig has joined #ruby-lang
Asher has quit [Ping timeout: 265 seconds]
rahul_j has joined #ruby-lang
jxie has quit [Ping timeout: 250 seconds]
jefus has quit [Ping timeout: 250 seconds]
benlakey has quit [Ping timeout: 245 seconds]
_ko1 has quit [Ping timeout: 265 seconds]
Xzyx987X_ has quit [Ping timeout: 250 seconds]
tcopeland1 has quit [Quit: Leaving.]
jxie has joined #ruby-lang
badeball has quit [Ping timeout: 244 seconds]
hahuang65 has quit [Read error: Connection reset by peer]
znz_jp has quit [Ping timeout: 250 seconds]
jefus has joined #ruby-lang
badeball has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
benlakey has joined #ruby-lang
simi has quit [Ping timeout: 250 seconds]
yfeldblu_ has quit [Ping timeout: 252 seconds]
tobiasvl has quit [Ping timeout: 245 seconds]
znz_jp has joined #ruby-lang
znz_jp has quit [Client Quit]
dbussink has quit [Ping timeout: 265 seconds]
tvl has joined #ruby-lang
tvl is now known as tobiasvl
rahul_j has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby-lang
charliesome has joined #ruby-lang
znz_jp has joined #ruby-lang
x0f has quit [Ping timeout: 250 seconds]
rahul_j has joined #ruby-lang
x0f has joined #ruby-lang
dbussink has joined #ruby-lang
intinig has quit [Remote host closed the connection]
Integralist has quit [Quit: leaving]
marcdel has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
rahul_j has quit [Read error: Connection reset by peer]
rahul_j has joined #ruby-lang
tunaCanBruh has quit [*.net *.split]
chrisseaton has quit [*.net *.split]
adambeynon has quit [*.net *.split]
ritek has quit [*.net *.split]
SkramX_ has quit [*.net *.split]
Guest85414______ has quit [*.net *.split]
[spoiler] has quit [*.net *.split]
EvilJStoker has quit [*.net *.split]
canton7 has quit [*.net *.split]
ja_robol has quit [*.net *.split]
moogumbo_ has quit [*.net *.split]
jhass has quit [*.net *.split]
ggherdov has quit [*.net *.split]
dlackty__ has quit [*.net *.split]
surrounder has quit [*.net *.split]
rflot has quit [*.net *.split]
flavorjones has quit [*.net *.split]
allolex____ has quit [*.net *.split]
wizonesolutions has quit [*.net *.split]
bcardarella_ has quit [*.net *.split]
_dabradley has quit [*.net *.split]
ruskie has quit [*.net *.split]
womble has quit [*.net *.split]
karma_ has quit [*.net *.split]
EvilJStoker has joined #ruby-lang
wizonesolutions has joined #ruby-lang
Aova has joined #ruby-lang
Antivan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tunaCanBruh has joined #ruby-lang
chrisseaton has joined #ruby-lang
adambeynon has joined #ruby-lang
ritek has joined #ruby-lang
SkramX_ has joined #ruby-lang
Guest85414______ has joined #ruby-lang
[spoiler] has joined #ruby-lang
karma_ has joined #ruby-lang
canton7 has joined #ruby-lang
ja_robol has joined #ruby-lang
moogumbo_ has joined #ruby-lang
jhass has joined #ruby-lang
dlackty__ has joined #ruby-lang
surrounder has joined #ruby-lang
rflot has joined #ruby-lang
flavorjones has joined #ruby-lang
allolex____ has joined #ruby-lang
bcardarella_ has joined #ruby-lang
_dabradley has joined #ruby-lang
womble has joined #ruby-lang
marcdel has quit []
ggherdov has joined #ruby-lang
intinig has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
arooni-mobile has joined #ruby-lang
rahul_j has joined #ruby-lang
simi has joined #ruby-lang
roamingdog has joined #ruby-lang
lapide_viridi has quit [Ping timeout: 255 seconds]
diegoviola has quit [Remote host closed the connection]
rahul_j has quit [Read error: Connection reset by peer]
RitterJack has joined #ruby-lang
djellemah has joined #ruby-lang
rahul_j has joined #ruby-lang
havenwood has joined #ruby-lang
ruskie has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
rahul_j has quit [Read error: Connection reset by peer]
rahul_j has joined #ruby-lang
mnngfltg has joined #ruby-lang
rahul_j has quit [Read error: Connection reset by peer]
djellemah has quit [Ping timeout: 264 seconds]
rahul_j has joined #ruby-lang
benlovell has joined #ruby-lang
ayonkhan has quit [Quit: (null)]
rahul_j has quit [Read error: Connection reset by peer]
arooni-mobile has quit [Ping timeout: 240 seconds]
redgluten has joined #ruby-lang
simi has quit [Ping timeout: 240 seconds]
rahul_j has joined #ruby-lang
redgluten has left #ruby-lang [#ruby-lang]
Bwild has quit [Quit: leaving]
Aova has quit [Read error: Connection reset by peer]
Aova has joined #ruby-lang
kapil__ has quit [Quit: Connection closed for inactivity]
b_hoffman has joined #ruby-lang
ghostpl has quit [Remote host closed the connection]
roamingdog has joined #ruby-lang
oleo has joined #ruby-lang
ghostpl has joined #ruby-lang
riotjones has quit [Remote host closed the connection]
tcopeland has joined #ruby-lang
tenderlove has joined #ruby-lang
ledestin has quit [Quit: ledestin]
roamingdog has quit [Read error: Connection reset by peer]
roamingd_ has joined #ruby-lang
roamingdog has joined #ruby-lang
roamingd_ has quit [Ping timeout: 264 seconds]
roamingdog has quit [Read error: Connection reset by peer]
roamingdog has joined #ruby-lang
yfeldblum has joined #ruby-lang
<maloik>
anyone here play around with exercism? I'm trying to figure out how to see which exercise is up next
<maloik>
or which is the last I can do
yfeldblum has quit [Ping timeout: 264 seconds]
<maloik>
nvm, just compared the ones on the site with those in my directory, found the missing one
arooni-mobile has joined #ruby-lang
hobbling_horse has joined #ruby-lang
<hobbling_horse>
are multiline strings delimited by simple quotes ' or " proper ruby? or just some quirk of the one implementation I have that allows them?
<tobiasvl>
hobbling_horse: yeah, newlines inserted in a regular string works fine
hendranata_ has quit [Ping timeout: 250 seconds]
<tobiasvl>
that will actually insert newlines in the string
<hobbling_horse>
where is that from originally? perl?
<[spoiler]>
Although it's not common to use "/' strings with newlined, the preferred syntax is %Q{ ... } and %q{ ... }
<[spoiler]>
newlines*
<[spoiler]>
if you want multiline strings
<yorickpeterse>
there are a multitude of ways for it
<yorickpeterse>
"foo" \
<yorickpeterse>
"bar"
<yorickpeterse>
for example
<yorickpeterse>
or "foo
<yorickpeterse>
bar"
<tobiasvl>
<<-eos
<tobiasvl>
foo
<tobiasvl>
eos
<yorickpeterse>
^ or that
* [spoiler]
still likes %Q{} better :P
<[spoiler]>
I've never liked heredocs much, tbf
sankaber has joined #ruby-lang
Pugsley_ has joined #ruby-lang
arBmind1 has joined #ruby-lang
mnngfltg has quit [Quit: Ex-Chat]
arBmind has quit [Ping timeout: 244 seconds]
* apeiros_
likes %{} without Q
<epitron>
+1 for %{} instead of heredocs
mnngfltg has joined #ruby-lang
mnngfltg has quit [Remote host closed the connection]
mnngfltg has joined #ruby-lang
mnngfltg has quit [Client Quit]
Aova has quit [Read error: Connection reset by peer]
TvL2386 has quit [Quit: Ex-Chat]
mkaesz has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 250 seconds]
tkuchiki has joined #ruby-lang
mkaesz has joined #ruby-lang
jo__ has joined #ruby-lang
enebo has joined #ruby-lang
Aova has joined #ruby-lang
hobbling_horse has quit [Quit: Page closed]
<[spoiler]>
The only reason I prefer %Q{} over %{} is verbosity, but yeah it's generally better than heredocs IHMO
mostlybadfly has quit [Quit: Connection closed for inactivity]
simi has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 265 seconds]
malconis has joined #ruby-lang
malconis has quit [Remote host closed the connection]
malconis has joined #ruby-lang
riotjones has joined #ruby-lang
arooni-mobile has quit [Ping timeout: 250 seconds]
jgpawletko has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fujimura has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 245 seconds]
yatish27 has joined #ruby-lang
Pugsley has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
stamina has quit [Quit: WeeChat 1.1.1]
symm- has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
b_hoffman has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
Vivex has quit [Ping timeout: 255 seconds]
dzejrou has joined #ruby-lang
_br_- has quit [Ping timeout: 264 seconds]
fujimura has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
_br_ has joined #ruby-lang
ghostpl has quit [Remote host closed the connection]
fujimura has quit [Remote host closed the connection]
marcdel has joined #ruby-lang
fujimura has joined #ruby-lang
ghostpl has joined #ruby-lang
ocko has quit [Remote host closed the connection]
Pugsley has quit [Ping timeout: 245 seconds]
intinig has quit [Read error: Connection reset by peer]
whippythellama has joined #ruby-lang
intinig has joined #ruby-lang
marcdel has quit [Ping timeout: 250 seconds]
marcdel has joined #ruby-lang
cmisenas has joined #ruby-lang
mkaesz has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
gwendall has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
symm- has quit [Quit: Leaving...]
RitterJack has quit [Remote host closed the connection]
Aova has joined #ruby-lang
ghostpl has quit [Remote host closed the connection]
AlexAltea has quit [Ping timeout: 264 seconds]
tunaCanBruh has joined #ruby-lang
ghostpl has joined #ruby-lang
j4cknewt has joined #ruby-lang
<ljarvis>
%{} > %Q{} because then you don't have to remember %q vs %Q
mattyohe has joined #ruby-lang
rippa has joined #ruby-lang
ta_ has quit [Quit: Leaving...]
j4cknewt has quit [Remote host closed the connection]
AckZ has joined #ruby-lang
oleo__ has joined #ruby-lang
oleo is now known as Guest51060
<apeiros_>
ljarvis: well, you still have to remember that %{} is ""
<AckZ>
hey all.. i'm looking for a shorter way to do something like [1,2,3].detect { |x| x == 1 } ... is there anything in stdlib that does that?
<ljarvis>
not really
<ljarvis>
AckZ: no
<ljarvis>
but for the sake of you giving a crappy example, [[1,2,3].first]
Guest51060 has quit [Ping timeout: 264 seconds]
the_real_intinig has joined #ruby-lang
the_real_intinig is now known as intinig_
oleo__ has quit [Read error: Connection reset by peer]
ta has quit [Ping timeout: 252 seconds]
mkaesz has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
marcdel has quit []
ta has joined #ruby-lang
rikkipitt has joined #ruby-lang
<canton7>
AckZ, [1, 2, 3].include?(1) does something similar
roamingdog has joined #ruby-lang
oleo__ has joined #ruby-lang
oleo__ is now known as oleo
yfeldblum has joined #ruby-lang
intinig has quit [Ping timeout: 264 seconds]
gwendall has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 244 seconds]
ocdmw has joined #ruby-lang
marcdel has joined #ruby-lang
Vivex has joined #ruby-lang
<maloik>
I think those are not what he meant to accomplish, mostly talking about grabbing all elements from an array based on some predicate
tenderlove has quit [Quit: Leaving...]
marcdel has quit [Ping timeout: 250 seconds]
marcdel has joined #ruby-lang
Vivex has quit [Ping timeout: 245 seconds]
RobertBirnie has joined #ruby-lang
slawrence00 has joined #ruby-lang
<AckZ>
nah, i was looking to return an element if it exists in the array, otherwise nil... it's probably a silly thing to be doing in any case
<apeiros_>
ary.include?(ele) ? ele : nil
<maloik>
oh I see
<apeiros_>
but hurray for meaningful explanation :p
<apeiros_>
praise the sun
<maloik>
your example wouldn't do that though, it'd only return empty array or an array of your object (possibly more than one)
slawrenc_ has joined #ruby-lang
slawrenc_ has quit [Client Quit]
slawrenc_ has joined #ruby-lang
ledestin has joined #ruby-lang
ta_ has joined #ruby-lang
<ljarvis>
probably wants falsely i bet, too
<ljarvis>
also arr.find { |x| x == ele } > include? with ternary
<ljarvis>
</pedant>
<apeiros_>
I'm a performance fetishist, so I prefer include? over find+block
rahul_j has joined #ruby-lang
<apeiros_>
(yes, I know it's weird that I use ruby)
<ljarvis>
yep
<apeiros_>
though, actually I prefer include? semantically too
ta_ has quit [Ping timeout: 244 seconds]
fujimura has quit [Remote host closed the connection]
<maloik>
I keep forgetting .find isn't like select
<ljarvis>
.find is awesome. I will concede that include? is a *lot* faster though. But also reiterate the "performance? lul ruby" comment
<maloik>
:D
<maloik>
colleagues are taking forever to let the weekend commence