apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
ckrailo has quit [Quit: Computer has gone to sleep.]
emmanuelux has quit [Ping timeout: 264 seconds]
nari has joined #ruby
<rking> patrick99e99: I'm looking at your code now.
<billiamii> rking, Does ruby support the \G continuation?
<rking> It does. ri Regexp | less -p '\\G'
ckrailo has joined #ruby
<rking> But apparently I don't understand \G
andrewhl has quit [Quit: andrewhl]
libertyprime has quit [Quit: Lost terminal]
jonathanwallace has quit [Remote host closed the connection]
emmanuelux has joined #ruby
libertyprime has joined #ruby
libertyprime has quit [Client Quit]
digitalcakestudi has quit [Quit: Leaving.]
Facefox has quit [Remote host closed the connection]
<rking> patrick99e99: Hehe, kinda tangled.
libertyprime has joined #ruby
zinjacoder has quit [Remote host closed the connection]
khakimov has joined #ruby
vitoravelino`afk is now known as vitoravelino
scb has joined #ruby
scb has quit [Read error: Connection reset by peer]
kenichi has quit [Remote host closed the connection]
<billiamii> rking, internet is leading me to believe that \G works differently in ruby than perl.
<billiamii> ruby: \G matches the position of the start of the last match
AnswerGuy has joined #ruby
<billiamii> and in perl it matches the end
d_roge has joined #ruby
kickroot has joined #ruby
bfrog has joined #ruby
bfrog has quit [Changing host]
bfrog has joined #ruby
<rking> billiamii: Whoa! That would be contrary to the docs, then.
elux has quit [Quit: Leaving...]
<trung> Hi! Why do you think Ruby has enjoyed such popularity as of the late 5 years? It's quite amazing
<rking> patrick99e99: I got an rspec test bed set up, so now I can try to make something like your code work.
<billiamii> Testing isn't bearing that out, though, so I dunno
jshsu has joined #ruby
kil0byte_ has joined #ruby
nuba has joined #ruby
mikeg has joined #ruby
ZachBeta has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Facefox has joined #ruby
bpgoldsb has joined #ruby
BSaboia has joined #ruby
kil0byte has quit [Ping timeout: 245 seconds]
pradeepto has joined #ruby
<mikeg> n00b question: I'm trying to send the Content-MD5 option but can't figure out how it's supposed to be formatted. Is anyone here able to tell based on this documentation: http://fog.io/1.3.1/rdoc/Fog/Storage/AWS/Real.html#method-i-put_object
<mikeg> my last try was this: connection.put_object("imchat_development_logs","ready/logmover.conf",File.read("logmover.conf"),options = { 'Content-MD5' => "f81a724a1bf0a87f3fe7ef3995f3dd62"})
jasonjiji has joined #ruby
kickroot has quit [Ping timeout: 256 seconds]
<mikeg> which basically results in: The Content-MD5 you specified was invalid.
<robert_> OH, RIGHT. I remember what I was doing.. this versioning plug-in thing.
cid404 has joined #ruby
<rking> patrick99e99: OK, replicated.
ZachBeta has joined #ruby
<rking> patrick99e99: Check out changing your it_behaves_like line to proc { p self; do_create }
jasonjiji has quit [Read error: Connection reset by peer]
<rking> It's a funky 'self'.
<rking> patrick99e99: Actually, it's in your exception, 'RSpec::Core::ExampleGroup::Nested_1::Nested_2:Class'
pradeepto has quit [Quit: No Ping reply in 180 seconds.]
carloshpf has quit [Ping timeout: 248 seconds]
<robert_> sup rking
nfk has quit [Quit: yawn]
bfrog has quit [Ping timeout: 260 seconds]
gtuckerkellogg has joined #ruby
<rking> robert_: Not much. Only slaving away on a problem and the guy's not here. =)
<robert_> fun fun.
cableray has quit [Quit: cableray]
<robert_> I'm also slaving away. :p
<robert_> http://pastebin.com/MR7dHGHR -- can anyone help me figure out why this doesn't update the VersionBlock information? :/
brianpWins has quit [Quit: brianpWins]
gtuckerkellogg has quit [Client Quit]
wookiehangover has quit [Read error: Connection reset by peer]
<Alantas> robert_: You don't have setters for Minor, etc. attr_accessor :Major, :Minor, etc
<rking> patrick99e99: I got a workaround, but I'm pretty sure there's a prettier way. If you wrap your method inside a before(:each), it gives you something to call it on: https://gist.github.com/2778599
<robert_> yeah
<robert_> I had those
<robert_> but it still didn't appear to work correctly
wookiehangover has joined #ruby
_bart has joined #ruby
liluo has quit [Remote host closed the connection]
kenperkins has quit [Ping timeout: 244 seconds]
Psy has joined #ruby
berserkr1 has quit [Quit: Leaving.]
krusty_ar has quit [Remote host closed the connection]
kil0byte has joined #ruby
mengu has quit [Remote host closed the connection]
seanstickle has joined #ruby
jshsu has quit [Ping timeout: 252 seconds]
ZachBeta has quit [Ping timeout: 252 seconds]
niklasb has joined #ruby
nfluxx has quit [Ping timeout: 245 seconds]
dbgster has joined #ruby
kil0byte_ has quit [Ping timeout: 244 seconds]
<rking> billiamii: I'm still not 100%, but I found out why my stuff wasn't working. Long story, but it was not exactly due to my misunderstanding of \G (it was something much dumber).
<billiamii> orly?
bluenemo has quit [Remote host closed the connection]
nari_ has joined #ruby
<rking> billiamii: I'll see if I can come up with a 1-liner that demos \G
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
nari has quit [Ping timeout: 245 seconds]
ZachBeta has joined #ruby
jshsu has joined #ruby
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
SirFunk has joined #ruby
rmascarenhas has joined #ruby
oddraisin has joined #ruby
kickroot has joined #ruby
Natch| has quit [Read error: Connection reset by peer]
<rking> billiamii: Hehe, I'm actually failling to get it on one line. =) I think I still don't understand stuff, but my unit tests are passing. We'll see if it's all phony.
ben_m` has joined #ruby
Psy has left #ruby ["[self leaveChannel];"]
ben_m has quit [Disconnected by services]
<billiamii> rking, Well glad it's working :)
nari_ has quit [Ping timeout: 244 seconds]
ben_m` is now known as ben_m
<rking> Yeah, me too. =) Except it's kind of fragile ATM. Thanks for being there with me on it, though.
SecretAgent has joined #ruby
test34- has quit [Ping timeout: 252 seconds]
hoelzro|away has joined #ruby
bfrog has joined #ruby
UdontKnow has joined #ruby
kil0byte_ has joined #ruby
kil0byte has quit [Ping timeout: 244 seconds]
oddraisin has quit [Ping timeout: 245 seconds]
kickroot has quit [Ping timeout: 252 seconds]
oddraisin has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
kickroot has joined #ruby
adamkittelson has quit [Ping timeout: 244 seconds]
dhaskew has quit [Read error: Connection reset by peer]
dhaskew has joined #ruby
oddraisin has quit [Ping timeout: 240 seconds]
adeponte has quit [Remote host closed the connection]
dbgster has quit [Quit: dbgster]
jimeh3 is now known as jimeh
oddraisin has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
albemuth has quit [Quit: Leaving...]
dhaskew has joined #ruby
kickroot has quit [Ping timeout: 265 seconds]
dzhulk has quit [Ping timeout: 244 seconds]
kickroot has joined #ruby
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
Natch| has joined #ruby
Natch| has quit [Excess Flood]
dzhulk has joined #ruby
wmoxam has quit [Ping timeout: 244 seconds]
carlyle has joined #ruby
jimeh has quit [Ping timeout: 245 seconds]
oddraisin has quit [Ping timeout: 240 seconds]
VegetableSpoon has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
Urthwhyte is now known as Urth|Away
kickroot has quit [Remote host closed the connection]
kickroot has joined #ruby
kenneth has quit [Quit: kenneth]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
Natch| has joined #ruby
Natch| has quit [Excess Flood]
niklasb has quit [Ping timeout: 245 seconds]
Natch| has joined #ruby
<Seabass> Door::new( :oak )
<Seabass> new is a method defined in class Door?
paradisaeidae has joined #ruby
liluo has joined #ruby
<seanstickle> Calls "initialize"
Bonkers has quit [Ping timeout: 276 seconds]
oddraisin has joined #ruby
<Seabass> door = Door::new( :oak ) make a door object according to the structure of class Door with the type :oak that is defined somewhere
<Seabass> ?
linus95014 has joined #ruby
kickroot has quit [Remote host closed the connection]
kickroot has joined #ruby
<seanstickle> ?
<Seabass> I'm trying to understand Ruby syntax. maybe I wouldn't need door =
<seanstickle> Are you following some tutorial or another?
<seanstickle> Or just guessing?
<Seabass> yeah, I found one I like a lot
Solnse has joined #ruby
<Seabass> under class methods
<seanstickle> Ah, _why
<seanstickle> I could never read that thing.
cdepue has quit [Remote host closed the connection]
<Seabass> well it seems to be entertaining and it easier to understand than a lot of stuff I been reading
cousine has quit [Remote host closed the connection]
<seanstickle> Yeah, some people like it.
Natch has joined #ruby
Natch has quit [Excess Flood]
oddraisin has quit [Ping timeout: 250 seconds]
Natch| has quit [Ping timeout: 245 seconds]
oddraisin has joined #ruby
emmanuelux has quit [Remote host closed the connection]
Natch| has joined #ruby
anildigital_work has quit [Ping timeout: 246 seconds]
anildigital_work has joined #ruby
kickroot has quit [Ping timeout: 256 seconds]
kickroot has joined #ruby
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
Aaton is now known as Aaton_off
stkowski has quit [Quit: stkowski]
sh1ps has joined #ruby
oddraisin has quit [Ping timeout: 244 seconds]
oddraisin has joined #ruby
L-----D has joined #ruby
looopy has quit [Remote host closed the connection]
Bonkers has joined #ruby
kickroot has quit [Ping timeout: 252 seconds]
pac1 has joined #ruby
wilmoore has joined #ruby
tommyvyo has joined #ruby
sh1ps has quit [Quit: sh1ps]
oddraisin has quit [Ping timeout: 240 seconds]
mpereira has quit [Ping timeout: 260 seconds]
cdepue has joined #ruby
oddraisin has joined #ruby
kickroot has joined #ruby
ibash has quit [Quit: ibash]
shadoi has quit [Remote host closed the connection]
fearoffish has quit [Quit: Computer has gone to sleep.]
rmascarenhas has quit [Read error: Connection reset by peer]
gtuckerkellogg has joined #ruby
Urth|Away is now known as Urthwhyte
oddraisin has quit [Remote host closed the connection]
Solnse has quit []
oddraisin has joined #ruby
kickroot has quit [Ping timeout: 248 seconds]
rmascarenhas has joined #ruby
Urthwhyte is now known as Urth|Away
dankest has joined #ruby
austinbv has joined #ruby
minijupe has quit [Quit: minijupe]
netrealm has joined #ruby
oddraisin has quit [Ping timeout: 244 seconds]
<mxweas> anyone have experience with ruby pg? I'm trying to call .res on a PG::Result instance and I'm getting method not found.
<mxweas> it's definitely a PG::Result and .each and .getvalue() work perfectly.
oddraisin has joined #ruby
<mxweas> and in the underlying c code, .each calls the same function .res[] calls
netrealm has left #ruby [#ruby]
mlue_ has joined #ruby
mikeg has quit [Ping timeout: 245 seconds]
savage- has quit [Remote host closed the connection]
Apocalypse has quit [Ping timeout: 245 seconds]
oddraisin has quit [Remote host closed the connection]
mvangal__ has quit [Remote host closed the connection]
bambanx has joined #ruby
mvangala_ has joined #ruby
<mxweas> got it, you just call [] not res[]
BSaboia has quit [Read error: Connection reset by peer]
<bambanx> guys how i can trunk a number
_bart has left #ruby [#ruby]
<bambanx> round maybe is the word ?
patrick99e99 has quit [Quit: Lost terminal]
dbgster has joined #ruby
Apocalypse has joined #ruby
kickroot has joined #ruby
jimmybaker has joined #ruby
oddraisin has joined #ruby
counterbeing has joined #ruby
Bish has quit [Ping timeout: 246 seconds]
pjn_oz has joined #ruby
kvirani has quit [Remote host closed the connection]
<graspee> if x is your 14.8
<graspee> then you can use x.to_i
Bish has joined #ruby
<graspee> but that truncates, as in rounds down
deryldoucette has quit [Quit: deryldoucette]
VegetableSpoon has quit [Quit: Leaving]
<graspee> but it also turns it into an int which is maybe not what you want
c0rn has quit [Quit: Computer has gone to sleep.]
artOfWar has quit [Remote host closed the connection]
counterbeing has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
counterbeing has joined #ruby
mikeg has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
deryldoucette has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
tommyvyo has joined #ruby
looopy has joined #ruby
TorpedoSkyline has quit [Quit: Leaving]
pjn_oz has quit [Read error: Connection reset by peer]
peterhil has quit [Ping timeout: 265 seconds]
cantonic has quit [Remote host closed the connection]
sh1ps has joined #ruby
Scub has joined #ruby
kenperkins has joined #ruby
tilde` has quit [Quit: leaving]
hydrozen has joined #ruby
kenperkins has quit [Client Quit]
peterhil has joined #ruby
ipoval has joined #ruby
jimeh has joined #ruby
walbert has quit []
hydrozen has quit [Client Quit]
ghanima has joined #ruby
<ghanima> hey guys has anyone ever used the gem rye
counterbeing has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<ghanima> I am curious if anyone ever compared to capistrano I am trying to decide if I should use this gem as oppose to capistrano. My only reasoning right now is that rye seems very straight forward
counterbeing has joined #ruby
mikepack has quit [Remote host closed the connection]
looopy has quit [Remote host closed the connection]
counterbeing has quit [Client Quit]
seanstickle has quit [Quit: Nihil sub sole novum]
jimeh has quit [Ping timeout: 245 seconds]
climbing_rails has joined #ruby
<sh1ps> cd git
<sh1ps> holy crap
climbing_rails has quit [Client Quit]
<sh1ps> i just tried to join a room by cding into it. this is a new low.
uris has joined #ruby
counterbeing has joined #ruby
<graspee> nice
tayy has joined #ruby
<sh1ps> i think that means i've spent too much time on a command prompt today
Targen has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
yannis has quit [Quit: yannis]
phipes has quit [Read error: Connection timed out]
counterbeing has quit [Client Quit]
looopy has joined #ruby
cordoval has joined #ruby
cordoval has left #ruby [#ruby]
phipes has joined #ruby
Araxia_ has quit [Quit: Araxia_]
greyEAX has quit [Read error: Connection reset by peer]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
elliottcable has joined #ruby
PragCypher has quit [Quit: Leaving]
voodoofish430 has quit [Quit: Leaving.]
mpereira has joined #ruby
mlue_ has quit [Ping timeout: 240 seconds]
xpot-station has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
joshman_ has joined #ruby
perryh_away is now known as perryh
dbgster has quit [Quit: dbgster]
td123 has quit [Quit: WeeChat 0.3.7]
test34- has joined #ruby
test34- has quit [Changing host]
test34- has joined #ruby
artOfWar_ has joined #ruby
artOfWar has quit [Ping timeout: 245 seconds]
brianpWins has joined #ruby
paradisaeidae has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
harukomoto has quit [Ping timeout: 244 seconds]
linoj has joined #ruby
dv310p3r has joined #ruby
noodletraveler has joined #ruby
artOfWar_ has quit [Ping timeout: 245 seconds]
mneorr_ has joined #ruby
vitoravelino is now known as vitoravelino`afk
mvangala_ has quit [Ping timeout: 252 seconds]
mneorr has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
joast has quit [Quit: Leaving.]
jobicoppola has quit [Quit: Computer has gone to sleep.]
joast has joined #ruby
kevinbond has quit [Quit: kevinbond]
stim has joined #ruby
imami|afk is now known as banseljaj
<bambanx> graspee, thanks , look i have integer numbers like 405050 505002 23023032 and i need trunk it only for the first number e.g. 4928233 transform it to 4
test34- has quit [Quit: Leaving]
eywu has quit [Quit: Leaving.]
xpot-station has quit [Quit: I'm Out, Later.]
joshman_ has quit [Quit: Computer has gone to sleep.]
CheeToS has joined #ruby
pradeepto has joined #ruby
<graspee> so you want 405050 -> 4 ?
Solnse has joined #ruby
<graspee> x.to_s[0] will give you the 4 as a string
cephalopod has joined #ruby
<graspee> x.to_s[0].to_i (ew) will give you it as an int
stim has left #ruby [#ruby]
<bambanx> i dont need convert to string it graspee
fbernier has quit [Ping timeout: 245 seconds]
<graspee> well use the last thing then
<graspee> you have to temporarily convert it to a string to get the first digit
ZachBeta has joined #ruby
test2 has joined #ruby
<bambanx> thanks my friend graspee
<graspee> np
<graspee> it won't affect x
<bambanx> \o/
<graspee> you can use the x.blahblah as an expression and get 4 and x will still be the full number
brianpWins has quit [Ping timeout: 244 seconds]
<test2> Hey r u guys there
zeromodulus has quit [Remote host closed the connection]
jeebster has left #ruby [#ruby]
<graspee> i am
<test2> ??
<graspee> i am here
<Seabass> I'm in and out reading Ruby tutorials
<test2> Id there way to give people this thing yo join
<graspee> just tell them to join #ruby on irc.freenode.net
<graspee> is that what you meant?
<test2> Yes thanks
brianpWins has joined #ruby
<test2> So how dobyou make ur own riom
<test2> Room
<graspee> just /join #nameofroom that isn't in use
CheeToS has quit [Ping timeout: 245 seconds]
<test2> Whats ruby i saw it on YouTube so i put it as name and worked
<heftig> bambanx: n = 7093431; [n / 10 ** Math.log10(n).floor, n.to_s[0].to_i, (a=n;a=a/10 while a>10;a)]
<graspee> ruby is a programming language
<graspee> heftig that's um
<heftig> three ways
<graspee> creative
<test2> I thoughtbit was s room
<graspee> it is some room
<graspee> where people talk about ruby
<asdfqwer> anyone own 3rd edition of pick axe?
<graspee> me
<asdfqwer> curious as to how big difference is with public copy
<graspee> the public copy is the first edition, right?
<asdfqwer> looking
<graspee> it's pretty different. i have the first edition too
<test2> I also downloaded net status
<asdfqwer> copyright is 2001
<asdfqwer> more examples, or difference a nutshell?
<asdfqwer> love the pick axe examples
<test2> So when i make my own room nobody could c it?
<graspee> anyone could see it
<graspee> everyone
<graspee> asdfqwer: the first edition targets ruby 1.6
zeromodulus has joined #ruby
<graspee> the third edition targets 1.9
<asdfqwer> right
<test2> So its a choice if they join
mvangala_ has joined #ruby
<graspee> also there is a difference of over 400 pages
<asdfqwer> sold
<graspee> test2: anyone could type /join #yourroomname
<test2> So the riom name name is what
<test2> ?
<test2> Room
harukomoto has joined #ruby
<graspee> no
<graspee> it's whatever you want
<graspee> this room is called ruby
<graspee> your room can have any name that isn't being used
warebec|hat has joined #ruby
<test2> Do u have Ps3?
<test2> Anyone
stefanp_ has joined #ruby
<test2> Need more help kind of
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<test2> First timer just downloaded this today
<test2> Tryingvto learn everything i could
brianpWins has quit [Ping timeout: 252 seconds]
<test2> Aaa
<graspee> as a ruby programming channel we don't tend to specialise in ps3 matters
trend has quit [Quit: trend]
stefanp has quit [Ping timeout: 265 seconds]
banisterfiend has quit [Remote host closed the connection]
shadoi has joined #ruby
<test2> Like write now i was trying to change name-test2 abd nothing happen
S1kx has quit [Ping timeout: 265 seconds]
<test2> Whats oing?
<test2> Ping?
<offby1> nobody here but us zombie processes.
sbanwart has quit [Ping timeout: 240 seconds]
<graspee> ping pings a website
<graspee> it sends a special packet of ping goodness to test the connection
xiaotian has joined #ruby
xiaotian has quit [Client Quit]
<offby1> via FedEx, I think; unless you're using IPv6, in which case it's UPS in the US and DHL overseas
test2 has quit [Quit: Leaving]
rcs has quit [Ping timeout: 244 seconds]
sh1ps has quit [Quit: sh1ps]
vitor-br has joined #ruby
tfitts has quit [Read error: Connection reset by peer]
S1kx has joined #ruby
tfitts has joined #ruby
wvms has quit [Read error: Connection reset by peer]
wvms has joined #ruby
perryh has quit [Ping timeout: 244 seconds]
philcrissman_ has joined #ruby
crankyco_ has joined #ruby
ben_m has left #ruby ["Leaving"]
baroquebobcat has joined #ruby
linduxed has quit [Ping timeout: 272 seconds]
thorncp has quit [Ping timeout: 240 seconds]
philcrissman has quit [Ping timeout: 246 seconds]
looopy has quit [Remote host closed the connection]
crankycoder has quit [Ping timeout: 245 seconds]
zeromodulus has quit [Ping timeout: 256 seconds]
linus95014 has quit [Quit: linus95014]
Kabaka has quit [Ping timeout: 276 seconds]
zeromodulus has joined #ruby
rcs has joined #ruby
perryh has joined #ruby
skyjumper has quit [Ping timeout: 252 seconds]
<graspee> asdfqwer: i think there's actually some stuff missing from the 3rd edition of pickaxe compared to the first one though. e.g. the smallish chapter on ruby tk is gone i think
skyjumper has joined #ruby
Clordio has joined #ruby
jcromartie has quit [Read error: Connection reset by peer]
jcromartie has joined #ruby
_root_ has quit [Remote host closed the connection]
thorncp has joined #ruby
neersighted has quit [Ping timeout: 272 seconds]
jcromartie has quit [Read error: Connection reset by peer]
__root__0 has joined #ruby
patricktaylor has joined #ruby
<offby1> do people really use tk any more?
<offby1> gitk does
<offby1> other than that though ...
Clordio has left #ruby [#ruby]
patricktaylor has quit [Client Quit]
Urth|Away is now known as Urthwhyte
kenperkins has joined #ruby
mw3kush has joined #ruby
Progster has quit [Ping timeout: 260 seconds]
neersighted has joined #ruby
perryh is now known as perryh_away
pdtpatrick has joined #ruby
ciopte7 has joined #ruby
<mw3kush> So any cpu could join how example
perryh_away is now known as perryh
rmascarenhas has quit [Quit: leaving]
<graspee> well it's a good, easy gui for stuff i think
<bnagy> hello, world
<mw3kush> Ok so im about to get on cpu so what do u type to find this link
tomb_ has quit [Quit: Computer has gone to sleep.]
<bnagy> mw3kush: /part
<mw3kush> Bnagy more help
mdhopkins has quit [Quit: mdhopkins]
irrationalfab has quit [Remote host closed the connection]
<graspee> mw3kush are you a friend of test2?
mdhopkins has joined #ruby
looopy has joined #ruby
<graspee> you know there are irc rooms for gamers which would be more suited to your needs maybe
<mw3kush> Yeah im the same dude i dont even know how i got it to this name
<graspee> just wait a sec
<mw3kush> K
<graspee> ok there's a call of duty wiki irc channel
<graspee> the name of the room is #wikia-cod, i'm just trying to find the server
<mw3kush> Im trying to join from.a cpu but dnt know what to pur
<mw3kush> Put
<graspee> you need an irc program
<mw3kush> Where im typing from its a pod
<mw3kush> Like what?
<graspee> go to this page then scroll down to the bottom
<graspee> then click the link where it says unofficial channel
<graspee> that will allow you to chat on a web page to the call of duty fans
<graspee> you can ask them about irc programs and how to set them up if you want to take your chatting in that direction
linduxed has joined #ruby
<mw3kush> Im using limechat irv
<mw3kush> Irc
<graspee> there's not many people on there but
<graspee> in general you can just type things into google like "call of duty irc" or "pc gamers irc" and find links to cool irc chats for whatever interests you
ciopte7 has quit [Quit: ciopte7]
brianpWins has joined #ruby
sepp2k has joined #ruby
banisterfiend has joined #ruby
<mw3kush> Hmm thanks yeah im trying to figure out how to use this and what it really is
carlyle has quit [Remote host closed the connection]
Sgeo_ has joined #ruby
nai has joined #ruby
stim has joined #ruby
<mw3kush> How did u find that web
kevinbond has joined #ruby
<graspee> with google
<graspee> i just googled "modern warfare irc" or something
fayimora has joined #ruby
cj3kim has joined #ruby
<mw3kush> I went but it said there was nothing and to creat my own wiki
dv310p3r has quit [Ping timeout: 245 seconds]
bambanx has quit [Read error: Connection reset by peer]
ryanf has quit [Ping timeout: 260 seconds]
kenneth has joined #ruby
fayimora has quit [Ping timeout: 264 seconds]
brianpWins has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
mw3kush has quit [Quit: Leaving]
ZachBeta has quit [Quit: Computer has gone to sleep.]
baroquebobcat has joined #ruby
nai has quit [Remote host closed the connection]
ghanima has quit [Quit: Leaving.]
<graspee> i'm sorry then i can't help
SeanBannister has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
SeanBannister has left #ruby [#ruby]
Haydos has joined #ruby
DarkFoxDK has joined #ruby
austinbv has quit [Quit: austinbv]
jgrevich has joined #ruby
keithcelt has joined #ruby
mxweas_ has joined #ruby
mikeycgto has quit [Remote host closed the connection]
dankest has quit [Quit: Leaving...]
savage- has joined #ruby
aantix has joined #ruby
xnm has joined #ruby
dankest has joined #ruby
ryanf has joined #ruby
bambanx has joined #ruby
<bambanx> guys which good ocr gem we have on ruby?
minijupe has joined #ruby
brianpWins has joined #ruby
banisterfiend has quit [Remote host closed the connection]
<phipes> what does it mean when a method is prepended with either a # or ::
andrewhl has joined #ruby
Chryson has quit [Quit: Leaving]
dankest has quit [Quit: Leaving...]
L-----D has quit [Quit: Leaving]
locriani has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
jgrevich has quit [Read error: Connection reset by peer]
ZifreCL has joined #ruby
jgrevich has joined #ruby
c0rn has joined #ruby
bambambamford has joined #ruby
ryanf has quit [Quit: broken pipes |||]
youdontmeanmuch has quit [Read error: Connection reset by peer]
mdw has joined #ruby
<xnm> phipes: #method is an instance method ::method is a class method
<bnagy> well... #method is the way we _write_ about instance methods
<bnagy> usually Class.method is how we write about class methods, :: is for specifying namespaces
<phipes> ok. thanks. @bnagy, yes I'm looking at the documentaiton
<bnagy> like Foo::Bar <- constant Bar inside Foo
<bnagy> or, in some weird cases ::Foo <- toplevel constant Foo (which you would only have to use in weird cases)
locriani has joined #ruby
<bnagy> :: is actual syntax, # isn't
<xnm> bnagy: not in the docs... try File::zero?
<xnm> bnagy: i mean "ri File::zero?"
bambambamford has quit [Quit: Bye!]
bamford has joined #ruby
<xnm> ruby-doc.org uses the syntax too
linus95014 has joined #ruby
<phipes> should've used + and - like in objective c
<xnm> It IS just for documentation though
mdw_ has joined #ruby
rippa has joined #ruby
dhaskew has quit [Quit: dhaskew]
tchebb has quit [Ping timeout: 246 seconds]
<bnagy> I'm sure they gave a lot of thought to using objective c notation conventions when designing ruby :)
<bnagy> xnm: actually File::zero? should work in code as well, it's just that usually we'd use File.zero?
mdw has quit [Ping timeout: 260 seconds]
Hanmac1 is now known as Hanmac
<bnagy> I mean String#size works in code, too, it just doesn't do anything useful :>
<xnm> bnagy: touche. I was just disputing that you said #method is how we write about instance methods, while we use Class.method to write about class methods
mlue_ has joined #ruby
tayy has quit [Remote host closed the connection]
<bnagy> xnm: yeah, which is the case
<bnagy> the fact that you can also access class methods through namespacing is an interesting sideline
mxweas_ has quit [Quit: Computer has gone to sleep.]
<xnm> well the docs use #method in the same context for instance methods as it uses ::method for class methods
<xnm> never
<xnm> nevermind
<xnm> i'm just running in circles now
<offby1> What's with the # notation? I see methods documented like String#size ... but we don't ever actually _type_ a # in ruby code (apart from comments)... do we?
fayimora has joined #ruby
<bnagy> offby1: well no, cause as you just said String#size => String
<moshee> that just means instance method
<moshee> I don't know where it comes from
<moshee> it's probably just another convenient symbol
<offby1> it's the "where it comes from" that I'm wondering about.
<moshee> to set it apart from class methods
<moshee> which can be represented with a dot
* bnagy waggles his eyebrows at xnm
banisterfiend has joined #ruby
mdw_ has quit [Remote host closed the connection]
<offby1> flirt
<rippa> maybe it's from HTML anchor?
<bnagy> I don't see join messages so I am assuming you wandered in half way through the conversation, offby1
tchebb has joined #ruby
tchebb has quit [Client Quit]
<offby1> actually I've been connected for days. But my attention wanders.
<bnagy> sorry, what?
<offby1> I didn't JOIN recently; I JOINed days ago.
<bnagy> sorry, my attention wandered
* offby1 slaps bnagy upside the haid
<offby1> But I only started paying attention in the last half hour or so (and probably missed some relevant discussion that's in my scrollback)
mdhopkins has quit [Quit: mdhopkins]
igotnolegs has joined #ruby
dankest has joined #ruby
andrewhl has quit [Quit: andrewhl]
wereHamster has quit [Remote host closed the connection]
mpereira has quit [Ping timeout: 260 seconds]
minijupe has quit [Quit: minijupe]
<offby1> I notice that {:one=>1, :two=>2}.map {|blob| k, v = blob; [k, v * 2] } creates an array of two-element arrays ..
<offby1> ... and {:one=>1, :two=>2}.map {| k, v| = blob; [k, v * 2] } does exactly the same thing
<graspee> actually there was a lot of off topic stuff recently you're fine
<offby1> I assume that's a feature (destructuring)? Is it new in 1.9?
<banisterfiend> offby1: no, it's in 1.8 too
pting has joined #ruby
<offby1> huh, never knew that
<graspee> banisterfiend!
<banisterfiend> just the rules changed *slightly* (read not in a way you'd normally notice)
<offby1> but it's only for blocks?
<graspee> i love you, banisterfiend but i don't know why
<banisterfiend> offby1: no, errthang, let me show u a cute example
<offby1> graspee: I saw him first
<graspee> go ahead then!
<banisterfiend> offby1: x, (y, z) = [1, [2, 3]]
<offby1> well, I knew it worked in assignments.
<bnagy> offby1: that second one is a syntax error, for me
<offby1> in fact I used that above
<offby1> bnagy: yeah, typo :-(
<banisterfiend> offby1: ok, well it also works in methods
<offby1> meant {:one=>1, :two=>2}.map {| k, v| [k, v * 2] }
L-----D has joined #ruby
<bnagy> ohh right
<offby1> it's convenient, but ... weird.
<bambanx> guys i have a varialbe myvariable = 264 if i do 441/myvariable its give me = 1, i tryed putting 441.000/myvariable.000 but dont work , how i should do pls , ty ?
<bnagy> that's just bog standard ruby - same as k,v=[1,2]
wereHamster has joined #ruby
Aaton_off is now known as Aaton
<bnagy> bambanx: you can just do 441.0/myvar
<bnagy> it will automatically kick it into float division then
<bnagy> alternatively 441/myvar.to_f
<banisterfiend> offby1: def hello(x, (y, z)) end works too
Aaton is now known as Aaton_off
<offby1> huh
brianpWins has quit [Quit: brianpWins]
mxweas_ has joined #ruby
<offby1> and yet lambda {|k, v| puts "->#{v}<-"}.call([1, 2]) is a "not enough arguments" error
mxweas_ has quit [Client Quit]
* offby1 rubs chin
kylemcgill has quit [Remote host closed the connection]
<offby1> banisterfiend: I'm using pry for all this, naturally :)
<bambanx> ty bro bnagy \o/
<bnagy> offby1: use proc instead of lambda
<banisterfiend> offby1: put () around the k,v
<bnagy> no arity checking o_0
<offby1> banisterfiend: just tried that; no diff
baroquebobcat has quit [Quit: baroquebobcat]
<banisterfiend> offby1: worked 4 me
<offby1> paste pelase
<offby1> please
stim has left #ruby [#ruby]
baroquebobcat has joined #ruby
<banisterfiend> [13] (pry) main: 0> lambda {|(k, v)| puts "->#{v}<-"}.call([1, 2])
<banisterfiend> ->2<-
* offby1 stares blankly
<bnagy> offby1: or you could call with *[1,2]
<bnagy> the magic of splat
<banisterfiend> bnagy: aka call(1, 2)
<banisterfiend> :P
<bnagy> yeah :)
<offby1> banisterfiend: still ARgumentError, even though I pasted yours. Maybe I'm using 1.8.
My_Hearing has joined #ruby
<banisterfiend> offby1: type: RUBY_VERSION
baroquebobcat has quit [Client Quit]
Mon_Ouie has quit [Ping timeout: 276 seconds]
<offby1> ah, I was wondering how to get that information
<bnagy> man I would never be able to write backwards compatible code now :|
ryanf has joined #ruby
<offby1> yea, 1.8.7
<bnagy> so much stuff that is second nature is just wrong
<banisterfiend> offby1: u silly!
<offby1> banisterfiend: if I can type RUBY_VERSION and get that constant's value ... why don't I see RUBY_VERSION in the output of "ls" ?
keithcelt has quit [Remote host closed the connection]
<banisterfiend> offby1: because constants aren't shown by default (otherwise output would be WAY too noisy, as every class/module is also associated with a top-level constant)
<banisterfiend> offby1: type ls -c
<bnagy> that's it, I'm putting fail "u silly!" unless RUBY_VERSION >= "1.9" in all my code now
<banisterfiend> offby1: type ls -h while you're at it :)
test34- has joined #ruby
test34 has quit [Ping timeout: 265 seconds]
<bnagy> along with # encoding: ascii-8bit # screw your umlauts
<banisterfiend> bnagy: i agree, all human languages that use umlauts should be universally deprecated
xnm has quit [Read error: Connection reset by peer]
<Hanmac> öäü are very sad
<banisterfiend> it's about time we freed teh world from those quirky archaic european languages, french, german, etc
kevinbond has quit [Quit: kevinbond]
xnm has joined #ruby
<banisterfiend> offby1: type: ls -c --grep RU
<offby1> golly
<offby1> or just type RU <tab>
<banisterfiend> Yeah
<bnagy> --grep ?
<bnagy> barbarian
<banisterfiend> it'll get u started on some of the > noob features
<banisterfiend> bnagy: hehe, too lazy to implement proper pipes yet :)
artOfWar_ has joined #ruby
<banisterfiend> bnagy: ultimately i'd love this kind of stuff: show-source MyClass#method | gist
<banisterfiend> or ls | grep yo
looopy has quit [Remote host closed the connection]
<banisterfiend> or: show-source LittleDuck | play (to replay methods in the current context)
<bnagy> ok, well I'll think about using it, once you've done it properly :)
<banisterfiend> hehe
artOfWa__ has joined #ruby
Carson_ has joined #ruby
<banisterfiend> bnagy: we'll have pipes in the 1.0 release though, it's just we want them to be proper object pipes like in powershell rather than just string pipes like in bash
yugui_zzz is now known as yugui
theskillfularrow has joined #ruby
<offby1> hm, my pry hard-codes ruby1.8. How can I get it to use 1.9?
<banisterfiend> bnagy: we also want to invent a "method-ish" pseudo language, like commitish in git, so u could do stuff like: show-method Hello#method^
artOfWar has quit [Ping timeout: 245 seconds]
<banisterfiend> bnagy: the ^ would indicate the superclass method
<Hanmac> offby1 whats your system?
<bnagy> that sounds horrible
looopy has joined #ruby
<banisterfiend> bnagy: well if you're used to commitish in git it feels fairly natural i think: HEAD~3^1 etc, HEAD@{2}
bambanx_ has joined #ruby
libertyprime has quit [Quit: Lost terminal]
<bambanx_> as
<offby1>
<bnagy> I'm not. :) So it sounds horrible.
<offby1> Hanmac: Ubuntu 12.04 ("Quantal Quetzal") LTS; I got "pry" via "gem"
<banisterfiend> bnagy: fairynuff
uris has quit [Quit: leaving]
<offby1> Hanmac: when I ran "gem install pry", the system ruby was 1.8; I've since upgraded it to 1.9
<Carson_> hello. can someone explain to me what's going on here? http://pastie.org/3959292
libertyprime has joined #ruby
<banisterfiend> offby1: get on RVM
<banisterfiend> offby1: rvm.beginrescueend.com
artOfWar_ has quit [Ping timeout: 265 seconds]
<Carson_> i don't understand why i'm not getting the same results. it seems as if i'm overflowing, but i can't fathom why.
<bnagy> pipes sound natural, but random dsl-ish bullshit puts me off ( 0.02 worth )
<ryanf> offby1: you probably installed pry with system ruby and it put it in /usr/local/bin or something
<ryanf> try `sudo rm which pry`
<bnagy> offby1: using system ruby on ubuntu is never a good idea
<ryanf> and then running it again
<ryanf> (after gem install pry, if you haven't done that yet)
<ryanf> oh sorry
<ryanf> mistyped
<ryanf> sudo rm `which pry`
<Hanmac> offby1 how do you install 1.9er ruby?
khakimov has joined #ruby
kuranai|off has quit [Ping timeout: 245 seconds]
<bnagy> commands never to type from a guy on irc. 1. Anything starting with 'sudo rm'
<Hanmac> bnagy, silience i use system ruby
mlue_ has quit [Ping timeout: 248 seconds]
linoj has quit [Quit: linoj]
<offby1> Hanmac: I did "aptitude install ruby1.9", then "update alternatives" to switch /usr/bin/ruby (a symlink) to "point to" ruby1.9
<bnagy> carson_: lol
<bnagy> carson_: leading 0 makes the number octal
<Carson_> oh. wow.
<bnagy> haven't seen _that_ bite anyone for a while
bambanx has quit [Ping timeout: 260 seconds]
<Carson_> yeah that got me good. i'm working on a project euler problem and i was getting really frustrated because it seemed that raw addition wasn't working.
<bnagy> Hanmac: and since you do more or less everything wrong, I think that only endorses my claim! :D
<Carson_> okay, thanks much.
pting has quit [Quit: Ex-Chat]
<deryl> heh
<Hanmac> offby1 install the ruby1.9-full package and then try update alternatives again
<bnagy> or use rbenv
<deryl> or rvm
linoj has joined #ruby
alexim has quit [Quit: bye]
* bnagy (on behalf of shevy) or just compile from source, man, it's not that hard!
<offby1> ah, gem itself is a link to gem18
<deryl> ahhh the joys of choices :)
<bnagy> offby1: you know why? Cause ubuntu system ruby sucks
linoj has quit [Client Quit]
noodletraveler has quit [Ping timeout: 250 seconds]
mvangala_ has quit [Remote host closed the connection]
<Hanmac> offby1 sorry but did you say you install pry and then updated to ruby1.9?
<offby1> yep
kuranai|off has joined #ruby
<offby1> but it's all right now (in fact it's a gas)
ananthakumaran has quit [Ping timeout: 265 seconds]
<banisterfiend> offby1: gas?
<bnagy> offby1: if you used a proper version manager you could install jruby-head as well
<banisterfiend> offby1: isn't that american slang from the 1950s
<bnagy> offby1: and be amazed by how damn much faster it is
<xnm> or a stones reference
<bnagy> I am amazed that there's something to do with the word 'stone' that banisterfiend isn't familiar with
<Hanmac> bangy did you forgot to say that jruby does not support all gems?
<bnagy> I like bangy :)
<bnagy> BANG!
<bnagy> Hanmac: well that might be true, I guess, but I haven't hit one I need yet that isn't supported
abra has quit [Ping timeout: 276 seconds]
<banisterfiend> benji is better still
<banisterfiend> sup benji
<banisterfiend> bnagy: the best gem ever isn't supported: https://github.com/banister/binding_of_caller
<bnagy> lots of the ext gems won't work, I guess
<banisterfiend> bnagy: only the naughty ones, i think
lkba has joined #ruby
<banisterfiend> (the ones that use private api, heh heh)
<bnagy> BUT, it's FAST
<Hanmac> i have a gem for ingame gui with OGL3 support
<bnagy> Hanmac: via ffi?
abra has joined #ruby
<Hanmac> no via c++ code
<bnagy> ok.
<bnagy> well I can see how that would be holding a lot of projects back
Urthwhyte is now known as Urth|Away
<bnagy> but several hundred % speedup AND real Threads... I'll just have to find a way to dry me tears
<bnagy> Hanmac: how did you do the binding, out of interest?
<cj3kim> if i want to draw a ball and make it roll, what is the best gem to use?
jimmybaker has quit [Remote host closed the connection]
<cj3kim> graphics gem*
<Hanmac> bnagy: i need the gui maybe later for my game engine
<banisterfiend> cj3kim: gosu, and use the chipmunk library
<cj3kim> banisterfiend: thanks
<banisterfiend> cj3kim: chipmunk is for physics
<theskillfularrow> anyone interested in hacking here?
<cj3kim> are you the accounting fanatic?
<cj3kim> ;]
<bnagy> Hanmac: I'm not sure I'd want to use the JVM for games stuff, anyway
<banisterfiend> cj3kim: here http://www.youtube.com/watch?v=GvWxUcXiKzA
<bnagy> theskillfularrow: hahah is joke, yes?
<cj3kim> thanks again
<bnagy> it says 'hacking' and it's on PHP :)
<banisterfiend> cj3kim: sorry, this is better http://www.youtube.com/watch?v=FdNFJ5pO14g&feature=related
<cj3kim> banisterfiend: the second one is awesome! :D
abra has quit [Ping timeout: 276 seconds]
Kabaka has joined #ruby
<banisterfiend> cj3kim: Yeah, it's surprisingly what you can achieve in ruby
My_Hearing is now known as Mon_Ouie
theskillfularrow has left #ruby [#ruby]
kenperkins has quit [Quit: Computer has gone to sleep.]
<cj3kim> banisterfiend: this is great! it will keep my ruby skills sharp when i'm not working on rails projects
maletor has quit [Quit: Computer has gone to sleep.]
KL-7 has joined #ruby
ananthakumaran has joined #ruby
<rking> binding_of_caller is pretty serious.
ciopte7 has joined #ruby
<banisterfiend> rking: hehe, Yeah. It's the magic beyond pry-stack_explorer/pry-exception_explorer and plymouth, etc
KL-7 has quit [Client Quit]
brujoand has joined #ruby
noganex has quit [Ping timeout: 276 seconds]
<banisterfiend> behind*
harukomoto has quit [Ping timeout: 248 seconds]
noganex has joined #ruby
<rking> INTERCAL's comefrom operator couldn't hold a candle to the weird stuff you could make with it.
<brujoand> hey guys, Are there any other good ways of accessing a oracle db from ruby besides oci8? (I'm on lion and its just not woring out between us)
<bnagy> weird, oracle usually whores out pretty well
<brujoand> yeah. not a big fan of lions it seems
<bnagy> brujoand: anyway, apart from making 'I hate oracle' jokes, I have no idea, sorry
<brujoand> hehe, oh well, we all hate oracle, so the jokes ar some comfort i guess
abra has joined #ruby
<bnagy> there's probably a rest interface somewhere
<bnagy> btu I can't back that up
<brujoand> oh, that would be pizza on a monday
<bnagy> and it would be slow and sucky, I guess
<brujoand> hm
<brujoand> yeah
<brujoand> slow, but it would work
<brujoand> might, work
prtksxna has joined #ruby
brianpWins has joined #ruby
<bnagy> brujoand: google makes me think maybe the jdbc driver might be an option
<bnagy> maybe there's some jruby magic
Helius has joined #ruby
phipes has quit [Quit: phipes]
yxhuvud has joined #ruby
<bnagy> I would definitely explore that, cause like java / oracle etc, you'd hope it would work
SeySayux has quit [Ping timeout: 276 seconds]
<bnagy> looks like there's an ActiveSissyRecord adapter thingy
<brujoand> yeah. Ive used that approach with some of my other scripts, but it has been slow and unstable, so thats why I was hoping oci8 would fix everything.
TheHunter_1039 has quit [Quit: TheHunter_1039]
<brujoand> hehe, active sissy?
<bnagy> you using a decent jvm?
Morkel has joined #ruby
<bnagy> OSX ships with prehistoric versions, if at all
<bnagy> there's a googlecode site with osx builds of openjdk with only a few days lag
<brujoand> aye, my jvm is stn osx, everything else is fresh from brew though
<brujoand> cool
<bnagy> 7u6 or something might help a LOT with speed if you use a recent jruby
<brujoand> yeah. that sounds right. ill give that a try :)
linus95014 has quit [Quit: linus95014]
<bnagy> banisterfiend: does pry work with jruby in general? As in only some stuff won't work?
Seabass_ has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
jameshyde has joined #ruby
<banisterfiend> bnagy: it works in general yes
<banisterfiend> bnagy: only some plugins dont work
KL-7 has joined #ruby
jhunter has quit [Ping timeout: 245 seconds]
KL-7 has quit [Client Quit]
<bnagy> I have 167 lines of procedural code I am trying to put off refactoring, I'm almost desperate enough to try it
<banisterfiend> bnagy: hehe, cool; it hasn't been exhaustively tested on jruby so if you come across any quirks let me know
<banisterfiend> we know there's one quirk related to a jruby bug in pretty print
Seabass has quit [Ping timeout: 252 seconds]
<banisterfiend> but we're waiting for the jruby guys to fix that
vectorshelve has joined #ruby
SeySayux has joined #ruby
<vectorshelve> ....
jhunter has joined #ruby
<vectorshelve> hemanth: Hai bhai
<hemanth> vectorshelve, gem install climagic ;)
JohnBat26 has joined #ruby
avandenhoven has joined #ruby
brujoand has left #ruby [#ruby]
lkba has quit [Ping timeout: 248 seconds]
avandenhoven has quit [Client Quit]
* hemanth pushed two more silly CLI gems : gem install climagic hackersays ; climagic; hackersays :)
Gavilan has left #ruby [#ruby]
<banisterfiend> hemanth: cool what does climagic do
Morkel has quit [Quit: Morkel]
<hemanth> banisterfiend, gives you the CLI one-liner for the day; if you want to take the risk you can climagic | bash heh heh or else just climagic to see the command
looopy has quit [Ping timeout: 244 seconds]
<cj3kim> banisterfiend: do you code rails?
kil0byte_ has quit [Remote host closed the connection]
looopy has joined #ruby
<kenneth> in a rack app, is there a way to simply return a static file
<kenneth> without having to load the entire file into memory line by line, and then send that as the http response
<ryanf> I think you could just give it File.open(...)
<ryanf> for the budy
<ryanf> body
<ryanf> since it calls each
<ryanf> but I don't know if it will close it afterwards
ananthakumaran has joined #ruby
<ryanf> I also don't know if that avoids loading the whole file into memory
WalterN has left #ruby ["Leaving"]
<Hanmac> ryanf File.open will be closed if you use the File.open("path") { ... } form
<ryanf> Hanmac: right, but in this case I'm talking about giving it to Rack as the body of your response
<ryanf> which means you are waiting for rack to call #each, not doing it yourself
<ryanf> a bit of googling implies that Rack will actually call #close if you do that, so it should work fine
<kenneth> that's neat
<kenneth> what about mime type
cezar has joined #ruby
<ryanf> hmm, no idea
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
<ryanf> alternately I think rack comes with a middleware for serving static files
<kenneth> can it figure that all by itself, i don't want to have to write an entire mime type parser
<ryanf> that might work depending on your exact needs
<kenneth> 404
<kenneth> for me
<ryanf> what seriously? I'm looking at it
brg has joined #ruby
byronb has joined #ruby
byronb has quit [Excess Flood]
<kenneth> probably has to do with ruby forge being a bad citizen of the web and having broken ssl support
<kenneth> that second one worked
Axsuul has quit [Ping timeout: 265 seconds]
<kenneth> hmm
<kenneth> the reason i'm looking into this is for https://github.com/kballenegger/kenji
<kenneth> i want to be able to serve static files transparently when requested
<kenneth> without being super inefficient about it, even though i hope nobody ever uses it in production
djdb has joined #ruby
<ryanf> yeah I think this middleware should work fine for that then. it will just fall through to the underlying app if the static file doesn't exist
cezar has quit [Client Quit]
<kenneth> (should be handled by an nginx load balancer before it ever gets to the rack app)
<ryanf> I think it is the same one Rails uses for dev mode
<ryanf> don't quote me on that though
Axsuul has joined #ruby
looopy has quit [Ping timeout: 244 seconds]
<ryanf> oh maybe that's not true actually. it might just grab the whole path and 404 if there's no file
<ryanf> that would be annoying
<ryanf> but it'd be easy to write your own middleware based on it that does what you want, regardless
<kenneth> right, i mean i have it working already
<kenneth> but right now i'm loading the entire file into memory
<kenneth> line by line
<ryanf> yeah
<kenneth> it just doesn't feel acceptable
mneorr_ has quit [Remote host closed the connection]
mneorr has joined #ruby
<kenneth> because there's no way that scales
bambanx_ has quit [Quit: Saliendo]
bambanx has joined #ruby
<bambanx> hi
<coyo> hi
wargasm has quit [Read error: Connection reset by peer]
trivol has joined #ruby
<bambanx> how i can use regular expresion for open files of a dir?
<kenneth> Dir.entries(…).filter?
wargasm has joined #ruby
<bambanx> thanks kenneth its necesary use a while loop for example?
jobicoppola has joined #ruby
djdb has quit [Read error: Connection reset by peer]
<kenneth> no, you use functional constructs to iterate
<kenneth> for example
ipoval has quit [Quit: ipoval]
bigkevmcd has quit [Quit: outta here]
<kenneth> Dir.entries('.').select{|f| f =~ /myregex/ }.each{ |f| do something with f }
arturaz has joined #ruby
<kenneth> and it's select, not filter, my bad
<rking> kenneth: I was digging around trying to figure out why I couldn't find that. =)
<bambanx> thanks kenneth
djdb has joined #ruby
<rking> Random Q, probably a FAQ: Why don't we have Fixnum#succ! ?
<rking> E.g., x--
<rking> Urr, x++ I mean, in some form.
Carson_ has quit [Ping timeout: 245 seconds]
<ryanf> fixnums are immutable
* rking triple-takes.
<ryanf> for one thing, the object_id directly translates to the value, so you couldn't change the value without changing the object_id
<rking> Oh, I getcha.
<ryanf> which I assume is impossible
<ryanf> although banisterfiend could probably say for sure
<rking> I need to look at Fixnum#+=
sam1131011 has joined #ruby
<rking> Oh, silly. That would be Fixnum#+ and then regular =.
<ryanf> yeah
<rking> Which makes sense. The old one is gone.
<bnagy> hemanth: your gem: wget -q -O - climagic.org | sed -n -e 's/.*<tt>\(.*\)<\/tt>.*/\1/p'
<bnagy> speaking of slimagic
<bnagy> *climagic
shevy has quit [Ping timeout: 260 seconds]
brg has quit [Quit: Page closed]
sam113101 has quit [Ping timeout: 276 seconds]
<rking> ryanf: Thanks for the answer. I've wondered that for a long time.
aantix has quit [Quit: aantix]
maesbn has joined #ruby
<ryanf> of course, ruby could still have a ++ operator defined as "+= 1"
cdepue has quit [Remote host closed the connection]
<kenneth> ryanf: oh that actually explains why ++ and -- don't exist. i've always thought them to be ridiculous omissions
sam1131011 has left #ruby [#ruby]
<kenneth> i'm so used to typing ++ that i've made this mistake a great many times
sam113101 has joined #ruby
<hemanth> bnagy, yes that can be done, for newbee cli dudes let them use gem ;) no?
<hemanth> bnagy, curl -s climagic.org | sed -n -e 's/.*<tt>\(.*\)<\/tt>.*/\1/p' # silent
<bnagy> hemanth: well I just think it's a) ironic to have a gem that simple to wrap a website devoted to learning the cli b) using their name in a gem
<bnagy> when you have (I assume) nothing to do with them
<bnagy> it's like gemsquatting :)
<hemanth> :d
Helius has quit [Ping timeout: 245 seconds]
<hemanth> bnagy, I have some more silly gems :D
<hemanth> gemsquats
<kenneth> speaking of gems
<kenneth> is there an etiquette as to when a gem is ready to be deployed on rubygems
<bnagy> the wget is 'silent' too btw, I trust wget to be installed more than curl, although curl does look nicer
<rking> kenneth: I'd say if it runs and does something useful.
<kenneth> then maybe i'll push it
nirakara has joined #ruby
<kenneth> i've been using it by installing the .gem directly and it works great :)
<bnagy> kenneth: pretty much everyone uses github as a gem source these days also
<rking> kenneth: You can even revamp the API completely, just bump the major number.
<Hanmac> ryanf you cant define ++ or -- it does not work
<kenneth> https://github.com/kballenegger/kenji -- my gem / project
noodletraveler has joined #ruby
maesbn has quit [Remote host closed the connection]
<hemanth> bnagy, heh heh ok :)
<ryanf> Hanmac: you, the user of ruby, can't. I bet that if matz really wanted to, it would be possible to define it as a special operator the way that += and -= are
<krz> with Time.now. how do i get the hour in 24 hour format?
<ryanf> but you definitely couldn't define it as a "succ!" method that mutates the receiver
<ryanf> krz: read up on strftime
<graspee> you could hack the ruby source to add ++ if you were that desperate
<graspee> a ruby fork just to add ++ and --
<Hanmac> 1)matz hate ++ 2) yeah, add ++ and -- and 1.8 support will be kicked out
<rking> ryanf: I wonder what the "def …" syntax would be for the prefix and postfix versions.
<ryanf> you can already override unary + and -
<ryanf> iirc it's +@ or @+
<ryanf> I forget which
<rking> Ahh, whoa.
<graspee> i don't see how you could have a strong opinion on ++ though
serroba has joined #ruby
<Hanmac> +@ but ++@ is not possible
<graspee> why does matz hate it?
<bambanx> kenneth, what mean this: f =~
<rking> So maybe `def ++@` and `def @++`
<ryanf> bambanx: regex match
<kenneth> bambanx: regex matching operator
<bambanx> ty guys
friskd has joined #ruby
nilg` has joined #ruby
serroba has left #ruby [#ruby]
<bnagy> krz: good question
earlz has joined #ruby
<graspee> hmm. there are two ruby sdl wrappers, am i right?
tonini has joined #ruby
<bnagy> krz: it doesn't just work? It should...
<earlz> So I'm abusing ruby a little bit I think. I'm basically using it's power as a DSL to make a simple assembler for a CPU I'm creating in VHDL... Has anyone heard of Ruby being used for such a thing? I'd really like to look at someone's code doing the same thing to try to see if there are some better techniques
<bnagy> I need to wait another 53 minutes to test, but #hour Just Works when I build a time after 1200
<hemanth> krz, Time.strptime("10pm", "%I%P").strftime("%H:%M") ?
shevy has joined #ruby
friskd has quit [Client Quit]
<bnagy> yeah, just checked the code, hour is 24 hour already
<bnagy> Time.now.hour
<hemanth> need to require 'time' for that
d3c has joined #ruby
<bnagy> not in my version (or ever afair)
Sephi-Chan has joined #ruby
<Sephi-Chan> Hello
sepp2k has quit [Remote host closed the connection]
<bambanx> hi
<krz> 24*60 = 1440= total minutes in a day. is it possible to use Time.now and strftime to get the current minute (of 1440) ?
<bambanx> guys how i can do a regex for this: i need to find all files begin with myorder, and on my dir i have myorder22323.txt , myorder94884.txt and other types of files otherfiles.txt
<graspee> i'm going to hack ruby to include ++ now hehe
<Sephi-Chan> In my application, users are able to scan invoice. I need a way to hide some private information on that image. I believe bluring or blank part of the image would be good. How can I do so?
<bnagy> krz: Just do Time.now.hour*60 + Time.min
<bnagy> bambanx: Dir['myorder*.txt'] ?
maesbn has joined #ruby
<bnagy> assuming the cwd has those files, otherwise you'll need a better path
Morkel has joined #ruby
<Hanmac> krz : Time.now.tap {|t|break t.hour*60+t.min}
<bnagy> krz: but it will be current minute of 1439 btw
<bnagy> Hanmac: i <3 your obscurely overengineered solutions :)
dqminh_ has joined #ruby
<bnagy> tap gets nowhere near enough love
<bnagy> Time.now.instance_eval {hour*60 + min}
<Hanmac> eval is a it to evil
<bnagy> well it's instance_eval, with a block, not a string, come on, that's quality
<bnagy> tap is basically the same thing
dqminh has quit [Ping timeout: 244 seconds]
<krz> wow thanks bnagy Hanmac
<krz> ill need to look into tap
<bnagy> krz: usually you'd only use tap if you were going to chain on
<bambanx> what i do wrond here guys .select{|f| f =~ /My Orders-*.txt/ }.each{ |f| do puts f }
<Hanmac> [Time.now].map{|t|t.hour*60+t.min}[0]
<ryanf> bambanx: "do"
<ryanf> also fyi you can use .grep for that instead
<bnagy> krz Time.now.tap {|t| puts t.hour*60 + t.min}.day will puts the minute and then return the day
<ryanf> .grep(/My Orders-*.txt/).each ...
<ryanf> also that regex is definitely not doing what you think it is
<Hanmac> bambanx the regex looks a bit wrong
<hemanth> Dir.glob('/path/to/dir/myorder*.txt').each { |file| ...} bambanx
<bnagy> if you're going to glob on files, just use Dir[] or Dir.glob, imho, it's what it's for
burgestrand has quit [Quit: Leaving.]
<bnagy> and the globbing is more powerful than using a regex anyway
<hemanth> bnagy, :)
<bambanx> what mean with glob
<hemanth> you may say : /glob/, *not* /glohb/ To expand {wild card} characters in a {path name}.
<bnagy> bambanx: what I said before Dir['myorder*.txt'] or the Dir.glob method directly, that hemanth just said
azm has quit [Read error: Connection reset by peer]
<bambanx> o
<bambanx> ok
<bambanx> thanks
dekroning has quit [Ping timeout: 240 seconds]
timonv has quit [Remote host closed the connection]
mlue has quit [Disconnected by services]
Haydos has quit [Quit: Leaving]
tatsuya_o has joined #ruby
<kenneth> excellent, my gem is now online :)
earlz has left #ruby [#ruby]
<hemanth> kenneth, uber cool, congrats
jameshyde has quit [Remote host closed the connection]
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<kenneth> thanks. my very first haha. it'll be sweet to tell people they can `gem install kenji`
<bambanx> i am using this for list my files but return [ ] empty : files = Dir.glob('C:\\My Orders-*.txt')
<bambanx> , p files
<banisterfiend> rking: type this in pry: $ object_id
<banisterfiend> and you'll see a long explanation about how object_id's map to VALUEs
maletor has joined #ruby
tomzx has quit [Ping timeout: 244 seconds]
<Hanmac> eigher 'C:\My Orders-*.txt' or "C:\\My Orders-*.txt"
ph^ has joined #ruby
<Hanmac> bambanx try one of my strings
<bnagy> bambanx: fil separator is still '/' on Windows
schovi has joined #ruby
<bambanx> ok
maletor has quit [Client Quit]
<bnagy> bambanx: if in doubt, use File.join
<Hanmac> you can get the seperator with: File::SEPERATOR
<bnagy> Dir[File.join 'c:', 'My Orders-*.txt'
<ryanf> I really don't see the point of File.join
<bnagy> assuming, you know, you get the syntax right
<Hanmac> ryanf because the sperator may be different?
<ryanf> Hanmac: ruby doesn't care though
<ryanf> works fine in windows
<bnagy> ryanf: I'm betting they made it because they wanted to have different separators, but then they kind of never did
<ryanf> oops
<ryanf> */ works fine in windows
<bnagy> ryanf: ruby does care
<bnagy> if you glob with \ in windows it will fail
<ryanf> you mean with /?
dekroning has joined #ruby
<bnagy> no
<ryanf> haha
<bnagy> try it :)
<ryanf> so that's not exactly an argument against using forward slashes everywhere
<ryanf> that is funny though, didn't know that
khakimov has quit [Quit: Computer has gone to sleep.]
<bnagy> no, it's not, and like you say it makes join seem silly
<bnagy> but we're PREPARED, which is the point :)
<ryanf> haha
<bnagy> for native windows stuff like CreateProcess you still need \
Helius has joined #ruby
<bnagy> it's all a bit odd, tbf
iocor has joined #ruby
<bambanx> Hanmac, this dont work :( # Dir.glob('C:\Users\My Orders-*.txt')
<bambanx> Dir.glob("C:\\Users\\My Orders-*.txt")
<ryanf> that's what bnagy was just saying actually
<ryanf> that you need to use forward slashes with glo
<ryanf> b
<bnagy> bambanx: like I said - use / instead
<Seabass_> amazing=grilledcheese.new
<ryanf> bnagy: does File.join even use backslashes in windows?
<bnagy> ryanf: no
<ryanf> hahaha
<ryanf> that's hilarious
<ryanf> why would you recommend people use it then?
<Hanmac> bambanx are you sure the files are calling "My Orders" last time it was "myorders"
<ryanf> I don't understand the motivation
<bnagy> ryanf: in case they change the separator
<bambanx> yeah Hanmac only was a example
zommi has joined #ruby
<bambanx> now works bnagy thanks !!!
<bnagy> and to make whoever wrote join not feel useless
<vectorshelve> shevy: Hanmac rippa banisterfiend bnagy : Guys I wanna introduce a friend of mine to you all.. extremely talented and a good programmer in ruby hemanth ... https://github.com/hemanth he has worked on a lot of interesting gems and he is from India
<ryanf> the day that I heard that you didn't need join on windows, I felt like
<ryanf> the only sane man in a world gone mad
<ryanf> join is everywhere
<bnagy> ryanf: think of all the bytes we could reclaim!
<ryanf> yeah
<bambanx> damn guys this channel is best of the all books of ruby of the world :=) thanks all
<ryanf> also stuff like File.expand_path(File.join(File.dirname(__FILE__), 'app', 'models'))
<ryanf> which I have literally seen
<bnagy> that makes no sense
<ryanf> well, it will work. it's just pointless
<bnagy> oh wait wait yes it does sorry
<bnagy> dirname __FILE__ will be relative
<bnagy> duh
<ryanf> or File.expand_path('../app/models', __FILE__)
<ryanf> (or you could do that, I mean)
<ryanf> also half the time that's in a require
<bnagy> yeah then it makes no sense
<bambanx> guys if i wanna list all files but only i dont wanna list is the files begin with myorder...
hemanth has quit [Read error: Connection reset by peer]
<ryanf> bambanx: try Dir.glob('*') - Dir.glob('myorder*')
<bambanx> nice
<Alantas> bambanx: If you're printing them in a loop: next if /^myorder/.match(file)
hemanth has joined #ruby
<rking> banisterfiend: Ahh, coolness.
<Alantas> If you need the finished array first, might be better to do: Dir.glob('*').reject{|file| /^myorder/.match(file)}
skogis has joined #ruby
<Hanmac> bnagy ryanf are you also one of the guys they dont know that require_relative for?
<Alantas> (Rather than making it glob twice.)
<hemanth> vectorshelve, thanks for the intro, hello Hanmac rippa banisterfiend bnagy
<bnagy> Hanmac: I know what it's for, but I don't use it. Dunno why. It's ugly.
yonggu has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
<Hanmac> bnagy so what did you use if one of your rb files need to require an other file in the same folder then the other?
CheeToS has joined #ruby
perryh is now known as perryh_away
<bnagy> File.dirname __FILE__ + '../ etc
<Hanmac> did you know that this could hjcacked?
<Alantas> Only if you're passing an outside-world-provided string to 'require'.
igotnolegs has quit [Quit: Computer has gone to sleep.]
bosphorus has joined #ruby
<Hanmac> Alantas WRONG
<graspee> hehe the ruby parse.y file is in my hands!
<graspee> feeeeel the power
<bambanx> this is a good way for count my files ? Dir.glob('C:/Users/*').size
<bambanx> or i should use length
<bnagy> size is fine
<Alantas> Either way is fine, I think.
<bambanx> cool
<bnagy> bambanx: Dir.entries is probably best
<bnagy> if you want all files
Urth|Away is now known as Urthwhyte
billiamii has quit [Quit: Leaving]
<bnagy> Hanmac: you can explain how, if it will make you happy
shadoi has quit [Remote host closed the connection]
<bnagy> but I assure you that it is not a security issue in my particular code :)
tvw has joined #ruby
ymasory has quit [Quit: Ex-Chat]
blacktulip has joined #ruby
<bambanx> is a good practice use class methods i mean self.trade ... cos i my program i am not creating a lot objects ?
<Alantas> Hanmac: You're still left with giving an example of how it could be hjcacked. A bare assertion, even in all-caps, is no substitute for an example.
Prz has joined #ruby
Sgeo_ has quit [Read error: Connection reset by peer]
<bnagy> bambanx: when to use Class methods is a bit complicated, and contraversial
<Alantas> bambanx: If you have a bunch of functions that aren't dependent on instances, then that's probably fine. Maybe put them in a module (using it like a namespace) rather than a class if you don't intend to instantiate it at all.
<Hanmac> Alantas: so you guys want this? require(File.dirname __FILE__+'/file') ?
schovi has quit [Remote host closed the connection]
<bambanx> this is what i do Alantas
<Alantas> Hanmac: You're still left with giving an example of how it could be hjcacked. A bare assertion, even in all-caps, is no substitute for an example.
rakm has quit [Quit: Computer has gone to sleep.]
<bnagy> bambanx: class methods are _normally_ used for stuff that is relevant to that class, but not relevant or logical for an instance
<bambanx> ok
<bnagy> bambanx: like Foo.marshal_load( str )
<bnagy> whereas it would be foo_instance.marshal_dump
tatsuya_o has quit [Remote host closed the connection]
<bambanx> in my program i am not using instances , for sure i am not using the best practices of programming i need think more
hemanth has quit [Read error: Connection reset by peer]
<Hanmac> its about the LOAD_PATH, if like in ruby1.8 the current directory is in the loadpath, an file placed there is required first before other libs or gems
L-----D has quit [Quit: Leaving]
<Hanmac> bambanx, are you sure? numbers and classes are instances too
hemanth has joined #ruby
<bnagy> Hanmac: how's that relevant though?
<bambanx> ok Hanmac , i mean i am not explicit creaating objects like .new
xnm has quit [Read error: Connection reset by peer]
<bnagy> File.dirname __FILE__ is going to return a relative path, so I'm not seeing any hijack
<bnagy> unless you can assign to __FILE__ or you can write into my code directory
<bnagy> in which case I have already lost
<bambanx> when i write a loop like a " while code , my code , end" i see some examples uses : "while code DO, my code , end" in both case is the same? or i should use do always?
<Alantas> I'd prefer using parentheses, like File.dirname(__FILE__)+"/foo" rather than without, which might be interpreted as File.dirname(__FILE__+"/foo")
<Alantas> bambanx: No need for "do"; just do as in the first example: while foo; bar; end
<graspee> building ruby from source was fun
<graspee> a++ would recommend
<Hanmac> bnagy require(File.dirname __FILE__ + "/foo") does not work for me
<bnagy> that's how I write it, yeah, but you know
<bambanx> Alantas, thanks
hemanth has quit [Read error: Connection reset by peer]
<bnagy> Hanmac: it was your code, dude :)
<bnagy> require File.dirname(__FILE) + '/lib/blah'
hemanth has joined #ruby
<bnagy> is my pattern
<bnagy> apart from missing underscores
kakarlus has joined #ruby
<Hanmac> require(File.dirname(__FILE__)+'/file.rb') this does not work too
<Alantas> Is it in the same directory as the file that contains that code?
kakarlus has left #ruby [#ruby]
cj3kim has quit [Quit: This computer has gone to sleep]
<Hanmac> Alantas yeah :P
Sgeo has joined #ruby
<bnagy> Hanmac: in fact what I use is more or less exactly how require_relative works
<Hanmac> you guys dont get it right? your code does not work in 1.9.2+
<bnagy> Hanmac: my code works juust fine
<Alantas> That would imply that File.dirname and/or __FILE__ don't work in 1.9.2+.
<bnagy> no they work, Hanmac is just mistesting
<Hanmac> bnagy & Alantas then you are load the first file? are you with the interpreter in the same dir as the files?
<Alantas> I've run a multi-file program, written for 1.8.7, in 1.9.3. It uses a trick like that to bring in the other files. It worked. So.
<bambanx> split only works for strings ?
<ryanf> Hanmac: __FILE__ gives you a path relative to the working directory, not the file's location
iocor has quit [Quit: Computer has gone to sleep.]
ph^ has joined #ruby
<Alantas> Specifically: require File.join(File.dirname(__FILE__), "foo.rb")
<ryanf> and File.dirname will include a . at the beginning if it makes sense to
<bambanx> i am trying to split an array and only works when i convert my array.to_s.split(',')
<ryanf> personally I just use require_relative though
<Alantas> bambanx: If it's in an array, it's already split.
<bambanx> k
kiwnix has quit [Remote host closed the connection]
<Hanmac> Alantas: yeah the path is relative to the working dir, but did you forgot that the working dir is NOT in LOADPATH anymore?
mk03 has quit [Remote host closed the connection]
<Alantas> So, it might fail if going up the directory tree, like File.dirname(__FILE__)+"/../foo" but it should still work either way for just +"/foo".
medik has joined #ruby
<Alantas> On the interpretation that __FILE__ returns whatever it needs to return such that feeding it into 'require' produces the right result.
<Alantas> Whether it be relative to the working directory, or whatever.
<bnagy> require_relative uses File.dirname(caller[0]) which will be absolute
jobicoppola has quit [Ping timeout: 245 seconds]
<Hanmac> Alantas the working directory is kicked out of the loads, so relative to the working dir does not work
<bnagy> my way won't work if you give a relative path that's not in the script's dir, but will work if you give an absolute path, or ~/stuff/bin path etc
<bnagy> Hanmac: it will work fine if you're in the script's dir
<bnagy> because you'll end up with require './foo'
<Hanmac> yeah ... and what if not??
<bnagy> then read what I just typed
<Alantas> Yeah, File.dirname(__FILE__) produces different literal results depending on what directory the script is called from: so that the same final result is gotten. Which is the whole point.
hoelzro|away is now known as hoelzro
<bnagy> if you're next to it or if you give it an absolute path (or a shell expanded path like ~/blah/) then it works
<Hanmac> "it will work fine if you're in the script's dir" and if the interpreter is NOT in the scripts dir, your whole system fails?
<Alantas> As long as you don't Dir.chdir between the __FILE__ and the require, I don't see how it can be a problem.
<bnagy> or if you give it an absolute path
<bnagy> I think it's time for your meds, dude
jjp has joined #ruby
<bnagy> if the app you're running is a) in your path b) you're in it's working dir or c) you give an absolute path to it -> all is well
<bnagy> when you give a relative path and you're not in the dir, it will not work
<bnagy> which is what I said about 10 minutes ago
<bnagy> all of which was in response to an assertion about hijacking, which never went anywhere
<bnagy> Alantas: Dir.chdir is nasty :<
carloshpf has joined #ruby
mdw has joined #ruby
nirakara has quit [Quit: This computer has gone to sleep]
jgrau has joined #ruby
senny has joined #ruby
<bnagy> to be fair, there is one case where require_relative is better, so I guess I should crank out sed
<jgrau> has anyone experienced heroku detecting a ruby/rack app when it really is a sinatra app?
noyb has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
Wiss has joined #ruby
bluOxigen has joined #ruby
<banisterfiend> bnagy: how far are you in mario galaxy?
Prz has quit [Quit: Leaving]
<banisterfiend> im thinking about buying a wii
<banisterfiend> ps3 games are too complicated 4 me
<banisterfiend> i dont play any of them even though i bought about 6
celm has joined #ruby
<bnagy> banisterfiend: at the time of writimg I have 54 stars
<bnagy> btu I don't know how far that is. SMG I was quite a lot of play time though, especially if you then do all the purple coin stuff
BiHi has joined #ruby
<bnagy> and then you can complete the whole game again as Luigi :<
<bnagy> if I smoked as much weed as you I would definitely recommend the Wii :D
<bnagy> our house wiring is messed up again, though, so I can't really play much atm :(
pduersteler has joined #ruby
lolmaus has joined #ruby
Solnse has quit []
<bnagy> banisterfiend: does pry have trippy colours and syntax highlighting?
<bnagy> speaking of rainbows
<graspee> i wouldn't say trippy
<graspee> but it has syntax highlighting
<graspee> and auto indenting
<bnagy> can I use vim colorschemes?
<graspee> not sure
<bnagy> and if not, why not? :)
<graspee> probably if you alter a config file or something
ukwiz has joined #ruby
<hoelzro> could someone point me a gem that is implemented as a C module and has tests so I can see the "proper" way to do that in Ruby?
<hoelzro> a document specifying the best practices for this would also be handy =)
iocor has joined #ruby
<pduersteler> does 1.9.3 now implement native threads instead of green threads? I read something but I want to be sure
<bnagy> pduersteler: MRI, no
<bnagy> jruby, rbx (possibly others) yes
<pduersteler> hmm...
<banisterfiend> bnagy: how many to get?
<bnagy> banisterfiend: dunno, it doesn't tell you in advance
<bnagy> also I always get all stars, you don't need to to complete the game
<Hanmac> hoeltro ... my gems are C(++) ... but i forgot the tests :P
<hoelzro> Hanmac: that's a start =) could you direct me to one, please?
<pduersteler> bnagy thx
iocor has quit [Client Quit]
<bnagy> pduersteler: what I said was technically 100% wrong, but it's the 'correct' answer 99% of the time
vectorshelve has quit [Quit: Page closed]
<bnagy> that article explains it well
vectorshelve has joined #ruby
<hoelzro> thanks!@
<Hanmac> oh in this there are tests too
ryanf has quit [Quit: leaving]
<pduersteler> bnagy I just thought I'd throw a question in here because wikipedia somehow says 1.9 is using native threads
<bnagy> well that's correct
<bnagy> it's just that it doesn't help when you have the GIL
<banisterfiend> bnagy: hehehehe, how mnay months have you been playing it
francisfish has joined #ruby
<bnagy> banisterfiend: 2-3 but not very much
<banisterfiend> bnagy: is there a multiplayer option?
<bnagy> pduersteler: ime when people ask that question, they want to know if they can saturate multi-core systems
<bnagy> banisterfiend: yeah, and it's slightly less lame than the first one, but still fairly lame. Good for gfs / small children
<pduersteler> bnagy ah, just reading about GIL, that explains more.
<banisterfiend> bnagy: can you play multiplayer from timbuktu or wherever u r?
manizzle has joined #ruby
<bnagy> banisterfiend: I can barely use SSH without lag, man
<banisterfiend> hehe
zz_chrismcg is now known as chrismcg
<Alantas> It's a good thing gfs can't be gamers, or your statement would be nonportable.
<bnagy> banisterfiend: we're angling for Bhutan, next year - if that comes through the internet will probably be even worse :/
<banisterfiend> *woosh*
krz has quit [Quit: krz]
<banisterfiend> bnagy: why dont you suggest to go to a place with good internet
<banisterfiend> tell her to compromise between save teh world, and broadband
<bnagy> cause for some reason the red cross doesn't usually have all that much to do in those places
manizzle has quit [Read error: Connection reset by peer]
visof has joined #ruby
manizzle has joined #ruby
<banisterfiend> bnagy: go to philippines
<banisterfiend> im sure they good do with some help, and they have decent internet :)
<bnagy> banisterfiend: actually that's on the table. I have just heard so much bad stuff about Manila I am hesitant
<banisterfiend> bnagy: violent crime u mean?
cha1tanya has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<bnagy> crime, traffic, pollution, crap food ...
<banisterfiend> hmm filipino food was actually very tasty last time i had it, though avoid balut
<bnagy> pinoy people are great, though
<vectorshelve> bnagy: u r from Italy right ?
<bnagy> vectorshelve: Australia
schovi has joined #ruby
<vectorshelve> will anybody love to go to somalia and Afghanistan ? Two of world's most volatile nation.... :)
<vectorshelve> bnagy: ok
<bnagy> vectorshelve: we could move to Delhi, but I veto'd it, in case I ran into people like you
seoaqua has joined #ruby
roolo has joined #ruby
<banisterfiend> bnagy: good move, "haiiiii can help me with ruby plssss :)))"
<banisterfiend> could get irritating day in day out
<bnagy> actually it was mainly because of the weather and the environment, but it's a good story
<bnagy> I'd do Kabul, but it's not a family posting. And Kabul is nowhere near the second most dangerous place, these das
timonv has joined #ruby
<vectorshelve> bnagy: I am not from Delhi... :D dont forget australians come to India to play IPL and we won the Cricket World Cup 2012 thrashing Australia in the quarter finals :)
fr0gprince_ has quit [Ping timeout: 265 seconds]
liluo_ has joined #ruby
<vectorshelve> bnagy: u know abt the symonds Harbhajan issue ?
liluo has quit [Read error: Connection reset by peer]
<bnagy> I was born there, I haven't lived there for 10+ years and I never followed cricket even when I did
<bnagy> ie no
mw3kush has joined #ruby
<banisterfiend> bnagy: def. accept a posting in morocco if you get a chance
<banisterfiend> i spent the best 2 months of my life there
<banisterfiend> tangier and marrakesh
apeiros_ has joined #ruby
<vectorshelve> bnagy: ok.. Indians are fanatic about Cricket.. I love Australia and have a lot of respect for the country and people there...
<seoaqua> has anyone used 'words segment' gems? like rmmseg. but this one is out of date and always reports $KCODE error
jeffmess has joined #ruby
<vectorshelve> banisterfiend: but pay in morocco wont be lucrative I guess
thomasfedb has quit [Ping timeout: 245 seconds]
danheberden has quit [Ping timeout: 245 seconds]
<bnagy> banisterfiend: I like morocco, but not much chance.
monokrome has quit [Ping timeout: 245 seconds]
<hemanth> meow
<bnagy> need arabic, and it would be covered from a regional office
perryh_away has quit [Ping timeout: 245 seconds]
yellow5 has quit [Quit: time to go!]
* hemanth pokes vectorshelve
<bnagy> vectorshelve: we don't get paid in local currency :D Otherwise being here in Nepal would be hoooorible
Targen has quit [Ping timeout: 248 seconds]
yellow5 has joined #ruby
avalarion has quit [Ping timeout: 264 seconds]
petercs has joined #ruby
<vectorshelve> bnagy: I mean what do you do by profession going all these interesting places ?
Apocalypse has quit [Ping timeout: 245 seconds]
Azure has quit [Ping timeout: 245 seconds]
emsilva has quit [Ping timeout: 245 seconds]
avalarion has joined #ruby
<bnagy> vectorshelve: break software, yap at conferences
<vectorshelve> hemanth: dude wassup ?
bpgoldsb has quit [Ping timeout: 248 seconds]
KL-7 has joined #ruby
<vectorshelve> bnagy: rubyconf ?
<hemanth> vectorshelve, sleepy
bpgoldsb has joined #ruby
yonggu has joined #ruby
<vectorshelve> bnagy: break software u mean testing
danheberden has joined #ruby
monokrome has joined #ruby
<bnagy> no if I meant testing I would have said testing :)
Azure has joined #ruby
thomasfedb has joined #ruby
perryh has joined #ruby
<vectorshelve> bnagy: then what is this "break software " essentially all abt.. just for info
Eldariof-ru has joined #ruby
Apocalypse has joined #ruby
<banisterfiend> vectorshelve: he's hacker
<bnagy> I build tools to find exploitable memory corruption bugs in closed source software
<banisterfiend> vectorshelve: like anonymous / lulzsec
Apocalypse has quit [Changing host]
Apocalypse has joined #ruby
Eldariof-ru has quit [Remote host closed the connection]
<vectorshelve> banisterfiend: cool... ethical hacker ?
<banisterfiend> bnagy: r u white hat <g>
cming has joined #ruby
<banisterfiend> bbl
banisterfiend has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
<vectorshelve> banisterfiend: u r a legal hacker ?
<vectorshelve> hemanth: ^^
rails has joined #ruby
<bnagy> not many people would call me that, I guess, no
<bnagy> ethics is a funny old word though
<mw3kush> Whats the point of a chat client?still confused
<vectorshelve> bnagy: u paid per hour ?
<rails> I have no idea what i'm doing wrong, i keep not getting results when using this code: https://gist.github.com/eabab84e4e02b67cea08
<rails> it's probably something really silly
emsilva has joined #ruby
Morkel has joined #ruby
tchebb has joined #ruby
Amorsen has joined #ruby
mw3kush has quit [Quit: Leaving]
Eldariof-ru has joined #ruby
<vectorshelve> rails: what error are you getting ?
mw3kush has joined #ruby
<rails> I dont even know, it's not telling me
<Amorsen> I'm probably stupid, but in the slice example on http://www.ruby-doc.org/core-1.9.3/String.html, the syntax seems wrong
<rails> it just returns m.reply "Google 2| Error"
<mw3kush> So this is all hacker stuff??
<Amorsen> a[%r[aeiou](.)\11//]
<apeiros_> mw3kush: this is a channel about the ruby programming language
<Amorsen> I am not sure what they are trying to accomplish, but there is at least a / too many
mw3kush has quit [Client Quit]
<bnagy> apeiros_: occasionally %(
<apeiros_> mw3kush: if you're not programming ruby nor intend to start to, then you're probably wrong here.
<vectorshelve> apeiros_: rightly said
<Seabass_> <-- learning Ruby
<Seabass_> <--- "trying"
<bnagy> Amorsen: I think you're right
<bnagy> a[%r/[aeiou](.)\1/, 1] maybe
<bnagy> it's definitely a syntax error as is
Vainoharhainen has joined #ruby
<bnagy> Amorsen: maybe drop a comment on the page, I think that's why the comments function is there
<Amorsen> I think I'll do a bug report like it said at the bottom
jimeh has joined #ruby
<bnagy> rails: modify the code, and above that line in the rescue section put this p $!; puts $@.join("\n")
TechART has joined #ruby
TechART has quit [Changing host]
TechART has joined #ruby
Wiss has quit [Ping timeout: 252 seconds]
<bnagy> rails: then pastie the error - something in the method is raising an exception, but the code as is conceals the error
francisfish has quit [Read error: Connection reset by peer]
francisfish has joined #ruby
<bambanx> anyome can give me a hand here pls : http://pastebin.com/bWGEaZYd
c0rn has quit []
<rails> "[2012/05/24 04:30:34.847] << PRIVMSG -channel- :Google 2| Error"
<graspee> what's the problem
<rails> thats all the output i get
<graspee> sorry that was to bambanx
<graspee> nvm read the top
<bambanx> hey graspee
<graspee> hi
<bnagy> bambanx: uh wat? That code is...I mean... my EYES
<graspee> what's wrong with his code? it looks fine to me. is it too many space to a tab for you?
<bambanx> 1 sec pls
<graspee> it's fine bambanx
<bambanx> each one of my files have this format http://pastebin.com/Z9aQY5B6
<bambanx> and my folder have a lot of this files
<bnagy> use of a class for no reason, while counter < quantity files, File.open(blah). each # I don't even ...
<bambanx> i am finding a way to get this data in one big arrays for work with him later
<shevy> pls use pastie.org or gist github. pastebin really stinks
<Amorsen> bnagy, can I quote your correction in the bug report=
<Amorsen> ?
<bambanx> ok
jgrevich has quit [Ping timeout: 244 seconds]
<bnagy> bambanx: ok, looks like the CSV gem in stdlib will help, for a start
<shevy> pastebin even has ads :(
jeffmess has quit [Quit: Leaving.]
<bnagy> Amorsen: uh, I dunno. I mean mine is one possible correction. %r() works as well etc
<shevy> bambanx you can still use File.readlines on that, and then group every two array members together... 0,1 2,3 4,5
<rails> bnagy: ah, thanks, it's bitly being a tard.
<shevy> it's an odd format though, all those ','
<rails> #<BitlyError: INVALID_URI - '500'>
<rails> :|
jgrevich has joined #ruby
<Amorsen> Hmm, the problem exists in pretty much every regexp example on the page
<bnagy> shevy: that's called 'CSV' my friend
<bnagy> shevy: back before you were born people used to use it as a data serialisation format
<bnagy> can you believe that??
<bambanx> http://pastie.org/3959899 <= mycode my files formats: http://pastie.org/3959901
<bnagy> bambanx: so. You want the contents of every file matching that glob?
noyb has quit [Ping timeout: 245 seconds]
simao has joined #ruby
<bambanx> the thing i think i am not sure if is good or not, is put all content on a big array, e.g in my big arrays 0 element be the content of my first file
<bambanx> if you have other ideas are welcome
workmad3 has joined #ruby
<bnagy> bambanx: why not a Hash fname=>array of arrays ?
<bambanx> i need later work with this data compare sums etc...
TechART has quit [Quit: Leaving]
<bambanx> i dunno how never i used hashes
<bambanx> i will find info
jgrevich has quit [Ping timeout: 240 seconds]
Ferdev has joined #ruby
<bambanx> hash have keys and values?
<bnagy> require 'csv';Dir["c:/order-*.txt"].each.with_object({}) {|fname,hsh| hsh[fname]=CSV.read fname}
<bnagy> or something
fabrice31 has joined #ruby
<bambanx> why is good use cvs?
<bambanx> more easy?
<bnagy> yeah, parsing CSV is its job
<bambanx> cool
<bnagy> sorry you would want fullhsh=Dir[ #rest of that line
<bambanx> i will find a tuto
<bnagy> then like fullhsh['order-2.txt'][0] -> first row of that file
<shevy> fullshiht?
<bambanx> shit? lol
<bambanx> :P
<shevy> wait
<shevy> fllhsh
<shevy> :)
<bnagy> :(
<bnagy> haters
* bnagy sulks
<shevy> I think I skipped on CSV and went straight to yaml
<bambanx> using cvs is more faster i mean performance?
mxweas has quit [Quit: Leaving...]
<bnagy> it's just convenient, and it's in stdlib anyway
<shevy> there is 'fastercvs' I think, a gem
<workmad3> bambanx: be careful... do you mean CSV, or CVS (the second is an old version control system)
<shevy> csv ... cvs...
manizzle has quit [Ping timeout: 244 seconds]
<bambanx> thanks workmad3
<workmad3> shevy: ruby 1.9 has the fastercsv implementation as its csv library :)
<shevy> cool
<Sephi-Chan> Can someone help me to convert these ImageMagick commands into RMagick ones? http://pastebin.com/crsSKJsL
mxweas has joined #ruby
<shevy> Sephi-Chan I thought RMagick died
<workmad3> shevy: nah, that's just what everyone wants :)
<bambanx> Sephi-Chan, pls use http://pastie.org/ i mean my eyes
<bambanx> :)
<Sephi-Chan> I cannot set expiration date with pastie
<bnagy> otherwise it's File.foreach(fname).each {|l| l.split(',')} or something
<Sephi-Chan> The raw is more readable :p
gilead has joined #ruby
<bambanx> there is http://pastie.org/3959935
<Sephi-Chan> Can someone help me to convert these ImageMagick commands into RMagick ones?
<shevy> it is really true... newcomers love pastebin
<Sephi-Chan> :p
<Sephi-Chan> I do like pastie
bamford has quit [Quit: Bye!]
<shevy> Sephi-Chan but you used pastebin too, btw also bambanx did some minutes before :D
<Sephi-Chan> But i like to be able to determine the expiration date
dnyy has quit [Remote host closed the connection]
<bambanx> shevy me? noooo
<bambanx> :P
dnyy has joined #ruby
<shevy> Sephi-Chan, -fill white ... could be
<shevy> canvas = Magick::Image.new(240, 300, Magick::HatchFill.new('white','lightcyan'))
<shevy> not sure about the second parameter, lemme lookup HatchFill
<workmad3> gist ftw!
<shevy> ah, rasterized
<Sephi-Chan> So, would you help me? It would be more useful to me than knowing what paste tool you prefer. :p
<shevy> Sephi-Chan, ok it is not 100% what you need I think, but perhaps you can use 2x white as colour http://rubydoc.info/gems/rmagick/2.13.1/Magick/HatchFill
Urthwhyte is now known as Urth|Away
<Sephi-Chan> Thanks Shevy, I check
<shevy> I kinda stopped using RMagick years ago when the old maintainer quitted
<Sephi-Chan> Do you use something else instead?
tatsuya_o has joined #ruby
<shevy> kinda
<shevy> I use ImageMagick directly now :)))
<Sephi-Chan> With "exec" ?
<shevy> from within ruby scripts. Like I pass it to system()
<Sephi-Chan> Ok
<shevy> I dont do much with it though
<shevy> one script I have is one that autogenerates some text, in different colours, format, and layout
<shevy> heya Seabass_
<Sephi-Chan> In my case, it's used to hide some portion of an image
<shevy> Sephi-Chan can you use system() ?
<Sephi-Chan> (licence plate, personal address, etc.)
<Sephi-Chan> I can
banisterfiend has joined #ruby
<bambanx> gn guys thanks for alll bnagy shevy graspee Alantas Hanmac workmad3 seeya tomorrow
<banisterfiend> bambanx: dream of #ruby
dnyy has quit [Ping timeout: 245 seconds]
Shrink has quit [Ping timeout: 245 seconds]
<shevy> banisterfiend send him your picture of you at the beach
<banisterfiend> shevy: why dont u, your'e the one who took it
<shevy> banisterfiend I don't dare to
<shevy> banisterfiend you scare me :(
bambanx has quit [Quit: Saliendo]
<Hanmac> shevy did you forgot to block him?
<bnagy> banisterfiend: is it normal for pry to take six and a half years to start up?
<banisterfiend> bnagy: no, is this on jruby?
<bnagy> yes
<shevy> Hanmac eh I dont block anyone
<banisterfiend> bnagy: but in jruby, you have to load the jvm too
<Sephi-Chan> shevy: How do you deal with in-memory images while using system ?
<bnagy> *rapt attention* I didn't know that! Tell me more!
<banisterfiend> bnagy: well, how much longer does it take to start pry than an ordinary jruby app
<shevy> Sephi-Chan I kinda cheat. I generate those images into my temp directory and continue to work on these
cantonic has joined #ruby
<bnagy> :) nah it's not too bad, maybe 3 seconds wall for irb and 5 for pry
cha1tanya has quit [Ping timeout: 265 seconds]
<shevy> 5!
<shevy> ARE YOU SAYING THAT PRY IS SLOWER THAN IRB?!?!?!
<bnagy> based on my scientific 'mississippi' benchmarking
<Sephi-Chan> Is there drawbacks doing so?
<bnagy> I would be surprised if image magick didn't support pipes though
<banisterfiend> bnagy: yeah irb is faster cos it doesnt have to load rubygems, which are slow
<bnagy> otherwise it would be useless for batching
<shevy> Sephi-Chan, dunno. I always made those images as I didnt care about space on my hdd anyway, but I dont have that much RAM so I would not really know another way either
yugui is now known as yugui_zzz
<Sephi-Chan> Ok :s
carloshpf has quit [Quit: Saindo]
baroquebobcat has joined #ruby
<Alantas> For basic image manipulation on the command line, I usually use netpnm stuff. jpegtopnm foo.jpg 2>/dev/null | pnmcut 50 500 1440 900 | pnmscale -xysize 1024 1024 | pnmtojpeg -o -q 75 > out.jpg
<shevy> what is that jpegtopnm doing?
<Alantas> Only imagemagick thing I find myself using is plain old `display`, when it doesn't decide to log me out when I try to view a large image. ¬_¬
<Sephi-Chan> I really hate imagemagick/rmagick APIs -_-
<shevy> Sephi-Chan, yeah, especially learning both
<Alantas> shevy: What does (foo)to(bar) do.
<Sephi-Chan> It's so counterintuitive to me
cha1tanya has joined #ruby
<shevy> Alantas hmm it creates a .pnm image?
<Alantas> shevy: Indeed. Where does it go? Can you infer this from how the command is used?
<Hanmac> yeah .. pry is slower ... it needs 2secs ... irb needs zero
Aberen has joined #ruby
<banisterfiend> pry only takes < 1 sec for me
<banisterfiend> but it depends how many pry plugins u have
<shevy> Alantas in memory!
<bnagy> none, I just installed it
<banisterfiend> bnagy: i mean, outside of jruby :P
<bnagy> banisterfiend: mainly to shut you up
<shevy> pffft
<shevy> that wont work bnagy
adambeynon has joined #ruby
<banisterfiend> bnagy: now it'll be the other way round, i wont be able to shut you up raving about it
<Alantas> shevy: It writes it to stdout, where it gets piped into the stdin of the next command (pnmcut, in this case). And so on down the line until the last one, whose stdout is sent to a file.
<banisterfiend> :D jk
<shevy> Alantas hmm but the stdin of the next command, that is held in memory or?
<banisterfiend> bnagy: type this: show-source Pry#repl -l
<Alantas> Now, tell me I didn't have to explain such a basic thing to someone who was rebuking me for not using a Real Man's Linux or whatever.
<Alantas> shevy: I assume so.
cdepue has joined #ruby
<shevy> Alantas I have a bad memory, I couldn't remember all those parameters :)
<bnagy> banisterfiend: ok... it inserts some stupid page break line for now reason :D And it doesn't use my vim colors
<banisterfiend> bnagy: you can turn page breaks off: Pry.pager = false
becom33 has joined #ruby
<shevy> hmm page break
<shevy> my pry still hops to the top left area after enter :(
berserkr has joined #ruby
<becom33> https://gist.github.com/2780352 why am I getting a undefind method at 10: undefined method `add' for Loka:Module (NoMethodError)
<shevy> Alantas, yesterday I found out something odd. did you know that when you set a variable $READLINE, fancy things can happen when you compile something? scripts suddenly assume that this variable points to a readline installation!
<banisterfiend> bnagy: the paging on jruby is only approximate (guess work when to page) since we can't use a proper pager
<shevy> becom33 pls why
<shevy> why
<shevy> whyyyy
<shevy> why do you use @ivars in modules
<becom33> why am I not suppose to ? O_O
<bnagy> banisterfiend: ew fatal readline something somethine
<shevy> becom33 I show you
<becom33> ok
<banisterfiend> bnagy: is this jruby on windows?
<bnagy> on osx
<baroquebobcat> becom33: add is an instance method
<banisterfiend> bnagy: can u gist the error? as i said we haven't tested it extensively on jruby but we haven't had any issues filed either :/
<bnagy> Error: Java package `org.jruby.runtime.builtin' does not have a method `instance_methods'
<bnagy> I haven't installed gist yet :) Baby steps
<shevy> omg
<shevy> instance variables can exist in modules?
visof has quit [Ping timeout: 245 seconds]
cha1tanya has quit [Ping timeout: 265 seconds]
<banisterfiend> bnagy: hmm, what did you do to trigger that?
cdepue has quit [Remote host closed the connection]
<bnagy> hit tab
Solnse has joined #ruby
<banisterfiend> bnagy: what was on the line when u hit tab? (i.e what was it trying to complete)
<shevy> becom33, I just surprised myself
<bnagy> a require command
<shevy> becom33, I surprised myself by realizing that these http://pastie.org/3960025 are basically the same
brianpWins has quit [Ping timeout: 245 seconds]
<becom33> umm ?? :/
cha1tanya has joined #ruby
<bnagy> banisterfiend: ok, vim uses my vim colors for edit-method, so I am happy
baroquebobcat has quit [Quit: baroquebobcat]
<banisterfiend> cool
<becom33> shevy, Im not sure are you been sarcastic or serious
<shevy> becom33 yeah I am very much confused right now
<shevy> becom33 why? I still find it a perversion to define them in a module though
dankest has quit [Read error: Connection reset by peer]
yonggu has quit [Remote host closed the connection]
yonggu has joined #ruby
<shevy> are they really called "class instance variables" ?
cming has quit [Quit: cming]
<banisterfiend> bnagy: anyway if u find any quirks on jruby in general file issues: https://github.com/pry/pry/issues
<banisterfiend> jruby is hard as it actually has a few bugs of its own
ciopte7 has quit [Quit: ciopte7]
<bnagy> banisterfiend: sounds too much like work, I'll just use MRI
Shrink has joined #ruby
<banisterfiend> bnagy: well, it should be mostly ok on jruby, i just dont know as i haven't tested it extensively..however jruby does pass our test suite, which is around 1000 tests, so it can't be *too* bad
berkes has joined #ruby
yeggeps has quit [Read error: Connection reset by peer]
cha1tanya has quit [Quit: Leaving]
Amorsen has left #ruby ["Client exiting"]
<bnagy> how do you show source for private methods? I worked out how to ls them :/
<banisterfiend> bnagy: show-source should work on them too
<bnagy> well... it does, BUT only if you type a method that actually exists
<bnagy> which I think you'll agree is something you need to work on
etehtsea has joined #ruby
<bnagy> I really hate the colorscheme though :(
visof has joined #ruby
<banisterfiend> bnagy: you can tweak that, but you have to use the CodeRay API
<banisterfiend> as we just depute to that gem
clockwize has joined #ruby
pjn_oz has joined #ruby
jayrulez has quit [Ping timeout: 240 seconds]
jbw has quit [Ping timeout: 265 seconds]
tonini has quit [Remote host closed the connection]
<bnagy> does coderay really not have decent colour schemes? You have to manually tweak constants??
<bnagy> wow
nilg` has quit [Remote host closed the connection]
etehtsea has quit [Ping timeout: 249 seconds]
<shevy> I think so
ABK has joined #ruby
<shevy> I even filed an issue month ago... because the dark blue was hard to read when the background was black
<shevy> I use coderay on commandline though, like cat foo.rb | pipe to coderay here and display on terminal in colours
QaDeS has quit [Quit: Ex-Chat]
<banisterfiend> shevy: you should create some new themes for us
<shevy> banisterfiend right now I try to find out how to remove a password from a .pdf file
chrismcg is now known as zz_chrismcg
jbw has joined #ruby
maesbn has quit [Ping timeout: 250 seconds]
webusnix has joined #ruby
dzhulk has quit [Quit: Leaving.]
Tensibai has joined #ruby
<Tensibai> Hi there
<graspee> hi
eurek has joined #ruby
<Tensibai> I just spent 30 min searching but can't find a way: On windows how can I test a CD is in drive before trying to access it (and mostly how to avoid the windows popup "There's no CD in drive [a-z]:" cancel, retry, continue")
<Tensibai> Can someone point me to the right direction ?
nfk has joined #ruby
<banisterfiend> anyone here seen the film called "Hanna" ?
maesbn has joined #ruby
<bnagy> Tensibai: oh, interesting
<Tensibai> Thanks ;)
nipra has joined #ruby
<[Tritium]> check the disk label.
d3c has quit [Ping timeout: 244 seconds]
ramblex has joined #ruby
<Tensibai> I'm fairly new to ruby ..., and was searching about a "drive" object in fact
segora has joined #ruby
<Tensibai> but I probably didn't use the correct keywords for that
trivol has quit [Quit: trivol]
trivol has joined #ruby
<bnagy> [Tritium]: nope, still seems to pop the no disk box
segora has quit [Client Quit]
gyre007 has joined #ruby
trivol has quit [Read error: Connection reset by peer]
d3c has joined #ruby
Solnse has quit [Read error: No route to host]
trivol has joined #ruby
<bnagy> ahhhh, vol I think might work
d3c has quit [Client Quit]
<[Tritium]> sys-filesystem?
<bnagy> Tensibai: try parsing `vol D:` or whatever the drive is
<bnagy> mine says "The device is not ready"
<bnagy> hm actually it dumps that on stderr :S
<bnagy> but if output=`vol d:` == "\n" I think you're good
<bnagy> otherwise maybe popen it
<Tensibai> well I'm maybe missing something so correct me if I'm wrong, but that use a system call (which I would try to avoid), vol or dir would do the same return
<Alantas> Is there a Windows API library for Ruby? Maybe there's something in there.
<[Tritium]> `vol d: 2&>1`
king313 has joined #ruby
king313 has quit [Changing host]
king313 has joined #ruby
<bnagy> [Tritium]: 2>&1 but yeah
pduersteler has quit [Ping timeout: 245 seconds]
<[Tritium]> I always have to look that up when writing jobs
<bnagy> Alantas: yeah there's a ton of windows stuff, but I don't know what API vol is using under the hood
nkts has joined #ruby
<[Tritium]> let me see if i have my windows development stuff still.. if i do I can tell you.... but ironruby would have far easier access to that api
<bnagy> you can try apispy or something if you're ultra set against not using system()
<[Tritium]> ack, dont have it on this box anymore
<Tensibai> hum.. using ruby-wmi gem would help
<Tensibai> It can give drive informations from the system without trying to access the disk so I may be able to check the label
<bnagy> yeah or you can use win32api
<bnagy> or maybe that
<bnagy> hang on, lemme see
<Tensibai> This one looks good ... for me at least
<[Tritium]> wmi...thats enterprise system administration...
dekroning has quit [Ping timeout: 244 seconds]
<bnagy> ahh crap no mscorlib is COM
<banisterfiend> bnagy: r u excited about windows metro
<bnagy> no wmi is built into every windows, in this context
<banisterfiend> since i guess you'll be working on it more than the rest of us
<[Tritium]> bnagy: yeah, but not all of the APIs are exposed on non-enterprise/pro/extreme editions of windows as of late
Morkel has quit [Quit: Morkel]
<Tensibai> Well Win32Logical_Disk is one of core classes
<Tensibai> As far as I'm concerned, its looks enought for my goal :p
<[Tritium]> are you sure that covers removable storage?
<bnagy> Tensibai: looks to me like you use WSH or WMI or win32api (as in that python stackoverflow q)
<Tensibai> [Tritium]: yep
fr0gprince_mac has joined #ruby
<bnagy> personally I would use the win32api approach since I don't trust wmi all that much
<Tensibai> already did in vbs
celm has quit [Remote host closed the connection]
ramblex has quit [Quit: ramblex]
<Tensibai> have to go
<[Tritium]> I worked hard to forget the windows api when windows 8 was revealed - at that moment, i decided to use linux
<bnagy> windows 8 is fairly awesome under the hood, security wise
<bnagy> the UI looks rubbish, but I don't use windows as a desktop os, so
<[Tritium]> and if i could trivially disable the silly UI, I would be gungho on it
yannis has joined #ruby
<[Tritium]> I am not buying new monitors to use my desktop os
mlevin_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<graspee> why would you need to?
gyre007 has quit [Quit: Ex-Chat]
<[Tritium]> no matter what the marketing material says... that is a touchscreen interface, that the mouse was glommed onto. Its built, and most of the features of that ui require the use of capacitive touch screens (not even resistive!), and are cludgey and a lot of extra work with a mouse- instead of giving me the option of using the mouse interface that has worked FINE for 18 years
pduersteler has joined #ruby
wmoxam has joined #ruby
<graspee> i see
visof has quit [Ping timeout: 245 seconds]
<graspee> i'll probably just skip windows 8 unless any new games specifically need it which i don't see happening
<shevy> hehe
<shevy> [Tritium], what is gungho?
<[Tritium]> perhaps a misspelling of a term to express enthusiasem
<Seabass_> gungho -- all out, full in, rippin and roaring and ready to go
<Seabass_> gungho -- gun in hand, ready for action, out for blood
<Seabass_> gungo -- these boots were made for stompin
<Seabass_> hope that helps
<[Tritium]> I was gungho about windows 7... I bought copies of vista oem that came with free copies of 7 before 7 came out - just so i could have it day and date
<shevy> man here I thought you are chinese
<[Tritium]> its a term used in the US marines
<[Tritium]> dont know if that is the source of the term
<[Tritium]> but they do use it
<wmoxam> I still don't get why Vista was considered such a turd vs Win7
<bnagy> ORIGIN World War II: from Chinese gōnghé, taken to mean ‘work together’ and adopted as a slogan by US Marines.
<Seabass_> bnagy I don't trust your source :/
<[Tritium]> Vista ... it was a lot of half compleated ideas with broad ramifications (annoying UAC, UI choices that are unreversable as had been the case in previous windows) that windows 7 refined. UAC in 7 is less ubtrusive, and the ui is more flexible
nirakara has joined #ruby
Guedes_out is now known as Guedes
<shevy> steve ballmer said vista was the greatest release in history
<shevy> now he says the same about win 8
<shevy> can I still believe him?
<graspee> it's like exam results: they just keep getting better
<graspee> i'd like to see a selection of those splash screens you get when you install windows
<graspee> because each one is like: "windows X is faster and easier to use then ever before!"
<vectorshelve> shevy: hai.. shevy wanted to introduce to you one of my friend.. a really talented and excellent ruby programmer hemanth ... he was eager to meet you too :)
<[Tritium]> Ballmer has to apease investors. Yes, Vista made the most money on release as any windows.. it has nothing to do with the OS, and more to do with the fact that in 2007 more computers were purchased than 2001 when xp came out
<vectorshelve> shevy: he has worked on many gems too -> https://github.com/hemanth
<shevy> vectorshelve we need to have you release one gem first :D
<hemanth> shevy, i'm just another silly coder, blogs at http://h3manth.com
<hemanth> shevy, nice to meet you :)
<shevy> cool hemanth
<shevy> unusual blog layout :)
<shevy> like an online newspaper!
<vectorshelve> shevy: I will soon.. I am thinking about one that will reindex models.. :)
seoaqua has quit [Quit: Leaving]
<vectorshelve> shevy: he is cool :)
<shevy> [Tritium] that makes sense
Ferdev has quit [Ping timeout: 244 seconds]
<hemanth> shevy, thanks!
<hemanth> shevy, planning to migrate to jkelly or octopress soon
<[Tritium]> ok, back to the grind (learning ruby for... SHOCK OF SHOCKS! rails)
Ferdev has joined #ruby
<shevy> [Tritium] I think I want from an OS to go out of my way as much as possible when I (try to) work with it and get things done
<shevy> with windows, I felt that often enough there was not a real improve. many innovations, like the ribbon interface, just annoyed me and hindered me
<[Tritium]> shevy: gentoo. once its setup, it is in or out of your way as much as you want :D
Shrink has quit [Ping timeout: 256 seconds]
<shevy> yeah but you are still kinda dependent on other people, like how gnome or kde developers design their DE (if you use either of these two that is)
<shevy> in all the years, I think the only thing that I still really like, despite my occasional rants, is ruby
<[Tritium]> You would be suprised how flexible those are when they are not binary packaging
withnale has quit [Disconnected by services]
withnale_ is now known as withnale
keymone has quit [Read error: Connection reset by peer]
keymone has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
cousine has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
fbernier has joined #ruby
keymone has quit [Client Quit]
<bnagy> [Tritium]: yeah but gentoo sucks donkey balls, sadly
<bnagy> emerge --newuse --reconfigure world # Off for 2 weeks holiday!
uris has joined #ruby
dayanand has joined #ruby
* [Tritium] quirks a brow
dayanand is now known as djd
<bnagy> I used it for years, finally got sick of being kicked in the nuts and went crying to apt
djd is now known as djds4rce
<bnagy> but I still wouldn't use linux as a desktop os :P
djds4rce is now known as djd
<[Tritium]> yeah, that can take a long time... like 35 minute with distcc between my 2 machines, neither of which were powerhouses.
<[Tritium]> be more selective about your software
<bnagy> I'm sure shevy uses arch or slac or something
banisterfiend has joined #ruby
rakm has joined #ruby
<shevy> nah I compile all from source
<shevy> with ruby scripts! but I broke them some weeks ago :(
BiHi has quit [Quit: Computer has gone to sleep]
jadon has quit [Read error: Connection reset by peer]
jadon has joined #ruby
liluo_ has quit [Read error: Connection reset by peer]
<shevy> problem with linux is that the default attitude is to dump everything into /usr
kstephens has quit [Ping timeout: 272 seconds]
BRMatt has quit [Ping timeout: 248 seconds]
Shrink has joined #ruby
Khol has joined #ruby
BRMatt has joined #ruby
kstephens has joined #ruby
<[Tritium]> but thats where non-system specific things go....
<shevy> why
sbanwart has joined #ruby
* bnagy makes "don't get him started!" gestures behind shevy's back
<shevy> :)
<shevy> people need to reason
pdtpatrick_ has joined #ruby
<[Tritium]> cause thats what the file tree spec says. I think there is FAR too much in /bin, /lib and /etc
<shevy> you mean the FHS
<[Tritium]> yeah
pdtpatrick has quit [Read error: No route to host]
pdtpatrick_ is now known as pdtpatrick
<shevy> the FHS even mandates a /usr/X11R6 directory
<[Tritium]> in the root set of dirs, only put the commands and config that the system needs to get the envrionment up, everything else in /usr or /opt
<[Tritium]> but honestly... I would just not care about this IF all the distros did it the same
<shevy> distros can not even use the same scheme to name their -dev packages :(
<shevy> my conclusion is that they purposely like to remain incompatible to one another
<[Tritium]> redhat may have that goal, but i dont see slack or debian ascribing to that
<[Tritium]> redhat has a vested interest in things working on their platfor not working on others
<[Tritium]> platform*
ramblex has joined #ruby
<bnagy> [Tritium]: or, in the case of rhel, not working at all unless you buy a support contract
<shevy> perhaps redhat is worse, I dunno. the LSB extends the FHS for instance, and basically wanted to exclude debian from it. but from an overall point of view, I really think distributions dont like other distributions
liluo has joined #ruby
<shevy> bnagy, sounds like MAFIA practice
<[Tritium]> oh yeah... there is philisophical hate between them
<workmad3> shevy: sounds about right... and they are competitors after all
<shevy> "buy support or it won't work!"
<[Tritium]> iceweasle? Really?
<shevy> hehehe
<shevy> I hate that renaming!
<shevy> I cant even remember why debian had to rename it
<[Tritium]> I hate it cause it actually breaks some extensionss! they check the appname
<[Tritium]> Mozilla had some protections in the license about their trademarks
<[Tritium]> and debian people pitched a fit
<shevy> hmm
<[Tritium]> the protections prevented debian from shipping patches in a timly manor... have you ever known debian to be faster than mozilla at anything?
<shevy> what about google chrome browser, can you use that on debian, or is it renamed too?
maxok has joined #ruby
<shevy> dunno. debian seemed to be the slowest thing that ever existed to me
<shevy> I'd really like to see a linux distribution based entirely around git + github
liluo has quit [Remote host closed the connection]
<shevy> like how the guys with machomebrew update their recipes
<[Tritium]> you could only call your distro firefox if it was on the same codebase, with no excessive patching, debian changed the name... and have not actually patched it ever
<shevy> also, no separation between user and developer. I think everyone should have the same rights, more or less, to modify something (of course the modification must be an improve, no spoilsports assumed here)
<shevy> [Tritium] hmm that means, if there are bugs in firefox, and I distribute that, and if I patch the bugs, I may no longer use the name firefox for the resulting binary?
fmcgeough has quit [Quit: fmcgeough]
<shevy> I really mean only bugs here
<shevy> no "we make 1 million line changes, include trojans, and call that firefox"
<workmad3> shevy: well, if the package management revolved around github, you could fork a package much more easily than currently :)
<[Tritium]> If you find a bug and patch it..and dont submit the bug to mozilla... maybe? mozilla is more woried about breaking compatibility and featuresets
<shevy> I really like the machomebrew thing on github. I use it to see what is new and what I download or update :)
<shevy> "Poppler: Update to 0.20.0" tada, now I know I can update poppler :P
indian has joined #ruby
indian has quit [Changing host]
indian has joined #ruby
<[Tritium]> I just had a frankenstine thought, on a different topic.... You have jruby, and if i understand that correctly, you have access to all the java std lib and any loaded java classes from ruby and vice versa. You have jython which in fact does operate in the way I described.... Could you build a rails controler in python if you hosted on the JVM? hmmmm
<workmad3> [Tritium]: possibly
<[Tritium]> I would only do it to see if i could, not production
<workmad3> just like phuby on phails :)
heftig has quit [Ping timeout: 248 seconds]
<[Tritium]> djrailgo
<workmad3> :D
davidcelis has quit [Read error: Connection reset by peer]
becom33 has quit [Ping timeout: 240 seconds]
berserkr has quit [Quit: Leaving.]
<[Tritium]> My father's employer uses java beacuse they need to use tomcat for their scaleability (they are an enterprise web startup), and I think i have the developers convinced to use a language other than java hosted on the jvm for their code
<banisterfiend> [Tritium]: do they know any othe rlanguages? :)
burgestrand has joined #ruby
<shevy> java - where the money is
<[Tritium]> Most of their devs know a handfull of languages, mostly c, java, and perl. But they know how to -program-. Learning a language is secritarial when you know the principals of programming
<[Tritium]> the quirks of a language will come with use
davidcelis has joined #ruby
sbanwart has quit [Read error: Operation timed out]
<banisterfiend> [Tritium]: not if the language is a different paradigm, like clojure for example
<banisterfiend> or even scala
<banisterfiend> which aren't really OOP
<banisterfiend> you'd have to relearn how to program in the new paradigm
<[Tritium]> beacuse they write their in house tools in perl and c, I think ruby will not be THAT far of a leap... and they know java for the production code
<apeiros_> banisterfiend: while the effort there will be bigger, I think knowing how to program makes it a lot easier too
<shevy> perl!
<shevy> fossil coders
<apeiros_> banisterfiend: after all, lots of the skills of a programmer lies in properly analyzing a problem
<[Tritium]> there is something to be said for a language that has existed since before time itself
<shevy> not if you follow the trend of the hipster coder!
<shevy> they can code while shuffling
maesbn_ has joined #ruby
<[Tritium]> and is ubiqutis on unix(-like) systems
KL-7 has quit [Quit: This computer has gone to sleep]
maesbn has quit [Ping timeout: 245 seconds]
<shevy> ubiq what?
<shevy> you use fancy words man
<shevy> gonghu... ubiquitis
<[Tritium]> and prolly dont spell them correctly, either
<[Tritium]> If you need to count on a scripting language being installed on any unix machine you use... perl is that language, for better or for worse
<[Tritium]> Python is getting there, and ruby is following suit. TCL is loosing this battle
<banisterfiend> [Tritium]: python is pretty much ubiquitous these days too
<shevy> vectorshelve northern UK and scotland can be quite nice. they have interesting castles, they look very different to castles in mainland europe. what I hate in the UK is the weather however
<banisterfiend> Yeah
<shevy> good bye TCL
<[Tritium]> I dont know whay, but nothign in tcl ever made any sense to me
maesbn_ has quit [Ping timeout: 244 seconds]
<banisterfiend> [Tritium]: its a pretty creepy language :P there are keywords to manipulate values further up the call stack
<banisterfiend> so you can play with the local variables of a caller
<[Tritium]> and I thought mutable strings was weird
saschagehlich_ has joined #ruby
iocor has joined #ruby
nirakara has quit [Quit: This computer has gone to sleep]
<[Tritium]> the only thing I dont like about python, and in turn what I like about ruby, is in python they really dont want you to use regex. All the documentation and the books and the like want you to use regex as a last resort. Ruby gives me a literal for em.
zinjacoder has joined #ruby
heftig has joined #ruby
<[Tritium]> Otherwise, I kinda like both, and find that i am using one or the other interchangeably for my utility scripts
zommi has quit [Ping timeout: 260 seconds]
robert_ has quit [Read error: Connection reset by peer]
robert_ has joined #ruby
becom33 has joined #ruby
saschagehlich_ is now known as saschagehlich
<[Tritium]> and i have successfuly distracted myself away from reading this book...AGAIN
<banisterfiend> [Tritium]: the fact that python doesn't really have blocks makes it uninteresting to me, once u get used to block-based programming you dont want to go back to a language that doesnt support them
fbernier has quit [Ping timeout: 245 seconds]
Spring_M_ has joined #ruby
Spring_M_ has left #ruby ["Leaving..."]
cousine has quit [Remote host closed the connection]
nirakara has joined #ruby
<[Tritium]> that is not a design paradigm i have embraced fully. My ruby still kinda looks like standard structures
<bnagy> I don't know if he means as a design thing
<banisterfiend> [Tritium]: yeah, good ruby programming is pretty
irrationalfab has joined #ruby
<bnagy> tactically, we solve a lot of stuff with map each inject etc etc
devsharpen has joined #ruby
<bnagy> but I wouldn't really call that 'design'
davidpk has quit [Quit: Computer has gone to sleep.]
<workmad3> generator functions in python are quite a nice alternative to iterator blocks, but yeah ruby makes using blocks everywhere so nice :)
<workmad3> bnagy: it's a low-level design decision
burgestrand has quit [Ping timeout: 250 seconds]
poppiez has joined #ruby
<workmad3> bnagy: sort of 'tactical design' as it were, rather than strategic :)
BeLucid has quit [Read error: Connection reset by peer]
<[Tritium]> I was about to mention lambdas and generators in python. Its a design philosophy.
BeLucid has joined #ruby
<bnagy> well the new Enumerators are more or less generators
<poppiez> if you have two arrays, how do you loop through both of them? first the first array, then the next while using the same logic inside do and end
noodletraveler has quit [Quit: leaving]
<hoelzro> python lambdas are kinda crippled
<workmad3> poppiez: (ary1 + ary2).each
<apeiros_> poppiez: ary1.zip(ary2) { |a,b|
<bnagy> although I have an actual Generator class that does Fiber based generators, because I miss the ones from 1.8
<apeiros_> oh
<apeiros_> nvm, what workmad3 said
<banisterfiend> apeiros_: ruby 2.0 has Enumerator#+
<poppiez> workmad3: awesome! thx :)
hoelzro is now known as hoelzro|away
<banisterfiend> finally
<workmad3> poppiez: or, alternatively, logic = proc {|i| ...}; ary1.each(&:logic); ary2.each(&:logic)
<poppiez> workmad3: cool, I like the first one the most tho (more simple)
<banisterfiend> workmad3: yo udont want &:logic though :P just &logic
<workmad3> poppiez: second one is a bit uglier, but avoids the creation of an intermediate array (so may be more suitable if you're dealing with huge arrays :) )
<workmad3> banisterfiend: oh, good point
<banisterfiend> too much Symbol#to_proc
<workmad3> banisterfiend: I'm too used to &:func nowadays :)
<banisterfiend> workmad3: did u see ampex?
<workmad3> stupid muscle memory
<workmad3> ampex? don't think so
Morkel has joined #ruby
<poppiez> workmad3: ah. what if we're dealing with hashes? then + won't do it
maesbn has joined #ruby
<banisterfiend> workmad3, apeiros_: http://cirw.in/blog/ampex
<workmad3> poppiez: no, + wouldn't cut it with hashes
iamjarvo has quit [Quit: Leaving.]
<workmad3> poppiez: but you asked about arrays, so I gave you an array solution ;)
<poppiez> workmad3: hehe yeah, but what about hashes then?
zommi has joined #ruby
<poppiez> I need both and just assumed it would work the same way with hashes
burgestrand has joined #ruby
<poppiez> I guess I could just merge the hashes
<workmad3> poppiez: yeah
<apeiros_> banisterfiend: nice idea
<workmad3> poppiez: although that might overwrite values if you have key conflicts
<poppiez> workmad3: true
<workmad3> poppiez: or, you could do [hsh1, hsh2].each{|hsh| hsh.each{|k,v| ...} } with the inner loop containing the shared logic (again, ugly)
<poppiez> that's doable
<poppiez> thx a lot. appreciate your help :)
<workmad3> banisterfiend: that looks fun :)
<banisterfiend> workmad3: yeah it's pretty cute
<apeiros_> or (h1.to_a+h2.to_a).each …, but that's inefficient
maesbn has quit [Read error: Connection reset by peer]
<workmad3> poppiez: basically, there are many ways to separate your feline from its epidermus ;)
<poppiez> haha true
celm has joined #ruby
kpshek has joined #ruby
<vectorshelve> shevy: might go to HongKong Macau with the budget I have :)
<shevy> vectorshelve Hong Kong is cool, if I'd get a job there I'd move any day
<shevy> been there twice so far, is my favourite place in asia too (I have not been to singapore nor macau yet though)
<vectorshelve> shevy: Wooohhh....
<vectorshelve> shevy: conference ?
<shevy> vectorshelve no it was a big world journey with the family during those days
<vectorshelve> shevy: u seem to be very rich :) unlike me :D
iocor has quit [Quit: Computer has gone to sleep.]
skogis has quit [Ping timeout: 252 seconds]
berserkr has joined #ruby
<shevy> Hong Kong has something other big towns (like Shanghai) miss. you go there, and it feels as if something is happening all the time
<shevy> Shanghai felt more like the chinese party saying "look mah, we can rebuild hong kong too"
pac1 has quit [Quit: I got it one line of code at a time]
maesbn has joined #ruby
<vectorshelve> shevy: ncie
<shevy> Beijing was interesting though, we walked through and stopped at some local army headquarters and watched the cops, or whatever those military guys were, perform some wu shu training
<shevy> you dont see these things anywhere in europe :)
<vectorshelve> shevy: nie* which all countries have tyou visited ?
<shevy> but in china, they are like awake early and start sword shadow fighting and tai chi
<shevy> vectorshelve mostly throughout asia. hong kong, beijing, shanghai, malaysia, seoul in korea
burgestrand1 has joined #ruby
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
<shevy> and ko samui, that island near thailand ... but that sucked
<shevy> I should have went to some muay thai guys instead :P
<shevy> vectorshelve I think those default tourist places suck
<shevy> one really should go and talk to the people directly instead
<[Tritium]> Ive been to canada. And only in far enough to go to a strip club (lower legal drinking age than the US)
burgestrand has quit [Ping timeout: 244 seconds]
BiHi has joined #ruby
<shevy> cool
tomb_ has joined #ruby
<vectorshelve> shevy: I am not prefering tour packages that will be boring and less adventourous.. I will go alone
<shevy> [Tritium], I think the only place in the USA I'd like to visit would be california
Boohbah has quit [Remote host closed the connection]
<[Tritium]> funny, thats the only part of the us i wish didnt exist.
Boohbah has joined #ruby
<[Tritium]> well... ONLY is a strong word
<shevy> hehehe
<[Tritium]> washington dc comes to mind
<shevy> really?
<shevy> I dont know much about washington dc
icooba has joined #ruby
<[Tritium]> Im not to fond of alabama either, but that is mostly cause i am forced to live here
CheeToS has quit [Ping timeout: 245 seconds]
visof has quit [Client Quit]
visof has joined #ruby
visof has joined #ruby
visof has quit [Changing host]
<[Tritium]> washington dc is 100% crime. Half the city is a wasteland of murder and rape, the other half is the same, only its not the politicans
<visof> hello
<shevy> [Tritium] hahaha :D
Khol has quit [Quit: Khol]
<shevy> what shall I say. politicans is just a nicer word to name local corruption
<visof> how can i match these strings: foo.bar1.net or bar34.hello.edu or hello.world.fine.anything2 something like that ?
<bnagy> singapore is ok.. I'd probably rather live there than HK, although it's a bit clean
<shevy> bnagy hmm isnt singapore super rich?
<bnagy> visof: you need to explain what aspects of the string you want to match
KL-7 has joined #ruby
<shevy> visof well ... /(\w+)\.(\w+)\.(\w+)/
<bnagy> shevy: nah not really. You can live for cheap or for lots, although accom and especially cars are expensive
<shevy> or something like that
nari has joined #ruby
<bnagy> as an expat it's a lot nicer than KL or bangkok, though :)
Progster has joined #ruby
burgestrand has joined #ruby
<vectorshelve> shevy: scotland is amazing
adambeynon has quit [Quit: adambeynon]
<shevy> hmm
eurek has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
burgestrand1 has quit [Ping timeout: 245 seconds]
<bnagy> hrmmmm not sure I would love to live in scotland for more than a few months
eurek has joined #ruby
nari_ has joined #ruby
<bnagy> ideally between april and august
ipoval has joined #ruby
<shevy> well bnagy you live in exotic places
<shevy> so why not scotland ;P
<bnagy> bad food, bad weather, crime
<[Tritium]> I dont think bnagy likes winter
<[Tritium]> Oh how i miss winter soo
<bnagy> winter is fine, but have you been in scotland in winter? I have :)
<[Tritium]> Have you been to canada in winter?
<[Tritium]> I have
nari has quit [Ping timeout: 250 seconds]
<bnagy> ok I have now tried everything the internet has to offer to fix my openssl with pry
Guest21357 is now known as zii
zii has quit [Changing host]
zii has joined #ruby
<banisterfiend> bnagy: not working?
<[Tritium]> a good blizzard wouild raise my spirits right now
<bnagy> banisterfiend: no, but I am trying to work out how to test net/http first
theRoUS has quit [Ping timeout: 248 seconds]
joukokar_ has quit [Quit: leaving]
joukokar has joined #ruby
<bnagy> banisterfiend: ok, so I can follow http://www.rubyinside.com/nethttp-cheat-sheet-2940.html and get https google
<shevy> visof try .scan
iocor has joined #ruby
<shevy> x = "li192-29.members.linode.com (178.79.136.29) 215.202 ms 115.381 ms "; x.scan /(\w+)\.(\w+)\.(\w+) /
<shevy> # => [["members", "linode", "com"]]
<shevy> depending on what you need exactly
<shevy> visof, you can fine tune your regex online at http://rubular.com/ btw
fermion has joined #ruby
<bnagy> what's wrong with split '.' ?
<visof> shevy, you misunderstand me , i want match these strings
<bnagy> like that regexp only works for a.b.c doesn't it?
<visof> i want regexp that works for a.b.c or a.b.c.d or a.b.c.d.......n
<visof> can i ?
<Tensibai> hum...: /a\.b\.c\.?.*/ ?
zommi has quit [Ping timeout: 252 seconds]
<visof> Tensibai, a and b and c are regexp also
bawer has joined #ruby
<visof> a maybe hello or hello10
<visof> b also maybe foo or foo101
<shevy> he wants a super complicated modular and optional regex
burgestrand has quit [Ping timeout: 244 seconds]
<Tensibai> ho ...
prtksxna has quit [Remote host closed the connection]
<Tensibai> Well what are the cases allowed
<Tensibai> whithout that .. well I've no crystal ball to guess :p
<visof> tenseiten, http://pastie.org/3960637
<bnagy> visof: just match on /\./
tommylommykins has joined #ruby
* tommylommykins waves
<bnagy> visof: then split '.' and grep for your other keywords
<tommylommykins> I'm trying to work out how to convert a string to a case insensitive regexp
<tommylommykins> iirc Regexp.quote forces case sensitivity?
yannis has quit [Quit: yannis]
<banisterfiend> bnagy: are you having fun
burgestrand has joined #ruby
<Tensibai> visof ok but what is the point you want to match axactly, anything telecity*.net ?
<banisterfiend> be naggy
iocor has quit [Quit: Computer has gone to sleep.]
lxsameer has joined #ruby
<visof> Tensibai, nope i want to match anything traceroute get in this format and similar telecity*.net maybe l.ggogle.com
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<bnagy> banisterfiend: ok the gist gem is failing
<bnagy> but net/https seems to work :S
<Tensibai> visof: so you'll have a parameter somewhere, right ?
<banisterfiend> bnagy: what failure on teh gist gem?
tomb_ has quit [Quit: Computer has gone to sleep.]
<banisterfiend> bnagy: they made a change to it recently, there's instructions somewhere
<bnagy> SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
<banisterfiend> oh ok
roolo has quit [Quit: Linkinus - http://linkinus.com]
<banisterfiend> bnagy: why do u want the gist gem so bad
<bnagy> so far I have port installed new openssl, rvm pkg installed openssl and rebuilt ruby and copied cacert.pem to all the ssl dirs I can find on the system
<bnagy> banisterfiend: cause the pry examples use it :P
maxok has quit [Quit: Linkinus - http://linkinus.com]
<banisterfiend> bnagy: yeah it's pretty awesome
<visof> Tensibai, i guess it will be in this format [a-zA-Z0-9]+\.[a-zA-Z0-9]\.[a-zA-Z0-9] this for a.b.c but i'm not sure about that
<Tensibai> welle done this way you'll match members.linode.com too
<visof> if i have a.b.c.d i should repeat it 4 times , is there a repetition in regularexpressions
berkes has quit [Ping timeout: 252 seconds]
<Tensibai> ([a-zA-Z0-9]+\.?){3,n}
`brendan has joined #ruby
<Tensibai> more precisely /^([a-zA-Z0-9]+\.?){3,n}$/
<visof> Tensibai, this will match 3 parts regexp a.b.c ?
<Tensibai> 3 to n iirc
<visof> so 3 is minimum ?
<workmad3> Tensibai: I'd be tempted to do /^([a-zA-Z0-9]+\.){2,n}([a-zA-Z0-9]+)$/
<Tensibai> at least 3, at max n
<banisterfiend> bnagy: wehre are you reading these pry examples btw?
<Tensibai> workmad3: indeed
<workmad3> (otherwise it would also match a.b.c.)
<Tensibai> workmad3: but that's what a dns record would like fully qualified
<bnagy> banisterfiend: the internet. That's not important right now
maesbn has quit [Remote host closed the connection]
<workmad3> Tensibai: :)
<visof> Tensibai, what i should i use to get the matched strings ?
<visof> thanks Tensibai workmad3
<banisterfiend> bnagy: hm just that (but not relevant right now, it's true) the gist-method command has been replaced by a more general 'gist' command
<banisterfiend> but that wont be important until u get it working
geekbri has joined #ruby
<workmad3> on top of that, I'd be tempted to do /^(\w+\.){2,n}(\w+)$/ (that allows _ in the groups too though)
<Tensibai> visof: soory that comes out of my knowledge, really new to ruby, hoppefully regexp are language agnostic (more or less)
fr0gprince_ has joined #ruby
<Tensibai> workmad3: I'm not sure about what covers \w
<workmad3> Tensibai: letters, digits and _ :)
francisfish has quit [Read error: Connection reset by peer]
<Tensibai> so it may be good to add - too
francisfish has joined #ruby
spleeze has quit [Read error: Connection reset by peer]
<visof> Tensibai, so how can i add - too ?
<workmad3> [\w-] instead
<Tensibai> hum: /^([\w-]+\.){2,n}(\w+)$/
<Tensibai> lol too slow
<Tensibai> and didn't do the second part
<workmad3> :)
iamjarvo has joined #ruby
pjn_oz has quit [Read error: Connection reset by peer]
<Tensibai> I've a doubt on allwoed chars for a dns name
<Tensibai> and not curious enought to re-read the RFC
<workmad3> btw, http://rubular.com/ is a great tool for regex
ipoval has quit [Quit: ipoval]
berkes has joined #ruby
<Tensibai> I'm used to rsyslog one ;)
<workmad3> :)
<Tensibai> more application specific but give a good idea of captures
<workmad3> and RFC for domain names is... complicated
<Tensibai> well since they allowed non ascci chars, yes :)
<workmad3> I think it allows - as long as it isn't at the start, and it might disallow -- (can't remember)
<Tensibai> ascii
<visof> workmad3, tenseiten http://pastie.org/3960709
<workmad3> and yeah, it also depends on if you look at the RFC for URIs or for IRIs :)
krusty_ar has joined #ruby
<Tensibai> works as exected visof
<Tensibai> there's only 2 part in the name, not 3
<workmad3> :)
<visof> change 2 to 3
<Tensibai> nope
<workmad3> visof: if you're doing URI parsing too, I highly recommend looking at the uri library in ruby
<Tensibai> the domain in your file is pastie.org
<Tensibai> there only two word if you split on dot
<workmad3> visof: it's... difficult to parse a full URI with just regexes
<visof> Tensibai, i meant to visit the link not this link
<Tensibai> and n should be an integer
<Tensibai> or if no maximum it should be left blank
<workmad3> {2,} works btw
<visof> file is output of traceroute http://pastie.org/3960637
bluenemo has quit [Read error: Connection reset by peer]
[edu] has joined #ruby
<Tensibai> aww sorry misunderstood
<visof> Tensibai, it's okay man i'm who should be sorry
<Tensibai> so probably the n in your code, leave blanck if you have no maximum, or give a value to n
burgestrand has quit [Ping timeout: 245 seconds]
<workmad3> visof: hmm, difficult task with just regex
Jackneill has joined #ruby
<visof> workmad3, so what is the best solution for this
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
burgestrand has joined #ruby
christophe971 has joined #ruby
<workmad3> visof: to distinguish between a domain name and an IP address? not sure
rushed has joined #ruby
<christophe971> Hi guys, quick question: how can I defined a class that acts like "String('abc')" or "Integer(123)" ?
<workmad3> visof: I'd probably start by splitting each line down so you're only working on the second field btw
jayrulez has joined #ruby
<workmad3> visof: and then I'd probably try to filter out anything that looks like a plain IP address or a single *
<workmad3> oh, except you want it from any field other than the first...
<workmad3> ok, so I'd do it field by field and reject things that look like IP addresses, times or * :)
<Tensibai> lol
jbpros_ has joined #ruby
<visof> workmad3, this is hard to do in regexp
jbpros_ has quit [Client Quit]
<Tensibai> parsing a traceroute is quite a pain
<visof> we know the format of the strings i want
<Tensibai> better do it numeric and try to resolve names afterward
burgestrand has quit [Client Quit]
<Tensibai> well, 10.10.10.10 has the same format as what you wish
<Tensibai> so it will be matched
<visof> nope
iocor has joined #ruby
<shevy> why nope?
<Tensibai> Is does match
<matled> christophe971: that's no class, it's a method, e.g. def YourClass(arg); YourClass.new(arg); end
<Tensibai> it is numeric and have more than 3 parts separated by dots
<visof> can we do something like a.b.c and a, b and c should be letters only or letters+digits only ?
<Tensibai> could be
<visof> so this will fix this ?
abra has quit [Quit: Leaving]
<Tensibai> I said could :p
<Tensibai> not sure
joukokar has quit [Quit: leaving]
denysonique has quit [Excess Flood]
devsharpen has quit [Quit: crash]
ABK has quit [Ping timeout: 265 seconds]
<Tensibai> The hard part there is that they could be interpolated, and any part could start with any
<Tensibai> this one works assuming there's no numericaly starting part: /([^0-9][\w-]+\.){2,}([\w-]+)/
<Tensibai> according to rubular ;)
hynkle has joined #ruby
denysonique has joined #ruby
<bnagy> 4chan.org
<Tensibai> I know there's domain starting with a numeric part :/
<bnagy> you can't sensibly do this with regexp
<Tensibai> I see now way neither
<workmad3> visof: no, you can't sensibly do 'this group must contain at least one letter' in regex
<shevy> visof just wants to see a way, but he does not know that there is no way yet
<shevy> visof, what you could do is write a small class that combines regex + your own filter on the input
<vectorshelve> shevy: ruby doesnt have a compiler it has an interpretor ryt which is yarv made of C ?
<workmad3> visof: you need to go onto more powerful languages for that sort of thing (you might be able to do it with lookaround in regex, but lookaround moves regex away from a regular language :) )
<shevy> vectorshelve yarv came only in 1.9.x as far as I know
<workmad3> vectorshelve: compiler/interpreter distinction is fuzzy nowadays :)
<bnagy> this is not a hard problem, it's just hard to do with a positive regexp
<vectorshelve> shevy: so ruby is made of c isnt that true.. and its intepretor is c made
<vectorshelve> shevy: workmad3 ryt ?
<workmad3> vectorshelve: YARV is a JIT compiler and a VM but doesn't save the compiled bytecode
<christophe971> matled: that's awesome, thanks
<bnagy> split on space, take second column, reject things that match (\d+\.)times many reject strings that contain *
niklasb has joined #ruby
<bnagy> done
<workmad3> vectorshelve: is that an interpreter? possibly... is it a compiler? sort of... fuzzy distinction :)
<bnagy> difficulty level: novice
<christophe971> matled: that's a weirdass ruby trick, since YourClass.class == Class
<christophe971> even after you defined the method
<christophe971> but whatever, it works
<christophe971> :)
<akem> if we could compile Ruby easly it could be written in Ruby
<workmad3> bnagy: better explanation of my 'do it field-by-field and reject x,y and z' :)
<bnagy> actually you can safely reject /[\.0-9]*/
<Tensibai> ;o)
<bnagy> and reject /\*/
<workmad3> bnagy: 172ms ;)
mengu has joined #ruby
<bnagy> workmad3: what part of 'take second column' was unclear?
maesbn has joined #ruby
<workmad3> bnagy: one of the domains is in the third column
<workmad3> bnagy: which contains a ms time in other places
<bnagy> workmad3: oooh, crap, yeah ok, but it's max three misses
<Tensibai> not always
<vectorshelve> workmad3: ruby is intepreted (line by line) unlike java which in compiled (whole code into byte code)
<Tensibai> and maybe the 4the or fifth filed
<workmad3> vectorshelve: not quite nowadays
<vectorshelve> shevy: what was it before YARV ?
<workmad3> vectorshelve: YARV nowadays compiles the entire program into bytecode
<Tensibai> (Max retry to icmp echo the hop=
<vectorshelve> workmad3: so u mean ruby isnt interpreted any more ?
<workmad3> vectorshelve: but it doesn't save the bytecode anyway
<workmad3> vectorshelve: it's... fuzzy
<vectorshelve> workmad3: ruby 1.9.3 ?
<workmad3> vectorshelve: and it's not a useful distinction
<vectorshelve> workmad3: then why did I get an error calling a function in line 20 of my ruby class when it implemented functions in line 1 to 10 and the error was that I had a unnecessary symbol above line 20
ronniy has joined #ruby
<bnagy> ok, I'll upgrade to 'easy' cause you have to check more than one column
<Tensibai> lol bnagy
<workmad3> bnagy: it's a pretty simple parser, yes :) it's a bloody nightmare with pure regex
<vectorshelve> workmad3: then we need to compile it each time before running ? isnt that wierd
<workmad3> vectorshelve: I repeat... it's fuzzy and not a useful distinction :)
<Tensibai> bnagy: that said I still don't know what the final purpose os :p
jayrulez has quit [Quit: Leaving]
<bnagy> imho a positive regexp attempt would never* work on all RFC inputs and would be impossible to read
<vectorshelve> workmad3: so what should I beleive about ruby.. interpreted or compiled.. ?? or in the middle :P
irrationalfab has quit [Remote host closed the connection]
<shevy> vectorshelve: interpreted
<workmad3> vectorshelve: it doesn't matter
<shevy> the user will need a ruby binary of some sorts to execute ruby code
<Sephi-Chan> With RMagick, how can I apply a mask on an image so the pixels overlapping with the black area become transparents?
<vectorshelve> shevy: right... then why ppl use this word ruby compiler all the time.. its so misleading isnt it ?
<shevy> still on rmagick ;)
<Tensibai> bnagy: indeed, you may find a readable regexp matching 80% usual cases
<bnagy> like * * is abort and any /[0-9\.]+/ is abort
<Sephi-Chan> Yep, back ^^
<shevy> vectorshelve, you must have read it somewhere
jcromartie has joined #ruby
<workmad3> vectorshelve: it's not a useful distinction these days with the prevalence of VM-based bytecode languages (which don't really fit into the compiled/interpreted binary view of the world)
<vectorshelve> shevy: yes
<shevy> vectorshelve, the internet is a place with lots of greatness and lots of evilness :)
<vectorshelve> workmad3: so what is this ruby binary essentially ?
<bnagy> Tensibai: but the parser is easier to write, read and will always work :)
<workmad3> shevy: by that definition, java is an interpreted language :)
<vectorshelve> shevy: that doesnt answer the question :)
nari_ has quit [Ping timeout: 252 seconds]
<Tensibai> bnagy: I agree
<shevy> workmad3, yeah, the user will need to install java
fowl has quit [Read error: Connection reset by peer]
<vectorshelve> workmad3: naah java is compiled.. mate it compiles once stores the byte code.. and u just execute the class
fowl has joined #ruby
twock has quit [Quit: Lost terminal]
<workmad3> vectorshelve: and hence my answer of 'it's fuzzy' :P
<shevy> vectorshelve, well you still need java or?
<workmad3> vectorshelve: the bytecode needs to be interpreted after all
<vectorshelve> workmad3: I am fuzzing :)
<shevy> "Please install the java runtime."
<shevy> I hate java
dross_ has joined #ruby
lorandi has joined #ruby
<vectorshelve> workmad3: hmmm... theres a point in there
<workmad3> vectorshelve: and when you then get into a JIT hotspot compiler in the VM...
<shevy> but it filled a niche :\
sysbeast has joined #ruby
<vectorshelve> shevy: java is cute.. please dont have hard feelings for JAVA :'( it makes me sad
<bnagy> things that run bytecode are not usually called interpreter
<bnagy> s
<shevy> it's too verbose
ABK has joined #ruby
<vectorshelve> bnagy: but workmad3 just said it interprets the bytecode
<vectorshelve> shevy: if shevy darling is cute then so is JAVA :)
<workmad3> vectorshelve: but was I being flippant with my language there? :)
tomzx has joined #ruby
<bnagy> ok well they are, but they shouldn't be
rakm has quit [Quit: Computer has gone to sleep.]
<vectorshelve> workmad3: u sought of stand for both :P intepreted and compiled.. whereas both doesnt happen in ruby
<shevy> well
gabrtv has quit [Ping timeout: 272 seconds]
<workmad3> vectorshelve: that depends on your runtime
<shevy> just add another definition into it. ruby right now doesn't compile to bytecode
<workmad3> vectorshelve: YARV does indeed do both
<workmad3> shevy: YARV internally compiles to bytecode and runs that bytecode on the VM
tommyvyo has joined #ruby
<workmad3> shevy: as does rubinius, and jruby compiles to JVM bytecode and runs that...
<vectorshelve> shevy: ok.. compiled without bytecode... :) and what was the intepretor/compiler b4 YARV I mean in the begining of ruby
odinswand has joined #ruby
flopper has quit [Ping timeout: 265 seconds]
<vectorshelve> workmad3: there u r atlast... it does it internally :)
<workmad3> what they don't do is have an explicit compilation step beforehand to save the bytecode into a separate file that needs a separate thing to run it...
gabrtv has joined #ruby
<shevy> is anyone even using YARV?
<workmad3> shevy: anyone on 1.9 is
<vectorshelve> workmad3: then what abt interepreted ? so YARV doesnt intepret anymore
<bnagy> which is problematic with dynamic languages :)
<vectorshelve> shevy: how to find my system ruby VM intepreter ? workmad3
<bnagy> YARV does both
<bnagy> read a book!
<shevy> vectorshelve no idea, workmad3 seems to know that thing
<bnagy> Dummies Guide to Compiler Theory
<workmad3> heh
<shevy> perhaps in libruby-static.a
<vectorshelve> workmad3: shevy nice conversation thanks need to leave now catch u guys later.. TC
vectorshelve has quit [Quit: Page closed]
<shevy> or in bin/ruby
<workmad3> heh
pduersteler has quit [Ping timeout: 245 seconds]
<shevy> those two files together have about 5.5 MB here
Axsuul has quit [Ping timeout: 248 seconds]
nari_ has joined #ruby
<workmad3> don't you love it when 1970s distinctions get transplanted into the modern day where they have almost no relevance?
nikhil_ has joined #ruby
wangr has joined #ruby
nirakara has quit [Quit: This computer has gone to sleep]
m_3 has quit [Remote host closed the connection]
flip_digits has joined #ruby
cmarques has joined #ruby
zommi has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
kaktus has quit [Ping timeout: 248 seconds]
stefanp_ has quit [Quit: Linkinus - http://linkinus.com]
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
uris has quit [Quit: leaving]
linus95014 has joined #ruby
fbernier has joined #ruby
<mfridh> Bundler is killing me... trying to add gem 'mysql2', doing bundle install, committing Gemfiles, checking the gemfiles out in production, doing bundle install --deployment... and I get the "You are trying to install in deployment mode after changin ..."
TheHunter_1039 has joined #ruby
<apeiros_> mfridh: didn't you omit the bundle package step?
<mfridh> I did it second time, maybe I need to retry everything from the top again
<mfridh> lt me try
pduersteler has joined #ruby
<mfridh> ok first of all, trying without adding anything. just doing bundle package && bundle install now in the "dev side"
<mfridh> now do I add Gemfile.lock and vendor/cache ?
araujo has quit [Remote host closed the connection]
dcope has left #ruby [#ruby]
<apeiros_> afaik, yes, both
<apeiros_> and I think you have to do bundle install before bundle package
<apeiros_> (not sure whether bundle package would invoke bundle install anyway)
bglusman has joined #ruby
<mfridh> let me try that too because this resulted in same issue. it says I've added and deleted from my Gemfile: * activeresource (< 3.1, >= 2.3.12) added and * activeresource (< 3.1, >= 2.3.12) deleted
<bnagy> ok screw all this
<bnagy> I'll just patch gist to use VERIFY_NONE
<bnagy> it's broken upstream :<
visof has quit [Ping timeout: 245 seconds]
<bnagy> on the plus side, one of the things I tried in my rage was nuking rvm so I have rbenv now :)
<mfridh> apeiros: this is the actual diff of the Gemfile.lock when I do a bundle install and package http://pastie.org/3960943
jimeh has quit [Read error: Operation timed out]
<mfridh> obviously my bundler version switches the order around on the versions
iocor has joined #ruby
dhaskew has joined #ruby
<mfridh> ok works fine if I manuall remove that last diff on the activeresource versions
<mfridh> this seems fucked up
X0n has joined #ruby
maesbn has quit [Remote host closed the connection]
<shevy> good old bundler
<shevy> making people happier ever since
tomzx has quit [Ping timeout: 245 seconds]
<X0n> hi, I upgraded redmine restart mongrel-cluser is ok, and when I try to access redmine mongrel.8000.log gives : http://pastebin.com/Kd7bAj1z it's full of ruby/gems error I don't get
jrist-afk is now known as jrist
<poppiez> I'm creating a Rakefile where an output file can be specified. how do I make sure that the file I create is in the right dir? specifically, how do I handle absolute/relative paths?
ananthakumaran has quit [Quit: Leaving.]
<mfridh> ok now the bundle install works atleast... I have to manually edit that activeresource (< 3.1, >= 2.3.12) every time
<mfridh> now issue is just that the ruby app doesn't find the mysql2 gem even though it's installed .)
CannedCorn has joined #ruby
chson has quit [Remote host closed the connection]
td123 has joined #ruby
nipra has quit [Ping timeout: 252 seconds]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
[edu] has left #ruby [#ruby]
graspee has quit [Quit: time for bed]
cdepue has joined #ruby
lxsameer has quit [Quit: Leaving]
ananthakumaran has joined #ruby
elake has joined #ruby
CptJeanLucPicard has joined #ruby
cousine has joined #ruby
etank has quit [Ping timeout: 276 seconds]
maesbn has joined #ruby
roolo has joined #ruby
<mfridh> ok, seems activeresource was saying mysql2... but in fact, it was missing 'mysql'.
andrewh has joined #ruby
<mfridh> things work now, but bundler makes me want to jump out my 5th story window
vitor-br has quit [Quit: Saindo]
dekroning has joined #ruby
carlyle has joined #ruby
rippa has quit [Quit: derp herp]
ddv has joined #ruby
mohits has joined #ruby
ddv has quit [Changing host]
ddv has joined #ruby
Ferdev has quit [Quit: Ferdev]
<mfridh> how the hell do I get passed that silly thing where my bundle install changes ( >= ver1, > ver2) into ( > ver2, >= ver1 ) and my deployment installs just refuses because of it
dekroning has quit [Client Quit]
dross_ has quit []
KL-7 has quit [Quit: This computer has gone to sleep]
<shevy> mfridh, hehe I know that feeling. been through something a bit different, but also came through bundler. since that day I stopped using it though
<mfridh> must be some diff between my bundler version and the original authors bundler version too, beacuse of the ver1 <=> ver2 reordering
<mfridh> but I just wish I knew how to just get past that issue
ddv has quit [Quit: *poof*]
<shevy> hmm mfridh you could try on #bundler, perhaps someone is awake and able to help
yannis has joined #ruby
<banisterfiend> shevy: sup shev
<shevy> banisterfiend is it time for the beach already? :(
<banisterfiend> shevy: hru
<shevy> there is one thing I dont understand about bundler
<shevy> what does bundler solve what gem fails to solve?
<mfridh> shevy: yeah thanks, will give that a shot. trying a few more things out first
awarner has joined #ruby
dv310p3r has joined #ruby
hoelzro|away is now known as hoelzro
jackiechan0 has joined #ruby
bglusman has quit [Remote host closed the connection]
bglusman has joined #ruby
bglusman has quit [Read error: Connection reset by peer]
blue_ has joined #ruby
blue_ has quit [Client Quit]
<banisterfiend> shevy: cos it ensures the right versions are activated
blue_ has joined #ruby
jgarvey has joined #ruby
<shevy> hmm
<shevy> so you say that bundler has a use case when one wants to switch between different versions
<shevy> otherwise, if one wants to the latest, "gem install rails", should work just fine
<shevy> or lets use a sane example
<shevy> "gem install pry"
ph^ has quit [Read error: Operation timed out]
jackiechan0 has quit [Quit: Sto andando via]
LBRapid has joined #ruby
seanstickle has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
joshman_ has joined #ruby
linus95014 has quit [Quit: linus95014]
eurek has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
[edu] has joined #ruby
[edu] has quit [Client Quit]
igaiga has joined #ruby
dax has quit [Quit: Leaving]
pygospa has quit [Read error: Operation timed out]
jimeh has joined #ruby
pygospa has joined #ruby
dax has joined #ruby
cpruitt has joined #ruby
heftig has quit [Quit: leaving]
[edu] has joined #ruby
lorandi has quit [Quit: Leaving]
lenon has joined #ruby
theRoUS has joined #ruby
jackiechan0 has joined #ruby
<becom33> https://gist.github.com/2781661 I'm getting a error on test_mod.rb 6: uninitialized constant Core (NameError)
andrewh has quit [Ping timeout: 244 seconds]
uris has joined #ruby
<becom33> shevy,
phantasm66 has joined #ruby
<shevy> ugh
<shevy> class vars
<shevy> who is telling you to use these man
friskd has joined #ruby
<shevy> are you sure you get that error
<becom33> yes Im sure
<shevy> when I try to run your code I get Core::Execution
friskd has quit [Client Quit]
<shevy> what file gives that error
<shevy> omg
<shevy> @@prompt = "testagainmodule"
<shevy> pls
andrewh has joined #ruby
<shevy> why do you use class variables becom33
savage- has quit [Remote host closed the connection]
<shevy> also
<becom33> test_mod.rb line 6
<shevy> why is your method called "def initialze"
<becom33> damn it
<shevy> how many times did I tell you already that you need better glasses
<shevy> typically what I do is, when I have a subclass, class Test < Core
<shevy> in initialize, I call super()
<shevy> but I dont use @@class_vars. they are really not needed
<shevy> you already subclass
<shevy> so you dont need anything else other than @ivars here really
lorandi has joined #ruby
<becom33> shevy, but why Im i getting that error
kenperkins has joined #ruby
<shevy> well only reason can be, you dont load the file
<becom33> uninitialized constant Core (NameError)
<becom33> what do you mean
sirdeiu has quit [Ping timeout: 245 seconds]
<shevy> if you would have loaded it, Core would be initialized and known to ruby
<shevy> becom33 you can always test temporarily
<shevy> like, put the content of hashcode.rb into the same other file
<shevy> then rerun
<shevy> then you'll see that Core constant will be known
<becom33> shevy, gimme a second a
elux has joined #ruby
carloslopes has joined #ruby
ph^ has joined #ruby
C0deMaver1ck has joined #ruby
cousine has quit [Remote host closed the connection]
<shevy> becom33, also try to fix all errors as soon as possible
<shevy> sometimes one error can mask another error
mengu has quit [Remote host closed the connection]
kevinbond has joined #ruby
<any-key> indeedibly
<any-key> the trace will unlock all sorts of crazy errors
poppiez has quit [Quit: Lost terminal]
<any-key> it's like a treasure hunt!
stefanp has quit [Ping timeout: 265 seconds]
jonathanwallace has joined #ruby
radic has quit [Remote host closed the connection]
PaciFisT has joined #ruby
nikhil_ has quit [Quit: This computer has gone to sleep]
hoelzro is now known as hoelzro|away
radic has joined #ruby
lxsameer has joined #ruby
cousine has joined #ruby
ElitestFX has joined #ruby
xnm has joined #ruby
C0deMaver1ck has quit [Ping timeout: 240 seconds]
<shevy> :)
tomb_ has joined #ruby
bbttxu has joined #ruby
linoj has joined #ruby
billiamii has joined #ruby
webusnix has quit [Remote host closed the connection]
radic has quit [Disconnected by services]
radic_ has joined #ruby
digitalcakestudi has joined #ruby
crankyco_ has quit [Remote host closed the connection]
radic_ is now known as radic
igaiga has quit [Remote host closed the connection]
hoelzro|away is now known as hoelzro
kpshek has quit []
C0deMaver1ck has joined #ruby
yonggu_ has joined #ruby
crankycoder has joined #ruby
chson has joined #ruby
<Tensibai> (about my CD presence test :) )
eurek has joined #ruby
yonggu has quit [Ping timeout: 245 seconds]
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
indian has quit [Ping timeout: 260 seconds]
omo01 has joined #ruby
nari_ has quit [Ping timeout: 252 seconds]
CheeToS has joined #ruby
[edu] has quit [Quit: [edu]]
jackiechan0 has quit [Ping timeout: 245 seconds]
itnomad has joined #ruby
cousine has quit [Remote host closed the connection]
dv310p3r has quit [Ping timeout: 248 seconds]
bawer has quit [Ping timeout: 252 seconds]
cgag_ has joined #ruby
<omo01> hello, all. I've got a string replacement question that I can't figure out. I'm trying to replace all occurrences of "/" with "\/". http://pastie.org/3961274.
<omo01> I can't get it to work when 'gsub'ing from a variable.
<Alantas> string.gsub('/','\\/')
crankycoder has quit [Read error: Connection reset by peer]
JohnBat26 has quit [Remote host closed the connection]
crankycoder has joined #ruby
<cgag_> not sure why it works for the literal
<cgag_> it seems like it should always have done \\/dev\\/null\\/ to me
kaktus has joined #ruby
<omo01> Alantas: that does not work. string="/dev/null/". string.gsub('/','\\/') returns: "\\/dev\\/null\\/".
<Alantas> Works for me.
<omo01> I need it to return: "\/dev\/null\/"
<omo01> basically: "/dev/null/" becomes "\/dev\/null\/"
punkrawkR has joined #ruby
<Alantas> (Note "output" below the code.)
<cgag_> yeah the repl output shows "\\/dev\\/nul\\/" but if you call puts it'll output what you expect
JohnBat26 has joined #ruby
<Alantas> Oh, yeah, I get it now. You're sending one to puts() and calling .inspect() on the other (irb does that on the values an expression evaluates to), and .inspect() would be escaping your backslashes.
blue_ has quit [Remote host closed the connection]
<Alantas> If you do puts() on both, it should show that it always worked as expected.
<Alantas> Or don't do puts() on either one, and they should still come out the same as each other.
<omo01> Alantas: sweet, thanks. This works: res=(st.gsub('/', '\\/')) puts res: \/dev\/null\/
devsharpen has joined #ruby
benatwork has joined #ruby
bbttxu has quit [Quit: bbttxu]
lorandi has quit [Quit: Leaving]
radic has quit [Read error: Connection reset by peer]
jackiechan0 has joined #ruby
lorandi has joined #ruby
heftig has joined #ruby
ken_barber has joined #ruby
rippa has joined #ruby
museun has joined #ruby
hukl has joined #ruby
abra has joined #ruby
bbttxu has joined #ruby
sysbeast has quit [Quit: Verlassend]
looopy has joined #ruby
mikeycgto has joined #ruby
mikeycgto has joined #ruby
ben_alman has quit [Excess Flood]
andrewhl has joined #ruby
sirdeiu has joined #ruby
jgrau has quit [Remote host closed the connection]
dv310p3r has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
omo01 has quit [Quit: ChatZilla 0.9.87-4.1450hg.fc16 [XULRunner 12.0/20120424094117]]
Drewch has quit [Ping timeout: 245 seconds]
ben_alman has joined #ruby
fearoffish has joined #ruby
zinjacoder has quit [Remote host closed the connection]
ABK has quit [Ping timeout: 256 seconds]
jchauncey has joined #ruby
zinjacoder has joined #ruby
kpshek has joined #ruby
kpshek has quit [Client Quit]
hukl has quit [Quit: Leaving...]
Carson_ has joined #ruby
indian has joined #ruby
lkba has joined #ruby
jackiechan0 has quit [Quit: Sto andando via]
zinjacoder has quit [Read error: Connection reset by peer]
yannis has quit [Read error: Connection reset by peer]
ipoval has joined #ruby
asobrasil has joined #ruby
niklasb has quit [Read error: Connection reset by peer]
niklasb has joined #ruby
yonggu_ has quit [Remote host closed the connection]
yonggu has joined #ruby
jackiechan0 has joined #ruby
wiwillia has joined #ruby
maxok has joined #ruby
kpshek has joined #ruby
zinjacoder has joined #ruby
<Synthead> I'm using Erubis with a helper. In calling Erubis::Eruby.new(), I get undefined local variable or method `statusHtml', but this is defined in my helper. What an I doing wrong?
kpshek has quit [Client Quit]
jonathanwallace has quit [Remote host closed the connection]
<any-key> banisterfiend: helllppppp the edit command in pry with vim ain't working!
mensvaga has joined #ruby
zinjacoder_ has joined #ruby
<banisterfiend> any-key: need more info
<banisterfiend> any-key: did it used to work?
<mensvaga> In an rspec file, what's the syntax for checking if a hash is equal to another hash?
<mensvaga> hash_a.should_equal hash_b?
<any-key> banisterfiend: I have some spare time to dig into pry, there's no customizations and I've never tried the edit command before
Drewch has joined #ruby
<mensvaga> If that's documented somewhere, please tell me how to find it.
<banisterfiend> any-key: can you explain in what way it's not working
<any-key> banisterfiend: it appears saving and quitting vim returns 1
<any-key> "Error: `vim /var/folders/+h/+hp+avbhH-8aDw-Bi9uzNE9RE7g/-Tmp-/pry20120524-390-1b6fdzj.rb` gave exit status: 1"
<banisterfiend> any-key: join #pry
<mensvaga> I've seen things like: some_string.should match <some regex>
pduersteler has quit [Quit: Leaving]
kpshek has joined #ruby
<any-key> that is a swell idea
gyre007 has joined #ruby
<mensvaga> aaaaaaah.
djdb has quit [Remote host closed the connection]
visof has joined #ruby
<mensvaga> hash_a.should eq (hash_b)
artOfWa__ has quit [Ping timeout: 256 seconds]
kpshek has quit [Client Quit]
dv310p3r has quit [Ping timeout: 245 seconds]
schovi has quit [Remote host closed the connection]
artOfWar has joined #ruby
nu7hatch has joined #ruby
jonathanwallace has joined #ruby
gyre007 has quit [Quit: Ex-Chat]
wilmoore has quit [Remote host closed the connection]
amalvagomes has joined #ruby
<amalvagomes> Does anyone know what might cause with_indifferent_access from ActiveSupport to be undefined in reference to relations of a join table?
<any-key> #rubyonrails might be more helpful
<amalvagomes> Thanks!
jcromartie has quit [Quit: jcromartie]
liluo has joined #ruby
linus95014 has joined #ruby
KL-7 has joined #ruby
kpshek has joined #ruby
pawdro has joined #ruby
chienpo has joined #ruby
looopy has quit [Remote host closed the connection]
hakunin has joined #ruby
Sephi-Chan has left #ruby [#ruby]
philcrissman_ is now known as philcrissman
X0n has quit [Quit: Quitte]
mikeg has quit [Read error: Operation timed out]
MasterIdler has joined #ruby
apeiros_ has quit [Remote host closed the connection]
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
looopy has joined #ruby
maxok has quit [Quit: Linkinus - http://linkinus.com]
jrist is now known as jrist-afk
jonathanwallace has quit [Remote host closed the connection]
joukokar has joined #ruby
nilg` has joined #ruby
Aberen has quit [Ping timeout: 248 seconds]
dv310p3r has joined #ruby
hynkle has quit [Quit: hynkle]
zinjacoder_ has quit [Quit: Peace!]
Targen has joined #ruby
pawdro has quit [Read error: Connection reset by peer]
christophe971 has left #ruby [#ruby]
maesbn has quit [Remote host closed the connection]
mikepack has joined #ruby
radic has joined #ruby
hoelzro is now known as hoelzro|away
gift has joined #ruby
hynkle has joined #ruby
andrewh has quit [Quit: Lost terminal]
dv310p3r has quit [Read error: Connection reset by peer]
Krikke has left #ruby [#ruby]
Karmaon has quit [Ping timeout: 276 seconds]
khakimov has joined #ruby
bluOxigen has quit [Ping timeout: 256 seconds]
wvms has quit [Quit: wvms]
<shevy> dumdedum
<shevy> where comes the RubyOS
jcromartie has joined #ruby
<seanstickle> First we need a on-chip ruby
<seanstickle> Then we can build the OS
<any-key> I'd use it
chimkan_ has joined #ruby
<any-key> I'd use the shit out of something like that
Morkel has quit [Quit: Morkel]
<any-key> it could run this window manager: http://subforge.org/projects/show/subtle
kenperkins has quit [Quit: Computer has gone to sleep.]
<seanstickle> monkey patch the kernel scheduler!
<heftig> any-key: probably not. noone's gonna port old crap like X to RubyOS
<RubyPanther> Here comes mRuby, must be time for a brand new RubyOS
devsharpen has quit [Ping timeout: 245 seconds]
ananthakumaran has quit [Quit: Leaving.]
<seanstickle> We had LISP machines. It seems reasonable to have Ruby machines too.
chomp has joined #ruby
artOfWar has quit [Ping timeout: 265 seconds]
<shevy> X is indeed a biggie
<shevy> and not a lot of fun either
<shevy> they split up monolithic x into ... I dont know... 400 sub-packages :(
<RubyPanther> I actually think you could get good performance from an ARM with Ruby if you had a RubyOS that didn't care about running legacy programs, because you could make better use of the registers
<RubyPanther> RiteVM does give you that level of access, too, so mRuby can do this
<any-key> rubyOS would be targeted at web devs
<any-key> all the hipsters with macbooks who code rails stuffs
<any-key> (like me :D)
<RubyPanther> exactly, any RubyOS that was for consumers would probably just suck
<gift> Here's my question, http://pastie.org/3961601 - I'm not even sure what to google
<any-key> it would need to run Chrome
<shevy> well you could just aim for really the simplest thing everywhere
hukl has joined #ruby
<seanstickle> Well, why not have an OS for developers?
<any-key> gift: that is some odd code
<shevy> "this is the editor. it has less features than notepad."
dv310p3r has joined #ruby
<RubyPanther> If you need it to run legacy software, I guarantee you it will be slow for _everything_ including Ruby
<shevy> "this is the IRC xchat client. It is less fancy than irssi."
<seanstickle> We have mathematical notation for mathematicians, we don't try to make it simple and easy for ditch diggers
<any-key> shevy won't like rubyOS, it won't run 1.8
<shevy> oops remove -xchat there
<gift> any-key: forgive it, id ont know what i'm doing really. I'm just hoping there's a solution
<any-key> gift: I don't understand what the question is or what you're truly trying to accomplish
<shevy> any-key, well, if it would run 1.9 it would still be awesome to see :)
<shevy> my biggest obstacle is the amount of work I can see
<any-key> gift: do you want to use the string as an operator?
hukl has quit [Client Quit]
DrShoggoth has joined #ruby
<gift> any-key: its hard to explain, pretty much i just want to be able to cast a string, in this case (greater than) ">" to use as an operator
<gift> any-key: yes exactly
<any-key> aaah
<any-key> okay, so this is indeed interesting
<any-key> 1.send("<", 2)
<shevy> any-key perhaps there could be a VM on it that would run superfast
<any-key> wootwoot
<any-key> gift: .send is your friend
<gift> oh shit
<gift> w00t for any-key. thanks
<RubyPanther> Yugui already said, "Ruby 1.8 has no future"
<RubyPanther> She gave us permission to stop caring about it
<any-key> RubyPanther: that's because it is the future
<shevy> matz said that too
<RubyPanther> No, she said Ruby 2.0 is coming
<any-key> what will 2.0 have?
<seanstickle> Ruby 2.0 is written in Perl 6.
wilmoore has joined #ruby
<any-key> awesome
<seanstickle> So it comes with awesomeness built in
<shevy> any-key more Encoding
<any-key> good.
<RubyPanther> 2.0 will be smaller changes than 1. 8->1.9
<shevy> any-key new features will come into 3.0 though
<seanstickle> Keyword arguments also in Ruby 2.0
<any-key> for a language written by a japanese dood Ruby doesn't have as good of support for encodings as it should
<seanstickle> Which I rather like.
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
<shevy> ah they will never manage to make keyword arguments into 2.0
<seanstickle> shevy: why not?
<RubyPanther> 1.9 was supposed to be 2.0 but they decided it was taking too long, so they gave us the parts that were done already.
<shevy> seanstickle didn't the try this for the last decade already?
<any-key> maybe 2.0 will have multiple inheritance :D
<seanstickle> shevy: well, that's why they call it 2.0
<RubyPanther> They didn't try it, they talked about what they want named arguments to look like. Now they know.
<shevy> but it's like... next year!
<shevy> and 2012 is half way over already
<any-key> ruby 2 will come out when halflife 3 does
<shevy> and GNU Hurd
<any-key> and perl 6
<any-key> lol
<shevy> lol
<shevy> perl 6 _on_ GNU Hurd!
<shevy> I will ask them that :)
<RubyPanther> GNU Hurd and Perl 6 both exist and work, so you could probably run them together... 5 years ago, not to mention, still.
<shevy> RubyPanther wait what
<shevy> you can use both together?
voodoofish430 has joined #ruby
<any-key> GNU Hurd will usher in the year of the Linux desktop
<any-key> it's right around the corner!
<banisterfiend> RubyPanther: hey what's up
test34- has quit [Ping timeout: 252 seconds]
hakunin has quit [Remote host closed the connection]
philcrissman_ has joined #ruby
linus95014 has quit [Quit: linus95014]
lorandi has quit [Quit: Leaving]
<RubyPanther> I was already writing Perl 6 programs when I switched to Ruby in 2004. It is not missing or theoretical, rather, everybody just chooses to still use Perl 5 because Perl 5 was Larry Wall's rewrite or Perl, and Perl 6 was the community's rewrite... and Larry Wall is a better language designer than a committee of his followers
thone has joined #ruby
looopy has quit [Remote host closed the connection]
<shevy> hehe
jonathanwallace has joined #ruby
<shevy> see?
kpshek has quit []
<shevy> languages die without a visionnaire
<any-key> Matz had better live forever
<shevy> hopefully
<shevy> when he is 120 we'll have to put his brain into a jar or something
<any-key> most glorious leader of ruby
Manhose has joined #ruby
albemuth has joined #ruby
<shevy> but in 10 years
<shevy> ruby will be renamed "rails-reloaded" and the binary will be called rruby
<Eiam> chances are, in 10 years no one will be using ruby
<RubyPanther> Matz is young and healthy, we should have decades before we need to make brain pickles
<Eiam> =)
hynkle has quit [Quit: hynkle]
<shevy> Eiam what will be used instead? java?
<Eiam> shevy: nope
celm has quit [Quit: Leaving]
<Manhose> So, guys, considering the fellas at #rails don't really talk, can I ask my question here?
<shevy> HASKELL?
<Eiam> i don't know that what i think would be used in 10 years even exists yet
<any-key> Manhose: #rubyonrails is the active rails channel?
<shevy> Manhose a ruby question sure
<workmad3> Manhose: maybe try #rubyonrails
<Eiam> 10 years is a LONG time in the tech world
<fowl> Manhose, #rubyonrails
<any-key> s/\?//
<workmad3> :)
<Manhose> I'm an idiot
<Manhose> Thanks
<any-key> lol it happens
Vic has joined #ruby
<Eiam> shevy: we could see such a shift in the way technology works in 10-20 years that current languages don't accurately express our desires to these machines
<RubyPanther> The chances that "no one will be using Ruby" in "about 10 years" are the same as the chances that a giant space rock will wipe out human life and there won't be any survivors. 10 years, I'd expect even a Mad Max world to still have a few of us in caves with batteries and bicycle generators plugging away at some Ruby code
visof has quit [Ping timeout: 245 seconds]
heftig has quit [Ping timeout: 245 seconds]
thone_ has quit [Ping timeout: 245 seconds]
<Eiam> RubyPanther: psh, 'no one' isn't meant in the literal sense that not a single person. no one means more like in the general sense
<Eiam> like 'no one' uses ada
looopy has joined #ruby
<shevy> Eiam ah well 10 years
<Eiam> (even though people do) and 'no one' uses cobol.
<shevy> time goes by so quickly
<any-key> we'll be using lisp, as it is the one true language
<Eiam> any-key: DSL's of lisp ha
<any-key> wootwoot
<shevy> I know how lisp will look in 10 years
<Eiam> shevy: *shrug* i've been on IRC for over 10 years
<shevy> (((((((((
<Eiam> so im sure ill be here to find out
<shevy> it has eliminated the meaningless parts between the ((
<any-key> hahaha
<RubyPanther> So if you're a someone, and you're still using it, that doesn't count? No, I think if you close your eyes, we will still be using Ruby... though perhaps, in 10 years, you'll no longer know about it
<shevy> Eiam, I too! I was on mIRC september 2001 and they wrote in IRC that new york was under attack!
<Eiam> '95
<shevy> I also used windows back then... I dunno if I miss windows or not...
<Eiam> was my first year on IRC. been on ever since
kpshek has joined #ruby
heftig has joined #ruby
arturaz has quit [Ping timeout: 245 seconds]
aantix has joined #ruby
<shevy> I think I started around 1997-1999 with the first wave of browsergames
keymone has joined #ruby
<shevy> the classical ones. not today modern html5 super-graphics-everywhere-no-real-meaningful-interaction-with-other-players :(
eywu has joined #ruby
<shevy> we coordinated playing on IRC
<workmad3> I think I used IRC a bit back in 2000, 2001 sort of time, but wasn't a massive user
apeiros_ has joined #ruby
rakm has joined #ruby
niklasb has quit [Ping timeout: 260 seconds]
BiHi has quit [Quit: Computer has gone to sleep]
<Eiam> x-wing brought me to IRC
linus95014 has joined #ruby
<workmad3> xwing :D
milk has joined #ruby
<shevy> hah
<shevy> I remember xwing
<shevy> damn you are all so old!
savage- has joined #ruby
<Eiam> 30 is not that old..
Vic has left #ruby [#ruby]
heftig has quit [Ping timeout: 245 seconds]
<rking> One foot in the grave.
<any-key> dinosaur
<seanstickle> 35 is midlife
<seanstickle> So you're getting close
InfiniteJest has joined #ruby
<any-key> I'm only on IRC to make neckbeards feel old
milk has quit [Client Quit]
mikepack has quit [Read error: Connection reset by peer]
<shevy> from now on I have decided
<shevy> I am 22 if anyone asks
<Hanmac> ha i have a higher lvl then you :P
<seanstickle> At 40, I am made to feel old when I see a saucepan that's been hanging on my kitchen wall, undisturbed, for more years than I was in college.
<seanstickle> People playing video games does not make me feel old. :P
<Eiam> seanstickle: that just means you need to make sauce more often
itnomad has quit [Quit: Leaving]
<seanstickle> Turns out I just boil water a lot.
markjwlee has quit [Ping timeout: 245 seconds]
<seanstickle> And sauces don't come into play much.
<any-key> seanstickle: so, videogames do not make you feel old, but saucepans do?
<any-key> very odd
<seanstickle> any-key: it is a peculiarly specific thing
<workmad3> any-key: it's what happens when you get old :P
pdtpatrick has joined #ruby
<any-key> hahaha
<seanstickle> lol
maletor has joined #ruby
<seanstickle> I suppose I should buy Diablo III
<seanstickle> And see what the fuss is all about.
<any-key> I bet seanstickle is spacing out staring at the saucepan right now
<workmad3> I'm waiting till I can get my hands on the demo before I buy it
<Eiam> TL2 is a 3rd of the price
<workmad3> so I know if my machine can run it :)
<seanstickle> any-key: I just took it off the wall and put it on the stove
<Eiam> and its in open beta right now
<shevy> seanstickle, I played friends with diablo II, but these days, I kinda dont really game anymore
abstrusenick has joined #ruby
<shevy> oops
<seanstickle> any-key: just to prove I can make a difference!
<any-key> hah!
<shevy> i played diablo II with friends... not vice versa
<any-key> it's all an illusion anyways
<rking> shevy: I was wondering.
<shevy> yeah my brain is often in lala land for no real reason
<shevy> I am the first to wonder about it usually
foofoobar has joined #ruby
xnm has quit [Read error: Connection reset by peer]
<shevy> rking I am fighting with libtool again
<any-key> libtool is such a tool
gilead has quit [Quit: Leaving]
<workmad3> shevy: libtool will win and break you
mikeg has joined #ruby
<workmad3> shevy: you may as well give up now :P
<shevy> libtool: link: warning: `/usr/lib/libX11.la' seems to be moved
adeponte has joined #ruby
<any-key> libtool is one of those angry drunks that starts fights for the hell of it
etehtsea has joined #ruby
<shevy> libtool: link: `/usr/lib/libgio-2.0.la' is not a valid libtool archive
<any-key> it also pops its collar
heftig has joined #ruby
<workmad3> any-key: this is libtool: http://www.maniacworld.com/four-popped-collars-cool.jpg
<any-key> haha
<shevy> he looks scary
jonatha__ has joined #ruby
<bnagy> seanstickle: you're 40? pff forget mmorgs
bier has quit [Ping timeout: 252 seconds]
<seanstickle> bnagy: Diablo III is MMORPG?
<bnagy> you're too fat and old and don't have enough free time or bile
<bnagy> buy a nintendo ds or something
jonathanwallace has quit [Read error: Connection reset by peer]
<shevy> Diablo III is kinda its own genre I would say
lenon has quit [Ping timeout: 252 seconds]
<seanstickle> I thought you played alone in Diablo III
<seanstickle> I learn something everyday
<workmad3> diablo 1 and 2 were the original versions of the 'how fast can you click' games
CptJeanLucPicard is now known as enroxorz
<bnagy> everything I know I know from imgur, and it suggests that it's online
<shevy> seanstickle I think you have some merc-friends helping you
<apeiros_> only MORPG, since you can play with 4ppl at max
mikeg has quit [Client Quit]
<shevy> and some huge demons
<shevy> I mean, the demons don't help you
mikeg has joined #ruby
choffstein has joined #ruby
<workmad3> bnagy: is it the 'diablo 2 vs diablo 3' comparison? if so, I think the 'offline mode' was meaning that diablo 3 refuses to work without a net connection :)
<bnagy> workmad3: no I didn't play diablo 2 eiher
<workmad3> bnagy: I was meaning the imgur thing you referred to
<Hanmac> diablo3 is only the graphic ... its like an vnc
<bnagy> I don't play (m)morpgs because I am too old and fat and have not enough free time or bile
<bnagy> workmad3: yeah there were hundreds of images the week it came out
<workmad3> bnagy: yeah, I saw one recently that did a side by side comparison of diablo 3 with diablo 2 (or maybe it was the original... can't remember)... one option was 'offline mode' which older one had but diablo 3 didn't
clockwize has quit [Quit: clockwize]
fabrice31 has quit [Remote host closed the connection]
<bnagy> hmm.. maybe not one to pick up while I'm here in kathmandu then
<shevy> I'd never play a game where I need net connection to play it
<shevy> I mean, as a bought one that is
blacktulip has quit [Remote host closed the connection]
<bnagy> shevy: wait, people play original games?
<bnagy> what new sorcery is this??
<workmad3> heh
<bnagy> this is one of the key reasons I have a wii :)
<workmad3> all this diablo 3 talk has really made me want to play diablo 2 again though :)
<bnagy> I can only buy consoles once they have been out in china for > 6 months
roolo has quit [Quit: Linkinus - http://linkinus.com]
<bnagy> workmad3: elder scrolls II (I think) is free now :)
<bnagy> runs nicely in dosbox / boxer
artOfWar has joined #ruby
senny has quit [Remote host closed the connection]
JonnieCache|home has joined #ruby
binaryplease has joined #ruby
eurek has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
CheeToS has quit [Ping timeout: 240 seconds]
<workmad3> I found out yesterday that GTA 1 and 2 are free now too :)
timonv has quit [Remote host closed the connection]
visof has joined #ruby
<binaryplease> hey guys i need materiak about method chaning, mixed ints, and closures in ruby. can anyone recommand a good explanation/tutorial?
kenperkins has joined #ruby
<binaryplease> *material
jrist-afk is now known as jrist
<rking> binaryplease: Sounds like you want to read Metaprogramming Ruby.
Helius has quit [Remote host closed the connection]
<rking> Not sure about the "mixed ints" part though. What do you mean by that?
francisfish has quit [Remote host closed the connection]
<rking> workmad3: Open-source, too?
<binaryplease> rking: is that a book? im not sure either i want to learn what that is and how it works :D
<shevy> damn it... I just killed some binutils .so libraries and now gcc wont compile anything
cpruitt has quit [Quit: cpruitt]
jenrzzz-mac has joined #ruby
<workmad3> rking: I think they might be
<workmad3> rking: don't know for certain though
<rking> binaryplease: It's a book, yep. The title is accurate but still slightly misleading (it shortsells the scope. It's a good book for understanding the groundwork of pretty much everything in Ruby.)
<rking> shevy: But you're doing all this in a VM, so it's all good. …right?
<banisterfiend> rking: i dont like that the book just invents terms as if they're idiomatic
<rking> banisterfiend: I haven't found one I object to. Any examples?
<banisterfiend> rking: and half those patterns "spells" he introduces aren't even used
<banisterfiend> rking: "ghost methods"
<banisterfiend> is the most offensive
<shevy> rking hmm... almost
<shevy> :)
<rking> Hehe, I'm OK with it. What do you call them?
<binaryplease> okay ill get that then when i start digging deeper. Is there a shorter introduction or something i can read in a few hoursß
<banisterfiend> rking: nothing, i don't need a name for them. I talk about the scope of the method_missing hook
<bnagy> banisterfiend: was (afaict) a bug in the upstream - ie gist
<banisterfiend> rking: i.e method_missing catches everything that starts with an 's' and ends with a 'k' and does something
<bnagy> even once you give it root certs it still doesn't work
ABK has joined #ruby
bier has joined #ruby
<bnagy> I just patched it to VERIFY_NONE :(
<rking> banisterfiend: I think that's inferior to having a name. A bad name is better than nothing, because you can always rename it later if you come up with a better one.
mdw has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
<rking> I've always envied German for its mashedupphraseywords.
<banisterfiend> rking: i disagree, and i've also never ever heard anyone calling them "ghost methods" outside of that guy in that book :)
fowl has quit [Changing host]
fowl has joined #ruby
<rking> banisterfiend: The name has to start somewhere.
<shevy> well time to backup everything, then reinstall...
<Sou|cutter> is it just the name that is annoying?
<bnagy> binaryplease: [1,2,3].map {|i| i.to_f}.inject(:+).floor
<bnagy> method chaining, mixed int / float and closures
<shevy> time to DISCONNECTTTTT
<banisterfiend> rking: have you ever heard anyone use it? :) If it was so useful people would use it, or use something in place of it. The fact that people never actually do is empirical evidence (to me) that such a name isn't even needed
mdhopkins has joined #ruby
shevy has quit [Quit: ""]
<bnagy> thanks, I'm here all week
mucker has joined #ruby
<bnagy> wtf is a ghost method?
<banisterfiend> bnagy: exactly
<rking> banisterfiend: The author of a book is going to spend a disproportionate amount of time dwelling on the concepts of each chapter, so he's naturally going to have more of a need for a term than others.
<Sou|cutter> what is it supposed to be? methods defined from method_missing?
<rking> Sou|cutter: Yep.
lenon has joined #ruby
bglusman has joined #ruby
<binaryplease> bnagy: wow :D ill have to think about that
etehtsea has quit [Read error: Connection reset by peer]
denysonique has quit [Excess Flood]
hadees has quit [Ping timeout: 246 seconds]
keithcelt has joined #ruby
<Sou|cutter> we could call them... method_missing methods
<seanstickle> No
ABK has quit [Read error: Connection reset by peer]
<seanstickle> We had a term at a place I worked called "out of state states"
<seanstickle> Terrible names are born like that
<banisterfiend> rking: also, around 50% of his spells are non-idiomatic, you never even see them anywhere. I just got the impression he was just making stuff up, like he knew the internals of ruby and the underlying concepts but hadn't actually participated in the ecosystem to learn what was idiomatic and what wasn't
binaryplease has quit [Quit: WeeChat 0.3.7]
<seanstickle> Idioms evolve. :)
ABK has joined #ruby
<seanstickle> Otherwise we'd be speaking Latin.
<bnagy> wait... he actually calls them 'spells' ?
<JonnieCache|home> music genre names are like that, the difference between ones invented by artists/fans and ones invented by music journalists needing copy are so blatant.
<Sou|cutter> spells.. is kinda hilarious
denysonique has joined #ruby
<JonnieCache|home> random example: "eskibeat" vs. "post-dubstep"
<rking> But if I had a project that had 3+ places where we used method_missing, and was on a project with 2+ people, the term "Ghost Method" would be useful.
<Sou|cutter> step 1) put on your wizard hat
<JonnieCache|home> which do you think is authentic :)
<rking> banisterfiend: I'd like an example on that one, too, if possible.
mikepack has joined #ruby
<seanstickle> Half the fun of writing a book like that has to be the temptation to create new idioms
<banisterfiend> rking: one sec
<bnagy> rking: it wouldn't be useful, cause if you had any proper ruby devs they would stab you in the face
ABK has quit [Read error: Connection reset by peer]
<seanstickle> Goodness knows that's how we got a lot of English idioms -- from plays and books
<bnagy> and that disrupts meetings
ABK has joined #ruby
kvirani has joined #ruby
CannedCorn has quit [Quit: Computer has gone to sleep.]
<Hanmac> rking ... i call method_missing and its friends Hook-methods
<rking> I'm a fan of terms for things. I even like the use of "spell" rather than the more generic "pattern"/"idiom"/etc.
<rking> Hanmac: Yes, the 13 hook methods of Ruby. =)
<bnagy> :<
<bnagy> ok so I rescued a kitten from being torn apart by a feral dog in the street
<bnagy> I swear to god I will kill it if anyone says 'ghost method' again
CannedCorn has joined #ruby
<bnagy> tbh I dunno if it's going to last the night anyway
<seanstickle> Will you kill the kitten with a ghost method?
<bnagy> BUT you will have that on your consciences
<seanstickle> Or will you use a haunted function?
moshef has joined #ruby
<rking> The poltergeist routine.
<seanstickle> Spirit heuristics!
Hanmac1 has joined #ruby
ABK has quit [Read error: Connection reset by peer]
<Hanmac1> yeah :P the thirdteen undokumented methods
<Sou|cutter> spiritual methods
<Sou|cutter> :)
* bnagy goes to bed, and hopes for a saner world tomorrow
<seanstickle> Dream of occult programming!
<workmad3> bnagy: it will be... I'm going to use all the ghost methods in a single class and unleash it on the world!
Hanmac has quit [Ping timeout: 252 seconds]
<Sou|cutter> workmad3: I think if you use all of the methods in a single class, it summons Matz
<JonnieCache|home> which of us hasnt at some point sacrificed a goat to try and placate a compiler?
Hanmac1 is now known as Hanmac
<LiquidInsect> I ran out of goats, that's why I only use interpreted languages now
ananthakumaran has quit [Read error: Connection reset by peer]
cbuxton has quit [Read error: Connection reset by peer]
cbuxton has joined #ruby
<banisterfiend> rking: http://ducktypo.blogspot.co.nz/2010/08/metaprogramming-spell-book.html well i can see weird stuff already: 'object extension' is a non-idiomatic implementation, with no further info "class extension mixin" is an abuse of the included hook, 'shared scope' is something i've never seen before, and would look to most people like a code smell (im guessing),
<banisterfiend> rking: but they werne't as bad as i remember
<LiquidInsect> omg I hate that "use included to extend something else" thing
<banisterfiend> some of them were ok :)
<JonnieCache|home> shared scope doesnt even make sense to me... does he mean instance_exec and friends? changing the binding?
crankycoder has quit [Remote host closed the connection]
<LiquidInsect> our app uses it frigging everywhere
niku4i has quit [Remote host closed the connection]
ananthakumaran1 has joined #ruby
<banisterfiend> JonnieCache|home: nah he's just constraining locals to a specific scope, so they dont exist outside it
<banisterfiend> it's like a let {} in other languages
looopy has quit [Remote host closed the connection]
<banisterfiend> but rubyists almost never bother with that because our methods are so small
<banisterfiend> we dont need to worry about shadowing locals, typically
lenon has quit [Quit: Leaving]
<banisterfiend> conflicting locals*
<JonnieCache|home> i can see how that might be useful but in most cases a need for that is likely a sign youre Doing It Wrong imo
<billiamii> Anybody aware of any ruby-friendly "review my code" forums/sites/etc?
<Sou|cutter> if you need to do that, something is wrong
<RubyPanther> Quick, somebody implement mRuby on an FPGA
InfiniteJest has quit [Quit: Linkinus - http://linkinus.com]
brianpWins has joined #ruby
<RubyPanther> Now is your chance for fame and glory.
<JonnieCache|home> billiamii: http://refactormycode.com/
zommi has quit [Remote host closed the connection]
jimeh has quit [Ping timeout: 248 seconds]
<JonnieCache|home> actually refactormycode looks like its been taken over by spammers
<banisterfiend> rking: if u want to really learn about ruby internals, read my blog :P
<rking> banisterfiend: Shared scope is ♥ to me. I didn't understand any of the scope stuff until that book.
mdhopkins has quit [Quit: mdhopkins]
chienpo has left #ruby [#ruby]
xnm has joined #ruby
<billiamii> JonnieCache|home, bleh, yeah.
nkts has quit [Remote host closed the connection]
Araxia_ has joined #ruby
davidpk has joined #ruby
lorandi has joined #ruby
artOfWar_ has joined #ruby
looopy has joined #ruby
<rking> banisterfiend: I agree that something like that might be a smell, but the whole reason why their called "smells" not "IMMEDIATE RED FLAGS; STOP PRODUCTION AND WORK ON THIS" is because their tolerable or good in some circumstances.
<rking> s/their/they're
<billiamii> Sou|cutter, That looks cool, but I don't have a specific problem to solve. Just looking to get feedback project-lever code feedback.
<billiamii> level*
Manhose has quit [Ping timeout: 245 seconds]
artOfWar has quit [Ping timeout: 252 seconds]
Vainoharhainen has quit [Quit: Leaving...]
<rking> Sou|cutter: Nice term!
<rking> I love deez termz peepul maek.
becom33 has quit [Ping timeout: 248 seconds]
becom33 has joined #ruby
bosphorus has quit [Remote host closed the connection]
sameerynho has joined #ruby
<banisterfiend> a little dated now but still somewhat true
lxsameer has quit [Ping timeout: 245 seconds]
<rking> banisterfiend: LOL. Nice intro.
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
deobald__ has joined #ruby
<banisterfiend> yeah it needs refactoring ,but the rest of it is ok i think
<rking> Cool. I'll read it.
shadoi has joined #ruby
lorandi has quit [Ping timeout: 244 seconds]
baroquebobcat has joined #ruby
luxurymode has joined #ruby
mneorr has quit [Remote host closed the connection]
mohits has quit [Ping timeout: 245 seconds]
dqminh_ has quit [Remote host closed the connection]
timonv has joined #ruby
theRoUS has quit [Ping timeout: 245 seconds]
Solnse has joined #ruby
demet8 has joined #ruby
yonggu has left #ruby [#ruby]
<rking> Hrm. I have a situation where I'm doing a symlink as a nickname for a thing, and I'm torn between /bin/ln's old new vs. ruby's alias new old
<rking> Named params I guess. =\
<apeiros_> I've never come to terms with rubys alias new old
<rking> apeiros_: Yeah, I was literally typing that I don't know the reasoning on it.
mikepack has quit [Read error: Connection reset by peer]
blacktulip has joined #ruby
beneggett has joined #ruby
fayimora has quit [Ping timeout: 240 seconds]
bluenemo has quit [Remote host closed the connection]
parsifal_ has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
<parsifal_> Is there any way to specify an array in-place, and specify the index I'd like?
<parsifal_> e.g. [4: "fourth"]
fayimora has joined #ruby
<parsifal_> or do I have to do a hash? e.g. {4.to_sym => "whatever"}
kpshek has quit []
<seanstickle> parsifal_: explain more?
StoSun has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<parsifal_> nevermind, I was caught up in Ruby 1.9's new hash symbol syntax sugar
<Mon_Ouie> ary =[]; ary[4] = "fourth"
<parsifal_> I was doing 4: "whatever"
<parsifal_> instead of "4" => "whatever"
<Mon_Ouie> Also, index 4 is the fifth element of an array
<parsifal_> ha! :)
<Mon_Ouie> And you can't skip elements in an array
<parsifal_> Mon_Ouie: Yeah that's what I was gonna end up doing if I didn't figure something out
<parsifal_> okay
adamkittelson has joined #ruby
adamkittelson has quit [Remote host closed the connection]
jgrevich has joined #ruby
adamkittelson has joined #ruby
<rking> Mon_Ouie: Wait, you can't?
<parsifal_> yeah that didn't sound right
<rking> It'll fill in.
<Mon_Ouie> No, you will just get nil elements if you try
<rking> Right.
<parsifal_> it pads in nil
<parsifal_> yeah
<parsifal_> just tried it
visof has quit [Ping timeout: 245 seconds]
<rking> Wher iz the prybot? I demand.
<rking> C'mon guys. I'm staging a #ruby walkout til we get a prybot.
<parsifal_> :)
awarner has quit [Remote host closed the connection]
<parsifal_> what is a prybot? Google doesn't seem to know
<rking> A bot that is actually pry.
trivol has quit [Ping timeout: 244 seconds]
<parsifal_> -____-
JonnieCache|home has quit [Ping timeout: 245 seconds]
* rking puts a popsicle in parsifal_'s longmouth.
<parsifal_> I am the embarrassed
<parsifal_> haha
<parsifal_> I hope it's grape or lime
looopy has quit [Remote host closed the connection]
tatsuya_o has quit [Remote host closed the connection]
<rking> It's both, grime.
<parsifal_> hmm.. I accept
<parsifal_> great name, too
tatsuya_o has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
demet8 has left #ruby [#ruby]
<billiamii> What would the setter for a bit in a fixed num look like? Ex: 8[3] == 1. How can I set a bit by index?
<Hanmac> 8 | 1 << 3
banisterfiend has quit [Ping timeout: 244 seconds]
ramblex has quit [Ping timeout: 265 seconds]
<rking> billiamii: You could define Fixnum#= to be that.
looopy has joined #ruby
banisterfiend has joined #ruby
<Mon_Ouie> billiamii: Hanmac's is to set a bit, to unset it you can a & ~b
aaroncm has joined #ruby
tatsuya_o has quit [Ping timeout: 244 seconds]
simao has quit [Ping timeout: 245 seconds]
<billiamii> Hanmac, rking, Mon_Ouie Thanks :)
bluOxigen has joined #ruby
<rking> billiamii: You should unthank me. I messed it all up.
nu7hatch has quit [Ping timeout: 260 seconds]
DukeDave has joined #ruby
aaroncm has quit [Remote host closed the connection]
<billiamii> rking, unthanked. Couldn't you define []= though?
<rking> I meant []=
<rking> Yeah.
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
hynkle has joined #ruby
<parsifal_> yknow what's cool? yard + guard
ciopte7 has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
<Mon_Ouie> Defining []= wouldn't work, unless you'd use send
<Mon_Ouie> Because you can't change the value of a Fixnum, and #[]= would always return the rhs
Naatan has joined #ruby
abstrusenick has quit [Quit: abstrusenick]
<Naatan> Hi, I moved a Ruby based app (gitorious) from a 64bit server to a 32bit server, it now gives me errors for gems in that application (EKFCKASS64 errors). Is there a simple way to reinstall these gems for 32bit ?
hynkle has quit [Client Quit]
ukwiz has quit [Quit: Leaving]
arcresu has joined #ruby
cout has quit [Quit: leaving]
berserkr has quit [Quit: Leaving.]
aantix has quit [Ping timeout: 260 seconds]
hakunin has joined #ruby
<fowl> Naatan, reinstall them
<fowl> and they will build for your architecture
hakunin has quit [Remote host closed the connection]
linus95014 has quit [Quit: linus95014]
zii has left #ruby ["WeeChat 0.3.7"]
rubava has joined #ruby
looopy has quit [Remote host closed the connection]
rubava has left #ruby [#ruby]
looopy has joined #ruby
nlc has joined #ruby
<digitalcakestudi> if roles was an empty array would unless roles { puts "empty" } put empty?
m_W has joined #ruby
<digitalcakestudi> meaning is an empty array false for unless?
<banisterfiend> digitalcakestudi: no it's not
<banisterfiend> only nil and false are falsey
<banisterfiend> everything else including empty arrays are truthy
<digitalcakestudi> so how should I go about checking an empty array?
<fowl> digitalcakestudi, myarray.empty?
<digitalcakestudi> thank you
<digitalcakestudi> who da thought "empty?"
linus95014 has joined #ruby
timonv has quit [Remote host closed the connection]
irrationalfab has joined #ruby
shadoi has quit [Remote host closed the connection]
tewecske has joined #ruby
kenyabob has joined #ruby
heftig has quit [Quit: leaving]
gnychis has joined #ruby
kevinbond has quit [Quit: kevinbond]
<fowl> digitalcakestudi, empty? also works for strings
<gnychis> is there an easy way to initialize a struct from an array (the array has the exact number of structure members)? I tried MyStruct.new(myary) but that put everything in to the first member
<fowl> MyStruct.new(*myary)
<fowl> will cause myary to expand into arguments
<gnychis> thanks bud!
irrationalfab has quit [Remote host closed the connection]
moshef has quit [Quit: moshef]
arcresu has quit [Quit: Leaving]
seanstickle has quit [Quit: Nihil sub sole novum]
cpruitt has joined #ruby
kvirani has quit [Remote host closed the connection]
Targen has quit [Read error: Operation timed out]
ronniy has quit [Remote host closed the connection]
hynkle has joined #ruby
DukeDave has left #ruby [#ruby]
<billiamii> Mon_Ouie, I can't unset a single bit that way, can I? ex: 10011 &~ 10 === 10000
lorandi has joined #ruby
azm has joined #ruby
<billiamii> errr...
keithcelt has quit [Remote host closed the connection]
aaroncm has joined #ruby
<billiamii> nm, just an order of operations issue.
stkowski has joined #ruby
shevy has joined #ruby
<shevy> test
<shevy> damn it... I am using Konversation ... :(
fukushima has joined #ruby
mw3kush has joined #ruby
parsifal_ has quit [Ping timeout: 245 seconds]
flype has joined #ruby
liluo has quit [Remote host closed the connection]
zaiste has quit [Ping timeout: 244 seconds]
keithcelt has joined #ruby
wereHamster has quit [Ping timeout: 245 seconds]
bbttxu has quit [Quit: bbttxu]
lectrick has quit [Ping timeout: 245 seconds]
Spaceghostc2c has quit [Ping timeout: 244 seconds]
naquad has quit [Ping timeout: 244 seconds]
kenyabob has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
liluo has joined #ruby
irrationalfab has joined #ruby
wereHamster has joined #ruby
kenneth has quit [Quit: kenneth]
jackiechan0 has quit [Ping timeout: 245 seconds]
emmanuelux has joined #ruby
lectrick has joined #ruby
Faris has joined #ruby
moeSeth has quit [Ping timeout: 252 seconds]
naquad has joined #ruby
JC_SoCal has quit [Excess Flood]
cesario has quit [Ping timeout: 252 seconds]
<Naatan> how can I uninstall a bundled gem so that I can reinstall it?
adambeynon has joined #ruby
JC_SoCal has joined #ruby
adambeynon has quit [Client Quit]
adambeynon has joined #ruby
aantix has joined #ruby
<shevy> Naatan: all .gem files that you installed, should be in one dir
<shevy> "gem uninstall NAME" should work to uninstall any given gem
zaiste has joined #ruby
aantix has quit [Read error: Connection reset by peer]
<shevy> I think bundler would offer an uninstall method too
<Naatan> I tried that but it uninstalls the system gem, not the bundled gem
<shevy> aha
<Naatan> nothing in the help for bundler
<shevy> then most likely you have to use bundler
<Naatan> I think I have it though
cesario has joined #ruby
<Naatan> I renamed the bundler folder and ran bundle install, seems to reinstall everything
moeSeth has joined #ruby
aantix has joined #ruby
shadoi has joined #ruby
brngardner has joined #ruby
pedm has joined #ruby
<shevy> well, if bundler does not have it in the help file, try to file an issue on github against bundler. I did so the last time bundler had a problem, they promised to fix it
foofoobar has quit [Quit: Computer has gone to sleep]
aantix has quit [Read error: Connection reset by peer]
kenyabob has joined #ruby
rushed has quit [Quit: rushed]
jackiechan0 has joined #ruby
foofoobar has joined #ruby
<Naatan> thanks, there's probably a workaround though, for now just reinstalling everything will suffice for me
Spaceghostc2c has joined #ruby
aantix has joined #ruby
<pedm> Hi guys. What's a good way to split a hash into two? Right now I am using x.delete_if{|k, v| v.class == Regexp } and a.delete_if{|k, v| v.class == String }
<pedm> to define one of the hashes, but it feels very sloppy because I have to define x and a, even though they are both the same hash to begin with
<mw3kush> How do get your channel to work?anyone?
<shevy> what channel
theRoUS has quit [Ping timeout: 244 seconds]
<mw3kush> The channel that you creat to chat
<mw3kush> Im using limechat client
<mw3kush> But just learning
liluo has quit [Remote host closed the connection]
KL-7 has quit [Ping timeout: 240 seconds]
<mw3kush> i want my chat room to work
<mw3kush> I thought that was what a client was
<mw3kush> To host rooms?
simao has joined #ruby
<shevy> dunno with limechat
<shevy> I usually use xchat
sebastorama has joined #ruby
<shevy> mw3kush: others can join a channel via /j #name_of_channel_comes_here
<shevy> on default freenode, channels like #ruby and others exist
c0rn has joined #ruby
ramblex has joined #ruby
<fowl> pedm, myhash.each { |k, v| if v.is_a?(Regex) then regexhash[k] = v elsif v.is_a?(String) then stringhash[k] = v end }
<pedm> fowl: oh that's great! thank you
<fowl> better that you understand it than it solving your problem
<mw3kush> So every channel i make has to have #ruby for name?
simao has quit [Read error: Operation timed out]
<shevy> mw3kush: no that was just an example
<shevy> mw3kush: you can use any name, only the leading # is important
kenneth has joined #ruby
cmarques has quit [Quit: Computer has gone to sleep]
<gnychis> I can do something like a=0.342523; puts "#{a}" ... however I want to format that output to only include 2 decimal places, how do i do that with puts? or do i need to use printf?
<shevy> mw3kush: I think you should be able to do that. try "/j #test", without the quotes
theRoUS has joined #ruby
sebastorama has quit [Read error: Connection reset by peer]
<fowl> gnychis, use sprintf like functionality, '%02f' % a or soemthing like that
<LiquidInsect> gnychis: "%.2f" % floating_point_number
<mw3kush> Ima go try it
Eldariof59-ru has joined #ruby
fowl has quit [Read error: Connection reset by peer]
Guest38930 has quit [Read error: Connection reset by peer]
fowl has joined #ruby
<gnychis> thanks guys
keithcelt has quit [Read error: Connection reset by peer]
jcromartie has quit [Read error: Connection reset by peer]
keithcelt has joined #ruby
jcromartie has joined #ruby
jgrevich has quit [Read error: Connection reset by peer]
UNIXgod has quit [Read error: Connection reset by peer]
jcromartie has quit [Remote host closed the connection]
UNIXgod has joined #ruby
jgrevich has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
jgrevich has quit [Client Quit]
ElitestFX has quit [Ping timeout: 245 seconds]
devdazed has quit [Ping timeout: 244 seconds]
iamjarvo has quit [Read error: Connection reset by peer]
yeggeps has joined #ruby
kenyabob has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
kenperkins has quit [Ping timeout: 260 seconds]
iamjarvo has joined #ruby
tomb_ has quit [Ping timeout: 244 seconds]
jcromartie has joined #ruby
Tensibai has quit [Ping timeout: 245 seconds]
<mw3kush> So what u told me to put is for the adress bar?
Mchl has quit [Quit: ZNC - http://znc.sourceforge.net]
hayon has joined #ruby
voodoofish430 has quit [Ping timeout: 244 seconds]
araujo has quit [Ping timeout: 240 seconds]
Synthead has quit [Excess Flood]
Boohbah has quit [Ping timeout: 276 seconds]
<shevy> mw3kush: no, just as you type your text in your client, you can use /commands where "commands" is the IRC command
tomb_ has joined #ruby
devdazed has joined #ruby
voodoofish430 has joined #ruby
<shevy> mw3kush: for instance, with "/query fowl" you could start a private chat with fowl here, who is a cool guy
Mchl has joined #ruby
flype has quit [Ping timeout: 252 seconds]
Synthead has joined #ruby
krusty_ar has quit [Ping timeout: 244 seconds]
cgag_ has quit [Remote host closed the connection]
Boohbah has joined #ruby
krusty_ar has joined #ruby
araujo has joined #ruby
emmanuelux has quit [Remote host closed the connection]
flype has joined #ruby
<mw3kush> "/query shevy" testing
<mw3kush> I thought could start a convo like that ha?
ciopte7 has quit [Quit: ciopte7]
<mw3kush> Im trying to learn but this to technical
emmanuelux has joined #ruby
jackiechan0 has quit [Quit: Sto andando via]
<mw3kush> So in command it controls what?
mw3kush has quit [Quit: Leaving]
bluOxigen has quit [Ping timeout: 260 seconds]
looopy has quit [Remote host closed the connection]
statix has quit [Remote host closed the connection]
statix has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
aaroncm has quit [Remote host closed the connection]
looopy has joined #ruby
awarner has joined #ruby
Axsuul has joined #ruby
hynkle has quit [Ping timeout: 244 seconds]
robert_ has quit [Read error: Connection reset by peer]
robert_ has joined #ruby
foofoobar has quit [Quit: bb]
Urth|Away is now known as Urthwhyte
indian has quit [Ping timeout: 244 seconds]
saltnvinegar has joined #ruby
ramblex has quit [Quit: ramblex]
aantix has quit [Ping timeout: 265 seconds]
bawer has joined #ruby
jcromartie has quit [Quit: jcromartie]
ramblex has joined #ruby
enroxorz is now known as CptJeanLucPicard
hynkle has joined #ruby
Criztian has joined #ruby
aaroncm has joined #ruby
bawer has quit [Client Quit]
azm has quit [Ping timeout: 252 seconds]
deobald__ has quit [Ping timeout: 260 seconds]
kil0byte has joined #ruby
shevy has quit [Ping timeout: 260 seconds]
mucker has quit [Quit: leaving]
zastaph has joined #ruby
wonbyte has joined #ruby
JonnieCache|home has joined #ruby
jcromartie has joined #ruby
hayon has quit [Quit: hayon]
hayon has joined #ruby
aantix has joined #ruby
ciopte7 has joined #ruby
aantix has quit [Read error: Connection reset by peer]
sebastorama has joined #ruby
aantix has joined #ruby
harukomoto has joined #ruby
aantix has quit [Client Quit]
heftig has joined #ruby
ddv has joined #ruby
looopy has quit [Remote host closed the connection]
cdepue has quit [Remote host closed the connection]
irrationalfab has quit [Remote host closed the connection]
Vainoharhainen has joined #ruby
tatsuya_o has joined #ruby
burgestrand has joined #ruby
<lectrick> How do I fork an http post call so it won't hold up the handling of my request?
<lectrick> Basically I have logging going to Loggly and I want to fire off the log and then have it be non-blocking
baroquebobcat has joined #ruby
flype has quit [Quit: Computer has gone to sleep.]
KL-7 has joined #ruby
flype has joined #ruby
Vainoharhainen has quit [Client Quit]
cmarques has joined #ruby
awarner has quit [Remote host closed the connection]
niklasb has joined #ruby
kenperkins has joined #ruby
visof has joined #ruby
Snugug has joined #ruby
Snugug has left #ruby [#ruby]
KL-7 has quit [Client Quit]
pting has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
sebastorama has quit [Quit: Computer has gone to sleep.]
pedm has quit [Quit: pedm]
headius has joined #ruby
adeponte has quit [Remote host closed the connection]
fayimora has quit [Quit: Busy…..zzzzz]
Urthwhyte is now known as Urth|Away
banghouse has joined #ruby
zastaph has quit [Ping timeout: 240 seconds]
king313 has quit [Quit: .]
looopy has joined #ruby
coyo has quit [Ping timeout: 248 seconds]
pedm has joined #ruby
pedm has quit [Client Quit]
kvirani has joined #ruby
nlc has quit [Ping timeout: 245 seconds]
trivol has joined #ruby
KL-7 has joined #ruby
mengu has joined #ruby
irrationalfab has joined #ruby
theRoUS has quit [Remote host closed the connection]
krusty_ar has quit [Read error: Connection reset by peer]
awarner has joined #ruby
kirun has joined #ruby
krusty_ar has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
jackiechan0 has joined #ruby
mdw has joined #ruby
CptJeanLucPicard is now known as enroxorz
mdw_ has joined #ruby
robbyoconnor has joined #ruby
Naatan has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
hayon has quit [Quit: hayon]
Criztian has quit [Remote host closed the connection]
eurek has joined #ruby
dnyy has joined #ruby
eurek has quit [Client Quit]
jenrzzz-mac has joined #ruby
Criztian has joined #ruby
mdw has quit [Ping timeout: 245 seconds]
harukomoto has quit [Ping timeout: 245 seconds]
zastaph has joined #ruby
Faris1 has joined #ruby
wangr_ has joined #ruby
wangr__ has joined #ruby
wangr has quit [Ping timeout: 244 seconds]
linus95014 has quit [Quit: linus95014]
looopy has quit [Remote host closed the connection]
Criztian has quit [Ping timeout: 244 seconds]
eric has joined #ruby
Faris has quit [Ping timeout: 250 seconds]
eric is now known as Guest13411
harukomoto has joined #ruby
theRoUS has joined #ruby
JonnieCache|home has quit [Quit: Lost terminal]
schaerli has joined #ruby
bbttxu has joined #ruby
wangr_ has quit [Ping timeout: 260 seconds]
ghanima has joined #ruby
schovi has joined #ruby
timonv has joined #ruby
Guest21949 has joined #ruby
Targen has joined #ruby
aquaranto has joined #ruby
wiwillia has quit [Ping timeout: 240 seconds]
tommylommykins has left #ruby [#ruby]
nicoulaj has joined #ruby
azm has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
visof has quit [Ping timeout: 245 seconds]
linoj has quit [Read error: Connection reset by peer]
theRoUS has quit [Ping timeout: 260 seconds]
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jeebster has joined #ruby
linoj has joined #ruby
<jeebster> hi guys. is it possible to detect if an object contains attributes of another object? looks like I can only call detect on a singular object
cableray has joined #ruby
Jackneill has quit [Ping timeout: 245 seconds]
Morkel has joined #ruby
berkes has quit [Ping timeout: 240 seconds]
linus95014 has joined #ruby
<burgestrand> jeebster: please elaborate
gps has joined #ruby
wonbyte has quit [Read error: Connection reset by peer]
<jeebster> so let's say I have an array a = [1,2,3,4] and b = [4, 5, 6, 7]. I want to see if a shares any attributes which b contains, or vice versa
akem has quit [Ping timeout: 276 seconds]
davidpk has quit [Quit: Computer has gone to sleep.]
<jeebster> basically, is there a way to call detect on a but set the detected object to be b?
<burgestrand> jeebster: what attributes? you mean elements?
<jeebster> yup
<burgestrand> jeebster: and you want the intersection of those arrays? ie. [4] in your example?
<jeebster> yes
<burgestrand> jeebster: a & b
gps has quit [Client Quit]
wonbyte has joined #ruby
ciopte7 has quit [Quit: ciopte7]
lorandi has quit [Quit: Leaving]
<jeebster> so something like a.detect { a & b 4} ?
<burgestrand> No, just a & b, http://19pad.charlie.bz/1436
enroxorz is now known as MissMarch
MissMarch has left #ruby ["Leaving"]
headius has quit [Quit: headius]
<burgestrand> jeebster: ^
wonbyte has quit [Client Quit]
Sou|cutter has quit [Ping timeout: 244 seconds]
<jeebster> ah ok, thanks burgestrand
<burgestrand> :)
<jeebster> is this somewhere in the ruby documentation?
Solnse has quit [Read error: No route to host]
<jeebster> is the ampersand an enumerable module?
<burgestrand> jeebster: it is a method on Array, give me a sec
mw3kush has joined #ruby
kushsmoker has joined #ruby
kil0byte has quit [Remote host closed the connection]
sameerynho has quit [Quit: Leaving]
linus95014 has quit [Quit: linus95014]
<jeebster> ah ok, cool. I think I provided a rather indirect example though. I shouldnt've used an array
baroquebobcat has joined #ruby
looopy has joined #ruby
<jeebster> I'm actually looping through two arrays and I'm looking for the intersection of elements
aaroncm has quit [Remote host closed the connection]
<burgestrand> jeebster: that is what the above example does, perhaps you should show a more true example of what you are trying to do?
<jeebster> unfortunately, I'm doing this in rails so I'm dealing with an array of objects with attributes
stkowski has quit [Quit: stkowski]
Sou|cutter has joined #ruby
alexparker has joined #ruby
<apeiros_> unlike all that other ruby, where the objects don't have attributes… :-p
<alexparker> Hey guys
<apeiros_> hi guy
<jeebster> lol apeiros, I know, I know
<alexparker> I'm making a console utility gem, how can i change the users working directory from inside the gem as a cmd
<kushsmoker> G
harukomoto has quit [Ping timeout: 252 seconds]
<jeebster> I just have to sit down and map out an example
<jeebster> ruby is much more complicated than rails :)
<apeiros_> alexparker: you can't. and that's not because ruby can't, it's because your shell won't allow it.
<alexparker> apeiros_: dang
<alexparker> apeiros_: so it'd be best if i wrote the utility in bash script huh
mikepack has joined #ruby
<apeiros_> all you can do is can change the working directory during the execution of your script
<alexparker> apeiros_: alright. Thanks!
<Mon_Ouie> If you run your shell script in a subshell you'll get the same result
<Mon_Ouie> (You could source it, which wouldn't create a new process)
<apeiros_> was just gonna say
<apeiros_> echo 'cd ..' > up.sh; chmod 0755 up.sh; ./up.sh
<apeiros_> your pwd will stay the same
kushsmoker has quit [Quit: Leaving]
linoj has quit [Quit: linoj]
krz has joined #ruby
linoj has joined #ruby
<alexparker> I will have to source it
<apeiros_> jeebster: rails is ruby… also you might try with the real thing…
<apeiros_> instead of some artificial problem, which then potentially still doesn't cut it.
harukomoto has joined #ruby
mw3kush has quit [Quit: Leaving]
<jeebster> ok, how about this. I have two arrays, both contain objects with ID attributes. If the first array does not contain an object with ID attribute equal to any object's ID attribute in the second array, create a new object
CannedCorn has quit [Quit: Computer has gone to sleep.]
mikeycgto has quit [Remote host closed the connection]
<apeiros_> jeebster: I get the feeling that you're doing something in ruby that your db should do…
<apeiros_> are those objects AR models?
<jeebster> so I have to loop through both sets, but it would be nice if each instance of the first could check the second
<jeebster> apeiros: yes
<jeebster> so basically, I'm trying to create records from an API call and I don't want to duplicate existing records
<apeiros_> and is it indeed the id column on both arrays? or is it id on one and foreign-key on other?
sick_protoman has quit [Read error: Connection reset by peer]
linus95014 has joined #ruby
<jeebster> The tables are not connected. I have a table in my db that holds an ID value to reference the object in another db
<jeebster> I'm using the id to associate the records
<apeiros_> use an exists query
<jeebster> I prefer to keep this in ruby if possible. any other way or must I resort to sql?
<apeiros_> much faster than getting all the records, mapping for their ip, intersecting and checking for emptiness.
Facefox has quit [Ping timeout: 245 seconds]
<jeebster> yes, this is true
<apeiros_> well, what I just said would be a way. but it's stupid.
* apeiros_ is back reading his book
<jeebster> it's going to be hard to translate between JSON and sql though I imagine. I have to substitute a new value for each object in the json collection
<apeiros_> you think translating between json and ruby would be easier?
cj3kim has joined #ruby
<fowl> json <=> ruby is super ez
ezn-01 has joined #ruby
<jeebster> easier, yes. less of a resource hog? no
Facefox has joined #ruby
<apeiros_> fowl: JSON.parse([Date.today].to_json)
* apeiros_ <3 json
donnaR has joined #ruby
<fowl> apeiros_, i use JSON()
<apeiros_> fowl: way to miss the point :-p
<apeiros_> but TIL. didn't know Kernel#JSON
<fowl> what was the point?
<fowl> JSON() works to and from json, tis nice
<apeiros_> run the code?
davidpk has joined #ruby
<yxhuvud> what version do JSON() come with?
<apeiros_> JSON([Date.today].to_json).class # more obvious now?
<apeiros_> gah
<apeiros_> JSON([Date.today].to_json).first.class # more obvious now?
adeponte has joined #ruby
<apeiros_> stupid "top level must be object or array" rule…
<apeiros_> could have been another point to make :-p
ezn-01 has quit [Read error: Connection reset by peer]
<fowl> alright
ddv has quit [Quit: *poof*]
<fowl> still dont see what you're getting at
alexparker has quit [Quit: alexparker]
chimkan_ has quit [Quit: chimkan_]
<apeiros_> you get a string back. not a date.
<fowl> but thats ok, i will still support you and your endeavors
hubble has joined #ruby
<hubble> what to do when using .max_by() and getting undefined method 'split'?
<apeiros_> json is a puny serialization format that can't live without separately known/given metadata
jaystay has joined #ruby
<apeiros_> or alternatively restricts you to like 6 object types
BeLucid has quit [Read error: Operation timed out]
<fowl> hubble, dunno, never heard of max_by()
TobsCore has joined #ruby
<hubble> it's an Enumerable instance method
<apeiros_> hubble: insufficient information
chimkan_ has joined #ruby
<apeiros_> hubble: you're obviously calling split on an object that doesn't have a method 'split'
<hubble> making a gist now
<apeiros_> so check where you call split and check what you have there and what you thought you'd have
<hubble> not directly, I'm not
<hubble> i'll gist
<apeiros_> damit, didn't I want to read a book?
looopy has quit [Remote host closed the connection]
BeLucid has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
<fowl> apeiros_, #ruby is an interactive book
<fowl> book 2.0
<Tasser> your book in teh cloud!
jenrzzz-mac has quit [Quit: jenrzzz-mac]
<apeiros_> I'm a book too! weeeeeeeee!
<hubble> see if that gives enough info...
aaroncm has joined #ruby
jenrzzz-mac has joined #ruby
Eldariof59-ru has quit []
<apeiros_> hubble: you should paste the full backtrace
azm has quit [Ping timeout: 265 seconds]
jenrzzz-mac has quit [Client Quit]
yxhuvud has quit [Ping timeout: 252 seconds]
Emmanuel_Chanel has joined #ruby
<hubble> problem is it doesn't backtrace to my code but i'm certain the issue is in that new line, as that is the only change
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ has joined #ruby
ciopte7 has joined #ruby
<apeiros_> and `services = Service.where_url_matches(params[:host])` is the new line?
iamjarvo has quit [Ping timeout: 252 seconds]
td123 has quit [Ping timeout: 245 seconds]
<hubble> no the new line has a comment under it
<hubble> saying this is the new line
<apeiros_> ah, line 8
linduxed has quit [Ping timeout: 245 seconds]
<apeiros_> and services.first.updated_at works?
<hubble> i'll check!
<hubble> it should, the timestamps are there
<apeiros_> I'd try: services.map(&:updated_at) and see whether that works
<apeiros_> (and whether it indeed returns all dates)
<hubble> k, cool cool
chimkan_ has quit [Quit: chimkan_]
bluOxigen has joined #ruby
<hubble> yep it's returning 2011-11-10 20:32:51 +0000
<apeiros_> oooh
<apeiros_> stupid me
tvw has quit [Remote host closed the connection]
<apeiros_> I bet you want: `response['Last-Modified'] = services.max_by(&:updated_at).updated_at`
<hubble> omg
<hubble> you're probably right
<apeiros_> and I bet `response['Last-Modified'] =` is the culprit
rippa has quit [Ping timeout: 250 seconds]
<hubble> i just realized max_by returns the service
<hubble> not the value
<hubble> doyyyyy
<hubble> nice catch
<apeiros_> just took too long to notice %-(
<hubble> yea it happens
tomb_ has quit [Quit: Computer has gone to sleep.]
<hubble> could probably actually do this... services.collect(&:updated_at).max
<apeiros_> but the backtrace seriously sucks
<apeiros_> hubble: assuming you're using a sane db, you can do the regexp-match in the sql and the max as well
carloslopes has quit [Quit: Leaving]
apok has joined #ruby
<hubble> damn now it's complaining it can't "split" the Time
<hubble> wtheck
<hubble> okayyyy
<apeiros_> it wants a string
<apeiros_> and probably in proper format too
<hubble> right have to call httpdate on it
schaerli has quit [Remote host closed the connection]
tomb_ has joined #ruby
<hubble> yay fixed!
<hubble> thanks for the extra set of eyes
Alantas has quit [Quit: The sum of the universe is zero.]
TobsCore has quit [Ping timeout: 252 seconds]
Bosma has joined #ruby
Bosma has quit [Client Quit]
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
headius has joined #ruby
tomb_ has quit [Quit: Computer has gone to sleep.]
jaystay has quit [Ping timeout: 244 seconds]
one8zero has joined #ruby
jaystay has joined #ruby
savage-_ has joined #ruby
savage- has quit [Read error: Operation timed out]
ghanima has quit [Ping timeout: 244 seconds]
mikepack has joined #ruby
moosya has joined #ruby
kaneda has joined #ruby
mdhopkins has joined #ruby
kaneda is now known as Guest76606
Urth|Away is now known as Urthwhyte
TobsCore has joined #ruby
mdhopkins has quit [Remote host closed the connection]
mdhopkins has joined #ruby
Urthwhyte is now known as Urth|Away
shevy2 has joined #ruby
bbttxu has quit [Quit: bbttxu]
m_W has quit [Ping timeout: 244 seconds]
stephenjudkins has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
timonv has quit [Remote host closed the connection]
flype has quit [Quit: Computer has gone to sleep.]
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
flype has joined #ruby
donnaR has quit [Remote host closed the connection]
shevy2 is now known as shevy
looopy has joined #ruby
<shevy> finally... everything is installed anew again
Foxandxss has joined #ruby
savage-_ has quit [Remote host closed the connection]
davidpk has joined #ruby
one8zero has left #ruby [#ruby]
savage- has joined #ruby
dzhulk has joined #ruby
one8zero has joined #ruby
mlins has quit [Quit: Leaving...]
bbttxu has joined #ruby
LBRapid has quit [Quit: Farewell...]
Araxia_ has quit [Read error: Connection reset by peer]
one8zero has quit [Client Quit]
murrdoc has joined #ruby
one8zero has joined #ruby
deric_skibotn has joined #ruby
<murrdoc> is it appropiate to ask stuff about gem installs in this chan ?
<any-key> surewhynot
<robacarp> murrdoc: I personally don't care...I fight with that all the time...
<murrdoc> hehe it should be a simple thing
albemuth has quit [Ping timeout: 265 seconds]
seanstickle has joined #ruby
<deric_skibotn> Where can I get the rdoc for core Ruby (builtins and stdlib)?
<murrdoc> i did a gem install gdash (https://github.com/ripienaar/gdash)
<murrdoc> i am trying to figure out where it was installed to
jackiechan0 has quit [Quit: Sto andando via]
albemuth has joined #ruby
<murrdoc> any-key: robacarp what you think ?
<any-key> I prefer not to think
<any-key> and I dunno
* murrdoc nods
<murrdoc> cool
<murrdoc> is there a ruby gems chan ?
<murrdoc> or is it the ruby on rails chan ?
<any-key> gems apply to this channel
hynkle has quit [Quit: hynkle]
froy has quit [Quit: kablam!]
Araxia_ has joined #ruby
<murrdoc> where does gem isntall put the files
<robacarp> murrdoc: wow, relax...I have other things to do besides watch the channel...
<robacarp> lemme look
<murrdoc> my bad
<robacarp> are you using rvm?
<murrdoc> nope
burgestrand has quit [Quit: Leaving.]
<robacarp> what ruby are you using?
burgestrand has joined #ruby
<murrdoc> 1.8.7
<any-key> we don't serve your kind here ;)
<robacarp> heh.
<murrdoc> turns out gem env
<murrdoc> lists out all the directories
<murrdoc> i ll dig in from here
<murrdoc> thnx guys
murrdoc has left #ruby [#ruby]
<robacarp> -_-
Facefox has quit []
jarred has joined #ruby
flagg0204 has quit [Quit: leaving]
<ramblex> murrdoc: try `gem contents gdash`
<ramblex> oh he left...
fbernier has quit [Ping timeout: 245 seconds]
<robacarp> I think he realized he could use google to find the answer to his question.
<ramblex> heh
bglusman has quit [Remote host closed the connection]
adambeynon has quit [Quit: adambeynon]
bglusman has joined #ruby
v0n has quit [Quit: Quitte]
s0ber has quit [Read error: Connection reset by peer]
looopy has quit [Remote host closed the connection]
s0ber has joined #ruby
froy has joined #ruby
<shevy> yeah
<shevy> and google doesnt mind that he uses 1.8.7
<shevy> god, I just tried gnome3
<any-key> I like it
tayy has joined #ruby
wiwillia has joined #ruby
<shevy> It completely eliminated my old workflow
linus95014 has quit [Quit: linus95014]
<shevy> any-key, when you have something like gedit open, how many clicks do you need to switch to i.e. gnome-terminal?
<any-key> I don't use it, I'm on OS X, but I enjoyed using it
<shevy> lol
<any-key> I'd use a launcher like gnomedo
<any-key> because clicking is for losers
hubble has quit [Quit: hubble]
flagg0204 has joined #ruby
jenrzzz-mac has joined #ruby
<shevy> if you'd have liked it a lot, you wouldn't be... uhm, I don't know... use a completey different OS :P
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
stewart_ has joined #ruby
bglusman has quit [Ping timeout: 260 seconds]
saltnvinegar has quit [Quit: saltnvinegar]
<any-key> I prefer OS X, but I use all kinds of operating systems and like playing with WMs
mengu has quit [Read error: Connection reset by peer]
<seanstickle> xmonad is some nice stuff
<any-key> that's what I hear
bambanx has joined #ruby
mengu has joined #ruby
<shevy> seanstickle what are you using right now?
<bambanx> hi
<seanstickle> shevy: a Mac.
<bambanx> sup
<seanstickle> shevy: But if I should have been using FreeBSD, I'd use xmonad
<shevy> a mac invasion!
<any-key> this is a ruby channel, rubyists are big on macs
<seanstickle> FreeBSD support for laptops is … spotty
<seanstickle> But otherwise FreeBSD is where I would be
linus95014 has joined #ruby
noganex has quit [Ping timeout: 245 seconds]
geekbri has quit [Remote host closed the connection]
<any-key> OS X is close enough, right? ;)
<shevy> yeah but guys
<shevy> you have a solid OS
<shevy> I am stuck with linux :(
<any-key> linux is solid if you're good at it
<seanstickle> Aw, Linux aint so bad.
<shevy> !!!
<seanstickle> Cheer up, at least it aint Winders
<any-key> I like to think of myself as OS-agnostic
noganex has joined #ruby
<seanstickle> any-key: you lack knowledge of any of them?
<shevy> lol
<any-key> seanstickle: you could say that ;)
eph3meral has joined #ruby
<bambanx> i like debian
scb has joined #ruby
scb has quit [Remote host closed the connection]
Aaton_off is now known as Aaton
<any-key> me too
<seanstickle> Debian is great if you like your OSes at least 4 years old
<seanstickle> Debian-based is preferable.
<any-key> lol
<shevy> if windows wouldnt be so annoying!
<bambanx> when i use debian i install the last software versions i use
tayy has quit [Remote host closed the connection]
<bambanx> which linux os you recommend seanstickle ?
<seanstickle> bambanx: FreeBSD
<seanstickle> :P
<bambanx> i was try to install but i fail
<seanstickle> But no, seriously. Ubuntu server does nicely.
<bambanx> maybe in the future i will try again
<bambanx> i dont like ubuntu
<seanstickle> That's ok. I don't like Gentoo.
<seanstickle> Choice is a nice thing to have.
<shevy> the problem with the distro wars is
<shevy> in the end they still all use the same shit
<shevy> KDE4, GNOME3
ChIcKeNnInJa has joined #ruby
<seanstickle> That's pretty much true of every war.
<shevy> the toolkits are enslaved to the evolution of these two
<seanstickle> The argument is typically about how to arrange those bits.
<bambanx> guys tonight i show you my problem , about get data of some files, bnagy recommend me use fastercsv shevy , for use csv i should convert my .txt files first?
<shevy> the only thing that tries to innovate are the kernel guys
berserkr has joined #ruby
<seanstickle> shevy: and the filesystem people
<seanstickle> shevy: before they kill their spouses
<shevy> lol
<shevy> he must have had some serious temper problems
linoj has quit [Read error: Operation timed out]
<shevy> dont spend too much time before a computer
<ChIcKeNnInJa> Anyone know how I can make a 1.9.2 ruby prgram compatable with 1.8?
<shevy> bambanx I dunno, I dont use csv myself, I use mostly yaml
<bambanx> is easy yaml and works for works with data in array format ?
<shevy> yaml works very well
<shevy> it is also easy, unless you want to store complicated things in it
cpruitt has quit [Quit: cpruitt]
<shevy> but since my golden rule is to keep everything so simple that I never have to think about it, I am fine with it
rbanffy has joined #ruby
<seanstickle> bambanx: just use csv
<seanstickle> bambanx: what format are you getting the files in?
Morkel has quit [Quit: Morkel]
rbanffy has quit [Read error: Connection reset by peer]
rbanffy has joined #ruby
chimkan has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
<bambanx> seanstickle, look i have a folder with a lot of .txt files , each file have this format hthink?tp://pastie.org/3959901 , so my idea is put all this files in one big array and his content of each file is one element of my array , what u t
<bambanx> think?
cpruitt has joined #ruby
itnomad has joined #ruby
headius has quit [Quit: headius]
<bambanx> the data of this files i need compare , do some calcs ....
<seanstickle> bambanx: use csv
<shevy> bambanx you can always load them into one array, then dump into yaml
<shevy> bambanx do you use irb?
<shevy> that can even be solved in irb easily
<seanstickle> bambanx: I can't think of any reason to put them in yaml
brngardner has quit [Remote host closed the connection]
<seanstickle> bambanx: easy to load, and then calculate
brngardner has joined #ruby
amalvagomes has quit [Quit: amalvagomes]
zombor has joined #ruby
<bambanx> no shevy ii dont use i am just stating in ruby , i put my code in my editor and then i run using prompt ruuby myfile.rb
<zombor> should the %Z option on strftime() spit out "CST" or "-6:00" ?
<bambanx> seanstickle, i wanna use fastercsv for now my code is it http://pastie.org/3959899
<shevy> bambanx you should use irb, you can instantly execute ruby code from it
<seanstickle> bambanx: you're using Ruby 1.9 right?
<bambanx> seanstickle, yes
<seanstickle> bambanx: FasterCSV is now part of the standard library and just called "csv"
<bambanx> seanstickle, cool
<seanstickle> bambanx: and enough with the tabs! use 2 spaces for indents
<seanstickle> bambanx: or you will be excommunicated ;)
<ramblex> zombor: %Z should output CST
<bambanx> seanstickle, ok
<bambanx> seanstickle, can you show me how start pls
<ramblex> zombor: %z should output -6:00
joshman_ has quit [Ping timeout: 260 seconds]
<zombor> ramblex: which one is it? :)
<bambanx> seanstickle, is necesary convert fisrts my .txt files?
<Seabass_> good morning/afternoon
<seanstickle> bambanx: so you want to load the file and then do what? (no you don't need to convert anything)
<zombor> oh
<bambanx> seanstickle, i mean convet to csv
<zombor> %z outputs -0600
<seanstickle> bambanx: it already IS a csv
<seanstickle> bambanx: a series of values separates by commas
<ramblex> ah, %:z then
brngardn_ has joined #ruby
jetblack has quit [Quit: leaving]
<Seabass_> comma seperated values
<bambanx> seanstickle, all this files each content of each one is a big array likek i linked , so i wanna work with this data, e.g. compare values, which > or < , make sum ....
brngardner has quit [Read error: Connection reset by peer]
<seanstickle> bambanx: you may wish to put a header row in the file, for convenience
<bambanx> seanstickle, it have
Vert has quit [Ping timeout: 252 seconds]
banseljaj is now known as imami|afk
<seanstickle> bambanx: sorry, you'll need to rewrite that; i can't parse the english.
taterbase has joined #ruby
zastaph has quit []
<bambanx> seanstickle, look this pls http://pastie.org/3963157
<seanstickle> bambanx: ah, great
<seanstickle> bambanx: have you read the csv docs?
<bambanx> seanstickle, all this files haave this format
<bambanx> seanstickle, no my english suck and i am finding the way to start
<seanstickle> bambanx: Do you have a terminal open?
<bambanx> seanstickle, yeah
<seanstickle> bambanx: run "rib"
<seanstickle> Sorry
<seanstickle> "irb"
chimkan has quit [Quit: chimkan]
<bambanx> irb(main).....
<seanstickle> Have you used irb before?
<bambanx> seanstickle, no just u use sublime text and pressing f7 run my code or direct on the prompt (windows)
<seanstickle> Ok. Are you in the same directory as your csv files?
<bambanx> seanstickle, no i use a path and my files are .txt no csv
noganex has quit [Read error: Operation timed out]
<seanstickle> bambanx: first point -- the files ARE csv files, even if they have "txt" extensions
<seanstickle> bambanx: files are defined by the contents, not the names
<bambanx> seanstickle, ok
<seanstickle> bambanx: next, type "quit" and enter.
<seanstickle> then cd to wherever your csv files are
<bambanx> ok
<seanstickle> Then run irb again
elux has quit [Quit: Bye!]
<bambanx> ready seanstickle
phantasm66 has quit [Quit: *sleeeeep*]
<seanstickle> require "csv" <- type that and enter
<bambanx> true
<seanstickle> Now type this, where "filename" is the full name of one of your csv files:
<seanstickle> csv = CSV.open(filename, :headers => true)
<ramblex> zombor: odd, %Z works for Time.now.strftime('%Z') but not for Date or DateTime
<zombor> ramblex: yes, i get it with that
<eph3meral> ramblex, works fine for me
<eph3meral> DateTime.strptime('2005-01-25 08:30:22 +2', '%Y-%m-%d %H:%M:%S %Z')
blacktulip has quit [Remote host closed the connection]
<bambanx> seanstickle, i minute pls the name of the files are very big
<ramblex> eph3meral: Date.new(2001, 2, 3).strftime('%Z') #=> "+00:00"
<ramblex> I would expect that to return GMT
chomp has quit [Quit: Leaving]
<eph3meral> and +0 is not GMT?
<ramblex> it is, but what's the point of having %z and %Z then
chson has quit [Remote host closed the connection]
<eph3meral> ramblex, have you actually read the docs?
<ramblex> %Z - Time zone abbreviation name
jaystay has quit [Quit: jaystay]
libertyprime has quit [Quit: Lost terminal]
<zombor> %Z outputs GMT for the Time class
<eph3meral> ahh, yes I see, i was mistaken, ignore me
<zombor> but not DateTime
<eph3meral> also, i was going to mention that I don't know, but I wouldn't expect Date to properly handle various time related stuff
<eph3meral> that's what Time (and or DateTime) is for
ph^ has quit [Remote host closed the connection]
schovi has quit [Remote host closed the connection]
taterbase has quit [Quit: Computer has gone to sleep.]
jrist is now known as jrist-out
libertyprime has joined #ruby
mdw_ has quit [Remote host closed the connection]
<zombor> even something like .to_time.strftime('%Z') doesn't seem to work
phantasm66 has joined #ruby
<ramblex> which version of ruby are you using?
<zombor> this does though: Date.new(2001, 2, 3).to_time.strftime('%Z')
<zombor> weird
<zombor> 1.9.3
harukomoto has quit [Ping timeout: 244 seconds]
nicoulaj has quit [Remote host closed the connection]
<bambanx> seanstickle, if my file name have spaces i should use ' ' ?
<seanstickle> You should use quotes regardless
zinjacoder has quit [Quit: Peace!]
iamjarvo has joined #ruby
<bambanx> seanstickle, quotes = ' ' or " " ?
test34- has joined #ruby
<seanstickle> bambanx: either
linus95014 has quit [Ping timeout: 245 seconds]
wvms has joined #ruby
<seanstickle> zombor: can you just use Time#zone ?
linus95014 has joined #ruby
<zombor> i can't seem to convert my DateTime object to a Time object...
<seanstickle> Oh!
<zombor> foo = convo[:received_at].to_time; puts foo.class; => DateTime
<seanstickle> Is this in Rails?
<zombor> yeah
test34 has quit [Ping timeout: 245 seconds]
<seanstickle> Rails overrides to_time to kick out a DateTime
Zolrath has joined #ruby
<bambanx> seanstickle, ready => <#CSV io_type.....
Karmaon has joined #ruby
mikepack has quit [Remote host closed the connection]
<zombor> arghf
<zombor> rails...
<seanstickle> zombor: haha
<seanstickle> bambanx: ok, now type "puts csv[1]"
jchauncey has quit [Quit: jchauncey]
<zombor> seanstickle: so there's no way to get this done
<zombor> hrmf, does Time.new(DateTime.new) work?
mfojtik has joined #ruby
<bambanx> seanstickle, undefined method []
<mfojtik> hi guys, it's possible to overide the Tracer.stdout? I want to save tracing info into StringIO
<mfojtik> doing: Tracer::stdout = StringIO.new
<mfojtik> will make no difference, Tracer.on {} still use STDOUT
bbttxu has quit [Quit: bbttxu]
<seanstickle> bambanx: try this:
<bambanx> seanstickle, puts csv = nil
<bambanx> weird
<seanstickle> CSV.open(filename, :headers => true).each{ |row| p row }
<seanstickle> That should print out all the lines in your CSV
Solnse has joined #ruby
<seanstickle> I might advise making a copy of one of your csv files and trimming it to 10 lines or something
<seanstickle> For testing purposes
<bambanx> yeah
<bambanx> seanstickle, it printed all my rows
<bambanx> seanstickle, thanks i will read now the docs of csv
kenyabob has joined #ruby
<seanstickle> bambanx: :)
bluOxigen has quit [Ping timeout: 252 seconds]
<kenyabob> Im using data mapper and I want to grab a random record. I can quickly see the count, but I cannot be certain that they key will match the record order
<kenyabob> I dont want to grab all the entries, however, in order to spit a random one back
asobrasil has left #ruby [#ruby]
<seanstickle> zombor: can you do that Time.at(DateTime.new.to_i) thing?
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
wangr__ has quit [Ping timeout: 260 seconds]
wallerdev has joined #ruby
phantasm66 has quit [Quit: *sleeeeep*]
<zombor> seanstickle: DateTime doesn't have a to_i method
<seanstickle> Dang
<seanstickle> Wait, the hell is doesn't
<zombor> oh, im doing this in irb
<seanstickle> Ha
octobrainz has joined #ruby
<kenyabob> Is there a gem that includes it
<kenyabob> like activesupport
thone has quit [Read error: Operation timed out]
thone has joined #ruby
samsonjs has joined #ruby
octobrainz has quit [Client Quit]
octobrainz has joined #ruby
octobrainz has quit [Read error: Connection reset by peer]
<seanstickle> zombor: well, I'm getting the same thing in 1.9.2
cephalopod has quit [Ping timeout: 245 seconds]
luxurymode has quit [Quit: Computer has gone to sleep.]
Solnse has quit []
<zombor> seanstickle: even in 1.8.7 it behaves like that
linduxed has joined #ruby
<seanstickle> What version are you using?
<zombor> 1.9.3
cephalopod has joined #ruby
<zombor> i have 1.8.7 still from os x built in though
<seanstickle> Seems like a bug to me
<zombor> figured i'd try it out
<ramblex> zombor: which version of rails are you using?
<zombor> 3.2.3
akem has joined #ruby
<seanstickle> Non-Rails issue though.
StoSun has quit []
abra has quit [Ping timeout: 276 seconds]
jgarvey has quit [Quit: Leaving]
<zombor> yep
<zombor> it's a ruby bug, afact
<zombor> afaict
Rubinista has joined #ruby
aaroncm has quit [Remote host closed the connection]
abra has joined #ruby
aaroncm has joined #ruby
sohocoke has joined #ruby
dv310p3r has quit [Ping timeout: 245 seconds]
krusty_ar_ has joined #ruby
krusty_ar has quit [Ping timeout: 256 seconds]
DrShoggoth has quit [Quit: Leaving]
cbuxton1 has joined #ruby
aaroncm has quit [Ping timeout: 246 seconds]
<Rubinista> I'm seeing different string behavior between 1.9.2 and 1.9.3. A single-quoted string with a single backslash followed by a utf-8 character loses the backslash in 1.9.3, whereas in 1.9.2 it's the same as '\x'.
cbuxton has quit [Read error: Connection reset by peer]
nowthatsamatt has joined #ruby
nowthatsamatt has left #ruby [#ruby]
<Rubinista> In other words, '\Յ' and '\\Յ' are not the same in 1.9.3 but were in 1.9.2.
mfojtik has left #ruby [#ruby]
<Rubinista> Does anyone know why? Is it intentional? I didn't see it in the changelog...
cmarques has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
Vert has joined #ruby
<lectrick> I want to do something like this, but I want to point the 3 pipes of the subprocess to a log file, any ideas? (pid = fork) ? Process.detach(pid) : exec("foo")
poppiez has joined #ruby
joshman_ has joined #ruby
poppiez has quit [Client Quit]
Guest21949 has quit [Ping timeout: 252 seconds]
poppiez has joined #ruby
<poppiez> how do you invoke a rake task inside a rake task with params? this is what I have so far: Rake::Task["build:clean"].invoke
<davidpk> Does Ruby guarantee left-to-right evaluation of arguemtns?
kirun has quit [Quit: Client exiting]
stephenjudkins has quit [Quit: stephenjudkins]
<seanstickle> davidpk: yes
<davidpk> seanstickle: Ok, thanks!
fayimora has joined #ruby
zombor has quit [Remote host closed the connection]
<davidpk> lectrick: look at popen(2) and IO.reopen
<davidpk> lectrick: my bad, popen(3)
<davidpk> lectrick: you might be able to do what you want with IO.popen, but also look at the open3 module in the standard library if you need more flexibility
KL-7 has quit [Quit: This computer has gone to sleep]
KL-7 has joined #ruby
wmoxam has quit [Quit: leaving]
linus95014 has quit [Quit: linus95014]
petercs has quit [Quit: Leaving.]
<bambanx> guys how i should write the path in this case for windows CSV.open('C:\\Users\\')
<LiquidInsect> bambanx: use File.join
<LiquidInsect> don't write paths manually
<LiquidInsect> then it will work anywhere
rmascarenhas has joined #ruby
nacengineer has quit [Quit: Leaving.]
<fowl> also c:/Users/blah is fine in windows
<LiquidInsect> oh really
<fowl> as far as ruby is concerned anyways
awarner has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby
<bambanx> my files have spaces 'c:/user' is not working
apeiros_ has quit [Remote host closed the connection]
<bambanx> LiquidInsect, can u give me a example file.join pls
<TorpedoSkyline> bambanx, try C:\User
<LiquidInsect> bambanx: docs are right here: http://apidock.com/ruby/v1_9_3_125/File/join/class
<bambanx> No such file or directory - C:\Users\ (Errno::ENOENT)
<bambanx> from C:/Ruby193/lib/ruby/1.9.1/csv.rb:1342:in `open'
<fowl> what are you doing
<bambanx> trying to load a file
Solnse has joined #ruby
<fowl> how?
<fowl> CSV.parse('C:/Users') ??
<fowl> c:/users is a directory
amalvagomes has joined #ruby
<bambanx> csv = CSV.open(C:\Users\bambanx\2012.05.24 073343.txt, :headers => true)
<Rubinista> bambanx: Single or double \? A single one would be consumed resulting in "c:User".
<seanstickle> bambanx: use quotes
<Rubinista> I assume that example of yours has quotes around the filename?
<seanstickle> csv = CSV.open("C:\Users\bambanx\2012.05.24 073343.txt", :headers => true)
<seanstickle> And actually
jcromartie has quit [Quit: jcromartie]
<fowl> seanstickle, what us \U ? \b ?
<seanstickle> csv = CSV.open(C:/Users/bambanx/2012.05.24 073343.txt, :headers => true)
<seanstickle> fowl: cute
<seanstickle> csv = CSV.open("C:/Users/bambanx/2012.05.24 073343.txt", :headers => true)
<bambanx> syntax error, unexpected tCONSTANT, expecting keyword_do or '{' or '('
jchauncey has joined #ruby
billiamii has quit []
<bambanx> with this: csv = CSV.open("C:\Users\073343.txt", :headers => true)
<bambanx> Invalid escape character syntax
linus95014 has joined #ruby
<seanstickle> csv = CSV.open("C:/Users/073343.txt", :headers => true)
joshman_ has quit [Quit: Computer has gone to sleep.]
<LiquidInsect> bambanx: don't use \, use /
td123 has joined #ruby
benatwork has quit [Remote host closed the connection]
<ziyadb> seanstickle: traitor!
<fowl> or do use \ and '
jayrulez has joined #ruby
<seanstickle> ziyadb: wazzat?
<ziyadb> You pledged loyalty to #startups!
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<seanstickle> ziyadb: No I didn't
carlyle has quit [Remote host closed the connection]
<seanstickle> ziyadb: I pledge loyalty to rmah
KL-7 has quit [Quit: This computer has gone to sleep]
<bambanx> this : csv = CSV.open("C:/Users/073343.txt", :headers => true) =>No such file or directory
<seanstickle> ziyadb: not #startups in general :)
<ziyadb> seanstickle: you did.
jchauncey has quit [Client Quit]
carlyle has joined #ruby
<ziyadb> <seanstickle>: I hereby pledge loyalty to #startups, and promise to uphold and honor ziyadb's word.
dhaskew_ has quit [Read error: Connection reset by peer]
kil0byte has joined #ruby
<ziyadb> busted!
dhaskew has joined #ruby
<seanstickle> ziyadb: I don't understand your crazy moon language
stephenjudkins has joined #ruby
ChIcKeNnInJa has quit []
<Rubinista> bambanx: Did you rename the file? In your earlier example it had a date in front of it.
<ziyadb> so be it. I banish you from #startups and any other forum run by my minions.
<bambanx> yeah is other file
<bambanx> Rubinista, is other file
kvirani has quit [Remote host closed the connection]
Solnse has quit [Read error: No route to host]
indian has joined #ruby
<Rubinista> bambanx: Weird. What happens when you use "c:\\Users\\ ..."?
<bambanx> No such file or directory Rubinista
<fowl> right..
<bambanx> guys now works using "C:\\Users\\ i dont wtf
fowl has left #ruby ["Leaving"]
<bambanx> but now works thanks for your help
<Rubinista> bambanx: Heh. Glad it worked in the end.
<bambanx> :)
walbert has joined #ruby
<bambanx> in ruby 1.9.3 is not necesarry use fastercsv only csv?
<seanstickle> In 1.9.3 csv IS fastercsv
joast has quit [Quit: Leaving.]
yoklov has joined #ruby
<Rubinista> Does anyone know why the '\[unicode-char]' behavior was changed between 1.9.2 and 1.9.3? Is it intentional?
bluenemo has quit [Ping timeout: 245 seconds]
itnomad has quit [Quit: Leaving]
jeebster has quit [Quit: Leaving.]
<bambanx> the docs of fastercsv is the same of update csv ? i found this http://fastercsv.rubyforge.org/
ken_barber has quit [Remote host closed the connection]
<sohocoke> what's the best way to log variables? it's annoying i have to write the var name twice - any way to output without saying, e.g. "expr: #{expr}"
C0deMaver1ck has quit [Remote host closed the connection]
<sohocoke> oh and something that requires the caller to pass in the bindings don't count. ;)
choffstein has quit [Remote host closed the connection]
<seanstickle> Yup
<bambanx> ty
kenyabob has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
Chryson has joined #ruby
ken_barber has joined #ruby
busybox42 has quit [Ping timeout: 256 seconds]
ken_barber has quit [Remote host closed the connection]
MasterIdler_ has joined #ruby
nari_ has joined #ruby
sohocoke has quit [Quit: Computer has gone to sleep.]
poppiez has quit [Quit: Lost terminal]
abra has quit [Ping timeout: 276 seconds]
MasterIdler_ has quit [Client Quit]
uris has quit [Quit: leaving]
itnomad has joined #ruby
abra has joined #ruby
chimkan has joined #ruby
MasterIdler has quit [Ping timeout: 252 seconds]
<Rubinista> Sohocoke: require 'binding_of_caller'; foo = 3 ; def log_var name ; "Log: #{name} = #{binding.of_caller(1).eval(name)}" ; end ; log_var 'foo'
<bambanx> guys docs say this is for read and works when i puts dont show me nothing myarray = CSV.foreach("C:\\Users\\073343.txt") do |row|
<bambanx> puts myarray
<bambanx> end
cableray has quit [Quit: cableray]
<bambanx> i fix :)
busybox42 has joined #ruby
nick_h_ has quit [Quit: leaving]
walbert has quit []
chimkan has quit [Quit: chimkan]
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
chson has joined #ruby
amalvagomes has quit [Quit: amalvagomes]
tatsuya_o has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
liluo has joined #ruby
flip_digits has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
passbe has joined #ruby
fayimora has quit [Read error: Connection reset by peer]
fayimora has joined #ruby
<bambanx> seanstickle, guys i have a few files each one with this format http://pastie.org/3963157, and i need work with it comparing sum etc... , what u recommend me , put all files in a big array and each element is on file, i mean and array of arrays or you have better idea?
billiamii has joined #ruby
mvangala_ has joined #ruby
eph3meral has quit [Quit: Leaving]
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
cout has joined #ruby
cjlicata has joined #ruby
cjlicata has quit [K-Lined]
cjlicata has joined #ruby
carlyle has quit [Read error: Operation timed out]
ZachBeta has joined #ruby
<kenneth> so what's the difference between ruby's inject
<kenneth> a
<kenneth> nd a traditional functional reduce?
choffstein has joined #ruby
cjlicata has quit [Remote host closed the connection]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
jcromartie has joined #ruby
<shevy> kenneth both work in ruby
<shevy> .inject and .reduce
<kenneth> are they equivalent?
<kenneth> because they seem different to me
<kenneth> the way i know reduce is from functional programming, in which the return value should itself be reducible
macmartine has joined #ruby
fayimora_ has joined #ruby
<kenneth> whereas inject seems to be an accumulator, in ruby
fayimora_ has quit [Remote host closed the connection]
looopy has joined #ruby
fayimora has quit [Ping timeout: 264 seconds]
akl has quit [Ping timeout: 252 seconds]
akl has joined #ruby
akl has quit [Changing host]
akl has joined #ruby
TandemAdam has joined #ruby
itnomad has quit [Read error: Connection reset by peer]
<shevy> well
<shevy> the dirty secret is
<shevy> in ruby, one is an alias to the other
<shevy> :)))
Facefox has joined #ruby
<shevy> but I was honest with you man!
itnomad has joined #ruby
<shevy> it's like .map to .collect
MissionCritical has quit [Ping timeout: 252 seconds]
brianpWins has joined #ruby
andrewhl has quit [Quit: andrewhl]
tomb_ has joined #ruby
nari_ has quit [Read error: Operation timed out]
tomzx has joined #ruby
locriani has quit [Remote host closed the connection]
<bambanx> guys what i do wrong here pls http://pastie.org/3963772
rasbonics has quit [Quit: rasbonics]