<Bish>
l33n: something you write into a file has to be of type string what you create with map is an array
<Bish>
add a .to_json add the end of .map {..}
doublemalt_ has quit [Ping timeout: 244 seconds]
<l33n>
ok
<l33n>
well it worked before i added the +
<l33n>
+ "The text is #{data_hash["text"]}")
<johnzorn>
Bish, this is an example of 1000 mile away error: NameError: uninitialized constant Addressable::URI::Generic
<Bish>
well, my guess is the constant was not intialized
<johnzorn>
Bish, it's obviously from using Addressable::URI:heuristic_parse but I don't know how to fix it
<Bish>
that doesn't make the error message miles away
mustmodify has joined #ruby
<mustmodify>
Is there a way for an anonymous class to know it's own name? Obviously I'd have to add something but what I have that is not working is: `animal = Class.new(Beast); animal.new.class.name.should == 'Animal'
kimegede has joined #ruby
<mustmodify>
I ask because I'd like to use it for unit testing, so I don't have to create a new class name every time and remember all the ones I've already created.
l33n has quit [Quit: Leaving]
<johnzorn>
Bish, I didn't add/nor am I trying to use ::Generic, and yet I have this error. I have no idea the line that is causing the error. That's what makes it 1000 miles away.
<Bish>
the library you're using is trying to use ::Generic, not you
l33n has joined #ruby
<l33n>
Bish, how to make it so .map to index returns just the text, with the .to_json there is still brackets around the quoted text
aryaching has quit [Ping timeout: 250 seconds]
kimegede has quit [Ping timeout: 268 seconds]
JimK12 has joined #ruby
jcao219 has quit [Ping timeout: 246 seconds]
<gr33n7007h>
l33n: what is it you are trying to achieve?
<l33n>
i want it to write to file the text Number 1: 1
<l33n>
Number 2: 6
<l33n>
The text is: test
<l33n>
Number 3: 3
roamingdog has joined #ruby
<l33n>
my_local_file.write(data_hash["numbers"].map.with_index(1) { |num, index| "Number #{index} is #{num}" })"
<l33n>
that gives an array with all the text I need
JimK12 has left #ruby [#ruby]
aryaching has joined #ruby
<gr33n7007h>
l33n: show me what the data_hash looks like
<l33n>
{"numbers":[1,3,6}, "text":"test"}
<l33n>
except its {"numbers":[1,3,6]}, "text":"test"}
roamingdog has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
<gr33n7007h>
l33n: infact show me what the remote_data looks like
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
<l33n>
sorry thats what the remote data is
<l33n>
thats the json
xonico has quit []
<l33n>
and why is it that when i do this: my_local_file.write(data_hash["numbers"].map.with_index(1) { |num, index| "Number #{index} is #{num}" }
<l33n>
that it writes to file
<l33n>
but when i do this: my_local_file.write(data_hash["numbers"].map.with_index(1) { |num, index| "Number #{index} is #{num}" } + "The text is #{data_hash["text"]}")
<l33n>
i get an error
<l33n>
and have to put the ".to_json" after my_local_file.write(data_hash["numbers"].map.with_index(1) { |num, index| "Number #{index} is #{num}" }
<nofxx__>
spicerack, so just `brew install ruby` and have fun
<spicerack>
Error: Could not link:
<spicerack>
Error: Could not link:
<spicerack>
Please delete these paths and run `brew update`.
Xiti has quit [Quit: Xiti]
<nofxx__>
do as the man say
<nofxx__>
there's also a deep clean and reinstall homebrew way
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codfection has joined #ruby
Xiti has joined #ruby
<gizmore>
what does the man say?
<nofxx__>
Please delete these paths and run `brew update`.
<nofxx__>
gizmore, actually a very polite fellow
<spicerack>
well i did the ruby install anyway and it says it installed
Moosashi has quit [Quit: Moosashi]
<blackbombay>
macos comes with ruby.
jgt has joined #ruby
<spicerack>
"Now we need to make that Ruby the default Ruby for our system, which we can do by creating a new file called ~/.ruby-version with this content:" how do I do that or where do I put the file?
<havenwood>
spicerack: (create a file in your home dir called .ruby-version that contains the text: ruby-2.3
<havenwood>
)
<spicerack>
okay
hlmjr has joined #ruby
mBailey_j has joined #ruby
<spicerack>
the version it installed is 2.3.2 should i put the .2 at the end?
gingray has joined #ruby
<havenwood>
spicerack: it will fuzzy match if you don't, but you can
<havenwood>
it's fine either way
whathappens has joined #ruby
hays_ has joined #ruby
hays has quit [Ping timeout: 260 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
herbmillerjr has quit [Ping timeout: 250 seconds]
<spicerack>
tyvm for the help
redpants has quit [Ping timeout: 246 seconds]
<spicerack>
is 4.2.6 latest version of rails?
<spicerack>
looks like it's recent enough
OS-18137 has quit [Quit: Page closed]
toretore has joined #ruby
Moosashi has joined #ruby
csaunders has joined #ruby
<havenwood>
spicerack: 5.0.0.1
<spicerack>
im trying to install mySQL and it says "// ♥ brew link pkg-config Linking /usr/local/Cellar/pkg-config/0.29.1_2... Error: Could not symlink bin/pkg-config Target /usr/local/bin/pkg-config is a symlink belonging to pkg-config. You can unlink it: brew unlink pkg-config
code2Learn has joined #ruby
threh has quit [Ping timeout: 256 seconds]
govg has quit [Quit: leaving]
<spicerack>
oh well I don't need mySQl right now
STOP_nwo has joined #ruby
<STOP_nwo>
The whole profession of psychiatry is an outright fraud and an ongoing crime of the highest order!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! wake up and visit: antipsychiatry.org
STOP_nwo has quit [K-Lined]
CloCkWeRX has joined #ruby
kermit_ has joined #ruby
code2Learn has quit [Remote host closed the connection]
<havenwood>
!spam STOP_nwo
woodruffw has quit [Ping timeout: 250 seconds]
<blackbombay>
he's klined you dont gotta worry about it
suck has quit [Quit: Connection closed for inactivity]
sirecote has quit [Ping timeout: 244 seconds]
douglascorrea has quit [Remote host closed the connection]
douglascorrea has joined #ruby
spacenoid has quit [Ping timeout: 246 seconds]
sirecote has joined #ruby
edwardly has quit [Ping timeout: 250 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
woodruffw has joined #ruby
tim_ has joined #ruby
ur5us has quit [Remote host closed the connection]
gingray has quit [Ping timeout: 250 seconds]
douglascorrea has quit [Ping timeout: 248 seconds]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
hays_ has quit [Quit: No Ping reply in 180 seconds.]
hays has joined #ruby
User458764 has joined #ruby
redpants has joined #ruby
charliesome has joined #ruby
cloud is now known as ort
harai has joined #ruby
hays_ has joined #ruby
hlmjr has quit [Remote host closed the connection]
hlmjr has joined #ruby
charliesome has quit [Ping timeout: 246 seconds]
hays has quit [Ping timeout: 248 seconds]
benlieb has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
enterprisey has quit [Ping timeout: 256 seconds]
ort is now known as cloud
harai has quit [Ping timeout: 248 seconds]
mBailey_j has quit [Quit: Leaving]
CloCkWeRX has quit [Ping timeout: 260 seconds]
hays has joined #ruby
enterprisey has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hays_ has quit [Ping timeout: 248 seconds]
tim_ has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
redpants has quit [Ping timeout: 265 seconds]
whathapp_ has joined #ruby
harai has joined #ruby
charliesome has joined #ruby
whathappens has quit [Ping timeout: 240 seconds]
nchambers has joined #ruby
nchambers has quit [Changing host]
nchambers has joined #ruby
CloCkWeRX has joined #ruby
yardenbar has joined #ruby
xall has quit [Ping timeout: 252 seconds]
ptx0 has quit [Ping timeout: 244 seconds]
harai has quit [Read error: Connection reset by peer]
JoshS has joined #ruby
User458764 has joined #ruby
harai has joined #ruby
ur5us has joined #ruby
gingray has joined #ruby
vuoto has joined #ruby
Dimik has quit [Ping timeout: 250 seconds]
whathapp_ has quit [Quit: Leaving...]
whathappens has joined #ruby
ledestin has joined #ruby
johnny56 has quit [Ping timeout: 246 seconds]
johnny56 has joined #ruby
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
jgnagy has quit [Remote host closed the connection]
agent_white has quit [Quit: agent_white]
bluOxigen has quit [Ping timeout: 260 seconds]
bluOxigen has joined #ruby
whathappens has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
agent_white has joined #ruby
enterprisey has quit [Remote host closed the connection]
<nofxx__>
that guy needs a shrink
harfangk has joined #ruby
bluOxigen has quit [Ping timeout: 244 seconds]
bluOxigen has joined #ruby
kermit_ has quit [Quit: leaving]
nikivi has joined #ruby
yardenbar has quit [Ping timeout: 265 seconds]
BTRE has quit [Quit: Leaving]
yardenbar has joined #ruby
serard has joined #ruby
Channel6 has quit [Quit: Leaving]
BTRE has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tpendragon has quit [Ping timeout: 256 seconds]
blackjid has quit [Ping timeout: 256 seconds]
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
Jameser has joined #ruby
vuoto has quit [Remote host closed the connection]
symm- has joined #ruby
vuoto has joined #ruby
ledestin has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
<overhop>
is there any modules that support custom cyphers that will work with jruby?
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rippa has joined #ruby
railswebdev has joined #ruby
Asher has joined #ruby
govg has joined #ruby
sid_fules has joined #ruby
overhop has joined #ruby
benlieb has quit [Quit: benlieb]
<overhop>
When using strings are the () for personal preference?
agent_white has quit [Quit: leaving]
sid_fules has quit [Remote host closed the connection]
<matthewd>
overhop: I don't know what you mean
<overhop>
Like print "hello world" vs print ("hello world")
<matthewd>
You can call methods with or without parentheses, yes
<overhop>
okay
<matthewd>
... though without the space before the '('. With the space there, it's doing something slightly different, which will later behave unexpectedly.
<overhop>
So it only matters when you have a lot of lines of code?
<matthewd>
hmm?
harai has quit [Read error: Connection reset by peer]
SteenJobs has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
harai has joined #ruby
vuoto has quit [Remote host closed the connection]
sid_fules has quit [Remote host closed the connection]
<rapha>
I want to hack on a library (Kramdown) and require() it from my local tree instead of from the installed Gem. I tried require_relative('kramdown/lib/kramdown') but that of course does not work. How do people usually do something like this?
conta has quit [Ping timeout: 256 seconds]
libastral has quit [Ping timeout: 260 seconds]
sid_fules has joined #ruby
pawnbox has quit [Remote host closed the connection]
yardenbar has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
anekos has joined #ruby
libastral has joined #ruby
sid_fules has quit [Remote host closed the connection]
sepp2k has quit [Ping timeout: 260 seconds]
sid_fules has joined #ruby
careta has joined #ruby
Fernando-Basso has quit [Ping timeout: 252 seconds]
edwinvdgraaf has quit [Ping timeout: 260 seconds]
sid_fules has quit [Remote host closed the connection]
yuki_is_bored has quit [Ping timeout: 248 seconds]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
yuki_is_bored has joined #ruby
Salih has quit [Quit: Leaving]
vuoto has quit [Remote host closed the connection]
bumao has quit [Ping timeout: 244 seconds]
tk__ has joined #ruby
muelleme has joined #ruby
gingray has quit [Ping timeout: 252 seconds]
doublemalt_ has quit [Ping timeout: 260 seconds]
sepp2k has joined #ruby
bumao has joined #ruby
<Zarthus>
rapha: I've only done this with git-clone :P
yuki_is_bored has quit [Read error: Connection reset by peer]
dreinull has quit [Remote host closed the connection]
mlfe has joined #ruby
mlfe has quit [Remote host closed the connection]
miqlas-H has joined #ruby
|RicharD| has quit [Ping timeout: 246 seconds]
dreinull has joined #ruby
sid_fules has joined #ruby
ace05 has quit [Remote host closed the connection]
the_drow has quit [Read error: Connection reset by peer]
<johnzorn>
what does uniq use under the hood to compare items? I have an array of objects that I would like Array#uniq! to work on. I tried ==() <=>() eq?() but none seem to work
jcao219 has quit [Ping timeout: 265 seconds]
<yorickpeterse>
johnzorn: it uses a Hash under the hood
ace05 has joined #ruby
douglascorrea has joined #ruby
sid_fules has quit [Read error: Connection reset by peer]
Ishido has joined #ruby
<johnzorn>
ok seems like the magic combo is hash, eql? and <=>
<handicraftsman>
Hello!
douglascorrea has quit [Ping timeout: 258 seconds]
fmcgeough has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maokomioko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
libastral has quit [Ping timeout: 260 seconds]
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
libastral has joined #ruby
cdg has joined #ruby
SCHAAP137 has joined #ruby
sdothum has joined #ruby
blackbombay has quit [Ping timeout: 260 seconds]
muelleme has quit [Ping timeout: 244 seconds]
railswebdev has joined #ruby
Blaguvest has joined #ruby
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maokomioko has joined #ruby
tvw has joined #ruby
TheCubeLord has joined #ruby
TheCubeLord has joined #ruby
TheCubeLord has quit [Changing host]
<al2o3-cr>
the only thing <<~Fo0 (squiggly heredoc) does differently is strip whitespace?
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fmcgeough has quit [Quit: fmcgeough]
muelleme has joined #ruby
TheCubeLord has quit [Client Quit]
<matthewd>
al2o3-cr: Is there something else you'd like it to do? ;)
<matthewd>
al2o3-cr: Yes, I believe so
andrewvos has joined #ruby
SCHAAP137 has quit [Ping timeout: 252 seconds]
<al2o3-cr>
matthewd: no, nothing else. ok cool :P
andrewvos has quit [Client Quit]
ace05 has quit [Remote host closed the connection]
ace05 has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
bluOxigen has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.6]
hlmjr has quit [Quit: Konversation terminated!]
herbmillerjr has joined #ruby
cdg has quit [Remote host closed the connection]
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
brendan- has joined #ruby
ace05 has quit [Remote host closed the connection]
jcao219 has joined #ruby
ace05 has joined #ruby
vuoto has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
muelleme has quit [Ping timeout: 256 seconds]
sid_fules has joined #ruby
pilne has joined #ruby
ropeney has quit [Quit: Leaving]
ace05 has quit [Remote host closed the connection]
ledestin has joined #ruby
_sfiguser has quit [Remote host closed the connection]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
joneshf-laptop has quit [Quit: Leaving]
tvw has quit []
creraffylin has joined #ruby
pragmaticus has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<creraffylin>
.
libastral has quit [Ping timeout: 256 seconds]
synthroid has joined #ruby
chopin has quit [Remote host closed the connection]
libastral has joined #ruby
ace05 has joined #ruby
chopin has joined #ruby
tau has joined #ruby
pandaant has quit [Remote host closed the connection]
sid_fules has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
chopin has quit [Ping timeout: 250 seconds]
creraffylin has quit [Quit: Konversation terminated!]
Madplatypus has joined #ruby
bluOxigen has quit [Ping timeout: 252 seconds]
nadir has quit [Quit: Connection closed for inactivity]
redpants has joined #ruby
libastral has quit [Ping timeout: 258 seconds]
libastral has joined #ruby
allcentu1 has joined #ruby
xall has quit [Ping timeout: 246 seconds]
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
tk__ has quit [Quit: ばいばい]
triangles has joined #ruby
redpants has quit [Ping timeout: 268 seconds]
spicerack has joined #ruby
blackjid has joined #ruby
lenwood has joined #ruby
pawnbox has joined #ruby
Puffball_ has joined #ruby
mBailey_j has joined #ruby
zeroDi has joined #ruby
Puffball has quit [Ping timeout: 252 seconds]
inoperable has joined #ruby
Puffball has joined #ruby
SCHAAP137 has joined #ruby
tpendragon has joined #ruby
shinnya has quit [Ping timeout: 256 seconds]
Puffball_ has quit [Ping timeout: 268 seconds]
bumao has quit [Ping timeout: 246 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
xall has joined #ruby
bumao has joined #ruby
blackbombay has joined #ruby
lel has joined #ruby
triangles has quit [Quit: Leaving]
johnzorn has quit [Ping timeout: 245 seconds]
User458764 has joined #ruby
redpants has joined #ruby
mwlang has joined #ruby
conta has joined #ruby
muelleme has joined #ruby
dextertzu has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
inoperable has quit [Quit: ZNC 1.6.3 - http://znc.in]
jgnagy has joined #ruby
inoperable has joined #ruby
mBailey_j has quit [Quit: Leaving]
ptx0 has joined #ruby
pawnbox has joined #ruby
muelleme has quit [Ping timeout: 268 seconds]
nicoulaj has quit [Quit: nicoulaj]
ace05 has quit [Remote host closed the connection]
muelleme has joined #ruby
handicraftsman has left #ruby ["Leaving"]
alexherbo2 has quit [Quit: WeeChat 1.6]
nicoulaj has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
ace05 has joined #ruby
jcao219 has quit [Ping timeout: 250 seconds]
nicoulaj has quit [Remote host closed the connection]
douglascorrea has joined #ruby
nicoulaj has joined #ruby
inoperable has quit [Quit: ZNC 1.6.3 - http://znc.in]
claudiuinberlin has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
douglascorrea has quit [Ping timeout: 244 seconds]
gingray has joined #ruby
inoperable has joined #ruby
aryaching has joined #ruby
roamingdog has joined #ruby
ych has joined #ruby
<ych>
hey, i have a ruby script and in it i want to sample cpu/memory usage. ideas?
<ych>
and it has to be cross-platform
CamonZ has joined #ruby
GodFather has joined #ruby
lxsameer has quit [Quit: WeeChat 1.6]
<CamonZ>
hi, if I pass a method as a block is there a way to reference the argument yielded to the block on the method call?
<CamonZ>
e.g. build_document(hashify(value), &document_for(REFERENCE_HERE))
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
frozengeek___ has joined #ruby
GodFather has quit [Remote host closed the connection]
lenwood has quit [Ping timeout: 250 seconds]
<Mon_Ouie>
What are you trying to do? Another notation for build_document(hashify(value)) { |arg| document_for(arg) }?
<CamonZ>
yep
<Mon_Ouie>
&method(:document_for)
<CamonZ>
that was my 1st try but Symbol#to_proc calls the proc on the arg
<Mon_Ouie>
I'm not using Symbol#to_proc, I'm using Method#to_proc
<Mon_Ouie>
&method(:document_for) vs &:document_for
<CamonZ>
oh, didn't see that right :)
<CamonZ>
thanks
yardenbar has quit [Ping timeout: 252 seconds]
nettoweb has joined #ruby
brendan- has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
harai has joined #ruby
harfangk has joined #ruby
yardenbar has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
AlexRussia has quit [Ping timeout: 260 seconds]
hahuang65 has joined #ruby
_sfiguser has joined #ruby
jgnagy has quit [Remote host closed the connection]
brendan- has joined #ruby
Ishido has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 265 seconds]
allcentu1 has quit [Ping timeout: 250 seconds]
threh has joined #ruby
railswebdev has joined #ruby
roamingdog has quit [Remote host closed the connection]
pilne has left #ruby ["Leaving!"]
ace05 has quit [Remote host closed the connection]
ddffg has joined #ruby
AlexRussia has joined #ruby
ace05 has joined #ruby
al2o3-cr has quit [Ping timeout: 250 seconds]
yardenbar has quit [Ping timeout: 258 seconds]
AlexRussia has quit [Ping timeout: 244 seconds]
Azure has quit [Ping timeout: 256 seconds]
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Yacker has joined #ruby
roamingdog has joined #ruby
ace05 has quit [Remote host closed the connection]
allcentu1 has joined #ruby
DLSteve has joined #ruby
ace05 has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
fmcgeough has joined #ruby
AlexRussia has joined #ruby
zeroDi has quit [Quit: WeeChat 1.6]
cibs has quit [Ping timeout: 268 seconds]
cibs has joined #ruby
kbdkode has quit [Quit: weechat annoys me sometimes]
kbdkode has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Fernando-Basso has quit [Quit: WeeChat 1.6]
preyalone has joined #ruby
Fernando-Basso has joined #ruby
jeanlinu_ has quit [Ping timeout: 256 seconds]
jshjsh has joined #ruby
maokomioko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #ruby
threh has quit [Ping timeout: 252 seconds]
threh has joined #ruby
JoshS has quit [Ping timeout: 245 seconds]
ace05 has quit [Remote host closed the connection]
Channel6 has joined #ruby
dunpeal has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
mikecmpbll has joined #ruby
ace05 has joined #ruby
|RicharD| has joined #ruby
ace05 has quit [Remote host closed the connection]
symm- has joined #ruby
ace05 has joined #ruby
marr has joined #ruby
|RicharD| has quit [Read error: Connection reset by peer]
nunchuck has joined #ruby
allcentu1 has quit [Ping timeout: 258 seconds]
Ishido has joined #ruby
chopin has joined #ruby
ych has joined #ruby
railswebdev has joined #ruby
nicokavts has joined #ruby
kirun has joined #ruby
vuoto has quit [Remote host closed the connection]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ace05 has quit [Remote host closed the connection]
nicokavts has quit [Ping timeout: 260 seconds]
<ych>
hey, i have a ruby script and in it i want to sample cpu/memory usage. ideas? (cross-platform)
GodFather has joined #ruby
douglascorrea has joined #ruby
ace05 has joined #ruby
blackbombay has quit [Ping timeout: 244 seconds]
douglascorrea has quit [Ping timeout: 248 seconds]
blackbombay has joined #ruby
User458764 has joined #ruby
vuoto has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Nanuq has quit [Ping timeout: 258 seconds]
Mon_Ouie has quit [Quit: WeeChat 1.6]
roamingdog has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 250 seconds]
allcentu1 has joined #ruby
roamingdog has joined #ruby
maokomioko has joined #ruby
nicokavts has joined #ruby
benlieb has joined #ruby
benlieb has quit [Client Quit]
lenwood has joined #ruby
gr33n7007h has joined #ruby
gingray has quit [Ping timeout: 265 seconds]
gingray has joined #ruby
Yacker has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Yacker has joined #ruby
Yacker has quit [Client Quit]
ddffg has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
pawnbox has quit [Remote host closed the connection]
johnny56 has quit [Ping timeout: 246 seconds]
whateverer has joined #ruby
<whateverer>
works?
<whateverer>
Wow, one of very few channel where you don't need to be registered
johnny56 has joined #ruby
jgnagy has joined #ruby
<whateverer>
I'm executing in bash shell ps a | grep foo | wc -l and I get result 1. When I do in Ruby: %x(ps a | grep foo | wc -l).to_i I get result 3. Any tip why?
<whateverer>
Looks like that command literally gives other result from inside Ruby than from shell, even without to_i conversion
TradingGame has joined #ruby
ta__ has joined #ruby
bigkevmcd has quit [Ping timeout: 250 seconds]
ta_ has quit [Read error: Connection reset by peer]
railswebdev has joined #ruby
jgt has joined #ruby
bmn has quit [Ping timeout: 250 seconds]
Rutix`away has joined #ruby
Rutix`away has quit [Changing host]
Rutix`away has joined #ruby
Rutix has quit [Ping timeout: 250 seconds]
axisys has quit [Ping timeout: 250 seconds]
Kuukunen has quit [Ping timeout: 250 seconds]
Rasi has quit [Ping timeout: 250 seconds]
optiz0r has quit [Remote host closed the connection]
<TradingGame>
..
axisys has joined #ruby
mim1k|work has quit [Ping timeout: 250 seconds]
yardenbar has joined #ruby
volix has quit [Ping timeout: 250 seconds]
unreal has quit [Ping timeout: 250 seconds]
ujjain has quit [Ping timeout: 250 seconds]
quarcu_ has quit [Ping timeout: 250 seconds]
dminuoso has quit [Ping timeout: 250 seconds]
SirFunk has quit [Ping timeout: 250 seconds]
<TradingGame>
anybody here?
Kuukunen has joined #ruby
colegatron has quit [Ping timeout: 250 seconds]
bier has quit [Ping timeout: 250 seconds]
jgnagy has quit [Ping timeout: 268 seconds]
volix has joined #ruby
quarcu has joined #ruby
brendan- has joined #ruby
Rasi has joined #ruby
bier has joined #ruby
<whateverer>
OK, nvm! Stupid question.
dminuoso has joined #ruby
ujjain has joined #ruby
ujjain has joined #ruby
ujjain has quit [Changing host]
colegatron has joined #ruby
unreal has joined #ruby
SirFunk has joined #ruby
byte512 has quit [Ping timeout: 258 seconds]
mwlang has quit [Quit: mwlang]
JesseH has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
optiz0r has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmn has joined #ruby
skweek has quit [Remote host closed the connection]
enterprisey has joined #ruby
whateverer has quit [Quit: Page closed]
ghostlight has quit [Ping timeout: 245 seconds]
jgt has quit [Ping timeout: 265 seconds]
mim1k|work has joined #ruby
TradingGame has quit [Quit: Leaving]
jgt has joined #ruby
lenwood has quit [Ping timeout: 244 seconds]
skweek has joined #ruby
ghostlight has joined #ruby
ace05 has quit [Remote host closed the connection]
benlieb has joined #ruby
tomphp has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jgnagy has quit [Remote host closed the connection]
<nchambers>
does ruby have an equivalent to pythons: if __name__ == '__main__'?
<bougyman>
if __FILE__ == $PROGRAM_NAME, maybe
matp has quit [Remote host closed the connection]
<bougyman>
you want to do something if the file itself is called as an executable, right?
threh has joined #ruby
lenwood has joined #ruby
Salih has quit [Quit: Leaving]
PaulCapestany has quit [Quit: .]
matp has joined #ruby
jackjackdripper has joined #ruby
PaulCapestany has joined #ruby
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
synaps3 has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
handicraftsman has joined #ruby
riskish has joined #ruby
sdothum has joined #ruby
nettoweb has joined #ruby
Salih has joined #ruby
handicraftsman has quit [Client Quit]
_sfiguser has quit [Ping timeout: 250 seconds]
fullofcaffeine has joined #ruby
alexherbo2 has joined #ruby
SCHAAP137 has joined #ruby
SCHAAP137 has quit [Changing host]
SCHAAP137 has joined #ruby
ddffg has joined #ruby
[ddmp] has quit [Quit: WeeChat 1.3]
railswebdev has joined #ruby
armando has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<nchambers>
bougyman, yeah that worked. thanks
<nchambers>
is there a way to set a default value for an array? for example something like: `arr = []; arr.default = 0; arr[2] += 1; puts arr[2] #=> 1`
konsolebox has quit [Quit: Leaving]
<Papierkorb>
nchambers, there is not, Hash has that feature though
<nchambers>
Papierkorb, damn
_sfiguser has joined #ruby
<nchambers>
so would I need to test for nil then?
chopin has quit [Remote host closed the connection]
roamingdog has quit [Read error: Connection reset by peer]
<Papierkorb>
Either `ary[x] = (ary[x] || 0) + 1`, or use Hash, or if you know the total length anyway, simply Array.new(size, 0)
roamingdog has joined #ruby
<Papierkorb>
nchambers:
chopin has joined #ruby
<nchambers>
neat. thanks!
DLSteve has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
chopin has quit [Ping timeout: 240 seconds]
fullofcaffeine has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
Snickers has joined #ruby
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
nickjj has quit [Read error: Connection reset by peer]
Definity has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
dar123 has joined #ruby
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jcao219 has joined #ruby
Ishido has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
edwinvdgraaf has joined #ruby
Salih has quit [Quit: Leaving]
hays has quit [Changing host]
hays has joined #ruby
dhollinger has quit [Ping timeout: 245 seconds]
dunpeal has quit [Quit: leaving]
Ishido has joined #ruby
dhollinger has joined #ruby
PaulCapestany has quit [Quit: .]
s2013 has joined #ruby
libastral has quit [Ping timeout: 244 seconds]
malconis has joined #ruby
Lucky_ABA has joined #ruby
ace05 has quit [Remote host closed the connection]
fullofcaffeine has quit [Remote host closed the connection]
ace05 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ignarps- has joined #ruby
ignarps has quit [Ping timeout: 256 seconds]
sid_fules has joined #ruby
fullofcaffeine has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
rfoust has joined #ruby
pragmaticus has quit [Remote host closed the connection]
Channel6 has quit [Quit: Leaving]
fullofcaffeine has joined #ruby
ecksit has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
Azure has joined #ruby
codfection has quit [Remote host closed the connection]