<havenwood>
crome: Actually ruby-build ships their own OpenSSL, which causes issues when folk update their package manager's OpenSSL, rebuild Ruby and are still using a dated OpenSSL from their ruby-build.
<havenwood>
crome: I think it's a bad, bad thing to do!
cmckee has joined #ruby
_Andres has quit [Quit: jazz]
<havenwood>
crome: The rbenv devs do other stuff I don't agree with though, like add "./bin" to PATH. TIMTOWTDI I suppose, but security shouldn't just be tossed out.
* apeiros_
looks forward to see the precisely same code again in ~6h
<apeiros_>
with the same question, of course.
<blizzy>
>.>
<blizzy>
I'll be asleep in 6 hours though.
<apeiros_>
well, 10h then.
<apeiros_>
or whatever.
<blizzy>
couldn't I one line it?
<crome>
also, that if statement looks pretty weird, it either returns a string or a file
bonhoeffer has joined #ruby
<blizzy>
I guess I made it wrong.
_2_Daejua has quit [Remote host closed the connection]
<blizzy>
I'm basically checking: if the file exists, read it, else, make the file, then read it.
pengin has joined #ruby
<apeiros_>
crome: I wonder whether you'll say all the things too which I said hours ago :D (no sarcasm)
Kejento has joined #ruby
<apeiros_>
anyway, I'm off
<crome>
apeiros_: thanks for the heads-up, I will just let it go then :)
<blizzy>
so, what exactly is wrong with global variables?
<ferr>
apeiros_: do you have any suggestions how I could setup retry on cucumber tests (it sometimes fails as information is not propagated yet)
<apeiros_>
crome: meh, maybe they listen when more people say the same thing. no idea.
atomi has joined #ruby
<blizzy>
>.> I'm right here.
<apeiros_>
ferr: my only idea is that my head needs to hit a pillow like real fast.
<blizzy>
lol.
<blizzy>
sorry about earlier then.
<ferr>
Okay, have a nice rest then :)
<apeiros_>
blizzy: dude, don't complain. I'm right here too and you obviously ignored everything I said. so no moral high ground there.
<crome>
havenwood: I just tried it. rbenv built ruby with my system openssl
* apeiros_
off
<blizzy>
>.> I forgot about the channel
<blizzy>
since this channel is dead a lot.
fabrice31 has joined #ruby
<crome>
are you kidding? I'm in ~10 channels on multiple networks, this one is the liveliest one by far
Vivex_ has quit [Ping timeout: 245 seconds]
oo_ has joined #ruby
<blizzy>
well to me it seems dead.
<blizzy>
seems like I'm losing this battle, so sorry everyone.
<blizzy>
really, I am sorry.
<crome>
havenwood: also, the reason I mentioned the openssl dev libraries is because I managed to build broken rubies without openssl-dev because ruby-build did *not* provide those libraries
aryaching has quit [Read error: No route to host]
TheNet has joined #ruby
thsig has joined #ruby
fabrice31 has quit [Ping timeout: 245 seconds]
juanpablo_ has joined #ruby
tokik has joined #ruby
sagittarian|2 has joined #ruby
pengin has quit [Remote host closed the connection]
greensoup has joined #ruby
sagittarian has quit [Ping timeout: 252 seconds]
techietrash is now known as techietrash_away
techietrash_away is now known as techietrash
Takle_ has quit [Remote host closed the connection]
juanpablo_ has quit [Ping timeout: 250 seconds]
reinaldob has quit [Remote host closed the connection]
tunaCanBruh has joined #ruby
reinaldob has joined #ruby
<crome>
blizzy: don't really care about stuff like "how do I write xy better" or "can I make it in 1 line"
raphaelss has quit [Quit: leaving]
<crome>
especially the latter
<crome>
get stuff to work
<blizzy>
ok, thank you, and again, sorry, crome.
techietrash is now known as techietrash_away
techietrash_away is now known as techietrash
aryaching has joined #ruby
reinaldob has quit [Ping timeout: 252 seconds]
tunaCanBruh has quit [Ping timeout: 240 seconds]
atomi has quit [Quit: back in a few hours. more updates :/]
Musashi007 has joined #ruby
Vile` has quit [Read error: Connection reset by peer]
<bradland>
question regarding ruby hashes and arrays.
<bradland>
occassionally, when inspecting the output of a hash using `p foo` (where foo is a hash)
<bradland>
the output looks like ["123", {:name=>"brad", :title=>"janitor"}]
<bradland>
how does this work?
IrishGringo has quit [Read error: Connection reset by peer]
trufflesnout has quit [Remote host closed the connection]
<weaksauce>
blizzy global state can fail in weird ways. if you are using it, it should be a sign that you aren't doing it right
<bradland>
does ruby treat arrays structured a certain way the same as a hash?
<crome>
bradland: I would wager a beer to foo being an array
<blizzy>
oh ok, thanks, weaksauce.
<crome>
the first item is "123", the second item is a hash
<bradland>
crome: i'll see if i can post a code example
davedev24_ has joined #ruby
Vile` has joined #ruby
<weaksauce>
bradland yes. [[key, value], [key, value]] can sometimes be coerced into a hash
IrishGringo has joined #ruby
PanzerModern has quit [Remote host closed the connection]
<weaksauce>
but it's not as common as the other ways of type inference.
DEA7TH has quit [Remote host closed the connection]
mrmargol_ has quit [Remote host closed the connection]
jbae has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<bradland>
i'm scraping that data, and i'm certain that the site author wouldn't be happy about it, but i'm using the info for analysis of car pricing trend data for myself, not a commercial venture
athan has joined #ruby
<bradland>
the output is of the type Hash, but when inspected, it uses the ["foo", [{"bar" => "baz"}]] form
<bradland>
which always catches me off guard when i'm debugging
jottr has joined #ruby
<bradland>
weaksauce: i thought i'd read that before (about the coercion of this type of data structure)
<bradland>
anyway, i gotta grab some dinner, but i'll check the scrollback when i get back later
<bradland>
thx guys
DEA7TH has joined #ruby
pontiki has joined #ruby
bootstrappm has joined #ruby
pontiki has quit [Remote host closed the connection]
kalusn has quit [Remote host closed the connection]
kalusn has joined #ruby
Lucky___ has joined #ruby
tmoore has quit [Ping timeout: 250 seconds]
MiracleBlue has quit [Ping timeout: 250 seconds]
cstrahan_ has quit [Ping timeout: 250 seconds]
vcoinminer has quit [Ping timeout: 245 seconds]
n1ftyn8 has quit [Ping timeout: 250 seconds]
maZtah has quit [Ping timeout: 250 seconds]
featheryahn_ has quit [Read error: Connection reset by peer]
charles81 has quit [Read error: Connection reset by peer]
jeregrine has quit [Ping timeout: 265 seconds]
hellschreiber has quit [Ping timeout: 250 seconds]
rfv has quit [Read error: Connection reset by peer]
marr has quit [Ping timeout: 265 seconds]
lioninawhat has quit [Remote host closed the connection]
poikon has quit [Ping timeout: 250 seconds]
jblancett has quit [Ping timeout: 250 seconds]
callenb___ has quit [Ping timeout: 265 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
bcavileer_ has quit [Ping timeout: 250 seconds]
skmp has quit [Ping timeout: 265 seconds]
djbender has quit [Ping timeout: 265 seconds]
deimos has quit [Ping timeout: 250 seconds]
kalusn has quit [Ping timeout: 252 seconds]
grubernaut has quit [Ping timeout: 265 seconds]
Musashi007 has quit [Quit: Musashi007]
alol__ has quit [Ping timeout: 250 seconds]
nahtnam has quit [Ping timeout: 265 seconds]
chrisseaton has quit [Ping timeout: 265 seconds]
adambeynon has quit [Ping timeout: 265 seconds]
OliverTynes has quit [Ping timeout: 250 seconds]
lioninawhat has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
lioninawhat has quit [Remote host closed the connection]
greensoup has quit [Ping timeout: 245 seconds]
callenb___ has joined #ruby
rfv has joined #ruby
poikon has joined #ruby
pontiki has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
adriancb has joined #ruby
psy_ has joined #ruby
jblancett has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
Cache_Money has quit [Quit: Cache_Money]
tmoore has joined #ruby
davedev24_ has joined #ruby
<dopie>
a dev from florida
<dopie>
where in florida davedev24_
aryaching_ has joined #ruby
featheryahn_ has joined #ruby
jeregrine has joined #ruby
skmp has joined #ruby
<eam>
the part with alligators
Lewix has joined #ruby
aryaching has quit [Ping timeout: 256 seconds]
MiracleBlue has joined #ruby
Sawbones has joined #ruby
charles81 has joined #ruby
aryaching_ is now known as aryaching
cstrahan_ has joined #ruby
maZtah has joined #ruby
vcoinminer has joined #ruby
n1ftyn8 has joined #ruby
djbender has joined #ruby
momomomomo has quit [Ping timeout: 250 seconds]
bcavileer_ has joined #ruby
nahtnam has joined #ruby
adambeynon has joined #ruby
deimos has joined #ruby
Megtastique has joined #ruby
alol__ has joined #ruby
grubernaut has joined #ruby
OliverTynes has joined #ruby
chrisseaton has joined #ruby
Sawbones has quit [Ping timeout: 256 seconds]
AlexRussia has quit [Ping timeout: 252 seconds]
hellschreiber has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
io_syl has joined #ruby
robustus has joined #ruby
io_syl has quit [Client Quit]
kalusn has joined #ruby
TheNet has quit [Remote host closed the connection]
wallerdev has joined #ruby
TheNet has joined #ruby
Musashi007 has joined #ruby
HOrangeJewce has joined #ruby
wallerdev has quit [Ping timeout: 246 seconds]
bogeyd6 has quit [Ping timeout: 240 seconds]
withnale__ has joined #ruby
Limix has joined #ruby
rbennacer has joined #ruby
greensoup has joined #ruby
iliketur_ has joined #ruby
jerematic has joined #ruby
withnale__ has quit [Ping timeout: 265 seconds]
ponga has joined #ruby
Musashi007 has quit [Quit: Musashi007]
_gautam_ has quit [Quit: Be back later ...]
bonhoeffer has quit [Quit: bonhoeffer]
rbennacer has quit [Ping timeout: 246 seconds]
iliketurtles has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
Aova has quit [Read error: Connection reset by peer]
lampd1 is now known as l1bot
jerematic has quit [Ping timeout: 240 seconds]
Limix has quit [Quit: Limix]
momomomomo has joined #ruby
l1bot is now known as lampd1
Aova has joined #ruby
goshdarnyou has joined #ruby
_gautam_ has joined #ruby
fabrice31 has joined #ruby
Lemur has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
jbae has left #ruby [#ruby]
Lemur has joined #ruby
greensoup has quit [Ping timeout: 252 seconds]
thsig has quit [Remote host closed the connection]
nii236 has quit [Remote host closed the connection]
thsig has joined #ruby
hamakn has joined #ruby
Sawbones has joined #ruby
krz has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
fabrice31 has quit [Ping timeout: 264 seconds]
juanpablo_ has joined #ruby
hamakn has joined #ruby
Lemur has quit [Ping timeout: 245 seconds]
razieliyo has quit [Ping timeout: 265 seconds]
thsig_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
thsig has quit [Ping timeout: 252 seconds]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nii236|irssi has joined #ruby
p3ery has joined #ruby
TheNet has quit [Remote host closed the connection]
juanpablo_ has quit [Ping timeout: 240 seconds]
TheNet has joined #ruby
tunaCanBruh has joined #ruby
DogHackit has joined #ruby
skj3gg has joined #ruby
momomomomo has quit [Quit: momomomomo]
Sawbones has quit [Remote host closed the connection]
TheNet has quit [Client Quit]
lys has joined #ruby
<DogHackit>
Hello. Does anyone know where I can find a good explaination for how to use a class object in an array? I want to use methods on the classes inside the array, utimately.
Sawbones has joined #ruby
lioninawhat has joined #ruby
<mozzarella>
uh? like array[0].method?
<bradland>
crome: derp. feel kind of dumb on that one (inspecting groups.first).
tunaCanBruh has quit [Ping timeout: 245 seconds]
sudog has quit [Ping timeout: 265 seconds]
kalusn has quit [Remote host closed the connection]
kalusn has joined #ruby
<bradland>
havenwood: is there aname for that form you sent to eval?
<DogHackit>
mozzarella: Kind of. I want to have class.new(arg1, arg2, arg 3), put a few of those in an array, then sort the array by arg1 for each antry
<havenwood>
bradland: some folk call it a naked or bare hash
greensoup has joined #ruby
<havenwood>
bradland: i guess you could say it's an implicit hash
<bradland>
thx a bunch
oo__ has joined #ruby
oo_ has quit [Ping timeout: 246 seconds]
chipotle has quit [Quit: cheerio]
avahey has joined #ruby
<bradland>
i find it interesting that group_by returns these implicit hashes rather than literal hashes
kalusn has quit [Ping timeout: 256 seconds]
<havenwood>
bradland: oh, i mean that's what you call: [aim: true] #=> [{:aim=>true}]
<havenwood>
bradland: #group_by returns plain ole Arrays
<bradland>
i'm using ruby to do price trend analysis for M3s :)
<bradland>
my car goes back in November, and i'm trying to go in to that armed with the knowledge necessary to decide between buying the car i have, or entering the used market
lioninawhat has quit [Ping timeout: 245 seconds]
<chipotle>
bradland: you should pick a nicer car, like the rs7
<bradland>
hey guys, remember when i used to talk to chipotle?
<bradland>
haha :)
<chipotle>
:)
<chipotle>
can't get better than the 4.0T engine
<chipotle>
and RS tunes it nicely
skj3gg has quit [Quit: ZZZzzz…]
<chipotle>
on top of that, APR gets even more torque
<bradland>
i'm a car nut. it's hard to name a fast car i don't like :)
shellfu_dies has joined #ruby
<bradland>
i do really enjoy the N/A engine in my car though. it's not the fastest, but the experience of the car keeps me grinning.
julian-delphiki has quit [Ping timeout: 240 seconds]
shellfu_dies is now known as shellflu
<chipotle>
i had a 2005.5 S4 with the V8 4.2
<chipotle>
then i bought an audi a6 avant with 3.0T engine
shellflu is now known as shellflu_afk
<bradland>
jealous
<bradland>
that 4.2 is one of the best sounding V8 engines ever built
twitmusic has joined #ruby
<chipotle>
much faster after i had it tuned by apr
<bradland>
it's impossible to beat F/I for tuning performance
NivenHuH has joined #ruby
<chipotle>
i really want that 4.0T
<chipotle>
once the a8's with the 4.0T go below 40k, i will have it
zachrab has joined #ruby
<chipotle>
i just saw one in albany NY for 48k
<chipotle>
so getting there
Musashi007 has joined #ruby
twitmusic has left #ruby [#ruby]
<chipotle>
they didn't come to america until 2012, and first in the a8
<havenwood>
bradland: I'd just call that a tuple, it's just an Array. The first element of the Hash is a key/value pair, so a two-value Array.
<chipotle>
bradland: i am a HUGE fan of wagons
<chipotle>
the S4 was a wagon
<chipotle>
i wish i could get the rs6, and i could afford it, lol
<bradland>
any interest in my price trend analysis script? haha
nahtnam has quit [Quit: Connection closed for inactivity]
dc_ has joined #ruby
Lemur has joined #ruby
shellflu_afk has quit [Remote host closed the connection]
zachrab has quit [Ping timeout: 264 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iwishiwerearobot has joined #ruby
arescorpio has joined #ruby
aryaching has quit [Ping timeout: 250 seconds]
Toger has joined #ruby
<Toger>
Anyone getting 'Invalid spec cache file in /root/.gem/specs/rubygems.org%443/specs.4.8' starting in the last hour?
cmckee has quit [Quit: cmckee]
Ivision has joined #ruby
<Toger>
ruby 2.0, rubygems 2.0.14
Megtastique has quit []
iwishiwerearobot has quit [Ping timeout: 245 seconds]
greensoup has quit [Ping timeout: 256 seconds]
Musashi007 has quit [Quit: Musashi007]
<lampd1>
i'm getting the same Toger
<Toger>
ah glad its not just me
<lampd1>
2.1.4
<lampd1>
am trying to install 2.2.0 lets see if that even happens tho
jlast has quit [Remote host closed the connection]
jlast has joined #ruby
hvxgr has quit [Ping timeout: 256 seconds]
Aova has quit [Read error: Connection reset by peer]
skj3gg has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
<lampd1>
Toger: switched versions and it went away for some reason
<Toger>
i cant imagine 2.0 was suddenly deprecated over night
jlast has quit [Ping timeout: 244 seconds]
<lampd1>
yeah, idk but 2.2.0-dev is working
Jameser has joined #ruby
BAMbanda has joined #ruby
<Toger>
well that is at least a datapoint
shellflu_afk has joined #ruby
fenzil has quit [Ping timeout: 252 seconds]
Aova has joined #ruby
krz has quit [Ping timeout: 240 seconds]
greensoup has joined #ruby
Vile` has quit [Ping timeout: 256 seconds]
dain has joined #ruby
Sawbones has quit [Remote host closed the connection]
hvxgr has joined #ruby
fenzil has joined #ruby
zacstewart has quit [Remote host closed the connection]
Motoservo has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tylersmith has joined #ruby
skj3gg has quit [Quit: ZZZzzz…]
cajone has quit [Remote host closed the connection]
Vile` has joined #ruby
ajaiswal has joined #ruby
thsig_ has quit [Remote host closed the connection]
thsig has joined #ruby
guest000014 has joined #ruby
mistermocha has quit [Remote host closed the connection]
thatslifeson has joined #ruby
Musashi007 has joined #ruby
ebbflowgo has left #ruby [#ruby]
sudog has joined #ruby
adriancb has quit [Remote host closed the connection]
thsig has quit [Ping timeout: 252 seconds]
Cache_Money has joined #ruby
Synthbread has joined #ruby
Troy^ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dain has quit [Remote host closed the connection]
swgillespie has joined #ruby
freerobby has quit [Quit: Leaving.]
oo__ has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
cajone has joined #ruby
krz has joined #ruby
oo_ has joined #ruby
markfletcher has joined #ruby
krz has quit [Client Quit]
Musashi007 has quit [Quit: Musashi007]
yfeldblum has quit [Ping timeout: 246 seconds]
krz has joined #ruby
krz is now known as Guest47262
techietrash has quit [Quit: Bye! <(^_^<)]
Guest47262 has quit [Client Quit]
krzkrz has joined #ruby
markfletcher has quit [Remote host closed the connection]
kapil__ has joined #ruby
aagdbl has joined #ruby
cvtsx1 has quit [Quit: Leaving]
jhebden has joined #ruby
cvtsx has joined #ruby
<DogHackit>
Can anyone point me to where I am goign wrong here? All I get for output is " : ". I acts like there is nothing being added to the array accept empty indexes. https://gist.github.com/anonymous/629f16f33514a8eb04dd
twitmusic has joined #ruby
Musashi007 has joined #ruby
twitmusic has quit [Client Quit]
duncannz has joined #ruby
withnale__ has joined #ruby
HOrangeJewce has quit [Quit: Leaving.]
totimkopf has joined #ruby
twitmusic has joined #ruby
twitmusic has quit [Client Quit]
li0ninawhat has quit [Read error: Connection reset by peer]
greensoup has quit [Ping timeout: 245 seconds]
jerematic has joined #ruby
lioninawhat has joined #ruby
tkuchiki_ has joined #ruby
withnale__ has quit [Ping timeout: 245 seconds]
pheona1 has joined #ruby
pheona1 has quit [Client Quit]
oo_ has quit [Remote host closed the connection]
skj3gg has joined #ruby
vdamewood has joined #ruby
pheona has joined #ruby
markfletcher has joined #ruby
tkuchiki has quit [Ping timeout: 255 seconds]
hamakn has quit [Remote host closed the connection]
Sawbones has joined #ruby
oo_ has joined #ruby
jerematic has quit [Ping timeout: 256 seconds]
tus has quit []
riotjones has joined #ruby
lzx has joined #ruby
Musashi007 has quit [Quit: Musashi007]
braincrash has quit [Quit: bye bye]
deol has joined #ruby
riotjones has quit [Ping timeout: 245 seconds]
hamakn has joined #ruby
LiquidInsect has joined #ruby
selaruvicheck has joined #ruby
ARCADIVS has joined #ruby
braincrash has joined #ruby
fabrice31 has joined #ruby
<softinio>
havenwood: surprised uru written in go and not ruby
iamjarvo has joined #ruby
selaruvich has quit [Ping timeout: 250 seconds]
jlast has joined #ruby
<iamjarvo>
so i am checking out ruby's source on ruby-doc and I have a quick questions. Array.each and Enumerable.each are different methods right?
sinkensabe has joined #ruby
Sawbones has quit [Remote host closed the connection]
Aova has quit [Read error: Connection reset by peer]
Sawbones has joined #ruby
krzkrz has quit [Ping timeout: 264 seconds]
cajone has quit [Remote host closed the connection]
<iamjarvo>
havenwood so when does Enumerator.html#method-i-each come in handy?
wldcordeiro has joined #ruby
tunaCanBruh has joined #ruby
<havenwood>
iamjarvo: Well, it returns self without a block or args because it's already an Enumerator. It needs to be implemented because Enumerator mixes in Enumerable, which requires an each method like I mentioned.
markfletcher has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby
markfletcher has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
jack_rabbit has joined #ruby
tunaCanBruh has quit [Ping timeout: 246 seconds]
<guest000014>
what protable ruby interpreter would you recommend (for innterpreting not complicated raw code)?
brb3 has quit [Quit: <.<]
Musashi007 has quit [Quit: Musashi007]
IceDragon is now known as RastaRooster
RastaRooster is now known as IceDragon
skj3gg has quit [Quit: ZZZzzz…]
markfletcher has left #ruby [#ruby]
<havenwood>
guest000014: Portable? In what sense?
markfletcher has joined #ruby
markfletcher has left #ruby [#ruby]
davedev2_ has joined #ruby
davedev24_ has quit [Ping timeout: 246 seconds]
<guest000014>
havenwood: in order not to install it on computer, from flash-driver, for example
<iamjarvo>
havenwood i guess what's confusing me is Enumerator has an each method and if every class has to implement an each method when does Enumerator#each get used?
<havenwood>
guest000014: To ship with an app, like a self contained app? Or to use for development? Or another purpose?
jottr has joined #ruby
lys has quit [Quit: lys]
bricker has joined #ruby
mikepack has joined #ruby
<havenwood>
guest000014: JRuby works wherever there's a JVM and provides nice binaries.
Toger has quit [Quit: Toger]
<havenwood>
guest000014: There're MRI binaries for various platforms, but not one that works on all. Traveling Ruby is a project that makes it easy to provide binaries along with your app for OS X and Linux.
<iamjarvo>
havenwood i think im confusing my self. basically enumerator.each will be used when an enumertor is returned and then someone wants to call each on it
<havenwood>
iamjarvo: Not very often! You don't end up calling it directly often, since you can pass a block to an Enumerator as if there was an each already.
<lampd1>
you know, like a public api that isn't advertised :P
Aswebb_ has joined #ruby
davedev24_ has joined #ruby
iwishiwerearobot has quit [Ping timeout: 245 seconds]
Lewix has quit [Read error: Connection reset by peer]
zyxelthrone has quit [Quit: WeeChat 1.1.1]
davedev24_ has quit [Read error: Connection reset by peer]
zyxelthrone has joined #ruby
kyb3r_ has joined #ruby
Lewix has joined #ruby
Lewix has joined #ruby
davedev24_ has joined #ruby
dimaursu16 has joined #ruby
shum has joined #ruby
davedev2_ has quit [Ping timeout: 250 seconds]
greenbagels has quit [Quit: Leaving]
oo_ has quit [Remote host closed the connection]
zyxelthrone has quit [Client Quit]
davedev24_ has quit [Read error: Connection reset by peer]
Aswebb_ has quit [Ping timeout: 252 seconds]
jgrevich has quit [Quit: jgrevich]
davedev24_ has joined #ruby
<DogHackit>
When I create a object from a class method, how do I pass an array as an argument? for instance, Class.method(array with 2 args). I keep getting (1 for 2) (ArgumentError)
tkuchiki has joined #ruby
<havenwood>
DogHackit: Class.method(*array)
lzx has quit [Remote host closed the connection]
<havenwood>
DogHackit: a splat (*)
davedev24_ has quit [Read error: Connection reset by peer]
Jameser` has joined #ruby
<DogHackit>
havenwood, thanks! Let me try that out!
davedev24_ has joined #ruby
tkuchiki_ has quit [Ping timeout: 240 seconds]
Jameser has quit [Ping timeout: 244 seconds]
tjohnson has quit [Quit: Connection closed for inactivity]
p3ery has quit [Quit: (null)]
p3ery has joined #ruby
wallerdev has joined #ruby
Vivex_ has joined #ruby
SOLDIERz_ has joined #ruby
ellisTAA has joined #ruby
Sawbones has quit [Remote host closed the connection]
ferr has quit [Ping timeout: 252 seconds]
<DogHackit>
Now I have too many arguments. What I am trying to do is take each index as an argument. Each index is also an array
<ellisTAA>
i’m looking for some info how to format my ruby code? anyone know any good resources
Kejento has quit [Ping timeout: 245 seconds]
<ellisTAA>
doghackit: isn’t there an each_index
<ellisTAA>
method
Sawbones has joined #ruby
Musashi007 has joined #ruby
Lingo_ has joined #ruby
SOLDIERz_ has quit [Client Quit]
<DogHackit>
tried this Grade.new(*file.each_index)
wallerdev has quit [Ping timeout: 255 seconds]
MrGlass has quit []
Kejento has joined #ruby
<DogHackit>
still to many wrgs..
<ellisTAA>
post a gist
krzkrz has joined #ruby
Motoservo has joined #ruby
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cmckee has joined #ruby
amystephen has quit [Quit: amystephen]
tylersmith has quit [Remote host closed the connection]
Vivex_ has quit [Ping timeout: 244 seconds]
tylersmith has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Aova has quit [Read error: Connection reset by peer]
<thatslifeson>
line 17, point_received should be points_received
<thatslifeson>
Grade.new expects 2 arguments, not 1 due to your attr_accessor
josephcs has joined #ruby
zachrab has joined #ruby
<thatslifeson>
on line 16, not sure why you are doing @@grades.each do |grade| and then not using grade
krzkrz has joined #ruby
<DogHackit>
enter a few grades, sort them , and spit them back out. I should be able to enter point after. Also needs to take grades from a text file
<DogHackit>
thatslifeson, thanks, I fixed l 17, I am passing 2 args from a CSV file, they are in an array that is in an array. Not sure how to get the values from grade on line 19
<thatslifeson>
i'm at work currently so my responses might be delayed, I'll look some more in a second
keen__________56 has quit [Ping timeout: 256 seconds]
sinkensabe has joined #ruby
Aswebb_ has quit [Ping timeout: 252 seconds]
Timba-as has joined #ruby
bootstrappm has quit [Quit: bootstrappm]
sandelius has joined #ruby
commmmodo has quit [Quit: commmmodo]
jlast has quit [Ping timeout: 265 seconds]
ARCADIVS has quit [Quit: ARCADIVS]
bricker has quit [Ping timeout: 246 seconds]
_mtr has joined #ruby
andikr has joined #ruby
Spleeze has quit [Ping timeout: 265 seconds]
ptrrr has joined #ruby
_mtr has quit [Ping timeout: 264 seconds]
craigp has joined #ruby
wottam has joined #ruby
_mtr has joined #ruby
amystephen has joined #ruby
Ivision has joined #ruby
jerematic has joined #ruby
apeiros_ has joined #ruby
cmckee has quit [Quit: cmckee]
oo_ has quit [Remote host closed the connection]
Jameser`` has joined #ruby
juanpablo_ has joined #ruby
Spleeze has joined #ruby
timonv has joined #ruby
oo_ has joined #ruby
jerematic has quit [Ping timeout: 255 seconds]
Jameser` has quit [Ping timeout: 252 seconds]
apeiros_ has quit [Ping timeout: 246 seconds]
aganov has joined #ruby
_mtr has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
dumdedum has joined #ruby
teddyp1cker has joined #ruby
oo_ has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
juanpablo_ has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby
JoshGlzBrk has joined #ruby
oo_ has joined #ruby
vdamewood has joined #ruby
<DogHackit>
how do I split a string after 3 characters? I tried this f = File.read('homework2.txt').split(/^.{3}/) but I LOSE the first 3 chracters completely
amystephen has quit [Quit: amystephen]
vdamewood has quit [Client Quit]
Aova has quit [Read error: Connection reset by peer]
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
oo_ has quit [Remote host closed the connection]
Musashi007 has quit [Client Quit]
davedev24_ has quit [Ping timeout: 252 seconds]
hvxgr has joined #ruby
<certainty>
DogHackit: you want the first 3 characters? or do you really want to split and have the first 3 and the rest?
lampd1 has quit []
lampd1 has joined #ruby
timonv has quit [Ping timeout: 256 seconds]
lioninawhat has joined #ruby
<DogHackit>
I want to take the first 3 characters and make them the key in a hash then I want the rest to just be the data for each key, by line
<certainty>
DogHackit: alright. "foobar".slice(0..2) would be one way
teddyp1cker has quit [Remote host closed the connection]
<certainty>
oh wait, missed the rest of the sentence :D
Mon_Ouie has quit [Ping timeout: 245 seconds]
<certainty>
but you can of course get the rest with #slice as well
<certainty>
i'm not aware of a single method that does both
davedev24_ has joined #ruby
<DogHackit>
OK. Thanks.
Aova has joined #ruby
mudtose has quit [Quit: Leaving]
anarang has joined #ruby
piotrj has quit [Remote host closed the connection]
marcdel has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<havenwood>
DogHackit: Another option you could consider is String#partition. ^
aapole has quit [Quit: Leaving]
Xeago has joined #ruby
Guest123 has joined #ruby
munke has quit [Ping timeout: 246 seconds]
lzx has quit [Remote host closed the connection]
Macaveli has joined #ruby
ta has quit [Remote host closed the connection]
greensoup has quit [Ping timeout: 245 seconds]
<DogHackit>
Thanks for the ideas!
Macaveli has quit [Client Quit]
riotjones has joined #ruby
Morkel has quit [Quit: Morkel]
charliesome has quit [Quit: zzz]
lzx has joined #ruby
apeiros_ has joined #ruby
anarang has quit [Ping timeout: 250 seconds]
Xeago has quit [Read error: Connection reset by peer]
strsep has joined #ruby
Xeago has joined #ruby
marcdel has joined #ruby
jhebden has quit [Ping timeout: 245 seconds]
iliketurtles has joined #ruby
psy_ has quit [Quit: Leaving]
fantazo has quit [Ping timeout: 264 seconds]
withnale__ has joined #ruby
Vile` has quit [Remote host closed the connection]
ptrrr has quit [Quit: ptrrr]
fantazo has joined #ruby
fabrice31 has joined #ruby
zachrab has joined #ruby
Vile` has joined #ruby
astrobunny has joined #ruby
oo_ has joined #ruby
SolarSailor has joined #ruby
oleo is now known as Guest3301
oleo__ has joined #ruby
jlast has joined #ruby
withnale__ has quit [Ping timeout: 245 seconds]
rocknrollmarc has joined #ruby
arup_r has joined #ruby
zachrab has quit [Ping timeout: 252 seconds]
tmtwd has quit [Remote host closed the connection]
Guest3301 has quit [Ping timeout: 256 seconds]
jlast has quit [Ping timeout: 244 seconds]
rocknrollmarc has quit [Ping timeout: 244 seconds]
teddyp1cker has joined #ruby
jlast has joined #ruby
Jameser`` has quit [Remote host closed the connection]
teddyp1cker has quit [Read error: Connection reset by peer]
teddyp1cker has joined #ruby
yfeldblu_ has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
<arup_r>
sorted_cities = %w(Warehouse Chennai Pune Bangalore Kolkata Gurgaon Chandigarh Mumbai Delhi).map(&:downcase) and then doing sort by using the sorted array index as
lioninawhat has quit [Remote host closed the connection]
zachrab has joined #ruby
kaspergrubbe__ is now known as kaspergrubbe
wald0 has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CpuID2 has quit [Quit: This computer has gone to sleep]
ki0 has joined #ruby
Timgauthier has joined #ruby
CpuID2 has joined #ruby
maximski has joined #ruby
zachrab has quit [Ping timeout: 255 seconds]
mLF has quit [Ping timeout: 255 seconds]
rbennacer has joined #ruby
Guest123 has joined #ruby
oleo__ is now known as oleo
rocknrollmarc has joined #ruby
arup_r_ has joined #ruby
CpuID2 has quit [Quit: This computer has gone to sleep]
bnjamin has joined #ruby
rbennacer has quit [Ping timeout: 245 seconds]
arup_r has quit [Ping timeout: 250 seconds]
jlast has joined #ruby
livathin_ has quit [Remote host closed the connection]
_mtr has joined #ruby
ponga has quit [Remote host closed the connection]
rocknrollmarc has quit [Ping timeout: 255 seconds]
ponga has joined #ruby
bnjamin has quit []
ldnunes has joined #ruby
tekk has joined #ruby
juanpablo_ has joined #ruby
piotrj has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 245 seconds]
_mtr has quit [Ping timeout: 245 seconds]
jlast has joined #ruby
febuiles has quit [Quit: febuiles]
CpuID2 has joined #ruby
piotrj has joined #ruby
mLF has joined #ruby
cmckee has quit [Quit: cmckee]
timonv has joined #ruby
iamayam has joined #ruby
juanpablo_ has quit [Ping timeout: 246 seconds]
Stoge88 has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 245 seconds]
aZtec has joined #ruby
aZtec has quit [Client Quit]
ponga has quit [Ping timeout: 252 seconds]
aZtec_ has joined #ruby
nfk has joined #ruby
<aZtec_>
hi all...
<aZtec_>
while this might be a very complex question, maybe someone can give me the gist of it
joonty has joined #ruby
Musashi007 has quit [Quit: Musashi007]
<aZtec_>
when i open a file in reading mode, can it potentially cause harm to the host system?
tylersmith has joined #ruby
VBlizzard has joined #ruby
<aZtec_>
assuming it's a malicious file...
CustosLimen has quit [Ping timeout: 245 seconds]
Takle_ has quit [Remote host closed the connection]
blizzy has quit [Ping timeout: 245 seconds]
Timgauthier has quit [Max SendQ exceeded]
featheryahn_ has quit [Ping timeout: 245 seconds]
AlexRussia has quit [Ping timeout: 250 seconds]
tylersmith has quit [Ping timeout: 252 seconds]
Timgauthier has joined #ruby
AlexRussia has joined #ruby
lzx has joined #ruby
featheryahn_ has joined #ruby
klap has quit [Ping timeout: 245 seconds]
hdrv has quit [Ping timeout: 245 seconds]
klap has joined #ruby
Skelz0r_ has quit [Ping timeout: 245 seconds]
TTilus has quit [Ping timeout: 245 seconds]
<arup_r_>
In simple technical words what `Fluent interfaces` mean ?
psy_ has quit [Read error: No route to host]
hyperdrive has joined #ruby
benatkin has quit [Ping timeout: 245 seconds]
totimkopf has joined #ruby
benatkin has joined #ruby
Klumben has quit [Ping timeout: 245 seconds]
faulkner has quit [Ping timeout: 245 seconds]
CustosLimen has joined #ruby
faulkner has joined #ruby
johnhamelink has quit [Ping timeout: 245 seconds]
xMopxShell has quit [Ping timeout: 245 seconds]
epochwolf has quit [Ping timeout: 245 seconds]
skarn has quit [Ping timeout: 245 seconds]
yosafbridge has quit [Ping timeout: 245 seconds]
keelerm has quit [Ping timeout: 245 seconds]
etdev has quit [Ping timeout: 245 seconds]
matti has quit [Ping timeout: 245 seconds]
psy_ has joined #ruby
Takle has joined #ruby
quazimodo has joined #ruby
yosafbridge has joined #ruby
skarn has joined #ruby
epitron has quit [Ping timeout: 245 seconds]
matti has joined #ruby
matti has joined #ruby
startupality has joined #ruby
<quazimodo>
is there a standard library that can do something like CGI.new("html4") or equivalent, in order to build html
CpuID2 has quit [Quit: This computer has gone to sleep]
epochwolf has joined #ruby
etdev has joined #ruby
TTilus has joined #ruby
xMopxShell has joined #ruby
Skelz0r has joined #ruby
epitron has joined #ruby
johnhamelink has joined #ruby
tkuchiki has quit [Ping timeout: 252 seconds]
<certainty>
arup_r_: simply put it's an interface (a group of methods) that all return a context where they can be applied. One example being arel's relations or another example are method chains that don't change types
Klumben has joined #ruby
<arup_r_>
certainty: Thanks.. Got it.. This is a one liner I was looking for.. Wikipedia says too much.. :)
piotrj has quit [Read error: Connection reset by peer]
fabrice31_ has joined #ruby
<canton7>
so you original question covered apps in my mind.. hence my answer
<canton7>
*your
piotrj has joined #ruby
<crome>
"it enforces precision that does not exist in the gem command"
<Timgauthier>
when distro'ing an app as a gem then you likely want the lock file
Musashi007 has quit [Quit: Musashi007]
<apeiros_>
ah, developing a gem vs. developing an app
<Timgauthier>
it says in the first area above the HR
<Timgauthier>
:P
<apeiros_>
kl__: well, yehuda answers your question in your very link
<Timgauthier>
lock adds to much specificificty
<apeiros_>
and I'm even late in the point-it-out-party
<Timgauthier>
haha apeiros_ its okay
<Timgauthier>
i considered not actually saying anything
mLF has joined #ruby
<kl__>
My point is: why is too much specificity a problem? Obviously slightly slower installation
<crome>
kl__: for example the gem command does not care about your branch specification in your gemfile
<crome>
in case there is one
<kl__>
I'm not sure what "it enforces precision that does not exist in the gem command" actually means
piotrj_ has joined #ruby
gokul has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
<kl__>
gem install takes -v for version, so that doesn't seem correct.
woodyb23 has joined #ruby
<Timgauthier>
but it doesn't do that by default
claptor has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Motoservo has quit [Quit: Shhh. I'm trying to get some sleep here.]
<Timgauthier>
when you install from a gemfile, does it matter where a gem came from, or exactly which version it is? no you just want the latest version of a gem from wheverer. If it is important for a project which gem and version of that gem you are using (aka your moving a dev environment from one machine to another) you need a specific version, so you can use version, or a lock
<Timgauthier>
lock locks your gems to not being updated, and not changing in any way so that your app dependancies in a release environment do not change and cause issues.
blackmesa has joined #ruby
lightstalker has joined #ruby
St_Marx has joined #ruby
lessless has joined #ruby
piotrj has quit [Ping timeout: 256 seconds]
zachrab has joined #ruby
Aova has quit [Read error: Connection reset by peer]
Takle has quit [Remote host closed the connection]
Takle has joined #ruby
BeLucid has quit [Read error: Connection reset by peer]
BeLucid has joined #ruby
CpuID2 has quit [Quit: This computer has gone to sleep]
nerium has joined #ruby
nerium has quit [Client Quit]
jimms_ has joined #ruby
woodyb23 has quit [Ping timeout: 255 seconds]
p0wn3d_mhs has joined #ruby
trampi has joined #ruby
function_ has joined #ruby
zachrab has quit [Ping timeout: 256 seconds]
jimm has joined #ruby
Aova has joined #ruby
<kl__>
Timgauthier: I was thinking about the case where you're using a gem "foo", and the developer bring out foo v2. Suddenly your library that uses "foo" breaks
jimm is now known as Guest11439
startupality has joined #ruby
<kl__>
It seems as though libraries should always lock down the major version in the Gemfile, right?
Guest123 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kl__>
* breaks if the end-user has foov2 installed
jimms has quit [Ping timeout: 244 seconds]
function90 has quit [Ping timeout: 252 seconds]
piotrj_ is now known as piotrj
piotrj has quit []
lanemeyer has quit [Ping timeout: 245 seconds]
jimms_ has quit [Ping timeout: 246 seconds]
piotrj has joined #ruby
TinkerTyper has quit [Ping timeout: 245 seconds]
Zai00 has joined #ruby
jimms has joined #ruby
phutchins has joined #ruby
Guest11439 has quit [Ping timeout: 264 seconds]
BTRE has quit [Quit: Leaving]
cvtsx1 has joined #ruby
BeLucid_ has joined #ruby
BeLucid has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
cvtsx has quit [Ping timeout: 255 seconds]
TinkerTyper has joined #ruby
sameerynho has joined #ruby
<workmad3>
kl__: the Gemfile.lock in a gemspec will lock down all transitive dependencies to exact versions, which is the 'precision that doesn't exist in the gemspec'
jerematic has joined #ruby
<workmad3>
kl__: unless you really do go through all dependencies, and dependencies of dependencies, right the way down, and put an exact version for each of them in your gemspec
_mtr has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
astrobunny has quit [Remote host closed the connection]
<workmad3>
kl__: so the point against commiting Gemfile.lock with a gem is that someone who then checks it out and does 'bundle install' to test it would get the locked versions of all dependencies, not the dependencies that rubygems would currently resolve when you install that gem
piotrj_ has joined #ruby
piotrj_ has quit [Client Quit]
jenrzzz has quit [Ping timeout: 246 seconds]
juanpablo_ has joined #ruby
jerematic has quit [Ping timeout: 240 seconds]
_mtr has quit [Ping timeout: 252 seconds]
goatherder3 has joined #ruby
piotrj has quit [Ping timeout: 252 seconds]
Ivision has quit [Remote host closed the connection]
Ivision has joined #ruby
enterprisedc has quit [Ping timeout: 240 seconds]
shum has joined #ruby
<kl__>
workmad3: that was the answer I was looking for. Thank you!
Ivision has quit [Read error: Connection reset by peer]
Ivision has joined #ruby
Takle has quit [Remote host closed the connection]
juanpablo_ has quit [Ping timeout: 240 seconds]
<sandelius>
Just for the record, I absolutely love Sinatra
PaulCapestany has quit []
n1lo has joined #ruby
zlad has joined #ruby
jlast has joined #ruby
PaulCapestany has joined #ruby
Timgauthier is now known as timgauthier_away
tylersmith has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<certainty>
just for the record, I absolutely love workmad3
<workmad3>
just for the record, I also love workmad3
<workmad3>
</narcissism>
<certainty>
nah you gotta love yourself
<sevenseacat>
lol
<certainty>
especially when nobody else does
<workmad3>
certainty: I have circumstantial evidence that I hold the affection of entities other than myself
<apeiros_>
workmad3: christianism mandates that you love yourself. first rule in the book.
<certainty>
workmad3: i hope so. you're a nice guy
<certainty>
girl
<certainty>
i don't know
rocknrollmarc has joined #ruby
<certainty>
i don't care
<kl__>
I also love workmad3
<workmad3>
apeiros_: that's not a book I subscribe to :P
<kl__>
He didn't mock for asking a seemingly basic question
<apeiros_>
workmad3: d'oh. well, me neither. but chances were 1:7
<workmad3>
kl__: I've spent far too much time pondering dependencies to consider questions about them 'basic' :)
goatherder3 has quit [Remote host closed the connection]
lkba has joined #ruby
<kl__>
workmad3: yup.
<apeiros_>
kl__: you didn't get mocked for your question being basic in the past either. but I know that you can't get yourself to realize that.
<certainty>
we have to realize that there are probably 4 hard problems in computer science
puppetmonkey has joined #ruby
<kl__>
apeiros_: not sure what you're on about, but you don't seem to be friendly
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jlast has quit [Ping timeout: 245 seconds]
<kl__>
certainty: I think I know this one, go on ;)
<sevenseacat>
apeiros_ is awesome.
<workmad3>
certainty: I always heard it as 2 hard problems... Caching, naming things and off-by-one errors
puppetmonkey has quit [Client Quit]
<kl__>
hehe
<certainty>
workmad3: i heard that as 3 of them
<certainty>
but now we have to add dependency management
<kl__>
certainty: that only proves the principle further
<certainty>
kl__: yepp
tylersmith has quit [Ping timeout: 256 seconds]
jlast has joined #ruby
<certainty>
also it was cache invalidation i believe, which is of course closely related
selaruvich has joined #ruby
lyuben_ has joined #ruby
timonv has quit [Ping timeout: 255 seconds]
roshanavand1 has joined #ruby
<kl__>
certainty: I never found cache invalidation to be particularly bad, what am I missing?
sinkensabe has quit [Read error: Connection reset by peer]
<kl__>
Normally just comparing dates/hashes, right? :)
sinkensabe has joined #ruby
<apeiros_>
my list of hard things in computing is a bit longer.
roshanavand has quit [Ping timeout: 245 seconds]
<apeiros_>
I'd add threading quite high in it.
timonv has joined #ruby
hiyosi has joined #ruby
enterprisedc_ has joined #ruby
jlast has quit [Ping timeout: 245 seconds]
<apeiros_>
kl__: cache invalidation/pruning is about when to get rid of which cached value
<canton7>
it's one of those that seems easy, then you get bit. a lot.
<apeiros_>
it's hard because it's easy to lose all performance gains and/or to "leak"
cpt_yossarian has quit [Ping timeout: 245 seconds]
ghostpl has quit [Remote host closed the connection]
<canton7>
most of the time for me it's been not invalidating when I should - that problem bites *hard* when it bites
ki0 has quit []
<apeiros_>
ah, deprecated data in the cache and using that instead of fresh data?
<certainty>
threading is definitely on the list any sort of parallelism with (mutable) shared resources probably is
ponga has joined #ruby
<canton7>
mainly when talking to an embedded device, and polling its state / caching the results
<apeiros_>
yeah, I can imagine how that can bite hard.
<workmad3>
certainty: tbh, concurrency and parallelism are probably both on the list :)
<canton7>
then trying to optimise away a few polls...
<certainty>
workmad3: true
<canton7>
"its state definitely can't have changed between X and Y", then you wonder why there's a really obscure problem 2 months later
Timgauthier has joined #ruby
<certainty>
magic
<workmad3>
and yeah... with caching, you've got the joys of also deciding whether to hold requests or serve stale data when a cache update is happening...
jgt has joined #ruby
<workmad3>
then whether to warm the cache, whether to do hot updates, etc.
<kl__>
I don't really have any problems with cache invalidation - I think I can owe a lot of that to invalidation notification being pushed as part of the event that changes the origin
<workmad3>
really easy to fuck it up :)
<kl__>
If you don't have that control on processes that affect the origin... the information needed to truly optimize simply doesn't exist
Aswebb_ has quit [Remote host closed the connection]
rocknrollmarc has quit [Ping timeout: 265 seconds]
<workmad3>
kl__: lucky, you've got a situation where your cache invalidation isn't (currently) too difficult :P
<apeiros_>
that's why you write code which is fast enough without caching!!!!1!1!
yfeldblum has joined #ruby
piotrj has joined #ruby
greensoup has joined #ruby
ponga has quit [Read error: No route to host]
<certainty>
yeah!!!one_eleven
ponga has joined #ruby
<kl__>
workmad3: it seems that most cases where that cannot be achieved is probably an organizational problem
drawingthesun has joined #ruby
<kl__>
if something has the capability to alter your origin, you would have that you can enrich that process/client to notify the cache
<kl__>
s/have/hope/
roshanavand1 has quit [Quit: roshanavand1]
drawingthesun has quit [Read error: Connection reset by peer]
<workmad3>
kl__: not really... in many cases, a hot-cache invalidation isn't practical because you've got too many updates streaming in at once and not enough reads happening in-between... the cache invalidation pushes add too much overhead
<workmad3>
kl__: or you don't need that overhead because your data has specific expiry dates from the domain, so you can't invalidate until X time has passed...
<kl__>
workmad3: the latter sounds pretty easy, and stale-and-revalidating
yfeldblum has quit [Ping timeout: 256 seconds]
<kl__>
workmad3: the prior is definitely more ticky
<workmad3>
kl__: there's also the question of what to do with a cache miss... or more specifically, if you have a cache miss from 1000 people requesting the same data at the same time
<kl__>
tricky..
<dagda1_>
I am having trouble incoding a string from ASCII-8BIT to utf-8, I try string.encode('UTF-8') but I get this error Encoding::UndefinedConversionError: "\xE1" from ASCII-8BIT to UTF-8.
<kl__>
workmad3: yeah that's kinda interesting when you're not using an off-the-shelf like Varnish. It's like a mutex is needed for the request to backend
grzywacz has joined #ruby
grzywacz has joined #ruby
<workmad3>
kl__: do you let 1000 requests through (cache rush)? do you let 1 through and hold 999 while the cache updates? do you serve the stale data while waiting for the cache to update?
<kl__>
mutex for a given request that should yield the same content
<workmad3>
kl__: or do you hold for something like 5s and then serve stale data if the cache hasn't updated?
piotrj has quit [Ping timeout: 252 seconds]
arup_r_ has quit [Read error: Connection reset by peer]
Aswebb_ has joined #ruby
<kl__>
stale-on-revalidate has been sufficient for most of my cases (with delays not being permissible)
<workmad3>
again, lucky ;)
Alina-malina has quit [Ping timeout: 252 seconds]
aclearman037 has joined #ruby
claptor has quit [Quit: this channel is bakas]
piotrj has joined #ruby
Musashi007 has joined #ruby
krz has quit [Ping timeout: 245 seconds]
aclearman037 has quit [Client Quit]
BTRE has joined #ruby
<kl__>
workmad3: why does that make it any easier?
<kl__>
stale-on-revalidate would seem to have more moving parts than simply blocking
<workmad3>
kl__: I meant 'lucky' in that 'you can use the same techniques across most of your stuff'
thumpba has joined #ruby
arup_r has joined #ruby
CpuID2 has joined #ruby
<kl__>
workmad3: ah gotcha :)
CpuID2 has quit [Client Quit]
tmtwd has joined #ruby
Takle has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
drawingthesun has joined #ruby
drawingthesun has quit [Read error: Connection reset by peer]
Musashi007 has quit [Quit: Musashi007]
Aswebb_ has joined #ruby
aclearman037 has joined #ruby
tkuchiki has joined #ruby
thumpba_ has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
Xeago_ has joined #ruby
gokul has quit [Quit: Leaving]
thumpba has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 264 seconds]
pika_pika has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
kl__ has quit [Ping timeout: 245 seconds]
greensoup has quit [Ping timeout: 250 seconds]
Aova has quit [Read error: Connection reset by peer]
Aswebb_ has joined #ruby
wald0 has quit [Quit: Lost terminal]
aganov has quit [Remote host closed the connection]
Aswebb_ has quit [Client Quit]
ghostpl has joined #ruby
nateberkopec has joined #ruby
<ddv>
even rubocop prefers single quoted strings when you don't need string interop
<ddv>
interpolation*
amystephen has joined #ruby
<aep>
any idea why this always runs the block?> def bla(&block) a = 1; a ||= yield end
marr has joined #ruby
brb3 has joined #ruby
antgel has joined #ruby
psy_ has quit [Ping timeout: 250 seconds]
piotrj has quit [Ping timeout: 244 seconds]
shum has quit [Quit: WeeChat 1.1.1]
shellflu_afk is now known as shellflu
Alina-malina has joined #ruby
<apeiros_>
ddv: only if you don't tell it otherwise :o)
shum has joined #ruby
jerematic has joined #ruby
Aova has joined #ruby
<ddv>
:)
Timgauthier is now known as timgauthier_away
cvtsx has joined #ruby
Kharma has joined #ruby
kobain has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sinkensabe has quit [Read error: Connection reset by peer]
Timgauthier has joined #ruby
sinkensabe has joined #ruby
gccostabr has joined #ruby
brahman has joined #ruby
brahman has joined #ruby
Lewix has quit [Remote host closed the connection]
<banister>
aep i'm doing the same, and it doesn't always run the block for me, in fact it never runs the block
<banister>
which is the expected behaviour
<aep>
yeah i probably misidentified the problem
Lewix has joined #ruby
Takle has quit [Remote host closed the connection]
<brahman>
Hi, I have some raw js object that I would like to convert to JSON. (keys are not double quoted). Does anyone have a simple way of doing this?
cvtsx1 has quit [Ping timeout: 245 seconds]
jimms has quit [Remote host closed the connection]
<apeiros_>
brahman: you have a JS object in ruby?
lanemeyer has joined #ruby
<apeiros_>
or wrong channel?
IrishGringo has joined #ruby
tunaCanBruh has joined #ruby
techsethi has quit [Quit: techsethi]
Lewix has quit [Ping timeout: 245 seconds]
dblessing has joined #ruby
thumpba has joined #ruby
jenrzzz has joined #ruby
thumpba_ has quit [Remote host closed the connection]
psy_ has joined #ruby
lzx has quit [Read error: Connection reset by peer]
antgel has quit [Ping timeout: 265 seconds]
kristofferR has joined #ruby
kt2 has joined #ruby
joonty has quit [Quit: joonty]
zlad has left #ruby [#ruby]
tunaCanBruh has quit [Ping timeout: 246 seconds]
wldcordeiro_ has quit [Ping timeout: 244 seconds]
<aep>
yeah, how do i yield without returning?
<brahman>
apeiros_: Yeah I am using HTTPClient to scrape a js site. The returned data is raw js and not valid JSON.
wldcordeiro_ has joined #ruby
<aep>
a = yield; do_something; where block contains a return will not execute do_something
<apeiros_>
brahman: you mean you have a string?
Troy^ has joined #ruby
<apeiros_>
brahman: e.g. "{raw: \"javascript\"}"
rodfersou has quit [Read error: Connection reset by peer]
<brahman>
apeiros_: yep exactly
davedev24_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 250 seconds]
<apeiros_>
I see two ways
kt2 has quit [Client Quit]
<apeiros_>
a) use a regex to quote keys
mostlybadfly has quit [Quit: Connection closed for inactivity]
<apeiros_>
b) use something like libv8 to evaluate the code
rodfersou has joined #ruby
kt2 has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
<brahman>
apeiros_: b) it's not comming from a trusted source so am a bit reluctant to evaluate the js.
<apeiros_>
aep: can you make a small example showing what you want to achieve?
lzx has joined #ruby
<brahman>
Will look at the regex method.
<brahman>
would you do something like /(\w+):/ and replace with "match[1]" ?
<apeiros_>
oh, you could use yaml to load the data
<apeiros_>
brahman: yeah, but that'll have issues with strings containing :
<brahman>
apeiros_: YAML would be cool. Does the yaml module understand raw js structures?
<apeiros_>
brahman: I think it should be compatible
Aova has quit [Read error: Connection reset by peer]
thumpba has joined #ruby
greensoup has quit [Ping timeout: 264 seconds]
RDash has quit [Changing host]
RDash has joined #ruby
arup_r has quit []
wallerdev has joined #ruby
thumpba_ has joined #ruby
harfangk has joined #ruby
zenith_ has joined #ruby
harfangk has quit [Client Quit]
blackmesa has quit [Ping timeout: 250 seconds]
joonty has joined #ruby
jottr has quit [Ping timeout: 264 seconds]
Aova has joined #ruby
allcentury has joined #ruby
harfangk has joined #ruby
thumpba_ has quit [Remote host closed the connection]
thumpba has quit [Ping timeout: 264 seconds]
thumpba_ has joined #ruby
Takle has joined #ruby
kl has quit [Ping timeout: 264 seconds]
jonr22 has joined #ruby
wallerdev has quit [Ping timeout: 265 seconds]
Takle has quit [Remote host closed the connection]
zenith_ has quit [Ping timeout: 265 seconds]
markfletcher has joined #ruby
lkba has quit [Ping timeout: 256 seconds]
kaspertidemann has joined #ruby
sambao21 has joined #ruby
jottr has joined #ruby
Azulinho has quit [Ping timeout: 264 seconds]
DaniG2k has quit [Ping timeout: 245 seconds]
thsig has joined #ruby
mdw has quit []
mdw has joined #ruby
thumpba has joined #ruby
tunaCanBruh has joined #ruby
Azulinho has joined #ruby
Channel6 has joined #ruby
aryaching has joined #ruby
tus has joined #ruby
thumpba_ has quit [Remote host closed the connection]
thsig has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
rx007 has joined #ruby
lzx has quit [Remote host closed the connection]
tylersmith has joined #ruby
nickjj has quit [Ping timeout: 246 seconds]
techsethi has quit [Quit: techsethi]
sinkensabe has quit [Read error: Connection reset by peer]
lioninawhat has joined #ruby
kl has joined #ruby
sinkensabe has joined #ruby
Takle has joined #ruby
puppetmonkey has quit [Quit: puppetmonkey]
livingstn has joined #ruby
ta has quit [Remote host closed the connection]
fantazo has quit [Quit: Verlassend]
tunaCanBruh has quit [Ping timeout: 252 seconds]
iamjarvo has joined #ruby
thumpba has quit [Remote host closed the connection]
<brahman>
apeiros_: Hey, thanks for your help. I had to do a few modifications to the raw input before importing as YAML in the end.
tylersmith has quit [Ping timeout: 265 seconds]
lioninawhat has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 256 seconds]
thumpba has joined #ruby
jottr has quit [Ping timeout: 264 seconds]
puppetmonkey has joined #ruby
jerius has joined #ruby
shellflu is now known as shellfood
kp666 has quit [Remote host closed the connection]
jlast has joined #ruby
Axy has joined #ruby
Axy has joined #ruby
WillAmes has joined #ruby
_mtr has joined #ruby
thumpba_ has joined #ruby
<kl>
Would you guys say that *everything* you make (whether application or library) should have all of their dependencies pegged in the Gemfile to major versions?
BAMbanda has joined #ruby
allen has joined #ruby
adriancb has joined #ruby
Mia has quit [Read error: Connection reset by peer]
<kl>
I'm just trying to come up with a conclusion to my problems that have had me looking into dependency management/gemfiles/locking
nickjj has joined #ruby
jlast has quit [Ping timeout: 245 seconds]
thumpba has quit [Ping timeout: 244 seconds]
IrishGringo has joined #ruby
plashchynski has joined #ruby
Azulinho has quit [Ping timeout: 256 seconds]
fenzil has joined #ruby
devdazed has joined #ruby
jlast has joined #ruby
greensoup has joined #ruby
mLF has quit [Remote host closed the connection]
ursooperduper has joined #ruby
mrmargolis has joined #ruby
<surs>
I, I want to run 'powershell (new-object system.net.foo).bar("string")' out of a ruby script. puts cmd has the double quotes correct, when I run the ruby script though ps complains about the missing double quotes
<surs>
I'm running system myCmd, where myCmd holds what is between the single quotes above
bronson has joined #ruby
jlast has quit [Ping timeout: 245 seconds]
ki0 has joined #ruby
timonv has quit [Quit: WeeChat 1.1.1]
rx007 has quit [Quit: Leaving.]
rx007 has joined #ruby
rx007 has quit [Max SendQ exceeded]
rx007 has joined #ruby
rx007 has quit [Max SendQ exceeded]
rx007 has joined #ruby
rx007 has quit [Max SendQ exceeded]
rx007 has joined #ruby
rx007 has quit [Max SendQ exceeded]
rx007 has joined #ruby
rx007 has quit [Max SendQ exceeded]
rx007 has joined #ruby
rx007 has quit [Max SendQ exceeded]
rx007 has joined #ruby
rx007 has quit [Max SendQ exceeded]
rx007 has joined #ruby
rx007 has quit [Max SendQ exceeded]
EvanFreeman has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 245 seconds]
rx007 has joined #ruby
rx007 has quit [Client Quit]
SolarSailor has joined #ruby
<surs>
is it seriously not possible to pass a double quote containing command to powershell from ruby?
<apeiros_>
does 'powershell (new-object system.net.foo).bar("string")' in the shell itself even work?
<apeiros_>
I don't know how quoting/args work in windows, but in a *nix shell, that'd quite probably not work
timonv has joined #ruby
<apeiros_>
I'd expect you having to do `powershell '(new-object system.net.foo).bar("string")'`
<surs>
apeiros_: yes it does
<surs>
well, without the 'powershell' obv
<apeiros_>
well, that that was not what I asked
Ivision_ has joined #ruby
DaniG2k has joined #ruby
<surs>
not following. (new-object system.net.foo).bar("string") does what it should
<apeiros_>
you are invoking the powershell command in a shell which is obviously not the powershell.
shellfood is now known as shellfu
<apeiros_>
and I ask you whether that invocation works there.
<surs>
so "powershell" doesn't tell ruby to run it in ps?
tmtwd has joined #ruby
<surs>
it works without the "powershell" because that's superfluous in a powershell
cphrmky has quit [Read error: Connection reset by peer]
sinkensabe has quit [Read error: Connection reset by peer]
<apeiros_>
surs: …
<apeiros_>
system() will execute a statement in your shell
greensoup has quit [Ping timeout: 246 seconds]
sinkensabe has joined #ruby
<apeiros_>
if that statement can't be executed in the shell, then that's quite unrelated to ruby.
<surs>
ok, so I can leave "powershell" out?
<waxjar>
you're not executing in powershell, your executing in some standard shell
<waxjar>
no idea what that is on windows, though
<surs>
so I can't?
<apeiros_>
surs: no, you have to write a valid shell command.
<surs>
you guys are confusing me
Channel6 has quit [Quit: Leaving]
<apeiros_>
um, no, you're confused about how shells work :-p
davedev24_ has joined #ruby
<surs>
I have a valid shell command. If I take the puts output and paste it into a ps it works just fine
<surs>
no, I'm not
tunaCanBruh has joined #ruby
<apeiros_>
*not* in a powershell
Ivision has quit [Ping timeout: 246 seconds]
<apeiros_>
in your *standard* shell
<surs>
my shell command is fine, believe me. what isn't fine is that ruby swallows the quotes before passing it to ps
<apeiros_>
*sob*
werelivinginthef has joined #ruby
<surs>
no, you're not correct. the error I'm getting is clearly a powershell error message
<apeiros_>
sorry, I don't have the time/patience to go through this. I hope waxjar can help you.
paulfm_ has joined #ruby
<surs>
so it is going to powershell
davedev24_ has quit [Read error: Connection reset by peer]
<apeiros_>
which tells us that `powershell` is a command known to your shell.
<apeiros_>
and now you need to learn about how your *standard shell* passes arguments to commands.
davedev24_ has joined #ruby
<surs>
ok, so everything is fine with the "powershell" bit
<apeiros_>
and I bet it passes '(new-object' as the first argument
<gregf__>
i use it for tests(java tho' ). but you can use ot anywhere
<gregf__>
s/ot/it/
<workmad3>
arup_r: hmm... interesting... how do you curry a method with *args?
Takle has quit [Remote host closed the connection]
<workmad3>
arup_r: because that's what Class#new has...
<arup_r>
cool.. thanks for giving an example of that patterns.. I'm crying since last 2 weeks for Ruby examples of GoF patterns.. as Internet has not much with Ruby code..
allcentury has quit [Ping timeout: 252 seconds]
nb_bez___ has joined #ruby
apeiros_ has joined #ruby
livathinos has joined #ruby
ponga has quit [Quit: Leaving...]
triple_b has joined #ruby
greensoup has quit [Ping timeout: 246 seconds]
puppetmonkey has quit [Quit: puppetmonkey]
pontiki has joined #ruby
joonty has joined #ruby
aswen has quit [Ping timeout: 245 seconds]
puppetmonkey has joined #ruby
baroquebobcat has joined #ruby
<pontiki>
how is rubby made?
troyready has quit [Ping timeout: 255 seconds]
<kalleth>
how is rubby formed
<arup_r>
workmad3: Didn't get you
<apeiros_>
nobody understand rubby!
<arup_r>
gregf___: why did you make #new private? reasoning please :)
max96at is now known as max96at|off
<gregf__>
arup_r: i just felt like making it private ;)
<arup_r>
I found someone using patterns in Ruby... Please tell it.. Let me take this opportunity seriously..
AdNauseaum|tWork has joined #ruby
terlar has joined #ruby
<arup_r>
Aww! :-)
<arup_r>
I'm changing your code with your permission... :)
<gregf__>
arup_r: GoF patterns are not something you 'should' use. as your code evolves you feel your code needs to be dynamic and hence unknowingly you end up implementing a design pattern
AdNauseaum|tWork is now known as AdNauseaum
ptrrr has joined #ruby
Timgauthier has joined #ruby
<arup_r>
read your line... but it went above my head...
harfangk has quit [Quit: 전 이만 갑니다.]
Timgauthier is now known as timgauthier_away
<arup_r>
shevy: Are you breaking your IRB ?
<arup_r>
:)
<gregf__>
ask a PHP guy and the'll tell you they;ve mastered a rubbish pattern called 'servicelocator'
timgauthier_away is now known as Timgauthier
<gregf__>
and feel great about it ;) *cough*
Timgauthier is now known as timgauthier_away
timgauthier_away is now known as Timgauthier
allen has quit [Quit: Lost terminal]
BAMbanda has quit [Quit: Lost terminal]
<pontiki>
patterns are quite abstract. they're descriptions, mainly, of something you can recognize in code *after* the fact, mostly
<pontiki>
mainly, mostly, mostly, mainly
jimms has joined #ruby
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tus has quit [Ping timeout: 256 seconds]
mdw has quit [Ping timeout: 265 seconds]
jlast has joined #ruby
Megtastique has joined #ruby
spider-mario has joined #ruby
tus has joined #ruby
<gregf__>
pontiki: true that
joonty has quit [Quit: joonty]
bjornar has quit [Ping timeout: 264 seconds]
peterhu has quit [Quit: kernel update]
<shevy>
arup_r nah, right now I am trying to find a stupid bug in a program
shazaum has joined #ruby
greensoup has joined #ruby
DonOtreply has joined #ruby
Kruppe has quit [Ping timeout: 255 seconds]
GaryOak_ has joined #ruby
Guest87847 has quit [Quit: Leaving]
jgt has joined #ruby
GaryOak_ has quit [Client Quit]
shazaum has joined #ruby
shazaum has quit [Changing host]
jerius_ has quit []
Kruppe has joined #ruby
troyready has joined #ruby
peterhu has joined #ruby
Zai00 has quit [Quit: Zai00]
timonv has quit [Ping timeout: 255 seconds]
max96at|off is now known as max96at
tylersmith has joined #ruby
Megtastique has quit []
thumpba_ has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
greensoup has quit [Ping timeout: 245 seconds]
bMalum has quit [Quit: bMalum]
greenarrow has quit [Quit: 500]
jimms has quit [Read error: No route to host]
jimms has joined #ruby
jefus_ has joined #ruby
rbennacer has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 250 seconds]
jlast has joined #ruby
rbennacer has joined #ruby
IrishGringo has joined #ruby
sambao21 has joined #ruby
Xeago_ has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
Choclo has joined #ruby
teddyp1cker has joined #ruby
jerius has joined #ruby
jefus has quit [Ping timeout: 250 seconds]
rbennacer has joined #ruby
sinkensabe has joined #ruby
jgt has joined #ruby
mdw has quit [Ping timeout: 252 seconds]
slap_stick has quit [Quit: This computer has gone to sleep]
davispuh has quit [Remote host closed the connection]
Gmind has quit [Quit: Leaving.]
teddyp1cker has quit [Ping timeout: 245 seconds]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shellfu>
Hey all. I have been trying to figure this out over the weekend, and my flu infected brain cannot see what is wrong. http://pastebin.com/nAbeTPpd I have a method that iterates over a nested hash, and im trying to replace values from one hash into another.
<shellfu>
Not understanding wtf is the difference in what im doing in IRB vs my method
teddyp1cker has joined #ruby
tercenya has joined #ruby
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
davispuh has joined #ruby
jgt has quit [Ping timeout: 252 seconds]
larissa has quit [Ping timeout: 245 seconds]
Takle has quit [Remote host closed the connection]
puppetmonkey has joined #ruby
thebastl has joined #ruby
dmolina has quit [Ping timeout: 245 seconds]
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
rbennacer has quit [Remote host closed the connection]
Takle has joined #ruby
psy_ has joined #ruby
rbennacer has joined #ruby
jgt has joined #ruby
terlar has joined #ruby
Takle has quit [Remote host closed the connection]
<shellfu>
Any help would be appreciated, and I would be willing to drop some beer money in someones paypal :)
DogHackit has quit [Quit: Konversation terminated!]
zacstewart has joined #ruby
zachrab has joined #ruby
larissa has joined #ruby
<apeiros_>
shellfu: so if v.is_a?(Hash); … else -> what can v be other than a hash? I'd say a string, right?
jgt has quit [Ping timeout: 256 seconds]
<shellfu>
yes sir.
<apeiros_>
ok, I see, you indeed intend to use String#[]=
Hobogrammer has quit [Ping timeout: 250 seconds]
<apeiros_>
but you get an exception for strings which do not contain the value
jottr has quit [Ping timeout: 256 seconds]
triple_b_ has joined #ruby
<apeiros_>
e.g. "node001a" - does not contain %{::kernel} and does not contain %{::kernelversion}, so for that value it fails
<apeiros_>
shellfu: also there's no null in ruby :-p
<shellfu>
yeah that comes from mongo
momomomomo has quit [Quit: momomomomo]
paradoja has quit [Ping timeout: 250 seconds]
ghostmoth has joined #ruby
jottr has joined #ruby
<shellfu>
I was thinking about possibly using something like if v =~ /(?<=\{)(.*?)(?=\})/) to not match, but im not seeing how to capture both kernel and kernelversion
<shellfu>
im only replacing the first entry. My original iterate method ill pastebin
apurcell has joined #ruby
fenzil has quit [Ping timeout: 244 seconds]
kl has quit [Ping timeout: 256 seconds]
JDiPierro has quit [Remote host closed the connection]
rylev has quit [Remote host closed the connection]
<apeiros_>
shellfu: do everbody a favor and use gist instead of pastebin
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adam____ has joined #ruby
triple_b has quit [Ping timeout: 264 seconds]
adam____ has left #ruby [#ruby]
<shellfu>
heh np. just used pastebin for years. Ill move it to gist
IrishGringo has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby
fabrice31 has joined #ruby
kirun has quit [Quit: Client exiting]
Jetchisel has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ineb>
i found code in a documentation like this: https://gist.github.com/anonymous/fcbe6ef7916a879fa70f , now i have the contents of 'object' located in a file. how should i open my file to pass it to the parse method?
davedev2_ has joined #ruby
gccostabr has joined #ruby
davedev24_ has quit [Ping timeout: 256 seconds]
<quazimodo>
arup_r: how did i work what out?
<arup_r>
quazimodo: Gist of your code.. wanna to see
<quazimodo>
CGI::Util has escapeHtml
<quazimodo>
arup_r: i was asleep, i just woke up :)
<koding123>
arup_r, ?
<arup_r>
ohkay
tunaCanBruh has quit [Ping timeout: 264 seconds]
allcentury has quit [Ping timeout: 250 seconds]
<arup_r>
O.0 <~~~
<koding123>
oh
davedev2_ has quit [Read error: Connection reset by peer]
<arup_r>
O.o <~~~
davedev24_ has joined #ruby
<quazimodo>
beep boop
* arup_r
got stuck into IRC again....
<arup_r>
quazimodo: code?
<arup_r>
gist
tunaCanBruh has joined #ruby
kaspertidemann has joined #ruby
zenith_ has joined #ruby
plashchynski has quit [Quit: plashchynski]
Hijiri has joined #ruby
<quazimodo>
arup_r: no code!
TDJACR has quit [Ping timeout: 245 seconds]
<quazimodo>
i was asleep till now!
<quazimodo>
haha
<arup_r>
lol
tylersmi- has quit [Ping timeout: 245 seconds]
davedev24_ has quit [Ping timeout: 245 seconds]
rodfersou has quit [Read error: Connection reset by peer]
Seich has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
graft has joined #ruby
graft has joined #ruby
rodfersou has joined #ruby
jefus__ has joined #ruby
hyperdrive has quit [Changing host]
hyperdrive has joined #ruby
hyperdrive is now known as hdrv
<ineb>
ok i solved my problem above: file = File.open(item, "rb"); data = NagiosParser::Object::Parser.parse(file.read)
thebastl has joined #ruby
kl has quit [Ping timeout: 265 seconds]
Seich has joined #ruby
tcrypt has joined #ruby
TDJACR has joined #ruby
baroquebobcat has joined #ruby
triple_b_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 35.0/2015010900]]
lolmaus has joined #ruby
sinkensabe has quit [Remote host closed the connection]
jefus_ has quit [Ping timeout: 255 seconds]
sambao21 has joined #ruby
g-nom3 has left #ruby [#ruby]
porfa has joined #ruby
zyxelthrone has joined #ruby
<porfa>
so… i0ve been asking all this sorts of crap related to ruby and i haven’t noticed i was in the freenodechannel… that didn’t go well..!
<porfa>
ok.. what can i use to make ruby submit for me= i want to fetch some data/scrape from my backoffice, but before i have access to it, i need to login...
<porfa>
what’s ther best gem for this?
jefus__ has quit [Ping timeout: 245 seconds]
vdamewood has joined #ruby
jefus__ has joined #ruby
Seich has quit [Ping timeout: 245 seconds]
TDJACR has quit [Ping timeout: 245 seconds]
triple_b has joined #ruby
jefus__ has quit [Max SendQ exceeded]
jefus__ has joined #ruby
bronson has joined #ruby
Seich has joined #ruby
SomeDude has joined #ruby
lioninawhat has quit [Remote host closed the connection]
shum has quit [Quit: WeeChat 1.1.1]
__main__ has quit [Read error: Connection reset by peer]
VBlizzard is now known as blizzy
shum has joined #ruby
sinkensabe has joined #ruby
dzho has joined #ruby
_main_ has joined #ruby
Lingo___ has joined #ruby
alex88 has quit []
triple_b has quit [Ping timeout: 246 seconds]
zenith___ has joined #ruby
rikai has quit [Ping timeout: 245 seconds]
xavier_ has joined #ruby
[gmi] has joined #ruby
zenith_ has quit [Ping timeout: 250 seconds]
BillSussman has joined #ruby
jrdnull has joined #ruby
<xavier_>
jews are behind ruby
danjordan has joined #ruby
<havenwood>
apeiros: ^
bronson has quit [Ping timeout: 264 seconds]
einarj has joined #ruby
baweaver has joined #ruby
sinkensabe has quit [Remote host closed the connection]
rylev has joined #ruby
TDJACR has joined #ruby
ghr has joined #ruby
<apeiros>
I am confused - are you trying to diss jews? because I'd consider the statement a praise…
<apeiros>
I mean I'd want to be behind ruby…
cphrmky has joined #ruby
<apeiros>
meh
<xavier_>
cant trust it
xavier_ was kicked from #ruby by apeiros [antisemitism isn't welcome here]
<havenwood>
apeiros: indeed :)
xavier_ has joined #ruby
<xavier_>
ok ok
yfeldblum has joined #ruby
Takle has joined #ruby
_main_ is now known as __main__
zachrab has quit [Remote host closed the connection]
momomomomo has joined #ruby
zachrab has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
* wasamasa
wonders whether xavier_ is an alternative identity of unknown_
<wasamasa>
^ some guy who appeared on #emacs yesterday to do paranoia-trolling barely related to the channel
<apeiros>
did unknown_ troll previously today? at least I can't remember the nick, and I usually remember trolls…
dfinninger has quit [Remote host closed the connection]
<apeiros>
ah
<xavier_>
whats an emac
<eam>
I mean, the first statement is unequivocally true, it's the unwarranted negative connotation that's inappropriate
<havenwood>
ineb: Using the non-block version of File::open leaves the file open, so you'd have to call `file.close` explicitly to close it. Maybe consider using `File.read`, which will read the file contents and close it in one: http://www.ruby-doc.org/core-2.2.0/IO.html#method-c-read
<xavier_>
yes but you assumed the negative connotation
<xavier_>
it is you who is anti semetic
<wasamasa>
ok, kiwf
baweaver has quit [Remote host closed the connection]
cpt_yossarian has joined #ruby
<apeiros>
thought so
xavier_ was kicked from #ruby by apeiros [good bye]
zachrab has quit [Remote host closed the connection]
brandon_ has quit [Read error: Connection reset by peer]
Spami has quit [Quit: This computer has gone to sleep]
alderamin has joined #ruby
baweaver has quit [Remote host closed the connection]
<waxjar>
ellisTAA: most people indent the method definitions too, looks like they're defined on the top level now
<waxjar>
line 62 looks a little weird, would use a newline there
<alderamin>
I have a collection of related classes whose functionality will be used across a number of projects. Most of them can exist on their own but can also contain objects of other classes. Should I group them in a module or leave them separate and include only those classes that I need? I'm thinking along the line of Java-style packages.
aryaching has quit [Ping timeout: 265 seconds]
ghostpl has quit [Ping timeout: 256 seconds]
<ellisTAA>
waxjar: in regards to line 62 you mean the thing that should happen should go on the next line?
<waxjar>
yeah
<ellisTAA>
waxjar: what do you mean indent the method definitions?
<waxjar>
other than that, looks good. perhaps get rid of the =begin =end comment blocks and just use # regular commands
<ellisTAA>
ok ill do that with the comments
bjornar has quit [Ping timeout: 250 seconds]
<waxjar>
ellisTAA: by indenting the method definitions i mean shift everything between class and end two spaces to the right
OrbitalKitten has joined #ruby
<ellisTAA>
waxjar: i see thanks ill do that
mahlon has joined #ruby
CpuID2 has joined #ruby
CpuID2 has joined #ruby
symbol_ has quit [Quit: WeeChat 1.1]
matcouto has joined #ruby
LBRapid has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby
cocotton has quit [Quit: Leaving...]
baweaver has joined #ruby
postmodern has joined #ruby
akkad has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lingo___ has quit [Read error: Connection reset by peer]
Takle has quit [Remote host closed the connection]
davidhq has joined #ruby
rylev has quit []
davispuh has quit [Read error: Connection reset by peer]
LBRapid has joined #ruby
Zai00 has joined #ruby
kobain has quit [Ping timeout: 245 seconds]
Spami has joined #ruby
pontiki has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
jenrzzz has quit [Ping timeout: 265 seconds]
lanemeyer has quit [Ping timeout: 265 seconds]
allcentury has quit [Ping timeout: 264 seconds]
davispuh has joined #ruby
zacstewart has quit [Remote host closed the connection]
davispuh has quit [Remote host closed the connection]
slawrence00 has joined #ruby
startupality has quit [Quit: startupality]
jenrzzz has joined #ruby
davispuh has joined #ruby
bjornar has joined #ruby
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kricir has quit [Remote host closed the connection]
aclearman037 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jgt has joined #ruby
Kricir has joined #ruby
ghr has joined #ruby
thebastl has joined #ruby
DonOtreply_ has quit [Ping timeout: 246 seconds]
allcentury has joined #ruby
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DonOtreply has joined #ruby
psyprus has quit [Changing host]
psyprus has joined #ruby
momomomomo has quit [Quit: momomomomo]
fedalto has quit [Quit: leaving]
ismael_ has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 245 seconds]
Kricir has quit [Ping timeout: 245 seconds]
B1n4r10 has joined #ruby
sinkensabe has joined #ruby
banister is now known as banisterfiend
hmsimha has quit [Ping timeout: 252 seconds]
davispuh has quit [Ping timeout: 250 seconds]
maximski has quit []
oleo__ is now known as oleo
reinaldob has quit [Remote host closed the connection]
thebastl has quit [Ping timeout: 264 seconds]
davispuh has joined #ruby
vvivv has joined #ruby
akkad has joined #ruby
OrbitalKitten has joined #ruby
zyxelthrone has quit [Remote host closed the connection]
hmsimha has joined #ruby
kobain has joined #ruby
sinkensabe has quit [Ping timeout: 264 seconds]
thebastl has joined #ruby
chrishough has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
sinkensabe has joined #ruby
jottr_ has quit [Ping timeout: 250 seconds]
momomomomo has joined #ruby
beneggett has joined #ruby
vdamewood has joined #ruby
OrbitalKitten has quit [Ping timeout: 246 seconds]
himsin has quit [Quit: himsin]
CpuID2 has quit [Quit: This computer has gone to sleep]
thebastl has quit [Ping timeout: 245 seconds]
brb3 has quit [Read error: Connection reset by peer]
malcolmva has joined #ruby
brb3 has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Spami has quit [Quit: This computer has gone to sleep]
faelkle has joined #ruby
faelkle has quit [Quit: Leaving]
SOLDIERz_ has quit [Quit: Be back later ...]
fmcgeough has quit [Quit: fmcgeough]
sambao21 has joined #ruby
peterhu_ has joined #ruby
zyxelthrone has joined #ruby
tkuchiki has joined #ruby
rubytor has joined #ruby
pkrzywicki has joined #ruby
bjornar has quit [Remote host closed the connection]
Spami has joined #ruby
<quazimodo>
whats the standard 'not enumerable' error?
davedev24_ has quit [Ping timeout: 246 seconds]
Morkel has joined #ruby
<weaksauce>
quazimodo method each not defined or something to that effect
Spami has quit [Client Quit]
plashchynski has joined #ruby
thebastl has joined #ruby
<quazimodo>
hrm
davispuh has quit [Ping timeout: 245 seconds]
Synthbread is now known as Synthead
<crome>
there is no such thing as something is not xy class/module error
Synthead has quit [Quit: Leaving]
<crome>
the object simply won't respond to the method call and will complain
lioninawhat has joined #ruby
jgt has quit [Ping timeout: 245 seconds]
tunaCanBruh has quit [Ping timeout: 240 seconds]
Synthead has joined #ruby
Spami has joined #ruby
djbkd has quit [Remote host closed the connection]
davedev24_ has joined #ruby
swgillespie has joined #ruby
davispuh has joined #ruby
lioninawhat has quit [Remote host closed the connection]
Aova has quit [Read error: Connection reset by peer]
<weaksauce>
quazimodo what are you trying to do?
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
The_Phoenix has quit [Read error: Connection reset by peer]
danman has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
greensoup has quit [Ping timeout: 250 seconds]
tkuchiki has quit [Remote host closed the connection]
Aova has joined #ruby
davispuh has quit [Remote host closed the connection]
markfletcher has left #ruby [#ruby]
Kricir has joined #ruby
kirun has quit [Quit: Client exiting]
krz has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<quazimodo>
weaksauce: wanted my method to raise an error unless it's given an enumerable as input
zenith___ has quit [Ping timeout: 250 seconds]
davispuh has joined #ruby
<quazimodo>
but i guess calling 'each' will raise the error anyway
<weaksauce>
why? you can wrap the code in an Array() call
<crome>
well, let's hope you don't create objects that will launch the nukes with the #each method
nolic has quit [Remote host closed the connection]
iliketurtles has joined #ruby
<weaksauce>
and it works with arrays too.
<quazimodo>
i have a class JsonParser which is supposed to take some Json, parse it and output an array of Retailer objects. I have a RetailerListFactory module that takes parsed JSON and builds the list of Retailer objects. So where do I actually test that the Retailer objects are correctly created?
davispuh has joined #ruby
baweaver has quit [Remote host closed the connection]
pkrzywicki has quit [Ping timeout: 245 seconds]
krz has quit [Ping timeout: 265 seconds]
<eam>
crome: the simplified case rarely demonstrates the trouble with the corners :)
<quazimodo>
do i unit test the module or my own JsonParser class ,which basically does data = JSON.parse @data; build_list data where build_list comes from the RetailerListFactory module thats mixed in
pkrzywicki has joined #ruby
djbkd has joined #ruby
deepu has joined #ruby
<weaksauce>
can you gist a more complete example quazimodo
<quazimodo>
weaksauce: basically, the json that gets parsed is to turn into an array of retailer objects
<quazimodo>
so where do I check that that's done properly?
<eam>
shevy: yeah exactly, I think it's not possible
<waxjar>
eam i d n't think you can, but you could emulate by adding a method to an instance's singleton class that raises a NoMethodError or something.
<quazimodo>
i guess i'm asking, do i put that in the spec file for the RetailerListModule, or the JsonParser spec
baweaver has quit [Remote host closed the connection]
ellisTAA has quit [Quit: ellisTAA]
jottr_ is now known as jottr
<weaksauce>
quazimodo is the activerecord?
<quazimodo>
no
spider-mario has quit [Remote host closed the connection]
zacstewart has joined #ruby
<m4rCsi>
hello, I am using jruby and am running about 5 threads. All threads need in some form or another a redis client (every thread does different work). Is there an easy solution to pass a redis client around?
DonOtreply has quit [Ping timeout: 240 seconds]
<deepu>
weaksauce: what i am struggling with is adding ports 2004:a, 2004:b, 2104:a and 2104:b at the end. Your example only add 2004:a at the end
Musashi007 has joined #ruby
baweaver has joined #ruby
<weaksauce>
deepu I know... how do you think you can add to that snippet to make it work knowing what I just did to add that?
DonOtreply has joined #ruby
<weaksauce>
do you know what << does?
Hijiri has quit [Quit: moving]
<deepu>
weaksauce: yes.. it add the value to the array
fabrice31 has joined #ruby
<weaksauce>
ok... do you know that you can use more than one statement in an each block?
nolic has joined #ruby
davedev24_ has joined #ruby
koding123_ has joined #ruby
koding123 has quit [Ping timeout: 250 seconds]
wldcordeiro has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
cjim has joined #ruby
<weaksauce>
quazimodo well, it's useful to just move forward and refactor things later once you figure out where the system is not optimal
<eam>
>> a = []; class << a; undef_method :length; end; a.respond_to? :length # by way of my amazing coworkers
<eam>
undef_method appears to define a method which essentially isn't one
<weaksauce>
but yeah that should work deepu
DEA7TH has joined #ruby
koding123 has joined #ruby
<deepu>
weaksauce: thank you
koding123_ has quit [Ping timeout: 264 seconds]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wallerdev has quit [Quit: wallerdev]
<weaksauce>
you're welcome
Morkel has quit [Quit: Morkel]
fantazo has quit [Quit: Verlassend]
wallerdev has joined #ruby
Hijiri has joined #ruby
zachrab has joined #ruby
jottr has quit [Ping timeout: 265 seconds]
dc has joined #ruby
aef has quit [Remote host closed the connection]
aef has joined #ruby
reinaldob has quit [Ping timeout: 250 seconds]
sambao21 has joined #ruby
paulfm has quit [Quit: Zzzzz...]
DouweM has joined #ruby
dagda1 has joined #ruby
fenzil has quit [Ping timeout: 245 seconds]
werelivinginthef has joined #ruby
roshanavand has quit [Quit: roshanavand]
alkoma has joined #ruby
<quazimodo>
hrm
djbkd has quit [Remote host closed the connection]
<quazimodo>
is it better to parse my json and arrange my data by manufacturer
<quazimodo>
or is it better to create a specialised data class for my data, and then query that data
<quazimodo>
like data.uniq_manufacturers
alkoma has quit [Remote host closed the connection]
<quazimodo>
or data.from_manufacturer(manufacturer_name)
baweaver has quit [Remote host closed the connection]
decoponio has quit [Read error: Connection reset by peer]
p3ery has quit [Ping timeout: 250 seconds]
decoponio has joined #ruby
zacstewart has quit [Ping timeout: 252 seconds]
jenrzzz_ has joined #ruby
athan has joined #ruby
djbkd has joined #ruby
kl has quit [Quit: leaving]
last_staff has joined #ruby
shum has quit [Quit: WeeChat 1.1.1]
dixie__ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
shum has joined #ruby
koding123 has quit [Ping timeout: 245 seconds]
smathieu has joined #ruby
rajeshchawla has joined #ruby
totimkopf has quit [Ping timeout: 264 seconds]
addisaden1 has joined #ruby
yfeldblum has joined #ruby
tunaCanBruh has joined #ruby
livingstn has quit []
koding123 has joined #ruby
brb3 has quit [Quit: ZZZzzz…]
elfuego has quit [Quit: elfuego]
djbkd has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
davispuh has quit [Remote host closed the connection]
greensoup has quit [Ping timeout: 246 seconds]
shum has quit [Quit: WeeChat 1.1.1]
allcentury has quit [Ping timeout: 255 seconds]
shum has joined #ruby
codecop has quit [Remote host closed the connection]
tunaCanBruh has quit [Ping timeout: 246 seconds]
dc_ has joined #ruby
Aova has quit [Read error: Connection reset by peer]
shum has quit [Client Quit]
shellfood is now known as shellfu
koding123 has quit [Quit: Leaving]
it0a has quit [Quit: WeeChat 1.1.1]
jenrzzz_ has quit [Ping timeout: 245 seconds]
shum has joined #ruby
charliesome has joined #ruby
dc has quit [Read error: Connection reset by peer]
silkfox has quit [Ping timeout: 245 seconds]
DouweM has quit [Read error: Connection reset by peer]
EvanFreeman has quit [Remote host closed the connection]
Aova has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ellisTAA has joined #ruby
tunaCanBruh has joined #ruby
allcentury has joined #ruby
sankaber has joined #ruby
wottam has joined #ruby
triple_b has quit [Ping timeout: 250 seconds]
sankaber has quit [Client Quit]
Troy^ has joined #ruby
DogHackit has joined #ruby
Troy^ has quit [Client Quit]
Sembei has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
plashchynski has quit [Quit: plashchynski]
lmickh has quit [Remote host closed the connection]
<DogHackit>
Hello, can anyone explain how I would use sprintf to format a string object? I am getting too few arguments when doing this "grade_arr << sprintf('%15s %2s %2s', grades.to_s)"
Lucky___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
plashchynski has joined #ruby
kobain has quit [Ping timeout: 264 seconds]
zacstewart has joined #ruby
Troy^ has joined #ruby
GPH|work has quit [Ping timeout: 264 seconds]
mloveless has joined #ruby
thebastl has quit [Quit: Leaving...]
<wallerdev>
what do you want to do?
skj3gg has quit [Quit: welp, see you later.]
<wallerdev>
grab the first 15, then the first 2, then the first 2 again?
EvanFreeman has joined #ruby
<wallerdev>
you're asking for 3 input strings but only passsing one
Troy^ has quit [Client Quit]
<crome>
sprintf('%15s %2s %2s', *grades)
<crome>
but I don't know your data types
<crome>
I'm just guessing as to what you might be trying to do
iliketurtles has quit [Quit: zzzzz…..]
jottr has joined #ruby
Troy^ has joined #ruby
Lucky___ has joined #ruby
addisaden2 has joined #ruby
puppetmonkey has quit [Quit: puppetmonkey]
<DogHackit>
It is a string. I want a format of "15 characters" then "2characters" then "2character"2
addisaden1 has quit [Ping timeout: 264 seconds]
<crome>
I think you misunderstand the whole printf formatting thing
<DogHackit>
not a last 2, sorry
<DogHackit>
I want this: "Grade1 : 4 0" to look like this "Grade1 : 40 8"
<crome>
in any case, give us a code example with sample input and expected output
plashchynski has quit [Quit: plashchynski]
EvanFreeman has quit [Remote host closed the connection]
<GaryOak_>
porfa: mechanize also uses nokogiri to do simple parsing
gr33n7007h has quit [Quit: Leaving]
<weaksauce>
DogHackit np.
<porfa>
im using nokogiri for most of my stuff
DonOtreply has quit [Quit: DonOtreply]
<GaryOak_>
cool
<porfa>
but now i need to login into a backoffice and get data from there...
pygospa has joined #ruby
swgillespie has joined #ruby
Lingo_ has quit [Quit: (null)]
gr33n7007h has joined #ruby
<GaryOak_>
yeah logins are a little more complex
<crome>
DogHackit: either do something like grades.each { |grade| grades_arr << sprintf("%-15s: %2s %2s", grade.name, grade.value1, grade.value2) }
koding123 has quit [Quit: Leaving]
<crome>
or define #to_s in the grade class so it knows how to format itself
<weaksauce>
DogHackit in general you would want to get properties from the grades object and put those into a string instead of trying to parse the default to_s value
<crome>
and then you can do grades.each { |grade| grades_arr << grade.to_s }
javascript496 has joined #ruby
<weaksauce>
"#{grades.name.ljust(15)}:#{grades.grade_num}" or something like that DogHackit
<DogHackit>
so, if I do this formating in my to_s, that would probably work better for me. I will try that.
jottr has quit [Ping timeout: 245 seconds]
davispuh has joined #ruby
mloveless has quit []
werelivinginthef has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
<crome>
DogHackit: if you want to be really awesome and overengineer the whole thing you can create a gradeformatter class because strictly speaking what you are doing is representation
Musashi007 has quit [Quit: Musashi007]
jrunning_ has quit [Ping timeout: 245 seconds]
ballPointPenguin has quit [Ping timeout: 265 seconds]
<crome>
and then you can write awesome unit tests as well
PhilK has quit [Ping timeout: 272 seconds]
lioninawhat has joined #ruby
<crome>
and sprinkle fairy dust over the whole project
troter___ has quit [Ping timeout: 265 seconds]
javascript496 has quit [Ping timeout: 246 seconds]
<DogHackit>
I put this: "'%-15.15s' % @assignment_name + " : " + '%-2.2s' % @max_points + " " + '%-2.2s' % @points_received" in the Grade.to_s
phutchins has quit [Ping timeout: 245 seconds]
gmcintire has quit [Read error: Connection reset by peer]
Megtastique has quit []
cjim has quit [Quit: (null)]
markfletcher has joined #ruby
dukedave has quit [Ping timeout: 250 seconds]
<DogHackit>
Seems to work like a charm now. Thanks for the help!
josephndenton has quit [Ping timeout: 250 seconds]