<sent-hil>
AFAIK slice! removes the specified chars
<sent-hil>
you can use #split to split at a specified letter
Asher has quit [Read error: Connection reset by peer]
Asher1 has joined #ruby
Asher1 has quit [Client Quit]
Asher has joined #ruby
<sent-hil>
"hello".split('e') #=> ['h', 'llo']
<sent-hil>
ofcourse that removes the specified letter
rabidpraxis has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
<freezway>
sent-hil, i need to split at a specific spot
<freezway>
and there will be repeats
<freezway>
im splitting a 16bit binary # into two 8 bit binary #'s
ryanlecompte has quit [Remote host closed the connection]
nwertman has joined #ruby
codeFiend has joined #ruby
lggr has joined #ruby
<waxjar>
if the length of the string is always the same, you could do something like first, second = string[0..8], string[9..16]
brianpWins has joined #ruby
marienz has quit [Remote host closed the connection]
gry has quit [Remote host closed the connection]
<whaley>
or something like first, second = s[0..n], s[n+1..s.size]
<whaley>
assuming n isn't larger than s.size, I think
<freezway>
true, was hoping for some handier (i just started learning ruby, not familiar with 90% of the functions) but i guess these nothing handy for that
<whaley>
(basically waxjar's answer)
gry has joined #ruby
<heftig>
when it's acceptable to modify the original string, slice!
freakazoid0223 has joined #ruby
<heftig>
prefix = str.slice!(0,8)
<heftig>
will slice the first 8 characters into prefix, leaving the rest in str
mmitchell has joined #ruby
<waxjar>
if you're going to assign it to a variable, you don't need the bang version right?
cbuxton has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
<heftig>
waxjar: the return value of the bang version isn't unimportant
<heftig>
str = "foobar"; prefix = str.slice!(0,3); afterwards, prefix is "foo" and str is "bar"
lggr has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
Asher1 has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
<waxjar>
ash, clever. i expected it to just return nil
AlbireoX`Laptop has joined #ruby
<waxjar>
*aah
cakehero has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
tiripamwe has joined #ruby
|Monie| has joined #ruby
sent-hil has quit [Remote host closed the connection]
shadoi has quit [Ping timeout: 245 seconds]
seanyo has joined #ruby
cbuxton has quit [Quit: Leaving.]
frogprince has quit []
reset has joined #ruby
hgf has left #ruby [#ruby]
quest88 has joined #ruby
rabidpraxis has joined #ruby
Jamone has quit [Ping timeout: 260 seconds]
cxz has quit [Ping timeout: 260 seconds]
Monie has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
irleif has joined #ruby
werdnativ has joined #ruby
cxz has joined #ruby
Asher has quit [*.net *.split]
dakine has quit [*.net *.split]
AlbireoX has quit [*.net *.split]
|Monie| has quit [Ping timeout: 244 seconds]
lggr has quit [Ping timeout: 245 seconds]
cardoni has joined #ruby
lggr has joined #ruby
marcux has quit [Ping timeout: 246 seconds]
dakine has joined #ruby
fyolnish_ has quit [Remote host closed the connection]
mxweas has joined #ruby
tothehilt has quit [Remote host closed the connection]
adkron has quit [Quit: leaving]
mrsolo has quit [Quit: Leaving]
jlwestsr has joined #ruby
<freezway>
my friend showed me a way to quickly create an array of numbers from a to b, sorta like (a..b) whats the syntax for that
x82_nicole has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby
cj3kim has joined #ruby
adeponte has joined #ruby
elsifaka has quit [Read error: Connection reset by peer]
elsifaka has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
havenn has quit [Ping timeout: 245 seconds]
starship has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
iamjarvo has joined #ruby
JonnieCache has quit [Ping timeout: 244 seconds]
QKO has quit [Read error: Connection reset by peer]
havenn has joined #ruby
QKO has joined #ruby
lggr has joined #ruby
locriani has joined #ruby
joeycarmello has quit [Remote host closed the connection]
thinkclay has quit [Quit: Leaving.]
shiki has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
codeFiend has left #ruby [#ruby]
RJ3000_ has joined #ruby
bbttxu_ has joined #ruby
sent-hil has quit [Remote host closed the connection]
slainer68 has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
joeycarmello has joined #ruby
bbttxu_ has quit [Client Quit]
nitti has joined #ruby
slainer68 has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
RJ3000_ has quit [Ping timeout: 246 seconds]
kringa has joined #ruby
joeycarmello has quit [Remote host closed the connection]
nitti has quit [Ping timeout: 260 seconds]
codeFiend has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 256 seconds]
voodoofish430 has quit [Quit: Leaving.]
lggr has joined #ruby
horofox has quit [Quit: horofox]
wallerdev has joined #ruby
aeontech has joined #ruby
RJ3000_ has joined #ruby
iamjarvo has quit [Ping timeout: 260 seconds]
Synthead has joined #ruby
GoHuyGo has joined #ruby
codeFiend has quit [Ping timeout: 246 seconds]
aeontech is now known as codeFiend
lggr has quit [Ping timeout: 255 seconds]
starship has quit [Quit: WeeChat 0.3.2]
harushimo has joined #ruby
lggr has joined #ruby
reset has quit [Ping timeout: 240 seconds]
<harushimo>
i'm back
jrist is now known as jrist-afok
jrist-afok is now known as jrist-afk
brianpWins has quit [Quit: brianpWins]
freezey has joined #ruby
c0rn_ has joined #ruby
justsee has quit [Quit: Leaving...]
<freezey>
if i had data stored in a db as whatever0 - whatever50 .. and i wanted to create an array for all and do a var.foreach how would i create the array to read all of the data i have stored?
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
lggr has quit [Ping timeout: 272 seconds]
uris has quit [Quit: Lost terminal]
wedtm|away is now known as wedtm
lggr has joined #ruby
snorkdude has joined #ruby
snorkdude has quit [Remote host closed the connection]
<harushimo>
I need to preserve the word in the output. how would I do that
<harushimo>
if I'm given that type of data set
<harushimo>
I can probably use a downcase. method too
bluOxigen has joined #ruby
<havenn>
harushimo: you can drop the quotes when you use %w: %w[Dad dad Dad] #=> ["Dad", "dad", "Dad"]
<harushimo>
I didn't know thank you
c0rn_ has quit [Ping timeout: 272 seconds]
<harushimo>
what if I want all them to be lower case word
<havenn>
harushimo: %w[Dad dad Dad].map &:downcase #=> ["dad", "dad", "dad"]
burgestrand has quit [Quit: Leaving.]
Dreamer3 has joined #ruby
<harushimo>
oh I shouldn't do it inside function
<harushimo>
I'm calling combine anagram on it
c0rn_ has joined #ruby
<harushimo>
forget it
<harushimo>
I understand it now
lggr has quit [Ping timeout: 260 seconds]
syamajala has joined #ruby
<harushimo>
since I passed it as a parameter, it is already changing
joofsh has quit [Remote host closed the connection]
lggr has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
nwertman has quit [Quit: nwertman]
<Cool_Fire>
freezey: var = mySQLObject.query("SELECT `key` FROM invites WHERE `key` = '" + key + "'")
<Cool_Fire>
I'm fairly sure you can foreach a mysql resultset
<freezey>
Cool_Fire: yeah.. the data is coming from facter
lggr has quit [Ping timeout: 246 seconds]
<freezey>
thats my only thing
<freezey>
trying to figure out how i can do this
syamajala has quit [Remote host closed the connection]
<freezey>
Cool_Fire: thanks though
gogiel has quit [Remote host closed the connection]
<bperry>
whoa serious sql injection vuln there
<bperry>
don't do that ever
<krz>
with 'foo:a:bar:b:baz:c' how would i parse through this. so if i wanted the value for foo. it would return a. and for bar, it would return b. so forth
<bperry>
or make sure key is sanitized :)
<Cool_Fire>
Oh yeah, that's not in a script subject to unsanitized input :p
<bperry>
krz: a b c are odd numbers in that if you break it up
v0n has quit [Ping timeout: 260 seconds]
<bperry>
split on : and loop, when i %2 == 0 you have a, b , or c
mahmoudimus has quit [Quit: Computer has gone to sleep.]
bapa_ has joined #ruby
<bperry>
er
lggr has joined #ruby
<bperry>
er i%2 == 1
<freezey>
yeah problem is i have another store grabbing data out of rb files and it created whatever0 - whatever50 and i need to pull that into a value
bapa has quit [Ping timeout: 244 seconds]
<krz>
bperry: i need to get individual values. not all of them though
<bperry>
then loop through each and put the values in a hash
beefsupreme has quit [Remote host closed the connection]
<bperry>
and use the same modulus test to figure out what goes where
<harushimo>
any suggestions which route I should take
<Spaceghostc2c>
The one less traveled.
<krz>
all roads lead to rome. any route should be fine
<Cool_Fire>
Both terrible advices :p
<bperry>
bring a towel
<krz>
the longer route, for the scenic view. otherwise what Spaceghostc2c said
<Spaceghostc2c>
Cool_Fire: How would you know?
<harushimo>
haha
<Cool_Fire>
The one less traveled is probably less traveled for a good reason. And not all roads lead to Rome, and if they did, some routes would still be much longer and less pleasant than others.
nitti has quit [Ping timeout: 260 seconds]
rabidpraxis has quit [Remote host closed the connection]
<harushimo>
I was thinking of a solution to my program
<harushimo>
hehe
<krz>
sometimes getting lost is fun
<harushimo>
yeah it is
<harushimo>
hehe
rabidpraxis has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
<Cool_Fire>
It's usually not terribly productive though :p
<krz>
i would suggest apple maps for getting lost
bapa_ has quit [Ping timeout: 276 seconds]
<harushimo>
i was reading on the web apple is heavily recruiting ex google mappers
<harushimo>
to create the map for them
<harushimo>
I mean map app for them
<Cool_Fire>
Lol, makes sense
<harushimo>
it does
vitoravelino is now known as vitoravelino`afk
<harushimo>
I'm struggling with this last part of my program
<harushimo>
I don't know why
<Spaceghostc2c>
Cool_Fire: How would you know if you only traveled the well-worn paths?
<harushimo>
any guidance would be great
<Spaceghostc2c>
How will you ever innovate or ever find something true to yourself if you only follow the popular agenda?
lggr has joined #ruby
quest88 has quit [Quit: quest88]
otters has quit [Ping timeout: 245 seconds]
<krz>
harushimo: you can do it. stick with the program. your almost done with it. don't give up
<krz>
harushimo: its tough getting through AA. but your on your last stretch
<harushimo>
I know
<harushimo>
I can't get the expected results at all
<Cool_Fire>
Spaceghostc2c: True, but how will you ever get ahead if you keep reinventing the wheel?
<Spaceghostc2c>
Cool_Fire: I'm afraid that you've gone and failed the Frost test.
<harushimo>
its really bugging me
<Spaceghostc2c>
Cool_Fire: How can you reinvent a wheel that has not been traveled?
bapa has joined #ruby
<harushimo>
do I need to change my grouping
<Cool_Fire>
This is getting a little abstract now :p
irleif has quit [Quit: Computer has gone to sleep.]
<Spaceghostc2c>
Cool_Fire: Just sayin'.
<Cool_Fire>
I'm gonne go microwave some food instead.
<Cool_Fire>
Anyway, you don't always have to travel a path to be able to know something about it
<Cool_Fire>
You can gather information from others that have traveled it. And you can use binoculars and see at least part of the path and where it leads.
<krz>
its like a rocking chair. it gives you something to do, but doesn't get you anywhere
<Cool_Fire>
If your rocking chair doesn't go anywhere, you're not rocking hard enough :p
<Cool_Fire>
Seriously though, I'm starving over here. bbl.
<krz>
this ruby conversation was just starting to get fun
ananthakumaran has joined #ruby
<bperry>
your face is starving
<krz>
its ruby relevant right?
<krz>
sometimes we make hard choices in ruby
<harushimo>
krz: I give up
<harushimo>
I'm done
<harushimo>
I can't figure it out
joeycarmello has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
<krz>
dont give up. throw your bottle away and stick with your AA class
<krz>
stick with the program
<harushimo>
oh man..this is a small bug to which I can't figure out
ryanlecompte has quit [Remote host closed the connection]
lggr has joined #ruby
bapa has quit [Read error: Connection reset by peer]
bapa has joined #ruby
freezey has quit [Quit: freezey]
rippa has quit [Ping timeout: 260 seconds]
dmiller has joined #ruby
AMfish has quit [Ping timeout: 256 seconds]
awestroke has quit [Remote host closed the connection]
monkegjinni has quit [Ping timeout: 240 seconds]
zommi has joined #ruby
slainer68 has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
ryanf has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
mikepack has quit [Remote host closed the connection]
tonini has joined #ruby
nitti has joined #ruby
lggr has joined #ruby
codeFiend has quit [Quit: codeFiend]
<shevy>
krz positions like [0] or [5] usually are used for arrays, but hashes are more flexible and could use such keys too. arrays are simpler though, they are like a dumb container
slainer68 has quit [Ping timeout: 252 seconds]
Criztian has joined #ruby
nightfalcon has joined #ruby
monkegjinni has joined #ruby
jprovazn_away is now known as jprovazn
chussenot has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
dmiller has quit [Remote host closed the connection]
monkegjinni has joined #ruby
nitti has quit [Ping timeout: 245 seconds]
_mak has quit [Remote host closed the connection]
cj3kim has quit [Quit: This computer has gone to sleep]
_mak has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
Asher1 has quit [Read error: Connection reset by peer]
Asher has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
parzorep has quit [Ping timeout: 276 seconds]
sqbell_ has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
Asher has quit [Client Quit]
monkegjinni has joined #ruby
Asher has joined #ruby
_mak has quit [Remote host closed the connection]
thone_ has joined #ruby
cj3kim has joined #ruby
lggr has joined #ruby
advorak has quit [Quit: Leaving]
Criztian has quit [Read error: Connection reset by peer]
JonnieCache has quit [Ping timeout: 240 seconds]
hadees has joined #ruby
arkiver has joined #ruby
thone has quit [Ping timeout: 245 seconds]
advorak has joined #ruby
monkegjinni has quit [Read error: No route to host]
workmad3 has quit [Ping timeout: 256 seconds]
monkegjinni has joined #ruby
ryanf has joined #ruby
timonv has joined #ruby
_mak has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
arkiver has quit [Client Quit]
monkegjinni has joined #ruby
Criztian has joined #ruby
chussenot has quit [Quit: chussenot]
lggr has joined #ruby
zigomir has joined #ruby
heftig has quit [Quit: leaving]
margle has joined #ruby
awestroke has joined #ruby
Jrz has joined #ruby
greenarrow has joined #ruby
dr_bob has joined #ruby
Sp4rKy_ is now known as Sp4rKy
rabidpraxis has joined #ruby
Sp4rKy has quit [Changing host]
Sp4rKy has joined #ruby
arturaz has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
Criztian_ has joined #ruby
advorak has quit [Quit: This computer has gone to sleep]
robustus has joined #ruby
Criztian has quit [Ping timeout: 260 seconds]
eldariof has quit []
Averna has joined #ruby
lggr has joined #ruby
rabidpraxis has quit [Ping timeout: 248 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
dhruvasagar has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 252 seconds]
chichou has joined #ruby
TomRone has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
Virunga has joined #ruby
Elhu has joined #ruby
lggr has joined #ruby
TomRone has joined #ruby
xbayrockx has joined #ruby
TomJ has quit [Quit: TomJ]
jck_true_ is now known as Jck_true
sspiff has joined #ruby
rakl has joined #ruby
piotr_ has joined #ruby
jlwestsr has quit [Ping timeout: 246 seconds]
nightfalcon has quit [Quit: Lost terminal]
Xeago has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 245 seconds]
Synthead has quit [Read error: Connection reset by peer]
arkiver has joined #ruby
justsee has quit [Quit: Leaving...]
Xeago has joined #ruby
lggr has joined #ruby
chussenot has joined #ruby
sepp2k has joined #ruby
chimay has joined #ruby
GoGoGarrett has quit [Read error: Connection reset by peer]
GoGoGarrett has joined #ruby
tjbiddle has joined #ruby
reset has quit [Quit: Leaving...]
KevinSjoberg has joined #ruby
chussenot has quit [Client Quit]
tjbiddle_ has joined #ruby
w2f2 has joined #ruby
xorgnak has quit [Excess Flood]
_7894 has quit [Read error: Connection reset by peer]
_7894 has joined #ruby
tjbiddle has quit [Ping timeout: 240 seconds]
tjbiddle_ is now known as tjbiddle
xbayrockx has quit [Ping timeout: 276 seconds]
lggr has quit [Ping timeout: 260 seconds]
chussenot has joined #ruby
sspiff has quit [Remote host closed the connection]
<rostisla_>
hi
<rostisla_>
tell me please - i can write this code *puts "MC975" 2475 * 1.05*
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegji_ has joined #ruby
lggr has joined #ruby
<rostisla_>
i need to ruby text output and thought the number
<rostisla_>
?
<havenn>
rostisla_: Not sure what you're trying to do. If you want to print MC... and the result on separate lines: puts "MC975", 2475 * 1.05
davidcelis has quit [Ping timeout: 256 seconds]
nitti has joined #ruby
abionic has joined #ruby
<rostisla_>
havenn ok i try now
mahmoudimus has quit [Quit: Computer has gone to sleep.]
ABK_ has joined #ruby
<rostisla_>
havenn i need output to a single line
tjbiddle has quit [Quit: tjbiddle]
<havenn>
rostisla_: puts "MC975 #{2475 * 1.05}"
<Xeago>
rostisla_: follow a tutorial please
<rostisla_>
havenn thanks
<Xeago>
How do I get rid of the ugly $1 $2
<Xeago>
if key.to_s.match(/(.*)_(#{matchers_in_regexp_form})$/)
<Xeago>
grouped_params[$2.to_sym][$1.to_sym] = value
<Xeago>
end
abionic has quit [Read error: Operation timed out]
<rostisla_>
Xeago ok )
ABK has quit [Ping timeout: 260 seconds]
nitti has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
_bart has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
jimeh has joined #ruby
lukaszk has joined #ruby
lggr has joined #ruby
xorgnak has joined #ruby
red_ has quit [Ping timeout: 260 seconds]
havenn has quit [Remote host closed the connection]
beiter has joined #ruby
cj3kim has joined #ruby
heftig has joined #ruby
xorgnak has quit [Remote host closed the connection]
Jork1 has joined #ruby
werdnativ has quit [Quit: werdnativ]
slainer68 has joined #ruby
xorgnak has joined #ruby
parzorep has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
cj3kim has quit [Client Quit]
timonv has quit [Remote host closed the connection]
apok has joined #ruby
bjhaid has joined #ruby
AlbireoX has quit [Remote host closed the connection]
<bjhaid>
hi all I am using oci8 for direct connection to oracle, however my delete statements dont get commited, please can anyone help me out here, thanks
Xeago has quit [Remote host closed the connection]
AlbireoX has joined #ruby
lolmaus has joined #ruby
lggr has joined #ruby
luckyruby has quit [Remote host closed the connection]
colinbm has joined #ruby
xorgnak has quit [Ping timeout: 248 seconds]
AlbireoX has quit [Ping timeout: 240 seconds]
und3f has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
hamed_r has joined #ruby
eldariof has joined #ruby
bjhaid has quit [Ping timeout: 245 seconds]
virtualentity has quit []
shiki has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
haxrbyte has joined #ruby
colinbm has quit [Quit: colinbm]
robotmay has joined #ruby
lggr has joined #ruby
elaptics`away is now known as elaptics
margle has quit [Quit: Computer has gone to sleep.]
nemesit has joined #ruby
arkiver has quit [Quit: Leaving]
zii has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 256 seconds]
nilg has joined #ruby
zii has joined #ruby
frihd has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
monkegji_ has quit [Remote host closed the connection]
margle has joined #ruby
lggr has joined #ruby
Iszak has quit [Quit: User has gone to sleep.]
workmad3 has joined #ruby
Vainoharhainen has joined #ruby
Xeago has joined #ruby
keyvan has joined #ruby
keyvan has joined #ruby
keyvan has quit [Changing host]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
hoelzro|away is now known as hoelzro
Xeago has quit [Remote host closed the connection]
Iszak has joined #ruby
Xeago has joined #ruby
fantazo has quit [Remote host closed the connection]
monkegjinni has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
und3f has joined #ruby
thecreators has joined #ruby
M- has quit [Quit: This computer has gone to sleep]
lggr has joined #ruby
fantazo has joined #ruby
manouche has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
pskosinski has joined #ruby
wallerdev has quit [Quit: wallerdev]
monkegjinni has quit [Read error: No route to host]
monkegjinni has joined #ruby
und3f has quit [Ping timeout: 245 seconds]
frogprince has joined #ruby
skogis has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
fantazo has quit [Remote host closed the connection]
<_bart>
I do 'rvm use ruby-1.9.3-p194' in my ~/.zshrc file, is that bad?
<lukaszk>
rvm use ruby-1.9.3 --default
elico has joined #ruby
<lukaszk>
then you can get rid of that line from your zshrc
lggr has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
ryanf has quit [Quit: leaving]
elico has quit [Client Quit]
shiki has joined #ruby
Criztian_ has quit [Ping timeout: 256 seconds]
tvw has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
cezar has joined #ruby
cezar has quit [Client Quit]
monkegjinni has quit [Read error: Connection reset by peer]
matthewrobbins has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
monkegjinni has joined #ruby
nitti has joined #ruby
<_bart>
lukaszk, thanks
lggr has joined #ruby
baphled has joined #ruby
<lukaszk>
np
hatoishi has joined #ruby
Raboo has quit [Ping timeout: 245 seconds]
mbk_ has joined #ruby
Raboo has joined #ruby
nitti has quit [Ping timeout: 245 seconds]
und3f has joined #ruby
timmow has joined #ruby
shiki has quit [Remote host closed the connection]
Takehiro_ has joined #ruby
haxrbyte_ has joined #ruby
xorgnak has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
tvw has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 252 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
darthdeus has joined #ruby
headius has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
hvq has joined #ruby
headius has quit [Client Quit]
haxrbyte has joined #ruby
hvq has quit [Client Quit]
JonnieCache has joined #ruby
hvq has joined #ruby
lggr has joined #ruby
chussenot has quit [Quit: chussenot]
chussenot has joined #ruby
jcoglan has joined #ruby
vlad_starkov has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
hamed_r has quit [Quit: Leaving]
mxweas has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
RudyValencia has quit [Quit: Hacked By Chinese!]
mxweas has joined #ruby
lggr has joined #ruby
becom33 has joined #ruby
<becom33>
i was wondering is there are good cli frameworks with inbuild libs for http request , color outputs ..etc
xpen has quit [Remote host closed the connection]
thunderstrike has joined #ruby
<workmad3>
becom33: there might be some with colour support, but I'd doubt any bother with http requests
<workmad3>
becom33: because there are plenty of other libraries (and even plain net/http in the standard library) for http requests, so it's not something a CLI framework would need to concern itself with
lggr has quit [Ping timeout: 244 seconds]
<becom33>
workmad3, what about good managements with modules and commands ?
monkegjinni has quit [Read error: Connection reset by peer]
hsbt is now known as hsbt_away
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
kjellski has joined #ruby
lggr has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
dr_bob has joined #ruby
monkegjinni has joined #ruby
nazty has quit [Ping timeout: 255 seconds]
<matthewrobbins>
can anybody suggest why Digest::MD5.hexdigest(File.read("/path/to/myfile.mp4") might give me a different value on Windows (Ruby 1.9.2) - when I use it on a mac it is consistent with openssl md5 and windows raw openssl md5 also gives the same?
xjiujiu_ has quit [Read error: Connection reset by peer]
nodeman has joined #ruby
AMfish has joined #ruby
sqbell_ has quit [Quit: Lost terminal]
thunders_ has joined #ruby
thunderstrike has quit [Ping timeout: 245 seconds]
nazty has joined #ruby
slainer68 has quit [Remote host closed the connection]
<matled>
matthewrobbins: maybe you need to open the file in binary mode on windows
lggr has quit [Ping timeout: 245 seconds]
slainer68 has joined #ruby
<matthewrobbins>
malted - thanks that's great will give that a try
<matthewrobbins>
s/malted/matled/
joeycarmello has joined #ruby
timonv has quit [Remote host closed the connection]
PapaSierra has joined #ruby
slainer6_ has joined #ruby
lggr has joined #ruby
<matled>
matthewrobbins: I'm not sure where to find the documentation on File.read but from playing with the arguments it seems File.read(path, mode: "rb") should work
<matled>
ah, it's defined on IO, not File
joeycarmello has quit [Remote host closed the connection]
timonv has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
slainer68 has quit [Ping timeout: 252 seconds]
monkegji_ has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
rakl has quit [Quit: sleeping]
dr_bob has quit [Quit: Leaving.]
monkegjinni has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
bapa has quit [Read error: Connection reset by peer]
tonini has quit [Remote host closed the connection]
monkegji_ has quit [Read error: Connection reset by peer]
bapa has joined #ruby
dr_bob has joined #ruby
und3f has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
shammancer has quit [Ping timeout: 246 seconds]
<_bart>
I don't like how sublime text doesn't show mini file icons and folders like the project view op text mate does.
Takehiro_ has quit [Remote host closed the connection]
<workmad3>
matthewrobbins: windows - the holdover to days when binary and text files are different :)
monkegjinni has quit [Read error: No route to host]
<matthewrobbins>
matled ok yep just seeing that, thanks again IO.binread works
<matthewrobbins>
and gives the value I want!
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
lggr has joined #ruby
<rking>
_bart: Hrm. Screenshot or I assume you're talking about needless frills.
<workmad3>
matthewrobbins: it's basically because a text file in windows uses crlf as a newline, which will mean binary information that happens to contain that ascii string will be read in differently if you read it as text
bapa has quit [Read error: Connection reset by peer]
bapa has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegji_ has joined #ruby
<matthewrobbins>
workmad3 - thanks that's really useful, makes sense once you know ;-) thanks people
<workmad3>
matthewrobbins: most things make sense once you know the history behind them :)
monkegji_ has quit [Read error: Connection reset by peer]
timonv has quit [Remote host closed the connection]
<workmad3>
matthewrobbins: of course, to understand why 'crlf' is taken as a newline you need to go right the way back to typewriters :D
monkegjinni has joined #ruby
timonv has joined #ruby
<matthewrobbins>
workmad3 - ha…funny just reading that on Wikipedia!
monkegjinni has quit [Read error: Connection reset by peer]
<_bart>
rking: also, it's useful when having .rb and .html files in one folder, it shows different mini-icons for those files.
Averna has quit [Quit: Leaving.]
lggr has quit [Ping timeout: 265 seconds]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: No route to host]
Jrz has quit [Ping timeout: 245 seconds]
monkegjinni has joined #ruby
monkegji_ has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegji_ has quit [Read error: Connection reset by peer]
lggr has joined #ruby
nitti has joined #ruby
<rking>
_bart: Pleh.
monkegjinni has joined #ruby
beiter has quit [Ping timeout: 260 seconds]
<rking>
_bart: Shouldn't you be using the omnifindy thing?
<_bart>
rking: in subl it's just text, text and more text.
<_bart>
rking: no, I have a neat folder structure for a reason, using the omnifindy thing allows you to place files in places they shouldn't be because no-one without omnifind would find it.
maasha has joined #ruby
hotovson has quit [Remote host closed the connection]
Jrz has joined #ruby
F1skr has joined #ruby
<rking>
Hrm. We're from two very different worlds on this one. ☺
<maasha>
buhuhuhuu ;o( - this tree I am building is driving my nuts. There is a bug and it only presents itself when running with lots of data. Code is recursive and I hate debugging recursive code.
<rking>
Thanks for going through the trouble of actually screenshotting. I was mostly talking aimless trash, but I'm glad I know exactly what you are talking about.
* maasha
wonders what the Ruby debugger actually can do.
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
nitti has quit [Ping timeout: 245 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
g0bl1n has joined #ruby
fyolnish_ has quit [Remote host closed the connection]
monkegjinni has joined #ruby
g0bl1n has quit [Changing host]
g0bl1n has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
elico has joined #ruby
<maasha>
bah, I still need to isolate a subset of my data which causes the problem. But as soon as I pick records that give wrong results and run on those - no error >;o(
monkegjinni has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
Trioke has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
<elektronaut>
i find going for a walk is the best way to debug those kinds of problems
monkegjinni has joined #ruby
Villadelfia has quit [Read error: Operation timed out]
<elektronaut>
shouldn't that be list += flatten(child, list) ?
fantazo has joined #ruby
<elektronaut>
nevermind
nemesit has joined #ruby
<elektronaut>
my head doesn't recurse properly without coffee
<workmad3>
maasha: is there any reason you're tracking the level in the node, rather than letting that be derived by a recursive walk of the tree?
<maasha>
workmad3: in fact the level is not the tree depth but rather a description of taxonomic classification (data)
lggr has joined #ruby
<workmad3>
maasha: ah, right
<workmad3>
maasha: so it's a TaxonomyNode :)
<shevy>
damn glib
<maasha>
workmad3: but you assumption is fair that something "level" and tree is the depth
<workmad3>
maasha: any reason you couldn't 'merge' the trees by simply adding a new level of hierarchy?
Jork1 has quit [Quit: Jork1]
<maasha>
workmad3: I have never tried to merge trees before. I searched around a bit and they common way seems to be flattening one tree and adding to another.
<workmad3>
maasha: as that's normally the easiest way to merge trees :)
beiter has joined #ruby
<Xeago>
just make a new root, and add both tree's as a child imo
<Xeago>
as workmad3 says
<workmad3>
maasha: it depends on whether it's a sorted tree though
monkegjinni has quit [Read error: Connection reset by peer]
<workmad3>
maasha: ok, once you've 'merged' the trees, what should you end up with?
marcux has joined #ruby
<workmad3>
maasha: is the data going to be intermingled in some new sorted manner, or will you basically end up with the same two tree structures, but with a new node connecting the two?
Jork1 has joined #ruby
<maasha>
workmad3: so it is an organism tree. the leves are domain/kingdom/phylum/class/order/family/genus/species. Some organisms have all levels - some only down to a partcular level.
Jork1 has quit [Client Quit]
<workmad3>
maasha: right
<Xeago>
s a node can have more than 1 parent node or what?
manizzle_ has joined #ruby
<Xeago>
s/s/so
<maasha>
workmad3: and I want the trees merged to keep count of how many different organisms were classified to what level.
chussenot has quit [Quit: chussenot]
monkegjinni has quit [Read error: No route to host]
<workmad3>
maasha: so, if two trees need merging, are they going to 'match' to a certain point and then diverge completely?
heftig has quit [Ping timeout: 245 seconds]
Jork1 has joined #ruby
<workmad3>
maasha: so they'd have the same domain, kingdom, phylum, but then a different class?
<maasha>
workmad3: of in case of duplicate organisms they should match all they way through
lggr has quit [Ping timeout: 245 seconds]
<maasha>
workmad3: but otherwise you are right.
hsbt_away is now known as hsbt
* Xeago
lost track
<workmad3>
maasha: right, so you need three things - first you need to compare two nodes
<workmad3>
maasha: which will only match the data within the nodes
Trioke has quit [Ping timeout: 245 seconds]
<workmad3>
maasha: then you need a tree equality to check if the trees are the same
chussenot has joined #ruby
monkegjinni has joined #ruby
<workmad3>
maasha: and then you need a recursive merge function that will take two trees - it will recurse down until it is comparing at the same 'level'
heftig has joined #ruby
emergion has joined #ruby
<workmad3>
maasha: and then, for each level it will see if it needs to recurse down to the next level, or if it needs to add the children from one tree to the other
hotovson_ has joined #ruby
<maasha>
workmad3: or my suggestion. flatten all trees and add as new nodes to a master tree.
Takehiro_ has quit [Remote host closed the connection]
<workmad3>
maasha: yes, but then you need to rebuild the entire tree again
lggr has joined #ruby
<workmad3>
maasha: and that isn't always the easiest way (or even always possible)
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
dr_bob has quit [Quit: Leaving.]
<workmad3>
maasha: I'd probably be tempted to put more behaviour into your node
timonv has joined #ruby
<workmad3>
maasha: including making the 'flatten' operation a recursive operation of the tree
<workmad3>
maasha: assuming you want to go down that rout
<workmad3>
*route
<maasha>
workmad3: certainly I have a bug. I am not sure if it is in the my merging.
alek_b has joined #ruby
<workmad3>
maasha: and is the flattening going to be pre-order, in-order or post-order?
timonv has quit [Remote host closed the connection]
alek_b_ has quit [Ping timeout: 240 seconds]
hvq has quit [Ping timeout: 272 seconds]
<workmad3>
maasha: whichever it is, your flatten can be simplified to 'class TaxNode; def flatten; @children.map(&:flatten).inject(&:+) + [self]'
<workmad3>
maasha: and ignore in-order... because of your tree structure, you can only do pre-order or post-order
slainer6_ has quit [Remote host closed the connection]
nodeman has left #ruby [#ruby]
<workmad3>
maasha: I'm too used to dealing with binary trees :)
<maasha>
workmad3: It shows
<maasha>
workmad3: what do you mean by in-/pre-/post-order?
lggr has quit [Ping timeout: 260 seconds]
<workmad3>
maasha: it's ways of flattening trees
knirhs has quit [Read error: Connection reset by peer]
sgupta has joined #ruby
<workmad3>
maasha: with a binary tree, pre-order flattens as 'current, left.flatten, right.flatten', in-order as 'left.flatten, current, right.flatten' and post as... well you get the idea ;)
alek_b_ has joined #ruby
<workmad3>
maasha: with your n-ary tree, there isn't a place to do in-order, so you can do 'current, children.flatten' or 'children.flatten, current'
timonv has joined #ruby
lggr has joined #ruby
<maasha>
workmad3: I ought to re-test my flattening.
<elektronaut>
any tips for debugging SystemStackErrors? I'm not getting a useful backtrace at all
<maasha>
I need to follow all full paths from root to leaf.
alek_b has quit [Ping timeout: 255 seconds]
hatoishi has quit [Quit: leaving]
uris has quit [Read error: Connection reset by peer]
<roadt>
hi, how to convert hex to oct in ruby?
uris has joined #ruby
marcux has quit [Ping timeout: 276 seconds]
robotmay has quit [Ping timeout: 276 seconds]
hotovson_ has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
kringa has quit [Ping timeout: 265 seconds]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<workmad3>
maasha: that's the advantage of relying on the tree structure
kaawee has joined #ruby
<workmad3>
maasha: also, if you're going to add one to the other, you probably want an 'add' method on your node that is capable of adding a new node at the right level
keyvan has quit [Remote host closed the connection]
frederic has joined #ruby
<workmad3>
maasha: because you could indeed to 'tree1.merge(tree2)' as 'tree2.flatten.each {|n| tree1.add(n)}'
irleif has joined #ruby
<workmad3>
maasha: as long as your add method adds a node in the right place (and your flatten works pre-order)
<maasha>
workmad3: I suspect my problem is merging branced trees
<workmad3>
maasha: quite possibly :)
<workmad3>
maasha: the key with trees is always to try and build from simple primitives, IMO
<workmad3>
maasha: it's quite easy to write an add method with a tree
<workmad3>
maasha: and it's quite easy to write a flatten method
<maasha>
workmad3: as soon as you recurse you are on thin ice!
<maasha>
workmad3: it is equally easy to write a wrong flatten method
<workmad3>
maasha: nah, you're not on thin ice as long as you recurse with well known problems
lggr has joined #ruby
<maasha>
if not easier
<workmad3>
maasha: not if you do it simply and rely on your tree data structure
charliesome has joined #ruby
<workmad3>
maasha: def flatten; [self] + @children.map(&:flatten).inject(&:+); end <-- that's an intuitively correct pre-order flatten method for your n-ary tree
<Xeago>
maasha: by relying on primitive operations, you should end up with a divide&conquer solution
xaq has joined #ruby
<workmad3>
maasha: it's not very efficient, I'll admit, but it's correct
frogprince_mac has joined #ruby
Jork1 has quit [Quit: Jork1]
xpen has quit [Remote host closed the connection]
<workmad3>
maasha: and also, it will give you a flattened array that will always contain the parent node before child nodes
<workmad3>
maasha: which is important for your add
timonv has quit [Remote host closed the connection]
<workmad3>
maasha: your add is going to be more complicated in this situation, because you're going to need to incorporate knowledge of the taxonomic hierarchy into it
timonv has joined #ruby
marcux has joined #ruby
fyolnish has joined #ruby
marcux has quit [Client Quit]
<workmad3>
maasha: because you'll basically need to go 'is this my parent level? if not, recurse down, otherwise add to the children here'
<workmad3>
maasha: recursion is actually the much more solid way to think about trees... trying to think of trees iteratively leaves you on thin ice much more quickly than thinking of them recursively IMO ;)
<workmad3>
maasha: which isn't really that surprising, seeing as they are a recursively defined data structure
<maasha>
workmad3: but you are also used to trees :o)
<Xeago>
maasha: could you gist your datastructure?
lggr has quit [Ping timeout: 240 seconds]
zigomir has quit [Remote host closed the connection]
<workmad3>
maasha: trees are awesome in that they are really, really easy to sketch
<Xeago>
share it afterwards ;)
<maasha>
paper is good
<Xeago>
also
hotovson_ has joined #ruby
<workmad3>
maasha: because what I'm doing when discussing this is thinking through a sketch in my head... the only thing being 'used to trees' is giving me is a way to save real trees by not having to actually draw my sketch ;)
<Xeago>
I would construct the count and scoring, in a second parse
<Xeago>
when done merging
<workmad3>
^^ (although it's really a tree walk more than a parse)
<Xeago>
in an additional step
<Xeago>
:)
thunders_ has quit [Remote host closed the connection]
<JonnieCache>
paper is by far the best software engineering tool
<workmad3>
maasha: the other thing I learned about trees when I did them @ uni - don't try to optimise your code ;)
zz_chrismcg is now known as chrismcg
<workmad3>
maasha: get the thing working
monkegjinni has quit [Read error: No route to host]
<workmad3>
maasha: and then, if it doesn't perform well enough, work out what type of tree you have and go google exactly what algorithms work with that type of tree
lggr has joined #ruby
<maasha>
workmad3: simple is good - and pretty optimal (and do let the compiler deal with end-tail recursion optimization)
<JonnieCache>
in general you should never try and optimize code as you write it
<workmad3>
maasha: yeah, and the simple recursively defined primitive operations you start with can be used for all sorts :)
KevinSjoberg has joined #ruby
<Xeago>
How do I get rid of the ugly $1 $2?
<Xeago>
if key.to_s.match(/(.*)_(#{matchers_in_regexp_form})$/)
<Xeago>
grouped_params[$2.to_sym][$1.to_sym] = value
<Xeago>
end
<maasha>
Xeago: why ugly?
<workmad3>
Xeago: by making it more complicated and having to iterate over the match array
<Xeago>
maasha: because the origin of $1 and $2 is unclear
dr_bob has joined #ruby
<workmad3>
Xeago: it isn't unclear though
<workmad3>
Xeago: unless you expect your regex code to be maintained by someone who doesn't know regex
robotmay has joined #ruby
Nisstyre has quit [Ping timeout: 276 seconds]
<workmad3>
Xeago: at which point you're kinda screwed anyway ;)
nitti has joined #ruby
<Xeago>
this code is going to be maintained by a java guy
<maasha>
Xeago: if $1, $2 etc are only used in the lines immediately after a regex then it is very clear to most people.
<workmad3>
Xeago: in this situation, I'd add a comment
monkegjinni has joined #ruby
<workmad3>
Xeago: one of the rare cases I'd add a code comment :)
freakazoid0223 has quit [Ping timeout: 240 seconds]
sgupta has quit [Read error: Connection reset by peer]
wedtm|away is now known as wedtm
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
tvw has joined #ruby
<workmad3>
Xeago: something short and sweet, along the lines of '$1 and $2 are set up automatically and contain the contents of the two () deliminated match groups in the previous regular explession'
<workmad3>
typo optional ;)
<workmad3>
regular explessions...
lggr has quit [Ping timeout: 260 seconds]
nitti has quit [Ping timeout: 245 seconds]
ablew_ has quit [Ping timeout: 245 seconds]
monkegjinni has quit [Remote host closed the connection]
lggr has joined #ruby
xaq_ has joined #ruby
chussenot has quit [Quit: chussenot]
Virunga has quit [Remote host closed the connection]
y5wars has joined #ruby
xaq has quit [Read error: Connection reset by peer]
ablew has joined #ruby
Banistergalaxy has joined #ruby
whaley has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
Nisstyre has joined #ruby
hemanth has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
beiter has quit [Ping timeout: 255 seconds]
morozovm has joined #ruby
verto|off is now known as verto
lggr has joined #ruby
Axsuul has quit [Ping timeout: 260 seconds]
Guedes has quit [Ping timeout: 245 seconds]
slainer68 has joined #ruby
beiter has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
AMfish has quit [Ping timeout: 240 seconds]
lggr has quit [Ping timeout: 252 seconds]
freeayu has joined #ruby
theRoUS has quit [Ping timeout: 244 seconds]
reinaldob has joined #ruby
mengu has joined #ruby
<JonnieCache>
arent there other globals that are aliases of $1 and $2?
apok has quit [Quit: apok]
<awestroke>
JonnieCache: you got ARGV, which is an array
ZubKonst has joined #ruby
lggr has joined #ruby
arietis has joined #ruby
<JonnieCache>
or just assign the MatchData object and use that
<awestroke>
ARGV.each{|a| p a}
<awestroke>
oh regexp sorry
<awestroke>
nvm
<JonnieCache>
yeah isnt $1 the last regex match?
<JonnieCache>
yes indeed it is. thought i was going mad there
pothibo has quit [Quit: pothibo]
ZubKonst_ has quit [Ping timeout: 246 seconds]
nari has quit [Ping timeout: 245 seconds]
ForevernadeAFK has joined #ruby
lggr has quit [Ping timeout: 272 seconds]
Nisstyre has quit [Read error: Operation timed out]
Forevernade has quit [Ping timeout: 256 seconds]
v0n has joined #ruby
timonv has quit [Remote host closed the connection]
rabidpraxis has joined #ruby
snorkdude has joined #ruby
rabidpraxis has quit [Read error: Connection reset by peer]
hemanth has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
colinbm has joined #ruby
larissa has joined #ruby
fermion has quit [Ping timeout: 276 seconds]
timonv has joined #ruby
y5wars has quit [Quit: y5wars]
elico has quit [Quit: elico]
haxrbyte has quit [Ping timeout: 245 seconds]
RJ3000_ has quit [Ping timeout: 265 seconds]
emergion has joined #ruby
colinbm has quit [Quit: colinbm]
lggr has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
mgrayson has joined #ruby
lggr has joined #ruby
MikeyV27 has joined #ruby
xaq has joined #ruby
gogiel has joined #ruby
Nisstyre has joined #ruby
peregrine81 has joined #ruby
xaq_ has quit [Ping timeout: 244 seconds]
lggr has quit [Ping timeout: 248 seconds]
nitti has joined #ruby
snorkdude has quit [Remote host closed the connection]
Virunga has joined #ruby
phantasm66 has joined #ruby
kaawee has quit [Ping timeout: 276 seconds]
[Neurotic] has quit [Remote host closed the connection]
nitti_ has joined #ruby
lggr has joined #ruby
v0n has quit [Ping timeout: 252 seconds]
Virunga is now known as LennyLinux
nitti has quit [Ping timeout: 244 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 245 seconds]
tommyvyo has quit [Quit: Computer has gone to sleep.]
mmitchell has quit [Remote host closed the connection]
<Spooner>
So it is _and_ then.
<Andy1991>
Plus, CubeCart/Megento we support a lot
<Spooner>
Or is it that you are taking on several people and you don't need them all to do everything? Just curious.
<Andy1991>
Preferably, yes
<Andy1991>
But I started here as a PHP developer
<Andy1991>
And I'm learning rails on works time
Takehiro has quit [Ping timeout: 246 seconds]
GoGoGarrett has quit [Remote host closed the connection]
<Spooner>
I'm within a commute of Manchester, not working, and I'm not desperate enough to relearn PHP or learn Rails :) I think this says something about my keenness to get off my arse again *coughs*
reisl has joined #ruby
whaley has quit [Remote host closed the connection]
larissa has quit [Read error: Operation timed out]
<Spooner>
Andy1991 You are probably better off in #rubyonrails, if you haven't tried there.
<shevy>
well you do use ruby
samphippen has joined #ruby
<shevy>
so you aren't totally lazy
<Spooner>
Shevy Not really. I use Ruby because I'm lazy. I write C extensions because I'm stupid ;)
<shevy>
hehe
* Xeago
needs a dynamic table of contents in javascript
<Cool_Fire>
Ruby is like the laziest language ever xD
<_bart>
if ruby was lazy it would know how to easily force encodings
<Spooner>
I'm lazy enough to be happy with the default encoding ;)
kisoku has joined #ruby
<Cool_Fire>
I'm fairly sure you can just specify the encoding at the top of your .rb actually
<Andy1991>
Thanks Spooner
wmoxam has joined #ruby
Andy1991 has left #ruby [#ruby]
<Spooner>
shevy All I need to do is find someone to employ me to write gems that don't work properly and games that no-one plays and I'm set for life :D
lggr has joined #ruby
<_bart>
Spooner: I'm always attacked by: in `downcase': invalid byte sequence in UTF-8 (ArgumentError)
ABK_ has quit [Read error: Connection reset by peer]
chrisramon has joined #ruby
<shevy>
the encoding stuff really sucks
TomJ has joined #ruby
<Xeago>
do you think 2.0 will fix that?
<chrisramon>
hi, i need help with active merchant, I am using the version 1.3.1 and keep gettings this error NameError: uninitialized constant Object::ActiveMerchant
<Spooner>
_bart : I'm not denying that Ruby encoding is painful. Just that I avoid needing it as much as I can.
cdzombak has joined #ruby
<Spooner>
chrisramon : #rubyonrails is a better place to ask.
<heftig>
i never had pain with encodings :p
<shevy>
Xeago nope it will never be fixed, it will always remain a problem
<shevy>
heftig because you use UTF right?
<heftig>
usually
<shevy>
yeah usually those who use UTF dont have problems
<Spooner>
Matz argument is that the encodings are significantly easier for people that need them, even if they are more of a pain for people who largely don't need them.
<shevy>
it's basically a subtle hint from the ruby devs to say "switch to UTF or stop using ruby"
<shevy>
yeah he can be right
<shevy>
still 1.8.7 gave me less issues, encoding problems which I simply never had at all when using 1.8.x :(
<_bart>
Spooner: Like doing /query/i in regexp?
bapa has quit [Remote host closed the connection]
<_bart>
Spooner: the case insensitivity is one way of avoiding downcast I've been thinking of
<shevy>
my hope is that with "# Encoding: ASCII-8BIT" I can avoid all encoding problems
<_bart>
downcase*
<Spooner>
Yeah, but I expect people wanting to use Japanese, etc, in 1.8 cried a lot of tears.
<heftig>
shevy: no, you just hide them
<shevy>
but I dont have any problems!
<Spooner>
_bart : Not really. I don't have a huge need to manipulate text that isn't mine.
bapa has joined #ruby
omry has joined #ruby
<_bart>
Spooner: but I do, what do you think of that solution?
<shevy>
people should give up on japanese :)
<Spooner>
Probably a good one, yes, _bart.
rabidpraxis has quit [Remote host closed the connection]
<hoffmanc>
1.9 is better?
<shevy>
how do you define "better"
lggr has quit [Ping timeout: 248 seconds]
<hoffmanc>
AFA Japanese
emergion has quit [Quit: Computer has gone to sleep.]
<Spooner>
That was the intention, yes, hoffmanc.
<shevy>
I mean they invested 5 years into it, so I sure hope it is better than 1.8
kaawee has joined #ruby
<shevy>
ruby is now the fastest scripting language!
<hoffmanc>
amount of time spent is often not highly correlated with project success
<hoffmanc>
shevy: that seems like a blanket statement
<Spooner>
But we, I suspect, are mainly in the group who suffered with the addition of encoding in 1.9 (European/US types).
<shevy>
depends on what is being tested, on that test ruby is faster than php python and perl
<hoffmanc>
did they fix the unbearably small recursion depth?
<shevy>
lua asskicks every other scripting language though
Jork1 has quit [Ping timeout: 245 seconds]
freezway has quit [Ping timeout: 245 seconds]
<hoffmanc>
again, I think it depends on what you're doing
<Cool_Fire>
If speeds is so critically important, you shouldn't be using a scripting language in the first place.
<shevy>
well there is one test so far
<Spooner>
hoffmanc : Pretty sure it still just says "stack ran out" when you run out of depth, with absolutely no indication where it ran out. That is more annoying than lack of depth for me.
elico has quit [Client Quit]
<hoffmanc>
Spooner, yeah that is the lamest part of ruby IMHO
<Spooner>
shevy : But vanilla Lua is about as bare bones as it gets. Comparing it to Ruby is not really fair.
morozovm has quit [Read error: Connection reset by peer]
yekta has joined #ruby
morozovm has joined #ruby
GoGoGarrett has joined #ruby
sailias has joined #ruby
ggoo_26 has left #ruby [#ruby]
a_a_g has quit [Read error: Connection reset by peer]
jeffreybaird has joined #ruby
<_bart>
Spooner: BOOOM in `scan': invalid byte sequence in UTF-8 (ArgumentError)
<_bart>
Spooner: using regexp to avoid the issue using /../i is not the way..
<Spooner>
_bart : Meh.
RJ3000_ has joined #ruby
lggr has joined #ruby
jrist-afk is now known as jrist
v0n has joined #ruby
mercwithamouth has joined #ruby
mbk_ has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
Mon_Ouie has joined #ruby
SmoothSage_ has joined #ruby
SmoothSage has quit [Ping timeout: 245 seconds]
jasond has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
Apocalypse has quit [Ping timeout: 246 seconds]
nwertman has quit [Quit: nwertman]
yshh has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
NiteRain has joined #ruby
himsin has joined #ruby
_bart has quit [Ping timeout: 252 seconds]
jcaudle has joined #ruby
haxrbyte has joined #ruby
sterNiX has joined #ruby
sterNiX has joined #ruby
sterNiX has quit [Changing host]
jprovazn has quit [Quit: Leaving]
lggr has joined #ruby
Neomex has quit [Quit: Neomex]
Rydefalk_ has joined #ruby
Guest74267 has joined #ruby
Rydefalk has quit [Read error: Connection reset by peer]
dr_bob has quit [Quit: Leaving.]
gmurphey has joined #ruby
vitoravelino is now known as vitoravelino`afk
xyzodiac has joined #ruby
vitoravelino`afk is now known as vitoravelino
ottbot has joined #ruby
dr_bob has joined #ruby
nari has quit [Read error: Operation timed out]
lggr has quit [Ping timeout: 246 seconds]
kringa has joined #ruby
dr_bob has quit [Client Quit]
otters has joined #ruby
fantazo_ has joined #ruby
vng|afk is now known as vng
vng is now known as Guest32404
lggr has joined #ruby
Apocalypse has joined #ruby
fantazo has quit [Ping timeout: 260 seconds]
asobrasil has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
morozovm has quit [Read error: Connection reset by peer]
vaclavt has joined #ruby
morozovm has joined #ruby
hsbt is now known as hsbt_away
iamjarvo has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 248 seconds]
beit has joined #ruby
fmcgeough has joined #ruby
uris has quit [Quit: leaving]
Guest21929 is now known as duracrisis
mmitchell has joined #ruby
mmitchell has quit [Remote host closed the connection]
mmitchell has joined #ruby
monkegjinni has quit [Read error: No route to host]
lggr has joined #ruby
monkegjinni has joined #ruby
Shrink has quit [Read error: Connection reset by peer]
Shrink has joined #ruby
thmzlt has joined #ruby
jlwestsr has quit [Ping timeout: 246 seconds]
justsee has joined #ruby
bbttxu_ has joined #ruby
a_a_g1 has quit [Quit: Leaving.]
ffranz has joined #ruby
jerius has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
ananthakumaran has quit [Quit: Leaving.]
chrisramon has quit [Quit: chrisramon]
horofox has joined #ruby
nitti has quit [Remote host closed the connection]
cakehero has joined #ruby
lggr has joined #ruby
himsin has quit [Ping timeout: 260 seconds]
seoaqua has joined #ruby
kjellski has quit [Quit: This computer has gone to sleep]
invisime has joined #ruby
invisime has quit [Client Quit]
vaclavt has left #ruby [#ruby]
a1ph4g33k has joined #ruby
cloud|droid has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
<a1ph4g33k>
good morning
theRoUS has joined #ruby
nateberkopec has joined #ruby
jlwestsr has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
reisl has quit [Quit: Leaving]
linoj has quit [Ping timeout: 252 seconds]
invisime has joined #ruby
<Iszak>
Morning.
<rostisla_>
hi
<invisime>
good morning. :-)
lggr has joined #ruby
v0n has quit [Quit: Leaving]
samphippen has joined #ruby
_bart has joined #ruby
v0n has joined #ruby
mercwithamouth has quit [Quit: leaving]
nitti has joined #ruby
philcrissman has joined #ruby
linoj has joined #ruby
philcrissman has quit [Read error: Connection reset by peer]
philcrissman has joined #ruby
mercwithamouth has joined #ruby
carloslopes has joined #ruby
KevinSjoberg has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Jork1 has joined #ruby
stopbit has joined #ruby
ScottNYC has joined #ruby
alek_b_ has quit [Ping timeout: 265 seconds]
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
hsbt_away is now known as hsbt
reuf has quit [Quit: Leaving]
paolooo has joined #ruby
alek_b has joined #ruby
lggr has quit [Ping timeout: 276 seconds]
bbttxu_ has quit [Quit: bbttxu_]
<ScottNYC>
does someone know how to fix this? gem install rails
<ScottNYC>
/usr/share/ruby/psych.rb:203:in `parse': (<unknown>): mapping values are not allowed in this context at line 2 column 9 (Psych::SyntaxError)
vlad_starkov has quit [Remote host closed the connection]
<ScottNYC>
from /usr/share/ruby/psych.rb:151:in `parse'
nitti has quit [Remote host closed the connection]
<ScottNYC>
from /usr/share/ruby/psych.rb:127:in `load'
a1ph4g33k has quit [Quit: leaving]
monkegjinni has quit [Read error: Connection reset by peer]
<ScottNYC>
awestroke any gem commands result in = /usr/share/ruby/psych.rb:203:in `parse': (<unknown>): mapping values are not allowed in this context at line 2 column 9 (Psych::SyntaxError)
<ScottNYC>
from /usr/share/ruby/psych.rb:203:in `parse_stream'
<ScottNYC>
from /usr/share/ruby/psych.rb:151:in `parse'
<awestroke>
ScottNYC: if you installed via rbenv or rvm, did you run rvm requirements or rbenv bootstrap-ubuntu-12.04 respectively?
bapa has quit [Read error: Operation timed out]
josh^ has quit [Remote host closed the connection]
chrishunt has joined #ruby
<ScottNYC>
I didnt use rbenv or rvm,
<ScottNYC>
I just installed ruby
<ScottNYC>
to system
<awestroke>
with apt-get?
<ScottNYC>
yum
_bart has quit [Quit: _bart]
<awestroke>
I have no knowledge of yum
<awestroke>
good luck
justsee has quit [Quit: Leaving...]
lolmaus has quit []
<awestroke>
(I do think you should get rbenv-installer and install ruby via that instead)
chimay has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
Guest74267 has quit [Quit: Konversation terminated!]
dhruvasagar has quit [Ping timeout: 255 seconds]
timonv has quit [Remote host closed the connection]
xyzodiac has joined #ruby
methoddk has quit [Ping timeout: 244 seconds]
xyzodiac has quit [Client Quit]
<shevy>
anyone of you guys have helpful hints when rewriting a program?
bapa has joined #ruby
lggr has joined #ruby
<hoelzro>
don't screw it up?
Freijo has quit [Remote host closed the connection]
dr_bob has joined #ruby
_mak_ has joined #ruby
sent-hil has joined #ruby
_mak_ has left #ruby [#ruby]
methoddk has joined #ruby
dr_bob has quit [Client Quit]
bbttxu_ has joined #ruby
asteve has joined #ruby
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 255 seconds]
voodoofish430 has joined #ruby
dr_bob has joined #ruby
hsbt is now known as hsbt_away
pricees has joined #ruby
nitti has joined #ruby
wpaulson has joined #ruby
<hoffmanc>
anyone know how to tell the mock framework to not give a shit about what args are passed?
lggr has joined #ruby
nitti has quit [Remote host closed the connection]
Apocalypse has quit [Ping timeout: 246 seconds]
<centipedefarmer>
which mock framework? passed to what?
AlbireoX has joined #ruby
<hoffmanc>
centipedefarmer, MiniTest, and I realize that it makes use of === so I'm good
jrist-afk is now known as jrist
<hoffmanc>
just didn't know how to use === myself ;P
dr_bob has quit [Client Quit]
chrishunt has quit [Ping timeout: 276 seconds]
tagrudev has quit [Remote host closed the connection]
_md has joined #ruby
Ankhers has joined #ruby
Apocalypse has joined #ruby
Apocalypse has quit [Changing host]
Apocalypse has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
verto is now known as verto|off
lggr has quit [Ping timeout: 265 seconds]
Takehiro has joined #ruby
keppy has joined #ruby
seoaqua has quit [Ping timeout: 244 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
Neomex has joined #ruby
lggr has joined #ruby
omry has quit [Read error: Connection reset by peer]
samphippen has quit [Quit: Computer has gone to sleep.]
sent-hil has quit [Remote host closed the connection]
sent-hil has joined #ruby
thmzlt has quit [Remote host closed the connection]
heftig has quit [Ping timeout: 245 seconds]
omry has joined #ruby
havenn has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
Rydefalk_ has quit [Read error: Connection reset by peer]
aganov has quit [Remote host closed the connection]
<rking>
Hrm, but not everyone.
ffranz has quit [Ping timeout: 265 seconds]
xpen has quit [Ping timeout: 246 seconds]
ffranz has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
<centipedefarmer>
ok well it's comforting to see it's not just me
<centipedefarmer>
in an odd way
theRoUS has joined #ruby
morozovm has joined #ruby
jfredee has joined #ruby
ffranz has quit [Client Quit]
<centipedefarmer>
because then it might be temporary and they'll fix it soon. don't see anything on their twitter mentioning any current problems thio
<mh`>
bye github
<mh`>
its been fairly slow all night
pradeepto has quit [Changing host]
pradeepto has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
<centipedefarmer>
it's all right rking i can promise i have nothing all that interesting up there anyway
lggr has joined #ruby
<rking>
I was web searching it before I read any scrollback. I saw "centipedefarmer, MiniTest" in such close proximity I had to see what in the world it was (MiniTest is my new favorite test framework)
<centipedefarmer>
oh i dont know much about minitest
SegFaultAX|work has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<rking>
My deal is that RSpec is cool or whatever, but it does a really bad job of making a run-time tree, so it's painful to use within the REPL.
xyzodiac has quit [Quit: Computer has gone to sleep.]
hsbt_away has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
mando has joined #ruby
punkrawkR has joined #ruby
<rking>
(The generated class/methods are really generic, and also if you re-load the test file, it doesn't cause the new code to run the next time.)
sspiff has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
thedeadghost has quit [Ping timeout: 260 seconds]
burgestrand has quit [Quit: Leaving.]
mengu__ has joined #ruby
mengu_ has quit [Ping timeout: 245 seconds]
brianpWins has quit [Quit: brianpWins]
lggr has joined #ruby
chussenot has quit [Quit: chussenot]
Morkel has quit [Quit: Morkel]
irleif has joined #ruby
philcrissman has quit [Remote host closed the connection]
yekta has quit [Read error: Operation timed out]
mohits has joined #ruby
_mak has quit [Remote host closed the connection]
darthdeus has quit [Ping timeout: 240 seconds]
yekta has joined #ruby
skaczor has joined #ruby
timonv has joined #ruby
vitoravelino is now known as vitoravelino`afk
adeponte has joined #ruby
timonv has quit [Remote host closed the connection]
cloud|droid has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 246 seconds]
morozovm_ has joined #ruby
morozovm has quit [Read error: Connection reset by peer]
morozovm_ is now known as morozovm
freezey has joined #ruby
monkegjinni has quit [Ping timeout: 245 seconds]
monkegjinni has joined #ruby
adeponte has quit [Remote host closed the connection]
lggr has joined #ruby
ottbot has quit [Remote host closed the connection]
chussenot has joined #ruby
LennyLinux has quit [Remote host closed the connection]
xaq has joined #ruby
advorak has joined #ruby
clocKwize has quit [Remote host closed the connection]
advorak has quit [Client Quit]
sebastorama has joined #ruby
advorak has joined #ruby
philcrissman has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
dnstbr has quit [Quit: Computer has gone to sleep.]
timonv has joined #ruby
piotr_ has quit [Ping timeout: 260 seconds]
SegFaultAX|work has quit [Ping timeout: 256 seconds]
roychri has joined #ruby
xpen_ has quit [Ping timeout: 260 seconds]
Synthead has joined #ruby
heftig has joined #ruby
SegFaultAX|work has joined #ruby
lggr has joined #ruby
niklasb has joined #ruby
xpen has joined #ruby
<roychri>
I made a standalone script that connect to redis. Works on my dev but in prod, it does not work. Cannot require redis library. When I do 'gem which redis' it says it does not exists. But I know it does, we have rails application which works fine. I found a lib/redis.rb somewhere (using locate). How can I have my standalone ruby script (not part of rails, that is why I ask here and not in #RoR) see those libraries too?
awestroke has quit [Remote host closed the connection]
<roychri>
the error when I try to execute my script : `require': cannot load such file -- redis (LoadError)
<roychri>
The error when I run gem which redis : ERROR: Can't find ruby library file or shared library redis
<sent-hil>
how do i tell if my ruby has been built with gdb debug support?
<sent-hil>
i installed via rvm, so prob. not methinks
<roychri>
but it exists, when I do locate redis.rb it says /{obfuscated/path}/shared/bundle/ruby/1.9.1/gems/redis-3.0.1/lib/redis.rb
mneorr has quit [Remote host closed the connection]
<elaptics>
roychri: are you prefixing your script with 'bundle exec'?
lupine_85 has quit [Excess Flood]
A124 has joined #ruby
Taranis has quit [Quit: leaving]
ttt has joined #ruby
<roychri>
elaptics: nope. But I did not have to in my dev. I will try. Thank you!
<elaptics>
roychri: that will be the problem I imagine
mikepack has joined #ruby
theRoUS has quit [Read error: Operation timed out]
rabidpraxis has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
vitoravelino`afk is now known as vitoravelino
<roychri>
elaptics: Thanks.... I tried "bundle exec /tmp/copy_redis.rb" but I got "bundler: not executable: /tmp/copy_redis.rb" so I turned the file into executable "chmod 755 /tmp/copy_redis.rb" and I also added shebang at the top of the file "#!/bin/env ruby" but now I get "bundler: command not found: /tmp/copy_redis.rb" followed by "Install missing gem executables with `bundle install`"
mneorr has joined #ruby
horofox has quit [Quit: horofox]
morozovm has quit [Quit: morozovm]
ttt has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
kringa has quit [Ping timeout: 272 seconds]
lupine_85 has joined #ruby
Xeago_ has joined #ruby
Xeago_ has quit [Remote host closed the connection]
SegFaultAX|work has quit [Ping timeout: 248 seconds]
yekta has quit [Quit: yekta]
mva3212 has quit [Remote host closed the connection]
nwertman has joined #ruby
<shevy>
I. Hate. Rewrites!!!
<shevy>
hoelzro well, something more along the way "how to make the rewrites smoother" or even better "how to avoid having to rewrite anything at all ever"
<elaptics>
roychri: how is ruby installed on your production box?
<shevy>
I am now at about 75% status, but the rest is so SLOW and TEDIOUS and BORING... it is unbearable...
mva3212 has joined #ruby
<rking>
shevy: Refactoring » Rewriting
Xeago has quit [Ping timeout: 252 seconds]
xpen has quit [Remote host closed the connection]
mva3212 has quit [Remote host closed the connection]
<centipedefarmer>
unless he's talking about Apache mod_rewrite rewrites
<shevy>
but the existing code base sucks :)
ScottNYC has quit [Quit: Leaving]
<centipedefarmer>
ok apparently not
<shevy>
I couldn't bear looking at it anymore either hehehe
<shevy>
code that makes you so angry, watching it forces you to scream, run out and randomly hit people
mva3212 has joined #ruby
<centipedefarmer>
hey anyone have any off-the-cuff ideas why my MySQL server would be just randomly dying?
<roychri>
elaptics: Oh nice!! :( You might be on to something. There is two versions! one which was installed using apt and the other one which seems to have been compiled (its in /usr/local/bin/).
<shevy>
centipedefarmer mysql deserves a good, clean fast death
<centipedefarmer>
yeah that seems to answer some other question entirely
lggr has quit [Ping timeout: 245 seconds]
<centipedefarmer>
my apps on this server just seem to all lose connection to mysql all at once now and again
<centipedefarmer>
it's a bit upsetting
Takehiro has joined #ruby
greenarrow has quit [Read error: Connection reset by peer]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
greenarrow has joined #ruby
<shevy>
sounds like my cheap ISP... it disconnects me a lot from IRC
x82_nicole has joined #ruby
<centipedefarmer>
well my web server and mysql are on the same physical server
<Spaceghostc2c>
That's the first thing you generally separate on the road to webscale.
<shevy>
hehe
thedeadghost has joined #ruby
<shevy>
the road to webscale... sounds kinda inspirational
<centipedefarmer>
sure. thanks for all the recopmmendations for things to do someday.
monkegjinni has quit [Ping timeout: 260 seconds]
<shevy>
well so far you didn't give that much information!
matthewrobbins_ has joined #ruby
matthewrobbins_ has quit [Client Quit]
lggr has joined #ruby
dr_bob has left #ruby [#ruby]
<centipedefarmer>
i have a few rails apps on a dedicated server, using mysql running on the same server. Lately they all seem to lose connection to mysql at once.
monkegjinni has joined #ruby
<centipedefarmer>
also my boss is cheap and doesn't like paying for more servers.
xyzodiac has quit [Quit: Computer has gone to sleep.]
bapa has quit [Ping timeout: 240 seconds]
<centipedefarmer>
we're moving to something more virtualized soon, but that's soon, not today.
<shevy>
and there is no better pattern to see when or why they lose the connection suddenly? no fail pattern at all?
timonv has quit [Remote host closed the connection]
<centipedefarmer>
i have no knowledge of any particular pattern at this time
hsbt_away has quit [Ping timeout: 265 seconds]
Takehiro has quit [Ping timeout: 248 seconds]
matthewrobbins has quit [Ping timeout: 244 seconds]
<centipedefarmer>
so i'm looking for general things like, "mysql might go down if it gets more than x connections" or something
SegFaultAX|work has joined #ruby
chin-tastic has joined #ruby
hoelzro is now known as hoelzro|away
irleif has quit [Quit: Computer has gone to sleep.]
<centipedefarmer>
yeah i've been down this road though. So far I've been pressured to constantly do more with less servers. when we have weird downtime/performance issues I am not capable of getting to the bottom of, we hire a random yahoo off elance who does nothing
<shevy>
hehe
jfredee has quit [Remote host closed the connection]
<centipedefarmer>
the clients whose stuff we have on this are mostly small businesses, pretty low traffic... but there's > 50 of them.
theRoUS has quit [Read error: Operation timed out]
Servidorv has joined #ruby
<centipedefarmer>
and more new ones all the time!
<centipedefarmer>
anyway, enough bellyachin'
hsbt_away has joined #ruby
<workmad3>
centipedefarmer: look for a new job? :D
Nisstyre has quit [Ping timeout: 240 seconds]
<davidcelis>
^
<centipedefarmer>
yeah, that's an ongoing project of mine :D
<lectrick>
darn you, rubyconf, for starting on halloween and ending on my best friend's surprise 40th birthday party :/
lggr has quit [Ping timeout: 260 seconds]
<lectrick>
I think I will go as "Ghost of _Why" on day 1 of the conf
<centipedefarmer>
:D
roadt has quit [Ping timeout: 245 seconds]
Servidorv has quit [Client Quit]
rabidpraxis has quit [Remote host closed the connection]
lggr has joined #ruby
cantonic_ has joined #ruby
SegFaultAX|work has quit [Ping timeout: 265 seconds]
Servidorv has joined #ruby
tjbiddle has joined #ruby
tjbiddle has quit [Remote host closed the connection]
tjbiddle has joined #ruby
<shevy>
hehe
<shevy>
you need a t-shirt with a _whycat mascot
davidcelis has quit [Quit: K-Lined.]
cantonic has quit [Ping timeout: 245 seconds]
cantonic_ is now known as cantonic
STyler has joined #ruby
SegFaultAX|work has joined #ruby
krz has quit [Quit: krz]
margle has quit [Quit: Computer has gone to sleep.]
bricker has joined #ruby
adeponte has joined #ruby
lggr has quit [Ping timeout: 260 seconds]
bluOxigen has quit [Ping timeout: 245 seconds]
Virunga has joined #ruby
zeromodulus has quit [Ping timeout: 245 seconds]
lggr has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
Nisstyre has joined #ruby
xaq has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
jgrevich has joined #ruby
monkegjinni has quit [Ping timeout: 252 seconds]
knirhs has joined #ruby
Dawne has joined #ruby
LBRapid has joined #ruby
monkegjinni has joined #ruby
margle has joined #ruby
jeffreybaird has joined #ruby
rabidpraxis has joined #ruby
Shrink has quit [Ping timeout: 246 seconds]
awestroke has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
sgupta has joined #ruby
knirhs has quit [Read error: Connection reset by peer]
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
<Synthead>
how can I use the mysql gem to fetch a hash? I'd prefer to get the column names in the result
knirhs has joined #ruby
lggr has joined #ruby
sgupta has quit [Read error: Connection reset by peer]
eldarik has joined #ruby
mrsolo has joined #ruby
werdnativ has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
apok has joined #ruby
zeromodulus has joined #ruby
erichmenge has joined #ruby
<havenn>
Synthead: Is your hash in a mysql db? Do you want to fetch mysql tables and return a hash?
slainer68 has quit [Remote host closed the connection]
<Synthead>
havenn: I'm using the mysql gem for portability. can it do the aforementioned?
Shrink has quit [Ping timeout: 248 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
voodoofish430 has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 260 seconds]
sailias has quit [Quit: Leaving.]
joshman_ has joined #ruby
zommi has quit [Quit: Leaving.]
tvw has quit [Remote host closed the connection]
zeromodulus has quit [Ping timeout: 246 seconds]
voodoofish430 has joined #ruby
baphled has quit [Ping timeout: 245 seconds]
chrismcg is now known as zz_chrismcg
margle has quit [Quit: Computer has gone to sleep.]
horofox has joined #ruby
lukaszk is now known as lukaszk_afk
jerius has quit [Quit: Computer has gone to sleep.]
a_a_g has quit [Quit: Leaving.]
lggr has joined #ruby
heftig has quit [Quit: leaving]
stephenjudkins has joined #ruby
chin-tastic has quit [Ping timeout: 246 seconds]
rubious has joined #ruby
joshman_ has quit [Ping timeout: 276 seconds]
ananthakumaran has quit [Quit: Leaving.]
philcrissman has quit [Remote host closed the connection]
shevy has quit [Ping timeout: 248 seconds]
lggr has quit [Ping timeout: 256 seconds]
jo__ has joined #ruby
apok has quit [Remote host closed the connection]
sebastorama has quit [Quit: Computer has gone to sleep.]
jo__ has quit [Client Quit]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
lggr has joined #ruby
nitti_ has joined #ruby
iamjarvo has quit [Ping timeout: 245 seconds]
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
Takehiro has joined #ruby
apok has joined #ruby
hsbt_away is now known as hsbt
monkegjinni has quit [Read error: Operation timed out]
chin-tastic has joined #ruby
reinaldob has quit [Remote host closed the connection]
maasha has quit [Ping timeout: 245 seconds]
monkegjinni has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
apeiros_ has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
tommyvyo_ has joined #ruby
tommyvyo_ has quit [Changing host]
tommyvyo_ has joined #ruby
Takehiro has quit [Ping timeout: 248 seconds]
hsbt has quit [Ping timeout: 246 seconds]
voodoofish4301 has joined #ruby
JonnieCache has quit [Ping timeout: 255 seconds]
voodoofish430 has quit [Read error: Connection reset by peer]
DrShoggoth has joined #ruby
Tearan has joined #ruby
RJ3000_ has quit [Ping timeout: 265 seconds]
lggr has quit [Ping timeout: 276 seconds]
DrShoggoth has quit [Max SendQ exceeded]
DrShoggoth has joined #ruby
Virunga_ has joined #ruby
havenn has quit [Remote host closed the connection]
shevy has joined #ruby
lggr has joined #ruby
lukaszk_afk has quit [Ping timeout: 245 seconds]
carloslopes has joined #ruby
Virunga has quit [Ping timeout: 246 seconds]
voodoofish4301 has quit [Read error: Connection reset by peer]
zenformatics1 has joined #ruby
voodoofish430 has joined #ruby
zenformatics has quit [Ping timeout: 260 seconds]
nateberkopec has joined #ruby
bluOxigen has joined #ruby
friskd has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
und3f1 has joined #ruby
und3f has quit [Read error: Connection reset by peer]
adamkittelson has joined #ruby
thedeadghost has quit [Ping timeout: 244 seconds]
sailias has joined #ruby
_md has quit [Quit: Leaving...]
Tearan has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
samuel02 has quit [Remote host closed the connection]
slainer68 has joined #ruby
wpaulson has joined #ruby
chin-tastic has quit [Ping timeout: 240 seconds]
timmow has quit [Quit: is having a nap]
SmoothSage__ has joined #ruby
SmoothSage_ has quit [Ping timeout: 244 seconds]
hsbt_away has joined #ruby
asv has joined #ruby
bluOxigen has quit [Ping timeout: 260 seconds]
margle has joined #ruby
<fmcgeough>
Having a problem with an Ubuntu system. require 'httparty' is complaining that it can't load openssl. but the usual suspects : openssl and libssl-dev are definitely installed.
lggr has joined #ruby
<apeiros_>
fmcgeough: how did you install ruby? and have openssl & libssl-dev been installed at the time you installed ruby?
rabidpraxis has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
<fmcgeough>
I believe openssl & libssl-dev were after the Ruby install
graft has joined #ruby
hemanth has joined #ruby
stkowski has joined #ruby
sepp2k has quit [Ping timeout: 245 seconds]
sepp2k has joined #ruby
zeromodu_ has joined #ruby
<graft>
okay, so i need to take an array of pairs and turn it into a 1-d array, like => [ [1, 4], [2, 3], [3,9 ] => [ 0, 4, 3, 9 ], what's a good one-liner for this?
<apeiros_>
fmcgeough: if it was after install, then ruby could not be compiled with ssl support
<apeiros_>
fmcgeough: so I'd simply try to install it again. also check rvm's help pages. they contain infos about the common issues
<fmcgeough>
apeiros_: OK. so I'm going to remove and reinstall. thanks so much.
<apeiros_>
graft: I fail to see the logic in your example
Emmanuel_Chanel has joined #ruby
dmiller has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
<graft>
apeiros_: the first number in the pair is the index in the final array
Tearan has quit [Quit: Sleepy Badger....]
<apeiros_>
graft: and the 0 comes out of thin air?
<graft>
apeiros_: sure
<graft>
apeiros_: default value
<apeiros_>
0
<apeiros_>
o0
<apeiros_>
and what with [[1,9],[1,8]]?
<graft>
wouldn't happen
<apeiros_>
graft: also "sure, default value", and "first value is the index" - those things are *NOT* self evident.
jrist is now known as jrist-afk
monkegjinni has quit [Read error: No route to host]
wallerdev has joined #ruby
monkegjinni has joined #ruby
himsin has joined #ruby
SmoothSage_ has joined #ruby
cody-- has quit [Remote host closed the connection]
freerobby1 has joined #ruby
<apeiros_>
h = Hash.new(0).merge(Hash[yourary]); h.values_at(*0..h.keys.max)
xyzodiac has quit [Quit: Computer has gone to sleep.]
<swarley>
its uh
<swarley>
really confusing
<swarley>
and probably isnt what you want
lggr has joined #ruby
<swarley>
class Foo; attr_accessor :foo; end
<harushimo>
okay
<thmzlt>
*recommend
blazes816 has joined #ruby
<Spooner>
swarley : However, there are plenty of times when you really don't want a plain accessor (though if harushimo is struggling with stuff like "@foo_2 = bar" it is probably what is wanted).
zeromodu_ has quit [Ping timeout: 245 seconds]
<swarley>
Spooner; yeah, but attr_accessor is a good place to start investigating before you start a grand metaprogramming adventure
bapa has quit [Ping timeout: 245 seconds]
<harushimo>
oh okay
adeponte has joined #ruby
joshman_ has joined #ruby
MikeyV27 has quit [Quit: MikeyV27]
<harushimo>
lets not use the attr_accessor, its confusing me
<Spooner>
swarley : No, I didn't mean that. I meant that you often want manual get/setters (e.g. if you want type checking or something to happen on set) so the answer isn't always "just use attr_*". Although here it is.
<swarley>
ah
<harushimo>
def foo=(a value)
<swarley>
yeah, i mean its not always what you want
<swarley>
but given the example
<harushimo>
foo= is the setter correct
<swarley>
attr_accessor is just a correct duplicate
<harushimo>
okay
<swarley>
harushimo; the error is that you are trying to call an object method on the class
<harushimo>
there is
<harushimo>
you are right
<harushimo>
before I get into that error, let me understand this concept first
<harushimo>
heh
<harushimo>
e
<swarley>
you need to create a new Foo object before you can call Foo#foo
<swarley>
foo= is the setter
<swarley>
because you are setting the value
<swarley>
however
<harushimo>
yes
<swarley>
because you're doing @foo_2, you are getting and setting two different values
<harushimo>
foo itself is the getter
<swarley>
doing @foo_2 = bar
<harushimo>
I shouldn't use instance variable their
<harushimo>
I mean there
<swarley>
you should
<swarley>
but you should use @foo = bar
<swarley>
not @foo_2
dblandin has joined #ruby
<swarley>
if you're trying to get and set the same value
lggr has quit [Ping timeout: 260 seconds]
<harushimo>
because I established @foo in my foo function
<harushimo>
I'm trying to get and set the same value
<Spooner>
The last thing to recommend newbies is a slice of why :/
lggr has quit [Ping timeout: 245 seconds]
locriani has quit [Ping timeout: 246 seconds]
nitti is now known as _nitti
<RubyPanther>
I would recommend it as the first thing.
<Spooner>
Unless they are happy with one-useful-fact-per-hour learning ;)
<havenn>
Spooner: It was the first Ruby book I read. >.> MOAR FOXES!
<swarley>
I think why is better reserved for more advanced programmers
<RubyPanther>
Spooner: it is entirely up to the reader to stare at the foxes for an hour, or skip ahead to the code.
<swarley>
As a refresher
mva3212 has quit [Remote host closed the connection]
<swarley>
i wouldnt have understood _why as a noob
<Spooner>
RubyPanther : Because a Ruby newbie would actually know that why is 99% fluff and which bits it is safe to skip? Nah.
<RubyPanther>
His code is always wonderful. His old Hpricot is still compiling, even on Ruby 2, and that other one people use now is still maintained and doesn't compile on 2.0
<RubyPanther>
Spooner: they don't need to, they just need to follow from one page to the next and try the examples
<Spooner>
The quality of his code is pretty irrelevant to his teaching materials.
<waxjar>
i learned ruby through why and some google-fu
<swarley>
I thought he died?
<RubyPanther>
They make it out of Dwemthy's Array alive and they're ready to do some metaprogramming
<workmad3>
swarley: only digitally
<swarley>
ah
<havenn>
Spooner: Admittedly, I didn't read all of the foxes' banter - but I found parusing the code enjoyable and informative.
<RubyPanther>
_why was a performance art character, that was discontinued. The human artist is fine.
<havenn>
Anyone listen to the soundtrack while reading the book??
lggr has joined #ruby
<RubyPanther>
havenn: I didn't while reading it, but I listen to it while I exercise
yxhuvud has quit [Ping timeout: 245 seconds]
<swarley>
lol
blinkerror has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
<havenn>
I like Chapter 2's song: "This book is made of rabbits and lemonade."
<RubyPanther>
There is a live _why concert bootleg out there, from a concert at a Ruby convention I think
<swarley>
rofl
ffranz has joined #ruby
<RubyPanther>
That's how he was outed, somebody recognized his art on an album cover from an old band
kringa has joined #ruby
<Spooner>
Never understood the wish for anonymity in someone who turned up to cons. Maybe if you are purely a digital presence, but he was rather a public figure *shrugs*
locriani has joined #ruby
<swarley>
I'd love to be recognized
advorak has quit [Quit: Leaving]
<swarley>
that would be amazing for me
<Spooner>
(that is, name-anonymity, rather than knowing where he lives and other personal info).
wedtm is now known as wedtm|away
margle has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
<havenn>
Spooner: He wasn't anonymous, his name is just _why (his middle name, he didn't have a first or a last). Now _why's just somebody that Ruby used to know... Somebody!
niklasb has quit [Ping timeout: 276 seconds]
<swarley>
he didnt have to cut us out
sn0wb1rd has quit [Quit: sn0wb1rd]
<workmad3>
havenn: no, _why was his title. His name was _the_lucky_stiff :P
<swarley>
act like ruby never happened and that it was nothing
<havenn>
My sister's boyfriend's brother is name Chuck Trucktropolis, so _why isn't that odd really.
<swarley>
but we don't even need him though
<swarley>
now he's just somebody that wrote some code
TomRone has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 246 seconds]
<Spooner>
Not now, perhaps.
lushious has quit [Ping timeout: 252 seconds]
<Spooner>
Though now we are led by Rails, not _why, we definitely lost something ;) (Although I don't rate his book for newbies, it was a beautiful thing).
<swarley>
i dont know, i'd be lost without hpricot
sn0wb1rd has joined #ruby
<havenn>
swarley: nokogiri
t0rc has joined #ruby
<swarley>
I never got nokogiri to install on my last machine so i've never used it
<RubyPanther>
He was generally disgruntled with the Ruby community, and having digging into his personal life wasn't worth the bother for what he was getting back.
<havenn>
swarley: Write hpricot style syntax wrapper around nokogiri?
<swarley>
hm
lushious has joined #ruby
TomRone has joined #ruby
<havenn>
swarley: If I recall, the hpricot discontinuation page actually suggests that tact if you want to continue hpricot's legacy.
Aristata has joined #ruby
centipedefarmer has joined #ruby
asv has quit [Ping timeout: 252 seconds]
<swarley>
its probably been done then?
<RubyPanther>
I'm just still using hpricot, what is there to continue?
<RubyPanther>
Why would a well-written parser need constant updating?
<bperry>
nokogiri is definitely the way to go
<havenn>
swarley: Not that I know of. If it has, let hpricot maintainers know so they can point to it!
<bperry>
hpricot load sthe entire xml file into memory
<bperry>
nokogiri is a stream based parser
<bperry>
so it is a lot faster
<RubyPanther>
hpricot still works fine in Ruby 2, nokogiri won't compile
<bperry>
way better performance
<wmoxam>
Is it just me or does ruby not have bitwise assignment operators?
<RubyPanther>
which one is "maintained"
<swarley>
wmoxam; it does
<Spooner>
bperry : It doesn't matter. hpricot is like the Bible or Koran. You can't let go of it ;)
<havenn>
nokogiri means saw in Japanese, the word sounds like th emeaning
<wmoxam>
swarley: oh?
<swarley>
yes
<RubyPanther>
it just tastes so sweet
chin-tastic has quit [Ping timeout: 272 seconds]
thejoecarroll has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
<havenn>
RubyPanther: nokogiri compiles fine for me in 2.0.0
mucker has quit [Quit: leaving]
<RubyPanther>
havenn: that's good to know, I'll pull and try again
SmoothSage_ has joined #ruby
<Spooner>
swarley : I don't think it does, although it does support some bitwise stuff (|, &, ~, etc). You can't do: x = 5; x[0] = 0; x == 4
SmoothSage__ has quit [Ping timeout: 245 seconds]
Goles has joined #ruby
<havenn>
Anyone done a native Ruby SHA-3 yet? I say Phusion guys' C-extension but I'm curious what a pure Ruby implementation would look like.
<havenn>
^say^saw
<Spooner>
wmoxam : What was it you wanted to do with bits?
skogis has quit [Ping timeout: 260 seconds]
<wmoxam>
foo &= ~bar
<wmoxam>
rather than foo = foo & bar
<thejoecarroll>
hi folks. i'm relatively inexperienced with ruby, rails etc. can anyone please advise on the use of the bundle command and specifically how to manipulate and fix a broken dependency?
<wmoxam>
:p
zeromodulus has quit [Ping timeout: 255 seconds]
<wmoxam>
er, foo = foo & ~bar
<havenn>
thejoecarroll: To bundle your bundle type 'bundle'. The gems you are bundling with bundle are in your 'Gemfile'.
<Spooner>
wmoxam : foo &= ~bar works fine.
Goles has quit [Read error: Connection reset by peer]
<thejoecarroll>
e.g. how can i change what version of therubyracer get's installed when i run bundle install --without production
<havenn>
thejoecarroll: Edit your Gemfile.
<thejoecarroll>
thanks havenn.
<wmoxam>
Spooner: hrmm, must be a version >= 1.9 thing :p
<thejoecarroll>
i'm working on an example rails app for a course i'm taking
<havenn>
The proceeds of proceeds are no longer proceeds under the revised rule of proceeds.
<thejoecarroll>
i already had a look at the gemfile
<workmad3>
thejoecarroll: if you need a specific version, edit the Gemfile and add the version for it
lggr has quit [Ping timeout: 260 seconds]
<workmad3>
thejoecarroll: then re-run 'bundle'
timonv has joined #ruby
<Aristata>
Hello, having some issues with devise. I am calling sign_in(:patron, @patron) in my controller, but am getting redirected to the login screen after? Any ideas? I have it setup so that an ajax call creates the account, if the account is valid we are signing in the user and sending some json back saying things are ok. The javascript then reloads the page and the user is signed in!
<Aristata>
However, something must be signing out the user or I should never get to a sign in page
<workmad3>
thejoecarroll: if you just need to update it and no version is specified, then 'bundle update therubyracer'
krawchyk has quit [Remote host closed the connection]
<Spooner>
wmoxam : Nope, works fine in 1.8.7 too (I checked in 1.9.3 originally).
<wmoxam>
hrmm
<havenn>
thejoecarroll: Bundler bundles your bundle with the command 'bundle'.
<wmoxam>
oh, nm
<thejoecarroll>
there's no version given in the gemfile, but for some reason bundle keeps trying to install an older broken version of therubyracer than the gem i've already successfully installed!
<wmoxam>
I'm dumb
<workmad3>
thejoecarroll: that's because the version will be locked inside the Gemfile.lock file
<havenn>
thejoecarroll: It is probably a dependency for another gem in your Gemfile.
<Spooner>
Aristata : #rubyonrails is probably better place to ask.
<workmad3>
thejoecarroll: to unlock it, do what I just said with 'bundle update therubyracer'
<Aristata>
i have it in there too, thanks
<swarley>
can i have a link to the ruby 2.0 svn branch?
reset has joined #ruby
<thejoecarroll>
ok, thanks workmad3 and havenn. i'll give those suggestions a try now
sneakyness_wk has quit [Read error: Connection reset by peer]
sneakyness__wk is now known as sneakyness_wk
beefsupreme has joined #ruby
sneakyness_wk has quit [Read error: Connection reset by peer]
sneakyness__wk has joined #ruby
sneakyness__wk is now known as sneakyness_wk
hsbt_away is now known as hsbt
<swarley>
also
<swarley>
is it usable?
<havenn>
swarley: Yes. There are the odd compiled gems that wont compile, but definately usable.
reuf has joined #ruby
<thejoecarroll>
i manually edited the Gemfile to require a specific (current) version of therubyrace and that fixed that… but then it turned out that an outdated version of uglifier was referenced there. then i tried running just 'bundle update' and that did the trick! easy when you know how :-) cheers folks!
<swarley>
awesome
lggr has quit [Ping timeout: 246 seconds]
<havenn>
thejoecarroll: 'bundle' is an alias to 'bundle update' but different than 'bundle upgrade'
<havenn>
btw
<thejoecarroll>
ok, good to know
adamkittelson has quit [Remote host closed the connection]
whowantstolivefo has joined #ruby
jfuentes has joined #ruby
<thejoecarroll>
hmm, now 'rake db:migrate' fails, complaining 'cannot load such file -- sqlite3/sqlite3_native'
<thejoecarroll>
i guess i can take this one to the rails room, though
JonnieCache has joined #ruby
mercwithamouth has joined #ruby
chin-tastic has joined #ruby
<havenn>
thejoecarroll: Do you have "gem 'sqlite3-ruby'" in your Gemfile?
pricees has quit [Ping timeout: 246 seconds]
<digerati_>
Codecademy.com has Ruby lessons now :)
<havenn>
digerati_: Good ones??
lggr has joined #ruby
<digerati_>
havenn: i believe all the stuff is intro lessons
<digerati_>
they started with java
Chryson has joined #ruby
<digerati_>
but now have expanded to other languages
<digerati_>
its pretty neat :)
xyzodiac has joined #ruby
<swarley>
i just bought the linux format code academy issue
<swarley>
only had python and php in it
scx has joined #ruby
<scx>
hello
linoj has quit [Ping timeout: 248 seconds]
hoelzro|away is now known as hoelzro
<workmad3>
havenn: actually 'bundle' is an alias to 'bundle install'
<scx>
I have 'libsomething.rb'. I want to run `st = new Something; st.do_st()` when i call ruby ruby libsomething.rb but dont create instance when i only 'require_relative libsomething'; how to do that?
otters has quit [Ping timeout: 246 seconds]
<Spooner>
scx I'm not following you, sorry.
<havenn>
workmad3: Sorry bout the disinformation. **Meant 'bundle' == 'bundle install' != 'bundle update' as you point out!!
<workmad3>
thejoecarroll: it's not a good idea to run a blanket 'bundle update' btw... it's better to update specific gems, e.g. 'bundle update therubyracer uglifier ...'
<Spooner>
Oh, no, I remember this problem. Yeah, don't rely on "libraries" that also create the class as an example ;)
lggr has quit [Ping timeout: 248 seconds]
<swarley>
def bomb(); fork do; bomb(); end; end
mensvaga has quit [Quit: Leaving.]
daniel_- has joined #ruby
<thejoecarroll>
bit late now, workmad3, but thanks for the tip :-)
<havenn>
workmad3: Going between gem, brew, yum, apt-get, npm, pip, etc I forget the install versus bundle versus upgrade. >.>
daniel_- has quit [Changing host]
daniel_- has joined #ruby
<workmad3>
thejoecarroll: you can always revert your Gemfile.lock back to pre-update and then do it properly ;)
<workmad3>
havenn: ah yeah, np :) I always get 'brew update' and 'brew upgrade' messed up
RJ3000_ has joined #ruby
_nitti has quit [Remote host closed the connection]
LBRapid has quit [Quit: Farewell.]
<Spooner>
scx Have you asked this question before (or am I confusing you with someone else?).
<Spooner>
scx Right, put the instance creation lines inside "if $0 == __FILE__"
mgrayson has quit [Quit: mgrayson]
_nitti has joined #ruby
<scx>
Spooner: ok, thanks
<Spooner>
scx Sorry, someone else was asking recently how to avoid creating a new thing when loading someone else's file, not how to prevent the immediate code being run if you own the file.
hsbt is now known as hsbt_away
dv_ has quit [Ping timeout: 252 seconds]
lggr has joined #ruby
<Spooner>
Scx Also, that isn't Ruby. You should use: st = Something.new
nwertman has joined #ruby
otters has joined #ruby
<Spooner>
scx And it is "def initialize", not "def init"
<swarley>
Linux OctaviasViolin 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
<bperry>
I totally have a beard and run linux
<waxjar>
Spooner: i should have said linux variant :P
<Spooner>
possibilities : Nope.
<possibilities>
Spooner: thank you! (:
<RubyPanther>
The reason that, for example, mod_perl instances might have 50M shared and only 2-5M per instance
dblandin has joined #ruby
lggr has joined #ruby
<swarley>
also
<RubyPanther>
whereas in the Ruby work with current tools we would have like... 1M shared and 80M per instance
<Spooner>
possibilities : It is just gone if someone else overwrites it. Really, they shouldn't though (either masking it with a module or using an alias-chain - or, ideally, not hacking your code).
Markvilla has joined #ruby
<swarley>
is this branch stable to make install?
otters has quit [Ping timeout: 245 seconds]
gmurphey has quit [Ping timeout: 244 seconds]
mxweas has quit [Quit: Computer has gone to sleep.]
* thejoecarroll
calling it a night (yawn)...
<possibilities>
Spooner: yeah, i probably didn't ask the question well enough, i think if i got into the details it would be too annoying (:
syamajala has joined #ruby
<Spooner>
possibilities : Yeah, probalby best to create a minimal example rather than explain the whole thing.
workmad3 has quit [Ping timeout: 260 seconds]
timonv has quit [Remote host closed the connection]
negev has joined #ruby
kirun has joined #ruby
<negev>
hi, what modified is used with String#scan to match text on multiple lines? with perl regex's in php this is /s but that doesn't seem to work in ruby
<negev>
s/modified/modifier
<swarley>
swap
<swarley>
String#sub
<Spooner>
negev : /m is multiline
<negev>
thanks
<swarley>
s///
<Spooner>
(if you mean "what makes . match newlines")
<possibilities>
Spooner: thanks, we figured it out, i appreciate you trying to help the helpless
possibilities has quit [Remote host closed the connection]
Jamone has joined #ruby
<Spooner>
possibilities : I'm just bored. You suck for not finding me a more meaty problem ;D
irleif has joined #ruby
lggr has quit [Ping timeout: 265 seconds]
<RubyPanther>
https://gist.github.com/2600122 This is a 1.9.3 version with the new GC backported, and some other performance features
<swarley>
Spooner; i'll issue you a challenge
<RubyPanther>
That is the one I recommend for production
parzorep has quit [Quit: parzorep]
locriani has quit [Ping timeout: 260 seconds]
lggr has joined #ruby
elux has joined #ruby
dblandin has quit [Quit: dblandin]
whowantstolivefo has quit [Quit: quit]
Monie has quit [Ping timeout: 244 seconds]
cmouse has joined #ruby
<cmouse>
i have a problem with ruby's sqlite3 driver
<cmouse>
it seems that it is not writing stuff into database under some conditions
<bperry>
cmouse: that is probably a sqlite issue tbh :)
<swarley>
i is a mutable variable
<cmouse>
bperry: dunno.
<cmouse>
bperry: the same code works when it's not run under webrick
SJr has quit [Excess Flood]
<bperry>
yeah, locks are fun like that cmouse
<swarley>
and you can do "args*" to get splats
<cmouse>
bperry: :\
<swarley>
use Mutex
<cmouse>
bperry: would be really nice if it even gave exception or something
erichmenge has joined #ruby
kringa has quit [Ping timeout: 268 seconds]
<cmouse>
bperry: but no, it just happily claims that data is safe & sound but when I look it up afterwards, it's not there
emmanuelux has quit [Remote host closed the connection]
<Spooner>
swarley : What is wrong with what you have?
emmanuelux has joined #ruby
<Spooner>
swarley : Apart from the fact it should be an ArgumentError?
<swarley>
Spooner; i dont know, i just figured if you're bored i wouldnt say no to a better implementation
<swarley>
ah, right
<apeiros_>
cmouse: transactions which roll back maybe?
kringa has joined #ruby
<apeiros_>
hard to telll without any useful information.
nazty has quit [Read error: Connection reset by peer]
nignaztic has quit [Quit: WeeChat 0.3.2]
margle has quit [Quit: Computer has gone to sleep.]
<Spooner>
Hmm, no a TypeError (ArgumentError is for anything argumenty _except_ type ;D)
negev has quit [Quit: Lost terminal]
SJr has joined #ruby
<swarley>
there fixed that
Morkel has quit [Quit: Morkel]
gks has joined #ruby
jcaudle has quit [Quit: jcaudle]
asteve has quit []
lggr has quit [Ping timeout: 260 seconds]
mrsolo has joined #ruby
chin-tastic has joined #ruby
<gks>
hey guys, having a small issue with Bundler that I was hoping someone may have a suggestion for. The Gemfile has "gem "jekyll", :git => "git://github.com/mojombo/jekyll.git"" in it, when i try "bundler exec jekyll it says "git://github.com/mojombo/jekyll.git (at master) is not checked out. Please run `bundle install`" after running bundle install, it continues to say both
_nitti has quit [Remote host closed the connection]
<cmouse>
:\
<cmouse>
mutex did not help out
<swarley>
hm i'll need to rework this a little bit
<apeiros_>
args.any? is a broken replacement for !args.empty?
jasond has quit [Ping timeout: 246 seconds]
<swarley>
It wasnt meant to be seen :p
<apeiros_>
[false] <-- broken
<Spooner>
apeiros_ : What is wrong with that?
sent-hil has quit [Remote host closed the connection]
<apeiros_>
[false].any? # false
<apeiros_>
![false].empty? # => true
<Spooner>
Oh, crap. Oops.
<apeiros_>
not. the. same.
<Spooner>
until args.empty? then :/
<swarley>
also, define_method was define_singleton_method
sent-hil has joined #ruby
<swarley>
i fucked it up though
<gks>
no advice on the Bundler/Jekyll issue i posted above?
freezey has quit [Quit: freezey]
<swarley>
because i forgot to put in the binding
bbttxu_ has quit [Quit: bbttxu_]
locriani has joined #ruby
<Spooner>
The problem is that you end up instance_evalling it, which isn't going to act as you expect. The problem is that you are replacing raise ArgumentError, "Expected Integer" unless i.is_a? Integer with a lot of fundamental cheesing around ;)
zeromodulus has quit [Ping timeout: 260 seconds]
ltsstar has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
iamjarvo has quit [Ping timeout: 245 seconds]
fmcgeough has quit [Quit: fmcgeough]
<swarley>
Spooner; like i said, it was essentially a joke :o
<swarley>
:p*
<Spooner>
Yeah, sorry.
tvw has joined #ruby
<swarley>
neat in concept though!
etehtsea has joined #ruby
advorak has joined #ruby
advorak has quit [Client Quit]
lggr has joined #ruby
advorak has joined #ruby
sailias has joined #ruby
[Neurotic] has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby
tvw has quit [Read error: Connection reset by peer]
zeromodu_ has joined #ruby
RORgasm has joined #ruby
twoism has joined #ruby
matthewrobbins has joined #ruby
<hotovson>
f sdf slkdfj sdfkjsldkf sdf sdfsdf
<hotovson>
sry
jgarvey has quit [Quit: Leaving]
hoelzro is now known as hoelzro|away
hsbt_away is now known as hsbt
sepp2k has quit [Remote host closed the connection]
twoism has quit [Remote host closed the connection]
ixti has joined #ruby
twoism has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
swarley has quit [Ping timeout: 260 seconds]
Jork1 has joined #ruby
apeiros_ has quit [Remote host closed the connection]
lggr has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
advorak has quit [Quit: This computer has gone to sleep]
paolooo has quit [Quit: Page closed]
cantonic has quit [Read error: Connection reset by peer]
ebobby has joined #ruby
cantonic has joined #ruby
haxrbyte has quit [Remote host closed the connection]
kaawee has joined #ruby
invisime has quit [Quit: Leaving.]
lggr has quit [Ping timeout: 240 seconds]
otters has joined #ruby
kyletcarey has joined #ruby
mando has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
lggr has joined #ruby
mneorr has quit [Remote host closed the connection]
vitoravelino is now known as vitoravelino`afk
mneorr has joined #ruby
pettsson has joined #ruby
cardoni has joined #ruby
freezey has joined #ruby
kringa has quit [Ping timeout: 268 seconds]
TheFuzzball has quit [Read error: Operation timed out]
hsbt is now known as hsbt_away
maxmmurphy has joined #ruby
kringa has joined #ruby
und3f1 has quit [Quit: Leaving.]
snorkdude has joined #ruby
<cmouse>
this is so bizarre, the sqlite3 database acts for all i can tell as if the data was inserted
peregrine81 has quit [Quit: Computer sleeping.]
<cmouse>
but when the webrick process ends, the data is not written to disk
mando has joined #ruby
lggr has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
irleif has quit [Quit: Computer has gone to sleep.]
twoism has quit [Ping timeout: 245 seconds]
<Spooner>
cmouse Did you commit it rather than just insert it? I suspect the checks for insertion are using cached data, not data given to the DB.
<cmouse>
db.transaction do |tx|
freezey_ has joined #ruby
irleif has joined #ruby
<cmouse>
tx.execute("INSERT...")
<cmouse>
end
<cmouse>
that SHOULD commit, right?
Markvilla has quit [Read error: Connection reset by peer]
<Spooner>
I would think so, yes (I don't use sqlite natively and when I did, it was via an ORM).
<cmouse>
Spooner: how do you use it, then?
lggr has joined #ruby
bbttxu_ has joined #ruby
jfuentes has quit [Quit: jfuentes]
<Spooner>
cmouse It was via ActiveRecord, though it was 2 years ago and I barely remember it.
<cmouse>
k
jamjam has joined #ruby
<Spooner>
cmouse It should push the data out though, at the end of a transaction.
<cmouse>
yeah
<bricker>
Will `ruby -v` tell me if I'm running REE?
mando has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 245 seconds]
Orcris has joined #ruby
kirun has quit [Quit: Client exiting]
glyytchy has joined #ruby
mmitchell has quit [Ping timeout: 255 seconds]
freezey has joined #ruby
lggr has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
_nitti has joined #ruby
alanp has joined #ruby
Eplemosen has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
saschagehlich has quit [Quit: saschagehlich]
axl_ has joined #ruby
digerati_ has quit [Ping timeout: 245 seconds]
lucianosousa has quit [Quit: lucianosousa]
timonv has quit [Remote host closed the connection]
digerati_ has joined #ruby
Tearan has joined #ruby
_nitti has quit [Ping timeout: 245 seconds]
nemesit has quit [Quit: Leaving...]
lggr has quit [Ping timeout: 265 seconds]
kringa has quit []
awestroke has quit [Remote host closed the connection]
dblandin has joined #ruby
lggr has joined #ruby
uris has joined #ruby
Jellyg00se has quit [Read error: Connection reset by peer]
mando has joined #ruby
jfuentes has quit [Quit: jfuentes]
stuartrexking has quit [Quit: Leaving...]
cardoni has quit [Quit: cardoni]
RORgasm has quit [Remote host closed the connection]
dmiller has quit [Remote host closed the connection]
Jellyg00se has joined #ruby
stuartrexking has joined #ruby
dagnachewa has joined #ruby
freezway has joined #ruby
no_worries has quit [Remote host closed the connection]
sent-hil has quit [Remote host closed the connection]
jfuentes has joined #ruby
ryanf has joined #ruby
jfuentes has quit [Client Quit]
lggr has quit [Ping timeout: 260 seconds]
pskosinski has quit [Quit: A few unofficial Red Eclipse 1.3.1 (r4131) servers: http://altred.tk/toggle.rb (and no more global banning for saying that main dev is not very smart, what is truth anyway)]
SCommette has quit [Quit: SCommette]
jeffreybaird has quit [Quit: jeffreybaird]
sent-hil has joined #ruby
SegFaultAX|work has quit [Ping timeout: 260 seconds]
hsbt_away is now known as hsbt
hsbt is now known as hsbt_away
hsbt_away is now known as hsbt
aliencyborg has quit [Quit: Konversation terminated!]
Markvilla has quit [Quit: Computer has gone to sleep.]
freezey has quit [Quit: freezey]
lggr has joined #ruby
emmanuelux has quit [Remote host closed the connection]
horofox has quit [Ping timeout: 245 seconds]
elux has quit [Quit: Bye!]
horofox has joined #ruby
F1skr has joined #ruby
hsbt has quit [Ping timeout: 244 seconds]
mercwithamouth has quit [Ping timeout: 245 seconds]
hotovson has quit [Remote host closed the connection]
Takehiro has joined #ruby
hsbt has joined #ruby
Dreamer3 has quit [Quit: Computer has gone to sleep.]
horofox has quit [Client Quit]
jenrzzz has quit [Ping timeout: 260 seconds]
stopbit has quit [Quit: Leaving]
lggr has quit [Ping timeout: 246 seconds]
hotovson has joined #ruby
Takehiro has quit [Ping timeout: 272 seconds]
lggr has joined #ruby
SegFaultAX|work has joined #ruby
igabreu has joined #ruby
freezey has joined #ruby
freezey_ has joined #ruby
pskosinski has joined #ruby
hotovson has quit [Ping timeout: 240 seconds]
sent-hil has quit [Remote host closed the connection]
matthewrobbins has quit [Quit: matthewrobbins]
evilsushi has quit [Quit: Lost terminal]
bricker_ has joined #ruby
centipedefarmer has quit [Quit: This computer has gone to sleep]
Dreamer3 has joined #ruby
faen has quit [Ping timeout: 245 seconds]
bricker has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 246 seconds]
justsee has joined #ruby
rabidpraxis has joined #ruby
freezey has quit [Ping timeout: 260 seconds]
freezey_ is now known as freezey
jrist is now known as jrist-afk
PragCypher has quit [Read error: Connection reset by peer]
flip_digits has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
PragCypher has joined #ruby
WhereIsMySpoon_ is now known as WhereIsMySpoon
WhereIsMySpoon has quit [Changing host]
WhereIsMySpoon has joined #ruby
sterNiX has quit [Ping timeout: 260 seconds]
etehtsea has quit []
ebobby has quit [Quit: Lost terminal]
keyvan has joined #ruby
keyvan has quit [Changing host]
keyvan has joined #ruby
lggr has joined #ruby
dblandin has quit [Quit: dblandin]
faen has joined #ruby
Takehiro has joined #ruby
ixti has quit [Quit: So Long, and Thanks for All the Fish!]
Neurotiquette has quit [Remote host closed the connection]
mh` has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 245 seconds]
scx has quit [Ping timeout: 255 seconds]
chin-tastic has quit [Ping timeout: 246 seconds]
thmzlt has quit [Remote host closed the connection]
dblandin has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
mikepack has quit [Remote host closed the connection]
freeayu has joined #ruby
lggr has joined #ruby
GoGoGarrett has joined #ruby
r1ddl3r has joined #ruby
rakm has joined #ruby
h4mz1d has joined #ruby
freezey has quit [Quit: freezey]
dblandin has quit [Quit: dblandin]
samphippen has joined #ruby
jimeh has quit [Quit: bye]
nilg has quit [Remote host closed the connection]
lledet has quit [Quit: lledet]
pskosinski has quit [Quit: A few unofficial Red Eclipse 1.3.1 (r4131) servers: http://altred.tk/toggle.rb]
<Spooner>
Though I prefer: require "bundler"; Bundler.require :default
<harushimo>
when you say def something is called a method
<Spooner>
Yes, you are defining a method with 'def'
<havenn>
harushimo: One def(ines) methods.
<Spooner>
Not a function.
<harushimo>
this is with in the class
<harushimo>
what if you have no class defined, def something
<harushimo>
its called a method
<Spooner>
Yep.
<harushimo>
I've being called them functions for years
<Spooner>
Without a class defined, you are addin methods to the main Object.
<harushimo>
oh man
<Spooner>
They are functions in other languages. In Ruby they are methods.
<harushimo>
thank you. I wasn't crazy
<Spooner>
Not entirely, no :D
<harushimo>
In python, we use classes. we define functions. In Ruby, we use classes or no classes, it is a called a method
<harushimo>
okay
<harushimo>
That is important
dmiller has joined #ruby
<Spooner>
Well, you are never not using a class in Ruby. Without an explicit class, there is still one that you add methods on.
lggr has quit [Ping timeout: 252 seconds]
<harushimo>
right
justsee has quit [Quit: Leaving...]
bier has joined #ruby
<Spooner>
Neurotiquette did I answer you correctly or did I misunderstand the question?
<Neurotiquette>
Spooner: Still getting undefined method `mongoid_to_csv' for #<Array:0x007ff94a9786c8>
<Neurotiquette>
Spooner: Definitely see that the gem should be adding a method to Array object here
advorak has joined #ruby
advorak_ has joined #ruby
<Neurotiquette>
Spooner: I added the require 'mongoid_to_csv' line to boot.rb since I see that's where my colleague added the requisite require 'bundler/setup' line
<harushimo>
I'm checking for if the dessert is less than 200, return true. If the person find the dessert delicious, return True
<Spooner>
It is true/false, not True/False, in Ruby.
<harushimo>
is my check okay inside my healthy function
<Spooner>
Also, you aren't actually setting @name or @calories in #initialize
<harushimo>
@name = name
<harushimo>
?
d2dchat has quit [Remote host closed the connection]
<Spooner>
Yes, you need those.
<harushimo>
okay
<harushimo>
let me change that
<Spooner>
At the moment, both are just nil.
mxweas has joined #ruby
<Neurotiquette>
Spooner: Appreciate your helping me. If I give "require" a direct path to the rb file in the gem's directory under my .rvm folder in my controller it appears to work. lol.
<Neurotiquette>
Spooner: Probably not quite production ready on that one :)
<Spooner>
Neurotiquette Oh, I see. The problem was requiring the file, not the gems. Sorry, I missed entirely :/
h4mz1d has quit [Ping timeout: 265 seconds]
<Neurotiquette>
Spooner: Well… I don't think I should have to require this file like this to make the gem work. Im confused. This is sloppy, we have 10+ gems in this project and I can't find an instance of him having to do this
<Spooner>
No, you should just be able to require the gem by name.
<Spooner>
Not sure of the gem structure, what is in your Gemfile or how it is required.
lggr has quit [Ping timeout: 252 seconds]
<Spooner>
Neurotiquette : Should just be fine with: require 'mongoid_to_csv'
<Spooner>
That statement would fail if it can't find the gem properly.
jenrzzz has joined #ruby
JonnieCache has joined #ruby
<Spooner>
harushimo : Any more joy?
mxweas has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
vitoravelino`afk is now known as vitoravelino
advorak_ has quit [Quit: This computer has gone to sleep]
advorak has quit [Quit: This computer has gone to sleep]
x82_nicole has quit [Quit: Computer has gone to sleep.]
<harushimo>
it is always there
havenn has quit [Remote host closed the connection]
[1]hoffmanc has joined #ruby
<harushimo>
apparently, I'm not setting and getting the variable properly
<Spooner>
harushimo : Hmm?
<harushimo>
I'm working on it
<harushimo>
its a learning experience
<Neurotiquette>
Spooner: OK well knowing that helps, thank you
<Spooner>
Can't understand why it wouldn't be monkey-patching Array when required that way though. Magic indeed is afoot!
dmiller has quit [Remote host closed the connection]
niklasb has joined #ruby
hoffmanc has quit [Ping timeout: 256 seconds]
[1]hoffmanc is now known as hoffmanc
reuf has quit [Quit: Leaving]
manizzle has quit [Ping timeout: 256 seconds]
stephenjudkins has joined #ruby
<harushimo>
any suggestions
<blazes816>
harushimo: any code? gist please
<t0rc>
I am using middleman and bundler, bundler uses gemspec. Middleman does not seem to like to do so. When I run middleman, with the dependency on "middleman" put in the gemspec, middleman cannot build the project, dies. If I add: gem "middleman" to the Gemfile (above gemspec line), it builds just fine.
<harushimo>
sorry
<harushimo>
I have it
<t0rc>
It seems that there is some dependency between middleman and what is in the gemfile, or that at least middleman may be processing the gemfile. Or maybe I am completely wrong?
<harushimo>
it looks like initialize may be messed up
<Spooner>
harushimo : Well, it doesn't say what you say it is saying.
<harushimo>
ok
mando has quit [Remote host closed the connection]
icole has quit [Remote host closed the connection]
lggr has joined #ruby
<Spooner>
I already told you it is true, not True, in Ruby.
<harushimo>
am I messing up on the initialize method?
<Spooner>
#initialize is fine.
Azure has quit [Excess Flood]
<harushimo>
why is it saying dessert should be set and get
<harushimo>
for name and calories
<Spooner>
What you should do is show what code you are using to test (just put a few lines underneath, like p = Dessert.new "Pie", 1000; puts p.delicious?; puts p.healthy?
Azure has joined #ruby
mxweas has joined #ruby
<Spooner>
Do you mean your exercise is saying that?
<harushimo>
yeah
<harushimo>
it isn't working
<Spooner>
Because it sounded like you were saying Ruby was complaining about it.
<harushimo>
it is the exercise
<harushimo>
sorry
<harushimo>
I didn't mean it like that
<harushimo>
look at code and typing on irc
<harushimo>
hehe
<harushimo>
its a two part exercise
<Spooner>
harushimo : It only doesn't work if you are testing it against the criteria. The code is fine (except the True/true bit and some sub-optimal code that we don't have to worry about yet).
stuartrexking has quit [Quit: Leaving...]
pettsson has quit [Read error: Connection reset by peer]
joast has quit [Quit: Leaving.]
digerati_ has quit [Ping timeout: 240 seconds]
<Spooner>
harushimo : Yes, an exercise only you know the details of. Maybe share your specifications with us so we can help you attain them ;)
<harushimo>
I am
<harushimo>
when you told me to adjust True/true, it fixed two problem
<harushimo>
s
digerati_ has joined #ruby
<harushimo>
I'm working on this last part: should be able to set and get a dessert's name and calories
slainer68 has quit [Ping timeout: 265 seconds]
<Spooner>
No, specifications, not the implementation (that is, show us the question).
<harushimo>
what does that mean dessert should able to set and get a dessert's name and calories
<Spooner>
Oh, I see. It is an automated tutorial?
<harushimo>
threw ruby site
<harushimo>
that is how I'm learning ruby
<Spooner>
It means you should have getters and setters made for the two values, so they can be looked at and changed after the object has been created.
<Spooner>
You do this with attr_accessor :name, :calories
lggr has quit [Ping timeout: 244 seconds]
<harushimo>
where attr_accessor?
<harushimo>
I should put that before the initialize method right
<Spooner>
Usually put at the top of the class (that is, just before def initialize)
<harushimo>
you and I were thinking the same thing
joast has joined #ruby
<harushimo>
i was thinking of that
<harushimo>
I remember you doing it in the foo example
CaptainJet has joined #ruby
<harushimo>
let me look at the ruby doc on attr_accessor
<harushimo>
I'm still a little weary on it
<harushimo>
can we use the attr_accessor for a subclass too
<Spooner>
Yes, the methods it creates are accessible in subclasses too.
manizzle has joined #ruby
lggr has joined #ruby
<Spooner>
And that is what it does - magically creates two methods (foo and foo=) so you can change the @ivars
<harushimo>
due to the fact, inheritance right
<Spooner>
Yeah.
<harushimo>
I'm getting use to this OOP concepts
thecreators has quit [Quit: thecreators]
<harushimo>
I am give myself pat on the back
brianpWins has quit [Quit: brianpWins]
<harushimo>
now I get inheritance
<harushimo>
finally
<harushimo>
sorry
<harushimo>
I got a little carried away
daniel_hinojosa has joined #ruby
<Tarential>
what's so difficult about inheritance? commit patricide, get rewarded... inheritance
<Spooner>
Tarential : Unless you aren't in the will.
SegFaultAX|work has quit [Ping timeout: 240 seconds]
<Tarential>
you've been talking to my father, haven't you?
swarley has joined #ruby
<Spooner>
He said the cat deserved they money more than you. I couldn't argue with him.
<Spooner>
*the money
<harushimo>
hehe
kiyoura has joined #ruby
<harushimo>
i'll be honest with you people. I'm not a computer science
<harushimo>
I'm econ guy who turned IT
<harushimo>
just let you know
<Tarential>
ok, I'll fess up... I'm not a science either
<Spooner>
IT isn't science.
<Tarential>
IT is the application of technology derived from science
<harushimo>
oh
<harushimo>
okay
<harushimo>
i'm sorry. i didn't mean cause a debate