TheMoonMaster_ has quit [Ping timeout: 272 seconds]
FlyingLeap has quit [Read error: Connection reset by peer]
jgoss__ has quit [Ping timeout: 272 seconds]
matthewd has joined #ruby-lang
amerine has joined #ruby-lang
agarie has quit [Remote host closed the connection]
chessguy has quit [Remote host closed the connection]
idkazuma has quit [Remote host closed the connection]
techlife has joined #ruby-lang
erichmenge has joined #ruby-lang
weeb1e has joined #ruby-lang
S2kx has joined #ruby-lang
jgoss__ has joined #ruby-lang
eval-in has quit [Ping timeout: 272 seconds]
khaase_ has quit [Ping timeout: 272 seconds]
eval-in_ has joined #ruby-lang
beawesomeinstead has quit [Ping timeout: 240 seconds]
conceal_rs__ has joined #ruby-lang
thejspr_ has quit [Ping timeout: 264 seconds]
mksm has quit [Ping timeout: 264 seconds]
TheMoonMaster has joined #ruby-lang
weeb1e_ has quit [Ping timeout: 272 seconds]
jwollert- has quit [Ping timeout: 272 seconds]
flori has quit [Ping timeout: 264 seconds]
jwollert has joined #ruby-lang
thejspr_ has joined #ruby-lang
flori has joined #ruby-lang
beawesomeinstead has joined #ruby-lang
khaase has joined #ruby-lang
wizonesolutions_ has joined #ruby-lang
chendo_ has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
akahn has quit [Ping timeout: 245 seconds]
vitaluha_ has joined #ruby-lang
vitaluha has quit [Ping timeout: 264 seconds]
<dingus_khan>
is everyone disconnected? yikes
<drbrain>
I'm connected
<dingus_khan>
oh whew, I was about to start worrying I was all alone here, lol
<dingus_khan>
I saw the network connectivity notice, thought I might've been caught in limbo or something
jstemmer has quit [*.net *.split]
kith has quit [*.net *.split]
mksm has joined #ruby-lang
kith has joined #ruby-lang
<lianj>
its just us three now
yibe_ has quit [*.net *.split]
rking has quit [*.net *.split]
hackeron_ has quit [*.net *.split]
nibbo has quit [*.net *.split]
DefV has quit [*.net *.split]
chendo has quit [*.net *.split]
rwk1 has quit [*.net *.split]
dRbiG has quit [*.net *.split]
DEac- has quit [*.net *.split]
wizonesolutions has quit [*.net *.split]
bryno has quit [*.net *.split]
S1kx has quit [*.net *.split]
Mellett68 has quit [*.net *.split]
imajes has quit [*.net *.split]
narya has quit [*.net *.split]
t_ has quit [*.net *.split]
mbr has quit [*.net *.split]
certainty has quit [*.net *.split]
trappist has quit [*.net *.split]
tcopp has joined #ruby-lang
<dingus_khan>
could I ask you (or anyone still connected) to give me a better explanation of the difference between class variables, instance variables, and local variables? everything I read doesn't seem to make it any clearer...
srbaker has joined #ruby-lang
toertore has quit [Quit: Leaving]
<drbrain>
each has a different scope
chendo_ has quit [Ping timeout: 252 seconds]
<drbrain>
local variables are usable in the scope of a method
<drbrain>
(or class body, or module body)
<drbrain>
they don't leak to the outside
<drbrain>
(or in the case of class or module bodies, into methods)
<drbrain>
instance variables are accessible in methods running in the same instance
nibbo has joined #ruby-lang
bzalasky has joined #ruby-lang
<drbrain>
class variables are shared between a class and all of its instances (and subclasses)
srbaker has quit [Client Quit]
<dingus_khan>
so an instance variable is usable across the whole class, but it gets it's values from local variables passed in from an instantiation?
<dingus_khan>
I mean, during an initialization?
bpot__ has quit [Read error: Operation timed out]
nazty has quit [Read error: Connection reset by peer]
nazty has joined #ruby-lang
bpot__ has joined #ruby-lang
wizonesolutions has joined #ruby-lang
wizonesolutions has joined #ruby-lang
wizonesolutions has quit [Changing host]
<drbrain>
yes, but they don't need to be assigned from an argument (a local variable)
meizaps has quit [Ping timeout: 258 seconds]
<drbrain>
nor do they need to be assigned in #initialize
S1kx has joined #ruby-lang
Mellett68 has joined #ruby-lang
eval-in__ has joined #ruby-lang
<dingus_khan>
and why would I use a class variable instead of doing what all these examples show, where it assigns an instance variable is assigned a value from what looks like a local variable of the same name?
Bwild has quit [Ping timeout: 258 seconds]
dumfries has quit [Ping timeout: 258 seconds]
jstemmer has joined #ruby-lang
imajes has joined #ruby-lang
<drbrain>
I almost never use class variables
linc01n has quit [Ping timeout: 258 seconds]
justinmcp has quit [Ping timeout: 258 seconds]
<drbrain>
you can use them to share state between instances
tylersmith has joined #ruby-lang
<dingus_khan>
that's confusing; nowhere I've read have I found anything suggesting that I not initialize the instance variables in that way
yfeldblum has quit [Ping timeout: 258 seconds]
trappist has joined #ruby-lang
DEac- has joined #ruby-lang
<drbrain>
that's the most common way to do it
flori has quit [Ping timeout: 258 seconds]
mbr has joined #ruby-lang
bryno has joined #ruby-lang
Guest2109 is now known as mitchty_
<drbrain>
also, if you assign to all your instance variables in #initialize, including ones you won't use right away, you avoid warnings with `ruby -w`
Bwild has joined #ruby-lang
DefV has joined #ruby-lang
hackeron has joined #ruby-lang
S2kx has quit [Ping timeout: 256 seconds]
ritek has quit [Ping timeout: 258 seconds]
chendo has joined #ruby-lang
certainty has joined #ruby-lang
<drbrain>
I find it rare to not have at least @foo = nil in initialize, if I use @foo elsewhere
<dingus_khan>
what's "ruby -w"?
<drbrain>
it runs ruby with warnings enabled
dumfries has joined #ruby-lang
<dingus_khan>
on in the terminal you mean?
<dingus_khan>
oh*
<drbrain>
yes
<dingus_khan>
wow, TIL, thank you!
babinho has quit [Ping timeout: 258 seconds]
yfeldblum has joined #ruby-lang
setmeaway2 has quit [Ping timeout: 256 seconds]
stevechiagozie has joined #ruby-lang
meizaps has joined #ruby-lang
narya has joined #ruby-lang
amateurhuman has quit [Ping timeout: 258 seconds]
UziMonkey_ has quit [Ping timeout: 245 seconds]
flori has joined #ruby-lang
agarie has joined #ruby-lang
<drbrain>
I tend not to use class variables as it makes me feel like my design is bad
chendo has quit [Changing host]
chendo has joined #ruby-lang
<drbrain>
it feels too coupled to have my classes and instances all be able to communicate implicitly through the class variables
techlife has quit [Ping timeout: 252 seconds]
s4muel_ has joined #ruby-lang
fumduq- has joined #ruby-lang
<dingus_khan>
I'm a complete nooblet, so I'm wondering how you would assign input values into the arguments list when you run a class method on an object...?
cored has quit [Ping timeout: 245 seconds]
conceal_rs__ has quit [Ping timeout: 258 seconds]
linc01n has joined #ruby-lang
nibbo has quit [Ping timeout: 258 seconds]
justinmcp has joined #ruby-lang
swav has quit [Read error: Connection reset by peer]
<dingus_khan>
oh wow, that's beyond me at the moment--right now I'm just trying to get things to work, period, lol
samuelkadolph has quit [Ping timeout: 256 seconds]
setmeaway2 has joined #ruby-lang
wizonesolutions_ has quit [*.net *.split]
khaase has quit [*.net *.split]
jwollert has quit [*.net *.split]
jgoss__ has quit [*.net *.split]
eval-in_ has quit [*.net *.split]
erichmenge has quit [*.net *.split]
matthewd has quit [*.net *.split]
fumduq has quit [*.net *.split]
naquad has quit [*.net *.split]
foca_ has quit [*.net *.split]
Guest5424 has quit [*.net *.split]
agile has quit [*.net *.split]
hakunin has quit [*.net *.split]
manveru has quit [*.net *.split]
kevinfagan has quit [*.net *.split]
s4muel has quit [*.net *.split]
<dingus_khan>
I'll try anything that works right now, since I'm under a crazy deadline (hours)
foca has joined #ruby-lang
<drbrain>
I'm confused by your question
certainty has quit [Remote host closed the connection]
<dingus_khan>
right, so for some reason, I'm confused as to how I'd get user inputs into the argument list for when I run a method on an existing object..? it must be obvious...
<TheNotary>
dingus_khan: Can you say that another way? I might know what you're asking, but i'm only about 20% sureish
ahf has joined #ruby-lang
ahf has quit [Changing host]
ahf has joined #ruby-lang
khaase has joined #ruby-lang
conceal_rs__ has joined #ruby-lang
shtirlic has joined #ruby-lang
linc01n has quit [Ping timeout: 258 seconds]
<drbrain>
dingus_khan: you mean, you want to ask the user a question, then send their answer to your object?
<dingus_khan>
yes, alright, so say I want to run "ac_switch" (currently undefined), and have the arguments be user inputs that evaluate to boolean values..?
<dingus_khan>
yes
<dingus_khan>
sorry
<dingus_khan>
three hours of sleep, working on these problems all weekend, basically retarded right now
linc01n has joined #ruby-lang
neurodamage has quit [Ping timeout: 245 seconds]
<drbrain>
dingus_khan: I think you want Kernel#gets, which returns a String, and String#chomp, which removes the trailing newline
Kuukunen has joined #ruby-lang
nibbo has joined #ruby-lang
cored_ has joined #ruby-lang
<dingus_khan>
also, I don't know how to respond to the red messages (PMs?), not familiar with IRC, sorry
znz_v has quit [Ping timeout: 258 seconds]
certainty has joined #ruby-lang
dRbiG has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
<TheNotary>
ooh, looks like irc is acting weird for me right now, lol. I think my reply was way late dingus
neurodamage has joined #ruby-lang
amateurhuman has joined #ruby-lang
cored has quit [Read error: Connection reset by peer]
Demux has joined #ruby-lang
Guu has joined #ruby-lang
<dingus_khan>
drbrain, I have no idea what those things are, lol. do you mean gets.chomp?
perryh has joined #ruby-lang
perryh is now known as Guest83372
<drbrain>
dingus_khan: well, yes
<dingus_khan>
TheNotary, no problem, I think there is some lag time, plus I'm lagging mentally
rue_XIV has joined #ruby-lang
yibe_ has joined #ruby-lang
t_ has joined #ruby-lang
rwk1 has joined #ruby-lang
52AAARIBQ has joined #ruby-lang
52AAARIBQ has quit [Ping timeout: 240 seconds]
yibe_ has quit [Read error: Connection timed out]
<drbrain>
dingus_khan: for example: ruby -e 'puts "type something"; p gets'
techlife has quit [Ping timeout: 256 seconds]
glebm has quit [Ping timeout: 256 seconds]
<dingus_khan>
ok, so I can say house1.ac_switch(gets.chomp) and then have the method evaluate the string for true or false?
yibe_ has joined #ruby-lang
<drbrain>
dingus_khan: yes
pkrnj has quit [Quit: Computer has gone to sleep.]
<drbrain>
dingus_khan: but typically you would want to have each method do only one thing
marr has quit [Ping timeout: 276 seconds]
<drbrain>
so a separate method called, for example, "ask"
<drbrain>
to ask a question and get a response
aquaman has quit [Ping timeout: 264 seconds]
glebm has joined #ruby-lang
<drbrain>
then you compare that result with an expected value to get true/false, then pass that to ac_switch
jgoss__ has joined #ruby-lang
agile has joined #ruby-lang
hakunin has joined #ruby-lang
cassarani has joined #ruby-lang
cassarani has joined #ruby-lang
cassarani has quit [Changing host]
wizonesolutions_ has joined #ruby-lang
<dingus_khan>
oh, I see what you're saying--that does seem to make it clearer to read, right?
znz_v has joined #ruby-lang
<drbrain>
yes, and easier to maintain and fix, too
<TheNotary>
it's also for 'separation of duties' purposes. Makes for code that's more logical and maintainable
shaman42_ has joined #ruby-lang
<TheNotary>
if you're into theory, google for lectures on "SOLID"
<dingus_khan>
so instead of the ac_switch method asking the question, getting the answer, and setting the ac_on variable to "true", break it up into three different ones?
<dingus_khan>
or rather, two, the last two going together, right?
<dingus_khan>
also, to store the answer, would I use an instance variable for that express purpose of holding the answer, which I initialize in the beginning, or us a local variable and return it somehow?
<drbrain>
I would use a local variable
<drbrain>
since it doesn't need to be shared state
matthewd has joined #ruby-lang
matthewd has joined #ruby-lang
matthewd is now known as 65MAAQJJR
msch has joined #ruby-lang
erichmenge has quit [Ping timeout: 258 seconds]
swav has quit [Read error: Connection reset by peer]
sailias has quit [Ping timeout: 258 seconds]
Silex has quit [Ping timeout: 258 seconds]
vgoff has quit [Ping timeout: 258 seconds]
leocassarani has quit [Ping timeout: 258 seconds]
vbatts has quit [Ping timeout: 258 seconds]
amateurhuman has quit [Ping timeout: 258 seconds]
matthewd has quit [Ping timeout: 258 seconds]
justinmcp has quit [Ping timeout: 258 seconds]
erichmenge_ is now known as erichmenge
jwollert- has joined #ruby-lang
justinmcp has joined #ruby-lang
techlife has joined #ruby-lang
rue has quit [Ping timeout: 264 seconds]
wizonesolutions has quit [Ping timeout: 264 seconds]
shaman42 has quit [Ping timeout: 264 seconds]
bougyman has quit [Ping timeout: 264 seconds]
Kuukunen has quit [Ping timeout: 264 seconds]
tallship has quit [Ping timeout: 264 seconds]
jwollert has quit [Ping timeout: 264 seconds]
singpolyma has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby-lang
Silex has joined #ruby-lang
tallship has joined #ruby-lang
<dingus_khan>
thank you guys for your help and patience, I totally appreciate it!
Kuukunen has joined #ruby-lang
<drbrain>
np
singpolyma has joined #ruby-lang
<dingus_khan>
ok, so how do I return a local variable from a method within a class to be used by another method in the class? as in, I've asked the question and gotten a "yes", what kind of variable do I assign that to so that it can be used elsewhere in the class?
<dingus_khan>
make it local in the parameter list for ac_switch?
<drbrain>
yes
<drbrain>
you can only give local variable names there
<dingus_khan>
ah ok, I see now
nertzy has quit [Ping timeout: 252 seconds]
rking has joined #ruby-lang
r0bby has quit [Ping timeout: 264 seconds]
pasties has quit [Ping timeout: 256 seconds]
msch has quit [Ping timeout: 258 seconds]
justinmcp has quit [Ping timeout: 258 seconds]
linc01n has quit [Ping timeout: 258 seconds]
Guest83372 has quit [Ping timeout: 258 seconds]
Silex has quit [Ping timeout: 258 seconds]
linc01n has joined #ruby-lang
ddfreyne has quit [Ping timeout: 248 seconds]
kith has quit [Ping timeout: 248 seconds]
ioga_wrk has quit [Ping timeout: 248 seconds]
ddfreyne has joined #ruby-lang
pasties has joined #ruby-lang
jstemmer has quit [Ping timeout: 256 seconds]
r0bby_ has joined #ruby-lang
jstemmer has joined #ruby-lang
r0bby_ has quit [Changing host]
r0bby_ has joined #ruby-lang
<dingus_khan>
it's strange, it's not "turning the AC on", I feel like it's the order I'm calling things in..?
perry has joined #ruby-lang
perry is now known as Guest93618
nertzy has joined #ruby-lang
Silex^^ has joined #ruby-lang
ioga_wrk has joined #ruby-lang
agarie has quit [Remote host closed the connection]
singpolyma has quit [*.net *.split]
thorncp has quit [*.net *.split]
d_roge has quit [*.net *.split]
lele|w has quit [*.net *.split]
lele has quit [*.net *.split]
Taranis has quit [*.net *.split]
<drbrain>
I don't see a "turning the AC on" in your last paste
guilleiguaran_ has joined #ruby-lang
techlife has quit [Ping timeout: 264 seconds]
glebm has quit [Ping timeout: 256 seconds]
robbyoconnor has joined #ruby-lang
schroedinbug has joined #ruby-lang
glebm has joined #ruby-lang
d_roge has joined #ruby-lang
Taranis has joined #ruby-lang
lele|w has joined #ruby-lang
thorncp has joined #ruby-lang
lele has joined #ruby-lang
kurko_ has joined #ruby-lang
<dingus_khan>
right, I think I fixed that, but I'm confused about how to get to change in the method where the temperature is adjusted: http://pastebin.com/03m5dnRh
chase has joined #ruby-lang
Silex^^ has quit [Ping timeout: 256 seconds]
<dingus_khan>
get it*
r0bby_ has quit [Ping timeout: 256 seconds]
Silex^^ has joined #ruby-lang
<drbrain>
why do you have *ac_on on line 13?
matti has quit [Ping timeout: 264 seconds]
<dingus_khan>
whoops, typo
<dingus_khan>
fixed, same result
techlife has joined #ruby-lang
msch has joined #ruby-lang
<drbrain>
I don't see where you call ac_switch
kith_ is now known as kith
justinmcp has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<dingus_khan>
actually, I have no idea how I would do that...
Gaelan has joined #ruby-lang
<drbrain>
ask_ac returns a value, you can assign that to a variable then send that variable to another method
<dingus_khan>
right after I call ask_ac? I don't understand
coffeejunk has joined #ruby-lang
jgoss__ has quit [Quit: Leaving]
singpolyma has joined #ruby-lang
<dingus_khan>
that's what I did with ac_switch, right? so I call ac_switch separately, after the class definition?
matti_ has joined #ruby-lang
pasties has quit [Ping timeout: 256 seconds]
jgoss has joined #ruby-lang
jgoss has joined #ruby-lang
jgoss has quit [Changing host]
guilleiguaran_ has quit [Ping timeout: 240 seconds]
<drbrain>
play around some and send another paste if you get stuck ;D
scottschecter has joined #ruby-lang
pasties has joined #ruby-lang
guilleiguaran__ has joined #ruby-lang
Smol has joined #ruby-lang
Guest85414 has joined #ruby-lang
matti_ is now known as matti
justinmcp_ has quit [Ping timeout: 240 seconds]
<dingus_khan>
oh man, I'm dying over here, lol. sigh. I'm getting lost in the passing back and forth of things!
<drbrain>
take a step back
<drbrain>
is this what you want to do:
<drbrain>
1) create a house, 2) update the temperature, 3) ask if the AC should come on, 4) update the AC state from the user's answer
<dingus_khan>
ok, I need a smoke, my nerves are killing me, be back at it in a minute, thanks for hand-holding and your patience! XD
randalla1ordon has joined #ruby-lang
randallagordon has quit [Read error: Operation timed out]
<TheNotary>
is he in an exam crunch?
<drbrain>
must be
randym has quit [Ping timeout: 264 seconds]
<TheNotary>
they push thing too quickly in education. It really hurts things in the long run when there's no time to let things sink in
<drbrain>
also, it would be unfair to dingus_khan to just tell him the answer
<TheNotary>
true
gianlucadv has quit [Ping timeout: 264 seconds]
[dmp]_ has quit [Ping timeout: 264 seconds]
tdy_ has joined #ruby-lang
Smol has quit [Ping timeout: 264 seconds]
freedrull has quit [Ping timeout: 264 seconds]
glebm has quit [Ping timeout: 256 seconds]
jwollert| has joined #ruby-lang
richardburton1 has joined #ruby-lang
techlife has quit [*.net *.split]
jwollert- has quit [*.net *.split]
65MAAQJJR has quit [*.net *.split]
amateurhuman_ has quit [*.net *.split]
erichmenge has quit [*.net *.split]
kotp has quit [*.net *.split]
bnagy has joined #ruby-lang
techlife has joined #ruby-lang
randalla1ordon has quit [Ping timeout: 240 seconds]
randallagordon has joined #ruby-lang
randym has joined #ruby-lang
darix- has joined #ruby-lang
darix- has quit [Changing host]
darix- has joined #ruby-lang
Smol has joined #ruby-lang
glebm has joined #ruby-lang
joast has quit [Ping timeout: 264 seconds]
darix has quit [Ping timeout: 264 seconds]
Gaelan has quit [Ping timeout: 264 seconds]
asio has quit [Ping timeout: 264 seconds]
tsou has quit [Ping timeout: 264 seconds]
darix- is now known as darix
Gaelan has joined #ruby-lang
jgoss has quit [Ping timeout: 256 seconds]
gianlucadv has joined #ruby-lang
jwollert has joined #ruby-lang
jwollert has quit [Excess Flood]
matti has quit [Ping timeout: 248 seconds]
ddfreyne has quit [Ping timeout: 248 seconds]
ddfreyne has joined #ruby-lang
vgoff has joined #ruby-lang
matthewd has joined #ruby-lang
matti_ has joined #ruby-lang
matti_ is now known as matti
[dmp] has joined #ruby-lang
[dmp] has quit [Changing host]
[dmp] has joined #ruby-lang
amateurhuman has joined #ruby-lang
gianlucadv has quit [*.net *.split]
dhruvasagar has quit [*.net *.split]
thorncp has quit [*.net *.split]
d_roge has quit [*.net *.split]
lele|w has quit [*.net *.split]
lele has quit [*.net *.split]
Taranis has quit [*.net *.split]
freedrull has joined #ruby-lang
<dingus_khan>
yep, totally an exam crunch! I was preparing for this assessment for weeks, but they sprung it a week early on me; it was supposed to be next weekend!
Gaelan has quit [Ping timeout: 251 seconds]
techlife has quit [Ping timeout: 252 seconds]
[dmp]_ has joined #ruby-lang
asio has joined #ruby-lang
randallagordon has quit [Ping timeout: 258 seconds]
erichmenge has joined #ruby-lang
techlife has joined #ruby-lang
<dingus_khan>
and yeah, no answers please, I'm doing this by the book! thanks for the help though, they said that's allowed!
dhruvasagar has joined #ruby-lang
d_roge has joined #ruby-lang
Taranis has joined #ruby-lang
lele has joined #ruby-lang
thorncp has joined #ruby-lang
lele|w has joined #ruby-lang
thorncp has quit [*.net *.split]
d_roge has quit [*.net *.split]
lele|w has quit [*.net *.split]
lele has quit [*.net *.split]
Taranis has quit [*.net *.split]
randallagordon has joined #ruby-lang
Domon has joined #ruby-lang
[dmp] has quit [Ping timeout: 248 seconds]
ddfreyne has quit [Ping timeout: 248 seconds]
msch has quit [Remote host closed the connection]
amateurhuman has quit [Ping timeout: 285 seconds]
pasties has quit [Ping timeout: 256 seconds]
randym has quit [Ping timeout: 258 seconds]
rwk1 has quit [Ping timeout: 240 seconds]
joast has joined #ruby-lang
rwk1 has joined #ruby-lang
tsou has joined #ruby-lang
gianlucadv has joined #ruby-lang
jgoss has joined #ruby-lang
jgoss has quit [Changing host]
jgoss has joined #ruby-lang
ddfreyne has joined #ruby-lang
stevechiagozie has quit [Quit: Computer has gone to sleep.]
joast has quit [*.net *.split]
jwollert| has quit [*.net *.split]
t_ has quit [*.net *.split]
<TheNotary>
btw, dingus_khan: I notice that code you posted has an indent depth of 1 rather than the conventional ruby depth of 2 spaces. What IDE/ Editor are you rolling with atm?
transiency has joined #ruby-lang
<dingus_khan>
don't laugh, but I'm doing this on a text editor called "medit", lol
d_roge has joined #ruby-lang
lele|w has joined #ruby-lang
thorncp has joined #ruby-lang
lele has joined #ruby-lang
Taranis has joined #ruby-lang
<dingus_khan>
I had to learn how to use linux on the fly, by the way--trial by fire!
rwk1_ has joined #ruby-lang
matti_ has joined #ruby-lang
<dingus_khan>
because everyone uses Macs and I've never really touched on, most of my "prep" time was spent learning how to configure and use xubuntu and the terminal! XD I'm an idiot
<dingus_khan>
one*
joast has joined #ruby-lang
jwollert| has joined #ruby-lang
<TheNotary>
ah, medit should get the job done. I just had to make sure auto-indentation was a feature of your text editor, plus syntax highlighting
matti has quit [Remote host closed the connection]
rwk1 has quit [Remote host closed the connection]
matthewd has quit [Remote host closed the connection]
matti_ is now known as matti
Demux has quit [Quit: Bye]
amateurhuman has joined #ruby-lang
matthewd has joined #ruby-lang
joast is now known as Guest13330
ddfreyne has quit [Ping timeout: 248 seconds]
rking has quit [Ping timeout: 264 seconds]
rwk1_ has quit [Ping timeout: 260 seconds]
<dingus_khan>
yeah, it's worked so far, haven't had time to explore others, even though everyone's always mentioning different editors and such
gianlucadv has quit [Ping timeout: 264 seconds]
jxie has joined #ruby-lang
Demux has joined #ruby-lang
hakunin_ has joined #ruby-lang
tylersmith has quit [Quit: tylersmith]
matthewd has quit [Remote host closed the connection]
pasties has joined #ruby-lang
pasties has quit [Ping timeout: 256 seconds]
gianlucadv has joined #ruby-lang
gianlucadv has quit [*.net *.split]
thorncp has quit [*.net *.split]
d_roge has quit [*.net *.split]
lele has quit [*.net *.split]
lele|w has quit [*.net *.split]
Taranis has quit [*.net *.split]
pasties has joined #ruby-lang
<TheNotary>
geany is a pretty close match to what you're using, and it has an important feature to rubyists. "Tabs as spaces". You can go into Edit -> Preference -> Editor -> Indentation and then change the tab width to 2 and the type to "spaces". From then on when you hit the tab key (or shift + tab) you will indent using 2 spaces (or un-indent) which might make looking at your code a bit easier.
Gaelan has joined #ruby-lang
<TheNotary>
should probably keep a note of that around for after the deadline
<TheNotary>
But I only use geany for javascript. I lean towards Aptana for some reason when I'm doing ruby.
<TheNotary>
any progress on the script?
t_ has joined #ruby-lang
glebm has quit [Ping timeout: 256 seconds]
Demux has quit [Ping timeout: 258 seconds]
transiency has quit [Ping timeout: 258 seconds]
justinmcp has quit [Ping timeout: 258 seconds]
justinmcp_ has joined #ruby-lang
Demux_ has joined #ruby-lang
pkrnj has joined #ruby-lang
asio_ has joined #ruby-lang
jxie has quit [Ping timeout: 264 seconds]
Guest93618 has quit [Ping timeout: 684 seconds]
asio has quit [Ping timeout: 258 seconds]
glebm has joined #ruby-lang
perry has joined #ruby-lang
jxie_ has joined #ruby-lang
perry is now known as Guest44401
gianlucadv has joined #ruby-lang
matthewd has joined #ruby-lang
<dingus_khan>
noted! I'll download it once this is all over, thanks! also, no progress--I'm just throwing code at the wall and seeing what sticks, I'm in that place where I don't know what I need to ask to figure out what goes where, I hate deadlines, lol...
hakunin has quit [Ping timeout: 253 seconds]
tomzx_mac has quit [Ping timeout: 245 seconds]
<dingus_khan>
I want to put method calls as arguments for when I call house methods outside the class, and I'm stuck there. google no help!
jgoss has quit [Ping timeout: 245 seconds]
d_roge has joined #ruby-lang
thorncp has joined #ruby-lang
Taranis has joined #ruby-lang
lele|w has joined #ruby-lang
lele has joined #ruby-lang
techlife has quit [Ping timeout: 256 seconds]
agarie has joined #ruby-lang
XxBlakeFailxX has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
TheNotary has quit [Ping timeout: 256 seconds]
hakunin has joined #ruby-lang
techlife has joined #ruby-lang
tallship has quit [Ping timeout: 245 seconds]
justinmcp_ has quit [Quit: No Ping reply in 180 seconds.]
pkrnj has quit [Ping timeout: 256 seconds]
gianlucadv has quit [Ping timeout: 264 seconds]
jxie_ has quit [Ping timeout: 258 seconds]
linc01n has quit [Ping timeout: 258 seconds]
jstemmer has quit [Ping timeout: 256 seconds]
jstemmer has joined #ruby-lang
jxie has joined #ruby-lang
hakunin_ has quit [Ping timeout: 258 seconds]
linc01n has joined #ruby-lang
pkrnj has joined #ruby-lang
tcopp has quit [Ping timeout: 276 seconds]
t_ has quit [Ping timeout: 256 seconds]
jxie has quit [*.net *.split]
jstemmer has quit [Ping timeout: 256 seconds]
asio_ has quit [Ping timeout: 256 seconds]
pkrnj has quit [Ping timeout: 256 seconds]
akahn has joined #ruby-lang
techlife has quit [*.net *.split]
Demux_ has quit [*.net *.split]
jwollert| has quit [*.net *.split]
Guest13330 has quit [*.net *.split]
matthewd has quit [Remote host closed the connection]
pasties has quit [Ping timeout: 256 seconds]
UziMonkey_ has joined #ruby-lang
xxaM has joined #ruby-lang
Guest44401 has quit [Write error: Connection reset by peer]
pasties has joined #ruby-lang
TheNotary has joined #ruby-lang
techlife has joined #ruby-lang
perryh has joined #ruby-lang
linc01n has quit [Ping timeout: 258 seconds]
linc01n has joined #ruby-lang
asio has joined #ruby-lang
t_ has joined #ruby-lang
Demux_ has joined #ruby-lang
Guest13330 has joined #ruby-lang
gianlucadv has joined #ruby-lang
Gaelan has joined #ruby-lang
jstemmer has joined #ruby-lang
perryh is now known as Guest42700
Guest42700 has joined #ruby-lang
Guest42700 has quit [Changing host]
pkrnj has joined #ruby-lang
thorncp has quit [*.net *.split]
lele|w has quit [*.net *.split]
d_roge has quit [*.net *.split]
lele has quit [*.net *.split]
Taranis has quit [*.net *.split]
jxie has joined #ruby-lang
d_roge has joined #ruby-lang
Taranis has joined #ruby-lang
thorncp has joined #ruby-lang
lele|w has joined #ruby-lang
lele has joined #ruby-lang
Xzyx987X has joined #ruby-lang
jbsan has joined #ruby-lang
<dingus_khan>
tried using putting self.update_temperature!(@ac_on) in the as_ac method, which compiles, but it doesn't change the temp...?
<dingus_khan>
putting*
<bnagy>
method args aren't @ivars
<bnagy>
if you want to assign a method arg to an ivar you need to do so explicitly
Xzyx987X_ has joined #ruby-lang
erichmenge_ has joined #ruby-lang
<dingus_khan>
you mean that I can't use an ivar as an argument? sorry, really green here. it actually worked when I also set the second ivar to false, though I don't know why
pkrnj has quit [Ping timeout: 256 seconds]
jaimef has quit [Ping timeout: 256 seconds]
GitNick has quit [Ping timeout: 256 seconds]
davidbalber|away is now known as davidbalbert
techlife has quit [Ping timeout: 264 seconds]
UziMonkey_ has quit [Ping timeout: 264 seconds]
UziMonkey_ has joined #ruby-lang
randallagordon has quit [Ping timeout: 256 seconds]
wizonesolutions_ has quit [Ping timeout: 256 seconds]
chendo has quit [Ping timeout: 256 seconds]
transiency has joined #ruby-lang
wizonesolutions has joined #ruby-lang
wizonesolutions has quit [Changing host]
wizonesolutions has joined #ruby-lang
<bnagy>
ok.. you can get rid of pretty much all those self.blah method invocations
asio has quit [Ping timeout: 258 seconds]
Gaelan has quit [Ping timeout: 258 seconds]
glebm has quit [Ping timeout: 256 seconds]
jxie has quit [Ping timeout: 258 seconds]
pkrnj has joined #ruby-lang
chessguy has joined #ruby-lang
<dingus_khan>
I'm sorry, I have no idea what you mean; the only self method calls I have are the self.update_temperature! ones, right?
jwollert has joined #ruby-lang
erichmenge has quit [Quit: Arrivederci!]
erichmenge_ is now known as erichmenge
jstemmer has quit [Ping timeout: 256 seconds]
<bnagy>
and self.display etc
pasties has quit [Ping timeout: 256 seconds]
t_ has quit [Ping timeout: 256 seconds]
TheNotary has quit [Ping timeout: 256 seconds]
Git|Nick has joined #ruby-lang
pasties has joined #ruby-lang
kentos_ has joined #ruby-lang
jstemmer has joined #ruby-lang
glebm has joined #ruby-lang
srbaker has joined #ruby-lang
UziMonkey_ has quit [Ping timeout: 264 seconds]
chendo has joined #ruby-lang
<bnagy>
other than that, it looks like it should kinda work. You could streamline the logic, and there are some style issues ( indent, unneccessary parens ) but they're not really important
<bnagy>
oh one fairly big thing - where you call update_temperature! @ac_on...
<bnagy>
you don't need to.
matthewd has joined #ruby-lang
Xzyx987X has quit [Ping timeout: 292 seconds]
Guest42700 has quit [Excess Flood]
jwollert- has joined #ruby-lang
perry has joined #ruby-lang
techlife has joined #ruby-lang
perry has quit [Changing host]
perry has joined #ruby-lang
<bnagy>
passing @ivars between instance methods is redundant - the receiver can just look at the ivars itself, that's what they're for
jaimef has joined #ruby-lang
randallagordon has joined #ruby-lang
<dingus_khan>
oh man, I'm just so happy that it's actually working right now, lmao! I started smoking again because of this. at my wits end, I can't even think about messing with it when I've got hours left before deadline and I have to figure out a javascript function still
Gaelan has joined #ruby-lang
jxie has joined #ruby-lang
idkazuma has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 256 seconds]
jwollert has quit [Ping timeout: 282 seconds]
asio has joined #ruby-lang
<dingus_khan>
when I took the '@' off the instance variables, it failed with a undefined local variable error on ask_furnace..?
kentos_ has quit [Quit: Leaving]
TheNotary has joined #ruby-lang
brianpWins has joined #ruby-lang
<TheNotary>
my irc is being all screwy right now, but you need to make sure the @temp ivar stays, but the others can just be regular variables since you pass them into each method explicitly
linc01n has quit [*.net *.split]
pkh has joined #ruby-lang
<TheNotary>
btw, if you find yourself hesitant to make changes to your code, then it's time to learn about how git works. It let's you save the state of your code and easily return to stable 'versions' of your code if you screw things up too bad when tinkering away
<Aria>
Yup. Put the current hash of your commit in your prompt. Commit often. If you ever need to get back to where you were, git checkout (that hash) or git reset (that hash)
<dingus_khan>
oh man, git is next for me--got it installed, know how to "init", but that's it, lmao. I need another smoke, I'm sweating bullets over here. This is currently failing: http://pastebin.com/BSq9aDP3
<Aria>
Safe even across rebases and all kinds of version control crazy, since git is good at keeping older states.
Wardrop_ has joined #ruby-lang
<dingus_khan>
I'll be back in a few. right now, I'm using a lot of different files for version control, lol
<dingus_khan>
sweet, git will save me in the future! thanks! bbs
<TheNotary>
that was me 2 years ago with C#... I still have DVDs of months of changes, lol
Xzyx987X has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
techlife has quit [Ping timeout: 256 seconds]
randalla1ordon has joined #ruby-lang
Xzyx987X_ has quit [Ping timeout: 256 seconds]
wizonesolutions has quit [Ping timeout: 256 seconds]
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
r0bglees0n has joined #ruby-lang
Gaelan_ has joined #ruby-lang
wizonesolutions has joined #ruby-lang
wizonesolutions has quit [Changing host]
wizonesolutions has joined #ruby-lang
idkazuma_ has joined #ruby-lang
matthewd has quit [Remote host closed the connection]
asio has quit [Write error: Connection reset by peer]
techlife has joined #ruby-lang
GitNick has joined #ruby-lang
perry- has joined #ruby-lang
randallagordon has quit [Ping timeout: 256 seconds]
mistym_away has quit [Remote host closed the connection]
sailias1 has quit [Quit: Leaving.]
lcdhoffman has quit [Quit: lcdhoffman]
pkh has joined #ruby-lang
noop has joined #ruby-lang
guns has quit [Remote host closed the connection]
srbaker has quit [Quit: Computer has gone to sleep.]
megha has joined #ruby-lang
slyphon has joined #ruby-lang
baba has quit [Ping timeout: 260 seconds]
davidbalbert is now known as davidbalber|away
dhruvasagar has quit [Ping timeout: 245 seconds]
sailias has joined #ruby-lang
dhruvasagar has joined #ruby-lang
micaeked has joined #ruby-lang
bzalasky has joined #ruby-lang
<micaeked>
Hello. A bit of a toughy. I have this: https://github.com/micaeked/random_robot ... and it works (passes the tests), but with an upper limit of 10,000 for ids, which makes it difficult to work with. Anyone worked with pseudorandom lists before?
<micaeked>
Also, increasing the limit for ids is simple, but makes it much slower.
wudofyr has quit [Remote host closed the connection]
Gaelan has quit [Remote host closed the connection]
vitaluha_ has quit [Ping timeout: 256 seconds]
slyphon has quit [Quit: slyphon]
pkondzior___ has joined #ruby-lang
cout_ has joined #ruby-lang
maxmanders has joined #ruby-lang
narya_ has joined #ruby-lang
kuja_ has joined #ruby-lang
yorickpeterse2 has joined #ruby-lang
certaint1 has joined #ruby-lang
vbatts2 has joined #ruby-lang
Kero_ has joined #ruby-lang
dingus_khan has quit [Ping timeout: 256 seconds]
jarib_ has joined #ruby-lang
jacky- has joined #ruby-lang
jasiek_ has joined #ruby-lang
jaska___ has joined #ruby-lang
Y_Ichiro_ has joined #ruby-lang
Y_Ichiro_ has quit [Changing host]
Y_Ichiro_ has joined #ruby-lang
babinho_ has joined #ruby-lang
eam has joined #ruby-lang
t0h has quit [Disconnected by services]
Sublinhado has joined #ruby-lang
t0h_ has joined #ruby-lang
badeball_ has joined #ruby-lang
Weems2 has joined #ruby-lang
tenderlo_ has joined #ruby-lang
tenderlo_ has quit [Remote host closed the connection]
kuja has quit [Ping timeout: 245 seconds]
pkondzior__ has quit [Ping timeout: 245 seconds]
maxmande_ has quit [Ping timeout: 245 seconds]
jacky has quit [Ping timeout: 245 seconds]
cout has quit [Ping timeout: 245 seconds]
narya has quit [Ping timeout: 245 seconds]
yorickpeterse1 has quit [Ping timeout: 245 seconds]
vbatts1 has quit [Ping timeout: 245 seconds]
certainty has quit [Ping timeout: 245 seconds]
Weems has quit [Ping timeout: 245 seconds]
jarib has quit [Ping timeout: 245 seconds]
Kero has quit [Ping timeout: 245 seconds]
jaska has quit [Ping timeout: 245 seconds]
yeltzooo has quit [Ping timeout: 245 seconds]
tenderlove has quit [Ping timeout: 245 seconds]
jasiek has quit [Ping timeout: 245 seconds]
Y_Ichiro has quit [Ping timeout: 245 seconds]
babinho has quit [Ping timeout: 245 seconds]
eam_ has quit [Ping timeout: 245 seconds]
adam12 has quit [Ping timeout: 245 seconds]
Glass_saga has quit [Ping timeout: 245 seconds]
khaase has quit [Ping timeout: 245 seconds]
bpot__ has quit [Ping timeout: 245 seconds]
badeball has quit [Ping timeout: 245 seconds]
yeltzooo6 has joined #ruby-lang
jonahR has joined #ruby-lang
adam12 has joined #ruby-lang
khaase has joined #ruby-lang
techlife has quit [Ping timeout: 255 seconds]
benlovell has joined #ruby-lang
<bnagy>
what on earth are you trying to do?
jonahR has quit [Quit: jonahR]
benlovell has quit [Client Quit]
wang938022 has joined #ruby-lang
<micaeked>
bnagy: Choose a pseudo-random list from a pool of weighed items, and make sure the lists generated change as little as possible with changes to the pool.
<micaeked>
bnagy: Yep, I started with something like that, but all the lists change completely if I add a heavily weighed item, or a few items. Or delete an item near the beginning. I want lists generated with a key to change as little as possible when generated with the same key later.
TheNotary has quit [Ping timeout: 256 seconds]
sailias has quit [Quit: Leaving.]
spinagon has joined #ruby-lang
r0bglees0n has quit [Ping timeout: 256 seconds]
chessguy has quit [Remote host closed the connection]
sailias has joined #ruby-lang
rippa has quit [Read error: Connection reset by peer]
sailias has quit [Client Quit]
sailias has joined #ruby-lang
sailias has quit [Client Quit]
sailias has joined #ruby-lang
<bnagy>
eh?
<micaeked>
bnagy: Honestly, I was really hoping that this was a solved problem, and I just didn't know what it was called, but I've searched for multiple days, and didn't find anything like that.
sailias1 has joined #ruby-lang
<bnagy>
if you change the list then of course you're going to get different outputs
sailias1 has quit [Client Quit]
sailias1 has joined #ruby-lang
sailias1 has quit [Read error: Connection reset by peer]
r0bglees0n has joined #ruby-lang
<micaeked>
bnagy: Not with what I have. If you have 1000 items in the pool, and you delete the first 10, then lists that did not have those items are not affected, and lists that did have those items have only those items replace, the rest stay the same.
sailias1 has joined #ruby-lang
sailias1 has quit [Client Quit]
<bnagy>
but for the same items with the same weights then it's deterministic if you seed your prng
sailias1 has joined #ruby-lang
<micaeked>
But what I have is slow, and is limited to items with unique ids in the range 1..10_000
sailias has quit [Ping timeout: 252 seconds]
Mon_Ouie has joined #ruby-lang
<bnagy>
I think you'd be better off implemented a 'normal' weighted selection, and then worrying about missing items as a separate issue
<bnagy>
like, if you go look at a previously generated list, and it refers to an item that's not there any more, you can replace it
<bnagy>
does it need to work if you change weights, as well, or just when you delete items?
sailias1 has quit [Ping timeout: 246 seconds]
cored_ has quit [Ping timeout: 260 seconds]
<micaeked>
bnagy: It needs to work with changing weights in both directions. It currently works with that.
TheNotary has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
<bnagy>
wait, so you change weights and all lists are supposed to recalculate themselves?
<bnagy>
that sounds.. unsound
spinagon has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jg_ has joined #ruby-lang
<micaeked>
bnagy: Lists are calculated when needed, with keys that are not known ahead of time, and storing them persistently would be incredibly complicated in this case.
<micaeked>
Lists are recalculated each time, and they don't change if the items don't change, and they change minimally and appropriately if the item pool does change.
dhruvasagar has quit [Ping timeout: 256 seconds]
<micaeked>
That part works. But it's slow.
<micaeked>
And has a hardcoded limit for ids.
cored has quit [Read error: Connection reset by peer]
Gaelan has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
Gaelan has quit [Ping timeout: 256 seconds]
<micaeked>
bnagy: I'm going to bed, but thanks for chatting with me about this. Maybe I need to rethink how I'm going about it.
ryanf has quit [Quit: leaving]
Gaelan has joined #ruby-lang
mdub has quit [Ping timeout: 276 seconds]
bzalasky has quit [Remote host closed the connection]
jaska___ has left #ruby-lang [#ruby-lang]
Gaelan has quit [Ping timeout: 256 seconds]
micaeked has quit [Quit: WeeChat 0.4.0]
dingus_khan has joined #ruby-lang
voker57_ has joined #ruby-lang
concernedcitizen has joined #ruby-lang
cyndis_ has left #ruby-lang [#ruby-lang]
voker57 has quit [Ping timeout: 276 seconds]
mineiro has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 252 seconds]
cyndis has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
volov has quit [Remote host closed the connection]
volov has joined #ruby-lang
mineiro has quit [Remote host closed the connection]
Weems2 is now known as Weems
Weems has quit [Changing host]
Weems has joined #ruby-lang
volov has quit [Ping timeout: 245 seconds]
toretore has joined #ruby-lang
bzalasky has joined #ruby-lang
bart has joined #ruby-lang
bart is now known as Guest81799
charliesome has joined #ruby-lang
solars has joined #ruby-lang
wudofyr has joined #ruby-lang
wudofyr has quit [Remote host closed the connection]
wudofyr has joined #ruby-lang
benlovell has joined #ruby-lang
eval-in__ has quit [Remote host closed the connection]
eval-in has joined #ruby-lang
<charliesome>
wudofyr: wudofyr?
bpot__ has joined #ruby-lang
dhruvasagar has joined #ruby-lang
yorickpeterse2 has quit [Quit: Who cares about these quit messages?]
<judofyr>
whitequark: how important is the lvar table for parsing anyway? I only know about "a /1 #/" which parses differently depending on whether a is a lvar or not
<whitequark>
judofyr: it is the same case as for `p(p)`
Weems has quit [*.net *.split]
<whitequark>
and it is one of the two cases where it matters
Weems has joined #ruby-lang
Weems has quit [Changing host]
Weems has joined #ruby-lang
pasties has quit [*.net *.split]
UziMonkey__ has quit [*.net *.split]
UziMonkey__ has joined #ruby-lang
<whitequark>
or maybe this is *the* only case
<whitequark>
probably yes
io_syl has quit [Quit: Computer has gone to sleep.]
<whitequark>
yeah removed that dynamic bullshit from RP, no test failures
<charliesome>
whitequark: you should just write your own rp
pasties has joined #ruby-lang
nmeum has quit [Quit: WeeChat 0.4.1-dev]
runeb has quit [Ping timeout: 264 seconds]
<whitequark>
charliesome: test suite
<whitequark>
RP is full of shit, and its test suite is also completely unmaintainable, but it *works*
<whitequark>
*after* my RP rewrite passes 100% of RP's test suite, I'll think about that. but not before.
thufir_ has joined #ruby-lang
<whitequark>
also I wanna keep some compat with zenspider's RP because 1) ruby2ruby is definitely useful 2) *maybe* I'll be able to upstream that
<judofyr>
whitequark: hm. but you still need to keep track of lvars (so you know that "a" is an lvar and not a method-call), right?
<whitequark>
judofyr: sure
<whitequark>
but it's not related to those particular parts of code
chessguy has joined #ruby-lang
<judofyr>
whitequark: btw, what parts of the Ruby syntax would reduce the size of the parser most?
<judofyr>
e.g. if you could "trim" Ruby, what would you remove (from a syntax PoV)
<charliesome>
don't let 'rb_clear_cache_by_class' fool you, its implementation is basically a TODO and an increment of the global state
<whitequark>
soooo
dbussink_ has quit [Remote host closed the connection]
<whitequark>
can this be fixed by maintaining a pool of singleton classs? :D
<whitequark>
"fixed"
<charliesome>
whitequark: i have a series of patches
<charliesome>
one of them caches (class, module) pairs
dbussink has joined #ruby-lang
<judofyr>
charliesome: I guess Tilt could avoid using "class << self" if we define a method per scope-class
<charliesome>
judofyr: that's kinda meh
<charliesome>
i don't think tilt should change
<judofyr>
charliesome: e.g. instead of defining on BasicObject, we define it on scope.class
<charliesome>
tilt doesn't do anything after template compilation that should warrant a cache clear
<charliesome>
i'm trying to add class hierarchy based invalidation to MRI
<charliesome>
but it's time consuming and fiddly
<charliesome>
but if that gets in then tilt's problems are solved
<judofyr>
anyone knows Japanese? I think nari commented on my use of "Nakamura-san": https://twitter.com/nari3
<charliesome>
"Do some trap of Nakamura-san" is what google translate says
<charliesome>
i don't even
<judofyr>
"And a trap that is." says Bing
<whitequark>
confusing
chris2_ has joined #ruby-lang
<Wardrop_>
Hey everyone. Is Ruby 2.1.0-dev relatively stable? I'm looking to use it for a production server to resolve bug #8100 (http://bugs.ruby-lang.org/issues/8100). Even if 2.1.0-dev his a bit hit or miss, it surely can't be any worse than 2.0.0 with that bug.
<charliesome>
Wardrop_: pls don't do that
<charliesome>
Wardrop_: take 2.0.0-p0, apply the patch manually
<charliesome>
dev versions by definition are not stable
<charliesome>
judofyr: want to see something funny (related to japanese comments)
<whitequark>
>
<whitequark>
Yeah, this fix should be backport to 1.9.3 and 2.0.0.
<Wardrop_>
Ok. How do I manually apply the patch? I assume it means getting a copy of 2.0.0-p0 and changing the offending line manually or with a patch file.
<judofyr>
charliesome: sure
<Wardrop_>
Can RVM source from a local directory?
<whitequark>
Wardrop_: yes
ddfreyne has joined #ruby-lang
<charliesome>
Wardrop_: get a copy of 2.0.0-p0, go to proc.c, go to bm_free(), above 'ume->me = data->me;', add 'data->me->mark = 0;'
<whitequark>
it's not (just) a debug output; this is what's in the token stream
davidbalber|away is now known as davidbalbert
<whitequark>
and I can report them correctly for every single ruby weirdness.
davidbalbert is now known as davidbalber|away
<whitequark>
even if you use nested heredocs with empty string as the closing term all over your code.
<yorickpeterse>
whitequark: marry me
<whitequark>
yorickpeterse: ok
<yorickpeterse>
is it custom to brink booze to Russian weddings?
<yorickpeterse>
* bring
<yorickpeterse>
lol
<whitequark>
I'm not sure how it's in other countries, but here I've been quite convinced that a wedding is just an excuse for a giant, multi-day drinkup
rwk1 has quit [Remote host closed the connection]
hashbangchris has quit [Quit: mt]
<yorickpeterse>
But now a serious question though
<yorickpeterse>
Does it blend?
<whitequark>
also while we're at it... in Cee: `int(-1) < uint(1)` is false
wyhaines has joined #ruby-lang
punchfac_ has joined #ruby-lang
<whitequark>
yorickpeterse: it blends with the environment and then stabs you in the back
<whitequark>
ninja code
<yorickpeterse>
you mean it's vaporware because we can't see it?
<whitequark>
ragel is totally awesome. I don't think I would ever be able to improve upon RP's parser if not with Ragel.
<yorickpeterse>
What about Bison?
<whitequark>
I'm going to incorporate it within Foundry as some sort of syntax.
<whitequark>
yorickpeterse: wat?
<whitequark>
ragel is for lexers, bison is for parsers.
marr has quit [Ping timeout: 264 seconds]
<yorickpeterse>
oh?
<yorickpeterse>
I thought they both were for both
<whitequark>
no.
<yorickpeterse>
So then what are you using as a parser?
<whitequark>
bison is an LR(1) state machine generator
<judofyr>
you often use Bison with Lex (right?)
<whitequark>
ragel is a generic state machine generator
<whitequark>
judofyr: Bison with Flex, yes. or Yacc with Lex.
<whitequark>
gnu/unix
<judofyr>
Flex was it
mistym has joined #ruby-lang
punchfac_ has quit [Ping timeout: 240 seconds]
<whitequark>
ragel can do parsers, but it isn't really suited for them.
<whitequark>
but for lexers it truly shines.
davidbalber|away is now known as davidbalbert
chendo_ has joined #ruby-lang
<yorickpeterse>
So your ruby_parser port still uses a pure Ruby parser?
<whitequark>
I can just throw whatever's on my mind on it, and let it compute arbitrary length lookahead, arbitrary submachine compositions, or whatnot.
<whitequark>
yorickpeterse: sure, why would I make it non-pure-Ruby?
<yorickpeterse>
I meant as in, the existing parser being used
<yorickpeterse>
which was pure Ruby I believe
<whitequark>
well it had pure ruby parser and pure ruby lexer
slyphon has joined #ruby-lang
<whitequark>
I'm rewriting the lexer from scratch and leaving the parser mostly as it is
<whitequark>
the ragel lexer is pure ruby too.
<yorickpeterse>
well yeah, the end generated code is
<whitequark>
I wonder if I could integrate Ragel in Foundry
<whitequark>
as a syntactic extension
Gaelan has joined #ruby-lang
<yorickpeterse>
You know what you should do? Release a Gem called ActiveRagel
<whitequark>
UGH
<whitequark>
go away
<yorickpeterse>
and provide a Rails based DSL for Ragel
<yorickpeterse>
so you can do less in more code
<yorickpeterse>
and be totally DRY
<judofyr>
ActiveRagel::Consern
* whitequark
slaps yorickpeterse around a bit with a large trout
<judofyr>
Concern*
nertzy2 has joined #ruby-lang
<yorickpeterse>
whitequark: but dude, you can totally speak on Euruko about that. Think of the awesomeness: "Hi, my name is whitequark and this is ActiveRagel"
<yorickpeterse>
"it also needs to be restarted every 10 seconds"
<whitequark>
yorickpeterse: "... Also, fuck you."
<whitequark>
to keep it classy.
<yorickpeterse>
make a dongle joke
* yorickpeterse
runs
sailias has joined #ruby-lang
<whitequark>
is it bad if I decompose the source to an array of unicode codepoints prior to running ragel machine over it?..
dhruvasagar has quit [Ping timeout: 245 seconds]
<whitequark>
not sure, probably that has a hefty performance cost
<eval-in>
whitequark => /tmp/execpad-26d6cae007f7/source-26d6cae007f7:2:in `<main>': undefined local variable or method `b' for main:Object (NameError) (http://eval.in/13702)
<whitequark>
how does that ever work
idkazuma has quit [Remote host closed the connection]
<judofyr>
why shouldn't that work? :S
<mfn>
Is there a gem which provides a bin/ to convert .md to html?
<judofyr>
mfn: redcarpet
<whitequark>
judofyr: because b: is syntax for labels
<judofyr>
mfn: or you can use Tilt + any of the Markdown engines that Tilt supports
<whitequark>
and there are some rules to distinguish one from the another which I could only call "heuristics", at best
Banistergalaxy has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby-lang
punchfac_ has quit [Ping timeout: 245 seconds]
<yorickpeterse>
whitequark: come move to glorious Netherlands, enjoy our women
<yorickpeterse>
very naice
<yorickpeterse>
yekshesomething
io_syl has joined #ruby-lang
punchfacechamp has joined #ruby-lang
sebastia_ has quit [Ping timeout: 252 seconds]
bantic has joined #ruby-lang
voker57_ has left #ruby-lang [#ruby-lang]
<whitequark>
yorickpeterse: wat
<yorickpeterse>
Borat?
ottbot has joined #ruby-lang
breakingthings has joined #ruby-lang
punchfacechamp has quit [Read error: Connection reset by peer]
punchfac_ has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
lele|w has quit [Read error: Operation timed out]
lele|w has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
MaddinXx_ has quit [Remote host closed the connection]
punchfac_ has quit [Read error: Connection reset by peer]
punchfacechamp has joined #ruby-lang
rippa has joined #ruby-lang
runeb- has joined #ruby-lang
runeb has quit [Read error: Connection reset by peer]
runeb- is now known as runeb
carloslopes has quit [Remote host closed the connection]
<yorickpeterse>
So recently there have been some discussions going about either garbage collecting Symbols or making them the same as Strings
<yorickpeterse>
Still not sure what I think of that
<whitequark>
yorickpeterse: this is at least fourth time which I remember
<yorickpeterse>
heh
<whitequark>
the first does not make sense from implementation POV, the second from semantics POV
<kith>
is cinch pure ruby? can i run it on jruby?
<yorickpeterse>
kith: former, yes
<whitequark>
kith: #cinch but afaik yes
<yorickpeterse>
second, ask dominikh
punchfacechamp has quit [Read error: Operation timed out]
<yorickpeterse>
whitequark: it seems the common argument for it is "Oh it's easy, you can do this!" and "Implementation details should not leak into the end design" (or something like that)
<mfn>
er ... guys, thank you very much for your elaborate helps :p
<yorickpeterse>
it makes me angry, but I can't really properly explain why it's stupid other than "it's stupid"
dhruvasagar has joined #ruby-lang
adambeynon has joined #ruby-lang
punchfacechamp has joined #ruby-lang
GarethAdams has joined #ruby-lang
<whitequark>
yorickpeterse: because it's not an implementation detail
schroedinbug has quit [Ping timeout: 255 seconds]
<whitequark>
a symbol signifies an element of AST. it's a literal something.
<whitequark>
there is a reason you can express every possible valid method name as a symbol, without quotes
<yorickpeterse>
"BUT THEN MAKE THEM THE SAME AS STRINGS!!!"
<yorickpeterse>
I gave up on that discussion after I realized I can't explain it
idkazuma has quit [Remote host closed the connection]
<whitequark>
I have this feature request in my backlog
<whitequark>
to submit to ruby
<whitequark>
:f.writer # => :f=
<yorickpeterse>
eh?
<yorickpeterse>
wouldn't that be :f.setter
<yorickpeterse>
* shouldn't
<whitequark>
sure
<judofyr>
I think I've seen that request somewhere else
<judofyr>
maybe we discussed it here…
<whitequark>
yes
<whitequark>
I haven't had time to submit it properly
<yorickpeterse>
pff, slacker
<kith>
yorickpeterse whitequark thx
lcdhoffman has joined #ruby-lang
punchfac_ has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
punchfacechamp has quit [Ping timeout: 264 seconds]
Banistergalaxy has joined #ruby-lang
punchfac_ has quit [Read error: Connection reset by peer]
<flujan>
hello guys, I have a ruby script that uses active record to connect to the database.
Uranio has joined #ruby-lang
<flujan>
I need to preload a lot of ruby classes. I have a require that is about 200 classes.
kurko_ has joined #ruby-lang
Gaelan has quit [Ping timeout: 245 seconds]
<flujan>
there is some way to optimise it?
Gaelan has joined #ruby-lang
solars has quit [Ping timeout: 256 seconds]
<flujan>
inside a rails app, it is not a problem I just start it takes 20 seconds and it is fine, on this scripts, it is not possible…
sepp2k has quit [Quit: Leaving.]
chris2 has quit [Ping timeout: 256 seconds]
volov has quit [Remote host closed the connection]
volov has joined #ruby-lang
<flujan>
the script interacts a lot with stdin/stdout…
volov_ has joined #ruby-lang
volov has quit [Ping timeout: 264 seconds]
volov_ has quit [Remote host closed the connection]
jfelchner has joined #ruby-lang
volov has joined #ruby-lang
maxmanders has quit [Quit: Computer has gone to sleep.]
maxmanders has joined #ruby-lang
nXqd has quit [Ping timeout: 252 seconds]
volov has quit [Ping timeout: 264 seconds]
stef_204 has quit [Quit: quitting]
mistym_lunch is now known as mistym
flujan has left #ruby-lang [#ruby-lang]
tenderlove has quit [Remote host closed the connection]
kurko_ has quit [Ping timeout: 252 seconds]
<yorickpeterse>
Are all those 200 files needed?
Gruu_ has joined #ruby-lang
swav has quit [Remote host closed the connection]
swav has joined #ruby-lang
pkrnj has joined #ruby-lang
swav has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 264 seconds]
sepp2k has joined #ruby-lang
kurko_ has joined #ruby-lang
Uranio has quit [Remote host closed the connection]
Gruu_ has quit [Quit: Gruu_]
Gaelan has quit [Read error: Connection reset by peer]
Gaelan has joined #ruby-lang
imperator has joined #ruby-lang
leocassarani has joined #ruby-lang
leocassarani has joined #ruby-lang
leocassarani has quit [Changing host]
leocassarani has left #ruby-lang [#ruby-lang]
codewrangler has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
bluepojo has joined #ruby-lang
nXqd has joined #ruby-lang
<injekt>
why are there 200 classes
codewrangler has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
bluepojo has quit [Remote host closed the connection]
<yorickpeterse>
ActiveSupport::BecauseFuckYou
<yorickpeterse>
ok I'm done now
<yxhuvud>
200 classes for a rails app doesn't seem that much to me. I think we are up to some 500 or so, and we are only 1.5 people working full time on that part of the stack. (most models have no logic at all except validations and relations)
<injekt>
right this isn't a rails app though
Aiur has quit [Quit: Computer has gone to sleep.]
<injekt>
which is why I questioned it
<injekt>
I assumed he meant 200 of their own classes, not including ActiveRecord
realDAB has quit [Quit: realDAB]
<injekt>
"inside a rails app, it is not a problem"
<breakingthings>
I gotta say, if you've got 500 classes in a Rails app that's one scary hell of a problem
<zzak>
doesnt rails have an preloader?
<injekt>
zeus, spring yeah
<injekt>
breakingthings: uh what, 500 classes? I have way more than that in my work rails app
<injekt>
if you include rails itself
<injekt>
and its deps
<breakingthings>
not including rails
<injekt>
and 46 installed gems
<yorickpeterse>
require'ing 500 files in itself shouldn't be a huge issue
<yorickpeterse>
as long as said files don't do a fuckton of automagic
<injekt>
haha
<injekt>
this is ruby
<injekt>
c'mon yorickpeterse
<breakingthings>
why would one even mention how many classes that rails itself has
<injekt>
breakingthings: My work app has at least 45 gems, I dont think I'm far from that limit with just those
<injekt>
and I have about 30 models
<whitequark>
mine has about 210
<whitequark>
and growing
<yorickpeterse>
is this the new uptime penis thing?
<injekt>
whitequark: models?
<whitequark>
injekt: gems
<injekt>
yorickpeterse: yes
<breakingthings>
injekt: '30 models' is the more reasonable bit I was asking about
<injekt>
whitequark: ah, dang..
<injekt>
breakingthings: ah ok
<yorickpeterse>
injekt: k, let me get my other laptop
<whitequark>
injekt: YES
<injekt>
yorickpeterse: :D
<breakingthings>
when you say 'I have 500 classes' I immediately go to thinking you said 'I made 500 classes'
<injekt>
whitequark: I would like to see that gemfile
<whitequark>
injekt: also 71 model
<breakingthings>
obviously no need to mention how many classes rails include
<whitequark>
hrm
<injekt>
breakingthings: ah well yeah, that's a lot.. but if you include models, controllers, services, view models? (gah) other kinds of classes, it's probably close
<injekt>
whitequark: that's a big app
<injekt>
well, potentially
<whitequark>
injekt: here you are your 640 line Gemfile.lock
<yorickpeterse>
apparently we have 78 classes in one of our projects
<yxhuvud>
heh. I think we are up to roughly 200 classes in the model directory and subdirectories.. but then our system is made to configure a system that can talk roughly every protocol made under the sun (and some in hell) both upstream and downstream
<injekt>
ahh I Wasn't including deps of gems
chris2 has joined #ruby-lang
<whitequark>
ah sure
<injekt>
still my gemfile.lock is around 400 lines
<injekt>
so yours is still much larger
<injekt>
lots of cap stuff, I dont touch that
lcdhoffman has quit [Quit: lcdhoffman]
<whitequark>
injekt: it notifies campfire, tags in git, etc
<whitequark>
useful
<injekt>
whitequark: what's the migration count right now? :)
<injekt>
388 here
<yorickpeterse>
so far my best addition to our Campfire: `hubot maru me`
<whitequark>
injekt: 359
<whitequark>
awww yours is longer
flujan has joined #ruby-lang
<injekt>
yeah I am fickle
<breakingthings>
injekt: I can see like 200 classes… in a large application… but boy if you have 500 classes I feel like you must be trying to stuff all of google into a single rails app
<injekt>
breakingthings: :D
<whitequark>
injekt: actually this project is 6300 KLOC
<injekt>
whitequark: that's not so bad
<whitequark>
er 6300 LOC
<whitequark>
yeah
<whitequark>
it's quite a bit though, ruby is pretty dense
<injekt>
yeah
<injekt>
is that from the rails info?
<injekt>
or cloc or something?
<whitequark>
sloccount
pkrnj has quit [Quit: Computer has gone to sleep.]
<injekt>
12527 ruby lines for me
<whitequark>
in app/?
<injekt>
no lib too
<whitequark>
ok that would be 7085 then
<injekt>
in app/ 4944
<whitequark>
that's a huge lib/
<injekt>
ah actually that was including a vendored engine
<yxhuvud>
our weigh in at roughly 23K in app..
<injekt>
which is part of the app
<whitequark>
also let's stop comparing... dongles already
<injekt>
yeah
<injekt>
big apps
<yorickpeterse>
how many forks do you guys have?
<injekt>
(fistpump)
<injekt>
hey lets not get personal
<yorickpeterse>
I think I have literally 3....in my kitchen
<injekt>
I have 8
<whitequark>
why do you guys know the exact count of silverware
<whitequark>
I know I have at least one
<whitequark>
because, well, I eat with it
<injekt>
I just know I bought 2 packs of 4
<injekt>
:/
<whitequark>
actually lemme count them
<yxhuvud>
lets just say that as a project grows some parts of the rails machinery needs to be *very* automated.
<yorickpeterse>
I do have a fuckton of knifes though
<yorickpeterse>
yet I only have again 3 spoons
<injekt>
I have 12 knifes
<yorickpeterse>
at the same time I have two pairs of chopsticks
volov has quit [Remote host closed the connection]
volov has joined #ruby-lang
pr0ton has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
ryanf has quit [Ping timeout: 256 seconds]
pkrnj has joined #ruby-lang
volov_ has joined #ruby-lang
ryanf has joined #ruby-lang
Gaelan has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
Gaelan has joined #ruby-lang
volov has quit [Ping timeout: 264 seconds]
Aiur has joined #ruby-lang
swav has quit [Remote host closed the connection]
Gaelan has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
swav has joined #ruby-lang
swav has quit [Remote host closed the connection]
Gaelan has joined #ruby-lang
maxmanders has joined #ruby-lang
dingus_khan has joined #ruby-lang
s0ber has quit [Read error: Connection reset by peer]
Gaelan has quit [Ping timeout: 255 seconds]
s0ber has joined #ruby-lang
alessio_rocco has quit [Quit: leaving]
alessio_rocco has joined #ruby-lang
<manveru>
Hash[([%i[a b]] * 2).transpose]
<manveru>
:)
<whitequark>
>> a rescue b rescue c
<eval-in>
whitequark => /tmp/execpad-464221016d71/source-464221016d71:2:in `rescue in <main>': undefined local variable or method `c' for main:Object (NameError) ... (http://eval.in/13752)
<whitequark>
but why would you want to do that!
fire has joined #ruby-lang
<apeiros_>
a rescue b if c unless d
davidbalbert is now known as davidbalber|away
security has quit [Ping timeout: 276 seconds]
<manveru>
i have a bunch of foo ? true : false here :(
sailias has quit [Ping timeout: 245 seconds]
alessio_rocco has quit [Client Quit]
<drbrain>
:(
<manveru>
also plenty of foo ? (bar ? true : false) : false
alessio_rocco has joined #ruby-lang
alessio_rocco has quit [Client Quit]
alessio_rocco has joined #ruby-lang
alessio_rocco has quit [Client Quit]
slyphon has quit [Quit: slyphon]
<whitequark>
matz, y u added ternary?!
<whitequark>
y?!!
pioz has joined #ruby-lang
<whitequark>
y?:
francisfish has quit [Ping timeout: 255 seconds]
* apeiros_
likes ternary
realDAB has quit [Quit: realDAB]
<whitequark>
you are officially my mortal enemy now
volov_ has quit [Remote host closed the connection]
<whitequark>
because ugh...
<whitequark>
>> a ? a: a
volov has joined #ruby-lang
<eval-in>
whitequark => /tmp/execpad-fa63588f3b2e/source-fa63588f3b2e:2:in `<main>': undefined local variable or method `a' for main:Object (NameError) (http://eval.in/13753)
pkrnj has quit [Quit: Computer has gone to sleep.]
naquad has joined #ruby-lang
pr0ton has quit [Ping timeout: 256 seconds]
slyphon has joined #ruby-lang
<injekt>
:/
<injekt>
dingus_khan: huh?
<injekt>
dingus_khan: also, Date.leap?(year)
<injekt>
(require 'date')
<dingus_khan>
oh I'm supposed to do it as simply as possible, just a method, but I think I see what you're saying. also, I realized it's returning nil where it should return false, whoops
<injekt>
dingus_khan: yeah, because you don't have an 'else' branch
<injekt>
dingus_khan: if none of those match, it'll return nil