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…]
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
<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 ?
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
<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.