fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
emmanuelux has joined #ruby
jorge has joined #ruby
dagnachewa has quit [Quit: Leaving]
zodiak has joined #ruby
tigris_ has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
<tigris_> hey all, anyone know the story behind null character and UTF8? according to ruby and wikipedia, null char is valid unicode... according to postgres, it's not
<tigris_> they're real stubborn about it too, i asked them flat out, why can't a char that is valid ascii and unicode be stored in a text field, and they're all like "no one in their right mind thinks null is valid utf8"
<Norrin> if they're the only ones not supporting it, you showed them as many references are possible of other people supporting it?
<reactormonk> tigris_: they use null-terminated strings?
gmci has quit [Read error: Connection reset by peer]
Banistergalaxy has joined #ruby
<fowl> negative affects of cannibalism for humans
<fowl> wrong window
<kiyoura> lol
SCommette has joined #ruby
verto|off is now known as verto
gmci has joined #ruby
<tigris_> Norrin: the only info I have on it is that wikipedia says null char is valid ascii (character 0) and valid unicode "\u0000"... ruby accepts it as valid utf8, as does mysql (not that mysql is reknowned for following standards)
<fowl> >> "\u0000\u0000".size
<al2o3cr> (Fixnum) 2
<tigris_> reactormonk: perhaps they use null internally for terminating text, i've no idea.... i guess it may come down to sql spec
<Norrin> ^
SCommette has quit [Client Quit]
LennyLinux has quit [Remote host closed the connection]
freeayu has joined #ruby
mrdodo has joined #ruby
Takehiro has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
kaushik_ has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby
noyb has quit [Ping timeout: 276 seconds]
robbyoconnor has quit [Read error: Connection reset by peer]
jasonkuhrt has joined #ruby
robbyoconnor has joined #ruby
qwerxy has quit [Quit: offski]
c0rn_ has joined #ruby
noyb has joined #ruby
Takehiro has quit [Ping timeout: 272 seconds]
fyolnish has joined #ruby
warrenv has joined #ruby
sonamos has joined #ruby
TheNullByte has quit [Quit: TheNullByte]
TheNullByte has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
Markvilla has quit [Quit: Computer has gone to sleep.]
graspee has quit [Quit: leaving]
CarlB_the_great has joined #ruby
xyon has quit [Ping timeout: 246 seconds]
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
sepp2k1 has quit [Remote host closed the connection]
banisterfiend has joined #ruby
Targen_ has quit [Ping timeout: 246 seconds]
warrenv has quit [Quit: Leaving]
pskosinski has joined #ruby
johnjohnson has joined #ruby
Banistergalaxy has quit [Ping timeout: 246 seconds]
kn330 has quit [Ping timeout: 255 seconds]
gtuckerkellogg has joined #ruby
sonkei has joined #ruby
havenn has joined #ruby
kn330 has joined #ruby
zarubin has quit []
sonkei has quit [Client Quit]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
Jake232 has quit [Ping timeout: 244 seconds]
havenn has quit [Remote host closed the connection]
rakl has joined #ruby
Takehiro has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
alfplayer has quit [Ping timeout: 246 seconds]
chimkan has quit [Remote host closed the connection]
chimkan has joined #ruby
Takehiro has quit [Ping timeout: 246 seconds]
banisterfiend has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
jarred has quit [Quit: jarred]
jorge has quit [Remote host closed the connection]
ryanf has joined #ruby
rubious has quit [Quit: Leaving...]
blazes816 has quit [Quit: Leaving]
Vert has quit [Read error: Connection reset by peer]
chimkan has quit [Quit: chimkan]
bapa has left #ruby [#ruby]
bapa has joined #ruby
mikepack has quit [Remote host closed the connection]
pskosinski has left #ruby ["http://www.redeclipse.net -- Fast paced online FPS"]
chimkan has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
Monie has joined #ruby
Targen has joined #ruby
CarlB_the_great has joined #ruby
BrokenCog has quit [Remote host closed the connection]
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
CarlB_th_ has joined #ruby
CarlB_the_great has quit [Ping timeout: 264 seconds]
seanwash has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
seanwash has joined #ruby
yao_ has joined #ruby
niklasb has quit [Ping timeout: 240 seconds]
hekin has joined #ruby
khakimov has joined #ruby
tomzx_ has joined #ruby
sdwrage has joined #ruby
yao_ has left #ruby [#ruby]
vectorshelve has joined #ruby
tigris_ has quit [Quit: Leaving]
<vectorshelve> can anyone explain what these two method do ? http://pastie.org/4653647
kiyoura has quit [Quit: Leaving]
CarlB_th_ has quit []
kaushik_ has quit [Ping timeout: 246 seconds]
<vectorshelve> fowl: that helps me understand this def update each(&:update) end
<vectorshelve> fowl: but what about this ? def each(&block) @cells.each(&block) end
Hanmac1 has joined #ruby
<fowl> vectorshelve: in a method def the last &var is the block that was passed to the method (or nil if none was passed)
<fowl> vectorshelve: when it does @cells.each(&block) its just forwarding the block to @cells.each method
<fowl> >> def foo(&block) p block; end; foo { x + 3 }
<al2o3cr> (Proc) #<Proc:0x00000001bfac60@(eval):1>, Console: #<Proc:0x00000001bfac60@(eval):1>
<vectorshelve> fowl: ok.. thanks :)
t36717 has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 244 seconds]
t96116 has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
shadoi has joined #ruby
<vectorshelve> fowl: are both the methods related then ?
<fowl> vectorshelve: what do you mean
<fowl> which two
c0rn_ has quit [Quit: Computer has gone to sleep.]
<vectorshelve> fowl: when I do class.update it eventually does a class.@cells.each#update ?
<vectorshelve> fowl: reading the http://pastie.org/4653647 methods together..
<fowl> uh.. if you dont get caught in infinite recursion first it would probably work
<fowl> i dont see the class defs so i dont have the whole picture though
<vectorshelve> fowl: yes.. as long as @cellls is a finite set right ?
<fowl> shrug
verto is now known as verto|off
<vectorshelve> fowl: :=/
mrdodo has quit [Remote host closed the connection]
DrShoggoth has quit [Ping timeout: 246 seconds]
billyoc has joined #ruby
<fowl> vectorshelve: surely you can figure out if your methods are getting called.. good old fashioned puts "I'm in UPDATE()" works..
<vectorshelve> fowl: thanks why I am getting this error http://pastie.org/4653697
TheNullByte has quit [Quit: TheNullByte]
dmiller has joined #ruby
nari_ has joined #ruby
savage- has joined #ruby
maletor has joined #ruby
Bosox20051 has quit [Read error: Connection reset by peer]
Tearan has joined #ruby
linoj has joined #ruby
Takehiro has joined #ruby
sambio has joined #ruby
maletor has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
sambio_ has joined #ruby
sambio_ has quit [Read error: Connection reset by peer]
sambio_ has joined #ruby
kn330 has quit [Ping timeout: 255 seconds]
maletor has joined #ruby
sambio has quit [Client Quit]
sambio_ has quit [Read error: Connection reset by peer]
Takehiro has quit [Ping timeout: 264 seconds]
Tearan has quit [Quit: Sleepy Badger....]
kn330 has joined #ruby
M- has joined #ruby
Dreamer3 has joined #ruby
pipopopo has quit [Ping timeout: 240 seconds]
SCommette has joined #ruby
johnjohnson has quit []
Bosox20051 has joined #ruby
pipopopo has joined #ruby
SCommette has quit [Client Quit]
linoj has quit [Quit: linoj]
adelcampo has joined #ruby
dmiller has quit [Remote host closed the connection]
dmiller has joined #ruby
guns has joined #ruby
vfuse has joined #ruby
vfuse has quit [Client Quit]
cakehero has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
SCommette has joined #ruby
c0rn_ has joined #ruby
songrit has joined #ruby
songrit has quit [Quit: Bye]
songrit has joined #ruby
koshii has quit [Ping timeout: 244 seconds]
koshii has joined #ruby
SCommette has quit [Client Quit]
sambio has joined #ruby
Averna has joined #ruby
songrit has quit [Ping timeout: 240 seconds]
Dreamer3 has quit [Quit: Leaving...]
Dreamer3 has joined #ruby
Dreamer3 has quit [Client Quit]
Dreamer3 has joined #ruby
SCommette has joined #ruby
hekin has quit [Quit: hekin]
zodiak has quit [Remote host closed the connection]
kn330 has quit [Remote host closed the connection]
SCommette has quit [Client Quit]
pingfloyd has quit [Quit: pingfloyd]
pingfloyd has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
SCommette has joined #ruby
sonamos has quit [Quit: Leaving]
vectorshelve has quit [Quit: Page closed]
mrdodo has joined #ruby
heynerds has quit [Ping timeout: 248 seconds]
wtee has joined #ruby
Bosma has joined #ruby
ZachBeta has joined #ruby
mrdodo has quit [Ping timeout: 246 seconds]
machty has joined #ruby
cdepue has quit [Remote host closed the connection]
emmanuelux has quit [Remote host closed the connection]
mercwith1mouth has quit [Ping timeout: 244 seconds]
mercwith1mouth has joined #ruby
SCommette has quit [Quit: SCommette]
c0rn_ has quit [Quit: Lates.]
cdepue has joined #ruby
luckyruby has quit [Remote host closed the connection]
Takehiro has joined #ruby
sambio has quit [Quit: Saliendo]
noyb has quit [Ping timeout: 244 seconds]
rakl has quit [Quit: sleeping]
r0bby has joined #ruby
robbyoconnor has quit [Ping timeout: 240 seconds]
gry has joined #ruby
Takehiro has quit [Ping timeout: 256 seconds]
r0bby has quit [Excess Flood]
r0bby has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
r0bby has quit [Read error: Connection reset by peer]
r0bby has joined #ruby
r0bby has quit [Read error: Connection reset by peer]
r0bby has joined #ruby
tomzx_ has quit [Ping timeout: 276 seconds]
r0bby has quit [Client Quit]
meskyanichi has joined #ruby
mahmoudimus has joined #ruby
wargasm has quit [Ping timeout: 246 seconds]
joephlius has joined #ruby
billyoc has quit [Read error: Connection reset by peer]
billyoc has joined #ruby
joephelius has quit [Ping timeout: 272 seconds]
pingfloyd has quit [Ping timeout: 248 seconds]
DrShoggoth has joined #ruby
iori has joined #ruby
wargasm has joined #ruby
CarlB_the_great has joined #ruby
squar1sm has joined #ruby
squar1sm has quit [Client Quit]
mucker has quit [Ping timeout: 244 seconds]
mrdodo has joined #ruby
pingfloyd has joined #ruby
jasonkuhrt has quit [Quit: Leaving...]
pskosinski has joined #ruby
mrdodo has quit [Ping timeout: 252 seconds]
rubious has joined #ruby
seanwash has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mrdodo has joined #ruby
chimay has joined #ruby
Bosma has quit [Read error: Connection reset by peer]
seanwash has joined #ruby
ananthakumaran has joined #ruby
kaushik_ has joined #ruby
Takehiro has joined #ruby
mrdodo has quit [Ping timeout: 252 seconds]
gmci has quit [Quit: Computer has gone to sleep.]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Ping timeout: 276 seconds]
Guest5516 has joined #ruby
sonkei has joined #ruby
darkf has quit [Ping timeout: 246 seconds]
darkf has joined #ruby
mrdodo has joined #ruby
Takehiro has joined #ruby
Axsuul has quit [Remote host closed the connection]
adeponte has joined #ruby
aristidesfl has quit []
adeponte has quit [Remote host closed the connection]
t96116 has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
banisterfiend has joined #ruby
t73417 has joined #ruby
mahmoudimus has joined #ruby
yasushi has joined #ruby
minijupe has joined #ruby
goodieboy has joined #ruby
sonkei has quit [Quit: Computer has gone to sleep.]
hipertracker has quit [Ping timeout: 272 seconds]
seanwash has quit [Quit: Computer has gone to sleep.]
larissa has quit [Quit: Leaving]
Bosma has joined #ruby
S2kx has quit [Read error: Connection reset by peer]
S2kx has joined #ruby
Nisstyre_ has quit [Quit: Leaving]
hemanth has joined #ruby
hipertracker has joined #ruby
minijupe has quit [Quit: minijupe]
DrShoggoth has quit [Ping timeout: 246 seconds]
burgestrand has quit [Quit: Leaving.]
Nisstyre_ has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
pskosinski has quit [Ping timeout: 268 seconds]
tommyvyo has joined #ruby
Progster has joined #ruby
cdepue_ has joined #ruby
cdepue has quit [Ping timeout: 260 seconds]
CarlB_the_great has quit [Remote host closed the connection]
machty has quit [Read error: Connection reset by peer]
machty has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
cad_ has quit [Ping timeout: 246 seconds]
Axsuul has joined #ruby
Banistergalaxy has joined #ruby
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Guest5516 has quit [Ping timeout: 255 seconds]
h4mz1d has joined #ruby
yasushi has quit [Remote host closed the connection]
Takehiro has joined #ruby
CarlB_th_ has joined #ruby
artOfWar has joined #ruby
gfontenot has quit []
artOfWar has quit [Remote host closed the connection]
Kabaka has quit [Quit: Powering off to redo some cable management. Be back in a bit.]
CarlB_th_ has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 255 seconds]
Progster has quit [Ping timeout: 244 seconds]
gtuckerkellogg has joined #ruby
gfontenot has joined #ruby
goodieboy has quit [Remote host closed the connection]
cantonic has quit [Ping timeout: 245 seconds]
Banistergalaxy has quit [Ping timeout: 264 seconds]
justinmcp has quit [Ping timeout: 245 seconds]
justinmcp has joined #ruby
matrixise has quit [Ping timeout: 268 seconds]
minijupe has joined #ruby
justinmc_ has joined #ruby
ciopte7 has quit [Quit: ciopte7]
justinm__ has joined #ruby
robbyoconnor has joined #ruby
thaz has quit [Quit: thaz]
justinmcp has quit [Ping timeout: 240 seconds]
minijupe has quit [Client Quit]
h4mz1d has quit [Ping timeout: 246 seconds]
justinmc_ has quit [Ping timeout: 244 seconds]
cdepue_ has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
fyolnish has quit [Remote host closed the connection]
ph^ has joined #ruby
fyolnish_ has joined #ruby
burgestrand has joined #ruby
burgestrand1 has joined #ruby
burgestrand1 has quit [Remote host closed the connection]
burgestrand1 has joined #ruby
billyoc has quit [Quit: nap time]
wvms has left #ruby [#ruby]
ZachBeta has quit [Quit: Computer has gone to sleep.]
gloomer has joined #ruby
Bosma has quit [Quit: leaving]
burgestrand has quit [Ping timeout: 252 seconds]
ananthakumaran has quit [Quit: Leaving.]
DrShoggoth has joined #ruby
s1n4 has joined #ruby
aces1up has joined #ruby
fantazo has quit [Ping timeout: 244 seconds]
<aces1up> hello all, I am playing with the composite pattern and need some help with this bit of code
<aces1up> can somone assist in how i can itterate down through the levels deeper that 2?
a_a_g has joined #ruby
fantazo has joined #ruby
Chryson has joined #ruby
<_br_> aces1up: Why don't you just use a recursion for this kind of task?
don1 has joined #ruby
<aces1up> _br_ thats exactly what I want to do :) just not sure how to implement it.
techsurvivor has quit [Ping timeout: 260 seconds]
<aces1up> I have tried different things, but It just only goes down 1 level.
sailias has quit []
<_br_> aces1up: Probably this is what you are looking for http://www.ruby-forum.com/topic/131502
<aces1up> ultimately I would like to be able to do something like this by including enumerable ... @root.find{|node| !node.processed}
krz has joined #ruby
uris has quit [Quit: leaving]
<aces1up> _br_ thanks I will check that out.
<aces1up> _br_ in this code def each(&block)
<aces1up> block[self]
<aces1up> @leaves.each { |leaf| leaf.each(&block) }
<aces1up> end what does block[self] do?
minijupe has joined #ruby
s1n4 has quit [Quit: Lost terminal]
<reactormonk> aces1up: what's the composite pattern?
<reactormonk> aces1up: bit too many ()
<burgestrand1> aces1up: if block is a block, it calls the block with self as the only argument
burgestrand1 is now known as burgestrand
Takehiro has joined #ruby
<burgestrand> although technically the block must be either a proc or a lambda, and since both lambda and proc are procs, the block must be a proc
rll has joined #ruby
Takehiro has quit [Remote host closed the connection]
<rll> anybody tell me what ":&" mean?
noyb has joined #ruby
<reactormonk> rll: context?
<rll> ?
<rll> still don't get it...
<burgestrand> rll: it’s a symbol, nothing more
stepnem has joined #ruby
<burgestrand> rll: also, he asks for context
<burgestrand> rll: where did you get :& from
<rll> :& start
<burgestrand> it also probably means somebody is not very happy with you, it looks like a very sad and disfigured smiley
SCommette has joined #ruby
<burgestrand> rll: not that’s just invalid syntax
SCommette has quit [Client Quit]
<rll> it's from cloudfoundry
hemanth has quit [Ping timeout: 246 seconds]
<burgestrand> rll: you’re probably quoting it wrong
<burgestrand> most likely it says something more along the lines of something(&:start)
gtuckerkellogg has quit [Ping timeout: 244 seconds]
SCommette has joined #ruby
<rll> i see, i'll look it over again
franksort has joined #ruby
<rll> thx, burge :-)
<burgestrand> rll: and if so, that’s a special kind of method call
mrdodo has quit [Remote host closed the connection]
<rll> i guess so
<burgestrand> rll: when you prefix something with & during a method call, ruby recognizes you wanting to pass that something as the block to that method
adeponte has joined #ruby
yoklov has quit [Quit: computer sleeping]
<burgestrand> rll: but before ruby does that, ruby will call something.to_proc, and the resulting value is passed as the methods block
<franksort> If I have an array like arr = ['a', 'b', 'c'], is there a way to do arr.delete(['b', 'a'])?
<burgestrand> rll: in the case of symbol, :start.to_proc returns a block that calls start on it’s first argument, so something(&:start) becomes something { |x| x.start }
<reactormonk> franksort: ary.reject! {|e| %w(a b).include? e}
<burgestrand> franksort: ary - %w[b a]
<franksort> what's %w?
<burgestrand> franksort: a shorthand for defining an array of words, this works too: ary - ['b', 'a']
areil has joined #ruby
ph^ has quit [Remote host closed the connection]
<fowl> >> %w&a b c 1 2 34&
<burgestrand> >> %w[hello world]
<al2o3cr> (Array) ["hello", "world"]
<al2o3cr> (Array) ["a", "b", "c", "1", "2", "34"]
<burgestrand> >> %w[a b c d] - %w[b a]
<al2o3cr> (Array) ["c", "d"]
cantonic has joined #ruby
<fowl> %w A B C
<fowl> >> %w A B C
<al2o3cr> -e:1:in `eval': (eval):1: unterminated string meets end of file (SyntaxError), from -e:1:in `<main>'
<franksort> Oh ok, thanks reactormonk, burgestrand, al2o3cr, fowl
<burgestrand> >> %w A B C 
adeponte has quit [Ping timeout: 246 seconds]
<burgestrand> >> "Moo"
<al2o3cr> (String) "Moo"
<burgestrand> Aw.
Spooner_ has quit [Ping timeout: 272 seconds]
<burgestrand> >> %w A B 
<burgestrand> Too bad.
<burgestrand> >> def  ; %(A B C); end  
<burgestrand> Used to work. Oh well.
<Hanmac1> >> %w[A B C]
<al2o3cr> (Array) ["A", "B", "C"]
Kabaka has joined #ruby
Hanmac1 is now known as Hanmac
<fowl> >> %q LOLcantusespacesinitbutstill .split /[AEIOUaeoiu]/
<al2o3cr> (Array) ["L", "Lc", "nt", "s", "sp", "c", "s", "n", "tb", "tst", "ll"]
burgestrand has quit [Quit: Leaving.]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
Takehiro has joined #ruby
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
jarred has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
thaz has joined #ruby
ananthakumaran has joined #ruby
thaz has quit [Client Quit]
hemanth has joined #ruby
thaz has joined #ruby
<rll> yes, i just check the code again
<rll> def self.start(args)
<rll> self.start_init
<rll> components(args).each(&:start)
<rll> end
<fowl> you gonna go over each line in here?
<rll> it's code from cloudfoundry
answer_42 has joined #ruby
enyo_ has quit [Ping timeout: 252 seconds]
maesbn has joined #ruby
lkba has joined #ruby
deryl has quit [Quit: deryl]
whowantstolivefo has joined #ruby
minijupe has quit [Quit: minijupe]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
wtee has quit [Remote host closed the connection]
tagrudev has joined #ruby
SCommette has quit [Quit: SCommette]
JohnBat26 has joined #ruby
zigomir has joined #ruby
justsee has quit [Quit: Leaving...]
don1 has quit [Quit: WeeChat 0.3.8]
techsurvivor has joined #ruby
gtuckerkellogg has joined #ruby
chimay has quit [Ping timeout: 276 seconds]
mercwith1mouth has quit [Ping timeout: 248 seconds]
savage- has quit [Remote host closed the connection]
fantazo has quit [Remote host closed the connection]
Morkel has joined #ruby
yubiwasabi2 has joined #ruby
Taichou has joined #ruby
zommi has joined #ruby
machty_ has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
arturaz has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
nilg has joined #ruby
lolsuper_ has quit [Quit: Leaving]
bigkevmcd has joined #ruby
rakl has joined #ruby
sgmac has joined #ruby
tonini has joined #ruby
rakl has quit [Client Quit]
jarred has quit [Quit: jarred]
jenrzzz has joined #ruby
mengu has joined #ruby
hipertracker has quit [Quit: hipertracker]
mneorr has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
Cache_Money has joined #ruby
robustus has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
Taichou has quit [Remote host closed the connection]
ph^ has joined #ruby
aganov has joined #ruby
mercwith1mouth has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
yubiwasabi2 has quit [Ping timeout: 244 seconds]
t73417 has quit [Remote host closed the connection]
t43712 has joined #ruby
gtuckerkellogg has joined #ruby
qwerxy has joined #ruby
albel727 has quit [Ping timeout: 240 seconds]
hemanth has quit [Read error: Connection reset by peer]
mohit_ has joined #ruby
albel727 has joined #ruby
Xeago has joined #ruby
mohits_ has joined #ruby
yubiwasabi2 has joined #ruby
mohits has quit [Remote host closed the connection]
mohit_ has quit [Remote host closed the connection]
mohits_ has quit [Remote host closed the connection]
digitalcakestudi has quit [Ping timeout: 244 seconds]
d3vic3 has joined #ruby
ephemerian has joined #ruby
tr4656 has quit [Ping timeout: 246 seconds]
specialGuest has joined #ruby
Essobi has quit [Ping timeout: 246 seconds]
beandip has quit [Ping timeout: 246 seconds]
d3vic3 has quit [Quit: leaving]
xorigin has joined #ruby
gfontenot has quit []
Xeago has quit [Remote host closed the connection]
tr4656 has joined #ruby
carrythezero has quit [Ping timeout: 252 seconds]
techsurvivor has quit [Quit: WeeChat 0.3.8]
techsurvivor has joined #ruby
hemanth has joined #ruby
carrythezero has joined #ruby
Bosox20051 has quit [Quit: Leaving]
Essobi has joined #ruby
Xeago has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
eldariof has joined #ruby
edwardj has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
Cache_Money has quit [Read error: Connection reset by peer]
matrixise has joined #ruby
Cache_Money has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
qwerxy has quit [Quit: offski]
mneorr has quit [Quit: Leaving.]
maletor has quit [Quit: Computer has gone to sleep.]
wobr has joined #ruby
JohnBat26 has joined #ruby
thone has joined #ruby
mahmoudimus has joined #ruby
Cache_Money has quit [Ping timeout: 260 seconds]
sgmac has left #ruby [#ruby]
t43712 has quit [Remote host closed the connection]
t94687 has joined #ruby
edwardj has quit [Remote host closed the connection]
thone_ has quit [Ping timeout: 245 seconds]
Tref has joined #ruby
<Tref> guys, I have a huge long text file that has an array in it, I'd like to read that file in then process each item of the array
<Tref> I'm bringing it in right now via File.open
LouisGB has joined #ruby
<Tref> I've got to turn something like "[[1,2][3,4]]" into an array
wargasm1 has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
<juha_> Tref: [[1,2],[3,4]] ? :P
ryanf has quit [Quit: leaving]
answer_42 has quit [Quit: WeeChat 0.3.8]
<Tref> yeah that's what i meant
answer_42 has joined #ruby
rakunHo has joined #ruby
vjt has quit [Ping timeout: 272 seconds]
williamherry has joined #ruby
<Hanmac> Tref allways a pair of two numbers?
c0rn_ has joined #ruby
<Hanmac> >> s ="[[1,2],[3,4],[5,6]]".scan(/\[(\d+),(\d+)\]/).map{|e| e.map(&:to_i)}
<al2o3cr> (Array) [[1, 2], [3, 4], [5, 6]]
cezar has joined #ruby
cezar has quit [Client Quit]
mercwith1mouth has quit [Ping timeout: 240 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
arkiver has joined #ruby
diegoviola has quit [Ping timeout: 252 seconds]
Banistergalaxy has quit [Ping timeout: 264 seconds]
cloud|droid has joined #ruby
BiHi has joined #ruby
dhruvasagar has joined #ruby
dhruvasagar has quit [Remote host closed the connection]
<Xeago> >> eval "[[1,2],[3,4],[5,6]]"
<al2o3cr> (Array) [[1, 2], [3, 4], [5, 6]]
<Hanmac> Xeago: eval is never an option!
Taichou has joined #ruby
Xeago_ has joined #ruby
justsee has quit [Quit: Leaving...]
noyb has quit [Ping timeout: 240 seconds]
Xeago has quit [Ping timeout: 272 seconds]
gtuckerkellogg has joined #ruby
dimday has joined #ruby
Banistergalaxy has joined #ruby
CodeVision has joined #ruby
gyre007 has quit [Quit: Leaving]
Criztian has joined #ruby
dimday has quit [Client Quit]
arkiver has quit [Quit: Leaving]
dimday has joined #ruby
hipertracker has joined #ruby
chussenot has joined #ruby
rakl has joined #ruby
<shevy> hehe
<shevy> 71 instances of eval in ActiveSupport
jenrzzz has joined #ruby
<Hanmac> instance eval might be not SO evil ... but the string eval is the worse in persona :P
Vert has joined #ruby
timonv_ has quit [Remote host closed the connection]
polysics has joined #ruby
jimeh2 has joined #ruby
jimeh has quit [Ping timeout: 244 seconds]
specialGuest has quit [Quit: WeeChat 0.3.8]
pingfloyd has quit [Quit: pingfloyd]
xbayrockx has joined #ruby
<polysics> hi
t94687 has quit [Remote host closed the connection]
<polysics> I found code that goes method('foo', type='bar')
Takehiro has quit [Remote host closed the connection]
t73276 has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<polysics> I think it works, but does not do what the author intends
daniel_hinojosa has quit [Ping timeout: 260 seconds]
<polysics> ie. parameter does get passed but not as a "named" one
timonv has joined #ruby
<polysics> that is, if hte method had a signature like method(subject, color, type)
<polysics> the above would not set type
mrck has joined #ruby
<Hanmac> polysics i think the author was dumb :P
Takehiro has joined #ruby
qwerxy has joined #ruby
<banisterfiend> polysics: maybe he's using 'type' later on in the surrounding scope
<banisterfiend> though it's still a bit weird
<polysics> no, it's clearly a single method call
<banisterfiend> oh ok
<polysics> ok, I just needed to know if I was seeing things
<polysics> or rather, if I had missed something that important :-D
KevinSjoberg has joined #ruby
deryl has joined #ruby
und3f has joined #ruby
elaptics`away is now known as elaptics
c0rn_ has quit []
jenrzzz has quit [Ping timeout: 252 seconds]
chimkan has quit [Quit: chimkan]
ickmund has joined #ruby
fearoffish has quit [Ping timeout: 268 seconds]
Chryson has quit [Quit: Leaving]
charliesome has joined #ruby
havenn has joined #ruby
rohit has joined #ruby
fearoffish has joined #ruby
machty has quit [Ping timeout: 248 seconds]
Taichou has quit [Remote host closed the connection]
eikko has joined #ruby
diegoviola has joined #ruby
kerframil has joined #ruby
machty has joined #ruby
<bnagy> I do that sometimes, when I have an api I don't control
<bnagy> and I want to remind myself what the second arg is for
<Hanmac> oO
BiHi_ has joined #ruby
<bnagy> better than coming across blah(31, true) # WTF does true do??
<Hanmac> bnagy that is what ri is for oO
BiHi has quit [Ping timeout: 246 seconds]
pskosinski has joined #ruby
<Cork> bnagy: why not just use a comment?
<bnagy> no ri is for being unreadable and never working properly
<bnagy> and assumes the code you're using has rdoc
<Cork> opps wrong channel :P
adelcampo has quit [Quit: Linkinus - http://linkinus.com]
<Mon_Ouie> RDoc is pretty much just adding a comment right above code definition, so pretty much everything that's documented has it
<Hanmac> imo RDoc is not so bad ... i have seen worse things
rubious has quit [Quit: Leaving...]
sdwrage has quit [Quit: geekli.st/programmer]
ken_barber has joined #ruby
<banisterfiend> bnagy: then use pry ffs
<banisterfiend> bnagy: im going to slap u, show-source blah
<bnagy> banisterfiend: which is another thing that doesn't help when you're reading code
<banisterfiend> bnagy: if u read the code in pry to begin with, it would :)
<bnagy> yes, because pry is an editor. bravo.
<bnagy> what is it, retard day?
cloud|droid has quit [Ping timeout: 245 seconds]
<fowl> ooh pwnt
<banisterfiend> bnagy: It opens editors for you
<banisterfiend> bnagy: edit-method MyClass#my_method
<fowl> zing, and a comeback!
<bnagy> which, again, doesn't help when you're reading code. In your editor.
<banisterfiend> bnagy: but i dont actually need to use an editor, show-source is enough for me when exploring code, if i really want an editor i can use edit-method (but that's rare)
<polysics> you people all such, real programmers read data off the HD with a magnetized needle
<fowl> bnagy: and what, ri does?
<bnagy> fowl: no, it doesn't, which is one of the reasons I never use it
workmad3 has joined #ruby
<banisterfiend> bnagy: But that's my point, using an editor for reading code is not the best approach, I use pry to navigate the code base and then when i find something i want to examine i show-source it OR if i really want an editor i use edit or edit-method instead.
nim__ has quit [Ping timeout: 246 seconds]
chendo_ has quit [Ping timeout: 246 seconds]
<banisterfiend> bnagy: i dont think an editor is a natural way to navigate a code base as it divides things up into files and directories, rather than the natural units of the code itself which is classes and methods
<bnagy> banisterfiend: how well does that work for you with say a few hundred files in your codebase?
t73276 has quit [Remote host closed the connection]
<bnagy> anyway this is a braindead discussion
<bnagy> busy
t25078 has joined #ruby
baphled has joined #ruby
fearoffish has quit [Ping timeout: 246 seconds]
<banisterfiend> bnagy: easy, because the number of files is irrelevant as it's not organized by file it's organized by classes and methods
hemanth has quit [Read error: Connection reset by peer]
M- has quit [Quit: This computer has gone to sleep]
mneorr has joined #ruby
dimday has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
cascalheira has joined #ruby
<matti> Hi banisterfiend
fearoffish has joined #ruby
<matti> shevy alseep, I see ;]
<banisterfiend> matti: Hey Girl.
Takehiro has quit [Remote host closed the connection]
rohit has quit [Ping timeout: 255 seconds]
Takehiro has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
fearoffish has quit [Ping timeout: 260 seconds]
fearoffi_ has joined #ruby
Takehiro has quit [Ping timeout: 240 seconds]
krz has quit [Quit: krz]
hemanth has joined #ruby
imami|afk is now known as banseljaj
yubiwasabi2 has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
fearoffi_ has quit [Client Quit]
havenn has quit [Remote host closed the connection]
rakunHo has quit [Ping timeout: 246 seconds]
berserkr has joined #ruby
beandip has joined #ruby
rakl has quit [Quit: sleeping]
banisterfiend has joined #ruby
Takehiro has joined #ruby
chimay has joined #ruby
Takehiro has quit [Remote host closed the connection]
rohit has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
fyolnish_ has quit [Remote host closed the connection]
mucker has joined #ruby
chendo_ has joined #ruby
<hemanth> require 'foo' if Gem::Specification::Find_by_name('foo')
<hemanth> how bad is that?
rakunHo has joined #ruby
rll has quit [Quit: Page closed]
<hoelzro> what's the recommended library for raw DB access? Ruby/DBI? RDBI?
pingfloyd has joined #ruby
cascalheira has quit [Ping timeout: 246 seconds]
cascalheira has joined #ruby
mneorr has quit [Quit: Leaving.]
polysics has quit [Remote host closed the connection]
<Hanmac> hemanth but something like "mkmf" may not work this way
justinm__ has quit [Remote host closed the connection]
<Hanmac> or something like "open3"
tonini has quit [Remote host closed the connection]
arkiver has joined #ruby
<hemanth> win32/screenshot? Hanmac
<Hanmac> i meand something like installed via stdlib http://www.ruby-doc.org/stdlib-1.9.3/
<Xeago_> hemanth: why not use a rescue?
<hemanth> ha
<hemanth> ok
<hemanth> Xeago_, ya was about to say that
<hemanth> be looks ugly
chendo_ has quit [Ping timeout: 246 seconds]
coderguy has joined #ruby
<hemanth> I don't want to try and fail
<hemanth> But I don't want to try if I would fail
<hemanth> :D
<Xeago_> is foo an explicit dependency, then you want to fail, right?
<hemanth> there are 50VMS and only some need foo, so the code must check
deryl has quit [Quit: deryl]
tgriffin2081 has quit []
<Xeago_> how do you check if you need foo?
chimay has quit [Quit: WeeChat 0.3.9-rc1]
dhruvasagar has joined #ruby
pingfloyd has quit [Ping timeout: 264 seconds]
<Xeago_> or what is that based on?
chendo_ has joined #ruby
pingfloyd has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
* Hanmac used require inside a method ... so it only required if the method is called
coderguy has quit [Ping timeout: 240 seconds]
bradhe has quit [Remote host closed the connection]
<matti> Hi hi hemanth
<hemanth> Xeago_, require if gem is installed Hanmac
<matti> And Hanmac
Shrink has quit [Ping timeout: 268 seconds]
<hemanth> matti, yo
<matti> banisterfiend: You are such a gentleman and a scholar.
darkf has quit [Read error: Connection reset by peer]
<matti> What's up in the World of Ruby?
chimay has joined #ruby
darkf has joined #ruby
rohit has quit [Ping timeout: 245 seconds]
<hemanth> matti, require 'foo' only_if_its_installed
<hemanth> instead of a rescue block
<hemanth> trying to do that
Eplemosen has joined #ruby
<banisterfiend> matti: check out this: https://github.com/conradirwin/pry-rescue
<Hanmac> hemanth an gem could be installed in diferent ways Gem maybe cant find
<hemanth> Hanmac, true, so it boils down to rescue block ...:|
<matti> banisterfiend: Is this the one that drops you down to a debugger on an exception?
darkf has quit [Ping timeout: 264 seconds]
<banisterfiend> matti: drops you into pry when an exception would bubble out of the block yeah
<matti> Nice
tatsuya_o has quit [Ping timeout: 246 seconds]
<banisterfiend> matti: i would like to get it to a point it could be used in production
chimay has quit [Ping timeout: 276 seconds]
timonv has quit [Remote host closed the connection]
<matti> banisterfiend: I would only keep it as a feature of anything that runs in production.
<matti> banisterfiend: Things dropping to CLI on exception.
<banisterfiend> matti: what does "keep it as a feature of anything that runs in production" ?
<matti> banisterfiend: As a half-Systems-person, I would burn you on a stake if everytime something goes wrong I have to go and manually exit Pry to get production going.
<banisterfiend> i can't parse than sentence ;)
<matti> banisterfiend: Fail-fast and recover.
<banisterfiend> matti: of course it wouldn't be naive like that
<matti> :)
jchild has joined #ruby
Takehiro has joined #ruby
<matti> Hi Takehiro
<banisterfiend> matti: the likely use case would be forking at the point of the exception, to allow later connections over a socket to figure out what went wrong
<Takehiro> hey!
timonv has joined #ruby
justinmcp has joined #ruby
<matti> banisterfiend: Fork... I'd prefer getting a process snapshot / image.
<matti> banisterfiend: So I can use it like I'd do with gdb.
<banisterfiend> matti: well once u write the technology to do that, we can use it :)
<banisterfiend> matti: i spend about 1 week figuring out how to take a snapshot of a running ruby process, it's not easy and i didnt solve it
<matti> banisterfiend: Fork. Sometimes a bad idea. Especially if service will go into a rampage and start to flip all the time.
<matti> banisterfiend: One possible thing.
<matti> banisterfiend: Would be to marry LXC with Ruby VM.
<matti> banisterfiend: You get a serious exception.
<matti> banisterfiend: You contact upper-layer, and immediately save LXC container state.
<banisterfiend> What is LXC?
<matti> banisterfiend: And spun a new one.
<hoelzro> Linux containers
<matti> hoelzro: +1
<banisterfiend> ah
<matti> Its what Heroku uses.
<matti> As well.
<banisterfiend> "marry LXC with Ruby VM" ---> you say that like it's easy :)
<matti> banisterfiend: Why it would be hard?
<matti> banisterfiend: It is just a matter of working our how to dispatch such request to an upper-layer.
poppiez has joined #ruby
<banisterfiend> matti: because i'm assuming it would require spelunking the depths of the ruby vm source
<matti> Even simple PING-PONG solution from the host to guest would do.
sepp2k has joined #ruby
robozahn has joined #ruby
<matti> For instance -- application in a container is not responding? Save state.
<matti> banisterfiend: I meant Ruby VM as Ruby interpreter running there serving something.
wargasm1 has quit [Ping timeout: 246 seconds]
<banisterfiend> brb
Gesh has joined #ruby
<hemanth> gem list | grep ?
chimay has joined #ruby
gyre007 has joined #ruby
<matti> ?
Takehiro has quit [Remote host closed the connection]
omry has joined #ruby
s1n4 has joined #ruby
timonv has quit [Read error: Connection reset by peer]
s1n4 is now known as Guest69498
timonv has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
timonv has quit [Remote host closed the connection]
<banisterfiend> matti: sorry, got called away (had to look for my flatmates sleeping pills)
Guest69498 has quit [Changing host]
Guest69498 has joined #ruby
<banisterfiend> matti: so you can just tell LXC to clone a process state and copy it into another 'linux container' or whatever?
Guest69498 has quit [Client Quit]
arturaz has quit [Remote host closed the connection]
gloomer has quit []
_s1n4_ has joined #ruby
arturaz has joined #ruby
t25078 has quit [Remote host closed the connection]
t5630 has joined #ruby
<matti> banisterfiend: No. Not sure if this is possible.
<matti> banisterfiend: You could, IIRC, save state of a particular container, and then spun a new one.
Xeago_ has quit [Remote host closed the connection]
<matti> banisterfiend: If you have RR LB in front of your backends, for instance. Then it should not upset too much.
<matti> banisterfiend: Provided that data your work with is state-less / session-independent.
snearch has joined #ruby
wargasm has joined #ruby
<banisterfiend> matti: problem is even if that works, it seems a very specific solution tied to a very specific technology that not everyone might be using
<matti> banisterfiend: If you have Linux kernel which is modern.
<banisterfiend> matti: one solution i was playing with was generating core files on demand
x0F_ has joined #ruby
x0F_ has quit [Changing host]
x0F_ has joined #ruby
x0F has quit [Disconnected by services]
<matti> banisterfiend: That is not hard as well.
<matti> banisterfiend: You can use gdb to do it.
x0F_ is now known as x0F
<hemanth> how about? install_gem(gem) if !installed?(gem)
<matti> banisterfiend: For instance, you can have small server / process running in the background.
gmci has joined #ruby
<banisterfiend> matti: i've done it, but the difficulty is bringing it back to life
<banisterfiend> matti: since a core file is just post-mortem
<matti> banisterfiend: And if an application will misbehave, you ask this little server to get gdb and save your memory.
snearch has quit [Client Quit]
<matti> banisterfiend: Yeah.
<matti> banisterfiend: There wound not be a perfect solition here.
<matti> banisterfiend: Unless your process that crashes is self-confined.
<matti> banisterfiend: Anything else, which for instance interacts with a database, or something external.
<matti> banisterfiend: If you save its state and then resume it. There is no guarantee that corrupted data will not get into your database.
mneorr has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
<matti> banisterfiend: Unless everything is API-driven and everything is validated... but that also does not protect against logical errors.
<banisterfiend> matti: not quite sure what you're talking about, resuming what?
<banisterfiend> matti: you are talking about a fix + continue work flow?
<banisterfiend> the gem doesn't allow for that, even. It's just for post mortem debugging
<banisterfiend> i would like to add fix + continue but it's difficult
Xeago has joined #ruby
<hemanth> Gem::Specification::find_by_name() itself is throwing gem load error!
<hemanth> D:
<matti> banisterfiend: I was talking about saving execution state of entire LXC container.
<banisterfiend> matti: ah, it wasn't clear you were talking about that since we had discussed a couple of other techniques too :)
TheFuzzball has quit [Disconnected by services]
<banisterfiend> i know nothing about LXC so i know nothing of the potential pitfalls, too
timonv has joined #ruby
<banisterfiend> matti: for generating corefiles, there are 3rd part libraries that do that too btw, rather than shoe-horning gdb into the process
TheFuzzb_ has joined #ruby
<shevy> matti yeah almost, was sleeping before, but just got back on the library. I have to ignore the only person here to spam me with horse p0rn so I can't see or care what this stupid person does
<Xeago> anyone with an abundance english knowledge who wants to share? I feel there is a bit too much "I will" in the following paragraph..
<Xeago> "During my internship at VideofyMe I shall fulfill a request by the users: search. The current search system is inadequate as it does not fullfill the users' desires, does not find items reliably and is as hard to extend as it is slow. I will develop, and implement, search in a distributed manner. I will design and deploy a distributed architecture for future extensibility and scalability. The search index will not be open to the public, so as
<Xeago> to not forget about security and search scraping. Accessing the index will happen through the internal API of VideofyMe. "
<Xeago> I will/shall
<bnagy> will / shall is complicated and there's not even a clear consensus
<bnagy> just use will in all cases
<banisterfiend> Xeago: the first sentence isn't particularly well expressed as there already is a search system right? so you shouldn't just say 'search' you should say 'improving the search system'
Guest5516 has joined #ruby
<banisterfiend> "I shall address a common user request: improving the search system" or such, or perhaps "For my internship at VideofyMe I aim to overhaul the search system. The current search system has been a source of many user complaints: it does not find items reliably ..." etc
<banisterfiend> Xeago: ^
hekin has joined #ruby
bhavesh_a_p has joined #ruby
freeayu has quit [Quit: This computer has gone to sleep]
aristidesfl has joined #ruby
pingfloyd has quit [Quit: pingfloyd]
chendo_ has quit [Ping timeout: 260 seconds]
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
chendo_ has joined #ruby
nilg has quit [Read error: Connection reset by peer]
nilg has joined #ruby
nilg has quit [Read error: Connection reset by peer]
heftig has quit [Ping timeout: 245 seconds]
mneorr1 has joined #ruby
nilg has joined #ruby
bradhe has joined #ruby
mneorr has quit [Ping timeout: 245 seconds]
nilg has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
diegoviola has quit [Ping timeout: 244 seconds]
jchild has quit [Quit: WeeChat 0.3.8]
nilg has joined #ruby
wallerdev has quit [Quit: wallerdev]
heftig has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
Foxandxss has joined #ruby
jarek has joined #ruby
machty_ has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
nim_ has joined #ruby
Taichou has joined #ruby
Takehiro has joined #ruby
resure has joined #ruby
bluebie has joined #ruby
resure has quit [Client Quit]
resure has joined #ruby
kyb3r has quit []
<bluebie> yo dudes
twinturbo has joined #ruby
jjang has quit [Remote host closed the connection]
<banisterfiend> hey blue
<bluebie> sup banisterfiend?
dynamix has joined #ruby
BiHi_ has quit [Quit: Computer has gone to sleep]
<banisterfiend> bluebie: waching botfly extraction vids on youtube :)
<bluebie> creepy
<bluebie> I don't think I'll click that
dynamix has quit [Client Quit]
mr_dynamix has joined #ruby
<Xeago> banisterfiend: thank you!
wez has joined #ruby
Takehiro has quit [Remote host closed the connection]
twinturbo has quit [Ping timeout: 276 seconds]
<banisterfiend> bluebie: waddup with u?
Taichou has quit [Remote host closed the connection]
nari_ has quit [Ping timeout: 245 seconds]
heisenmink has joined #ruby
freeayu has joined #ruby
manolo has joined #ruby
<bluebie> stressing a bit, housemate drama
_s1n4_ is now known as s1n4
<bluebie> thinking about ways to have a good income
<bluebie> going to start selling stuff on etsy soon
<banisterfiend> bluebie: u're based in sydney right?
<bluebie> yep
<banisterfiend> awesome city i was there a few months ago
<bluebie> nice
<bluebie> yeah I like it
arkiver has quit [Quit: Leaving]
<bluebie> has cool parks and things in the city
banseljaj is now known as imami|afk
resure has quit [Ping timeout: 245 seconds]
<matti> shevy: Horse porn?
<matti> shevy: Is that person banisterfiend?
<matti> ;d
Spooner has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
JohnBat26 has joined #ruby
wez has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
duardbr has joined #ruby
duardbr has left #ruby [#ruby]
duard has joined #ruby
Axsuul has quit [Ping timeout: 244 seconds]
Takehiro has joined #ruby
Taichou has joined #ruby
pepijndevos has joined #ruby
binw has quit [Ping timeout: 248 seconds]
binw has joined #ruby
justinmcp has quit [Remote host closed the connection]
<pepijndevos> I have a problem with mkmf on my Mac. It set the C compiler to xcrun cc, while I don't have Xcode installed, but I do have a C compiler.
<pepijndevos> I installed just the command line tools
<pepijndevos> it gets the compiler from RbConfig::MAKEFILE_CONFIG
<pepijndevos> Can I change that to just say (g)cc?
<hoelzro> pepijndevos: what version of OS X are you on?
<pepijndevos> Mountain Lion
<hoelzro> =(
<pepijndevos> hoelzro: ?
<hoelzro> I've just encountered nothing but trouble setting up a proper dev environment on OS X >= Lion
<pepijndevos> all my trouble so far is from not wanting XCode
<pepijndevos> just the compiler, thank you very much.
* Hanmac has no trouble because he had a better OS for deviloping
<hoelzro> yup, that's what I wanted.
<hoelzro> I use a proper OS at home ;)
aristidesfl has quit []
<bluebie> Can't you just install apple's command line developer tools package?
* Hanmac laughts evil because he uses ruby for his 3D games
<hoelzro> I think that's what I ended up doing?
<hoelzro> Hanmac: what's wrong with that?
<pepijndevos> bluebie: I have that, but it includes an app called xcrun that looks for an Xcode installation and then gets you the command line tools.
<hoelzro> pepijndevos: does 'which gcc' output anything?
<pepijndevos> basically, I know I have those installed in /usr/bin, and xcrun does not know that.
<pepijndevos> hoelzro: yes
<Hanmac> hoelzro thought about it: makeing 3D games with ruby is cool (and the FPS are still very high)
<pepijndevos> it's just that this ruby makefile generator outputs xcrun commands
t5630 has quit [Remote host closed the connection]
t8182 has joined #ruby
<bluebie> pepijndevos: Can you set it with the xcode-select utility maybe?
justinmcp has joined #ruby
<pepijndevos> I went ahead and installed Xcode anyway, because macvim also needed Xcodebuild, which suffers from the same problem
<pepijndevos> bluebie: set it to what? I have no Xcode to point it at.
<bluebie> i guess so :S
<bluebie> I don't see what the big deal is. Xcode is handy, even if it is a piece of shit
<bluebie> it's also free and easy to uninstall
<pepijndevos> I installed it already, I'm just saying this is a bug in the makefile generator
<bluebie> fair call
<pepijndevos> my main problem with Xcode is that it starts slow and claims a lot of file etensions
freeayu has quit [Ping timeout: 244 seconds]
johnjohnson has joined #ruby
Tref has quit [Ping timeout: 240 seconds]
<pepijndevos> should I file a bug report somewhere?
jastix has joined #ruby
tonini has joined #ruby
<cool> how do I manually date for updated_at column?
aristidesfl has joined #ruby
bradhe has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
bradhe has quit [Ping timeout: 260 seconds]
emmanuelux has joined #ruby
arkiver has joined #ruby
<Hanmac> cool wrong channel
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
atno has joined #ruby
Eplemosen has quit [Quit: NOPE]
gtuckerkellogg has joined #ruby
jimeh2 has quit [Ping timeout: 246 seconds]
gmci has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
timonv has quit [Remote host closed the connection]
larissa has joined #ruby
BiHi has joined #ruby
yosafbridge has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
gry has quit [Excess Flood]
gtuckerkellogg has joined #ruby
Floydzy has joined #ruby
timonv has joined #ruby
iori has quit [Remote host closed the connection]
Nathandim has joined #ruby
quazimodo has quit [Remote host closed the connection]
yosafbridge has joined #ruby
adelcampo has joined #ruby
NiteRain has joined #ruby
gry has joined #ruby
fantazo has joined #ruby
chimay has quit [Ping timeout: 276 seconds]
Takehiro has quit [Remote host closed the connection]
aristidesfl has quit []
Takehiro has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
<JonnieCache> just install xcode man
<JonnieCache> the ide itself aint great but all the tools it comes with are brilliant
<JonnieCache> intruments.app for a start
dhruvasagar has joined #ruby
Takehiro has quit [Remote host closed the connection]
<JonnieCache> the network link conditioner
mr_dynamix has quit [Quit: mr_dynamix]
berserkr has quit [Quit: Leaving.]
Takehiro has joined #ruby
Takehiro has quit [Remote host closed the connection]
Taichou has quit [Remote host closed the connection]
<JonnieCache> is great. not that you cant do all that stuff with the command line anyway, but its nice to have
mr_dynamix has joined #ruby
poppiez has quit [Quit: Linkinus - http://linkinus.com]
Taichou has joined #ruby
Taichou has quit [Remote host closed the connection]
Takehiro has joined #ruby
t8182 has quit [Remote host closed the connection]
nari has joined #ruby
t58371 has joined #ruby
Taichou has joined #ruby
carloslopes has joined #ruby
Floydzy has quit [Quit: Floydzy]
pskosinski has quit [Read error: Connection reset by peer]
Nathandim has quit [Quit: Leaving]
pskosinski has joined #ruby
freeayu has joined #ruby
sthulbourn has joined #ruby
<sthulbourn> Hey guys, does anyone know if I can specify the remote ip address in rack::test?
jimeh has joined #ruby
<carloslopes> sthulbourn: hmm iirc you can do this.. but, why don't you stub the method that get this value.. something like: request.stub(:remote_ip).and_return('192.168.1.101')
eighty4_ has quit [Quit: ZNC - http://znc.in]
<carloslopes> ?
<sthulbourn> I didn't think of that... :/
<carloslopes> sthulbourn: :)
<sthulbourn> Thanks :P
<sthulbourn> For what ever reason, I forgot that stubs existed ...
eighty4 has joined #ruby
olrrai has joined #ruby
Takehiro has quit [Remote host closed the connection]
aristidesfl has joined #ruby
jimeh2 has joined #ruby
jimeh has quit [Ping timeout: 276 seconds]
Takehiro has joined #ruby
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
yasushi has joined #ruby
wargasm has quit [Ping timeout: 272 seconds]
saschagehlich has joined #ruby
<carloslopes> sthulbourn: hahaha yw!
mneorr has joined #ruby
mneorr1 has quit [Read error: Connection reset by peer]
<wereHamster> why does ruby not accept this code: https://gist.github.com/a79dcf18d30982a87b3b ?
aristidesfl has quit []
bradhe has joined #ruby
Rochefort has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
<hoelzro> wereHamster: you probably should prefix the newlines with \
<hoelzro> or not use leading commas
<hoelzro> trailing > leading ;)
bd0 has joined #ruby
<wereHamster> ruby isn't whitespace-sensitive, is it?
<JonnieCache> not in the full on python way, no
<JonnieCache> but that doesnt mean you can put whitespace whereever you like
<JonnieCache> i understand why some people put commas first but personally i hate it :)
<hoelzro> JonnieCache: imo, there's no reason to do it in Ruby
<hoelzro> Ruby allows commas as a list terminator, doesn't it?
<hoelzro> >> [ 1, 2, 3, ]
<al2o3cr> (Array) [1, 2, 3]
<hoelzro> \o/
emmanuelux has quit [Quit: @+]
<Hanmac> wereHamster it works when you add the , before the line break and not after
TPFC-SYSTEM has joined #ruby
<sepp2k> wereHamster: It matters where you put your linebreaks because ruby uses them to infer semicolons. And of course space is used as a token separator ("foo bar" is not the same as "foobar").
olrrai has quit [Quit: Saliendo]
niklasb has joined #ruby
<Hanmac> another sample whitepace samples:
<Hanmac> >> p 1,2
<al2o3cr> (Array) [1, 2], Console: 1, 2
<Hanmac> >> p(1,2)
<al2o3cr> (Array) [1, 2], Console: 1, 2
<Hanmac> >> p (1,2)
<al2o3cr> -e:1:in `eval': (eval):1: syntax error, unexpected ',', expecting ')' (SyntaxError), p (1,2), ^, from -e:1:in `<main>'
KevinSjoberg has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty_ has joined #ruby
<canton7> to be fair, I would have expected ruby to parse wereHamster's example. it's pretty clear that, at the end of each line, the statement hasn't finished yet
TPFC-SYSTEM has left #ruby [#ruby]
<hoelzro> it's probably just a quirk in the parser
chussenot has quit [Remote host closed the connection]
chussenot has joined #ruby
<canton7> s/statement/expression
pepijndevos has left #ruby [#ruby]
a_a_g has quit [Quit: Leaving.]
n1x has joined #ruby
TPFC-SYSTEM has joined #ruby
josh^ has quit [Remote host closed the connection]
TPFC-SYSTEM has left #ruby [#ruby]
johnjohnson has quit []
<Hanmac> canton7 if her had did the "," at the right place, then ruby could have parsed right
<canton7> Hanmac, I'm aware. I just don't think his placement of the commas needs to be considered 'wrong'
neku has joined #ruby
Takehiro has quit [Remote host closed the connection]
jarek has quit [Quit: jarek]
Takehiro has joined #ruby
jrajav has joined #ruby
Rochefortes has joined #ruby
Rochefort has quit [Ping timeout: 246 seconds]
zodiak has joined #ruby
justinmcp has quit [Remote host closed the connection]
linoj has joined #ruby
cascalheira_ has joined #ruby
gfontenot has joined #ruby
seanwash has joined #ruby
mneorr has quit [Quit: Leaving.]
gfontenot has quit [Client Quit]
Taichou has quit [Remote host closed the connection]
Taichou has joined #ruby
justsee has quit [Quit: Leaving...]
Taichou has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
Taichou has joined #ruby
jasonkuhrt has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
mneorr has joined #ruby
Tref has joined #ruby
chimkan_ has joined #ruby
znake has joined #ruby
Taichou has quit [Remote host closed the connection]
znake has quit [Remote host closed the connection]
znake has joined #ruby
neku has quit [Quit: Linkinus - http://linkinus.com]
znake has quit [Client Quit]
znake has joined #ruby
heisenmink has quit [Remote host closed the connection]
gqlewis has joined #ruby
<shevy> whoa that is cool nick
<shevy> a wereHamster
<shevy> oops, forgot a 'a' in the above
Taichou has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
cascalheira_ has quit [Ping timeout: 260 seconds]
gqlewis has quit [Remote host closed the connection]
johnjohnson has joined #ruby
Taichou has quit [Remote host closed the connection]
znake has left #ruby [#ruby]
verto|off is now known as verto
deryl has joined #ruby
znake has joined #ruby
arkiver has quit [Quit: Leaving]
mc0e1 is now known as mc0e
znake has quit [Client Quit]
joephlius has quit [Ping timeout: 260 seconds]
joepheus has joined #ruby
bhavesh_a_p has quit [Remote host closed the connection]
tk__ has joined #ruby
wobr1 has joined #ruby
mercwith1mouth has joined #ruby
uris has joined #ruby
wobr has quit [Ping timeout: 255 seconds]
baroquebobcat has joined #ruby
namidark has quit [Ping timeout: 260 seconds]
baroquebobcat has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
codespectator has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
dv_ has quit [Read error: Connection reset by peer]
larissa has quit [Quit: Leaving]
CarlB_the_great has joined #ruby
Zespre_ has joined #ruby
Zespre has quit [Ping timeout: 240 seconds]
t58371 has quit [Remote host closed the connection]
t56222 has joined #ruby
thaz has quit [Quit: thaz]
pskosinski has quit [Read error: Connection reset by peer]
Markvilla has joined #ruby
xeranas has joined #ruby
pskosinski has joined #ruby
bluenemo has quit [Remote host closed the connection]
xeranas has left #ruby ["Leaving"]
johnjohnson has quit []
ickmund has quit [Ping timeout: 244 seconds]
mercwith1mouth has quit [Ping timeout: 276 seconds]
ickmund has joined #ruby
ph^ has quit [Ping timeout: 245 seconds]
franksort has quit [Quit:]
wez has joined #ruby
dv_ has joined #ruby
fearoffish has joined #ruby
nari has quit [Ping timeout: 240 seconds]
jrajav has quit [Quit: The best darkness is strange and surprising]
tatsuya_o has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
cdepue has joined #ruby
uris has quit [Read error: Connection reset by peer]
uris has joined #ruby
fearoffish has quit [Ping timeout: 245 seconds]
ananthakumaran has quit [Quit: Leaving.]
gfontenot has joined #ruby
wez has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
BSaboia has joined #ruby
sonkei has joined #ruby
d3vic3 has joined #ruby
ZachBeta has joined #ruby
CarlB_the_great has joined #ruby
rippa has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
Takehiro has joined #ruby
namidark has joined #ruby
mercwith1mouth has joined #ruby
erichmenge has joined #ruby
CarlB_the_great has joined #ruby
hekin has quit [Quit: hekin]
dpk has joined #ruby
elitheeli has joined #ruby
tonini has quit [Remote host closed the connection]
CarlB_th_ has joined #ruby
johnjohnson has joined #ruby
rubious has joined #ruby
<elitheeli> Given a character class thing from a regex, like "[^A-Z]", is there a better way to get a list of what it matches besides (0..255).map(&:chr).select {|x| /#{char_class}/ =~ x}?
CarlB_the_great has quit [Ping timeout: 272 seconds]
<hoelzro> elitheeli: more like (0..UNICODE_MAX) ;)
<elitheeli> ugh
<elitheeli> that's way too big
<hoelzro> mhmm
<elitheeli> so is there a non-brute-force way?
<hoelzro> learn the definitions =P
<elitheeli> how does the internal ruby regex algo do it?
<banisterfiend> elitheeli: maybe this is useful https://github.com/benburkert/randexp
<elitheeli> ah, thanks
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Ping timeout: 276 seconds]
<shevy> long live ruby!
joepheus is now known as joephelius
t56222 has quit [Remote host closed the connection]
t85467 has joined #ruby
<hoelzro> does anyone know of a way I can use minitest and generate TAP output?
emmanuelux has joined #ruby
<lupine_85> File.read("/usr/dict/words").split
<lupine_85> oh dear
joephelius has quit [Quit: WeeChat 0.3.8]
dpk has quit [Quit: Asleep at the keyboard.]
<elitheeli> banisterfiend, that doesn't handle character classes :(
<banisterfiend> what a pity :)
uris has quit [Ping timeout: 268 seconds]
<shevy> hmm matti ... what is better ... some_dir = '/tmp/foo/' or ... some_dir ='/tmp/foo' ... as in, always keep the trailing / or never keep it, for directories
und3f has quit [Quit: Leaving.]
dpk has joined #ruby
bluebie has quit [Quit: Linkinus - http://linkinus.com]
dpk has quit [Client Quit]
machty_ has quit [Ping timeout: 276 seconds]
adeponte has joined #ruby
s1n4 has quit [Quit: leaving]
ZachBeta has quit [Quit: Computer has gone to sleep.]
adeponte has quit [Remote host closed the connection]
ZachBeta has joined #ruby
Markvilla has quit [Ping timeout: 245 seconds]
uris has joined #ruby
bd0 has quit [Quit: WeeChat 0.3.8]
Takehiro has quit [Remote host closed the connection]
haxrbyte has joined #ruby
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
Takehiro has joined #ruby
kuzushi has quit [Ping timeout: 240 seconds]
johnjohnson has quit []
sonkei has quit [Quit: Computer has gone to sleep.]
statarb3 has quit [Ping timeout: 268 seconds]
TheNullByte has joined #ruby
S2kx has quit [Quit: Leaving]
rakunHo has quit [Read error: Connection reset by peer]
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
pskosinski has quit [Read error: Connection reset by peer]
cascalheira_ has joined #ruby
pskosinski has joined #ruby
pskosinski has quit [Client Quit]
vjt has joined #ruby
pskosinski has joined #ruby
punkrawkR has joined #ruby
Constant_ has joined #ruby
Constant_ has quit [Client Quit]
araujo has quit [Quit: Leaving]
linoj has quit [Quit: linoj]
ph^ has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
maesbn has quit [Remote host closed the connection]
sailias has joined #ruby
maesbn has joined #ruby
gfontenot has quit []
Takehiro has quit [Remote host closed the connection]
justinmcp has joined #ruby
Takehiro has joined #ruby
sambio has joined #ruby
zodiak has quit [Remote host closed the connection]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
paralelepipedo has joined #ruby
eldariof has quit [Ping timeout: 276 seconds]
timonv has quit [Remote host closed the connection]
sailias1 has joined #ruby
maesbn has quit [Ping timeout: 244 seconds]
justinmcp has quit [Ping timeout: 244 seconds]
sailias2 has joined #ruby
aganov has quit [Remote host closed the connection]
niklasb has quit [Quit: WeeChat 0.3.8]
sailias has quit [Read error: Operation timed out]
ananthakumaran has joined #ruby
kuzushi has joined #ruby
aganov has joined #ruby
haxrbyte has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
haxrbyte has joined #ruby
sailias1 has quit [Ping timeout: 246 seconds]
niklasb has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
sailias2 has quit []
Takehiro has quit [Remote host closed the connection]
seanwash has quit [Quit: Computer has gone to sleep.]
Takehiro has joined #ruby
haxrbyte has quit [Ping timeout: 252 seconds]
tatsuya_o has quit [Remote host closed the connection]
zommi has quit [Quit: Leaving.]
wobr1 has quit [Ping timeout: 264 seconds]
tatsuya_o has joined #ruby
SCommette has joined #ruby
guns has quit [Ping timeout: 244 seconds]
hoelzro is now known as hoelzro|away
seanwash has joined #ruby
cakehero has joined #ruby
heisenmink has joined #ruby
tatsuya_o has quit [Ping timeout: 245 seconds]
jasonkuhrt has quit [Quit: Leaving...]
n1x has quit [Read error: Connection reset by peer]
areil has quit [Remote host closed the connection]
statarb3 has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
chimkan_ has quit [Quit: chimkan_]
juarlex has joined #ruby
tatsuya_o has joined #ruby
berserkr has joined #ruby
Tearan has joined #ruby
digitalcakestudi has joined #ruby
cascalheira_ has quit [Read error: Connection reset by peer]
xorspark has quit [Quit: WeeChat 0.3.8]
paulovittor23 has joined #ruby
mrck has quit [Ping timeout: 246 seconds]
tk__ has quit [Quit: ばいばい]
statarb3 has quit [Ping timeout: 268 seconds]
chimkan_ has joined #ruby
mengu has quit [Quit: Konversation terminated!]
mneorr has quit [Quit: Leaving.]
deryl has quit [Ping timeout: 255 seconds]
neku has joined #ruby
jenrzzz has joined #ruby
codespectator has quit [Ping timeout: 246 seconds]
mrck has joined #ruby
cascalheira81 has joined #ruby
deryl has joined #ruby
Xeago has quit [Ping timeout: 268 seconds]
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
ph^ has quit [Remote host closed the connection]
baphled has quit [Ping timeout: 240 seconds]
adeponte has joined #ruby
Taichou has joined #ruby
ciopte7 has joined #ruby
cascalheira81 has quit [Ping timeout: 246 seconds]
Tearan has quit [Quit: Sleepy Badger....]
groupcat has quit [Quit: Reconnecting]
matrixise has quit [Ping timeout: 272 seconds]
SCommette has quit [Quit: SCommette]
resure has joined #ruby
groupcat has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
heynerds has joined #ruby
Rochefort has joined #ruby
bluenemo has quit [Remote host closed the connection]
machty has joined #ruby
cascalheira has joined #ruby
Rochefortes has quit [Ping timeout: 246 seconds]
otters has quit [Ping timeout: 244 seconds]
mahmoudimus has joined #ruby
Rochefort has quit [Remote host closed the connection]
TheNullByte has quit [Quit: TheNullByte]
elitheeli has quit [Quit: elitheeli]
ananthakumaran1 has joined #ruby
mneorr has joined #ruby
ananthakumaran has quit [Ping timeout: 244 seconds]
fidel has joined #ruby
sailias has joined #ruby
Vert has quit [Read error: Connection reset by peer]
elico has quit [Remote host closed the connection]
<fidel> hi - i am new to gems - how would i update a specific installed gem? i see there is an update command - but that seems to be global if i am right - so may i be forced to always update all gems?
robozahn has quit [Quit: leaving]
blazes816 has joined #ruby
<lupine_85> fidel, gem install <gem-name> [-v version]
<lupine_85> even if it's already installed, that will install either the latest available version, or the version you specify
cascalheira has quit [Ping timeout: 246 seconds]
freeayu has quit [Quit: This computer has gone to sleep]
<fidel> lupine_85: oh - thanks
<Hanmac> shevy depending what you do with the strings
baroquebobcat has joined #ruby
sonkei has joined #ruby
baroquebobcat has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
<Hanmac> fidel: "gem update <gem-name>" should work too
CarlB_th_ has quit []
chimay has joined #ruby
neku is now known as neku|away
<fidel> Hanmac: thanks to you too - worked
gfontenot has joined #ruby
resure_ has joined #ruby
<fidel> i somehow expected an update-speciic cmd ;)
sthulbourn has left #ruby [#ruby]
zigomir has quit [Ping timeout: 264 seconds]
<lupine_85> with rubygems, all bets are off
hernerdies has joined #ruby
Bosox20051 has joined #ruby
paralelepipedo has quit [Ping timeout: 264 seconds]
jastix has quit [Ping timeout: 246 seconds]
linoj has joined #ruby
jastix has joined #ruby
heynerds has quit [Ping timeout: 260 seconds]
sailias has quit []
heynerds has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
chimay has quit [Changing host]
chimay has joined #ruby
paulovittor23 has quit [Remote host closed the connection]
cdepue has quit [Remote host closed the connection]
elico has joined #ruby
hernerdies has quit [Ping timeout: 260 seconds]
chimay has quit [Quit: reconnecting]
ciopte7 has quit [Quit: ciopte7]
chimay has joined #ruby
chimay has quit [Changing host]
chimay has joined #ruby
<shevy> Hanmac and what do you do with a variable that points to a directory usually?
<shevy> fidel, btw via "gem help commands" you get the commandline help commands
groupcat has quit [Disconnected by services]
sepp2k has quit [Ping timeout: 246 seconds]
paralelepipedo has joined #ruby
adeponte has quit [Remote host closed the connection]
xorigin has quit [Quit: leaving]
rs-ix has joined #ruby
jgrevich has joined #ruby
linoj has quit [Quit: linoj]
gfontenot has quit []
sonkei has quit [Quit: Computer has gone to sleep.]
sailias has joined #ruby
ringotwo has joined #ruby
fidel has left #ruby [#ruby]
<Hanmac> when you do File.join(some_dir,"file") then its unimportant if you have / at the end or not
mrmist_ has joined #ruby
manolo has quit [Remote host closed the connection]
Spooner_ has joined #ruby
mrmist_ is now known as groupcat
xorspark has joined #ruby
Spooner has quit [Ping timeout: 245 seconds]
djbender has joined #ruby
ph^ has joined #ruby
ciopte7 has joined #ruby
`brendan has joined #ruby
mr_dynamix has quit [Quit: mr_dynamix]
Axsuul has joined #ruby
macmartine has joined #ruby
sepp2k has joined #ruby
shevy has quit [Ping timeout: 264 seconds]
diegoviola has joined #ruby
jasonkuhrt has joined #ruby
macmartine has quit [Client Quit]
<Hanmac> timeout does shevy-picking again :(
djbender has quit [Quit: djbender]
<rking> shadoi: I always leave the trailing slash off, because it's the responsibility of whatever dconcats a file onto it to put a '/' in between.
<rking> And then you end up with those un-pro /foo/bar//baz's
<rking> s/dcon/con
levieraf has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
nim__ has joined #ruby
Beoran__ has quit [Ping timeout: 240 seconds]
EPIK has quit []
jwbuurlage has joined #ruby
voodoofish has quit [Quit: Leaving]
bd0 has joined #ruby
nim_ has quit [Ping timeout: 244 seconds]
codespectator has joined #ruby
Progster has joined #ruby
shevy has joined #ruby
<Hanmac> shevy when you do File.join(some_dir,"file") or something similar then you would not get a problem with a ending "/"
<rking> Hanmac: That's true, but my general point is the trailing slash should never do anything good anyway.
jwbuurlage has quit [Remote host closed the connection]
jwbuurlage has joined #ruby
<rking> To assume it is there is brittle, so you have to add it every time, and then you might as well leave them all off.
<Hanmac> when you do dir + "file" then its important (or you play in C(++))
<shevy> rking uh
<shevy> rking why is it brittle to assume state a or state b? you say that no states can be assumed, as in no standards can be used
<shevy> state a: foo = '/tmp/test'
<shevy> state b: foo = '/tmp/test/'
<shevy> it's easy to use a method like File.join to ensure consistency, but this sidesteps both states anyway
<shevy> why can't there be simple answers :(
<rking> If that dir is coming from anywhere except a very-nearby line, it will eventually end up not having the slash.
chussenot has quit [Quit: chussenot]
<rking> Like if you accept user input. config_dir: /home/shevy/foo
AlbireoX has joined #ruby
<shevy> yeah, that's a point
<rking> So I've learned to always File.join (or equivalent) everywhere. So I've learned I'll never need to put the trailing slash.
<shevy> lazy users
Takehiro has quit [Remote host closed the connection]
<rking> Hanmac: But that's a wrongish bit of code. I'd always do dir + "/file"
<rking> In C{,++}/Ruby/Shell/etc.
yxhuvud has joined #ruby
<rking> Because it never hurts, anyway, even if you have user input that isn't in on the meme. config_dir: /home/shevy/foo/ would produce /home/shevy/foo//file, which is equivalent.
cakehero has joined #ruby
zodiak has joined #ruby
ciopte7 has quit [Quit: ciopte7]
<shevy> I hate the two /
<shevy> but you are right, it is not as brittle as zero /
yasushi has quit [Remote host closed the connection]
<rking> Yes.
Beoran__ has joined #ruby
yasushi has joined #ruby
CarlB_th_ has joined #ruby
yoklov has joined #ruby
macmartine has joined #ruby
yasushi has quit [Ping timeout: 246 seconds]
Virunga has joined #ruby
jgrevich_ has joined #ruby
Virunga is now known as LennyLinux
<shevy> hmm
<shevy> if I package all my .rb files, I end up with a 6.5M .tar.bz2 file
jgrevich has quit [Ping timeout: 248 seconds]
jgrevich_ is now known as jgrevich
<rking> You're very prolific. =)
baroquebobcat has quit [Quit: baroquebobcat]
Takehiro has joined #ruby
<Hanmac> shevy i hope i do not count the *.so size of my bindings ...
khakimov has joined #ruby
<shevy> rking hmm... I thought it would be more
eldariof has joined #ruby
mercwith1mouth has quit [Ping timeout: 272 seconds]
<shevy> 3.5K rails-3.2.6.gem
kerframil has quit [Ping timeout: 252 seconds]
BiHi has quit [Quit: Computer has gone to sleep]
<Hanmac> in some of my bindings 500kiB => ~37MiB
ciopte7 has joined #ruby
<davidcelis> rails-3.2.6.gem is mostly just railties
<davidcelis> it doesn't package activesupport, activerecord, activemodel, etc. inside that gem
skanev has joined #ruby
adeponte has joined #ruby
td123 has joined #ruby
neku|away is now known as neku
skanev has left #ruby [#ruby]
c0rn_ has joined #ruby
baroquebobcat has joined #ruby
adeponte has quit [Remote host closed the connection]
ananthakumaran1 has quit [Quit: Leaving.]
gfontenot has joined #ruby
hipertracker has quit [Quit: hipertracker]
qwerxy has quit [Quit: offski]
poppiez has joined #ruby
Cache_Money has joined #ruby
Bosox20051 has quit [Remote host closed the connection]
mercwith1mouth has joined #ruby
TheNullByte has joined #ruby
baphled has joined #ruby
t85467 has quit [Remote host closed the connection]
t11134 has joined #ruby
Xeago has joined #ruby
hernerdies has joined #ruby
<Hanmac> my gems make a size increase to 7500% :P
heynerds has quit [Ping timeout: 260 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
ZachBeta has joined #ruby
otters has joined #ruby
emmanuelux has quit [Remote host closed the connection]
poppiez has quit [Quit: Linkinus - http://linkinus.com]
seanwash has quit [Quit: Computer has gone to sleep.]
SCommette has joined #ruby
TheNullByte has quit [Quit: TheNullByte]
nim__ has quit [Ping timeout: 252 seconds]
nim__ has joined #ruby
savage- has joined #ruby
TheNullByte has joined #ruby
SCommette has quit [Client Quit]
itnomad has joined #ruby
haxrbyte has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
hernerdies has quit [Ping timeout: 260 seconds]
td123 has joined #ruby
savage- has quit [Remote host closed the connection]
CarlB_th_ has quit [Remote host closed the connection]
carloslopes has quit [Quit: Leaving.]
<gyre007> guys, I'm trying to figure out one thing...I have an embedded ruby installed ie in its own environment ie it has its own gems...i need to write a script which will be using that embedded environment including its gems...not the one which is installed on the server...
<gyre007> i keep getting errors that some gems can't be loaded...;(
lkba has quit [Ping timeout: 246 seconds]
<gyre007> anyone idea ?
hemanth has quit [Ping timeout: 246 seconds]
ph^ has quit [Remote host closed the connection]
TheShadowFog has quit [Ping timeout: 246 seconds]
pskosinski has quit [Quit: http://www.redeclipse.net -- Fast-paced online FPS]
pskosinski has joined #ruby
machty has quit [Ping timeout: 246 seconds]
jastix has quit [Quit: Leaving]
suborbital has quit [Ping timeout: 246 seconds]
canton7 has quit [Ping timeout: 246 seconds]
nim__ has quit [Ping timeout: 252 seconds]
SCommette has joined #ruby
SCommette has quit [Client Quit]
carloslopes1 has joined #ruby
LennyLinux has quit [Remote host closed the connection]
sambio has quit [Ping timeout: 244 seconds]
specialGuest has joined #ruby
specialGuest has joined #ruby
qwerxy has joined #ruby
td123 has quit [Ping timeout: 240 seconds]
levieraf has quit [Quit: Saliendo]
levieraf has joined #ruby
schaerli has joined #ruby
qwerxy has quit [Client Quit]
hemanth has joined #ruby
stretchlimo has joined #ruby
wez_ has joined #ruby
c0rn_ has quit []
sambio has joined #ruby
ryanf has joined #ruby
t11134 has quit [Remote host closed the connection]
t22296 has joined #ruby
jjbohn has joined #ruby
sailias has quit [Quit: Leaving.]
s1n4 has joined #ruby
Xeago has quit [Remote host closed the connection]
TheShadowFog has joined #ruby
joephelius has joined #ruby
ElderFain has quit [Quit: I'm Gone]
joephelius has quit [Client Quit]
statarb3 has joined #ruby
nim__ has joined #ruby
seanwash has joined #ruby
sambio has quit [Ping timeout: 246 seconds]
haxrbyte has quit [Remote host closed the connection]
SCommette has joined #ruby
haxrbyte has joined #ruby
cdepue has joined #ruby
<Morkel> I have a problem with rbenv and cron. When i run my script with crontab ruby can not find the gems from the Gemfile
wez_ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<xorgnak> have you installed the gems on the host?
<Morkel> no
<Morkel> only bundle install
<yxhuvud> try prepend your crontab entry with bundle exec?
<xorgnak> install them with gem
sterex has joined #ruby
haxrbyte has quit [Ping timeout: 246 seconds]
Takehiro has quit [Remote host closed the connection]
<Morkel> with bundle exec it works fine. Thanks
<gyre007> i think the problem might be RVM
elaptics is now known as elaptics`away
aristidesfl has joined #ruby
Xeago has joined #ruby
eldariof has quit [Ping timeout: 248 seconds]
jasonkuhrt has quit [Quit: Leaving...]
xorgnak has quit [Remote host closed the connection]
seanwash has quit [Quit: Computer has gone to sleep.]
ph^ has joined #ruby
flak has joined #ruby
flak is now known as Guest35822
jasonkuhrt has joined #ruby
SCommette has quit [Quit: SCommette]
Bosox20051 has joined #ruby
bradhe has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
bradhe has joined #ruby
LennyLinux has joined #ruby
Bosox20051 has quit [Remote host closed the connection]
CarlB_the_great has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<stretchlimo> I am experiencing a problem with loading yaml files in 1.9.3-p194. Running lsof against my irb session shows that ./x86_64-linux/enc/utf_16be.so is loaded...but every time I load a file like YAML.load('example.yaml') strace shows dozens of failed open attempts looking for ./enc/utf16_be.so.so in each gem folder
rippa has quit [Ping timeout: 276 seconds]
<stretchlimo> It appears to be killing the performance of YAML.load
saschagehlich has quit [Read error: Operation timed out]
<rking> stretchlimo: Stracing gem loading will not lead to ☺iness.
<rking> It's pretty inefficient with the syscalls.
<stretchlimo> I had a perf problem that led to using strace...not the other way around! :)
<stretchlimo> the gems are loaded already...and the behaviour I describe happens for every YAML.load
c0rn_ has joined #ruby
Squarepy has joined #ruby
CannedCorn has joined #ruby
cdepue has left #ruby [#ruby]
phrame has quit [Ping timeout: 246 seconds]
duard has quit [Ping timeout: 246 seconds]
machty has joined #ruby
TheShadowFog has quit [Ping timeout: 246 seconds]
chimay has quit [Quit: WeeChat 0.3.9-rc1]
TheShadowFog has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
mrck has quit [Ping timeout: 246 seconds]
Squarepy_ has joined #ruby
Squarepy_ has quit [Changing host]
Squarepy_ has joined #ruby
Xeago has joined #ruby
phrame_ has joined #ruby
albel727 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
k_89 has joined #ruby
hipertracker has joined #ruby
Morkel has quit [Quit: Morkel]
Squarepy has joined #ruby
Squarepy_ has quit [Read error: Connection reset by peer]
<rking> stretchlimo: Yeah. I actually had this weird leap-second glitch on one of my VPS machines, and everything was very noticably sluggish. I started stracing things and there was all this gem-related I/O.
qwerxy has joined #ruby
Squarepy_ has joined #ruby
<rking> I posted an Issue and got summarily shut down, saying, "That's the way rubygems works"
Squarepy has quit [Read error: Connection reset by peer]
<rking> stretchlimo: But your particular case sounds particularly odd in that it's looking for something it already loaded.
TheNullByte has quit [Quit: TheNullByte]
phrame_ is now known as phrame
frogprince_mac has joined #ruby
<stretchlimo> rking: but that's the problem...the file name its looking for is very slightly different. I think somebody made a typo in the patch to the psych interface back in April
<stretchlimo> the file loaded is utf_16be.so. The file being search for is utf16_be.so.so
<rking> Hehe
Kwpolska has quit [Quit: Changing server]
Squarepy_ has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
<stretchlimo> subtle...but the file system doesn't do subtlety very well in my experience
aristidesfl has quit []
Squarepy has quit [Read error: Connection reset by peer]
<stretchlimo> I thought I would pop in here to see if AaronP. happened to hang out here...since he made the changes (according to the changelogs)
<rking> stretchlimo: Maybe you should Pull Request ext4 to equate .so.so to .so?
Squarepy has joined #ruby
<rking> One-up FAT's case insensitivty.
<stretchlimo> have to move the '_' as well?
<rking> Yep.
<rking> Just s/_//
<rking> g
Takehiro_ has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
DDAZZA has joined #ruby
mrck has joined #ruby
Squarepy has joined #ruby
qwerxy has quit [Client Quit]
Squarepy has quit [Changing host]
Squarepy has joined #ruby
Kwpolska has joined #ruby
<stretchlimo> ...in the ruby sources? Sorry...I'm a pretty hardcore ruby user but I never thought about rolling a custom build. If that is that what you're proposing.
aristidesfl has joined #ruby
LennyLin_ has joined #ruby
LennyLinux has quit [Read error: Connection reset by peer]
<rking> No, so sorry, I'm being totally ridiculous.
<rking> It's a problem with the psych stuff you're talking about. I wouldn't patch EXT4. =)
<stretchlimo> not outside of my skillset...but...I was trying to help find a problem while staying on target with my own work
LennyLin_ is now known as LennyLinux
<stretchlimo> :)
<rking> stretchlimo: You could symlink it if you're in a rush.
CannedCorn has quit [Ping timeout: 248 seconds]
<stretchlimo> actually...I'm about to abandon YAML for the work I'm doing.
Guest35822 is now known as rippa
<stretchlimo> We build embedded device data collection systems...and I *was* using YAML as the scratchpad/scorecard for reporting external devices as they 'check-in'...
Squarepy has quit [Read error: Connection reset by peer]
<rking> In favor of what?
<stretchlimo> we're upgrading to Rails3x and Ruby 1.9.3 from 1.8.7. In 1.8.7 the performance was fine
Squarepy has joined #ruby
<stretchlimo> hundreds of little YAML files all being happily updated...
Squarepy has quit [Read error: Connection reset by peer]
billyoc has joined #ruby
<rking> What I'd actually do is first symlink, then if it fixed the perf problem, Fork & Pull Req.
<stretchlimo> the system simply doesn't run on 1.9.3...and we're down to YAML (and probably the issue I outlined above) as the prime culprit
Squarepy has joined #ruby
<rking> Are you even using UTF16?
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<stretchlimo> no
<rking> Hehe
qwerxy has joined #ruby
<stretchlimo> plain ole ascii
<rking> Encoding problems have such an awesome way of reaching outside of the scope of encoding problems.
<stretchlimo> BUT...it appears that the latest version of pysch tries to assume one of the UTF-* formats
Squarepy has quit [Read error: Connection reset by peer]
<stretchlimo> another "fix" would be to instruct the YAML engine what encoding each load is going to use
<stretchlimo> but that's not apparently possible either
LennyLinux has quit [Remote host closed the connection]
<eridani> have you tried loading ./x86_64-linux/enc/utf_16be.so before anything else?
Squarepy has joined #ruby
<eridani> wait, sorry i'm coming in late
<eridani> what encoding are the files in?
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<stretchlimo> like I said...we had over 400 devices reporting their state to this little rails app...which wrote the state to a little YAML file...and the load factor on the machine was roughly 0.01 for 3 years
<stretchlimo> then we decide...because of some new features...and security issues in 1.8.7 to move up to the current...
ZachBeta has quit [Read error: Connection reset by peer]
Squarepy has quit [Read error: Connection reset by peer]
xorigin has joined #ruby
<stretchlimo> and this simply does not work...the machine finally panics and shuts down when the load reaches 10.0!
Squarepy has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
<stretchlimo> and strace indicates 100,000+ failed open calls
<stretchlimo> eridani: ascii
ZachBeta has joined #ruby
DDAZZA has quit [Ping timeout: 252 seconds]
rippa is now known as spinagon
LennyLinux has joined #ruby
<eridani> code used to read the file/parse the yaml?
<stretchlimo> eridani: and lsof tells us that the utf_16be.so is already loaded
Squarepy has joined #ruby
<stretchlimo> eridani: YAML.load('my_scorecard.yaml')
spinagon is now known as rippa
qwerxy has quit [Quit: offski]
Squarepy has quit [Read error: Connection reset by peer]
sambio has joined #ruby
<stretchlimo> was implemented as an inexpensive schema-free database system
<eridani> are the strings inside my_scorecard.yaml stringly ascii?
<stretchlimo> absolutely
<eridani> strictly
<stretchlimo> understood
qwerxy has joined #ruby
<stretchlimo> I speek fluent typolish
<stretchlimo> :)
<eridani> i think i ran into this problem before. try YAML.load(File.read(filename))
qwerxy has quit [Client Quit]
FrostyAcres has joined #ruby
cuci has joined #ruby
nim__ has quit [Ping timeout: 248 seconds]
deryl has quit [Quit: Time To Go, Too Bad, So Sad!]
c0rn_ has quit []
<cuci> hi guys! I'm trying to do a select on a sqlite db like so: db.execute("select name from table") but I get some weird chars like so: ["\u7574\u7472\u7275\u6165"], ["\u686A\u6E6F"]. Seems like some coding missmatch
<cuci> any ideas how to fix this?
xorgnak has joined #ruby
<stretchlimo> I have a simple test set up to try different things...to see if anything actually works...
<stretchlimo> ...and...
nicoulaj has joined #ruby
<stretchlimo> YAML.load(File.read('my_scorecard.yaml')) yields the same result as the other
qwerxy has joined #ruby
TheShadowFog has quit [Quit: pls respond]
<stretchlimo> rking: 'git-ing' the sources now. If I'm lucky a simple grep for '.so.so' will find smething
<eridani> can you post the file somewhere? or split the file into pieces
mahmoudimus has quit [Quit: Computer has gone to sleep.]
canton7 has joined #ruby
araujo has quit [Ping timeout: 246 seconds]
<eridani> you're probably looking for dlopen, not .so which is automatically appended
<eridani> i think
<eridani> maybe not
<stretchlimo> I'm actually watching all file activity on the process with strace
<stretchlimo> and it is 'open' that it appears to be hunting for a link to the file in every gem directory...and every other directory in the project actually
diegovio1a has joined #ruby
diegoviola has quit [Ping timeout: 240 seconds]
diegovio1a is now known as diegoviola
DDAZZA has joined #ruby
t22296 has quit [Remote host closed the connection]
fantazo has quit [Remote host closed the connection]
t57601 has joined #ruby
vlad_starkov has joined #ruby
<eridani> try this: File.open(path, encoding: 'utf-8') do |file|
ylluminate has joined #ruby
qwerxy has quit [Quit: offski]
<stretchlimo> Hey! That worked!
<stretchlimo> That gets me back to work...BUT the issue remains
TheNullByte has joined #ruby
<eridani> i'm pretty sure you have something non-ascii in your file. the file class is trying to guess what the encoding is
deryl has joined #ruby
<stretchlimo> and I don't think I've ever seen any examples of loading YAML objects that way...so its only a matter of time til someone else suffers
Cache_Money has quit [Read error: Connection reset by peer]
cuit has joined #ruby
<cuit> rubygems is builtin to ruby1.9?
Cache_Money has joined #ruby
<stretchlimo> I'm 100% sure I created the file with the same text editor I use for every other
hadees has joined #ruby
TheNullByte has quit [Client Quit]
seanwash has joined #ruby
<eridani> cuit: yes
TheNullByte has joined #ruby
<cuit> eridani: awesome, thanks
<stretchlimo> did a hexdump on the file
codespectator has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<stretchlimo> nothing out of the ordinary there
m_3 has joined #ruby
DDAZZA has quit [Ping timeout: 252 seconds]
CarlB_the_great has quit [Remote host closed the connection]
FrostyAcres has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<stretchlimo> I believe the problem is in the psych interface assuming one of the utf16 decoders
FrostyAcres has joined #ruby
chimkan_ has quit [Quit: chimkan_]
<stretchlimo> and then not looking in the right place for it
qwerxy has joined #ruby
<eridani> did you see the auto loading in File.open or the yaml parser?
FrostyAcres has quit [Client Quit]
gfontenot has quit []
EweR has joined #ruby
<stretchlimo> When I attempt YAML.load(...) I see 100's of failed open calls in strace. every one of them trying to load a file that doesn't exist on my system.
<stretchlimo> a very similarly named file does exist and is loaded when the environment starts up
hipertracker has quit [Quit: hipertracker]
<stretchlimo> utf16_be.so <> utf_16be.so.so
<stretchlimo> oops...sorry...losing it...should have been utf16_be.so.so <> utf_16.so
<stretchlimo> looks like a dumb typo to me.
hipertracker has joined #ruby
paralelepipedo has quit [Quit: Lost terminal]
yxhuvud has quit [Ping timeout: 245 seconds]
burgestrand has joined #ruby
jimeh2 has quit [Ping timeout: 248 seconds]
nim__ has joined #ruby
jimeh2 has joined #ruby
s1n4 has left #ruby ["leaving"]
<mneorr> is there a quick way to change the Hash keys on the fly?
<mneorr> right now i'm doing something ugly as hell.. http://pastie.org/4657998
qwerxy has quit [Quit: offski]
<rking> mneorr: Yeah, that seems like quite a few steps.
<rking> Can you give us a before/after pair of Hashes?
<mneorr> rking: yeah, sure
<mneorr> sorry, the first line shouldn't be pasted (it isn't a problem),. but that's the input, let me paste it
DDAZZA has joined #ruby
pingfloyd has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
<stretchlimo> rking: 100% sure that something screwy in the build now...I symlinked the utf libs into lib/enc in a test Rails app and the error is gone gone gone
pingfloyd has left #ruby [#ruby]
havenn has joined #ruby
<rking> stretchlimo: Cool man. I hope you have enough time to contribute this knowledge back to the community.
<stretchlimo> I wouldn't even be here if that weren't the case.
<stretchlimo> I'm just trying to hand the knowledge to the right shepherd
<stretchlimo> thanks to rking and eridani for taking the time to talk through the problem
<rking> stretchlimo: Thanks for working on it! =)
<stretchlimo> I have two ways to 'patch'...now to fix it properly
<rking> stretchlimo: What's the other way?
<stretchlimo> rking: eridani suggested I open the file with the encoding clearly stated and then hand the handle to YAML...that works too...and I don't need to do the symlink thing
<stretchlimo> both solutions help me point out the problem correctly
<stretchlimo> I'm just going to email Aaron and see what comes of that
dpk has joined #ruby
jjbohn has quit [Quit: Leaving...]
TheNullByte has quit [Quit: TheNullByte]
<stretchlimo> intimate knowledge of the source...especially this deep...and encoding...yeech...can do...would rather not. :)
brianpWins has joined #ruby
TheNullByte has joined #ruby
pettsson has joined #ruby
<rking> stretchlimo: Aha, cool.
Xeago has quit [Remote host closed the connection]
ninegrid has quit [Read error: Connection reset by peer]
maletor has joined #ruby
<stretchlimo> at the end of the day...the pysch engine is failing to detect the encoding...so forcing the handle to have the correct encoding stops pysch from even trying...and away we go
DDAZZA has quit [Ping timeout: 252 seconds]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
philcrissman has joined #ruby
<stretchlimo> as for what would happen if the file is actually utf_16be...well...that's going to be equally tough
<rking> mneorr: Hook me up with that input.
<rking> mneorr: I could guess but I'd rather work with a test case (as I always rather do)
<mneorr> rking: pasting it up, pastie.org crashed :(
dhruvasagar has joined #ruby
<rking> mneorr: https://gist.github.com FTW
<mneorr> rking: right, stupid me
<stretchlimo> ...crashed with a Guru Meditation error!
<stretchlimo> ...must be running on an old Amiga?! ;)
rakl has joined #ruby
<mneorr> stretchlimo: Amiga FTW :D
ninegrid has joined #ruby
<rking> mneorr: OK thanks.
<mneorr> rking: so what i basically need is iterate through ugly_headers hash, and beautify each key (remove the HTTP_ , and downcase)
jarred has joined #ruby
Morkel has joined #ruby
seanyo has joined #ruby
cantonic has quit [Quit: cantonic]
cantonic has joined #ruby
jjbohn has joined #ruby
realazthat has joined #ruby
Takehiro_ has quit [Remote host closed the connection]
<realazthat> Hanmac: found you
cantonic has quit [Client Quit]
DebianUT has joined #ruby
<Hanmac> oh noo :P
Jotade11 has joined #ruby
<realazthat> lol
<stretchlimo> mneorr: I got it down to three lines...I'll paste in a second
<rking> mneorr: This isn't gorgeous, but: https://gist.github.com/0ca01f148efe7207bd60
<rking> Now's when Hanmac or somebody could golf it down to goodness.
yoklov has quit [Quit: computer sleeping]
<stretchlimo> nevermind...rking's solution is one better than mine... I had to preset an empty hash to start
<stretchlimo> but you don't have to do all that testing for HTTP if you just use gsub(/HTTP_/, ''). It would only alter the key if HTTP_ was found...otherwise it passes straight through
cantonic has joined #ruby
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
prath has joined #ruby
snearch has joined #ruby
<mneorr> yeah, testing is not needed at this point, seems like rking's solution is a oneliner 8)
<Hanmac> rking, i think your code cant be more golfed
<rking> Hanmac: K, thanks.
levieraf has quit [Quit: Saliendo]
<mneorr> rking: thanks!
erichmenge has joined #ruby
schaerli has quit [Remote host closed the connection]
cantonic has quit [Quit: cantonic]
nim__ has quit [Ping timeout: 240 seconds]
<mneorr> rking: #.compact removes the nil entries?
cantonic has joined #ruby
<rking> mneorr: Yes. gem install pry-full && pry then do ? [].compact
eldariof has joined #ruby
<Hanmac> rking: env.each_with_object({}){|(k,v),h|h[$1.downcase]=v if k[/^HTTP_(.+)/] }
mercwith1mouth has quit [Ping timeout: 248 seconds]
<rking> Hanmac: Oh, coolness. I didn't know about the |(k,v)…| bit.
imami|afk is now known as banseljaj
takamichi has joined #ruby
<rking> mneorr: See that? ☝
<TTilus> rking: is that a finger?
<rking> Yeah.
<TTilus> =D
<mneorr> lol
<Hanmac> rking you could chain it more: env.each_with_object({}).with_index {|((k,v),h),i| ... }
<stretchlimo> mneorr: try this... http://pastebin.com/1mQPadQ4
eldariof has quit [Client Quit]
<stretchlimo> cuz I couldn't help myself....
<Hanmac> rking look at this:
Jotade11 has quit [Quit: Linkinus - http://linkinus.com]
EPIK has joined #ruby
<rking> stretchlimo: That's not going to filter out vars that don't start with HTTP_
<stretchlimo> ah..I thought he wanted to clean the env without losing keys
<stretchlimo> sorry
maletor has quit [Quit: Computer has gone to sleep.]
<stretchlimo> shoulda read the spec! :)
heisenmink has quit [Remote host closed the connection]
wallerdev has joined #ruby
<TTilus> ok, it really is a finger, with about 3x my normal font size it is clear, but with ordinary size it is barely visible, let alone recognizable :)
cuci has quit [Quit: leaving]
<rking> stretchlimo: It's actually not in the example input, so yours may be right after all… it just seemed to me that the "env" hash would normally have anything.
<Hanmac> TTilus can you read this?
<mneorr> thanks guys
<rking> TTilus: I have a pretty small font as well, so I've sort of memorized some of the Unicode ones based on their blobshape.
qwerxy has joined #ruby
<mneorr> rking: strechlimo has used the ugly_headers, they were already filtered out :)
<TTilus> Hanmac: it shows up as a hexagon with question mark inside it, just as if my terminal detected illegal utf sequence or the font is missing the glyph
philcrissman has quit [Remote host closed the connection]
<Hanmac> :(
kirun has joined #ruby
<Hanmac> then your unicode support is to old :(
cantonic has quit [Quit: cantonic]
ph^ has quit [Remote host closed the connection]
RubyPanther has joined #ruby
ph^ has joined #ruby
cantonic has joined #ruby
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
nim__ has joined #ruby
suborbital has joined #ruby
t57601 has quit [Remote host closed the connection]
neku has quit [Quit: Linkinus - http://linkinus.com]
t84226 has joined #ruby
ph^ has quit [Ping timeout: 272 seconds]
Takehiro has joined #ruby
elaptics`away is now known as elaptics
lkba has joined #ruby
keppy has joined #ruby
Takehiro has quit [Ping timeout: 268 seconds]
rippa has quit [Ping timeout: 264 seconds]
troessner has joined #ruby
Guest5516 has quit [Read error: Connection reset by peer]
havenn has quit [Remote host closed the connection]
kaushik_ has quit [Ping timeout: 246 seconds]
CarlB_the_great has joined #ruby
johnjohnson has joined #ruby
maletor has joined #ruby
bradhe has quit [Remote host closed the connection]
jbw has quit [Ping timeout: 244 seconds]
statarb3 has quit [Quit: Leaving]
elaptics is now known as elaptics`away
johnjohnson has quit []
SegFaultAX has quit [Quit: Lost terminal]
billyoc has quit [Remote host closed the connection]
xorgnak has quit [Remote host closed the connection]
answer_42 has quit [Quit: WeeChat 0.3.8]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
keppy has quit [Ping timeout: 245 seconds]
machty_ has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
philcrissman has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
jbw has joined #ruby
ringotwo has quit [Remote host closed the connection]
specialGuest has quit [Ping timeout: 276 seconds]
TheNullByte has quit [Quit: TheNullByte]
<Paradox> hrm
<Paradox> highline seems to have shit a brick with a recent update to something
<fowl> Good morning to you too ;)
Goles has joined #ruby
erichmenge has joined #ruby
CarlB_the_great has quit [Remote host closed the connection]
macmartine has joined #ruby
cakehero has quit [Ping timeout: 272 seconds]
prath has quit [Remote host closed the connection]
qwerxy has quit [Quit: offski]
<rking> Hanmac: It's a bummer that you can do |(k,v)| but not def initialize @foo
<rking> (Then Obj.new 1 would be like @foo = 1)
Azure|dc has joined #ruby
macmartine has quit [Client Quit]
<takamichi> Anyone around who would like to convert a short python script to ruby. I need it for a custom puppet function. $20 via Paypal
mrck has quit [Read error: Connection reset by peer]
<rking> takamichi: Gist it.
aristidesfl has quit []
<Paradox> takamichi, i could give it a try
<Hanmac> rking that what Struct is for :P
<takamichi> rking: Give me a sec
Azure|dc is now known as Valkyrie^
kokainepizza has joined #ruby
jarred has quit [Quit: jarred]
adeponte has joined #ruby
<rking> Hanmac: Hrm, you're probably right. The one I actually one is CoffeeScript's hashy ones. E.g. def f {:name, :age} then f name: 'Hanmac', age: 12
specialGuest has joined #ruby
marienz_ has joined #ruby
clj_newb has joined #ruby
<rking> But then in Ruby it gets messy because you're saying ":name" there, and it's not clear if that should be "@name" or a lexical "name" or what.
specialGuest has quit [Changing host]
specialGuest has joined #ruby
<Hanmac> i had a little script that allows you to use the hash arguments on a stuct ...
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
<rking> It's not really the end of the world. I'm glad we now have nice keyword args for callers, but it's one of those things that Smalltalk has always had that we're begrudgingly catching up to only now.
<Paradox> rking, still, better than java
TheNullByte has joined #ruby
hbob has joined #ruby
<rking> takamichi: Hehe, you're going to have a very hard time getting someone to write that error-free, because it's so tied to an untestable SQL DB. And the $20 is probably on the line of "token thanks, but no thanks"
qwerxy has joined #ruby
<rking> Paradox: Being better than Java is like __This_analogy_censored_due_to_ableism_Political_correctness__.
<Paradox> lol
<hbob> Haha
<takamichi> rking: fair enough. the db schema could be exported and is super simple. Anyway, I guess I'll have to stay up tonight and do it myself...
<takamichi> rking: Thanks for taking the time to look at it anyway, cheers!
snearch has quit [Quit: Verlassend]
<rking> takamichi: I'd do it just for fun but I'm already way overdue on my tasks today.
<rking> takamichi: But yeah, dump the schema plus some test data if you want to get a taker.
emmanuelux has joined #ruby
<takamichi> rking: It doesn't require any test data to start, the script generates it. Cheers for the advice.
CryptoSec has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
Vert has joined #ruby
nilg has quit [Remote host closed the connection]
<takamichi> db schema for anyone interested - https://gist.github.com/c582872454d3c2629592
johnjohnson has joined #ruby
johnjohnson has quit [Read error: Connection reset by peer]
jasonkuhrt has quit [Quit: Leaving...]
marienz_ has quit [Quit: Reconnecting]
marienz_ has joined #ruby
ZachBeta has joined #ruby
qwerxy has quit [Quit: offski]
cakehero has joined #ruby
jimeh2 has quit [Ping timeout: 240 seconds]
DebianUT has quit [Quit: Page closed]
Taichou has quit [Remote host closed the connection]
Advocation has joined #ruby
hbob has quit [Quit: hbob]
Taichou has joined #ruby
bapa has quit [Read error: Connection reset by peer]
c0rn_ has joined #ruby
jjbohn has quit [Quit: Leaving...]
lushious has joined #ruby
jae has joined #ruby
resure has quit [Remote host closed the connection]
resure_ is now known as resure
cantonic has quit [Quit: cantonic]
<jae> hi guys
Xeago has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
cantonic has joined #ruby
atmosx has joined #ruby
Takehiro has joined #ruby
nicoulaj has quit [Remote host closed the connection]
bapa has joined #ruby
troessner has quit [Quit: Leaving]
qwerxy has joined #ruby
noyb has joined #ruby
Speed has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 268 seconds]
GuidovanPossum has joined #ruby
GuidovanPossum has left #ruby [#ruby]
ZachBeta has quit [Quit: Computer has gone to sleep.]
pettsson has quit [Remote host closed the connection]
erichmenge has quit [Quit: Be back later]
cakehero has joined #ruby
Morkel has quit [Quit: Morkel]
jimeh2 has joined #ruby
TheNullByte has quit [Quit: TheNullByte]
robustus has quit [Ping timeout: 244 seconds]
nim_ has joined #ruby
specialGuest has quit [Ping timeout: 276 seconds]
Azure has quit [Read error: Connection reset by peer]
Taichou has quit [Remote host closed the connection]
erichmenge has joined #ruby
nim__ has quit [Ping timeout: 245 seconds]
carloslopes1 has quit [Quit: Leaving.]
xorigin has quit [Quit: leaving]
jimeh2 has quit [Ping timeout: 264 seconds]
erichmenge has quit [Client Quit]
saschagehlich has joined #ruby
Danielpk_ has joined #ruby
<lushious> Hello jae, welcome here
<jae> lol dude
<jae> no ones here
<matti> No true
<matti> Not*
<lushious> Of course they are
<lushious> see
Danielpk has quit [Ping timeout: 244 seconds]
Danielpk_ is now known as Danielpk
<matti> We are shy
<matti> ;d
<jae> :S
<jae> im shyier
<lushious> Jae has a question for you guys
<matti> Plus, we were watching you.
<matti> CLOSELY
<matti> ;d
<jae> i'm starting to be convert for Ruby from php, please show me the light
<matti> LOL
<matti> jae: There is no hope then ;p
<jae> nooos
<matti> I am sorry.
spopescu has quit [Quit: leaving]
<matti> ;d
<matti> Hehe
<davidcelis> there you go buddy
<matti> jae: Get Eloquent Ruby book, and have a look
<jae> damn you took that pretty === huh
<jae> lol
<matti> davidcelis: Hi hi
<davidcelis> hi
jimeh2 has joined #ruby
<jae> 'eloquent ruby', k gotcha
<davidcelis> jae: ruby koans
franksort has joined #ruby
Tearan has joined #ruby
johnlcox has joined #ruby
spopescu has joined #ruby
<k_89> jae, if you get bored easily .. try metaprogramming ruby :P
spopescu has quit [Remote host closed the connection]
realazthat has left #ruby ["Ex-Chat"]
fantazo has joined #ruby
<jae> haha i don't get bored i usually get stuck
<jae> so i have a basic personal project i have in mind and im thinking of using ruby to make it, will make a good learning experience
adeponte has quit [Remote host closed the connection]
bd0 has quit [Quit: ...]
johnlcox has quit [Ping timeout: 246 seconds]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
flip_digits has joined #ruby
<jae> whats a good ruby stack though, im using wamp right now
<lushious> just get ruby on rails
<jae> alite
changeling has joined #ruby
atmosx has joined #ruby
chimkan has joined #ruby
Jotade11 has joined #ruby
k_89 has quit [Quit: Leaving]
marienz has quit [Quit: leaving]
chimkan has quit [Client Quit]
<jae> ok
<blazes816> jae: I actually recommend Sinatra or Padrino or something similar if you're trying to learn Ruby
<blazes816> Rails is so big it's hard to know if you're learning ruby or rails
<jae> aha
<jae> umm sorry about this but like
Danielpk has quit [Quit: Danielpk]
<jae> i just installed it
<jae> but i already have apache running
marienz_ is now known as marienz
<jae> how would that work out :/
<blazes816> you don't need apache
Danielpk has joined #ruby
Danielpk has quit [Client Quit]
chimkan has joined #ruby
<atmosx> nginx + unicorn worked fine for me
<atmosx> apache is a large beast
<davidcelis> #rubyonrails
<jae> no i don't but , it was already installed
justinmcp has joined #ruby
<blazes816> gem install sinatra
<blazes816> then follow the guide on the website
wuwoot has joined #ruby
<jae> k
stepnem has quit [Ping timeout: 264 seconds]
philcrissman has quit [Remote host closed the connection]
baphled has quit [Ping timeout: 268 seconds]
tpd has joined #ruby
Guedes has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
EweR has quit [Quit: Leaving]
<tpd> hey guys
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
<tpd> I have a bit of a problem
TheNullByte has joined #ruby
<tpd> I have two classes
<tpd> class A and class B
<tpd> and in the generate method for class A
<tpd> I'm trying to create a random number of objects of class B
<tpd> so I have an array
<tpd> objs = [ "ob1", "ob2", "ob3", "ob4" ... ]
<tpd> and then I have
changeling has quit [Quit: changeling]
cuit has quit [Quit: Konversation terminated!]
<tpd> objs.each do |obj|
<tpd> @obj = B.new()
<tpd> etc...
changeling has joined #ruby
mucker has quit [Ping timeout: 252 seconds]
<blazes816> should be "obj = B.new()"
<tpd> but this creates a fixed number of B objects i.e. the size of the array
<tpd> I can't figure out a way to have it randomized
<blazes816> my_array = []; (rand() * 1000).round().times {|i| my_array << B.new() }
changeling has quit [Client Quit]
<blazes816> not quite sure what you mean man, but that creates an array with a random number of new instances of B
<tpd> hmmm..
<blazes816> between 0 and 1000
frogprince_mac has quit [Ping timeout: 276 seconds]
<tpd> yeah, well I guess that's it.. I'm trying to automate the object creation process
alanp has quit [Ping timeout: 240 seconds]
ciopte7 has quit [Quit: ciopte7]
alanp has joined #ruby
<tpd> because I'm supposed to make a big (random) number of objects
<blazes816> why? what are you actually trying to do?
specialGuest has joined #ruby
<tpd> just messing around, learning the language by making a simple script
frogprince_mac has joined #ruby
<blazes816> but that's the general algorithm. pick random number, then that many times push a new instance to the array.
<blazes816> cool
<tpd> thanks!
<tpd> I'll try your code
<tpd> brb
<blazes816> good luck. may have a few syntax errors, but i'll leave that as an exercise for the reader
<tpd> :-)
sterex has quit [Quit: sterex]
CarlB_the_great has joined #ruby
deryl has quit [Quit: deryl]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
flip_digits has quit [Quit: Computer has gone to sleep.]
deryl has joined #ruby
mucker has joined #ruby
mahmoudimus has joined #ruby
DebianUT has joined #ruby
<Mon_Ouie> Array.new(rand(1001)) { … } (1001 because rand(1000) can return 1000 values starting from 0, thus ending at 999)
kirun has quit [Quit: Client exiting]
gtuckerkellogg has joined #ruby
pskosinski has quit [Ping timeout: 246 seconds]
<tpd> hmmm okay so I think it's working
jwbuurlage has quit [Quit: jwbuurlage]
<tpd> but, how do I access methods of objects in my array
<tpd> I tried it like this:
<tpd> so first I wrote your code:
<tpd> planets = []
<tpd> rand(9).times { |i| planets << Planet.new() }
<tpd> and then
<tpd> planets.each do |planet|
<tpd> @planet.generate
<blazes816> no @
<tpd> but it fails to run the method
<blazes816> just planet
<blazes816> planet.generate
<blazes816> @ refers to an instance variable inside the current object. planet is a local variable, not an instance var
<tpd> gotcha!
qwerxy has quit [Quit: offski]
<tpd> neat, it's working now!
<tpd> thanks!
<blazes816> congrats!
<tpd> so, basically now I no longer need a full array with names
<tpd> ["p1", "p2" ... ]
<tpd> for my planets
<blazes816> you'll be getting corrected by mon_ouie in no time
<tpd> all I need is an empty array
<blazes816> nice, yeah and array of planet instances is much cleaner
<blazes816> an*
specialGuest has quit [Quit: WeeChat 0.3.8]
<tpd> yeah, you're right
<tpd> I thought I needed an array for the diff. object names :-)
Takehiro has joined #ruby
t84226 has quit [Remote host closed the connection]
havenn has joined #ruby
t83823 has joined #ruby
cascalheira has joined #ruby
bradhe has quit [Remote host closed the connection]
<wuwoot> i'm learning ruby. can't quite figure out why i'm getting a syntax error keyword_end in my code. somebody mind taking a look? (http://pastebin.com/tF5syD6s)
<jae> wow so many ppl like me, guess im not alone :D
ciopte7 has joined #ruby
<heftig> wuwoot: needs to be elsif, not "else if"
johnjohnson has joined #ruby
<wuwoot> heftig: ah!
Takehiro has quit [Ping timeout: 244 seconds]
<DebianUT> I have a question
<DebianUT> What does the "Using" keyword does?
<DebianUT> what's the difference with the "require" keyword?=
<heftig> DebianUT: that's not a keyword
<DebianUT> I have seen code using it
<blazes816> DebianUT: that's a python construct
<DebianUT> no really
Criztian has quit [Read error: Connection reset by peer]
<fowl> interesting a new keyword, right under our noses
<DebianUT> I saw it, let me check
<blazes816> link to the code?
<DebianUT> one sec
<blazes816> k
<heftig> DebianUT: still not a keyword. the code you've seen defines a method by that name somewhere
bradhe has joined #ruby
<blazes816> grep -Rn 'def using' .
<heftig> or 'def self.using'
<heftig> well, \.
<koshii> >> array = ["fish", "and", "chips"] ; result = [] ; for item in array ; result << item.upcase ; end ; result
<al2o3cr> (Array) ["FISH", "AND", "CHIPS"]
<koshii> ^ why does this happen? I thought << was "pop into array" ?
havenn has quit [Remote host closed the connection]
<koshii> Shouldn't it pop capitalized versions into the array?
CaLXhaS has joined #ruby
<blazes816> koshii: pop means to remove the last element. << means 'push' into array
<koshii> Oh. Shoot.
<heftig> >> array = ["fish", "and", "chips"] ; result = [] ; for item in array ; result << item.capitalize ; end ; result
<al2o3cr> (Array) ["Fish", "And", "Chips"]
<koshii> Push means replace?
Xeago has quit [Remote host closed the connection]
<heftig> no, push means append to end
<koshii> I'm not understanding why it replaces the existing ones.
<heftig> it doesn't replace
CaLXhaS has left #ruby [#ruby]
<koshii> Oh. Never mind. I see my dumb error. :)
<koshii> Thanks!
CaLXhaS has joined #ruby
<heftig> >> array = ["fish", "and", "chips"] ; for item in array ; array << item.upcase ; end; array
<heftig> wee infinite loop
<heftig> >> array = ["fish", "and", "chips"] ; for item in array.dup ; array << item.upcase ; end; array
<al2o3cr> (Array) ["fish", "and", "chips", "FISH", "AND", "CHIPS"]
tpd has quit [Quit: leaving]
<DebianUT> Oh, I was confuded
<DebianUT> is not the "using" keyword
<DebianUT> is the "use" keyword
<heftig> not a keyword either :p
<DebianUT> mmm
<blazes816> use is a c# construct :p
<DebianUT> check this tutorial at 1:51
<blazes816> DebianUT: that's a sinatra method
bradhe has quit [Remote host closed the connection]
<DebianUT> ah
<blazes816> that tells it to use a new middleware
mztriz has joined #ruby
<DebianUT> i ce
<DebianUT> thank you
CaLXhaS has quit [Client Quit]
<mztriz> why is my dict array getting modified when I run my code like gen_pass(dict, seps)? http://pastie.org/private/t6cfqlxqrhmthvun85sb6q
<fowl> mztriz: because pass = .. pass << you're modifying the string in the array
Xeago has joined #ruby
<fowl> thats an array btw not a dict/hash
Chryson has joined #ruby
<mztriz> fowl: I know this is only a very small part of my code
<mztriz> fowl: why is it modifiying the dict array? what can I do to fix it?
cascalheira has quit [Quit: qicr for android: faster and better]
<heftig> def gen_pass(d,s) d.sample(2).join(s.sample) end
josh^ has joined #ruby
<fowl> >> x = %w(A B C); x.each { |z| z << "herro" }; x
<al2o3cr> (Array) ["Aherro", "Bherro", "Cherro"]
<fowl> >> x = %w(A B C); x.each { |z| z.dup << "herro" }; x
<al2o3cr> (Array) ["A", "B", "C"]
macmartine has joined #ruby
havenn has joined #ruby
<mztriz> thanks fowl and heftig
davecow_ has joined #ruby
bier has quit [Ping timeout: 246 seconds]
davecow_ has left #ruby [#ruby]
havenn has quit [Remote host closed the connection]
jasonkuhrt has joined #ruby
jasonkuhrt has quit [Client Quit]
ciopte7 has quit [Quit: ciopte7]
machty has quit [Ping timeout: 276 seconds]
Taichou has joined #ruby
qwerxy has joined #ruby
LennyLinux has quit [Remote host closed the connection]
chimkan has quit [Ping timeout: 244 seconds]
chimkan__ has joined #ruby
Azure has joined #ruby
Valkyrie^ has quit [Quit: ¦]
Taichou has quit [Ping timeout: 248 seconds]
ringotwo has joined #ruby
bier has joined #ruby
freeayu has joined #ruby
naturehack has joined #ruby
gfontenot has joined #ruby
ciopte7 has joined #ruby
<wuwoot> another newbie programming question: i'm trying to write a simple product method that puts/prints the product of all the values in an array. this is what i've got (http://pastebin.com/0uCxRY8F). any help would be greatly appreciated.
g_rotbart has joined #ruby
Xeago has quit [Remote host closed the connection]
statarb3 has quit [Ping timeout: 246 seconds]
Russell^^ has joined #ruby
<heftig> wuwoot: [1,2,3].inject(:*)
Xeago has joined #ruby
justsee has quit [Quit: Leaving...]
<davidcelis> ^
<atmosx> wuwoot: what were you expecting? 10 instead of 0?
Azure has quit [Quit: ZNC - http://znc.in]
techsurvivor has quit [Quit: WeeChat 0.3.8]
Foxandxss has joined #ruby
<sepp2k> atmosx: He was expecting what he wrote in the comments. Those aren't the actual results of his code.
qwerxy has quit [Quit: offski]
ZachBeta has joined #ruby
<blazes816> wuwoot: [1,2,3].inject(1){|current_value, total| current_value * total} is a slightly more verbose version that may help to understand what's happening
<atmosx> sepp2k: ah ok
juarlex has quit [Ping timeout: 248 seconds]
<davidcelis> blazes816: you flipped them there block args broseph
Azure has joined #ruby
<sepp2k> wuwoot: array(x-1) is a function call (to an undefined function). To index an array use square brackets, not parentheses. That said it makes no sense to index the array with x-1 as the index. x is an element of the array, there's no reason x-1 should be a valid index.
techsurvivor has joined #ruby
sterex has joined #ruby
<davidcelis> blazes816: [1, 2, 3].inject(1) { |memo, value| memo * value }
<sepp2k> wuwoot: Also note that each returns the array it is called on. So your product method will also always return the array it was given - not a number.
<blazes816> good call, did it backwards. luckily multiplication is combative
<davidcelis> blazes816: YOU WONT BE SO LUCKY NEXT TIME
<blazes816> communitive*
<blazes816> :(
<wuwoot> blazes816: thanks, however, i'm not permitted to use inject in my exercise
<blazes816> wuwoot: sounds contrite
<wuwoot> blazes816: i'm asked to use array#each
<davidcelis> blazes816: also you mean commutitive
<davidcelis> commutative*
Cache_Money has quit [Read error: Connection reset by peer]
<sepp2k> And having an each block that just prints something on each iteration without doing anything else is not helpful. You want to somehow keep track of the product of the numbers.
<sepp2k> (You really don't want to print at all)
adeponte has joined #ruby
<davidcelis> wuwoot: asked by... who
Cache_Money has joined #ruby
<davidcelis> wuwoot: because lolz
lkba has quit [Read error: Operation timed out]
<davidcelis> sounds like whoever asked you to use #each doesn't know its return value, or they want you to be overly verbose
seanwash has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<atmosx> off t obed
<atmosx> night all
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
cakehero has quit [Quit: Leaving...]
franksort has quit [Quit:]
Beoran__ has quit [Ping timeout: 244 seconds]
SCommette has joined #ruby
pskosinski has joined #ruby
Takehiro has joined #ruby
mneorr has quit [Quit: Leaving.]
ephemerian has quit [Quit: Leaving.]
sterex has quit [Quit: sterex]
SCommette has quit [Client Quit]
statarb3 has joined #ruby
Cache_Money has quit [Read error: Connection reset by peer]
adeponte has quit [Remote host closed the connection]
Cache_Money has joined #ruby
savage- has joined #ruby
uris has quit [Quit: leaving]
Takehiro has quit [Ping timeout: 244 seconds]
lkba has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
jae has left #ruby [#ruby]
pskosinski has left #ruby ["http://www.redeclipse.net -- Fast paced online FPS"]
nari has joined #ruby
gfontenot has quit []
dv_ has quit [Read error: Connection reset by peer]
DebianUT has quit [Quit: Page closed]
Advocation has quit [Quit: Advocation]
gtuckerkellogg has quit [Ping timeout: 240 seconds]
CarlB_the_great has quit [Remote host closed the connection]
c0rn_ has quit []
TheNullByte has quit [Quit: TheNullByte]
bradhe has joined #ruby
Beoran__ has joined #ruby
dv_ has joined #ruby
koshii has quit [Quit: leaving]
TheNullByte has joined #ruby
jjang has joined #ruby
ezyang has joined #ruby
<ezyang> Hey guys, if I omit an argument for a native function like IO::select, is that equivalent to passing null?
<Mon_Ouie> Usually yes (and in that specific example, yes)
maletor has joined #ruby
justsee has quit [Quit: Leaving...]
mercwith1mouth has joined #ruby
devnull_ has joined #ruby
wuwoot has quit [Read error: Operation timed out]
chimkan__ has quit [Quit: chimkan__]
<devnull_> hello :) could anyone help me with parsing an error code that I am getting using a net/http class ? https://gist.github.com/3614866 thanks a lot in advance much appreciated
ezyang has left #ruby [#ruby]
statarb3 has quit [Quit: Leaving]
xbayrockx has quit []
<shevy> devnull_ hmm that looks highly specific to couchdb
<devnull_> shevy: no let me clarify if the record is not there it will return a 404 that is a simple net/http call on a "page" so if is 404 means record is not there..409 is like conflict
Cache_Money has quit [Ping timeout: 246 seconds]
<devnull_> shevy: so is just on how to parse the error.. I know why I get the error :D
mahmoudimus has quit [Quit: Computer has gone to sleep.]
mahmoudimus has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
clj_newb has quit [Ping timeout: 264 seconds]
Russell^^ has quit [Quit: Russell^^]
ZachBeta has quit [Quit: Computer has gone to sleep.]
adelcampo has quit [Quit: Linkinus - http://linkinus.com]
banseljaj is now known as imami|afk
maletor has quit [Quit: Computer has gone to sleep.]
horofox has joined #ruby
niklasb has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
<horofox> Hi everyone. I've got a hard ruby issue, does anybody with lots of metaprogramming knowledge have time to work with me into it?
<davidcelis> just ask your question and if someone can answer or help you, they will
<davidcelis> guru hunting will get you nowhere
nari has quit [Ping timeout: 244 seconds]
techsurvivor has quit [Quit: WeeChat 0.3.8]
ZachBeta has joined #ruby
<horofox> I have an anonymous class(a instance of Class), how do I rename it?
saikobee has joined #ruby
<davidcelis> no reference to it?
<davidcelis> probably a dumb question
<sepp2k> horofox: A class will take the name of the first constant its assigned to. So simply assign the class to the constant you want (using const_set if you don't know the name until runtime)
<sepp2k> Btw: you can pass the block directly to Class.new - you don't need class_eval
seanyo has quit [Read error: Connection reset by peer]
justsee has joined #ruby
techsurvivor has joined #ruby
<horofox> sepp2k: not my project, I'm trying to fix a issue
saikobee has left #ruby [#ruby]
k04n has joined #ruby
<k04n> If I have a Ruby gem that is capable of loading data from a URL, but I want it to load from a variable instead, is there any "magic" URL I can use that will load from a variable
<k04n> something like "memory://myvar"
<horofox> sepp2k: i can't marshal a instance of this mounter
<k04n> alternatively, does anyone know how to get Dragonfly to load an image contained in a variable (binary data stored in a variable)
<horofox> sepp2k: because the class is anonymous, so I want to name it
<sepp2k> As I said, assign it to a constant.