<cakehero>
offby1 you couldn't stop petting the pussy?
stephenjudkins has joined #ruby
apok has quit [Ping timeout: 252 seconds]
havenn has quit [Remote host closed the connection]
passbe has joined #ruby
xaq has quit [Remote host closed the connection]
macmartine has joined #ruby
sailias has joined #ruby
RainbowDashh has quit [Quit: SLEEP MODE. <REDACTED SUBORBITAL QUOTE HERE>]
undersc0re has joined #ruby
liluo has joined #ruby
randomubuntuguy has quit [Ping timeout: 244 seconds]
iori has joined #ruby
t0mmyvyo has joined #ruby
bigkm has joined #ruby
ken_barber has joined #ruby
brasten has joined #ruby
freeayu has quit [Ping timeout: 246 seconds]
brasten has quit [Client Quit]
Ethan has quit [Ping timeout: 246 seconds]
werdnativ has quit [Quit: werdnativ]
austinbv1 has joined #ruby
gtuckerkellogg has joined #ruby
pk1001100011 has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
bandu has joined #ruby
RainbowDashh has joined #ruby
yugui is now known as yugui_zzz
yugui_zzz is now known as yugui
bandu is now known as tama
mockra has quit [Remote host closed the connection]
<tama>
so i just joined a local ruby user's group. planning on attending the meetup at the first tuesday of the month, which is july the 3rd. i'm going to sign up for rubyconf. just need to get some things out of the way. how's everyone?
<shadoi>
icy`: because && makes it compare 2 statements, not 3 (as it appears without putty Array in parens)
<shadoi>
icy`: you could also do: true && ([].is_a? Array)
ryanf has joined #ruby
<shadoi>
s/putty/putting/
<shadoi>
heh
randomubuntuguy has quit [Ping timeout: 245 seconds]
<icy`>
;P
<macmartine>
i prefer putty
perryh_away is now known as perryh
undersc0re is now known as Ethan
bambanx_ has quit [Client Quit]
<icy`>
ok i think i see what you mean
t0mmyvyo has joined #ruby
<shadoi>
also
<shadoi>
s/compare/evaluate/
bambanx has quit [Ping timeout: 255 seconds]
todd has joined #ruby
<icy`>
just doesnt have as strong a precedence without the ( )
perryh is now known as perry
cakehero has quit [Quit: Computer has gone to sleep.]
<macmartine>
wow, i didn't know you could do this with parens or a space: [].is_a?Array
<macmartine>
*without
davidcelis has quit [Ping timeout: 252 seconds]
artOfWar has joined #ruby
Fezzler has joined #ruby
macmartine has quit [Quit: macmartine]
kpshek has quit [Ping timeout: 264 seconds]
yugui_zzz is now known as yugui
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
mnaser has quit [Quit: Computer has gone to sleep.]
kevinbond has joined #ruby
krusty_ar has quit [Read error: Connection reset by peer]
kevinbond has quit [Client Quit]
pylix has quit [Quit: Leaving]
krusty_ar has joined #ruby
* offby1
shivers
artOfWar_ has joined #ruby
randomubuntuguy has joined #ruby
<offby1>
every language has its quirks. I'm still not used to Ruby's whitespace rules.
beneggett has joined #ruby
cakehero has joined #ruby
cyong has joined #ruby
Sheehan has joined #ruby
brianpWins has quit [Quit: brianpWins]
Sheehan has quit [Client Quit]
yugui is now known as yugui_zzz
artOfWar has quit [Ping timeout: 246 seconds]
<icy`>
mm
<icy`>
i like exploring them though
yugui_zzz is now known as yugui
Progster has quit [Ping timeout: 240 seconds]
blumbri has joined #ruby
<icy`>
what if i had a pointer/alias setup as follows: @items[:hats] = [ @items[:blue],@items[:red],@items[:green] ] , where @items is a hash. Is there any way I could use something like @items[:hats][0] and somehow obtain :blue ?
tama has quit [Ping timeout: 244 seconds]
Ethan has quit [Read error: Connection reset by peer]
Ethan has joined #ruby
<icy`>
not the value of :blue, but :blue itself
<icy`>
"blue"
<bnagy>
sure
blumbri has quit [Client Quit]
<bnagy>
make @items[:blue]=>:blue
blumbri has joined #ruby
<icy`>
@items[:blue] already has its own value though
<bnagy>
so then no :)
adeponte has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<icy`>
ah ok =/
<fowl>
icy`, define a class
adeponte has quit [Remote host closed the connection]
blumbri has quit [Read error: Connection reset by peer]
<bnagy>
put it differently - what's at that index?
xnm has quit [Read error: Connection reset by peer]
blumbri has joined #ruby
<icy`>
a structure ;P
<bnagy>
it's a pointer to @items[:blue], let's call it a pointer to "fred"
<bnagy>
you're trying to say 'hey pointer to fred, I need the thing that points to you'
<shadoi>
icy`: @items.key(:blue)
<bnagy>
and fred will say, dude, a lot of things point to me, I'm like famous
<icy`>
lol
austinbv1 has joined #ruby
<icy`>
shadoi, that returns nil
Beoran_ has quit [Ping timeout: 248 seconds]
<shadoi>
icy`: sounds like you need to refactor your data and/or use structs or classes
<icy`>
i had @items with for example :blue :red :green, and thought i'd make a convenience alias :hats which contained them all
<shadoi>
each of your @items should have a color attribute and a type attribute so you can find all the items that are blue and that are also hats.
<icy`>
that was the idea
jcromartie has quit [Quit: jcromartie]
<bnagy>
just use @items.values, for that
<bnagy>
it's built in :)
<shadoi>
yeah, he just needs the right keys in those hashes, instead of nesting arrays of the same hash
<icy`>
yea
<bnagy>
I dunno, I was just looking at the deref / xref aspect of the question
<shadoi>
I love OpenStruct for this kind of stuff
<icy`>
shadoi, oh you're right though, i could just add another attribute to the struct
<bnagy>
well unless I missed it, you aven't explained what you're actually trying to do
beneggett has quit [Ping timeout: 252 seconds]
<bnagy>
I thought it was just a question for the joy of abstruse language questions
<pavlov99_>
thank you, cherrypeel. ARGF does not work well, but STDIN.gets does
<icy`>
i must be getting tired. I stared for about 5min at undefined method `is_a' for #<#<Class:0x0000000227d998>:0x0000000227d830> (NoMethodError) ....before i realized I had forgotten a question mark
<tama>
aww.
Ontolog_ has quit [Remote host closed the connection]
Ontolog has joined #ruby
jxf has quit [Ping timeout: 245 seconds]
<offby1>
didn't all those hex digits help you discover your error? :-\
<tama>
i feel sick.
adeponte has joined #ruby
TheHunter_1039 has quit [Quit: TheHunter_1039]
Caius has joined #ruby
Ontolog has quit [Ping timeout: 252 seconds]
ryanf has quit [Ping timeout: 248 seconds]
jesly has quit [Ping timeout: 246 seconds]
bradhe has joined #ruby
<dekz>
I have no idea what method + class this line of code is executing against, it's not my code and it has so many dependencies that it's a little silly. What's the best way to try and find out where it's defined?
jwmann has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
emdub_ has joined #ruby
artOfWar has quit [Ping timeout: 240 seconds]
jwmann has joined #ruby
ph^ has joined #ruby
maletor has joined #ruby
artOfWar has joined #ruby
emdub has quit [Quit: .]
hmans has joined #ruby
emdub_ has quit [Client Quit]
emdub has joined #ruby
nirakara has joined #ruby
hmans has quit [Client Quit]
eurbach has joined #ruby
artOfWar_ has joined #ruby
banisterfiend has joined #ruby
cantonic has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
banghouse has joined #ruby
atmosx has quit [Ping timeout: 276 seconds]
emdub has quit [Client Quit]
emdub has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
atmosx has joined #ruby
Siphonblast has quit [Remote host closed the connection]
artOfWar has quit [Ping timeout: 245 seconds]
banghouse has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
Caius has quit [Ping timeout: 252 seconds]
lkba has quit [Quit: Bye]
hoelzro|away is now known as hoelzro
iori has quit [Read error: Connection reset by peer]
tzvi has joined #ruby
rushed has joined #ruby
iori has joined #ruby
fgwaegeawgfwa has joined #ruby
MetaCosm_ has joined #ruby
MetaCosm has quit [Read error: Operation timed out]
MetaCosm_ is now known as MetaCosm
Freddie has joined #ruby
maesbn_ has joined #ruby
sei has joined #ruby
patronus_ has joined #ruby
wargasm1 has joined #ruby
jimeh has joined #ruby
s0ber_ has joined #ruby
jwmann has quit [*.net *.split]
maesbn has quit [*.net *.split]
tama has quit [*.net *.split]
nilg has quit [*.net *.split]
seitensei has quit [*.net *.split]
radic has quit [*.net *.split]
whuffor has quit [*.net *.split]
Gavilan has quit [*.net *.split]
mfridh has quit [*.net *.split]
mpereira_ has quit [*.net *.split]
notbrent has quit [*.net *.split]
tzvi|work has quit [*.net *.split]
pygospa has quit [*.net *.split]
BrokenCog has quit [*.net *.split]
Axsuul has quit [*.net *.split]
wargasm has quit [*.net *.split]
cuppsy has quit [*.net *.split]
fowl has quit [*.net *.split]
punkrawkR has quit [*.net *.split]
kkiero has quit [*.net *.split]
canton7 has quit [*.net *.split]
kalleth has quit [*.net *.split]
indeterminate has quit [*.net *.split]
s0ber has quit [*.net *.split]
musl has quit [*.net *.split]
tris has quit [*.net *.split]
AlbireoX has quit [*.net *.split]
faulkner has quit [*.net *.split]
rudle has quit [*.net *.split]
busybox42 has quit [*.net *.split]
hackeron has quit [*.net *.split]
thomas has quit [*.net *.split]
zeroXten has quit [*.net *.split]
j0llyr0tten has quit [*.net *.split]
jigman has quit [*.net *.split]
epochwolf|vps has quit [*.net *.split]
conceal_rs_ has quit [*.net *.split]
nahhh has quit [*.net *.split]
patronus has quit [*.net *.split]
ged has quit [*.net *.split]
faulkner- has joined #ruby
zeroXten has joined #ruby
s0ber_ is now known as s0ber
luckyruby has quit [Remote host closed the connection]
pygospa has joined #ruby
nilg` has joined #ruby
AlbireoX has joined #ruby
jwmann has joined #ruby
arturaz has quit [Ping timeout: 246 seconds]
Caius has joined #ruby
busybox42 has joined #ruby
kkiero has joined #ruby
BrokenCog has joined #ruby
thomas has joined #ruby
cuppsy has joined #ruby
j0llyr0tten has joined #ruby
epochwolf|vps has joined #ruby
epochwolf|vps has quit [Changing host]
epochwolf|vps has joined #ruby
seitensei has joined #ruby
hackeron has joined #ruby
tama has joined #ruby
nahhh has joined #ruby
ged has joined #ruby
arturaz has joined #ruby
mfridh has joined #ruby
rudle has joined #ruby
ged has quit [Excess Flood]
kalleth has joined #ruby
Axsuul has joined #ruby
mfridh has quit [Read error: Connection reset by peer]
notbrent has joined #ruby
beneggett has joined #ruby
<Sp4rKy>
anyone knows if any usual rake task are available to test if a db:migrate is required ?
maletor has quit [Quit: Computer has gone to sleep.]
zommi has joined #ruby
ged has joined #ruby
tris has joined #ruby
RainbowDashh has quit [Quit: QUIT! Accident or on purpose? :3]
<dankest>
Sp4rKy: could you define a specific scenario?
conceal_rs_ has joined #ruby
fowl has joined #ruby
fowl has quit [Changing host]
fowl has joined #ruby
RainbowDashh has joined #ruby
radic has joined #ruby
whuffor has joined #ruby
jigman has joined #ruby
<Sp4rKy>
dankest: yes
tris has quit [Excess Flood]
mklappstuhl has quit [Ping timeout: 272 seconds]
ph^_ has joined #ruby
jprovazn_away is now known as jprovazn
musl has joined #ruby
sspiff has joined #ruby
tris has joined #ruby
mpereira_ has joined #ruby
maletor has joined #ruby
maletor has quit [Client Quit]
apeiros_ has joined #ruby
bosphorus has joined #ruby
Eldariof-ru has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
pooya72 has quit [Quit: pooya72]
atmosx has quit [Ping timeout: 276 seconds]
maletor has joined #ruby
cforce has joined #ruby
prometheus has quit [Ping timeout: 248 seconds]
emmanuelux has quit [Ping timeout: 244 seconds]
ukd1 has quit [Ping timeout: 240 seconds]
cantonic has quit [Quit: cantonic]
nirakara has quit [Quit: This computer has gone to sleep]
mfridh has joined #ruby
tomaw_ is now known as tomaw
ebanoid has quit [Ping timeout: 244 seconds]
mockra_ has quit [Remote host closed the connection]
atmosx has joined #ruby
jarednorman has quit [Ping timeout: 265 seconds]
blacktulip has joined #ruby
ebanoid has joined #ruby
cantonic has joined #ruby
BiHi has joined #ruby
mockra has joined #ruby
banisterfiend has quit [Remote host closed the connection]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
mockra has quit [Remote host closed the connection]
<ryanf>
db:migrate:status ?
<ryanf>
also /join #rubyonrails, for the record
coderhut has joined #ruby
stephenjudkins has joined #ruby
coderhut has quit [Client Quit]
coderhut has joined #ruby
pooya72 has joined #ruby
ryanf has quit [Quit: leaving]
plastics has joined #ruby
<cforce>
hi I need some advice with bundler issue Using several gemspecs defining same gem, i would expect that the gem ins installed with "bundle install" which all version requirements Example: Gemspec1: rspec (~> 1.3) Gemspec2: rspec (~> 1.3.0) Running "bundle intsall" says "You cannot specify the same gem twice with different version requirements. You specified: rspec (~> 1.3) and rspec (~> 1.3.0)" Why does bundle install not just 1.3 which i
<cforce>
Shouldn't be the range > or < allow a range of gems to be compatible and bundler just chooses a version in that range?
jianxioy has joined #ruby
jianxioy has quit [Client Quit]
francisfish has joined #ruby
jianxioy has joined #ruby
emmanuelux has joined #ruby
plastics has quit [Ping timeout: 240 seconds]
acotie_ is now known as j__
j__ is now known as ^
Tricks has quit [Read error: Connection reset by peer]
francisfish has quit [Ping timeout: 252 seconds]
francisfish has joined #ruby
_br_ has joined #ruby
mockra has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
bier__ has joined #ruby
bier_ has quit [Ping timeout: 244 seconds]
companion has quit [Read error: Operation timed out]
__main__ has joined #ruby
Shahor has joined #ruby
Shahor has quit [Client Quit]
_br_ has quit [Quit: Bye, thanks for all the fish.]
_main_0 has quit [Ping timeout: 248 seconds]
dnyy has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
_br_ has joined #ruby
Burgestr_ has joined #ruby
Burgestr_ has quit [Client Quit]
AlbireoX`Laptop has quit [Remote host closed the connection]
ebanoid has quit [Ping timeout: 248 seconds]
Morkel has joined #ruby
wallerdev has quit [Quit: wallerdev]
ebanoid has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
Banistergalaxy has joined #ruby
fixl|2 has joined #ruby
__main__ has joined #ruby
companion has joined #ruby
mockra has quit [Remote host closed the connection]
boo1 has left #ruby [#ruby]
_br_ has quit [Quit: Bye, thanks for all the fish.]
mikepack has joined #ruby
^ is now known as acotie
banseljaj is now known as imami|afk
moshef has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
durre has joined #ruby
<durre>
I installed RVM through homebrew and now RVM seems to be overriding all my environment PATH's and replacing it with RVM stuff. I can't seem to find where it sets it. not .profile and not .bashrc … ideas?
raposa has joined #ruby
<hoelzro>
durre: .bash_profile?
coderhut has quit [Quit: Page closed]
monkegjinni has joined #ruby
perry is now known as perryh_away
mklappstuhl has joined #ruby
blendedbychris has joined #ruby
atmosx has quit [Remote host closed the connection]
qwerxy has joined #ruby
robotmay has joined #ruby
atmosx has joined #ruby
artOfWar_ has quit [Ping timeout: 240 seconds]
davidw has joined #ruby
Criztian has joined #ruby
workmad3 has joined #ruby
moosya has joined #ruby
banghouse has joined #ruby
nai has joined #ruby
banghouse has quit [Remote host closed the connection]
moshef has quit [Quit: moshef]
jmcphers has quit [Ping timeout: 252 seconds]
jmcphers has joined #ruby
thecreators has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
ananthakumaran1 has joined #ruby
nics has joined #ruby
iori has quit [Remote host closed the connection]
railswarrior has joined #ruby
<railswarrior>
hi using hpricot in ruby for parsing
<nics>
Hi everybody, I just recognized, that the hashes of a particular string are different across different runs of a program. Looking at ruby's sources, I found out, that rb_memhash (string.c:2163) calls st_hash() with a random seed. Does anyone know what the deeper reason for this randomization of string hashes is?
<hoelzro>
nics: security
ananthakumaran has quit [Ping timeout: 265 seconds]
liluo has quit [Remote host closed the connection]
udante has quit [Remote host closed the connection]
<Cork>
anyone know i theres a (debian like) mail link filter lib for ruby
<Cork>
that rips out the link from the body and adds [] in there place and appends the links at the end
hackeron has quit [Read error: Operation timed out]
eurbach has quit [Remote host closed the connection]
hackeron has joined #ruby
jcromartie has quit [Quit: jcromartie]
simao has left #ruby [#ruby]
BiHi has joined #ruby
azariah4 has quit [Read error: Connection reset by peer]
kaneda has quit [Remote host closed the connection]
neektza has left #ruby ["WeeChat 0.3.6"]
fgwaegeawgfwa has left #ruby [#ruby]
Enekoos has joined #ruby
mfridh has quit [Ping timeout: 255 seconds]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
iori has quit [Remote host closed the connection]
AxonetBE1 has joined #ruby
KDr2 has joined #ruby
ipoval has joined #ruby
kill-9_ has joined #ruby
<AxonetBE1>
I have a soap client where I reduce the read_timeout to 2 seconds, but sometimes some methods need the default value = 500, but because they use often the some @@client object, the value of timeout becomes also 2 for this methods, how to solve this? https://gist.github.com/3003686
<bnagy>
well.. why aren't you instantiating your Client class?
<bnagy>
and make your internal Savon::Client an ivar
<bnagy>
then you can have multiple clients and use different settings on each one
alek_b has quit [Remote host closed the connection]
frishi has quit [Quit: Leaving...]
<bnagy>
like, if you don't want to instantiate it then there's not really much point it being a class
<bnagy>
may as well just make it a module
<bnagy>
but, OO wise, it really should be a class imho
<AxonetBE>
but if I don't do @@client = Savon::Client.new … but just Savon::Client.new he will always create a new connection?
<bnagy>
one per object you create, yeah
<apeiros_>
SoColissimo.default_client
<bnagy>
which is what you want
<apeiros_>
with def self.default_client; @default_client ||= Client.new(DefaultConnection); end
jprovazn has quit [Ping timeout: 260 seconds]
<apeiros_>
and I agree with bnagy. should be a proper class. yours currently isn't.
flype has quit [Quit: Computer has gone to sleep.]
mikepack has joined #ruby
plastics has joined #ruby
Haribhau has joined #ruby
krusty_ar has joined #ruby
sits has joined #ruby
flype has joined #ruby
tvw has joined #ruby
gilead has joined #ruby
TheHunter_1039 has quit [Quit: TheHunter_1039]
<AxonetBE>
apeiros_: bnagy: sometimes a good example of a soap api in ruby that I can follow?
wvms has quit [Ping timeout: 244 seconds]
<Haribhau>
what is best way to create multi-processes in ruby? fork?
TheHunter_1039 has joined #ruby
workmad3 has joined #ruby
heftig has quit [Quit: leaving]
<bnagy>
fork isn't supported on all runtimes / platforms
mikepack has quit [Ping timeout: 252 seconds]
iori has joined #ruby
<bnagy>
but it's viable in some cases
crankycoder has joined #ruby
pk1001100011 has joined #ruby
<bnagy>
what are you trying to do?
RainbowDashh has quit [Read error: Connection reset by peer]
anildigital_work has joined #ruby
polysics has joined #ruby
<Haribhau>
#bnagy - I have CSV file . have to read records from multiple files. processes it and save it into DB
<Haribhau>
I trid multi-threading but didnot give good result
<Haribhau>
*tried
<bnagy>
I would look at the parallel gem
RainbowDashh has joined #ruby
<bnagy>
if you're running MRI / *nox then you can use fork with it, otherwise you can use :in_threads
ipoval has quit [Quit: ipoval]
<bnagy>
and use JRuby, which has real concurrency
<bnagy>
**nix
<workmad3>
Haribhau: what approach were you trying? separate threads for each file?
<Haribhau>
nice. I am happy that such gem is already there. I will have look into it. Its better than developing from scracth
<Haribhau>
yes seperate threads for each file in single processs
<bnagy>
then it's as easy as Paralle.each( files ) {|f| ...
<workmad3>
bnagy: you can do real concurrency with MRI and YARV... you just can't do threading because of the GIL
<bnagy>
ok we have different definitions of real concurrency
<workmad3>
Haribhau: you could also consider eventmachine-style reactor patterns for non-blocking IO
<Haribhau>
ok. I think thats right because of GPL it is not that too fast
<workmad3>
bnagy: concurrency is working in parallel... multi-process is as much real concurrency as multi-thread
<bnagy>
if it were IO bound then mormal threads would have helped, at a guess
mfridh has joined #ruby
<bnagy>
workmad3: cool story bro. ANyway.
<dominikh>
uhm, concurrency != parallelism. concurrency is what every single CPU machine does with scheduling. parallelism is running multiple things at once, not just interwoven
<dominikh>
parallelism implies concurrency, concurrency does not imply parallelism.
<workmad3>
Haribhau: which raises another option... did you consider just spawning multiple processes, one for each file? :)
<dominikh>
YARV has concurrency but no parallelism (unless you use fork() etc)
<Haribhau>
I have not tried multi-processing yet. just tried ulti threading
<workmad3>
I guess that's the fork approach bnagy is suggesting though :)
<bnagy>
well parallel supports both, which is nice
<bnagy>
and also, forking is a bit fiddly, it's good to have that abstracted
ph^_ has quit [Remote host closed the connection]
<apeiros_>
^ helps with abstracting the fork :-)
<dominikh>
(and threading is just a means for concurrency and parallelism. it's nothing of its own)
<moos3>
whats the best way to handle creating a daemon with ruby that i can tell to awke up and run code every x minutes
<apeiros_>
also helps with interprocess communication
<bnagy>
moos3: cron
<moos3>
really ?
<apeiros_>
cron+1
<apeiros_>
it's proven. works reliably. it's resource friendly. it's well known.
<workmad3>
moos3: really, although you can use something like the whenever gem to help with creating the crontab
<bnagy>
oh, yeah that's the other thing I love abuot parallel - you get read only access to scope vars - even using :in_processes
eurek has joined #ruby
sailias has joined #ruby
<Haribhau>
I will try both reactor pattern and parallel gem . let me see which is best to me
jxf has quit [Ping timeout: 246 seconds]
<bnagy>
reactor won't help you if threads didn't
fantazo has joined #ruby
<apeiros_>
of course you can reinvent the wheel, have it full of bugs, nobody but you understands how it works etc.… :)
<bnagy>
unless you change runtimes
<moos3>
k txs
<workmad3>
bnagy: not necessarily... it depends a lot on how the IO routines are implemented
<workmad3>
bnagy: plain ruby IO is blocking... something like EventMachine pulls in non-blocking IO libs, iirc, which has a big difference on behaviour
<bnagy>
well imho reading in files, processing is not a workload that's even amenable to the Reactor pattern
<bnagy>
cause, like, you're not reacting to anything
<bnagy>
it's just that it would take a lot of work to do that, I think I would be proven right, and there are much easier approachs that will work for sure
<workmad3>
bnagy: you're reacting to file reads finishing, and database writes finishing :)
fixl|2 has joined #ruby
<workmad3>
bnagy: and that's what EventMachine is for ;)
lk is now known as Brandan
tightwork has quit [Excess Flood]
krusty_ar has quit [Read error: Connection reset by peer]
<banisterfiend>
workmad3: have you used eventmachine
<banisterfiend>
afaik it's only for socket stuff
erichmenge has joined #ruby
jlogsdon has joined #ruby
bosphorus_ has joined #ruby
cakehero has joined #ruby
bosphorus has quit [Read error: Connection reset by peer]
<bnagy>
well it should _work_ for anything where you want to hide a select loop, which would include blocking io
<bnagy>
it just won't _help_
krusty_ar has joined #ruby
<bnagy>
like ruby threads aren't great but they're not retarded enough not to pass when IO is blocking
<workmad3>
bnagy: well, yeah... if you still use blocking IO inside a callback, it's not going to help
<workmad3>
bnagy: but, meh... it's a try it and see thing, I guess
jxpx777 has joined #ruby
randomubuntuguy has joined #ruby
<workmad3>
bnagy: the problem, AIUI, seems amenable to reactor style - IO bound... but it depends on how heavy the processing is in comparison to the IO
jxpx777_ has joined #ruby
<bnagy>
2 threads doing blocking IO on two file reads is near as dammit to one thread doing a select() loop on two fds, afaik anyway
mnaser has joined #ruby
ken_barber has joined #ruby
<bnagy>
there's some overhead if you want to make jillions of threads and there's a scheduler efficiency question
tightwork has joined #ruby
<bnagy>
like I said, I'm betting money that the work is CPU bound
ringotwo has joined #ruby
vectorshelve has quit [Quit: Page closed]
<workmad3>
:)
<bnagy>
in other news, there are 0 good locally brewed beers in nepal
<workmad3>
heh
<bnagy>
which includes 'under license' like Carlsberg :<
lxsameer has joined #ruby
<workmad3>
drink water? or coffee?
<bnagy>
also, imvho, there's no point dealing with the complexity of EM when you really don't have any tricky state to manage
<bnagy>
like EM is a select loop and a state machine that had babies
jxpx777 has quit [Ping timeout: 246 seconds]
emmanuelux has joined #ruby
ringotwo has quit [Remote host closed the connection]
<bnagy>
but parallel processing a bunch of files is just a map, basta
saschagehlich has quit [Quit: saschagehlich]
<bnagy>
but I'm prepared to concede that's a subjective opinion
jamesaxl has quit [Ping timeout: 246 seconds]
<bnagy>
normally I do drink water, and coffee
<bnagy>
but today is a designtaed Drinking Day
<workmad3>
bnagy: I'd probably agree... personally, I'd probably suggest (because it's CSV) that each record in the CSV can be mapped out, not just each file
<bnagy>
and it's also almost 7pm
<bnagy>
I bet that would be inefficient
<bnagy>
like by the time you read em you may as well have processed em
<workmad3>
bnagy: depends on how much processing is involved
<bnagy>
Haribhau: btw use the CSV in stdlib - it's pretty damn awesome
jprovazn has joined #ruby
<erichmenge>
bnagy: You have designated drinking day at work? Where can I sign up? ;)
<workmad3>
yeah, 1.9's CSV lib is good... if you're on 1.8 though, get FasterCSV
<workmad3>
(I missed what version was in play, if it was even mentioned :) )
<bnagy>
well I work from home, so... we have it all. No Pants Day, Drinking Day, Redtube Day, you name it
<erichmenge>
lol
<dominikh>
I like redtube day
<workmad3>
redtube?
<bnagy>
I wouldn't be comfortable with a lot of these days if the workplace expanded past 1 person though
<dominikh>
porn.
<bnagy>
actually tbh in nepal redtube day isn't very often, the internet is ~20KB/s max most of the time
<erichmenge>
oh bummer
sailias has quit [Ping timeout: 246 seconds]
emmanuelux has quit [Read error: Operation timed out]
mucker has quit [Quit: leaving]
maoz_ has quit [Ping timeout: 245 seconds]
JustinCampbell has joined #ruby
<bnagy>
ohhhh MS you sons of... they introduced YET ANOTHER Dr Watson process name in Win7 :|
fantazo has quit [Ping timeout: 246 seconds]
hunglin has joined #ruby
randomubuntuguy has quit [Ping timeout: 265 seconds]
lorandi has joined #ruby
emmanuelux has joined #ruby
axl_ has joined #ruby
flype has quit [Quit: Computer has gone to sleep.]
jarednorman has joined #ruby
jonathanwallace has joined #ruby
flype has joined #ruby
hunglin has quit [Quit: Leaving.]
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
randomubuntuguy has joined #ruby
nai has quit [Remote host closed the connection]
fantazo has joined #ruby
randomubuntuguy has quit [Max SendQ exceeded]
randomubuntuguy has joined #ruby
mnaser has quit [Quit: Computer has gone to sleep.]
jcromartie has joined #ruby
randomubuntuguy has quit [Max SendQ exceeded]
randomubuntuguy has joined #ruby
jcromartie has quit [Read error: Connection reset by peer]
ZifreCL has quit [Ping timeout: 276 seconds]
ElitestFX has joined #ruby
Rochefort has joined #ruby
chson has quit [Remote host closed the connection]
jcromartie has joined #ruby
bglusman has joined #ruby
scout1340793703 has joined #ruby
<scout1340793703>
ciao a tutti!!!!!!!!!!!!!!!!!
scout1340793703 has left #ruby [#ruby]
randomubuntuguy has quit [Max SendQ exceeded]
yugui_zzz is now known as yugui
bglusman has quit [Read error: Connection reset by peer]
randomubuntuguy has joined #ruby
bglusman has joined #ruby
randomubuntuguy has quit [Max SendQ exceeded]
kill-9_ has left #ruby [#ruby]
explody has quit [Remote host closed the connection]
explody has joined #ruby
randomubuntuguy has joined #ruby
ringotwo has joined #ruby
busybox42 has quit [Read error: Connection reset by peer]
<bnagy>
bunga bunga
busybox42 has joined #ruby
iori has quit [Remote host closed the connection]
randomubuntuguy has quit [Max SendQ exceeded]
kvirani has quit [Remote host closed the connection]
<banisterfiend>
jlogsdon: wow that's pretty bad documentation, doesn't really explain what redo/next do properly at all
<Mon_Ouie>
That's old documentation too. Ruby *1.4*.
<bambanx>
Is compatible with 1.9.3 ?
<banisterfiend>
Mon_Ouie: that's better :D
<banisterfiend>
though still a bit cursory
<banisterfiend>
bambanx: yes
<banisterfiend>
bambanx: Mon_Ouie's link
<Mon_Ouie>
bambanx: 1.9 definitely isn't retro-compatible with 1.4 if that's what you're asking though
_-garu-_ has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
ringotwo has quit [Ping timeout: 245 seconds]
<bambanx>
Ok
<bambanx>
Thanks guys
<bambanx>
Guys exist a tool for visualize big files of source Code, i mean some software where i can import my source and see it like diagrams flow or some?
<jlogsdon>
oh ha, i didn't even look at the version. sorry
<bambanx>
the classes and methods dependece....
<jlogsdon>
i dont think one exists for ruby, though i might be wrong
<jlogsdon>
because ruby is dynamically typed its difficult to infer what a variable actually is without running it
<bambanx>
how you deal with your code when is huge?
<banisterfiend>
lol the fuck
<banisterfiend>
i had this code
<bambanx>
lol
<banisterfiend>
if hello? puts "hi"; else goodbye?; puts "bing"; end
<banisterfiend>
i meant to put elsif goodbye?
<banisterfiend>
bambanx: the way to deal with code of any size is to keep it clean and organized, so small classes/small methods, and a directory structure that makes it easy to find stuff
<ekaleido>
if "parse['keys'].count returns 3, and that number will vary, how can i pass hat value on so i dont try to act on parse['keys'][3]. i.e., it knows to stop at parse['keys'][2]
<ekaleido>
and im probably asking this terribly
<shevy>
tama, the main part of this is: via .each_line you process the info you get from the IRC server
<bambanx>
What is good place for find people interested on opensource projects one ruby? Git?
ringotwo_ has quit [Remote host closed the connection]
pureluck_ has quit [Quit: leaving]
<shevy>
to connect to IRC you can use something like: TCPSocket.open(name_of_server_here, which_port_to_use_goes_here)
mikepack has quit [Read error: Connection reset by peer]
d3vic3 has joined #ruby
mikepack_ has joined #ruby
<shevy>
and you can use somethingl ike select( [$stdin], nil, nil, 1.1 ) to also talk in a channel :)
<apeiros_>
I *think* people sometimes attribute problems to rvm that aren't really rvm's problem
ringotwo_ has joined #ruby
<Asher>
sometimes?:P
<Hanmac>
bambanx what kind of bugs?
<pwelch>
think I might have started a rvm discussion by accident...
ringotwo has quit [Ping timeout: 248 seconds]
sits has quit [Quit: sits]
<bambanx>
when i unfocus my gui its begin to freeze
yugui_zzz is now known as yugui
<ramblex>
rvm packages are just horrid
<shevy>
not surprising, rvm acts as a layer, every time one uses layers upon layers, the complexity of problems increases. my favourite combination will thus be RVM + bundler together in a happy embrace, all coming down for ...
<shevy>
Hanmac!!!
<shevy>
:)
<shevy>
Hanmac, do you use at least RVM?
<bambanx>
Hanmac: But is a program what start autoitx3 for move mouse and things like that
stabby_lambda has joined #ruby
<apeiros_>
Asher: yeah, I was overly cautious :)
AxonetBE has quit [Quit: Leaving.]
<Hanmac>
shevy my pc is rvm free
<shevy>
hehe
<shevy>
what about bundler... do you still refuse to use the evolution of ruby man ...
<Hanmac>
i dont use bundler
saschagehlich has quit [Read error: Connection reset by peer]
dekronin1 has joined #ruby
<shevy>
hehehe
eurek has joined #ruby
saschagehlich has joined #ruby
<shevy>
I wish I would have collected the quotes from banister on #pry, every time when he is cursing about bundler doing things he didn't tell it to do
RainbowDashh has quit [Quit: QUIT! Accident or on purpose? :3]
freeayu has quit [Ping timeout: 250 seconds]
hynkle_ has joined #ruby
hynkle has quit [Quit: hynkle]
stabby_lambda is now known as rjsamson
dekroning has quit [Ping timeout: 246 seconds]
<shevy>
whoa cool
<shevy>
there is a monthly summary from stackoverflow
<shevy>
quiz question: "C#: Why can I create a class named "var"?"
hynkle_ has quit [Client Quit]
hynkle has joined #ruby
<shevy>
ewww.... most questions are about java and C# and C++ :(
xubuntu5 has joined #ruby
jd__ has joined #ruby
arturaz has quit [Read error: Connection reset by peer]
pielgrzym has quit [Quit: Has been eaten by a grue]
dekronin1 has quit [Ping timeout: 245 seconds]
arturaz has joined #ruby
dekroning has joined #ruby
hynkle has quit [Client Quit]
hynkle has joined #ruby
dsa has joined #ruby
rippa has joined #ruby
rook_flood has joined #ruby
<enroxorz>
shevy: reading that C# question hurts my shoul.
arturaz has quit [Read error: Connection reset by peer]
<shevy>
"Although we expected C++ programmers to see Go as an alternative, instead most Go programmers come from languages like Python and Ruby."
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
freeayu has joined #ruby
TheFuzzball has quit [Remote host closed the connection]
<shevy>
manveru from #ruby-lang is writing a lot of Go
EzeQL has quit [Ping timeout: 244 seconds]
<enroxorz>
i want to try Go
<enroxorz>
haVENT had the chance
nari_ has quit [Ping timeout: 252 seconds]
TheFuzzball has joined #ruby
<ccooke>
enroxorz: have you learned... wait, this is #ruby, not #go.
<ccooke>
I got confused for a moment, there
dhruvasagar has quit [Ping timeout: 250 seconds]
<enroxorz>
ccooke: i blame shevy for the distraction.
<ccooke>
:-)
<rook_flood>
is there a 'proper' term for the file basename, sans extension? (e.g. from "/user/path/foo.txt", if we're just looking at "foo", is there a term for just that?)
andrewhl has joined #ruby
<ccooke>
enroxorz: note that #go is for the *game* go
<shevy>
dunno. filename without extension name
<hoelzro>
I think many use the term 'basename'
<enroxorz>
....basename
<hoelzro>
ex. the command tool 'basename'
<ccooke>
enroxorz: I was about to ask you if you've learned the rules, and direct you at www.gokgs.com :-)
burgestrand1 has joined #ruby
liluo has quit [Remote host closed the connection]
<enroxorz>
ccooke: never played tbh (i am ashamed)
cdabba has joined #ruby
<ccooke>
enroxorz: you should be ashamed. It is a great game :-)
Progster has quit [Ping timeout: 245 seconds]
<enroxorz>
lol. i'll try it soon
<enroxorz>
when i have to play
<ccooke>
well, when you do... gokgs is a great site.
<xclite>
andrewhl: you're missing some build libraries
<xclite>
andrewhl: If you google checking for rb_method_entry_t.called_id you should be able to figure out with one(s) you're missing
shevy has quit [Ping timeout: 252 seconds]
akem has joined #ruby
brianpWins has quit [Quit: brianpWins]
akem has quit [Max SendQ exceeded]
Criztian has quit [Remote host closed the connection]
maletor has joined #ruby
akem has joined #ruby
carlyle has quit [Remote host closed the connection]
akem has quit [Max SendQ exceeded]
akem has joined #ruby
fulmato has quit [Ping timeout: 246 seconds]
hynkle has quit [Quit: Computer has gone to sleep.]
bj0ern has joined #ruby
rowanu has joined #ruby
chienpo has joined #ruby
mdhopkins has quit [Quit: mdhopkins]
mdhopkins has joined #ruby
<macmartine>
Given a date, what's a good way to determine the occurrence number within the minth for that given weekday? In other words, Given July 9, 2012, I get that it's a Monday, now I want to know if it's the 1st, 2nd, 3rd, 4th Monday of the month. Or if it's the last Monday of the month I want that.
jrist is now known as jrist-afk
RainbowDashh has quit [Quit: QUIT! Accident or on purpose? :3]
Rochefort has quit [Remote host closed the connection]
<macmartine>
*month, not minth, of course :)
heftig has quit [Quit: leaving]
_md has quit [Quit: Leaving...]
savage- has quit [Remote host closed the connection]
akem has quit [Ping timeout: 244 seconds]
avandenhoven has joined #ruby
josefig has joined #ruby
josefig has quit [Changing host]
josefig has joined #ruby
hynkle has joined #ruby
kevinbond has quit [Quit: kevinbond]
hynkle has quit [Client Quit]
_-garu-_ has joined #ruby
rjsamson has quit [Remote host closed the connection]
shevy has joined #ruby
hynkle has joined #ruby
ringotwo has joined #ruby
baroquebobcat has joined #ruby
<dekroning>
i'm really confused with syntax of minitest/spec how can I check if something is true? Do i have to use "assert" ?
jamesaxl has joined #ruby
<apeiros_>
dekroning: yes. assert or one of its cousins, like assert_equal
mengu has quit [Quit: Konversation terminated!]
IrishGringo has quit [Ping timeout: 244 seconds]
<dekroning>
apeiros_: I thought that "asserts" where more TestUnit style of asserting, and in spec it would be .should be_true
<apeiros_>
ah, sorry, I only read minitest
<apeiros_>
no idea about minitest/spec
Foxandxss has joined #ruby
williamcotton has joined #ruby
thomas is now known as StaffGiraffe
flip_digits has joined #ruby
qwerxy has quit [Ping timeout: 244 seconds]
ghosTM55 has joined #ruby
wilmoore has joined #ruby
ankakusu has joined #ruby
<ankakusu>
can you suggest me an introductory book for ruby?
Xethron has quit [Ping timeout: 245 seconds]
<xclite>
pickaxe book
Maniacal has joined #ruby
<xclite>
pragprog.com/book/ruby/programming-ruby
C0deMaver1ck has joined #ruby
<C0deMaver1ck>
does include? have a sister method or anything of the sort for case insensitivity?
<C0deMaver1ck>
It seems include? is only case sensitive
<banisterfiend>
C0deMaver1ck: what do u mean
Xethron has joined #ruby
<C0deMaver1ck>
so something such as client.name.include?(params[:terms]) needs to be case insensitive
<C0deMaver1ck>
It seems that I'll need to use a method other than include?
<canton7>
you could use #any I guess
<canton7>
* #any?
<banisterfiend>
C0deMaver1ck: name is a String ?
gilead has quit [Quit: This computer has gone to sleep]
<C0deMaver1ck>
banisterfiend: yes
robotmay has quit [Remote host closed the connection]
<canton7>
ah, not #any? then
<banisterfiend>
C0deMaver1ck: then just do: client.name.downcase.include?(params[:terms].downcaes)
<banisterfiend>
canton7: downcaes, whereas i spelled it correctly. so i win :P
<C0deMaver1ck>
you two should try typeracer.com XD
<canton7>
banisterfiend, you spelled the second 'downcase' wrong ;)
<banisterfiend>
canton7: no u
nachtwandler has joined #ruby
<canton7>
someone's IRC client is very confused, then
aantix has joined #ruby
Jay_Levitt has joined #ruby
Xethron has quit [Read error: Operation timed out]
brianpWins has joined #ruby
JodaZ_ has quit [Remote host closed the connection]
<C0deMaver1ck>
strange, I get an undefined method error with params[:terms].downcase
jxpx777 has quit [Quit: Mac is sleeping…]
gilead has joined #ruby
<C0deMaver1ck>
nvm, fixed
<C0deMaver1ck>
thanks guys, I appreciate it
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
banghouse has joined #ruby
headius has joined #ruby
locriani has quit [Remote host closed the connection]
umttumt has joined #ruby
Xethron has joined #ruby
indstry has joined #ruby
jgrevich has joined #ruby
eywu has joined #ruby
<lectrick>
Any regex maven know if (?>, which is the atomic grouper, applies to all subexpressions too, or just that level of regex?
ben_m has joined #ruby
locriani has joined #ruby
StaffGiraffe is now known as tdubellz
TPFC-SYSTEM has joined #ruby
gilead has quit [Ping timeout: 240 seconds]
tdubellz is now known as thomas
rakm has quit [Ping timeout: 252 seconds]
kenperkins has joined #ruby
Ontolog has joined #ruby
pk1001100011 has quit [Remote host closed the connection]
ringotwo has quit [Remote host closed the connection]
MarcWeber has joined #ruby
rakm has joined #ruby
<MarcWeber>
Is there a faster way to write ["foo"]["bar"] knowing that ["foo"] may be nil (in which case the result should be nil?)
Xethron has quit [Ping timeout: 248 seconds]
mikepack_ has quit [Remote host closed the connection]
<banisterfiend>
MarcWeber: you could rescue it inline
<banisterfiend>
["foo"]["bar"] rescue nil
Khyron320 has quit [Remote host closed the connection]
chrisja has joined #ruby
<henn1nk>
how do i rename MarqueLog to marque_log ?
chrisja has quit [Client Quit]
<Hanmac>
MarcWeber: begin obj["foo"]["bar"]; rescure NoMethodError; false; end
<henn1nk>
MarqueLog.downcase .. but how the _ ?
chrisja has joined #ruby
<fowl>
yes rescure thats what he needs
<MarcWeber>
I'll just add a simple if .nil? :)
JodaZ has joined #ruby
ghosTM55_ has joined #ruby
ghosTM55 has quit [Read error: Connection reset by peer]
kaneda has joined #ruby
mneorr3 has joined #ruby
pk1001100011 has joined #ruby
Xethron has joined #ruby
<lectrick>
MarcWeber: I have a pattern/helper for this
artOfWar has joined #ruby
<MarcWeber>
lectrick: I'm interested.
artOfWar has quit [Remote host closed the connection]
artOfWar has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
Dr4g is now known as Dr4g|Away
saschagehlich has quit [Quit: saschagehlich]
mneorr2 has quit [Ping timeout: 252 seconds]
moted has joined #ruby
ringotwo has joined #ruby
adeponte has joined #ruby
wallerdev has quit [Quit: wallerdev]
d3vic3 has quit [Quit: leaving]
savage- has joined #ruby
<lectrick>
MarcWeber: def traverse(*indexes); indexes.flatten.inject(self){|v, i| v[i] if v.is_a?(Hash)}; end # Usage: deephash.traverse([:key1, :key2, :key3]) or deephash.traverse(:key1, :key2, :key3)
CheeToS has quit [Ping timeout: 245 seconds]
<banisterfiend>
MarcWeber: google for the ruby library andand
mklappstuhl has quit [Ping timeout: 246 seconds]
ringotwo has quit [Remote host closed the connection]
Tricks has joined #ruby
ringotwo_ has joined #ruby
francisfish has quit [Remote host closed the connection]
abstrusenick has quit [Quit: abstrusenick]
Targen has quit [Ping timeout: 248 seconds]
ukd1 has joined #ruby
ghosTM55_ has quit [Ping timeout: 252 seconds]
ghosTM55 has joined #ruby
tzvi has quit [Read error: Connection reset by peer]
rushed has joined #ruby
nadirvardar has joined #ruby
mucker has joined #ruby
liluo has joined #ruby
Brandan has quit [Ping timeout: 264 seconds]
pooya72 has quit [Quit: pooya72]
umttumt has quit [Remote host closed the connection]
BrokenCog has quit [Quit: leaving]
apok has joined #ruby
savr has joined #ruby
<savr>
hi
bricker88 has joined #ruby
jrist-afk is now known as jrist
jwg2s has joined #ruby
oooPaul has joined #ruby
<jwg2s>
Hi all, I have two databases, db1 and db2. I'd like to take all the tables in db2 that are not in db1, and create them as views in db1. What would help me accomplish this? I'd like to write a ruby script to do it
<fowl>
you know who loves rails questions? the chums over in #ruby-lang
jereme has joined #ruby
<jereme>
Greetings, I am having trouble installing the ruby-debug-ide gem. It attempts to install some dependencies (ruby-debug-base) using Gem::DependencyInstaller. I am behind a company firewall and leverage a proxy to get out
<jereme>
I have my .gemrc configured with all proxy settings, but this lib doesn't observe them
<jereme>
furthermore, I already have the dependency installed
<jereme>
anyone know how to get Gem::DependencyInstaller to observe a proxy?
<jereme>
I tried setting the http_proxy environment var
vlad_starkov has quit [Remote host closed the connection]
_md has joined #ruby
SeanLazer has joined #ruby
heftig has joined #ruby
oooPaul has quit [Quit: Ciao for now!]
<SeanLazer>
i'm writing a class that filters documents (DocumentFilter). I'd like my interface to be something like DocumentFilter.find(:estimate, :type => :budget, :state => :sent)
<SeanLazer>
to me this suggests a stateless class, but if i write it that way i'll be passing variables around through method arguments, which feels hacky
<SeanLazer>
is this something that i should make stateful?
<heoa>
(apt-get ticgit has some namspace problem so have to use this fork...)
mrsolo has joined #ruby
oooPaul has joined #ruby
<banisterfiend>
SeanLazer: why dont u make whatever u were passing along through method arguments (assuming it was the same thing) state? :)
stephenjudkins has joined #ruby
<heoa>
I created a Gemfile to the dir and did `$ rake install` but getting that err
prtksxna has joined #ruby
<SeanLazer>
banisterfiend: i guess because that messes with the interface that i'd like to expose. now i would have to do DocumentFilter.new(:estimate, :type => :budget).results instead
mockra has quit [Remote host closed the connection]
<banisterfiend>
SeanLazer: i dont see why, u could have the find() method create an instance
liluo has quit [Remote host closed the connection]
<banisterfiend>
SeanLazer: so the object that u create becomes an implementation detail of the DocumentationFiter.find() method
cirwin has joined #ruby
<SeanLazer>
banisterfiend: interesting… let me try that out
vlad_starkov has joined #ruby
jereme has quit [Ping timeout: 245 seconds]
<jd__>
why does puts 4.0 === 4 , 4.0 == 4 both yield true???
<banisterfiend>
jd__: read about floating point math :P (google it :P)
<banisterfiend>
oh
<banisterfiend>
that's a different issue
<banisterfiend>
jd__: because === in teh case of normal objects is equivalent to ==
<banisterfiend>
jd__: it's only defined explicitly for a few objects/classes, like: Range instances, and Module instances, and Proc instances and so on
<jd__>
oooh
<jd__>
that explains it well, thanks banisterfiend
<banisterfiend>
np
zommi has joined #ruby
<jd__>
and how can i know if a string will convert properly to a float or an integer to know if .to_f will be valid?
<bnagy>
use Float( s ) and rescue
chris_c_ has joined #ruby
enroxorz has left #ruby ["Leaving"]
<apeiros_>
jd__: note that === is NOT a stricter ==
<apeiros_>
=== is used mainly for case/when
siefca has left #ruby [#ruby]
schaerli has joined #ruby
ringotwo_ has quit [Remote host closed the connection]
adamkittelson has joined #ruby
<jd__>
thanks apeiros
BiHi has quit [Quit: Computer has gone to sleep]
manizzle has quit [Read error: Connection reset by peer]
stephenjudkins has quit [Quit: stephenjudkins]
trend_ has joined #ruby
trend has quit [Read error: Connection reset by peer]
trend_ is now known as trend
<SeanLazer>
banisterfiend: this looks like it's going to work more or less. what do you think of the general structure before i go any futher? https://gist.github.com/3005563
davidcelis has quit [Quit: K-Lined.]
`damien has joined #ruby
mockra has joined #ruby
CreativeEmbassy has joined #ruby
fulmato has joined #ruby
bluenemo has quit [Remote host closed the connection]
Jake232 has joined #ruby
ElitestFX has quit [Quit: Page closed]
jchauncey has joined #ruby
linoj has joined #ruby
krusty_ar has quit [Read error: Connection reset by peer]
krusty_ar has joined #ruby
bglusman has quit [Remote host closed the connection]
nachtwandler has quit [Ping timeout: 252 seconds]
bglusman has joined #ruby
bglusman has quit [Read error: Connection reset by peer]
bglusman has joined #ruby
<apeiros_>
SeanLazer: why do you expect a string/symbol as the klass argument?
<apeiros_>
why not the class itself?
<apeiros_>
SeanLazer: also: options.symbolize_keys! <-- mutating arguments is bad style. and since you assign it to @options, just use the non-destructive version
<SeanLazer>
apeiros_: this is going in a rails project and this is going to function as somewhat of a form backing object
<SeanLazer>
apeiros_: good find on the bang, i was just messing around trying to get it to work since i hadn't included the right active_support libraries in my fast-spec yet
<apeiros_>
SeanLazer: you mean the data comes from a form, so it'll be strings?
rjsamson has joined #ruby
<SeanLazer>
apeiros_: in my ultimate implementation yes. maybe that's the controller's problem?
<apeiros_>
don't know
<apeiros_>
personally I dislike rails' architecture there anyway
<apeiros_>
they put all the conversion stuff into the model. which is IMO the wrong place.
<SeanLazer>
it's going to look something like @estimates = DocumentFilter.find(:estimate, params[:filter_options])
<apeiros_>
a form is a separate entity. complex enough.
trend_ has joined #ruby
jhunter has quit [Ping timeout: 248 seconds]
<SeanLazer>
apeiros_: in a way this is a form backing object
<deryl>
hey apeiros_ how goes it?
<apeiros_>
SeanLazer: well, why not @estimates = DocumentFilter.find(Estimate, params[:filter_options])
<apeiros_>
deryl: fine. having trouble with the heat, though :(
<SeanLazer>
apeiros_: that's a good point
<apeiros_>
how're you?
trend has quit [Ping timeout: 265 seconds]
trend_ is now known as trend
<SeanLazer>
apeiros_: potentially because down the road i may need to search multiple models, but YAGNI? i dunno
<apeiros_>
SeanLazer: that's what I meant with klass being sym/string arg instead of a class object
<SeanLazer>
apeiros_: i know, i just hadn't fully considered my implementation :)
<apeiros_>
SeanLazer: well, how do you do multiple models with a symbol?
<deryl>
apeiros_: not bad. packing like crazy, cleaning the house up. got 2 weeks left before I leave for buffalo then to Kentucky. i don't do well with just marking time :)
<apeiros_>
:estimate_and_somethingelse and then parse it out? :)
<SeanLazer>
then why isn't it defined as def self.new :P
<apeiros_>
because it's an instance method of Class
<apeiros_>
class Class; def new(*args, &block); obj = allocate; obj.send :initialize, *args, █ obj; end; end
<apeiros_>
that's pretty much the impl. of Class#new, if written in plain ruby.
<SeanLazer>
apeiros_: where does "initialize" come from then?
<deryl>
iirc Object isn't it?
<apeiros_>
initialize is called by new
<apeiros_>
and you inherit Object#initialize
<apeiros_>
which does plain nothing :)
<SeanLazer>
oh… i never knew that!
RainbowDashh has quit [Quit: QUIT! Accident or on purpose? :3]
<SeanLazer>
i mean i knew how you work with it, just didn't understand the internals
<apeiros_>
and you usually override it to, well, initialize your object
kenichi has joined #ruby
CrazyGir has joined #ruby
dekronin1 has joined #ruby
<SeanLazer>
god i love ruby
<apeiros_>
if you'd define new, you wouldn't have access to the ivars
<apeiros_>
since it's a class method :)
<deryl>
ok time to pack the trailer. later all
rking has joined #ruby
mklappstuhl has joined #ruby
rking has quit [Client Quit]
dekroning has quit [Ping timeout: 245 seconds]
rking has joined #ruby
<CrazyGir>
is this a good place for questions trying to install a ruby package (redmine) and subsequent problems with gems/bundle install? I have bundle install failing on building mysql, which I don't know why needs to be built anyway.. but which is also wanting libs for (i believe) postgres, and I see this going further and further down a rabbit hole
<epochwolf>
CrazyGir: it would help to provide the errors you are getting.
<shadoi>
CrazyGir: it's compiling libs for DB implementations that you COULD use.
Rabbit67890 has joined #ruby
dnyy has joined #ruby
<shadoi>
You're probably missing the system client libraries and/or development tools and headers.
<CrazyGir>
shadoi: right, but why can't I get a binary package like all the other dependencies?
IrishGringo has joined #ruby
<shadoi>
The gem has to be compiled to interface with the C library for the architecture and distribution you're on.
Xethron has quit [Ping timeout: 240 seconds]
<shadoi>
You can get around that by using a pre-compiled system package for whatever distro you're on.
<CrazyGir>
shadoi: yea, that's what it looks like, but it's the mysql package wanting what looks like postgresql libs (No pg_config... trying anyway. and Can't find the 'libpq-fe.h header)
<shadoi>
no it's probably ActiveRecord which has drivers for lots of database backends.
<CrazyGir>
you're saying I need dev libs for ActiveRecord?
<shadoi>
yeah, you need to install the postgresql client library and development package for your system.
hynkle has quit [Quit: Computer has gone to sleep.]
<shadoi>
to build the gems for accessing it, yeah.
Rabbit67890 is now known as RainbowDashh
<CrazyGir>
libactiverecord-ruby1.8 sound right?
<shadoi>
no
<shadoi>
postgresql-dev or something similar
<shadoi>
libmysqlclient-dev
<shadoi>
etc.
<CrazyGir>
ah, I missed your noting that
<CrazyGir>
yea, that's what I had in mind, your note about A.R. confused me
hynkle has joined #ruby
<shadoi>
There are probably a few different installation methods for Redmine
Xethron has joined #ruby
<shadoi>
At least there used to be
stephenjudkins has joined #ruby
<CrazyGir>
yea, there are
<shevy>
shouldn't distributions make this simple
<epochwolf>
shevy: it does for python stuff. Ruby doesn't play nice since it manages gems.
<shadoi>
shevy: they usually try, but it's usually too slow for people, they always gotta have the latest stuff.
dekronin1 is now known as dekroning
mockra has quit [Remote host closed the connection]
<shevy>
epochwolf, hmm, debian does not repackage python addons?
<shadoi>
they do, but not all of them.
bj0ern has quit [Quit: bj0ern]
<shadoi>
and they're out of date most of the time.
<epochwolf>
shevy: debian packages python libraries. Ruby libraries aren't really packaged and the ruby version tends to be out of date.
mrsolo has quit [Quit: This computer has gone to sleep]
jxpx777 has joined #ruby
<epochwolf>
so you need to install ruby and it's friends from source.
iocor has quit [Quit: Computer has gone to sleep.]
rjsamson has quit [Remote host closed the connection]
bj0ern has joined #ruby
<shevy>
I am not sure I understand
<epochwolf>
package managers are really nice in theory but in practice, you end up with lots of out of date stuff.
<shadoi>
to be clear you CAN "apt-get install redmine" on ubuntu.
queequeg1 has quit [Remote host closed the connection]
<epochwolf>
you'll just get an old version
<shadoi>
yes
Targen has joined #ruby
Cork has quit [Quit: .]
Xethron has quit [Read error: Operation timed out]
Cork has joined #ruby
joshman_ has quit [Ping timeout: 240 seconds]
mrsolo has joined #ruby
v0n has joined #ruby
`damien has quit [Quit: `damien]
<CrazyGir>
shevy: yea, this lack of quality packaging experience makes headaches for novice users of an app like redmine
joshman_ has joined #ruby
Xethron has joined #ruby
jrist is now known as jrist-afk
avandenhoven has quit [Quit: avandenhoven]
ringotwo has joined #ruby
josefig has quit [Ping timeout: 244 seconds]
<CrazyGir>
I've installed librmagick-ruby, but `gem install rmagick -v '2.13.1'` still fails with: Can't install RMagick 2.13.1. Can't find Magick-config in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
<CrazyGir>
maybe I have the wrong lib?
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
Progster has joined #ruby
voodoofish430 has joined #ruby
mockra has joined #ruby
bitsar has quit [Ping timeout: 246 seconds]
sonkei has joined #ruby
plastics has joined #ruby
designated has joined #ruby
mockra has quit [Remote host closed the connection]
Xethron has quit [Ping timeout: 264 seconds]
lxsameer has quit [Quit: Leaving]
ringotwo has quit [Remote host closed the connection]
Xethron has joined #ruby
<CrazyGir>
libmagick9-dev is not enough either
ramblex has quit [Ping timeout: 246 seconds]
_-garu-_ has quit [Ping timeout: 252 seconds]
wvms has joined #ruby
<bj0ern>
maybe the 'imagemagick' package
<CrazyGir>
I'm not liking this rabbit hole..
<CrazyGir>
there is also mention of libmagickwand-dev
<CrazyGir>
which wants 40MB of archives downloaded .,
<CrazyGir>
><
<CrazyGir>
bj0ern: there's no lib/dev package for imagemagick
<shadoi>
ekaleido: what are you trying to end up with?
<ekaleido>
a variable named filecount0 through filecount<whatever is the value of keycount-1>
<CrazyGir>
it's funny, given all the variables here (nginx/apache, passenger/unicorn/mongrel, mysql/postgresql, etc) you need critical info from like 5 different posts, requiring 30 or so to find the 5
<CrazyGir>
shadoi: good find :)
fbernier has quit [Ping timeout: 255 seconds]
<ekaleido>
that equals keyhas['keys'][0 or 1 or 2, etc]
<ekaleido>
keyhash even
joshman_ has joined #ruby
<shadoi>
CrazyGir: agreed, it's very complicated to just get a ticket tracker/wiki working. :)
bitsar has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<shadoi>
ekaleido: I'm not sure what keycounter is
Asher has quit [Ping timeout: 252 seconds]
<ekaleido>
its a number
<ekaleido>
3, for example
closedbook has joined #ruby
<bnagy>
I will never understand this antipattern
<bnagy>
what do you think you gain by assigning stuff to dynamic variables?
<shadoi>
yeah… I still don't see what your'e trying to end up wtih. A var with the count of keys in keyhash?
Xethron has quit [Ping timeout: 265 seconds]
<shadoi>
ekaleido: do you want to slice up keyhash somehow?
fermion has quit [Quit: P]
<closedbook>
how does one save a generated random number throughout the life of a program in ruby? for example: def computer_guess
<closedbook>
# generates a random integer representing the computer's guess
<closedbook>
r = rand(11)
<closedbook>
end
<closedbook>
gives me: 2, 5, 6 each time its called
<shadoi>
closedbook: put it in an instance/class/global var, or a constant.
<ekaleido>
keyhash['keys'][0] will return a filename, essentially
<bnagy>
closedbook: don't paste into the channel like that, please
<cirwin>
@computer_guess ||= rand(11)
<ekaleido>
then ill put thet into an erb file and create a link using some of the other vars
<ekaleido>
im sure there are brighter, better ways
<ekaleido>
i am but a rookie
linoj_ has joined #ruby
davidcelis has joined #ruby
<epochwolf>
shadoi: it's not complicated if you just use the package.
<shadoi>
ekaleido: right, but the loop you were doing, you're trying to just get a list of file names up to a certain threshold?
<epochwolf>
in all of it's out of date gory
Xethron has joined #ruby
<closedbook>
sorry bangy, colloquy doesn't support shift + enter to expand text fields
<ekaleido>
yeah
sailias has quit [Ping timeout: 246 seconds]
<closedbook>
bnagy*
<bnagy>
yah I don't know what a colloquy is, apart from the actual dictionary def
mikepack has quit [Read error: Connection reset by peer]
<shadoi>
yeah, however you're figuring out the count, use it there.
linoj has quit [Ping timeout: 265 seconds]
mrmist has quit [Changing host]
mrmist has joined #ruby
linoj_ has quit [Read error: Connection reset by peer]
krusty_ar is now known as kyheo__
<apeiros_>
or .values.first(count)
dsa is now known as EzeQL
<apeiros_>
<3 first(n)
<bnagy>
or last(count) :P
bosphorus has quit [Remote host closed the connection]
AxonetBE has joined #ruby
mrmist has quit [Changing host]
mrmist has joined #ruby
linoj has joined #ruby
nachtwandler has joined #ruby
<bnagy>
or values
<Hanmac>
... the hash may not orderd (<1.9)
Asher has joined #ruby
AxonetBE has left #ruby [#ruby]
<shadoi>
caveat utilitor
fbernier has joined #ruby
tommyvyo has joined #ruby
tvw has quit [Remote host closed the connection]
<shevy>
penis enlarger
<shadoi>
also applies, indeed.
workmad3 has joined #ruby
Xethron has quit [Ping timeout: 244 seconds]
trend has quit [Ping timeout: 265 seconds]
kyheo__ is now known as krusty_ar
samuel02 has joined #ruby
IrishGringo has quit [Ping timeout: 246 seconds]
Ontolog has quit [Read error: Connection reset by peer]
Ontolog has joined #ruby
akem has joined #ruby
mneorr has joined #ruby
moosya has joined #ruby
mockra has joined #ruby
qwerxy has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
mneorr has quit [Client Quit]
mneorr has joined #ruby
manizzle has joined #ruby
schovi has joined #ruby
Xethron has joined #ruby
mockra has quit [Remote host closed the connection]
qwerxy has quit [Client Quit]
fuego has joined #ruby
fuego has quit [Client Quit]
adeponte has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
schaerli has quit [Remote host closed the connection]
adeponte has joined #ruby
mikeycgto has quit [Quit: Leaving]
Xethron has quit [Read error: Operation timed out]
bluOxigen has joined #ruby
jaylevitt has joined #ruby
schaerli has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
Jay_Levitt has quit [Ping timeout: 240 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
Xethron has joined #ruby
crankycoder has joined #ruby
schaerli has quit [Ping timeout: 245 seconds]
jaylevitt has quit [Remote host closed the connection]
closedbook has left #ruby [#ruby]
<lectrick>
Does anyone remember what the Ruby internal string length was that would stop optimizing strings as c literals and promote them to full-fledged string objects?
<dekroning>
In my test suite I just created a Challenge object, and now I would like this object to create challenges. So i thought: challenge = Challenge.new but then I was wondering if it would be nicer todo Challenge.create
jesly has joined #ruby
ankakusu has quit [Ping timeout: 245 seconds]
<dekroning>
even after that I thought about: challenge = Challenge.challenge(opponent) but that read really awful
cforce has quit [Ping timeout: 245 seconds]
mosheee is now known as moshee
mockra has quit [Remote host closed the connection]
<dekroning>
I once read that in your main code you ideally want to be calling factory objects, and from your test you would use .new anyone that know more about this subject matter ?
blast_hardcheese has quit [Ping timeout: 248 seconds]
yonggu has joined #ruby
Jay_Levitt has joined #ruby
SeanLazer has quit [Quit: SeanLazer]
davidcelis has quit [Quit: K-Lined.]
<deryl>
new is generally called when you need to do some value setting before calling .save on the object. .create is when you populate that at the time of instantiation
<deryl>
.new then mod data then .save. .create(data_added_right_now) which then also does a .save for you if its db backed
<deryl>
damn, time to run my pooch to the trainer's. bbiab
hunglin has quit [Remote host closed the connection]
hunglin has joined #ruby
hunglin has left #ruby [#ruby]
_md has quit [Quit: Leaving...]
eurbach has joined #ruby
snearch has quit [Quit: Verlassend]
_alb has joined #ruby
rippa has quit [Ping timeout: 246 seconds]
williamcotton_ has joined #ruby
whuffor has quit [Ping timeout: 240 seconds]
williamcotton has quit [Ping timeout: 246 seconds]
williamcotton_ is now known as williamcotton
gmci has quit [Ping timeout: 248 seconds]
jrist-afk is now known as jrist
DrShoggoth has joined #ruby
whuffor has joined #ruby
SeanLazer has joined #ruby
gmci has joined #ruby
tayy has joined #ruby
fridim_ has joined #ruby
cclplatinum has joined #ruby
hunglin has joined #ruby
jesly_ has joined #ruby
bricker881 has joined #ruby
designated has quit [Remote host closed the connection]
twinturbo_ has joined #ruby
francisfish has quit [Remote host closed the connection]
bricker88 has quit [Ping timeout: 246 seconds]
twinturbo has quit [Ping timeout: 246 seconds]
twinturbo_ is now known as twinturbo
Hanmac has quit [Ping timeout: 246 seconds]
venkatk_ has quit [Quit: This computer has gone to sleep]
jesly has quit [Ping timeout: 250 seconds]
blast_hardcheese has joined #ruby
timonv has quit [Remote host closed the connection]
lkba has joined #ruby
Hanmac has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<shevy>
ok
<shevy>
what exactly is .tap
<shevy>
my brain can't help but associate it with tapping a card ... :(
<Mon_Ouie>
def tap; yield self; self; end
<shevy>
hmmmm
<shevy>
ok
ztkz has joined #ruby
<shevy>
seems simple enough
<fowl>
shevy.tap { |g| def g.schnitzel() end }.schnitzel
<jlogsdon>
tap is the bomb
<jlogsdon>
it just runs a block yielding the value you're tapping.
adamkitt_ has joined #ruby
cirwin has joined #ruby
jlogsdon has quit [Remote host closed the connection]
sepp2k has quit [Remote host closed the connection]
<lectrick>
Is there something like %w[ \n ] but that will return ["\n"] instead of ["\\n"] ?
akem has quit [Ping timeout: 250 seconds]
adamkittelson has quit [Ping timeout: 252 seconds]
<Mon_Ouie>
%W
tayy has quit [Remote host closed the connection]
Juul has joined #ruby
<lectrick>
oh snap
yankhates has left #ruby [#ruby]
<lectrick>
ty
mockra has joined #ruby
josefig has quit [Quit: Textual app]
brianpWins has quit [Quit: brianpWins]
banseljaj is now known as imami|afk
explody has quit [Remote host closed the connection]
andreime has quit [Ping timeout: 244 seconds]
_alb has quit [Quit: leaving]
kevinbond has joined #ruby
zommi has quit [Remote host closed the connection]
_alb has joined #ruby
Haribhau has quit [Ping timeout: 245 seconds]
pu22l3r has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
andrewhl_ has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
invsblduck has joined #ruby
jesly_ has quit [Quit: Leaving]
sailias has quit [Ping timeout: 244 seconds]
vitoravelino is now known as vitoravelino`afk
<invsblduck>
So I need to match a regex within a string from a certain _starting point_; String#match in 1.9 takes a second argument, index, which allows you to specify a point within the string to start matching. 1.8 does not support this second argument. Any suggestions for how to match a regex against a string at a certain point? No, I can't make a "more specific" regex because it would require a non-fixed-width look-behind, which isn't supported (ie., look-behind ZW
Foxandxss has joined #ruby
<invsblduck>
what else can i use besides String#match ?
akem has joined #ruby
vitoravelino`afk is now known as vitoravelino
Targen has joined #ruby
<canton7>
invsblduck, take a slice of the string and match against that?
<canton7>
my_string[3..-1].match(/blah/)
<fowl>
invsblduck, string[start..-1].match
<invsblduck>
yessss ninjas
<fowl>
1.8 is stoneage ruby
<invsblduck>
rhel == stoneage ;)
univers has joined #ruby
univers has quit [Client Quit]
<fowl>
install rbenv and you're good to go
<invsblduck>
fowl: hm, i don't see that in epel or rhel base. but i'll check it out, thanks
<canton7>
or rvm if you prefer
<invsblduck>
thanks canton7 and fowl for the tip. great advice
<invsblduck>
yea i haven't touched rvm in a couple years, but generally try to avoid it..i should revisit
workmad3 has joined #ruby
hynkle has quit [Quit: Computer has gone to sleep.]
<invsblduck>
rvm is at least packaged for centos/rhel
kirun has joined #ruby
<fowl>
invsblduck, rbenv is usually installed to ~/.rbenv anyways no need for a sys wide install
crankycoder has quit [Remote host closed the connection]
<invsblduck>
fowl: how do you deal with scripts that shebang /usr/bin/ruby ? is that just considered wrong practice compared to `#!/usr/bin/env ruby' these days?
jxpx777 is now known as jxpx777|afk
rjsamson has quit [Remote host closed the connection]
qwerxy has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
explody has joined #ruby
hynkle has joined #ruby
bricker88 has joined #ruby
jgrevich has quit [Read error: Connection reset by peer]
<CrazyGir>
is there an appropriate channel for mongrel? or is this where those kinda kids hang out?
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
stephenjudkins has joined #ruby
<apeiros_>
invsblduck: yes
<apeiros_>
not using env is considered bad style
<apeiros_>
and the proper way to deal with it is to file a bugreport :)
workmad3 has quit [Ping timeout: 240 seconds]
jgrevich has joined #ruby
<CrazyGir>
i'm trying to run mongrel for redmine, it doesn't start, but no errors
<CrazyGir>
just deprecation warnings
pyoor has joined #ruby
bricker881 has quit [Ping timeout: 264 seconds]
lessless has quit [Remote host closed the connection]
luxurymode has joined #ruby
<invsblduck>
apeiros_: if /usr/bin/env is bad style, and so is /usr/bin/ruby explicitly, what is correct?
jcromartie has quit [Quit: jcromartie]
<apeiros_>
invsblduck: no, NOT using /usr/bin/env is bad style
<apeiros_>
USING /usr/bin/env is GOOD style
emmanuelux has joined #ruby
<apeiros_>
read again what I wrote :-p
<invsblduck>
apeiros_: yes i read again :)
<invsblduck>
/facepalm
<invsblduck>
ty
<apeiros_>
yw ;-)
nachtwandler has quit [Quit: leaving]
sspiff has quit [Ping timeout: 246 seconds]
<invsblduck>
awesome, and in 1.8 String#[fixnum] gives you the ascii code of the letter, not the character itself haha
<invsblduck>
whereas 1.9 apparently gives you the character/letter (not code)
jstew has quit [Quit: leaving]
<invsblduck>
i see Integer#chr is my friend.
yxhuvud has quit [Ping timeout: 246 seconds]
SeanLazer has quit [Quit: SeanLazer]
<aaroncm>
invsblduck: oh, that changed? I remember being really annoyed at that years ago. :)
<invsblduck>
er, s/Integer/Fixnum/ ?
<invsblduck>
yeah apparently i shouldn't run 1.8 at all, regardless of whether that's what comes with the OS or not :)
banghouse is now known as banghouseAFK
C0deMaver1ck has left #ruby ["Leaving..."]
Gavilan has joined #ruby
gmci has quit [Ping timeout: 244 seconds]
<invsblduck>
at least String and Fixnum both support #chr, so i don't need any extra machinery to make it work in either case. (i'd like this to work in both 1.8 and 1.9 so the world at large can use it hassle free)
pyoor has left #ruby [#ruby]
dekroning has quit [Quit: leaving]
burgestrand has joined #ruby
Targen_ has joined #ruby
Targen has quit [Ping timeout: 252 seconds]
gmci has joined #ruby
rowanu has quit [Ping timeout: 246 seconds]
nikky has joined #ruby
jgrevich has quit [Quit: jgrevich]
qwerxy has quit [Quit: offski]
chris_c_ has left #ruby [#ruby]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
fbernier has quit [Ping timeout: 248 seconds]
jwg2s has quit [Quit: jwg2s]
cclplatinum has quit [Quit: Leaving]
samuel02 has quit [Remote host closed the connection]
nikky has quit [Quit: Changing server]
bglusman has quit [Remote host closed the connection]
nikky has joined #ruby
williamcotton_ has joined #ruby
williamcotton has quit [Ping timeout: 252 seconds]
williamcotton_ is now known as williamcotton
ztkz has quit [Read error: Connection reset by peer]
hynkle has quit [Quit: Computer has gone to sleep.]
trend has joined #ruby
stewart_1 has joined #ruby
Morkel has joined #ruby
Morkel has quit [Client Quit]
ianbrandt has joined #ruby
jchauncey has quit [Quit: jchauncey]
<shevy>
1.8 is slowly dying
ph^ has joined #ruby
ebanoid has quit []
thecreators has quit [Quit: thecreators]
akem has quit [Ping timeout: 244 seconds]
<apeiros_>
no, no
<apeiros_>
1.8 died a long time ago
<cirwin>
only for you
<cirwin>
heroku only just moved to 1.9 by default
<apeiros_>
the remains is a shambling zombie
abra has quit [Remote host closed the connection]
<fowl>
brains
<apeiros_>
yeah, there's some zombie-lovers out there
<CrazyGir>
is this a good place to talk about mongrel?
<shevy>
not for crazy girls!!!
headius has quit [Quit: headius]
<CrazyGir>
there's not l in my nick, thanks
abra has joined #ruby
rowanu has joined #ruby
<CrazyGir>
*no
CreativeEmbassy has joined #ruby
Spooner has quit [Ping timeout: 246 seconds]
<invsblduck>
Gir as in Invader Zim?
<CrazyGir>
indeed
internet_user has quit [Remote host closed the connection]
<CrazyGir>
taaacoos!!!
<invsblduck>
youu so craaazy girl :P
<invsblduck>
gir*
<shevy>
a gir*
<invsblduck>
hhaha
Ed__ has joined #ruby
_Bairn has joined #ruby
<shevy>
CrazyGir from 693 people here, about I'd say 20 may know about mongrel, half of them could be asleep, but it is still best to just give it a try and see whether someone knows enough about mongrel to answer your question, ther eis also #mongrel2 channel here
twinturbo has quit [Quit: twinturbo]
<shevy>
on freenode
<CrazyGir>
hah
<Ed__>
hi all! Can anyone tell me what Hash[] does to an array?
<CrazyGir>
mongrel2, that's silly, why not #mongrel
<CrazyGir>
hah
qwerxy has joined #ruby
<workmad3>
Ed__: if you give Hash[] an array like [[:key, "value"], [:key2, "other value]] it'll give you back a hash {:key => "value", :key2 => "other value"}
schovi has quit [Remote host closed the connection]
<canton7>
also something like Hash[[[:a, :b], [:c, :d]]] => {:a => :b, :c => :d}
<apeiros_>
you can also give it a hash like [:key, :value, :key2, :value2, …]
jitesh_shetty has joined #ruby
<apeiros_>
but then you need to splat it
<apeiros_>
@ Ed__
RainbowDashh has quit [Quit: SLEEP MODE. I should stop shutting my MBP's lid less and get a QUIT message rotator.]
<Ed__>
oh ok, i think i got it. thanks!
luxurymode has quit [Quit: Computer has gone to sleep.]
joshman_ has quit [Ping timeout: 246 seconds]
Ed__ has quit [Read error: Connection reset by peer]
<tama>
hello shevy
<apeiros_>
hm, somebody should have told him about the docs…
Brandan has quit [Ping timeout: 246 seconds]
banghouseAFK is now known as banghouse
Progster has quit [Ping timeout: 260 seconds]
hadees has joined #ruby
deryl has quit [Ping timeout: 248 seconds]
<Synthead>
what's a good way to turn 5 (an int) into ' ' (5 spaces)?
<apeiros_>
' '*5
<Synthead>
that's fast, preferably w/o loops
<Synthead>
ooh!
<apeiros_>
it is a loop
<apeiros_>
you just don't see it
<apeiros_>
just like Array#include? is a loop and sooo many other things…
<tama>
oh, um, i think i have this. x.times { puts ' ' }
Ed__ has joined #ruby
<Synthead>
apeiros_: no way to do it without a loop? maybe some printf stuff perhaps?
<apeiros_>
Synthead: how do you think all that stuff works internally? :)
<canton7>
x.times.map{ ' ' }.join <-- worst I could think of
<tama>
synthead: XD
<invsblduck>
i think he means visible loop :)
<apeiros_>
no, no reasonable way to do it without a loop. but why do you bother?
<invsblduck>
no* visible loop
<Synthead>
hahaha
<Synthead>
noted :)
<tama>
:D
<tama>
' '*x
<apeiros_>
' '*5 is very efficient. even for large numbers (instead of 5)
deryl has joined #ruby
<Synthead>
apeiros_: ah, cool :)
<tama>
x = 5
<tama>
puts ' '*x
<canton7>
tbh, though, if you're after speed and efficiency, then ruby (and indeed scripting languages in general) are the wrong choice
<tama>
^ ruby is for programmer fun and convenience
<tama>
if you want to baby the computer, use c
<apeiros_>
canton7: I'm after speed and efficiency, that's the very reason I use ruby :)
<canton7>
you should be using ruby because it makes *you* more efficient -- under that logic, take the neat/clear/easy route, rather than the efficient one
<tama>
maybe common lisp or pascal
<apeiros_>
I code very efficiently, and my speed is impervious :D
<canton7>
hehe
<Synthead>
how about reading a string line-by-line (that includes newlines)? any better way than splitting it by "\n" and doing .each?
wpaulson has joined #ruby
* tama
pervs apeiros' code
<Mon_Ouie>
String#each_line
<canton7>
Synthead, want an array or an iterator?
<apeiros_>
Synthead: String#lines and String#each_line
<apeiros_>
latter if you just want to iterate
<canton7>
remember that with each_line you still get the \n
<apeiros_>
former if you need the array anyway.
<Synthead>
canton7: iterator
<Mon_Ouie>
Actually, String#lines is an alias for #each_line
<canton7>
then each_line
<Mon_Ouie>
So it doesn't matter
<Synthead>
canton7, apeiros_: will try it! thanks :D
<apeiros_>
Mon_Ouie: wott? o0
<apeiros_>
oh indeed
<Mon_Ouie>
Yeah, same in IO
* tama
eats the wott
<apeiros_>
I expected #lines to return an array
<apeiros_>
tama: you're one greedy tama…
<tama>
:D
PaciFisT has quit [Quit: Leaving.]
<Synthead>
Mon_Ouie: ooh!
<Synthead>
Mon_Ouie: nice :)
* apeiros_
tosses another wott to the hungry tama
* tama
pounces on it and devours
<apeiros_>
poor wott… at the end of the food chain…
Jay_Levitt has quit [Read error: Operation timed out]
<tama>
poor wott, now a part of tama
<apeiros_>
^^
Criztian has joined #ruby
axl__ has joined #ruby
<tama>
apeiros_: so, how are things? as soon as my new adhd stimulant prescription is filled out, i can start studying ruby. i'm so excited!
robotmay has quit [Remote host closed the connection]
beaky has joined #ruby
minijupe has quit [Quit: minijupe]
cakehero has joined #ruby
brianpWins has joined #ruby
jcromartie has quit [Quit: jcromartie]
rjsamson has joined #ruby
hunglin has quit [Ping timeout: 244 seconds]
stephenjudkins has joined #ruby
Targen has joined #ruby
Vendethiel has quit [Quit: je ne suis plus là, tqvu]
Sheehan has quit [Quit: Sheehan]
nari_ has joined #ruby
Ontolog has quit [Remote host closed the connection]
pk1001100011 has joined #ruby
Ontolog has joined #ruby
jimeh has quit [Ping timeout: 252 seconds]
werdnativ has joined #ruby
eurbach has quit [Remote host closed the connection]
beaky has quit [Ping timeout: 250 seconds]
Sheehan has joined #ruby
rking has quit [Quit: BRB reloading IRC scripts didn't go so well.]
rking has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
Ontolog has quit [Ping timeout: 245 seconds]
pk1001100011 has quit [Remote host closed the connection]
emmanuel__ has joined #ruby
Sheehan has quit [Quit: Sheehan]
emmanuelux has quit [Ping timeout: 264 seconds]
qwerxy has quit [Quit: offski]
SQLStud has quit [Read error: Connection reset by peer]
jameshyde has joined #ruby
liluo has joined #ruby
kvirani has quit [Remote host closed the connection]
khakimov has joined #ruby
SeanLazer has joined #ruby
itnomad has quit [Quit: Leaving]
dymk has joined #ruby
itnomad has joined #ruby
<dymk>
'ello
<dymk>
So, I'm attempting to get rubygems 1.3.6 running on Ruby 1.9.3 in an attept to upgrade our base ruby to 1.9.3, does anyone know if that's possible?
uris has quit [Quit: leaving]
<dymk>
Even downgrading to RubyGems 1.7 has proven difficult, not sure why either
dnyy has quit [Remote host closed the connection]
kevinbond has joined #ruby
wingy has joined #ruby
wingy has left #ruby ["WeeChat 0.3.6"]
bigkm has quit [Ping timeout: 265 seconds]
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
busybox42 has quit [Quit: Leaving.]
busybox42 has joined #ruby
rodasc is now known as crodas
kirun has quit [Quit: Client exiting]
bitsar has quit [Ping timeout: 246 seconds]
fbernier has joined #ruby
ryanf has joined #ruby
whuffor has quit [Ping timeout: 252 seconds]
ephemerian has quit [Quit: Leaving.]
rjsamson has quit [Remote host closed the connection]
<dymk>
Alright, by going back 1 version at a time, I'm at 1.7
<dymk>
And I can't roll back to any previous versions
wargasm1 is now known as wargasm
pk1001100011 has joined #ruby
savage- has joined #ruby
rking has quit [Quit: BRB because _`_ is pretty awesome and fixed my weechat issue.]
rking has joined #ruby
tamaska has joined #ruby
minijupe has joined #ruby
minijupe has quit [Client Quit]
<boobah>
dymk: why not install 1.9.3 with rvm?
<dymk>
Windows environment
<dymk>
Using Pik
dkissell_ has joined #ruby
Targen_ has joined #ruby
bitsar has joined #ruby
macmartine has quit [Quit: macmartine]
Targen has quit [Ping timeout: 265 seconds]
austinbv1 has joined #ruby
dkissell has quit [Ping timeout: 265 seconds]
dkissell_ is now known as dkissell
bosphorus has quit [Remote host closed the connection]
<dymk>
Well, I set up another instance of Ruby 1.8.7, and gem 1.3.6 installs just fine. I guess it's just an incompatibility with 1.9.3
whuffor has joined #ruby
yugui_zzz is now known as yugui
carloslopes has quit [Quit: Leaving.]
jimeh has joined #ruby
chson has joined #ruby
niklasb has quit [Ping timeout: 252 seconds]
nari__ has joined #ruby
chienpo has left #ruby [#ruby]
fbernier has quit [Ping timeout: 264 seconds]
jchauncey has joined #ruby
jchauncey has quit [Client Quit]
Ontolog has joined #ruby
nari_ has quit [Ping timeout: 246 seconds]
randoma__ has quit [Read error: Connection reset by peer]
Ontolog has quit [Read error: Connection reset by peer]
Ontolog has joined #ruby
rking has quit [Quit: BRB again.]
Maniacal has quit [Quit: Leaving]
thecreators has joined #ruby
Spooner has joined #ruby
rking has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
ckrailo has quit [Quit: Computer has gone to sleep.]