casheew has quit [Read error: Connection reset by peer]
<lectrick>
Anyone know why my version of 1.9.3 doesn't include most of the GC methods listed here http://ruby-doc.org/core-1.9.3/GC.html, such as GC.malloc_allocated_size? Are those from a custom patch or build?
casheew has quit [Read error: Connection reset by peer]
<lectrick>
Is there anything good or bad or otherwise about using "alias newmethod oldmethod" vs. "alias_method :newmethod, :oldmethod"
<tay1>
im reading what map does but im still a bit confused
dawkirst has quit [Ping timeout: 246 seconds]
<banisterfiend>
lectrick: no, many people prefer it
<tay1>
whas the diff between map and each?
<lectrick>
tay1: it just maps a series of values to other values, passing in each value, in turn, to the block so the block can figure out what to change those things to
|christian| has joined #ruby
<banisterfiend>
lectrick: but the advantage in alias_method is you can use string interpolation
<tay1>
oh so its to change teh value of an array?
<apeiros_>
tay1: the return value
<lectrick>
banisterfiend: a good point!
<banisterfiend>
so you can generate new names at runtime
|christian| has left #ruby [#ruby]
<lectrick>
tay1: so for example [1,2,3].map{ |number| number * 2} will return [2,4,6]
<tay1>
but you can do [1,2,3].each do |n| n*2
<tay1>
it would do the same thing right?
<lectrick>
tay1: also, ignore those people who use "collect" instead of "map". They're dirty Smalltalkers.
casheew has joined #ruby
<apeiros_>
tay1: no it wouldn't
HecAtic has joined #ruby
<apeiros_>
it would return [1,2,3], not [2,4,6]
subbyyy has joined #ruby
<lectrick>
tay1: each doesn't return the values to a new object
<apeiros_>
each usually returns the object it is called on
vickaita has joined #ruby
<tay1>
okay its sort of like changing the values in an array without changing it
<apeiros_>
map returns an array with the mapped values (hence the name, 'map', because it maps values)
etcetera has quit []
<apeiros_>
it does not modify the array. you can map anything that include Enumerable
Dreamer3 has quit [Read error: Connection reset by peer]
<lectrick>
Save a byte... bang a method. Eliminating side effects is for the weak of heart
<MrZYX>
hm does map! modify the array in place or just replaces self with the newly build one?
dallasm has joined #ruby
hbpoison has joined #ruby
<tay1>
when would i use maps? like any practical examples so i think that might give me a better insight i think i got it now
<apeiros_>
MrZYX: it works value by value
<Paradox>
tay1, condensing the values from a hash into an array
<apeiros_>
i.e., if you abort mid-way you'll end up with a half-mapped array
<MrZYX>
okay, thanks
<lectrick>
tay1: well for example if I have an array of objects, each of which responds to "id", I can get an array of their id's this way: objects.map{|o| o.id }
<tay1>
okay so i have an array right that looks like {"blah" => "blah2", etc}
<tay1>
how do i extract the blah2 out ?
<apeiros_>
that's not an array
<apeiros_>
it's a hash and you use hash["blah"]
<tay1>
oh
<apeiros_>
or hash.fetch("blah")
<tay1>
is that called key value pair?
<apeiros_>
fetch will raise if the key does not exist. [] will return the default value or invoke the default_proc.
etcetera has joined #ruby
<apeiros_>
yes, the "blah" => "blah2" in your hash is a key/value pair
<tay1>
so if i want an array of just the value
<tay1>
would i use map?
<otters>
.values
<tay1>
oh
nomenkun has quit [Ping timeout: 252 seconds]
<tay1>
so i can do authors = books.values ?
<apeiros_>
you could use map, but .values as suggested by otters is the better choice
marr has quit [Ping timeout: 240 seconds]
<apeiros_>
tay1: do you know irb?
<tay1>
yeah im using irb
<apeiros_>
good, you can check "can I do X" in irb easily ;-)
<tay1>
i am doing that as well.
<apeiros_>
you can still get back at us when/if something doesn't work out as expected
<lectrick>
hmmm, how did I break awesome-print? I can't "ap" after "require 'ap'" anymore, it nomethoderrors
<tay1>
my main thing is that i know there are multiple ways of doing something
<tay1>
so i want to know the right / more efficient way
crackfu has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<lectrick>
ah fuck. i installed the Associated Press gem, not awesome-print LOL
casheew has joined #ruby
<apeiros_>
sure, but "efficient way to do X" is not the same as "can I do X"
<apeiros_>
"can I do X" you can perfectly explore yourself
drumsrgr1 has quit [Ping timeout: 255 seconds]
chimmy has joined #ruby
crackfu has quit [Changing host]
crackfu has joined #ruby
<Paradox>
lectrick, lol
<tay1>
what is the best way to have an array of hash values?
<Paradox>
…
<tay1>
is it to add them one by one by using push?
<Paradox>
use map
<lectrick>
Paradox: the fact that "require 'ap'" requires either the associated-press gem, or awesome-print, seems like a dangerous namespacing issue...
sambao21 has quit [Quit: Computer has gone to sleep.]
<apeiros_>
[{'foo' => 'bar'}, {'baz' => 'quuz'}]
<Paradox>
lectrick, it doesnt
dawkirst has quit [Ping timeout: 255 seconds]
<lectrick>
what if I have both installed and want both loaded?
<apeiros_>
it's stdlib, which means you have to require it
etcetera has quit []
<zack>
ah
brianpWins has joined #ruby
<tay1>
okay so my main thing is, how do i get a list of authors from that hash array
ephemerian has quit [Quit: Leaving.]
pkrnj has joined #ruby
<apeiros_>
tay1: try it yourself, show us the code you came up with
<apeiros_>
and we'll tell you how you can improve that
<lectrick>
tay1: it's not a "hash array". calling it that will just confuse you. it's either a "hash", an "array", or an "array of hashes"
<tay1>
oh ok
<lectrick>
or perhaps a "hash of keys to arrays"
<apeiros_>
o0
axhlf has joined #ruby
<MrZYX>
hash with array values? :P
<lectrick>
Yes, it could be that too
zul_ has joined #ruby
<lectrick>
But I didn't want to confuse him further :P
banisterfiend is now known as banister`sleep
<zul_>
Hi guys I would like to create a scaffold using a little bit complex fields than string or integer. I'm useing in ruby the twitter gem, is it possible to create a scaffold like this? rails generate foo:tweet bar:test (where foo belongs to twitter gem)?
<zul_>
errata corridge: bar:text
<apeiros_>
zul_: I think you wanted #rubyonrails
<zul_>
ok thanks apeiros
utf1000 has quit [Quit: Leaving]
chrisramon has quit [Quit: chrisramon]
<tay1>
ok i keep getting errors
frosks has quit [Ping timeout: 252 seconds]
danneu2 has joined #ruby
<tay1>
so i did books[0].fetch(:title) to get thet title of the first book
<apeiros_>
it's either do/end or {}, you can't mix them ;-)
<tay1>
oh ok. thanks. so would maps be a better way to do this if you had lots of data?
<zack>
lectrick: dally works, thanks
<apeiros_>
zack: there's a memcache client which has require 'memcache' and spells Memcache (instead of MemCache)
<apeiros_>
zack: you sure you haven't accidentally installed that one too?
danneu2 has quit [Ping timeout: 252 seconds]
<zack>
i'm going to just use dalli
<zack>
i think maybe the old MemCache was only compatible with my old OS
wmoxam has joined #ruby
destructure has quit [Quit: Lost terminal]
bradhe has quit [Ping timeout: 245 seconds]
predator117 has joined #ruby
<lectrick>
zack: yeah it looks like you may have installed the wrong gem somehow. just use dalli as it appears the memcache-client is no longer maintained anyway
wmoxam has joined #ruby
mduvall has joined #ruby
nomenkun has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
jaygen has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 260 seconds]
toekutr has quit [Remote host closed the connection]
neurone-2337 has joined #ruby
neurone-1337 has quit [Ping timeout: 258 seconds]
Honeycomb has quit [Quit: Leaving.]
sigje has joined #ruby
hbpoison has quit [Ping timeout: 245 seconds]
Myconix has quit [Ping timeout: 264 seconds]
jamescarr has joined #ruby
IceDragon has quit [Quit: Space~~~]
dawkirst has quit [Ping timeout: 245 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
sandGorgon has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
sandGorgon has joined #ruby
nari has joined #ruby
DrShoggoth has joined #ruby
DrShoggoth has quit [Read error: Connection reset by peer]
nfisher has joined #ruby
wuest has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
aapzak has quit [Ping timeout: 252 seconds]
Davey has joined #ruby
rismoney has quit []
aapzak has joined #ruby
astrostl has quit []
dawkirst has joined #ruby
cjibo has joined #ruby
hemanth_ has joined #ruby
AlSquirikou has quit [Read error: Connection reset by peer]
_hemanth has quit [Read error: Connection reset by peer]
AlSquirikou has joined #ruby
<cjibo>
any osX 1.8.3 users install ruby 2.0.0 and rails? Having issues regarding openssl
<cjibo>
via rvm?
wargasm has left #ruby [#ruby]
<swarley>
Is openssl added by default now? I think it used to be something you had to configure yourself in 1.9 via the ext/.. I'm not sure that applies still though. cjibo do you have a specific issue?
<cjibo>
gem install rails complains after ruby 2.0.0-p0 is installed
apeiros_ has joined #ruby
nari has quit [Ping timeout: 246 seconds]
Turkishviking has joined #ruby
charlie_ has quit [Ping timeout: 245 seconds]
dawkirst has quit [Ping timeout: 246 seconds]
verysoftoiletppr has quit []
marcdel has joined #ruby
hbpoison has joined #ruby
havenn_ has quit [Remote host closed the connection]
s00pcan has quit [Quit: Lost terminal]
s00pcan has joined #ruby
apeiros_ has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
nfisher has quit [Ping timeout: 240 seconds]
slapt has joined #ruby
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby
jetblack_ has joined #ruby
kennyvb has quit [Read error: Operation timed out]
slainer6_ has joined #ruby
kennyvb has joined #ruby
slainer68 has quit [Ping timeout: 264 seconds]
dallasm has joined #ruby
hakunin has quit [Ping timeout: 245 seconds]
jetblack has quit [Ping timeout: 264 seconds]
dawkirst has joined #ruby
mduvall has joined #ruby
emmanuelux has quit [Remote host closed the connection]
nomenkun has joined #ruby
dmoctezuma has joined #ruby
kornnflake is now known as kornnflake_zzz
<otters>
is it possible to "restart" a thread?
<cjibo>
I really cannot get gem to work at all after installing 2.0.0
jamescarr has quit [Quit: jamescarr]
<bnagy>
otters: not afaik. You mean once it has finished its code, yeah?
<otters>
no, I mean abort and restart the thread
nomenkun has quit [Ping timeout: 245 seconds]
<otters>
like restarting a timer
<bnagy>
oh... well you can just kill it and start a new one
<dmoctezuma>
cjibo: using rvm?
<bnagy>
which is probably functionally equivalent, no?
<cjibo>
dmoctezuma: yes
vickaita has quit [Ping timeout: 264 seconds]
<dmoctezuma>
cjibo: rvm installs the corresponding rubygems automatically
<cjibo>
dmoctezuma: I think I may just have got it fixed. I had a conflict with homebrew.
<dmoctezuma>
oh
slapt has quit [Quit: leaving]
<cjibo>
I never had this issue with 1.9.X but I'm building out new macbook so who knows what I did hehe
mercy____ has quit [Quit: mercy____]
mercy____ has joined #ruby
ananthakumaran has joined #ruby
himsin has quit [Remote host closed the connection]
vickaita has joined #ruby
banghouse2 has quit [Remote host closed the connection]
bigmac has joined #ruby
jekotia has quit [Quit: sleep]
megha has quit [Ping timeout: 246 seconds]
hesco has joined #ruby
yashshah__ has quit [Read error: Connection reset by peer]
yashshah__ has joined #ruby
<hesco>
my attempt to install rmagick with gem results in creation of this file:
<breakingthings>
any_instance seems like a heavy handed approach when I just need to stub/mock out one instance, I just don't know how to get a hold of that instance.
cjibo has left #ruby [#ruby]
nomenkun has joined #ruby
dawkirst has joined #ruby
brianpWins has joined #ruby
apeiros_ has quit [Ping timeout: 256 seconds]
crodas has quit [Ping timeout: 272 seconds]
nomenkun has quit [Ping timeout: 245 seconds]
rickmasta has joined #ruby
dawkirst has quit [Ping timeout: 252 seconds]
statarb3 has quit [Ping timeout: 245 seconds]
danneu2 has joined #ruby
sayan has quit [Ping timeout: 245 seconds]
megha has quit [Ping timeout: 256 seconds]
hbpoison has quit [Ping timeout: 245 seconds]
sandGorgon has quit [Ping timeout: 245 seconds]
ryanf has quit [Ping timeout: 246 seconds]
yashshah__ has joined #ruby
hbpoison has joined #ruby
ryanf has joined #ruby
crodas has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
dawkirst has joined #ruby
vickaita has joined #ruby
hbpoison has quit [Ping timeout: 264 seconds]
yashshah__ has quit [Ping timeout: 256 seconds]
hbpoison has joined #ruby
vickaita has quit [Ping timeout: 248 seconds]
etcetera has joined #ruby
ryanf has quit [Ping timeout: 264 seconds]
hbpoison has quit [Ping timeout: 240 seconds]
sayan has joined #ruby
hbpoison has joined #ruby
icole has quit [Remote host closed the connection]
pepper_chico has quit [Quit: Computer has gone to sleep.]
hbpoison has joined #ruby
vlad_starkov has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
pepper_chico has joined #ruby
crackfu has quit [Remote host closed the connection]
ahammond has joined #ruby
megha has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
hbpoison has joined #ruby
mikepack has quit [Remote host closed the connection]
ahammond has quit [Client Quit]
pepper_chico has quit [Quit: Computer has gone to sleep.]
<tay1>
is it possible to use ruby to write apps that works with java?
Funcoot_ has joined #ruby
megha has quit [Quit: WeeChat 0.4.0]
<Quadlex>
tay1: It is, if you use JRuby
<Quadlex>
Which is Ruby running on the JVM
<tay1>
the reason i ask is because i am liking ruby and want to continue learning it however ia lso want to write android apps which uses java
rickmasta has quit [Quit: Leaving...]
<tay1>
so i was wondering if there is some sort of work around
<tay1>
or would i have to know java as well
<Funcoot_>
I had a quick question about serializing objects in Ruby.
<Funcoot_>
First, I have been reading that Classes are used to hold behaviors, if you want to hold data, use a struct. But when I want to serialize an object, I have to create a class that inherits that struct.
<Funcoot_>
Am I doing something wrong, because that just seems redundant.
<bnagy>
wat?
<bnagy>
class inherits struct whatnow?
<Funcoot_>
:/
<Funcoot_>
It appears I am misunderstanding something.
<Funcoot_>
Well, I was making a really basic program. I had a class called resort, and all it held were basic strings like name, location, etc.
<Funcoot_>
I was told that using a struct would be better, since all I was using that class for was data.
<bnagy>
ok
icole has joined #ruby
<Quadlex>
tay1: I'm not sure about using JRuby on Android
ukd1 has quit [Remote host closed the connection]
<Funcoot_>
But I can't just use marshal on the struct
<bnagy>
why not?
<Funcoot_>
Well, it returned an error
<Funcoot_>
Let me try and get it again
hbpoison has quit [Ping timeout: 276 seconds]
hbpoison has joined #ruby
generalissimo has quit [Remote host closed the connection]
<Funcoot_>
bnagy, should I be able to marshal a struct, no problem
<Funcoot_>
?*
_veer has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
<bnagy>
OpenStruct Marshals fine for me?
<Funcoot_>
Is it true if I am just creating an object to hold some arbitrary values, that I should use a Struct rather than a Class?
veer has quit [Ping timeout: 245 seconds]
tomzx_mac has quit [Ping timeout: 276 seconds]
pooriaazimi has joined #ruby
yashshah__ has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
shock_one has joined #ruby
carraroj has joined #ruby
hbpoison has joined #ruby
icole has quit [Ping timeout: 264 seconds]
carraroj has quit [Read error: Connection reset by peer]
Hanmac1 is now known as Hanmac
carraroj has joined #ruby
pooriaazimi has quit [Quit: pooriaazimi]
<Paradox>
Funcoot_, depends
pooriaazimi has joined #ruby
a_a_g has joined #ruby
sandGorgon has joined #ruby
browndawg has joined #ruby
sayan has quit [Read error: Connection reset by peer]
<bnagy>
personally I'd just use a basic datatype, not even a struct
<bnagy>
Hash etc
<Funcoot_>
You mean, you would use a hash?
<bnagy>
typically yeah
akashj87 has joined #ruby
<bnagy>
obviously if you have a lot you should be using a database
BizarreCake has joined #ruby
SeySayux has quit [Read error: Operation timed out]
<Funcoot_>
I'm just making practice programs to get some experience
<Funcoot_>
I really just want to make a program where I enter Vacation Resorts, their names, locations, and a short description
<bnagy>
serialising objects is the root of many evils
<Funcoot_>
Can't decide how I actually want to store the data
Villadelfia_ has joined #ruby
Villadelfia has quit [Ping timeout: 248 seconds]
devoper has joined #ruby
oposomme has joined #ruby
<Funcoot_>
So wait, serializing objects is even a bad idea? D;
<Paradox>
sounds like for your case
<Paradox>
a struct is perfect
pooriaazimi has quit [Quit: pooriaazimi]
<Paradox>
but if you want to have internal data manipulation
<bnagy>
not saying that, per se, just that it's caused many screwups in many languages
<Paradox>
you gotta use a class
<Paradox>
here's my thoughts
ryanf has quit [Ping timeout: 255 seconds]
<Paradox>
if im gonna be entering the same fields over and over again
bradhe has joined #ruby
<Paradox>
and they never change
<Paradox>
and i dont need to do any internal manipulations, struct
<Paradox>
if i need to do internal stuff, class
<Funcoot_>
What would be the best way to store that data?
<Paradox>
if they need to sometimes change, openstruct
<Paradox>
if they are too dynamic, hash or array
<Paradox>
array probably
<Funcoot_>
But how would I store that data on my computer after I close the program?
vlad_starkov has quit [Remote host closed the connection]
<artm>
the idea is that all my specs have the same logic, but I can't wrap my head around writing the spec so it tries different inputs with the same expectations
<artm>
shock_one, tmux?
jimeh has joined #ruby
squidBits has quit [Quit: squidBits]
<shock_one>
showterm
<artm>
mmm, showterm sounds interesting
squidBits has joined #ruby
Matip has joined #ruby
carraroj has quit [Client Quit]
adambeynon has joined #ruby
Funcoot_ has quit [Quit: Page closed]
Mattx has quit [Read error: Operation timed out]
sayan has joined #ruby
squidBits has quit [Ping timeout: 255 seconds]
hashmal has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
beneggett has joined #ruby
angusiguess has joined #ruby
squidBits has joined #ruby
eliasp has joined #ruby
hbpoison has quit [Ping timeout: 248 seconds]
icole has quit [Remote host closed the connection]
icole has joined #ruby
squidBits has quit [Ping timeout: 255 seconds]
angusiguess has quit [Ping timeout: 245 seconds]
apeiros_ has joined #ruby
sandGorgon has quit [Read error: Connection reset by peer]
sandGorgon has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
squidBits has joined #ruby
xpen has joined #ruby
dawkirst has quit [Read error: Operation timed out]
pcarrier has quit []
tay1 has quit [Ping timeout: 248 seconds]
samphippen has joined #ruby
xpen_ has quit [Ping timeout: 252 seconds]
marr has joined #ruby
squidBits has quit [Ping timeout: 255 seconds]
apeiros_ has quit [Read error: Connection reset by peer]
squidBits has joined #ruby
bradhe has joined #ruby
nomenkun has joined #ruby
oposomme has quit [Read error: Connection reset by peer]
jimeh has quit [Ping timeout: 256 seconds]
dawkirst has joined #ruby
pen has joined #ruby
L4mppu has joined #ruby
Catbuntu has joined #ruby
jimeh has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
nomenkun has quit [Ping timeout: 264 seconds]
<kaomoja_>
Does anyone know a ruby debugging tool such as ruby-debug(it works on ruby 1.8) and debugger(it works on ruby1.9) that works on ruby2.0 ?
hbpoison has joined #ruby
apeiros_ has joined #ruby
mpfundstein has joined #ruby
mpfundstein has quit [Remote host closed the connection]
MrZYX|off is now known as MrZYX
s1n4 has joined #ruby
s1n4 has quit [Client Quit]
jdolitsky has quit [Ping timeout: 276 seconds]
mercy____ has joined #ruby
sandGorgon has quit [Ping timeout: 245 seconds]
carraroj has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
carraroj has quit [Read error: Connection reset by peer]
carraroj has joined #ruby
<Paradox>
pry-debugger kaomoja_
carraroj has quit [Client Quit]
<Paradox>
nvm
<Paradox>
1.9.3 only
<Paradox>
pry-nav is supposedly independent of debug
mpfundstein has joined #ruby
gommo has joined #ruby
timonv has joined #ruby
nari has quit [Ping timeout: 256 seconds]
yashshah has quit [Read error: Connection reset by peer]
<Hanmac>
WHY does no one read my lines? teddyp1cker>>>> require "time"<<<<
<teddyp1cker>
o, sh~)
jonahR has quit [Quit: jonahR]
teddyp1cker has quit [Remote host closed the connection]
<apeiros_>
Hanmac: common problem :)
angusiguess has joined #ruby
yacks has joined #ruby
nicoulaj has joined #ruby
angusiguess has quit [Ping timeout: 248 seconds]
workmad3 has joined #ruby
maxmanders has joined #ruby
carraroj has joined #ruby
Apocalypse has quit [Ping timeout: 245 seconds]
maxmande_ has joined #ruby
pyrac has joined #ruby
dawkirst has quit [Ping timeout: 240 seconds]
carraroj has quit [Read error: Connection reset by peer]
carraroj has joined #ruby
roadt has joined #ruby
TheFuzzball has quit [Ping timeout: 246 seconds]
maxmanders has quit [Ping timeout: 240 seconds]
marcdel has quit []
floyd has joined #ruby
bluOxigen has joined #ruby
bradhe has joined #ruby
krainboltgreene has joined #ruby
TheFuzzball has joined #ruby
marcdel has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
BizarreCake has quit [Read error: Connection reset by peer]
icole has quit [Remote host closed the connection]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
dawkirst has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
ukd1 has joined #ruby
hbpoison has quit [Ping timeout: 252 seconds]
nomenkun has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
marcdel has quit []
ukd1 has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 264 seconds]
pettsson has joined #ruby
znode has joined #ruby
drale2k has quit [Quit: Leaving...]
io_syl has quit [Quit: Computer has gone to sleep.]
znode has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 252 seconds]
k610 has quit [Quit: Leaving]
sayan has quit [Ping timeout: 245 seconds]
<kaomoja_>
Paradox: pry-nav worked and it breaked at "binding.pry" line, on ruby 2.0. but it seems there are only continue, next, step commands, but break command.
d34th4ck3r has joined #ruby
banister`sleep has quit [Remote host closed the connection]
banister`sleep has joined #ruby
picca has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
hbpoison has joined #ruby
refd has quit [Read error: Connection timed out]
workmad3 has quit [Ping timeout: 260 seconds]
refd has joined #ruby
nari has joined #ruby
banister`sleep has quit [Read error: Connection reset by peer]
banister_ has joined #ruby
refd has quit [Max SendQ exceeded]
ndngvr has joined #ruby
Zolo has joined #ruby
Tricon has quit [Quit: Leaving...]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
swingha has joined #ruby
floyd has quit [Quit: Leaving.]
gommo has quit [Remote host closed the connection]
gommo has joined #ruby
DarKOoL has joined #ruby
DarKOoL has quit [Client Quit]
eka has joined #ruby
atyz has joined #ruby
jgrevich has quit [Remote host closed the connection]
gommo has quit [Ping timeout: 256 seconds]
angusiguess has joined #ruby
pyrac has quit [Quit: pyrac]
marr has quit [Ping timeout: 252 seconds]
m8 has joined #ruby
xardas has joined #ruby
HecAtic has quit [Quit: Àá¼ö]
atno has quit [Ping timeout: 264 seconds]
skattyadz has joined #ruby
devoper has quit [Remote host closed the connection]
devoper has joined #ruby
Guedes0 has joined #ruby
floyd has joined #ruby
atno has joined #ruby
maxmande_ has quit [Ping timeout: 245 seconds]
artm has quit [Quit: Ex-Chat]
artm has joined #ruby
fantazo has joined #ruby
francisfish has quit [Remote host closed the connection]
casheew has quit [Read error: Connection reset by peer]
gommo has joined #ruby
maxmanders has joined #ruby
francisfish has joined #ruby
<atno>
mooorning
artm has quit [Ping timeout: 248 seconds]
bradhe has joined #ruby
casheew has joined #ruby
pskosinski has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
charliesome has joined #ruby
sayan has joined #ruby
quazimodo has joined #ruby
<quazimodo>
haayyy
mityaz has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
eldariof has joined #ruby
sayan has quit [Ping timeout: 245 seconds]
hbpoison has quit [Read error: Connection reset by peer]
k610 has joined #ruby
gommo has quit [Remote host closed the connection]
gommo has joined #ruby
hbpoison has joined #ruby
hbpoison has quit [Read error: Connection reset by peer]
icole has joined #ruby
Faris has joined #ruby
akashj87 has joined #ruby
br4ndon has joined #ruby
niklasb has joined #ruby
horrror has joined #ruby
floyd has quit [Quit: Leaving.]
hbpoison has joined #ruby
gommo_ has joined #ruby
icole has quit [Ping timeout: 240 seconds]
codecop has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
gommo has quit [Ping timeout: 256 seconds]
yashshah has joined #ruby
danslo has quit [Ping timeout: 252 seconds]
hbpoison has quit [Read error: Connection reset by peer]
kristofers has joined #ruby
hbpoison has joined #ruby
Eldariof-ru has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
becom33 has joined #ruby
eldariof has quit [Ping timeout: 240 seconds]
<becom33>
I hear developing android application with ruby is possible but it requires ruby language installed in android ? or can be make a one apk which does everything ?
lkba has joined #ruby
whitedawg has quit [Quit: Leaving.]
backjlack has quit [Remote host closed the connection]
Zolo has quit [Remote host closed the connection]
Vert has quit [Ping timeout: 252 seconds]
niklasb has quit [Ping timeout: 245 seconds]
becom33 has quit [Ping timeout: 256 seconds]
pyrac has joined #ruby
atyz has quit [Quit: Leaving...]
AndChat| has quit [Ping timeout: 252 seconds]
hoelzro|away is now known as hoelzro
niklasb has joined #ruby
Xeago has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
gyre007 has joined #ruby
casheew has quit [Read error: Connection reset by peer]
atmosx has joined #ruby
slapt has quit [Ping timeout: 276 seconds]
kaomoja_ has left #ruby [#ruby]
cantonic has joined #ruby
casheew has joined #ruby
banister_ is now known as banisterfiend
maxmanders has quit [Ping timeout: 256 seconds]
maxmanders has joined #ruby
becom33 has joined #ruby
becom33 has joined #ruby
becom33 has quit [Changing host]
<Amfy>
I have another nooby question: If I have #<Resolv::DNS::Name: test.> how can I access 'test.'? object.name doesn't work
tommyvyo has joined #ruby
carraroj has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
carraroj has quit [Client Quit]
casheew has quit [Read error: Connection reset by peer]
<atmosx>
Amfy: via methods
Guedes0 has quit [Ping timeout: 264 seconds]
<atmosx>
object.methods.sort.join(', ') will display tha available methods for this obj
<atmosx>
reading the documentation might be better for newbies though
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
Zolo has quit [Remote host closed the connection]
vickaita has quit [Ping timeout: 245 seconds]
casheew has quit [Read error: Connection reset by peer]
jeremywr1we has quit [Client Quit]
Neomex has joined #ruby
blf has joined #ruby
Neomex has quit [Client Quit]
<blf>
Are Ruby arrays particularly slow?
serhart has joined #ruby
workmad3 has joined #ruby
<Hanmac>
blf compared to what?
teddyp1cker has joined #ruby
<blf>
Java arrays or C arrays
<lewix>
possibly
tommyvyo has quit [Quit:]
<lewix>
although I'm not sure what you mean
<blf>
Granted, I'm iterating over millions of elements, but I don't think it should take 20 seconds.
casheew has joined #ruby
<sepp2k>
blf: Everything is slower in Ruby than it is in Java or C. It's more meaningful to ask whether Ruby arrays are slow compared to other things you can do in Ruby instead of using arrays.
<blf>
I've even taken measures to ensure that I'm only accessing elements in a forward-only direction.
moos3 has quit [Quit: Computer has gone to sleep.]
whowantstolivef1 has quit [Ping timeout: 245 seconds]
<lewix>
lol
m3pow has quit [Ping timeout: 264 seconds]
BRMatt has joined #ruby
<blf>
Why's that funny?
bradhe has joined #ruby
jamescarr has quit [Quit: jamescarr]
<blf>
I should encounter fewer cache misses if I'm not bouncing back and forth between previous elements and the current element, right?
<Hanmac>
ruby does some caching then making subarrays, but only for a bit memory saving
drumsrgr1 has quit [Ping timeout: 276 seconds]
jetblack has joined #ruby
cheez0r has quit [Ping timeout: 264 seconds]
<sepp2k>
blf: Yes, but if the things inside your array aren't integers, you have an array of pointers to (presumably non-contiguous) heap memory. So you'll still have plenty of cache misses.
<sepp2k>
Hanmac: Pretty sure he's talking about the CPU cache.
bradhe has quit [Ping timeout: 264 seconds]
<blf>
sepp2k: That could be where the problem lies. I guess I'll go run a couple tests.
<sepp2k>
(The same is true for arrays of non-primitve values in Java as well).
kornnflake is now known as kornnflake_zzz
sayan has joined #ruby
drumsrgr1 has joined #ruby
niklasb has joined #ruby
<blf>
sepp2k: Indeed. I don't know why I thought I was allocating a single contiguous space of memory large enough to hold however many elements of size: sizeof(element).
<Hanmac>
blf google why ruby strings less 23 chars are faster to allocate then others ... its also true for arrays less than 3 elements
<blf>
Hanmac, I'll check that out. Not sure it'll help in this situation, though. I'm implementing the Needleman-Wunsch dynamic alignment algorithm and aligning multiple sequences of many thousands length.
Xeago has quit [Remote host closed the connection]
astrostl has quit []
yashshah has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
d2dchat has quit [Remote host closed the connection]
maxmanders has quit [Ping timeout: 264 seconds]
floyd has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
xpen_ has quit [Remote host closed the connection]
maxmanders has joined #ruby
Xeago has joined #ruby
tanob has joined #ruby
tealmage has joined #ruby
fschuindt has joined #ruby
drale2k has quit [Ping timeout: 252 seconds]
tenmilestereo has quit [Quit: Leaving]
<tanob>
hey there, what do you guys use to find memory leaks in Rails apps? I see memprof but it doesn't seem to work in 1.9
Davey has quit [Quit: Computer has gone to sleep.]
<Hanmac>
tanob that is the wrong question ... rails IS a memory leak :D
adambeynon has quit [Quit: Computer has gone to sleep.]
cheez0r has joined #ruby
pskosinski has joined #ruby
adambeynon has joined #ruby
generalissimo has joined #ruby
<tanob>
Hanmac: hehe, I can see some refs that hold by Procs but I can't find a way to find which Procs
Guedes0 has joined #ruby
<Hanmac>
tanob rails has more problems ... like json and symbols :P
<tanob>
that sounds more like Ruby problems
<Hanmac>
tanob no, only rails used them wrong
drumsrgr1 has quit [Ping timeout: 264 seconds]
<Hanmac>
tanob they are SO anonying that they requested on the issue tracker to make symbols GC'able
crackfu has joined #ruby
<tanob>
any problems on symbols being GC'able?
bradhe has joined #ruby
Guedes0 has quit [Ping timeout: 264 seconds]
<Hanmac>
tanob: hm not so much ... it only breaks EVERY more advanced C(++) gem, but rails users do not care about that
crackfu has quit [Changing host]
crackfu has joined #ruby
jastix has quit [Quit: Leaving]
teddyp1cker has quit [Remote host closed the connection]
<tanob>
talking about C, do you know how to keep track of the file/line where an object got instantiated? I was looking memprof's code and he used some low level trampoline
<tanob>
I was thinking if there wouldn't be an easier and more portable way of doing that
bradhe has quit [Read error: Operation timed out]
kofno has joined #ruby
hbpoison has joined #ruby
m3pow has joined #ruby
browndawg has joined #ruby
Promotos has quit [Ping timeout: 252 seconds]
tay1 has joined #ruby
jamescarr has joined #ruby
eAlche___ has joined #ruby
tay1 has quit [Read error: Connection reset by peer]
tay1 has joined #ruby
kofno has quit [Ping timeout: 245 seconds]
tay1 has quit [Read error: Connection reset by peer]
tay1 has joined #ruby
tay1 has quit [Read error: Connection reset by peer]
tay1 has joined #ruby
eAlchemist has quit [Ping timeout: 245 seconds]
tay1 has quit [Read error: Connection reset by peer]
<as-cii>
banisterfiend: you haven't been writing for a while, haven't you?
<Rojun>
I'm trying to install redmine out of curiosity. could someone tell me advice about what's probably going wrong? "Gemfile:44:in 'block in eval_gemfile': undefined method '[]' for nil:NilClass (NoMethodError)"
<lewix>
ok too advanced was not the appropriate word as-cii
<banisterfiend>
as-cii: no :)
<havenwood>
as-cii: Not a blog, but fun Ruby (Mon episodes are free too)! http://www.rubytapas.com
casheew has joined #ruby
<Rojun>
I haven't tampered with anything but the database.yml, which has been copy pasted. I
<lewix>
i wish more blogs had themes
<lewix>
and not random ideas there and there
BizarreCake has joined #ruby
<tay1>
how do i check if a word exists within a sentence?
<Rojun>
the gemfile is 'virgin' straight from the site
pavilionXP has joined #ruby
<lewix>
havenwood: checking
<tay1>
is it include?
<as-cii>
havenwood: thank you :)
kofno has joined #ruby
anderse has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
wobblini has quit [Read error: Operation timed out]
lewix has quit [Remote host closed the connection]
dcwu has joined #ruby
eAlchemist has joined #ruby
ryanf has joined #ruby
randomor has joined #ruby
as-cii has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
eAlchemist has quit [Ping timeout: 252 seconds]
colonolGron has joined #ruby
ChristianS has quit [Excess Flood]
sepp2k has joined #ruby
ChristianS has joined #ruby
mpfundstein has joined #ruby
markisonfire has joined #ruby
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
sonda has quit [Remote host closed the connection]
<Paradox>
somone ping me
<Paradox>
?
kornnflake is now known as kornnflake_zzz
originalcamper has joined #ruby
Zolo has quit [Remote host closed the connection]
atyz has joined #ruby
<originalcamper>
is there a preference between using a gemfile or declaring dependencies in a gemspec for a new gem? is there an established best practice for this?
bradhe has joined #ruby
<Hanmac>
originalcamper: gemspec are for rake or rubygems, gemfile are for bundler
happydude has quit [Quit: Leaving]
jimeh has joined #ruby
r0bby has joined #ruby
robbyoconnor has quit [Disconnected by services]
r0bby is now known as robbyoconnor
Stilo has joined #ruby
sayan has quit [Ping timeout: 245 seconds]
tommylommykins has joined #ruby
* tommylommykins
waves
L4mppu has quit [Quit: Leaving]
L4mppu has joined #ruby
L4mppu has quit [Changing host]
L4mppu has joined #ruby
mockra has joined #ruby
<hackeron>
is there some library for Ruby to fork say 100 processes and monitor them and restart if needed? -- I tried God and Bluepill but they had no dependencies (starting 1 process only if another is started) and weren't really suited for more than a few processes (very high CPU load with more than 20 or so).
Eldariof-ru has joined #ruby
<originalcamper>
Hanmac: thanks for the response
sgmac has joined #ruby
eldariof has quit [Ping timeout: 276 seconds]
BizarreCake has quit [Ping timeout: 264 seconds]
ArchBeOS has joined #ruby
ArchBeOS has quit [Changing host]
ArchBeOS has joined #ruby
jlast has joined #ruby
blf has quit [Quit: Page closed]
hadees has joined #ruby
chipotle_ has quit [Quit: cya]
lewix has joined #ruby
bouchou has joined #ruby
jeffreybaird has joined #ruby
sgmac has left #ruby ["Leaving"]
matchaw has joined #ruby
BizarreCake has joined #ruby
robbyoconnor has quit [Ping timeout: 276 seconds]
skbierm has joined #ruby
r0bby has joined #ruby
bouchou has quit []
sgmac has joined #ruby
timmow has joined #ruby
jetblack has quit [Remote host closed the connection]
timmow has quit [Remote host closed the connection]
timmow has joined #ruby
drumsrgr1 has quit [Ping timeout: 276 seconds]
hadees has quit [Quit: hadees]
vlad_sta_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
tish has quit [Quit: Leaving.]
r0bby has quit [Ping timeout: 240 seconds]
lewix has quit [Remote host closed the connection]
rickmasta has quit [Quit: Leaving...]
pepper_chico has quit [Quit: Computer has gone to sleep.]
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
Morkel has joined #ruby
s3m73x has quit [Quit: I'm using a Free IRC Bouncer from BNC4FREE - http://bnc4free.com/]
BizarreCake has quit [Quit: Leaving]
jimeh has quit [Quit: Computer has gone to sleep.]
pskosinski has quit [Remote host closed the connection]
pepper_chico has joined #ruby
bitZero__ has quit [Quit: leaving]
pskosinski has joined #ruby
aed has quit [Quit: aed]
sandGorgon has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
adkron has joined #ruby
aed has joined #ruby
thone has joined #ruby
shock_one has joined #ruby
Grieg has quit [Read error: Connection reset by peer]
dr0p has joined #ruby
yacks has quit [Quit: Leaving]
Nimsical has joined #ruby
i42n has joined #ruby
skattyadz has quit [Quit: skattyadz]
thone_ has quit [Ping timeout: 264 seconds]
Guest44762 has quit [Ping timeout: 252 seconds]
<i42n>
Short question: I added a gem in my Gemfile without specifying a version. Now a 'bundle install' always installs a version of the gem that is a lot older than the newest version listen in rubygems.org. What am I doing wrong?
colonolGron has quit [Ping timeout: 255 seconds]
fschuindt has quit [Quit: Computer has gone to sleep.]
<MrZYX>
try bundle update gemname
<i42n>
MrZYX: if the gem is not installed yet should bundler not install the newest version by default?
<MrZYX>
hm yeah but maybe it is installed and you didn't notice? :P
<MrZYX>
other possibility: it is a dependency of another gem you have in which locks it down to that version
germanstudent has joined #ruby
<i42n>
MrZYX: how can I check that? Or should a 'bundle update gemname' solve it?
<MrZYX>
bundle update might solve it if it's not locked down too much. In any case read your Gemfile.lock
<Hanmac>
i42n look at #bundler
<i42n>
ok...
<MrZYX>
Hanmac just doesn't like bundler ;P
Nimsical has quit [Quit: Computer has gone to sleep.]
<Hanmac>
i dont know why i should need it when rake is fine too
pen has joined #ruby
<MrZYX>
hm, how does rake solve dependency management?
kofno has joined #ruby
razibog has quit [Ping timeout: 264 seconds]
kornnflake_zzz is now known as kornnflake
sigje has joined #ruby
luisalima has quit [Ping timeout: 245 seconds]
skbierm has quit [Quit: Verlassend]
luisalima has joined #ruby
rickmasta has joined #ruby
<Hanmac>
MrZYX: rake does maybe not, but rubygems can
<MrZYX>
dependency management of your application, not of the gems your application depends on
happydude has joined #ruby
tealmage has quit [Remote host closed the connection]
marcdel has quit []
marr has joined #ruby
pepper_chico has quit [Quit: Computer has gone to sleep.]
Eldariof-ru has quit [Remote host closed the connection]
<Hanmac>
MrZYX: i still dont get it for what accactly i need bundler where rubygems is fine too ... all what you call "application" is a gem for my projects too
tealmage has joined #ruby
markisonfire has quit [Quit: markisonfire]
<MrZYX>
bundler doesn't replace rubygems it utilises it. And there are applications you don't want to package as a gem
skattyadz has joined #ruby
eldariof has joined #ruby
kofno has quit [Ping timeout: 264 seconds]
m8 has joined #ruby
blacktulip has joined #ruby
hoelzro|away is now known as hoelzro
marcdel has joined #ruby
tealmage has quit [Remote host closed the connection]
motto has quit [Ping timeout: 264 seconds]
jimeh has joined #ruby
happydude has quit [Quit: Leaving]
brandon has joined #ruby
brandon is now known as Guest71936
<shevy>
MrZYX sexy apps?
lethjakman has quit [Ping timeout: 252 seconds]
<shevy>
I am not sure why we need bundler either
<MrZYX>
so you package everything as gem?
tealmage has joined #ruby
<shevy>
yeah
mduvall has joined #ruby
<shevy>
actually I use setup.rb for my local things
<shevy>
a local ruby script can turn those into gems though and then push to rubygems
yashshah_ has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
lethjakman has joined #ruby
yashshah_ has joined #ruby
artm has quit [Ping timeout: 248 seconds]
ryanf has quit [Quit: leaving]
<shevy>
but I usually turn only scripts into gems that could be useful for others
robbyoconnor has joined #ruby
kornnflake is now known as kornnflake_zzz
Guedes0 has joined #ruby
Astral__ has quit [Ping timeout: 245 seconds]
adkron has quit [Ping timeout: 256 seconds]
ToApolytoXaos has joined #ruby
neku has quit [Quit: Leaving...]
artm has joined #ruby
sandGorgon has quit [Ping timeout: 240 seconds]
atyz has quit [Quit: Leaving...]
mikepack has quit [Remote host closed the connection]
<aedornm>
It was a '-' ... I spent 3 days troubleshooting an issue because of a '-'!
sandGorgon has joined #ruby
brianpWins has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
generalissimo has joined #ruby
<shevy>
haha
<shevy>
how that?
<shevy>
5 - 3 ?
jimeh has joined #ruby
<aedornm>
no.. -eltorito-platform-efi instead of -eltorito-platform efi
sambao21 has quit [Quit: Computer has gone to sleep.]
avelldiroll has quit [Ping timeout: 245 seconds]
aed has quit [Quit: aed]
samphippen has joined #ruby
shock_one has quit [Ping timeout: 255 seconds]
<shevy>
ohhh
<shevy>
this is not that uncommon in the universe
<shevy>
I compared debian package naming scheme to suse to fedora
<shevy>
they all used different names, with differently set '-' in between
tay1 has quit [Ping timeout: 264 seconds]
<shevy>
for the same package :\ :/
ziprar has quit [Read error: Connection reset by peer]
bradleyprice has joined #ruby
hubub has quit [Quit: hubub]
vlad_starkov has joined #ruby
brianpWins has quit [Quit: brianpWins]
whitedawg has quit [Quit: Leaving.]
<aedornm>
Well, I guess I did catch some other bugs but still... I'm sure it wouldn't have taken 3 days if not for that stupidness.
<shevy>
I think I'll dive into C again, thanks guys
<MrZYX>
kraljev3: Timezone?
<shevy>
kraljev3 you want the seconds?
<kraljev3>
For sure, but how can I avoid that compensation
<kraljev3>
i'm representing time intervals, so this gives me headaches
<kraljev3>
I want the program to be timezone independent
markisonfire has joined #ruby
<kraljev3>
Hm, I'll just subtract the offset
squidBits has quit [Quit: whoops]
artm has quit [Ping timeout: 248 seconds]
eAlchemist has joined #ruby
ToApolytoXaos has left #ruby ["Leaving"]
<shevy>
hmm would you guys recommend C + vim? or should I be lazy and use a fat IDE ... :\
<hoelzro>
shevy: it works pretty well
<hoelzro>
Vim was written with C in mind
tealmage has quit [Remote host closed the connection]
<Catbuntu>
Hi
<shevy>
ok
<Catbuntu>
One question about regex
<shevy>
hey Catbuntu
<shevy>
Two answers :)
<shevy>
one question... two answers... but where is the question!
<Catbuntu>
Why does ^(^.*)\.kensaku.(.*) in "blah.kensaku.com" match both blah and com, but ^(^.*)\.kensaku.com/(.*) in blah.kensaku.com/bleh don't work?
<Bofu2U>
did you escape the last slash?
<Bofu2U>
\/
beneggett has quit [Quit: Computer has gone to sleep.]
jrajav has quit [Quit: I tend to be neutral about apples]
zack has joined #ruby
<zack>
Anyone here good with statistics?
sepp2k has quit [Remote host closed the connection]
Davey has joined #ruby
kofno has quit [Ping timeout: 276 seconds]
yfeldblum has joined #ruby
<Turkishviking>
maybe
becom33 has quit [Quit: Leaving]
<Turkishviking>
what's your problem?
Spooner has quit [Remote host closed the connection]
<zack>
Turkishviking: I bought 3 stocks on 1/1/2013. I earned a 10% return. During the same period, the S&P 500 returned 5%. Are my results statistically significant?
Spooner has joined #ruby
lethjakman has quit [Ping timeout: 252 seconds]
mengu has quit [Quit: Konversation terminated!]
Yakko has quit [Remote host closed the connection]
<Turkishviking>
you must have more than 3 stocks to make satistics, I don't think that it is significant
<zack>
What's the minimum?
drumsrgr1 has quit [Ping timeout: 245 seconds]
<Turkishviking>
statistic is a mathemathic tool to study big populations