apeiros changed the topic of #ruby-lang to: Ruby 2.2.1; 2.1.5; 2.0.0-p643: https://ruby-lang.org || Paste code on https://gist.github.com
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ascarter has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
dzejrou has quit [Quit: Leaving]
lun_ has quit [Remote host closed the connection]
enebo has joined #ruby-lang
marr has quit [Ping timeout: 246 seconds]
rbowlby has quit []
AlexAltea has quit [Ping timeout: 272 seconds]
Raycaster has joined #ruby-lang
duderonomy has quit [Ping timeout: 252 seconds]
enebo has quit [Quit: enebo]
ffmegaman has quit [Remote host closed the connection]
enebo has joined #ruby-lang
sankaber has joined #ruby-lang
ttilley has quit [Quit: Linkinus - http://linkinus.com]
martinbmadsen has quit [Ping timeout: 256 seconds]
brushbox has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
riotjones has joined #ruby-lang
SylarRuby has joined #ruby-lang
deol has joined #ruby-lang
riotjones has quit [Ping timeout: 252 seconds]
SylarRuby has quit [Ping timeout: 265 seconds]
seank_ has quit [Remote host closed the connection]
Caius has quit [Ping timeout: 276 seconds]
charliesome has joined #ruby-lang
seank_ has joined #ruby-lang
Caius has joined #ruby-lang
djellemah__ has joined #ruby-lang
djellemah_ has quit [Ping timeout: 256 seconds]
bruno- has quit [Ping timeout: 252 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
enebo has quit [Quit: enebo]
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: zzz]
havenwood has quit []
dorei has quit []
ghostpl_ has joined #ruby-lang
roamingdog has joined #ruby-lang
ghostpl_ has quit [Ping timeout: 264 seconds]
mdarby has joined #ruby-lang
tockitj has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
rbowlby has joined #ruby-lang
mdarby has quit [Quit: Textual IRC Client: www.textualapp.com]
havenwood has joined #ruby-lang
yfeldbl__ has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
seank_ has quit [Remote host closed the connection]
tockitj has joined #ruby-lang
b_hoffman has joined #ruby-lang
seank_ has joined #ruby-lang
aef has quit [Remote host closed the connection]
aef has joined #ruby-lang
sankaber has joined #ruby-lang
pwnz0r has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
bruno- has joined #ruby-lang
pwnz0r has quit [Ping timeout: 252 seconds]
centrx has quit [Ping timeout: 248 seconds]
bruno- has quit [Ping timeout: 256 seconds]
b_hoffman has quit [Quit: b_hoffman]
brushbox has quit [Quit: Leaving.]
chouhoulis has quit [Remote host closed the connection]
nedp has joined #ruby-lang
amystephen has quit [Quit: amystephen]
b_hoffman has joined #ruby-lang
symm- has quit [Read error: Connection reset by peer]
symm- has joined #ruby-lang
ffmegaman has joined #ruby-lang
LMity has joined #ruby-lang
nisstyre has quit [Quit: WeeChat 1.1.1]
ffmegaman has quit [Remote host closed the connection]
caseydriscoll has joined #ruby-lang
ffmegaman has joined #ruby-lang
caseydriscoll has quit [Ping timeout: 255 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Miphix has joined #ruby-lang
michael_mbp has quit [Excess Flood]
iamninja has joined #ruby-lang
michael_mbp has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
caseydriscoll has joined #ruby-lang
LMity has quit [Ping timeout: 256 seconds]
gix has quit [Ping timeout: 252 seconds]
roamingdog has joined #ruby-lang
gix has joined #ruby-lang
caseydriscoll has quit [Ping timeout: 256 seconds]
roamingdog has quit [Ping timeout: 250 seconds]
b_hoffman has joined #ruby-lang
callumacrae has quit [Ping timeout: 265 seconds]
darix has quit [Quit: brb]
Sgeo_ has quit [Read error: Connection reset by peer]
callumacrae has joined #ruby-lang
Sgeo has joined #ruby-lang
ffmegaman has quit [Remote host closed the connection]
darix has joined #ruby-lang
Guest57752 has joined #ruby-lang
<Guest57752> hello
bruno- has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
bruno- has quit [Ping timeout: 245 seconds]
jgpawletko has quit [Quit: jgpawletko]
nisstyre has joined #ruby-lang
deol has joined #ruby-lang
jefus has quit [Ping timeout: 272 seconds]
Sirupsen has quit [Quit: Textual IRC Client: www.textualapp.com]
cored has joined #ruby-lang
martinbmadsen has joined #ruby-lang
roamingdog has joined #ruby-lang
roamingdog has quit [Ping timeout: 255 seconds]
jefus has joined #ruby-lang
deol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nisstyre has quit [Changing host]
nisstyre has joined #ruby-lang
roamingdog has joined #ruby-lang
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cored has quit [Ping timeout: 264 seconds]
tsujp has joined #ruby-lang
symm- has quit [Read error: Connection reset by peer]
symm- has joined #ruby-lang
roamingdog has quit []
jefus_ has joined #ruby-lang
duderonomy has joined #ruby-lang
jefus has quit [Ping timeout: 264 seconds]
ffmegaman has joined #ruby-lang
charliesome has quit [Quit: zzz]
charliesome has joined #ruby-lang
tsujp has quit [Read error: No route to host]
tsujp has joined #ruby-lang
rippa has joined #ruby-lang
ffmegaman has quit [Remote host closed the connection]
centrx has joined #ruby-lang
centrx has quit [Client Quit]
amclain has quit [Read error: Connection reset by peer]
Iskarlar has joined #ruby-lang
stardiviner has quit [Ping timeout: 252 seconds]
ffmegaman has joined #ruby-lang
DivineEntity has quit [Quit: leaving]
DivineEntity has joined #ruby-lang
chouhoulis has joined #ruby-lang
chouhoulis has quit [Ping timeout: 250 seconds]
brushbox has joined #ruby-lang
ffmegaman has quit [Remote host closed the connection]
<womble> What the dickens is object ID 12 (with USE_FLONUM, MRI 2.1.2)? I know false is 0, true is 20, nil is 8... But I've got an object in Thread.current.keys whose object ID (according to my debugger) is 12, and (surprise!) it's segfaulting the VM.
<womble> RUBY_SYMBOL_FLAG is 0x0c, so I'm surmising that this is some sort of "null symbol"
<womble> Which is just... perverse.
SylarRuby has joined #ruby-lang
duderonomy has quit [Ping timeout: 248 seconds]
dellavg_ has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
charliesome has quit [Quit: zzz]
Forgetful_Lion has quit [Remote host closed the connection]
<apeiros> womble: doesn't seem to be an always existing object
<apeiros> ObjectSpace._id2ref 12 --> RangeError: 0x0000000000000c is not id value
fclausen has joined #ruby-lang
bruno- has joined #ruby-lang
bantic has joined #ruby-lang
<womble> apeiros: Yeah, looks like requiring sequel, of all things, adds the crazy-nil-symbol-of-doom to Thread.current[:__recursive_key__]
<womble> This is going to be fun to track down.
fclausen has quit [Read error: Connection reset by peer]
bantic has quit [Client Quit]
bruno- has quit [Ping timeout: 252 seconds]
AlexAltea has joined #ruby-lang
brushbox has quit [Quit: Leaving.]
duderonomy has joined #ruby-lang
ffmegaman has joined #ruby-lang
<womble> Ooooh... frame_func_id can return 0, which for an ID is not so cool...
revath has joined #ruby-lang
<womble> At least not if you want to generate a "real" symbol
symm- has quit [Ping timeout: 272 seconds]
SylarRuby has quit [Remote host closed the connection]
symm- has joined #ruby-lang
Raycaster has quit [Read error: Connection reset by peer]
stardiviner has joined #ruby-lang
Raycaster has joined #ruby-lang
ffmegaman has quit [Remote host closed the connection]
ffmegaman has joined #ruby-lang
ffmegaman has quit [Remote host closed the connection]
ffmegaman has joined #ruby-lang
relix has joined #ruby-lang
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GBrawl has joined #ruby-lang
dagda1 has joined #ruby-lang
ffmegaman has quit [Remote host closed the connection]
ffmegaman has joined #ruby-lang
tsujp has quit [Quit: tsujp is snoozing]
tsujp has joined #ruby-lang
tsujp has quit [Client Quit]
ffmegaman has quit [Ping timeout: 256 seconds]
revath has quit [Ping timeout: 250 seconds]
LMity has joined #ruby-lang
revath has joined #ruby-lang
michael_mbp has quit [Excess Flood]
ffmegaman has joined #ruby-lang
michael_mbp has joined #ruby-lang
GBrawl has quit [Quit: (null)]
caseydriscoll has joined #ruby-lang
revath has quit [Ping timeout: 264 seconds]
caseydriscoll has quit [Ping timeout: 252 seconds]
ledestin has joined #ruby-lang
ffmegaman has quit [Remote host closed the connection]
ffmegaman has joined #ruby-lang
ffmegaman has quit [Remote host closed the connection]
ffmegaman has joined #ruby-lang
ffmegaman has quit [Ping timeout: 272 seconds]
rbowlby has quit [Remote host closed the connection]
elia has joined #ruby-lang
cornerma1 has joined #ruby-lang
cornerman has quit [Ping timeout: 252 seconds]
cornerma1 is now known as cornerman
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dagda1 has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
SylarRuby has joined #ruby-lang
leat has quit [Ping timeout: 256 seconds]
LMity has quit [Ping timeout: 255 seconds]
bruno- has joined #ruby-lang
brushbox has joined #ruby-lang
leat has joined #ruby-lang
bruno- has quit [Ping timeout: 256 seconds]
brushbox has quit [Ping timeout: 252 seconds]
elia has joined #ruby-lang
elia has quit [Client Quit]
tockitj has quit [Ping timeout: 272 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
caseydriscoll has joined #ruby-lang
ffmegaman has joined #ruby-lang
brushbox has joined #ruby-lang
symm- has quit [Quit: Leaving...]
sarkyniin has joined #ruby-lang
Sirupsen has joined #ruby-lang
Sirupsen has quit [Remote host closed the connection]
Sirupsen has joined #ruby-lang
nedp has quit [Read error: Connection reset by peer]
bruno- has joined #ruby-lang
stef204 has joined #ruby-lang
matti has quit [Quit: Oh dear...]
lun_ has joined #ruby-lang
lun_ has quit [Read error: Connection reset by peer]
ruby-lang468 has joined #ruby-lang
funnel has quit [Remote host closed the connection]
ruby-lang468 has quit [Ping timeout: 246 seconds]
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
martinbmadsen has quit [Ping timeout: 265 seconds]
funnel has joined #ruby-lang
brushbox has quit [Quit: Leaving.]
davispuh has joined #ruby-lang
elia has joined #ruby-lang
kfpratt has joined #ruby-lang
stef204 has quit [Ping timeout: 252 seconds]
chouhoulis has joined #ruby-lang
charliesome has joined #ruby-lang
Iskarlar_ has joined #ruby-lang
Iskarlar has quit [Ping timeout: 248 seconds]
martinbmadsen has joined #ruby-lang
solars has joined #ruby-lang
martinbmadsen has quit [Ping timeout: 250 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Bertg has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
riotjones has joined #ruby-lang
caseydriscoll has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
riotjones has quit [Ping timeout: 265 seconds]
ttilley has joined #ruby-lang
ttilley has quit [Changing host]
ttilley has joined #ruby-lang
amystephen has joined #ruby-lang
Iskarlar has joined #ruby-lang
sarkyniin has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
kfpratt has quit [Remote host closed the connection]
Iskarlar_ has quit [Ping timeout: 252 seconds]
Bertg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Bertg has joined #ruby-lang
Bertg has quit [Client Quit]
Xzyx987X_ has quit [Read error: Connection reset by peer]
Xzyx987X_ has joined #ruby-lang
Raycaster1 has joined #ruby-lang
the_real_intinig has joined #ruby-lang
Raycaster has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby-lang
the_real_intinig has quit [Read error: Connection reset by peer]
the_real_intinig has joined #ruby-lang
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby-lang
arBmind1 has quit [Quit: Leaving.]
the_real_intinig has quit [Remote host closed the connection]
the_real_intinig has joined #ruby-lang
dzejrou has joined #ruby-lang
jgpawletko has joined #ruby-lang
the_real_intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
dzejrou has quit [Read error: Connection reset by peer]
SylarRuby has quit [Remote host closed the connection]
intinig has quit []
Bertg has joined #ruby-lang
nuy_19031046 has joined #ruby-lang
silkfox has joined #ruby-lang
nuy_19031046 has quit [Max SendQ exceeded]
nuy_19031046 has joined #ruby-lang
red_menace has joined #ruby-lang
nuy_19031046 has quit [Max SendQ exceeded]
dzejrou has joined #ruby-lang
nuy_19031046 has joined #ruby-lang
wicope has joined #ruby-lang
stef204 has joined #ruby-lang
nuy_19031046 has quit [Max SendQ exceeded]
nuy_19031046 has joined #ruby-lang
nuy_19031046 has quit [Max SendQ exceeded]
Sirupsen has joined #ruby-lang
stardiviner has quit [Quit: Weird in coding now, or make love, only two things push me away from IRC.]
shinnya has quit [Ping timeout: 272 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest57752 has quit [Quit: Leaving]
wicope has quit [Quit: Leaving]
ascarter has joined #ruby-lang
enebo has joined #ruby-lang
sarkyniin has joined #ruby-lang
Sirupsen has quit [Quit: Textual IRC Client: www.textualapp.com]
Sirupse__ has joined #ruby-lang
Sirupse__ has quit [Client Quit]
rippa has joined #ruby-lang
enebo has quit [Ping timeout: 256 seconds]
solars has quit [Ping timeout: 272 seconds]
charliesome has quit [Quit: zzz]
Mon_Ouie has quit [Ping timeout: 256 seconds]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dagda1 has joined #ruby-lang
jds has joined #ruby-lang
fusillicode1 has joined #ruby-lang
fusillicode has quit [Ping timeout: 264 seconds]
fusillicode1 has quit [Read error: Connection reset by peer]
Sirupsen has joined #ruby-lang
Sirupsen has quit [Client Quit]
Sirupsen has joined #ruby-lang
silkfox has quit [Ping timeout: 272 seconds]
fusillicode1 has joined #ruby-lang
fusillicode1 has quit [Client Quit]
fusillicode has joined #ruby-lang
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dellavg_ has quit [Ping timeout: 264 seconds]
arBmind has joined #ruby-lang
shinnya has joined #ruby-lang
Bertg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
dagda1 has joined #ruby-lang
lytol has joined #ruby-lang
lytol_ has joined #ruby-lang
wicope has joined #ruby-lang
Bertg has joined #ruby-lang
lytol has quit [Ping timeout: 256 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghostpl_ has joined #ruby-lang
jefus__ has joined #ruby-lang
jefus_ has quit [Ping timeout: 246 seconds]
rgb-one has joined #ruby-lang
LMity has joined #ruby-lang
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
stef204 has joined #ruby-lang
centrx has joined #ruby-lang
sankaber has joined #ruby-lang
riotjones has joined #ruby-lang
amclain has joined #ruby-lang
LMity has quit [Ping timeout: 250 seconds]
sankaber has quit [Ping timeout: 246 seconds]
riotjones has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby-lang
SylarRuby has joined #ruby-lang
roamingdog has joined #ruby-lang
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dagda1 has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
<karma_> Having a small issue with ruby and datamapper
<karma_> I have a 1 to many association and I can get all my schedules by simply asking for them, i.e rooms.schedules
<karma_> What I get then is all the columns from schedules, and none from rooms
<karma_> Can I somehow get columns from rooms as well?
dagda1 has quit [Read error: No route to host]
<karma_> I can do this in MySQL, I just figured you could do it some fancy way in DM
dagda1 has joined #ruby-lang
banister has joined #ruby-lang
<centrx> karma_, If you access myschedule.room it probably has each one
<karma_> hmm, could you explain a bit more?
<centrx> karma_, I'm not really familiar with Datamapper anymore. It's quite old and unmaintained
dzejrou has quit [Read error: Connection reset by peer]
<karma_> Do I just reverse the question?
<centrx> karma_, What's your real goal? You want a result set that has rooms joined to schedules?
<centrx> with all columns
<karma_> yes
<karma_> And I just get the one column, schedules
<karma_> I would like it to also include my rooms table
<karma_> I have data there
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<karma_> hmm, I might be just packaging it poorly
<centrx> karma_, It looks like you can do something like rooms.schedules.map { |s| s + s.room }
<karma_> I just make it into a json
<karma_> and that might be the issue
<karma_> I can indeed get the data like om SO if I do it like that
<karma_> thanks for the help centrx
dagda1 has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tharindu has joined #ruby-lang
chinmay_dd has joined #ruby-lang
wicope has quit [Remote host closed the connection]
[H]unt3r has joined #ruby-lang
cpt_yossarian has quit [Read error: Connection reset by peer]
deol has joined #ruby-lang
tockitj has joined #ruby-lang
tockitj has quit [Changing host]
tockitj has joined #ruby-lang
silkfox has joined #ruby-lang
cpt_yossarian has joined #ruby-lang
dellavg_ has joined #ruby-lang
kfpratt has joined #ruby-lang
silkfox has quit [Ping timeout: 252 seconds]
spuk has quit [Ping timeout: 245 seconds]
Iskarlar has joined #ruby-lang
sdogruyol has joined #ruby-lang
dzejrou has joined #ruby-lang
dellavg_ has quit [Ping timeout: 264 seconds]
sdogruyol has quit [Client Quit]
sankaber has joined #ruby-lang
lytol_ has quit [Remote host closed the connection]
kfpratt has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kfpratt has joined #ruby-lang
lytol has joined #ruby-lang
davispuh has quit [Remote host closed the connection]
dzejrou has quit [Read error: Connection reset by peer]
roamingdog has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
kfpratt has quit [Remote host closed the connection]
lytol has quit []
roamingdog has joined #ruby-lang
dzejrou has joined #ruby-lang
silkfox has joined #ruby-lang
Bertg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
silkfox has quit [Ping timeout: 246 seconds]
sankaber has quit [Ping timeout: 248 seconds]
relix has joined #ruby-lang
sankaber has joined #ruby-lang
chinmay_dd has quit [Quit: Leaving]
ffmegaman has quit [Ping timeout: 264 seconds]
[H]unt3r has quit [Quit: Leaving]
centrx has quit [Quit: Shutting down, Please wait...]
tharindu_ has joined #ruby-lang
martinbmadsen has joined #ruby-lang
tharindu has quit [Ping timeout: 245 seconds]
martinbmadsen has quit [Ping timeout: 244 seconds]
centrx has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby-lang
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dagda1 has joined #ruby-lang
tharindu_ has quit [Ping timeout: 245 seconds]
wicope has joined #ruby-lang
deol has quit [Quit: Textual IRC Client: www.textualapp.com]
deol has joined #ruby-lang
deol has quit [Client Quit]
spuk has joined #ruby-lang
michael_mbp has quit [Excess Flood]
apt-get_ has joined #ruby-lang
michael_mbp has joined #ruby-lang
Eising has quit [Quit: Changing server]
sarkyniin has quit [Ping timeout: 250 seconds]
sankaber has quit [Ping timeout: 252 seconds]
rgb-one has quit [Ping timeout: 245 seconds]
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
martinbmadsen has joined #ruby-lang
dellavg_ has joined #ruby-lang
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
riotjones has joined #ruby-lang
itstooloud has joined #ruby-lang
riotjones has quit [Ping timeout: 264 seconds]
dagda1 has joined #ruby-lang
robmiller has joined #ruby-lang
<itstooloud> I have to figure out a YAML dump for a Ruby program I wrote (Hangman) which at the moment has two separate classes, Player and Game. Player has instance variables of name, guesses, and misses; Game has IVs of word and player. The game is played in a separate function. What's the best way to dump both classes of data so they can be reloaded? Every example I can find online is dumping one class
matp_ has joined #ruby-lang
matp has quit [Ping timeout: 272 seconds]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<itstooloud> Never mind. I created a third class and dumped the other two into it. LIKE A BOSS
zenspider has quit [Ping timeout: 246 seconds]
<centrx> impressive
zenspider has joined #ruby-lang
Iskarlar has joined #ruby-lang
ghostpl_ has quit [Remote host closed the connection]
Eising has joined #ruby-lang
brushbox has joined #ruby-lang
spuk has quit [Ping timeout: 264 seconds]
elia has joined #ruby-lang
spuk has joined #ruby-lang
LMity has joined #ruby-lang
chouhoulis has quit [Remote host closed the connection]
<itstooloud> why do something simply when you can do it with 20 or 30 extra lines
gchristensen has left #ruby-lang ["WeeChat 0.4.2"]
dagda1 has joined #ruby-lang
matp_ is now known as matp
brushbox has quit [Ping timeout: 265 seconds]
deol has joined #ruby-lang
SylarRuby has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
silkfox has joined #ruby-lang
apt-get_ has quit [Ping timeout: 252 seconds]
silkfox has quit [Ping timeout: 264 seconds]
jefus__ has quit [Ping timeout: 265 seconds]
relix has joined #ruby-lang
ffmegaman has joined #ruby-lang
ffmegaman has quit [Client Quit]
spuk has quit [Ping timeout: 250 seconds]
spuk has joined #ruby-lang
unreal has quit [Ping timeout: 245 seconds]
dorei has joined #ruby-lang
unreal has joined #ruby-lang
marr has joined #ruby-lang
martinbmadsen has quit [Ping timeout: 272 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<itstooloud> OK I'm back. Seems like there's something really fundamental I'm not understanding about YAML, namely how to make it do the one thing for which it's intended. I'm pretty sure its most basic function is to re-instantiate a program with stored instance variables from a previous session. Why can't I just load the file and it already knows where to put the information? Documentation is poor. I see examples where the YAML data is load
<itstooloud> into an array…? But then what? You have to parse the array and reassign everything inside your program?
<itstooloud> why bother exporting everything in a tree structure if you have to unweave the whole thing to understand it
<centrx> YAML is a data storage format, used for many things
<centrx> Marshal might work better for storing Ruby objects
<itstooloud> I'm sorry, i mean in this case to use it for serialization of a crappy little program
<itstooloud> Should I give up on using YAML? Just trying to understand it
<centrx> You want to have a clean storage interface, that stores a well-defined set of variables
caseydriscoll has quit [Remote host closed the connection]
<centrx> Not just "everything that's running at this time", you can get very expansive, you could store the entire memory state, like OS Hibernation does
roamingdog has quit [Remote host closed the connection]
<centrx> It's not a significant performance cost compared to reading a file off the disk
<itstooloud> I have two classes of data. I'm not worried about performance issues; I'm just trying to learn
<itstooloud> it's a tiny little Hangman game
<centrx> For example, what happens if you rename one of your variables
<centrx> in the code, does all your save data become obsolete?
<centrx> Or what is the point of saving some random variable that's necessary for running the program, but not necessary for restoring a saved state/game
<centrx> and ultimately, your game state might just be in a Hash anyway
<itstooloud> I will worry more about writing optimized code once I can understand the basic concept. I'm a beginner
<centrx> You can serialize that Hash into a file, or a database, or over the network, with YAML, or JSON, or XML or other formats
centrx has quit [Remote host closed the connection]
<womble> itstooloud: Step one: write a minimal program which demonstrates the problem you're having.
centrx has joined #ruby-lang
<itstooloud> Yes thanks, I'm in the middle of that
caseydriscoll has joined #ruby-lang
<itstooloud> I mean, it exists, it doesn't do the thing I want it to do
<womble> So show it to the rest of us, and we can see what you're doing wrong.
<centrx> Do we have to sign an NDA to see your Hangman game
<womble> centrx: We don't want to get tied up in paperwork...
<itstooloud> it's a pretty awful hangman game but it works
<itstooloud> this is just trying to figure out how to load yaml
<womble> itstooloud: Can I run that, as-is, and see the problem you're having?
<itstooloud> well it won't do anything
<womble> Well, that's going to make it hard to help.
havenwood has quit [Remote host closed the connection]
<itstooloud> I want to be able to stop the program and store the state of class Serialize, then reload it when the program is opened, and have it repopulate class Person and class This
dellavg_ has quit [Ping timeout: 264 seconds]
<womble> That's a minimal example of how to save/load YAML
<womble> You'll note that it creates a second instance of Foo, from the serialised YAML.
<womble> Also, if you're going to load YAML from a file, just use YAML.load_file, you don't need to read the file yourself.
jwaldrip has joined #ruby-lang
pothibo has joined #ruby-lang
riotjones has joined #ruby-lang
dzejrou has quit [Quit: Leaving]
<itstooloud> I def need to load it from a file. I don't understand how to do that and re-instantiate everything
roamingdog has joined #ruby-lang
<womble> itstooloud: See my example.
<itstooloud> yes, thanks, but that's only storing YAML data in a variable
<womble> It's storing YAML data in a string. Which is the same data type you read/write from/to files.
roamingdog has quit [Client Quit]
<womble> https://gist.github.com/mpalmer/c08c27d2852f7b6655ab -- there, to/from a file.
riotjones has quit [Ping timeout: 264 seconds]
chouhoulis has joined #ruby-lang
ghostpl_ has joined #ruby-lang
sankaber has joined #ruby-lang
<itstooloud> OK thanks but then imagine I want to use the value in the YAML file while running my program. Why doesn't this work?
<itstooloud> oops that's a type
<itstooloud> typo
<itstooloud> it does work, lol
chouhoulis has quit [Ping timeout: 250 seconds]
<itstooloud> i mean with the last line corrected to puts x.bar
<itstooloud> but if i've got a huge file with several classes and each with several instance variables, surely I don't have to parse each of those things and reassign them ?
womble has quit [Excess Flood]
womble has joined #ruby-lang
LMity has quit [Ping timeout: 256 seconds]
ghostpl_ has quit [Ping timeout: 255 seconds]
nedp has joined #ruby-lang
LMity has joined #ruby-lang
rgb-one has joined #ruby-lang
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby-lang
pothibo has quit [Quit: pothibo]
cornerma1 has joined #ruby-lang
itstooloud has quit [Quit: itstooloud]
cornerman has quit [Ping timeout: 264 seconds]
cornerma1 is now known as cornerman
elia has quit [Quit: Computer has gone to sleep.]
martinbmadsen has joined #ruby-lang
AlexAltea has quit [Ping timeout: 272 seconds]
ArchRogem has joined #ruby-lang
martinbmadsen has quit [Ping timeout: 246 seconds]
LMity has quit [Ping timeout: 255 seconds]
havenwood has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sankaber has joined #ruby-lang
wicope has quit [Read error: Connection reset by peer]
brushbox has joined #ruby-lang
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Iskarlar_ has joined #ruby-lang
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ArchRogem has quit [Quit: Textual IRC Client: www.textualapp.com]
Iskarlar has quit [Ping timeout: 250 seconds]
Iskarlar has joined #ruby-lang
ttilley has quit [Quit: Leaving...]
ttilley has joined #ruby-lang
ttilley has quit [Changing host]
ttilley has joined #ruby-lang
Iskarlar_ has quit [Ping timeout: 252 seconds]
rgb-one has quit [Remote host closed the connection]
charliesome has joined #ruby-lang
arBmind has quit [Ping timeout: 256 seconds]
arBmind has joined #ruby-lang
kfpratt has joined #ruby-lang
charliesome has quit [Quit: zzz]
charliesome has joined #ruby-lang
charliesome has quit [Quit: zzz]
keltim has joined #ruby-lang
<keltim> I'm not a ruby dev (sysadmin) but I am compiling and was thinking for isolation purposes, and the constant insance release cycle of amazon linux, that statically compiling our ruby might be an idea worth a look since it's nearly impossible to keep up with their cycle and I'd greatly prefer the lib versions ruby is compiled against to never change .. is this worth doing, or stupid, or what?
<darix> keltim: you can not do a fully static build anywa
<darix> anyway
<keltim> ah ok
<havenwood> keltim: here are some statically linked builds for amazon: https://rvm.io/binaries/amazon/2013.03/x86_64/
<darix> keltim: on which distro is amazonlinux based?
<darix> probably some centos?
<keltim> havenwood, hm, those are old .. the 1.9 has a security problem
<keltim> darix, unfortunately not an option at the moment. I'd love to get off AZ Linux though
kfpratt has quit [Remote host closed the connection]
<darix> keltim: naw. my point was ... if it is based on centos you could just use e.g. https://build.opensuse.org/ to build packages for your systems
<havenwood> keltim: I'm not sure why the amazonlinux rubies aren't automatically updating along with the others.
<darix> and then just deploy those packages
<havenwood> keltim: I guess they need to be added to the vagrant boxes: https://github.com/rvm/rvm-binary
<keltim> havenwood, we don't use the system ruby that comes with amazon, I suppose we could, but I hate using gem to install gems into /usr, which would be a necessity .. I like to keep /usr for the distro only
<darix> keltim: you can set a different gem home
<darix> and then it installs the gems there
<keltim> sounds like a better solution .. with the system ruby we still get security updates
<darix> :)
<havenwood> keltim: You could use Traveling Ruby for the dynamic linking route, or ask jgifford to update amazonlinux static ruby builds.
<havenwood> keltim: there's a `--user-install` gem install argument
<keltim> is setting gem home a straightforward thing to do? any docs on configuring that which are official?
<havenwood> keltim: you can add it to your ~/.gemrc
<havenwood> keltim: gem help install
<keltim> ok thank you all
<havenwood> keltim: no prob
<darix> keltim: you can even set it in /etc/gemrc
<darix> if you want it for all users
<keltim> our devs would gladly blast stuff into /usr that doesn't belong there :/
<keltim> it is for all users, or rather our stack
riotjones has joined #ruby-lang
tharindu has joined #ruby-lang
<darix> keltim: i am one of the weirdos that favors distro packages over plain "gem install"
<darix> ^^
<keltim> darix, oh I invariably do
<keltim> darix, but we have version requirements and all that mess
<darix> keltim: and?
charliesome has joined #ruby-lang
<darix> keltim: i have packages for discourse done, gitlab nearly done, and redmine in the queue
<keltim> ah shit ... if I use amazons ruby it might get pulled out from under my feet in 6 months, they might drop ruby1.9 and 1.8
<darix> just to give you an idea
<darix> keltim: unless you let the updates installed blindly
<darix> you will still see the drop of 1.8 or 1.9 coming and can change.