fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
<flyinprogramer> if you just do "rake spec:dep
<Muz> Yup, rake -T shows the tasks after that.
<flyinprogramer> everything gets taken care of
<flyinprogramer> i'm sorry for being an idiot
* Muz sighs, I didn't need to get up to grab my laptop. ¬_¬
Abbas5 is now known as Abbas|
<flyinprogramer> Muz: again, sorry man!
<Muz> Hah, right you are.
* flyinprogramer how you see the joke
<flyinprogramer> *hope
originalcamper has joined #ruby
jerrad has quit [Quit: Leaving...]
vlad_starkov has quit [Ping timeout: 240 seconds]
* Muz isn't a fan of invisible rake tasks, I'd rather it show and error with a useful message if deps aren't met.
<flyinprogramer> hmm so even after that… rake install still has my man pages blank
<flyinprogramer> don't put that laptop away just yet
<flyinprogramer> OMG
<flyinprogramer> i need to build them
<flyinprogramer> nope, still blank
<Muz> 00:49 < Muz> flyinprogramer: have you generated the man pages yet?
<flyinprogramer> yah, soo, one must build them, then install the gem
* flyinprogramer slow learner
<Muz> Works for me. Try uninstalling, rebuilding the docs, and then rake install'ing.
<flyinprogramer> yup i got it
ghanima has quit [Quit: Leaving.]
pdtpatrick has joined #ruby
<flyinprogramer> q
BrokenCog has quit [Read error: Connection reset by peer]
<flyinprogramer> now i just need to figure out how to write specs for my new rake tasks
headius has quit [Quit: headius]
<Muz> Commonly, it'd involve unit testing the methods that your spec task would call.
recycle has joined #ruby
havenn has quit [Remote host closed the connection]
nari has quit [Ping timeout: 246 seconds]
butblack has joined #ruby
quazimodo has quit [Ping timeout: 252 seconds]
tiripamwe has quit [Ping timeout: 244 seconds]
mahmoudimus has quit [Read error: Connection reset by peer]
mahmoudimus has joined #ruby
tiripamwe has joined #ruby
banisterfiend has quit [Remote host closed the connection]
quazimodo has joined #ruby
banisterfiend has joined #ruby
dmiller has joined #ruby
t97782 has quit [Remote host closed the connection]
t61225 has joined #ruby
jrajav has joined #ruby
Takehiro has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
banisterfiend has quit [Ping timeout: 244 seconds]
SQLStud has quit [Quit: Leaving]
wpaulson has joined #ruby
recycle has quit [Remote host closed the connection]
hadees has joined #ruby
Takehiro has quit [Ping timeout: 246 seconds]
dbe has quit [Remote host closed the connection]
w400z has quit []
mmitchell has joined #ruby
<flyinprogramer> thanks again Muz for your help - i'm off to smoke some hookah
flyinprogramer has quit [Quit: flyinprogramer]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
originalcamper has left #ruby [#ruby]
S2kx has quit [Ping timeout: 252 seconds]
ngoldman has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
joshman_ has joined #ruby
mmitchell has quit [Ping timeout: 264 seconds]
rakm has joined #ruby
machty_ has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
dmiller has quit [Remote host closed the connection]
ttilley has quit [Quit: ttilley]
x77686d_ has joined #ruby
nnv7 has joined #ruby
x77686d has quit [Ping timeout: 244 seconds]
x77686d_ is now known as x77686d
dmiller has joined #ruby
aantix_ has joined #ruby
eignerchris has quit [Remote host closed the connection]
tompsony has joined #ruby
tgriffin2081 has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
banisterfiend has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
x77686d has quit [Ping timeout: 265 seconds]
Banistergalaxy has quit [Ping timeout: 260 seconds]
aantix has quit [Ping timeout: 256 seconds]
aantix_ has quit [Ping timeout: 245 seconds]
binaryplease has quit [Quit: WeeChat 0.3.8]
artOfWar has quit [Remote host closed the connection]
vitoravelino is now known as vitoravelino`afk
riley526 has quit [Remote host closed the connection]
jjbohn has quit [Quit: Leaving...]
Taichouchou2 has joined #ruby
hunglin has joined #ruby
wallerdev has joined #ruby
hunglin has quit [Client Quit]
hunglin has joined #ruby
hunglin has quit [Client Quit]
iori has joined #ruby
M- has joined #ruby
Taichouchou2 has quit [Ping timeout: 268 seconds]
wpaulson has joined #ruby
sn0wb1rd has quit [Ping timeout: 256 seconds]
tompsony has quit [Quit: CyberScript - O ministério da saúde adverte: usar CyberScript causa dependência! (www.cyberscript.org)]
sn0wb1rd has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
wpaulson has quit [Client Quit]
mmitchell has joined #ruby
havenn has joined #ruby
specialGuest has quit [Ping timeout: 264 seconds]
ringotwo has quit [Remote host closed the connection]
maletor has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
revans has quit [Quit: Linkinus - http://linkinus.com]
ZachBeta has joined #ruby
lusory has joined #ruby
maletor has quit [Ping timeout: 240 seconds]
Vert has quit [Read error: Connection reset by peer]
tgriffin2081 has quit []
tgriffin2081 has joined #ruby
cakehero has joined #ruby
maletor has joined #ruby
w400z has joined #ruby
nnv7 has quit [Quit: nnv7]
dmiller has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
guns has joined #ruby
mahmoudimus has joined #ruby
rubious has quit [Quit: Leaving...]
ZachBeta has quit [Quit: Computer has gone to sleep.]
bradhe has joined #ruby
randomautomator has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
ZachBeta has joined #ruby
justsee has joined #ruby
Takehiro has joined #ruby
tymat has joined #ruby
quest88 has joined #ruby
joephelius has quit [Quit: WeeChat 0.3.8]
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
Takehiro has quit [Ping timeout: 245 seconds]
Azure has quit [Excess Flood]
alvaro_o has quit [Quit: Ex-Chat]
Guest69256 has joined #ruby
darren has quit [Remote host closed the connection]
jenrzzz has quit [Quit: leaving]
jenrzzz has joined #ruby
Guest69256 is now known as Azure
Azure has quit [Changing host]
Azure has joined #ruby
mrsolo has quit [Quit: Leaving]
dgs has joined #ruby
<dgs> if you're using sockets in ruby, is it possible to get the source port of a tcp connection. (eg not the port you are listening on, but the port the request left the other machine on)
mxweas has quit [Quit: Leaving...]
johnjohnson has quit []
wpaulson has joined #ruby
mmitchell has quit [Remote host closed the connection]
drags has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
<drags> does anyone know what influences hash ordering in ruby-1.8? 2 VMs that were cloned from each other produce the same output, but a different machine has consistently different ordering
<drags> seems to implicate something about the system itself influences it
<drags> (consistently different even across processes, reboots, etc)
<fowl> drags: hashes are not ordered in 1.8
tymat has left #ruby [#ruby]
<fowl> drags: so they could be in any order
Hanmac1 has joined #ruby
<drags> fowl: yarr I picked up on that from the docs, it's just that it's consistent
<drags> between runs
<fowl> dgs: i only have experience with udp sockets where youw ould use recv_from for that, I dont think recv_from exists for tcp sockets
<banisterfiend> drags: read the source:)
* drags is running into a test-suite that works on the 2 incumbent devs cloned VMs, but produces about 1500 failures on mine :(
<drags> banisterfiend: was hoping for a pointer
hadees has quit [Quit: hadees]
kiyoura has joined #ruby
<banisterfiend> drags: you'll find plenty in the source, especially of the (VALUE *) variety ;)
<drags> banisterfiend: http://xkcd.com/138/
Hanmac has quit [Ping timeout: 265 seconds]
<drags> it's just the consistency that's grinding my gears, each machine produces the same order at every execution on that machine, but it differs between machines
havenn has quit [Ping timeout: 260 seconds]
<drags> if I could influence it I would save myself a bunch of time rewriting tests :)
williamherry has quit [Ping timeout: 264 seconds]
<banisterfiend> drags: i wouldn't rely on that btw, as u'd also have to check ordering wasnt changed in point releases
<banisterfiend> since there's no guarantee they would remain consistent
<fowl> drags: or you could 1) accept that hashes are unordered in 1.8 so dont rely on that happening or 2) use the orderedhash gem
havenn has joined #ruby
uris has joined #ruby
Axsuul has quit [Read error: Connection reset by peer]
Axsuul has joined #ruby
jorge_ has quit [Remote host closed the connection]
jorge_ has joined #ruby
Criztian has quit []
jtgiri_ has quit [Quit: jtgiri_]
savage- has quit [Remote host closed the connection]
JonnieCache has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
nnv7 has joined #ruby
nnv7 has quit [Client Quit]
seanstickle has quit [Quit: seanstickle]
sailias has quit [Read error: Operation timed out]
dpk has quit [Quit: Asleep at the keyboard.]
linoj has joined #ruby
phanousit has joined #ruby
phanousit is now known as siameseguy
banisterfiend has quit [Remote host closed the connection]
pskosinski has quit [Quit: http://www.redeclipse.net -- Fast-paced online FPS]
pdtpatrick has quit [Quit: pdtpatrick]
sirish has joined #ruby
nari has joined #ruby
mistergibson has joined #ruby
mascool has quit [Ping timeout: 240 seconds]
jorge_ has quit [Remote host closed the connection]
dmiller has joined #ruby
<mistergibson> Anyone know the rationale on this? I create a StringIO with "test", then upon the first :write of a string "this" it *replaces* the init text with the :write data. Any clues are helpful.
Banistergalaxy has joined #ruby
w400z has quit [Quit: Computer has gone to sleep.]
maletor has quit [Quit: Computer has gone to sleep.]
apok has quit [Ping timeout: 244 seconds]
<siameseguy> is it possible to put methods in arrays and them call on them?
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<mistergibson> siameseguy: you could put procs in arrays and call them
<siameseguy> i can use the procs to call the methods?
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<mistergibson> arr = []; arr << Proc.new {|blah| puts blah.inspect};arr[0].call(my_params)
<fowl> siameseguy: get a bound method with someobj.method(:the_method)
<mistergibson> dunno
<mistergibson> Anyone have a clue on the StringIO question?
_iori_ has joined #ruby
<fowl> mistergibson: yes, the pos starts at 0
havenn has quit [Remote host closed the connection]
<mistergibson> but :write is supposed to append data
<fowl> mistergibson: it does, from the position you're at
<mistergibson> ok, so I have to pos= the size of it in order to preserve the init text
<mistergibson> or such
<fowl> you could read it first
<fowl> it will move to the end
<mistergibson> I see
jrajav has quit [Ping timeout: 245 seconds]
<siameseguy> can i call a method with a proc?
<fowl> >> x = StringIO.new("Hello"); x.read; x.write("there"); x.rewind; x.read
<al2o3cr> -e:1:in `eval': uninitialized constant StringIO (NameError), from -e:1:in `eval', from -e:1:in `<main>'
<fowl> siameseguy: yes, obv, a proc is a block of code so if you call a method from it it will get called..
<mistergibson> fowl: ok, I now possess a clue - thx :)
xnm has joined #ruby
LorentzFactor has quit [Ping timeout: 244 seconds]
williamherry has joined #ruby
<fowl> >> require'stringio';x = StringIO.new("Hello"); x.read; x.write("there"); x.rewind; x.read
<al2o3cr> (String) "Hellothere"
<siameseguy> ok, now can i put a proc in a method?
alexy has joined #ruby
iori has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 245 seconds]
iori has joined #ruby
mikepack has quit [Remote host closed the connection]
LorentzFactor has joined #ruby
alexy has left #ruby ["Leaving"]
_iori_ has quit [Ping timeout: 252 seconds]
sn0wb1rd has joined #ruby
<mistergibson> siameseguy: (if I understand the question) - within method definition : my_proc = Proc.new {|n| puts n.inspect }
<mistergibson> you simply put it in a local variable
<mistergibson> ... see?
t61225 has quit [Remote host closed the connection]
t47471 has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<siameseguy> thanks
<mistergibson> siameseguy: I use procs a lot - I really like them
beneggett has quit [Quit: Computer has gone to sleep.]
daniel_hinojosa has joined #ruby
sailias has joined #ruby
<siameseguy> what I'm trying to do is have the proc call my methods and keep it flexible enough that i don't have to keep writing procs for each method i call
artOfWar has joined #ruby
mxweas has joined #ruby
artOfWar_ has joined #ruby
krz has quit [Quit: krz]
hadees has joined #ruby
rubious has joined #ruby
artOfWar has quit [Ping timeout: 245 seconds]
<siameseguy> mistergibson: what I'm trying to do is have the proc call my methods and keep it flexible enough that i don't have to keep writing procs for each method i call
linoj has quit [Quit: linoj]
tomzx_ has joined #ruby
techsurvivor has quit [Ping timeout: 245 seconds]
<fowl> siameseguy: store the name of the method as a symbol and use #send when you want to call ti
deryl has quit [Quit: deryl]
Takehiro has joined #ruby
<siameseguy> fowl: do you think this will work? http://pastie.org/4607679
ZachBeta has quit [Quit: Computer has gone to sleep.]
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
tsan has joined #ruby
nnv7 has joined #ruby
starsky_70 has joined #ruby
Quadlex has quit [Quit: leaving]
Takehiro has quit [Ping timeout: 248 seconds]
pjanagama has joined #ruby
pjanagama has left #ruby [#ruby]
siameseguy has left #ruby [#ruby]
siameseguy has joined #ruby
starsky_70 has quit [Remote host closed the connection]
tomzx_ has quit [Ping timeout: 264 seconds]
jtgiri_ has joined #ruby
tommyvyo has quit [Read error: Connection reset by peer]
tommyvyo has joined #ruby
pingfloyd has joined #ruby
Takehiro has joined #ruby
vivien__ has quit [Ping timeout: 246 seconds]
machty has quit [Ping timeout: 264 seconds]
starsky_70 has joined #ruby
PhoSor has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
katherinem13 has quit [Quit: katherinem13]
radic_ is now known as radic
luist has joined #ruby
drago757 has joined #ruby
dmiller has quit [Remote host closed the connection]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
BrokenCog has quit [Quit: leaving]
_veer is now known as lolsuper_
davidcelis has joined #ruby
Taichouc_ has joined #ruby
mmitchell has joined #ruby
Guedes has quit [Quit: Saindo]
mmitchell has quit [Remote host closed the connection]
infinitiguy has joined #ruby
enherit has quit [Ping timeout: 245 seconds]
bradhe has joined #ruby
ngoldman has joined #ruby
nnv7 has quit [Quit: nnv7]
vjt has quit [Remote host closed the connection]
t47471 has quit [Remote host closed the connection]
williamherry has quit [Quit: WeeChat 0.3.7]
t77474 has joined #ruby
bradhe has quit [Remote host closed the connection]
jenrzzz has joined #ruby
ngoldman has quit [Remote host closed the connection]
CannedCorn has joined #ruby
katherinem13 has joined #ruby
vectorshelve has joined #ruby
<CannedCorn> hey guys how come when i say version =~ /regex/ and this evaluates to 0 if i say !(version =~ /regex/) does it return false
<CannedCorn> oh
<CannedCorn> obviously cause zero is true
<CannedCorn> i should use !!
katherinem13 has quit [Client Quit]
<CannedCorn> also having problem passing argument to rake task
<CannedCorn> with zsh
<CannedCorn> it doesn't like the [] syntax
katherinem13 has joined #ruby
katherinem13 has quit [Remote host closed the connection]
rcs has quit [Quit: ZNC - http://znc.in]
mrdodo has joined #ruby
pdtpatrick has joined #ruby
<CannedCorn> found an elegant solution, disable zsh globbing for rake "alias rake='noglob rake'"
sambio has joined #ruby
tiripamwe has quit [Ping timeout: 244 seconds]
Azure has quit [Quit: ZNC - http://znc.in]
TheShadowFog has joined #ruby
katherinem13 has joined #ruby
Azure has joined #ruby
PhoSor has quit [Ping timeout: 260 seconds]
vectorshelve has quit [Quit: Page closed]
sixtycakes has joined #ruby
emmanuelux has quit [Ping timeout: 244 seconds]
dshap has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
dshap has quit [Client Quit]
<elico> anyone can help me with something abotu TCPseockets?
diegoviola has quit [Ping timeout: 252 seconds]
starsky_70 has left #ruby [#ruby]
khakimov has joined #ruby
<_br_> CannedCorn: That is one way, the other is to embedd the [] into "" due to zsh syntax
<CannedCorn> cool
<CannedCorn> thanks _br_
Goles has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
w400z has joined #ruby
tommyvyo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<bnagy> elico: irc protip - don't ask to ask, just ask your question
mahmoudimus has quit [Quit: Computer has gone to sleep.]
rcs has joined #ruby
t77474 has quit [Remote host closed the connection]
rcs has quit [Excess Flood]
nickyhof has joined #ruby
t15633 has joined #ruby
<elico> bnagy: thanks.
rcs has joined #ruby
<elico> I want to connect two client sockets to each other
PhoSor has joined #ruby
<elico> to ackt as a proxy... for both
<elico> i have software that does it and written in perl but i want one in ruby
<elico> my problem is with reading from sockets...
<elico> i always get to a point it blocks
<elico> and stuck...
ryanf has joined #ruby
CarlB_the_great has joined #ruby
darren has joined #ruby
nickyhof is now known as wo66le
<elico> Eventmachine is great with that but i dont know how to connect two clients
tiripamwe has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
jeff_sebring has joined #ruby
bradhe has joined #ruby
<_br_> elico: It is very difficult from your explanation to guess what is going on. Probably its a good idea to run the program in debug mode ruby -rdebug and step through to see whats going on.
mrdodo has quit [Remote host closed the connection]
cj3kim has quit [Quit: This computer has gone to sleep]
<elico> _br_: i am sitting on some of it right now
tsan has quit [Quit: tsan]
seich is now known as Seich
beneggett has joined #ruby
Spooner has quit [Ping timeout: 252 seconds]
guns has quit [Ping timeout: 248 seconds]
<bnagy> elico: this is just a socket thing
<bnagy> use threads or use a select loop
__class__ has quit [Ping timeout: 240 seconds]
dmiller has joined #ruby
<bnagy> t2=Thread.new { that.write( this.read ) }; t1=Thread.new { this.write( that.read ) }
<bnagy> probably with a timeout or a lim, sry :)
pingfloyd has quit [Ping timeout: 256 seconds]
__class__ has joined #ruby
<bnagy> with EM I think you have to connect out with a client inside the server
infinitiguy has quit [Quit: Leaving.]
<bnagy> someone must have done this already
wpaulson has joined #ruby
Chryson has quit [Quit: Leaving]
aristidesfl has quit []
sailias has quit []
wpaulson has quit [Client Quit]
ringotwo has joined #ruby
sn0wb1rd has quit [Read error: Connection reset by peer]
td123 has joined #ruby
mxweas has quit [Quit: Leaving...]
sn0wb1rd has joined #ruby
sirish has quit [Ping timeout: 265 seconds]
ananthakumaran has joined #ruby
mohits has joined #ruby
enherit has joined #ruby
areil has joined #ruby
tompsony has joined #ruby
kiyoura has quit [Quit: Leaving]
Taichouc_ has quit [Remote host closed the connection]
<tompsony> I am looking for someone with skills to do a job ... preferably someone who agrees bitcoins as payment.
t15633 has quit [Remote host closed the connection]
t10386 has joined #ruby
sixtycakes has quit [Remote host closed the connection]
<ryanf> s
<ryanf> haha wrong window :(
<bnagy> tompsony: dude I got mad skills. I got nunchuck skills, bo skills...
<rubious> tompsony: PM
<rubious> (just cause I'm super curious)
<tompsony> [rubious]: the problem is that serious talk with you is practically impossible
guns has joined #ruby
guns is now known as Guest44905
Guest44905 has quit [Client Quit]
<rubious> tompsony: A little humor never hurt anyone. PM if you actually have work.
savage- has joined #ruby
wo66le has quit [Quit: Computer has gone to sleep.]
adamkittelson has quit [Remote host closed the connection]
<tompsony> [rubious]: I have work but I'm not fichando portfolio or adding anything to their curricula
<tompsony> pm
<rubious> Hey, sorry for lol
<rubious> lol.
jcromartie has left #ruby [#ruby]
banghouse2 has joined #ruby
pingfloyd has joined #ruby
datapolitical has joined #ruby
pingfloyd has quit [Client Quit]
pingfloyd has joined #ruby
jenrzzz has joined #ruby
aantix has joined #ruby
noyb has joined #ruby
techsurvivor has joined #ruby
JonnieCa1he|home has joined #ruby
<elico> bnagy: i got to a point which i kind of know what the problem basically
rakunHo has joined #ruby
JonnieCache|home has quit [Ping timeout: 240 seconds]
<elico> i need some way to read from the tcp socket into a buffer and to recognize that the reading ended
dmiller has quit [Remote host closed the connection]
<bnagy> read(n)
enherit has quit [Ping timeout: 268 seconds]
<elico> yes but how would i know it end of write?
mohits has quit [Read error: Connection reset by peer]
<elico> like end of data that was sent?
<bnagy> read without an argument will read everything
<elico> but get stuck...
<bnagy> til EOF
<bnagy> yeah cause the connection is still open
<bnagy> so read(n)
<elico> but i need the connection to stay alive and just to read and pass it to other socket..
<bnagy> ...
<bnagy> I can't repeat myself anymore, sorry
<elico> it goes like this:
<bnagy> stop
mohits has joined #ruby
<elico> ok
mohits has quit [Changing host]
mohits has joined #ruby
<elico> but i dont know the size of the packet? so how can i predict it?
<bnagy> you're not reading packets
<bnagy> you're reading data, when you use TCPSocket
<bnagy> if you want to relay packets you will need to go down to Socket
<elico> thanks
<bnagy> but you probably don't
x77686d has joined #ruby
<elico> yes i know
<elico> it's kind of works manually
<bnagy> think of a TCP connection as a data firehose
banghouse2 has quit [Remote host closed the connection]
<bnagy> the client app doesn't know how big the packets are either, and it shouldn't
tiripamwe has quit [Ping timeout: 252 seconds]
joshman_ has quit [Quit: Computer has gone to sleep.]
<bnagy> it just expects some amount of a data stream, in order
<bnagy> so you can read / relay whatever chunk size you want and the other end will deal withit
<bnagy> when you do read wih no arg you try and drink the whole firehose in one go
mahmoudimus has joined #ruby
techsurvivor has quit [Ping timeout: 265 seconds]
<elico> ye was thinking of it...
GeekOnCoffee has joined #ruby
banisterfiend has joined #ruby
Progster has joined #ruby
datapolitical has quit [Quit: This computer has gone to sleep]
CarlB_the_great has quit [Remote host closed the connection]
Taichouchou2 has joined #ruby
neutrinos has joined #ruby
Banistergalaxy has quit [Ping timeout: 264 seconds]
<rubious> bnagy: great metaphor, btw.
jenrzzz has quit [Ping timeout: 240 seconds]
tompsony has quit [Ping timeout: 245 seconds]
sailias has joined #ruby
neutrinos is now known as tompsony
seanwash has joined #ruby
<seanwash> Hey
neutrinos has joined #ruby
neutrinos has left #ruby [#ruby]
tompsony has quit [Ping timeout: 264 seconds]
tekacs has quit [Quit: Disappearing... *poof*]
t10386 has quit [Remote host closed the connection]
t27430 has joined #ruby
Taichouchou2 has quit [Remote host closed the connection]
siameseguy has quit [Quit: siameseguy]
x77686d has quit [Quit: x77686d]
ghanima has joined #ruby
<ghanima> hello all
<ghanima> question... I have a function def sample(op)
tekacs has joined #ruby
mohits has quit [Ping timeout: 245 seconds]
<ghanima> inside this function I have declared a rest function but the argument that I have passsed to the function I need to pass it to the Rest Method like so
awarner has joined #ruby
<ghanima> resp = RestClient::Resource.new(@baseURL)
<ghanima> reqBody = resp[url].op
<ghanima> this is reporting an error because it doesn't seem to be interpolating
<ghanima> not sure this is possible to do
ByteCrunch has quit [Ping timeout: 246 seconds]
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
<ghanima> any thoughts
tiripamwe has joined #ruby
drago757 has quit [Quit: drago757]
AlbireoX has quit [Ping timeout: 244 seconds]
techsurvivor has joined #ruby
<elico> bnagy: it's pretty simple with recvmsg...
rubious has quit [Quit: Linkinus - http://linkinus.com]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
awarner has quit [Remote host closed the connection]
sailias has quit []
gloomer has joined #ruby
zodiak has joined #ruby
ryanf has quit [Ping timeout: 268 seconds]
yasushi has joined #ruby
iamjarvo has quit [Ping timeout: 264 seconds]
xscc has joined #ruby
luckyruby has joined #ruby
d3vic3 has quit [Ping timeout: 244 seconds]
heisenmink has joined #ruby
Sykamore has joined #ruby
d3vic3 has joined #ruby
jtgiri_ has quit [Quit: jtgiri_]
chichou has quit [Remote host closed the connection]
krz has joined #ruby
<krz> foo.views_count returns 5. with bar = 'views_count'. how can do something like pseudo code: foo."#{bar}"
adeponte has joined #ruby
sgmac has joined #ruby
xscc has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<krz> is such dynamicity possible?
sambio has quit [Quit: Saliendo]
sgmac has left #ruby [#ruby]
<fowl> >> [1,2,3].send "reverse"
<al2o3cr> (Array) [3, 2, 1]
<fowl> krz: ^
<krz> thanks
Dreamer3 has quit [Ping timeout: 256 seconds]
allyraza has joined #ruby
Dreamer3 has joined #ruby
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
w400z has quit []
dgs has quit [Ping timeout: 248 seconds]
xscc has joined #ruby
chussenot has joined #ruby
yasushi has quit [Remote host closed the connection]
xscc has quit [Client Quit]
CannedCorn has quit [Quit: Computer has gone to sleep.]
JStoker has quit [Excess Flood]
n_blownapart has joined #ruby
PhoSor has quit [Ping timeout: 260 seconds]
a_a_g has joined #ruby
<n_blownapart> hi I don't understand the need for the comma syntax on line 2 - thanks: http://pastie.org/4608343
quest88 has quit [Quit: quest88]
moshee has quit [Ping timeout: 260 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Taichouchou2 has joined #ruby
Taichouchou2 has quit [Remote host closed the connection]
Taichouchou2 has joined #ruby
datapolitical has joined #ruby
<bnagy> n_blownapart: they're arguments to raise ie raise( ArgumentError, ... )
coyo has quit [Quit: Heaven is not a place, it's being with people who love you.]
resure has joined #ruby
aantix has quit [Quit: aantix]
ph^_ has quit [Remote host closed the connection]
chimkan has joined #ruby
sepp2k has joined #ruby
<n_blownapart> bnagy: oh thanks I was on the right track then. thanks I'm trying to minimize my reliance on the chatroom. pax
dgs has joined #ruby
ph^ has joined #ruby
Z_Mass has joined #ruby
resure is now known as resure_away
Eldariof-ru has joined #ruby
mrdodo has joined #ruby
luist has quit [Quit: luist]
banisterfiend has quit [Remote host closed the connection]
Progster has quit [Ping timeout: 248 seconds]
heisenmink has quit [Remote host closed the connection]
luist has joined #ruby
PhoSor has joined #ruby
PhoSor has quit [Client Quit]
PhoSor has joined #ruby
nazty has quit [Ping timeout: 260 seconds]
enherit has joined #ruby
Morkel has joined #ruby
uris has quit [Quit: leaving]
ph^ has quit [Remote host closed the connection]
JStoker has joined #ruby
Banistergalaxy has joined #ruby
freeayu has joined #ruby
a_a_g has quit [Quit: Leaving.]
maletor has joined #ruby
timonv has joined #ruby
tcopp has quit [Quit: Lost terminal]
datapolitical has quit [Quit: This computer has gone to sleep]
ryanf has joined #ruby
reset has quit [Ping timeout: 248 seconds]
n_blownapart has quit [Remote host closed the connection]
allyraza has quit [Ping timeout: 264 seconds]
datapolitical has joined #ruby
a_a_g has joined #ruby
senny has joined #ruby
tonini has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
enherit has quit [Remote host closed the connection]
tonini has quit [Remote host closed the connection]
stuartrexking has quit [Quit: Leaving...]
Sykamore has quit [Remote host closed the connection]
steven- has joined #ruby
tonini has joined #ruby
JarJar has joined #ruby
ghanima has quit [Read error: Connection reset by peer]
maletor has quit [Quit: Computer has gone to sleep.]
t27430 has quit [Remote host closed the connection]
t27850 has joined #ruby
arturaz has joined #ruby
ghanima has joined #ruby
aantix has joined #ruby
timonv has quit [Remote host closed the connection]
aantix has quit [Client Quit]
seanwash has quit [Quit: Leaving.]
fantazo has quit [Remote host closed the connection]
td123 has quit [Quit: WeeChat 0.3.8]
tagrudev has joined #ruby
banisterfiend has joined #ruby
swair has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
burgestrand has joined #ruby
thunderstrike has joined #ruby
Banistergalaxy has joined #ruby
stuartrexking has joined #ruby
__class__ has quit [Ping timeout: 265 seconds]
darren has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
datapolitical has quit [Quit: This computer has gone to sleep]
swair has quit [Quit: Konversation terminated!]
mxweas has joined #ruby
Guest65367 has quit [Read error: Operation timed out]
datapolitical has joined #ruby
__class__ has joined #ruby
mc0e has joined #ruby
maesbn has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
G has quit [Ping timeout: 260 seconds]
iori has quit [Read error: No route to host]
timonv has joined #ruby
heisenmink has joined #ruby
manizzle has joined #ruby
mrdodo has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
vlad_sta_ has joined #ruby
chimkan has quit [Quit: chimkan]
senny has quit [Remote host closed the connection]
daniel_hinojosa has quit [Quit: Leaving.]
jprovazn_away is now known as jprovazn
iori has joined #ruby
senny has joined #ruby
vlad_starkov has quit [Ping timeout: 244 seconds]
mrdodo has joined #ruby
t27850 has quit [Remote host closed the connection]
fearoffish has quit [Quit: Computer has gone to sleep.]
t57793 has joined #ruby
Guest5516 has joined #ruby
vlad_sta_ has quit [Read error: Connection reset by peer]
senny_ has joined #ruby
mrdodo has quit [Remote host closed the connection]
senny has quit [Ping timeout: 268 seconds]
aantix has joined #ruby
chimkan has joined #ruby
robustus has joined #ruby
iori has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
bradhe has joined #ruby
mrdodo has joined #ruby
mrdodo has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
Hanmac1 is now known as Hanmac
timonv has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
fyolnish_ has joined #ruby
und3f has joined #ruby
dhruvasagar has joined #ruby
jeff_sebring has quit [Quit: Leaving]
Takehiro has joined #ruby
elhu has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
dhruvasagar has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 244 seconds]
Eldariof-ru has quit []
artOfWar_ has quit [Ping timeout: 264 seconds]
chimkan has quit [Quit: chimkan]
G has joined #ruby
Takehiro has quit [Ping timeout: 268 seconds]
Banistergalaxy has joined #ruby
dhruvasagar has joined #ruby
murthyteja has joined #ruby
aantix has quit [Quit: aantix]
saschagehlich has joined #ruby
hollymann has joined #ruby
aantix has joined #ruby
aantix has quit [Client Quit]
murthyteja has quit [Client Quit]
Musfuut has joined #ruby
murthyteja has joined #ruby
<murthyteja> Hi
headius has joined #ruby
<davidcelis> hi
zommi has joined #ruby
schaerli has joined #ruby
JarJar has quit [Quit: Leaving]
ph^ has joined #ruby
vitenberg has joined #ruby
jgrevich_ has joined #ruby
hollymann has left #ruby [#ruby]
vitenberg has quit [Client Quit]
ghanima1 has joined #ruby
Takehiro has joined #ruby
murthyteja has quit [Quit: Page closed]
g_rotbart has quit [Remote host closed the connection]
s1n4 has joined #ruby
ghanima has quit [Ping timeout: 260 seconds]
g_rotbart has joined #ruby
jgrevich has quit [Ping timeout: 244 seconds]
jgrevich_ is now known as jgrevich
Abbas| has quit [Ping timeout: 246 seconds]
Zespre has quit [Ping timeout: 256 seconds]
Zespre has joined #ruby
LouisGB has joined #ruby
nilg has joined #ruby
aganov has joined #ruby
xorigin has joined #ruby
g_rotbart has quit [Ping timeout: 245 seconds]
justsee has quit [Quit: Leaving...]
ghanima1 has quit [Ping timeout: 248 seconds]
aidanna has joined #ruby
dangerousdave has joined #ruby
Takehiro_ has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
Takehiro has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 245 seconds]
answer_42 has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
mneorr has quit [Remote host closed the connection]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
ghanima has joined #ruby
mneorr has joined #ruby
Russell^^ has quit [Quit: Russell^^]
jgrevich has quit [Quit: jgrevich]
hoelzro|away is now known as hoelzro
arkiver has joined #ruby
elhu has joined #ruby
LouisGB has quit []
elhu has quit [Client Quit]
ph^ has quit [Remote host closed the connection]
LouisGB has joined #ruby
chichou has joined #ruby
wallerdev has quit [Quit: wallerdev]
ph^ has joined #ruby
__class__ has quit [Ping timeout: 245 seconds]
Morkel has quit [Quit: Morkel]
emdub has quit [Quit: .]
thone_ has joined #ruby
krz has quit [Quit: krz]
wobr has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
emdub has joined #ruby
djdb has joined #ruby
busybox42 has quit [Ping timeout: 272 seconds]
Z_Mass has quit [Quit: Leaving]
__class__ has joined #ruby
thone has quit [Ping timeout: 252 seconds]
saschagehlich has quit [Quit: saschagehlich]
t57793 has quit [Remote host closed the connection]
t63481 has joined #ruby
Takehiro_ has quit [Remote host closed the connection]
Takehiro has joined #ruby
jeff_sebring has joined #ruby
Criztian has joined #ruby
w400z has joined #ruby
cezar has joined #ruby
cezar has quit [Remote host closed the connection]
chichou has quit [Remote host closed the connection]
wallerdev has joined #ruby
arkiver has quit [Quit: Leaving]
quazimodo has quit [Ping timeout: 264 seconds]
eldariof has joined #ruby
sn0wb1rd has quit [Quit: I will be right back]
Musfuut has quit [Read error: Operation timed out]
Criztian has quit [Remote host closed the connection]
IPGlider has joined #ruby
mistergibson has left #ruby ["PING 1346226957"]
G has quit [Ping timeout: 246 seconds]
dangerousdave has quit [Quit: Leaving...]
pskosinski has joined #ruby
mrdodo has joined #ruby
BiHi has joined #ruby
mc0e has quit [Ping timeout: 252 seconds]
elhu has joined #ruby
ringotwo has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
mrdodo has quit [Ping timeout: 252 seconds]
Musfuut has joined #ruby
Musfuut is now known as Guest19822
ringotwo has joined #ruby
G has joined #ruby
pskosinski has quit [Ping timeout: 252 seconds]
wallerdev has quit [Quit: wallerdev]
charliesome has joined #ruby
timonv has joined #ruby
timonv has quit [Remote host closed the connection]
Adran has quit [Read error: Operation timed out]
pdelgallego has joined #ruby
timonv has joined #ruby
tiripamwe has quit [Ping timeout: 264 seconds]
phrame has quit [Ping timeout: 240 seconds]
busybox42 has joined #ruby
lahwran has quit [Ping timeout: 276 seconds]
asteve has joined #ruby
asteve has left #ruby [#ruby]
timonv has quit [Remote host closed the connection]
nick_h has quit [Ping timeout: 246 seconds]
Vert has joined #ruby
cout has quit [Ping timeout: 252 seconds]
inimino has quit [Ping timeout: 252 seconds]
ringotwo has quit [Remote host closed the connection]
t63481 has quit [Remote host closed the connection]
namidark has quit [Ping timeout: 265 seconds]
t51740 has joined #ruby
rking has quit [Ping timeout: 272 seconds]
lorn_ has quit [Ping timeout: 265 seconds]
Beoran_ has joined #ruby
tdubz has joined #ruby
chaplain has quit [Read error: Connection reset by peer]
noam has joined #ruby
ph^ has joined #ruby
Beoran__ has quit [Ping timeout: 244 seconds]
timonv has joined #ruby
pikitgb has joined #ruby
phrame has joined #ruby
lorn has joined #ruby
rking has joined #ruby
cout has joined #ruby
<pikitgb> Hi i'm new in Ruby and my english is not very well i'm from Cuba. Please i need help for build an application to Connect to GCM(Google Cloud Messag..) any have an example or something ?
Quadrant_ has quit [Read error: Connection reset by peer]
ghanima has quit [Quit: Leaving.]
Quadrant_ has joined #ruby
namidark has joined #ruby
tdubz is now known as chaplain
Xeago has quit [Remote host closed the connection]
graspee has joined #ruby
Hanmac has quit [Ping timeout: 245 seconds]
forexwaldo has joined #ruby
gloomer has quit [Ping timeout: 252 seconds]
phrame has quit [Ping timeout: 245 seconds]
forexwaldo is now known as gloomer
dekroning has joined #ruby
lorn has quit [Ping timeout: 252 seconds]
richwestcoast has quit [Ping timeout: 252 seconds]
richwestcoast has joined #ruby
rking has quit [Ping timeout: 265 seconds]
namidark has quit [Ping timeout: 264 seconds]
cout has quit [Ping timeout: 268 seconds]
saispo has quit [*.net *.split]
Affix has quit [*.net *.split]
Hanmac has joined #ruby
cout has joined #ruby
phrame has joined #ruby
pikitgb has quit [Remote host closed the connection]
tiripamwe has joined #ruby
wobr1 has joined #ruby
namidark has joined #ruby
__class__ has quit [Ping timeout: 244 seconds]
mattsmith has joined #ruby
williamherry has joined #ruby
specialGuest has joined #ruby
lorn has joined #ruby
inimino has joined #ruby
Adran has joined #ruby
wobr has quit [Ping timeout: 244 seconds]
rking has joined #ruby
nick_h has joined #ruby
cascalheira has joined #ruby
__class__ has joined #ruby
<williamherry> gem install mysql fail, can some help http://pastebin.com/mYQHX3aJ
cascalheira has quit [Client Quit]
qwerxy has joined #ruby
<bnagy> williamherry: You have to install development tools first.
<bnagy> are you on osx?
<williamherry> bnagy, no, I am on centos 6.2
elaptics`away is now known as elaptics
<bnagy> hahah HAHAHA
<williamherry> bnagy, gcc ?
workmad3 has joined #ruby
<bnagy> ok well ( HAHAH ) it looks like you don't have gcc make etc
pingfloyd has quit [Quit: pingfloyd]
datapolitical has quit [Quit: This computer has gone to sleep]
<williamherry> bnagy, thanks, I am such fool
d3vic3 has quit [Read error: Connection reset by peer]
justsee has quit [Quit: Leaving...]
saschagehlich has joined #ruby
<bnagy> good luck with that centos
adeponte has quit [Remote host closed the connection]
nilg has quit [Remote host closed the connection]
saschagehlich_ has joined #ruby
berserkr has joined #ruby
Schmidt has quit [Ping timeout: 244 seconds]
Criztian has joined #ruby
lorn has quit [Ping timeout: 264 seconds]
d3vic3 has joined #ruby
phrame has quit [Ping timeout: 264 seconds]
cout has quit [Ping timeout: 246 seconds]
lorn has joined #ruby
saschagehlich has quit [Ping timeout: 264 seconds]
saschagehlich_ is now known as saschagehlich
phrame has joined #ruby
<charliesome> lol centos
nilg has joined #ruby
<charliesome> enjoy a 5 year old mysql ;)
cout has joined #ruby
t51740 has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
t30322 has joined #ruby
mneorr has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
robotmay has joined #ruby
<charliesome> check it out #ruby: http://exec.charlie.bz/
statarb3 has quit [Quit: Leaving]
baphled has joined #ruby
<fowl> hey thats pretty
<Muz> Not too different from codepad.org.
<fowl> Muz: this is the problem with codepad: http://codepad.org/gN7zTQ8r
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
M- has quit [Quit: This computer has gone to sleep]
haxrbyte has joined #ruby
geoffr has joined #ruby
rakunHo has quit [Read error: Connection reset by peer]
s1n4 has left #ruby ["leaving"]
<geoffr> Hi all, I'm trying out Goliath for a web service but need a route mapper, any suggestions ? I keep seeing examples for "map" in the Goliath::API but according to the dev it's been dropped in 1.0
burgestrand1 has joined #ruby
Banistergalaxy has quit [Ping timeout: 244 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
Seich has quit [Ping timeout: 252 seconds]
mengu has quit [Quit: Konversation terminated!]
<Muz> fowl: hahah.
lkba has quit [Quit: Bye]
burgestrand has quit [Ping timeout: 245 seconds]
sgmac has joined #ruby
sgmac has left #ruby [#ruby]
ringotwo has joined #ruby
Adran has quit [Read error: Operation timed out]
Affix has joined #ruby
saispo has joined #ruby
Affix has quit [Max SendQ exceeded]
phrame has quit [Ping timeout: 252 seconds]
Affix has joined #ruby
lorn has quit [Ping timeout: 252 seconds]
nick_h has quit [Ping timeout: 244 seconds]
cout has quit [Ping timeout: 245 seconds]
rking has quit [Ping timeout: 264 seconds]
namidark has quit [Ping timeout: 268 seconds]
inimino has quit [Ping timeout: 264 seconds]
atmosx has joined #ruby
JonnieCa1he|home has quit [Quit: Lost terminal]
mneorr has quit [Remote host closed the connection]
seich- has joined #ruby
mneorr has joined #ruby
cout has joined #ruby
nick_h has joined #ruby
mneorr has quit [Remote host closed the connection]
phrame has joined #ruby
mneorr has joined #ruby
lorn has joined #ruby
rking has joined #ruby
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
namidark has joined #ruby
<matti> ]
<matti> Oh dear.
<matti> ;]
inimino has joined #ruby
<banisterfiend> matti: your smiley needs urgent cataract surgery
<atmosx> Twitter::Search has changed on the latest twitter gem, doesn't exists hmm
<banisterfiend> atmosx: part of twitters evil plan to only let you use their twitter.com for all your tweeting needs
<atmosx> banisterfiend: … which means?
<banisterfiend> atmosx: it's a joke... :) but twitter keep restricting 3rd party twitter stuff
<atmosx> yes, I've read about it a lot
haxrbyte has quit [Remote host closed the connection]
<atmosx> they did not receive a serious outrage from devs though
freeayu has quit [Ping timeout: 265 seconds]
haxrbyte has joined #ruby
<banisterfiend> twitter has such an annoying UI, a competitor could probably clean up if they did a decent job
<Hanmac> matti: neko-smily Σ:3 casing mouse ~€:>
dgs|2 has joined #ruby
dgs has quit [Ping timeout: 260 seconds]
<bnagy> TIL Hanmac is a 15 year old japanese girl
jeff_sebring has quit [Remote host closed the connection]
rking has quit [Read error: Operation timed out]
<shevy> hmm
<shevy> he likes anime
<shevy> and his english is about as good as the average japanese girl as well
<shevy> *girl's english
<banisterfiend> bnagy: sup nags
lorn has quit [Ping timeout: 246 seconds]
<shevy> just woke up! sleepy in my head still :(
<bnagy> nm, banisterfiend
<banisterfiend> >> "hi"
<al2o3cr> (String) "hi"
<bnagy> going over 2 years of windows privesc bugs
haxrbyte has quit [Ping timeout: 245 seconds]
lorn has joined #ruby
namidark has quit [Ping timeout: 246 seconds]
rking has joined #ruby
<banisterfiend> bnagy: do you use "ronin" ?
<bnagy> not any more than the last time you asked me, no :)
<banisterfiend> oh..
<matti> Hanmac: Little mouse is so kawaii :)
<banisterfiend> bnagy: sorry, too much pot as a teenager has ruined my memory
<matti> shevy: Hi hi
<matti> banisterfiend: I also require a glass of Port.
namidark has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
Adran has joined #ruby
<bnagy> yeah too much Port as a teenager just leads to bathrooms that look like murder scenes
<bnagy> they used to do $5 flagons, BYO flagon, at the local bottle shop when I was ~17
<bnagy> dear god.
banisterfiend has joined #ruby
matrixise has joined #ruby
datapolitical has joined #ruby
<atmosx> banisterfiend: competitor like friendfeed?
<banisterfiend> atmosx: i dont know, never used that
w400z has quit [Quit: Computer has gone to sleep.]
nick_h has quit [Ping timeout: 245 seconds]
lorn has quit [Ping timeout: 252 seconds]
dgs|2 has quit [Read error: Connection reset by peer]
cout has quit [Ping timeout: 246 seconds]
inimino has quit [Ping timeout: 260 seconds]
<banisterfiend> bnagy: im trying to mess with calcc so i can get it to save continuations on arbitrary stack frames
namidark has quit [Ping timeout: 264 seconds]
<banisterfiend> rather than the current one
Adran has quit [Ping timeout: 244 seconds]
rking has quit [Ping timeout: 248 seconds]
dgs|2 has joined #ruby
phrame has quit [Ping timeout: 252 seconds]
haxrbyte has joined #ruby
<JonnieCache> bnagy: whats privesc bug audit for? work?
<bnagy> JonnieCache: just looking at attack surface, but yeah, work
<matti> bnagy: Haha
zhouqz has joined #ruby
phrame has joined #ruby
<matti> Hi hi banisterfiend
lorn has joined #ruby
pdelgallego has quit [Quit: pdelgallego]
nick_h has joined #ruby
<banisterfiend> matti: sup
rking has joined #ruby
<banisterfiend> rking: sup
tonini has quit [Remote host closed the connection]
inimino has joined #ruby
cascalheira has joined #ruby
namidark has joined #ruby
vlad_starkov has joined #ruby
mneorr has quit [Remote host closed the connection]
chendo_ has quit [Ping timeout: 252 seconds]
Adran has joined #ruby
mneorr has joined #ruby
Virunga has joined #ruby
jeff_sebring has joined #ruby
<banisterfiend> banisterfiend: sup
cout has joined #ruby
chendo_ has joined #ruby
pdelgallego has joined #ruby
Adran has quit [Read error: Operation timed out]
<Virunga> Hi fellas, check this out http://exec.charlie.bz/105
phrame has quit [Ping timeout: 264 seconds]
<Virunga> a pastebin that also executes the code!! Ruby, Python and Lua
ryanf has quit [Quit: leaving]
<banisterfiend> virunga: codepad has been doing that for years
<JonnieCache> maybe we should ask it to `sleep while true` ;)
<Virunga> banisterfiend: i didn't know it :)
lorn has quit [Ping timeout: 264 seconds]
<Muz> It was also already posted in here.
<banisterfiend> virunga: http://codepad.org/
<banisterfiend> :P
namidark has quit [Ping timeout: 260 seconds]
nick_h has quit [Ping timeout: 265 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
inimino has quit [Ping timeout: 264 seconds]
rking has quit [Ping timeout: 264 seconds]
cout has quit [Ping timeout: 260 seconds]
<Virunga> banisterfiend: but does it show the reuslt?
burgestrand1 has quit [Ping timeout: 244 seconds]
Xeago has joined #ruby
<Virunga> *result
<banisterfiend> virunga: if it doenst show the result it's a bit of a waste of time, no? :P
fermion has joined #ruby
mattsmith_ has joined #ruby
<banisterfiend> virunga: http://codepad.org/Y14iQcmc
<Virunga> banisterfiend: yep
<Virunga> nice
mattsmith__ has joined #ruby
mattsmith_ has quit [Read error: Connection reset by peer]
zhouqz has quit [Quit: Page closed]
<Mon_Ouie> JonnieCache: The funny thing is, that seems to get it stuck
<JonnieCache> lol yeah i just tried it, request is hanging
phrame has joined #ruby
<JonnieCache> and now all requests are hanging
<JonnieCache> oops
<JonnieCache> do you want to email him or should I? you could probably include more detail...
rking has joined #ruby
<banisterfiend> Mon_Ouie: JonnieCache: i guess they didnt forsee hackers of such skill breaking their systems
inimino has joined #ruby
mattsmith has quit [Ping timeout: 248 seconds]
mattsmith__ is now known as mattsmith
lorn has joined #ruby
lahwran has joined #ruby
lahwran has quit [Excess Flood]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
namidark has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego has joined #ruby
Adran has joined #ruby
<Mon_Ouie> JonnieCache: Feel free to do it yourself ;)
<Virunga> are you talking about exec.charlie.bz? Because it's stuck either
workmad3 has joined #ruby
<Virunga> *stucked
cout has joined #ruby
<banisterfiend> virunga: they used their exceptional programmers skills to bring down the system
<banisterfiend> programming
<Virunga> :D
<JonnieCache> i cant remember the details of why that breaks it tbh. obviously i know why it breaks it but i cant rememebr how it manages to affect the parent VM process as well
ringotwo has quit [Remote host closed the connection]
<Mon_Ouie> The only reason it breaks is that the loop never ends
<Virunga> you can contact him via twitter if you want
specialGuest has quit [Ping timeout: 264 seconds]
<JonnieCache> Mon_Ouie: yes but iirc just `loop {1}` didnt break the bot
Criztian has quit [Remote host closed the connection]
<Virunga> he put it online exactly one hour ago LOL
nick_h has joined #ruby
<JonnieCache> it was some combination of the sleep and the loop that buggered it
<JonnieCache> virunga: whats his twitter?
<Virunga> JonnieCache: @charliesome
<charliesome> JonnieCache: hi
<Virunga> here he is
<JonnieCache> ah. hi. sorry for breaking execpad.
<charliesome> JonnieCache: no problems, what did you do?
<JonnieCache> `sleep while true
<JonnieCache> `
<charliesome> fuck
<charliesome> oh well i know how to fix that
<Mon_Ouie> Even loop {} breaks this one
<bnagy> it's pretty obscure, not surprised you didn't think of it
<charliesome> Mon_Ouie: shouldn't do
<charliesome> JonnieCache: the problem is the time limiter counts cpu time instead of wall time
t30322 has quit [Remote host closed the connection]
<JonnieCache> charliesome: you may wish to look at https://github.com/jrajav/al2o3cr/
t91170 has joined #ruby
<JonnieCache> its the ruby executing bot in this channel, the author went through all of this last week
<JonnieCache> he's using a chroot jail
nari has quit [Ping timeout: 245 seconds]
<charliesome> i'm using a ptrace sandbox
<JonnieCache> also a good idea. as long as youre not sandboxing from within the ruby vm, that was judged to be a waste of time
<charliesome> alright, killed your script
gloomer has quit [Ping timeout: 268 seconds]
<charliesome> it should start processing the rest of the queue now
<charliesome> i'll add a wall time limit
Taichouchou2 has quit [Remote host closed the connection]
stuartrexking has quit [Quit: Leaving...]
<charliesome> JonnieCache: :\ how many did you do
<JonnieCache> just one
<JonnieCache> i cant speak for Mon_Ouie
<banisterfiend> charliesome: i did a hundy
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
Abbas- has quit [Changing host]
Abbas- has joined #ruby
<charliesome> there's 11 programs in the queue
Abbas- is now known as Abbas5
stuartrexking has joined #ruby
fyolnish_ has quit [Remote host closed the connection]
saschagehlich has quit [Read error: Connection reset by peer]
<Muz> charliesome: related to the site interface timing out and connections being reset?
<Mon_Ouie> I had only one too
saschagehlich has joined #ruby
<charliesome> Muz: there's a worker that runs the programs, but due to a mistake of mine it does cpu time limiting instead of wall time limiting
<charliesome> Muz: so 'sleep while true' holds up the entire queue forever
Taichouchou2 has joined #ruby
gloomer has joined #ruby
mattsmith has quit [Remote host closed the connection]
<JonnieCache> when we were testing the bot `sleep while true` had amazing abilities to bugger up the whole thing, not just the script-executing subprocesses
<JonnieCache> it was quite impressive
mattsmith has joined #ruby
<charliesome> JonnieCache: probably because of the user's process limit or something
<banisterfiend> Mon_Ouie: do you think the weeks you've spent hacking al2o3cr prepared you for the assult on charliesome's website?
<JonnieCache> it works now
<atmosx> anyone worked with 'tweetstream'
<banisterfiend> assault
<atmosx> ?
<JonnieCache> atmosx: i think a lot of the twitter api clients are breaking right now
celinedior has joined #ruby
<JonnieCache> because twitter took too much VC money and now they need it back ;)
<atmosx> JonnieCache: not yet, in theory will happen in a few months
<atmosx> JonnieCache: my question about it more straight forward though… I see that it requires user/pass (oauth/basic auth). I wonder it if can be used to gather raw tweets from all over the place...
ringotwo has joined #ruby
<banisterfiend> JonnieCache: arey ou in on this app.net band wgaon?
<banisterfiend> wagon
<JonnieCache> nope
<banisterfiend> many programmer seem to be foaming at the tits over it
<charliesome> i don't see how it's any better than twitter tbh
<Muz> It's yet to suffer an Eternal September.
<charliesome> it doesn't solve the real problem
<Muz> That's the only real appeal.
<JonnieCache> because you have pay for it
<JonnieCache> and therefore they wont be beholden to advertisers and partners and so on
Abbas5 is now known as Abbas|
<banisterfiend> charliesome: because they're more accomodating to developers i think
<charliesome> did paid accounts make something awful a paragon of quality?
<charliesome> banisterfiend: twitter were super pro-developer in the beginning as well weren't they?
<JonnieCache> no, but they wont have to lock off the api like twitter are doing
Takehiro has quit [Remote host closed the connection]
adambeynon has joined #ruby
ringotwo has quit [Remote host closed the connection]
<JonnieCache> i dont even use g+ i really should get on that bandwagon
cantonic has quit [Quit: cantonic]
<JonnieCache> the problem is i use social networks exclusively to interact with irl friends, so realisticly im not leaving facebook any time soon
bigkevmcd has quit [Ping timeout: 245 seconds]
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
ringotwo has joined #ruby
bigkevmcd has joined #ruby
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
<atmosx> I closed facebook account for the summer and I'm not gonna open it
<atmosx> I'll close it permanently on sept
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
<charliesome> so who was it that broke it in the first place?
<charliesome> i might set up a security page and credit you
<JonnieCache> i think me and Mon_Ouie did it at pretty much the same time.
<JonnieCache> but that line was his idea originally
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
jeff_sebring has quit [Quit: Leaving]
stuartrexking has quit [Quit: Leaving...]
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
Takehiro has joined #ruby
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
Taichouchou2 has quit [Remote host closed the connection]
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
lahwran| has joined #ruby
lahwran| has quit [Excess Flood]
jjang has quit [Remote host closed the connection]
ringotwo has quit [Remote host closed the connection]
aki__ has joined #ruby
t91170 has quit [Remote host closed the connection]
t28914 has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
ananthakumaran2 has joined #ruby
stuartrexking has joined #ruby
lahwran| has joined #ruby
tiripamwe has quit [Ping timeout: 252 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
wpaulson has joined #ruby
x0F_ is now known as x0F
dhruvasagar has quit [Ping timeout: 244 seconds]
datapolitical has quit [Quit: This computer has gone to sleep]
dhruvasagar has joined #ruby
ananthakumaran has quit [Ping timeout: 244 seconds]
Guest19822 has quit [Read error: Operation timed out]
G has quit [Ping timeout: 240 seconds]
twigmorewelsh has quit [Quit: Linkinus - http://linkinus.com]
lampe2 has joined #ruby
twigmorewelsh has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
aki__ has quit [Ping timeout: 264 seconds]
Abbas| has quit [Ping timeout: 246 seconds]
Taichouchou2 has joined #ruby
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
robotmay has quit [Ping timeout: 264 seconds]
BiHi has quit [Quit: Computer has gone to sleep]
pskosinski has joined #ruby
robotmay has joined #ruby
ph^ has quit [Remote host closed the connection]
dgs|2 has quit [Ping timeout: 265 seconds]
dgs|2 has joined #ruby
dgs|2 has quit [Read error: Operation timed out]
ph^ has joined #ruby
dgs|2 has joined #ruby
arkiver has joined #ruby
Schmidt has joined #ruby
<charliesome> what's the best way to get the path to the ruby binary?
<Hanmac> charliesome from inside ruby or from outside?
vlad_starkov has joined #ruby
<charliesome> inside
t28914 has quit [Remote host closed the connection]
<bnagy> RbConfig::CONFIG
t15705 has joined #ruby
<Hanmac> >> RbConfig.ruby
<al2o3cr> (String) "/usr/bin/ruby"
haxrbyte has quit [Remote host closed the connection]
<charliesome> Hanmac: cheers!
haxrbyte has joined #ruby
aki__ has joined #ruby
<Hanmac> RbConfig.ruby is yetanother undocumented function :D
atmosx has quit [Ping timeout: 244 seconds]
<bnagy> yeah for a sec I thought the whole thing might be an ostruct, but it's not :(
robotmay_ has joined #ruby
<JonnieCache> RbConfig. wtf.
<JonnieCache> let me guess its a grab bag of utility functions?
<Hanmac> yeah an collection of deprecated functions :D
robotmay has quit [Ping timeout: 264 seconds]
pipopopo has joined #ruby
<Hanmac> charliesome: you could use Gem.ruby too
<Hanmac> >> Gem.ruby
<al2o3cr> (String) "/usr/bin/ruby"
mneorr_ has joined #ruby
stuartrexking has quit [Quit: Leaving...]
mneorr has quit [Ping timeout: 265 seconds]
havenn has joined #ruby
richwestcoast has quit [Ping timeout: 268 seconds]
M- has joined #ruby
richwestcoast has joined #ruby
Dr4g|bbs is now known as Dr4g
burgestrand has joined #ruby
Criztian has joined #ruby
haxrbyte_ has joined #ruby
butblack has quit [Quit: butblack]
hackeron has quit [Ping timeout: 265 seconds]
haxrbyt__ has joined #ruby
Spooner has joined #ruby
haxrbyte has quit [Ping timeout: 264 seconds]
stuartrexking has joined #ruby
celinedior has quit [Quit: celinedior]
haxrbyte_ has quit [Ping timeout: 264 seconds]
haxrbyte has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
Taichouchou2 has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
haxrbyt__ has quit [Ping timeout: 264 seconds]
justsee has quit [Quit: Leaving...]
haxrbyt__ has joined #ruby
haxrby___ has joined #ruby
haxrbyte has quit [Ping timeout: 244 seconds]
jeznet has joined #ruby
haxrbyte has joined #ruby
haxrbyte_ has quit [Ping timeout: 264 seconds]
jeznet has quit [Remote host closed the connection]
pskosinski has quit [Read error: No route to host]
jeznet has joined #ruby
jeznet has quit [Remote host closed the connection]
pskosinski has joined #ruby
iori has joined #ruby
haxrbyt__ has quit [Ping timeout: 264 seconds]
jeznet has joined #ruby
jeznet has quit [Client Quit]
haxrby___ has quit [Ping timeout: 252 seconds]
jeznet has joined #ruby
jeznet has quit [Remote host closed the connection]
_pdelgallego has quit [Remote host closed the connection]
mdmdm has joined #ruby
jeznet has joined #ruby
pskosinski has quit [Ping timeout: 252 seconds]
jeznet has quit [Client Quit]
nateberkopec has joined #ruby
jeznet has joined #ruby
williamherry has quit [Read error: Connection reset by peer]
Jay_Levitt has quit [Quit: Jay_Levitt]
deryl has joined #ruby
roflmaus has joined #ruby
stuartrexking has quit [Quit: Leaving...]
G has joined #ruby
williamherry has joined #ruby
deryldoucette has joined #ruby
lkba has joined #ruby
t15705 has quit [Remote host closed the connection]
pdtpatrick has joined #ruby
Musfuut has joined #ruby
lolmaus has quit [Read error: Connection reset by peer]
t9647 has joined #ruby
justinmcp has joined #ruby
mattsmith_ has joined #ruby
mattsmith_ has quit [Client Quit]
Zolrath has joined #ruby
lampe2 has quit [Quit: Verlassend]
mattsmith_ has joined #ruby
deryl has quit [Ping timeout: 265 seconds]
deryldoucette is now known as deryl
fyolnish_ has joined #ruby
<rking> banisterfiend: sup, indeed.
roflmaus has quit [Read error: Connection reset by peer]
fastred has joined #ruby
pskosinski has joined #ruby
mattsmith has quit [Ping timeout: 268 seconds]
mattsmith_ is now known as mattsmith
lolmaus has joined #ruby
chimay has joined #ruby
geoffr has quit [Quit: Leaving]
geekbri has joined #ruby
jeznet has quit [Remote host closed the connection]
dgs has joined #ruby
dgs|2 has quit [Ping timeout: 264 seconds]
und3f has quit [Read error: Connection reset by peer]
und3f1 has joined #ruby
hsbt is now known as hsbt_away
Zolrath has quit [Quit: Computer has gone to sleep.]
chimay_1 has joined #ruby
tk__ has joined #ruby
chimay has quit [Ping timeout: 276 seconds]
aki__ has quit [Read error: Connection reset by peer]
dgs has quit [Ping timeout: 252 seconds]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
statarb3 has quit [Client Quit]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
ph^ has quit [Remote host closed the connection]
jjbohn has joined #ruby
pdelgallego has joined #ruby
statarb3 has quit [Client Quit]
statarb3 has joined #ruby
jjbohn has quit [Client Quit]
dpk has joined #ruby
statarb3 has quit [Client Quit]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
twinturbo has joined #ruby
twinturbo has quit [Client Quit]
randomgry has joined #ruby
dgs has joined #ruby
Kudos has joined #ruby
<Kudos> i'm trying to get a sinatra app to connect to a postgres db in development
<Kudos> conn = PG.connect( dbname: 'plaintextme', host: 'localhost', port:'5432' )
<Kudos> sql = conn.exec("SELECT * FROM domains WHERE name = '"+ params['domain']+ "'") do |result|
joukokar has joined #ruby
<JonnieCache> if you have code to share, use pastie or gist
<Kudos> throws up an error about the relation 'domains' not existing
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<Kudos> JonnieCache, i read and obeyed the topic ;P
<JonnieCache> the trailing `do |result|` lead me to believe there was more coming :)
iamvery has joined #ruby
<Kudos> heh, it bugs out before that
<JonnieCache> postgres differs from mysql in that it automatically connects as the username running the process
rohit_rohit has joined #ruby
<JonnieCache> so if your unix account username was kudos it would assume a database user called kudos
rohit_rohit has quit [Remote host closed the connection]
<JonnieCache> maybe you created your domains database under a different username?
<Kudos> the database user and unix account user are both kudos
<bnagy> also, that's a horrible way to build strings
<JonnieCache> oh yeah thats an sqli attack vector right there
<JonnieCache> dont do that
<Kudos> bnagy: yeah, i'm paring it back
<bnagy> it took me three reads through to work out it was even valid syntax
_rohit__ has joined #ruby
<Kudos> trying to remove as many cogs as possible to get it working
<Kudos> then putting prepared statements back in
<bnagy> no I just mean use interpolation
<bnagy> the sqli is your problem, reading it is mine
<JonnieCache> no! dont use interpolation! ;)
<Kudos> lol
<Kudos> what's the idiom in ruby?
<bnagy> also + builds a new string
<Kudos> "%s", varname ?
<JonnieCache> it would be "SELECT * FROM domains WHERE name = '"+ params['domain']+ "'"
<JonnieCache> oops
_rohit__ has quit [Client Quit]
BiHi has joined #ruby
iamvery has quit [Remote host closed the connection]
<Kudos> "SELECT * FROM domains WHERE name = '%s'", params['domain']
<Kudos> like that?
d3vic3 has quit [Read error: Connection reset by peer]
luist has quit [Quit: luist]
<bnagy> "SELECT * from #{tablename}"
pskosinski has quit [Ping timeout: 264 seconds]
<JonnieCache> >> params = {'domain => "foo" }; "SELECT * FROM domains WHERE name = '#{params['domain']}'"
<al2o3cr> -e:1:in `eval': (eval):1: syntax error, unexpected '\n', expecting tASSOC (SyntaxError), ...E name = '#{params['domain']}'", ... ^, from -e:1:in `<main>'
<JonnieCache> goddammit
<Kudos> ah, ok
<JonnieCache> >> params = {'domain' => "foo" }; "SELECT * FROM domains WHERE name = '#{params['domain']}'"
<al2o3cr> (String) "SELECT * FROM domains WHERE name = 'foo'"
<Kudos> anyway, back to the larger problem
pdelgallego has quit [Remote host closed the connection]
<JonnieCache> >> "strings #{Time.now} lol"
<al2o3cr> (String) "strings 2012-08-29 11:49:31 +0000 lol"
<JonnieCache> anyway
ThaDick has joined #ruby
<Kudos> is there any way i can inspect the postgres connection in ruby?
<Kudos> or some other debugging technique to figure out what's going on
<JonnieCache> the best way to inspect things in ruby is to drop into pry
<JonnieCache> and then poke at the object in question until you become enlightened
<JonnieCache> http://pryrepl.org/
<bnagy> I would inspect the raw query and then connect via the postgres console things and run the exact query
<Kudos> does that need to be run interactively or can i run it in the sinatra context?
<bnagy> also, I wouldn't be using PG directly
<Kudos> bnagy
<JonnieCache> Kudos: both
<Kudos> the query works fine in psql
<Kudos> and I'm using pg directly because I'm new at PG too
<JonnieCache> Kudos: you install the gem, then put `binding.pry` where you want the console to start
<JonnieCache> the console is then running in that context
<Kudos> JonnieCache: awesome
_rohit has joined #ruby
<bnagy> then maybe you're not sending that query you think you are
<Kudos> bnagy: it reads the query back to me in the error
<Kudos> when i run that exact query, it works
<JonnieCache> you must not be connected to the part of the db you think you are
<Hanmac> >> params = {domain: "foo" }; "SELECT * FROM domains WHERE name = '%{domain}'" % params
<al2o3cr> (String) "SELECT * FROM domains WHERE name = 'foo'"
Guedes_out is now known as Guedes
<Kudos> Hanmac: nice
pdelgallego has joined #ruby
<JonnieCache> i had that problem with i first switched to pgsql. for me it was the implicit username thing
mneorr_ has quit [Remote host closed the connection]
<Kudos> JonnieCache: i suspect that, but I can't understand why
mneorr has joined #ruby
<JonnieCache> it has some sort of namespace setup as well
<JonnieCache> since i figured it out, i havent needed to touch it, so i cant quite remember
<JonnieCache> i imagine when this app gets deployed that will all have to change
matrixise has quit [Read error: No route to host]
<Kudos> probably, i'm happy enough to figure it all out again then :P
matrixise has joined #ruby
PhoSor has quit [Ping timeout: 272 seconds]
<Kudos> pry is pretty damn sweet, now poking PG
cbuxton has quit [Ping timeout: 265 seconds]
mattsmith has quit [Remote host closed the connection]
mattsmith has joined #ruby
baphled has quit [Ping timeout: 245 seconds]
jasonkuhrt has joined #ruby
_pdelgallego has joined #ruby
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego is now known as pdelgallego
_rohit has quit [Quit: Leaving]
william1 has joined #ruby
iamjarvo has joined #ruby
WeThePeople has joined #ruby
atmosx has joined #ruby
william1 has quit [Read error: Connection reset by peer]
ZachBeta has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
dgs has quit [Ping timeout: 252 seconds]
freeayu has joined #ruby
luist has joined #ruby
randomgry has quit [Quit: gone]
t9647 has quit [Remote host closed the connection]
t38861 has joined #ruby
williamherry has quit [Quit: Leaving]
hsbt_away is now known as hsbt
mattsmith has left #ruby [#ruby]
IPGlider has quit []
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
<JonnieCache> whats a url that returns my ip address as text/plain and nothing else?
<JonnieCache> i can never seem to remember
<matti> From the top of my head.
<JonnieCache> no that returns html
<JonnieCache> ifconfig.me was the one i wanted
`brendan has joined #ruby
<matti> Oh, OK :)
carloslopes has joined #ruby
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
fantazo has joined #ruby
Koshka1 has joined #ruby
pdelgallego has quit [Remote host closed the connection]
jjbohn has joined #ruby
Squarepy has joined #ruby
krawchyk has joined #ruby
lahwran| is now known as lahwran
lahwran has quit [Changing host]
lahwran has joined #ruby
yasushi has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
b26 has joined #ruby
b26 has quit [Client Quit]
hackeron has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
ando12345_ has joined #ruby
haxrbyte_ has joined #ruby
ando12345 has joined #ruby
stuartrexking has joined #ruby
Koshka1 has left #ruby [#ruby]
banisterfiend has quit [Read error: Connection reset by peer]
arkiver has quit [Quit: Leaving]
banisterfiend has joined #ruby
PhoSor has joined #ruby
paulovittor23 has joined #ruby
gfkjunior has quit [Quit: Leaving]
mmitchell has joined #ruby
nwest has joined #ruby
haxrbyte has quit [Ping timeout: 264 seconds]
luist has quit [Quit: luist]
t38861 has quit [Remote host closed the connection]
Squarepy has quit [Changing host]
Squarepy has joined #ruby
ando12345_ has quit [Ping timeout: 244 seconds]
t79799 has joined #ruby
ando12345_ has joined #ruby
nari has joined #ruby
`brendan has joined #ruby
Hanmac has quit [Ping timeout: 244 seconds]
haxrbyte has joined #ruby
ando12345 has quit [Ping timeout: 244 seconds]
ando12345 has joined #ruby
sailias has joined #ruby
Axsuul has quit [Ping timeout: 268 seconds]
jjbohn has quit [Quit: Leaving...]
Jay_Levitt has joined #ruby
M- has quit [Quit: This computer has gone to sleep]
Jay_Levitt has quit [Client Quit]
ando12345_ has quit [Ping timeout: 245 seconds]
<JonnieCache> ack is brilliant. how did we spend so long doing that find/grep dance?
haxrbyte_ has quit [Ping timeout: 264 seconds]
<JonnieCache> i hated it every single time
johnjohnson has joined #ruby
<hoelzro> ack++
<hoelzro> er, ack ++ 1
<hoelzro> dammit
<hoelzro> ack += 1
<hoelzro> there we go
<nw> not sure if's better than ack, but it's faster
<hoelzro> it's faster, but not as flexible
<nw> and 33% shorter, of course!
<nw> hoelzro: okay
<hoelzro> iirc, ag doesn't find scripts via the shebang line
<nw> haven't really compared them too extensively
<JonnieCache> faster? i should have asked earlier
<hoelzro> I'm heavily biased ;)
<matti> Don't we all ;p
<JonnieCache> im running ack against my entire projects directory and its taking ages
<hoelzro> JonnieCache: what version?
<JonnieCache> dunno. the latest one
<hoelzro> of 1.x or 2.x?
haxrbyte has quit [Ping timeout: 252 seconds]
pskosinski has joined #ruby
richwestcoast has quit [Ping timeout: 256 seconds]
<JonnieCache> 1.96
<JonnieCache> didnt know about 2
drago757 has joined #ruby
<hoelzro> it's still in alpha
<hoelzro> but I've been using it as my main ack for over three months without problems
richwestcoast has joined #ruby
hackeron has quit [Ping timeout: 240 seconds]
<JonnieCache> i have it installed through homebrew so ill probably leave it like that
<JonnieCache> it does look good though
dmiller has joined #ruby
haxrbyte has joined #ruby
<JonnieCache> i only really use it to search massive trees, sublime's search-in-project does fine for everyday duties
<burgestrand> JonnieCache: git grep (:
mohits has quit [Quit: Leaving]
<JonnieCache> there's that too. sublime's returns within about 2 seconds on even the most bloated projects so ive never had a problem
pskosinski has quit [Read error: No route to host]
<JonnieCache> damn, ag is fast though! several orders of magnitude
<hoelzro> JonnieCache: it's because ag doesn't open nearly as many files as ack
<hoelzro> but ack picks up more files
<hoelzro> it's a tradeoff
<JonnieCache> also i used the --literal option
<hoelzro> you can turn that feature off, though
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
<JonnieCache> my standard use case is "search for this literal in this ill-advisedly large tree of code" so ag is perfect
<JonnieCache> like just now i needed to find uses of an api key accross all projects
<JonnieCache> and yes, i know i shouldnt really have api keys in code repos.
t79799 has quit [Remote host closed the connection]
t49014 has joined #ruby
burgestrand1 has joined #ruby
Virunga has quit [Read error: Connection reset by peer]
Progster has joined #ruby
burgestrand has quit [Ping timeout: 268 seconds]
heisenmink has quit [Remote host closed the connection]
atmosx has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
[Neurotic] has quit [Remote host closed the connection]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
fastred has quit [Quit: fastred]
<atmosx> any idea how can I find the gelocation codes for a country?
<atmosx> Entire country area
<JonnieCache> what do you mean geolocation codes?
fastred has joined #ruby
Hanmac has joined #ruby
<johnjohnson> latitude and longitude?
<johnjohnson> LOL
<johnjohnson> If so, good luck :o
<JonnieCache> so you mean the lat/lng for each point along a country's border?
havenn has quit [Ping timeout: 244 seconds]
<JonnieCache> yeah good luck with that one :)
<johnjohnson> lol
<johnjohnson> just walk the entire circumference with a GPS and log all points
<JonnieCache> i dont think such information even exists. borders rarely work like that
cuit has joined #ruby
<johnjohnson> I know
<JonnieCache> even in central europe theyre disputed
iamjarvo has quit [Ping timeout: 244 seconds]
ando12345_ has joined #ruby
<cuit> What kind of program do your peoples think is good to aspire to make properly when learning to program? for example making a syntax highlighting text editor or something, something that pulls together lots of aspects of the language and technologies
<JonnieCache> something that you personally want to use. this will give you the insight and motivation you need to follow it through
<johnjohnson> cuit: good luck making a GUI based text-editor in Ruby if you're just starting out :o
<JonnieCache> otherwise, it isnt massively important what you do
<JonnieCache> but yeah editors are HARD
sailias has quit [Ping timeout: 244 seconds]
<johnjohnson> cuit: start simple. When I first started Ruby (not too long ago), I wrote a simple text-based game in console, and saved data into a CSV file for next run.
<cuit> JonnieCache: yea was an example, this is why I'm asking because I'm struggling to think of something
ando12345 has quit [Ping timeout: 256 seconds]
ctwiz has joined #ruby
dmiller has quit [Ping timeout: 240 seconds]
t49014 has quit [Remote host closed the connection]
<cuit> johnjohnson: that's a good idea
kiyoura has joined #ruby
t40437 has joined #ruby
<JonnieCache> making simple games is rewarding and teaches a variety of skills. you can extend it in many different ways too
<johnjohnson> cuit: yeah, it covered almost everything important within the language that you'd need to learn
<cuit> johnjohnson: could also make it use a sqlite db untill you want to export the data to csv
<cuit> johnjohnson: I quite like that idea, thanks
<johnjohnson> cuit: yep, indeed
<johnjohnson> Now, I don't mean try to go and emulate space invaders in console :D
My_Hearing has joined #ruby
<JonnieCache> why not?
<johnjohnson> It was a simple text-based strategy type game
<burgestrand1> game of life
burgestrand1 is now known as burgestrand
<johnjohnson> Like 'Press Q to walk forward and enter the room'
<cuit> johnjohnson: lol yup,
<cuit> those are the best games anyway ;D
<burgestrand> cuit: http://en.wikipedia.org/wiki/Conway's_Game_of_Life
<workmad3> johnjohnson: text adventure?
BrokenCog has quit [Quit: leaving]
<johnjohnson> workmad3: yeah
<JonnieCache> the game of life is a good one
<workmad3> although conway is pretty good for coding practice too :)
<johnjohnson> well, something stupid I came up with as far as the story line
<JonnieCache> or write a sudoku solver
<johnjohnson> My story line was actually based on gay zombie dogs so..
<JonnieCache> hahahaha amazing
<johnjohnson> lol
<johnjohnson> I can't learn when I'm doing a project someone else is trying to teach. I have to do something I'm interested in
<cuit> alright I've written up my plan, the story is going to be about gay zombie do-.. Damn! beat me to it
<johnjohnson> :D
Jay_Levitt has joined #ruby
<johnjohnson> There's always cats
Mon_Ouie has quit [Ping timeout: 264 seconds]
<cuit> It's just not the saaaame
PhoSor has left #ruby [#ruby]
enroxorz-work has joined #ruby
enroxorz-work has quit [Changing host]
enroxorz-work has joined #ruby
luist has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
ando12345_ has left #ruby [#ruby]
Faris has joined #ruby
Squarepy has joined #ruby
My_Hearing is now known as Mon_Ouie
<johnjohnson> Do you guys know if TempFile stores the file in-memory or actually persists it to disk? I need a way to store a file in-memory only for a short amount of time.
dhruvasagar has quit [Ping timeout: 245 seconds]
<hoelzro> johnjohnson: I'm not certain, but I would guess it creates a file in TMPDIR
<hoelzro> which defaults to /tmp on *nix systems
<hoelzro> which may or may not be an in-memory filesystem
heisenmink has joined #ruby
Banistergalaxy has joined #ruby
<Mon_Ouie> If you want in-memory IO-like objects, you can use StringIO
Squarepy has quit [Changing host]
Squarepy has joined #ruby
GoGoGarrett has joined #ruby
haxrbyte has quit [Ping timeout: 245 seconds]
seanwash has joined #ruby
Takehiro has quit [Remote host closed the connection]
<johnjohnson> StringIO eh
a_a_g has quit [Quit: Leaving.]
<johnjohnson> That may be worth a try
<johnjohnson> The only problem is I have to actually send the file like it's an actual file object later on
<johnjohnson> but at the same time I can't persist it to disk :/
t40437 has quit [Remote host closed the connection]
t48295 has joined #ruby
ph^ has joined #ruby
drago757 has quit [Quit: drago757]
<libryder> isn't NotImplementedException a valid exception?
<libryder> i get unitialized constant NotImplementedException when i try to raise it
jorge_ has joined #ruby
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
freeayu has quit [Quit: 离开]
Faris has left #ruby [#ruby]
mklappstuhl has joined #ruby
<mklappstuhl> hey
miho has joined #ruby
jrist-afk is now known as jrist
<libryder> got it: raise ScriptError::NotImplementedError
<libryder> or raise NotImplementedError.new("Message")
mmitchell has quit [Remote host closed the connection]
MarioEIU has joined #ruby
cantbecool has joined #ruby
specialGuest has joined #ruby
niklasb has joined #ruby
s1n4 has joined #ruby
s1n4 has quit [Client Quit]
stuartrexking has quit [Ping timeout: 260 seconds]
jasonkuhr has joined #ruby
aristidesfl has joined #ruby
mmitchell has joined #ruby
mneorr has quit [Remote host closed the connection]
jasonkuhrt has quit [Ping timeout: 244 seconds]
thunderstrike has quit [Remote host closed the connection]
Quadrant has joined #ruby
justsee has quit [Quit: Leaving...]
infinitiguy has joined #ruby
Quadrant_ has quit [Ping timeout: 265 seconds]
iamjarvo has joined #ruby
jclem has quit [Quit: Linkinus - http://linkinus.com]
johnlcox has joined #ruby
joshman_ has joined #ruby
yasushi has quit [Remote host closed the connection]
uris has joined #ruby
mneorr has joined #ruby
yasushi has joined #ruby
Takehiro has joined #ruby
moshef has joined #ruby
Quadrant_ has joined #ruby
Quadrant has quit [Read error: Connection reset by peer]
Taichouchou2 has joined #ruby
<moshef> is it possible to define an attribute with a case statement? so I won't have to write: when 'x' then q = 1, when 'y' then q = 2 etc. just define q = and then when 'x' then 1 etc. is it possible?
<Mon_Ouie> Yes
<moshef> how?
<Mon_Ouie> Just like you said?
<moshef> q = case … ?
<Mon_Ouie> Yes
Taichouchou2 has quit [Remote host closed the connection]
<moshef> looks ugly, ill confirm
<moshef> thought there might be a better way :)
cuit has quit [Quit: Konversation terminated!]
yasushi has quit [Remote host closed the connection]
<Hanmac> >> a = case "z"; when "x";0;when "y";1;when "z";3;end; a;
<al2o3cr> (Fixnum) 3
ph^ has quit [Remote host closed the connection]
Paul-Atreides has joined #ruby
Paul-Atreides has quit [Changing host]
Paul-Atreides has joined #ruby
enroxorz-work has quit [Read error: Connection reset by peer]
<lectrick> If I define a self.included hook, does the include still proceed or do I have to do it myself?
ananthakumaran2 has quit [Quit: Leaving.]
<banisterfiend> it proceeds
<JonnieCache> its just a callback, you dont have to actually do the inclusion
<lectrick> So how would I cancel the inclusion, theoreticalliy?
<banisterfiend> you'd have to override a method called append_features i think
<lectrick> interesting. i can take it from here. thanks banisterfiend
<banisterfiend> yep
burgestrand1 has joined #ruby
lolmaus has quit []
awarner has joined #ruby
<lectrick> banisterfiend: a gist just for something I just googled? :)
<banisterfiend> lectrick: it took me 2 seconds to type: gist -d Module#append_features
<banisterfiend> :)
iori has quit [Remote host closed the connection]
Eplemosen has joined #ruby
<lectrick> banisterfiend: I figured. just seems wasteful of github resources haha
mahmoudimus has joined #ruby
rippa has joined #ruby
t48295 has quit [Remote host closed the connection]
<banisterfiend> lectrick: if you used pry more u wouldn't have to google
<lectrick> they just scored a nice funding round btw
<JonnieCache> what, again?
t99256 has joined #ruby
<lectrick> banisterfiend: I'm getting around to it! haha. I was actually looking through the Pry source yesterday to see how its magic worked
burgestrand has quit [Ping timeout: 265 seconds]
<banisterfiend> lectrick: i hoped you read the source in pry itself
<lectrick> JonnieCache: Yeah, I think so.
<banisterfiend> if you were reading pry's source in an editor i wll slap u
noyb has quit [Ping timeout: 244 seconds]
<lectrick> JonnieCache: Hmmm, maybe it's old news. Just saw it mentioned recently tho
<lectrick> banisterfiend: so I should have pried pry? :)
<lectrick> banisterfiend: i have a shortcut that opens a gem in sublime, don't hate me haha
<lectrick> either that or I git clone it and then look
<JonnieCache> theres `bundle open`
<banisterfiend> hehe, just: show-source Pry
<lectrick> yes, my shortcut uses that if available
<banisterfiend> or show-source Pry#method_of_your_choice
<JonnieCache> maybe theres now `gem open` too
<lectrick> does Pry provide show-source ?
<banisterfiend> lectrick: yes, it can show source for methods and classes/modules
ph^ has joined #ruby
chussenot has quit [Read error: Connection reset by peer]
<lectrick> banisterfiend: I don't have show-source in my path
<banisterfiend> lectrick: show-source is to be accessed inside pry ;)
<lectrick> ah, duh
chussenot has joined #ruby
ph^ has quit [Remote host closed the connection]
<banisterfiend> think of Pry as bash for ruby code, it supports cd/ls and show-source,show-doc, and so on
<lectrick> there's a lot of nastiness it has to do to do what it does, btw. I wish ruby was even more introspective so that would be easier
<banisterfiend> lectrick: what kidn of nastiness btw?
<lectrick> yeah, i've used it a bit
jlebrech has joined #ruby
MarioEIU has left #ruby ["Leaving"]
<jlebrech> #createastoryusinggemnames
jjbohn has joined #ruby
<lectrick> banisterfiend: just the usual ruby narstiness. I'm working on implementing a functional Refinements implementation using pure Ruby so I've had my head in that stuff lately
<banisterfiend> lectrick: just curious what specific nastiness u mean?
<lectrick> set_trace_func
<lectrick> instance_eval with strings
workmad3_ has joined #ruby
<lectrick> that sort of stuff
seanwash has quit [Quit: Leaving.]
workmad3 has quit [Disconnected by services]
workmad3_ is now known as workmad3
burgestrand1 has quit [Quit: Leaving.]
<lectrick> manipulation of binding
joephelius has joined #ruby
<banisterfiend> lectrick: hmm, set_trace_func isn't really used afaik, i think it was used originally to backport source_location for 1.8, but shouldn't really be there anymore
<lectrick> ah that's good then
QKO_ has joined #ruby
moshef has quit [Quit: moshef]
<lectrick> well when I push a working version of my idea, maybe someone can help me get off of set_trace_func to implement a "class just finished being defined" callback :)
ph^ has joined #ruby
<shevy> hmm
ThaDick has quit [Quit: zzzZZZ ...]
<shevy> set_trace_func only works with global variables or?
<banisterfiend> lectrick: if u dont want that to be super slow i'd probably use rb_event_hook instead
ph^ has quit [Remote host closed the connection]
<lectrick> shevy: I overrode it to work with a stack
<shevy> aha
<lectrick> banisterfiend: rb_event_hook? off to google
<lectrick> oh wait! I've seen this just yesterday!
<banisterfiend> lectrick: also, string-based instance_eval is only used in one place, to generate a binding object in the proper scope :)
<lectrick> Yes, I was going to move to that... after I had it passing tests
jorge_ has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
QKO has quit [Ping timeout: 252 seconds]
<banisterfiend> lectrick: we do use Binding#eval a lot, but that's because that's the only API offered by Binding, and i think it's pretty awesome, personally :)
<lectrick> banisterfiend: Yes, I know why it's used, having had to deal with scopes and bindings a ton lately myself... very good learning experience btw
<lectrick> banisterfiend: It works well. I didn't say it didn't work well, I said it was kinda ugly haha
jorge has joined #ruby
seanwash has joined #ruby
krawchyk_ has joined #ruby
<banisterfiend> lectrick: well, a REPL by definition has to use string evals :) i dont think a repl, any repl in any language (except retarded static languages that recomplie everything each time) would be using string evals i think
jorge has quit [Remote host closed the connection]
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
<banisterfiend> s/by definition/by nature
<lectrick> banisterfiend: True.
stopbit has joined #ruby
t99256 has quit [Remote host closed the connection]
t44786 has joined #ruby
rins has quit [Quit: leaving]
ThaDick has joined #ruby
krawchyk has quit [Ping timeout: 245 seconds]
<lectrick> You know how I found event_hook? I looked through the source of set_trace_func and saw that it called rb_add_event_hook and I go, "I bet someone wrapped that sucker separately"
<lectrick> boom, zenspider
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<banisterfiend> hehe
<lectrick> I don't understand how it's faster tho since it seems to get the same set of args that set_trace_func does
<banisterfiend> nah
<banisterfiend> if u look at set_trace_func source
<lectrick> or maybe the example is just bad
<banisterfiend> (u can do that in pry using: show-source set_trace_func)
fearoffish has joined #ruby
<banisterfiend> u can see set_trace_func sets up an event hook for all events
<lectrick> no shit. ok how do I fire up a Pry REPL again?
<banisterfiend> gem install pry pry-doc
<banisterfiend> u need to install pry-doc for C source/docs
<banisterfiend> then: pry
<lectrick> it's already in the bundle. oh ok
<banisterfiend> to start it, then show-source set_trace_func
w400z has joined #ruby
sailias has joined #ruby
nari has quit [Ping timeout: 260 seconds]
yxhuvud has joined #ruby
kvirani has joined #ruby
ryh has joined #ruby
<banisterfiend> lectrick: anyway, the k00 thing about rb_event_hook is that you can only listen for teh events u want, rather than all of them. Also, it doesnt create binding objects each time
senny_ has quit [Remote host closed the connection]
<banisterfiend> so it turns out to be significantly faster
<banisterfiend> binding objects are pretty expensive to create
BSaboia has joined #ruby
i0n has quit [Quit: Lost terminal]
<lectrick> ah, now I get it
<lectrick> yes, I found out about this binding problem :)
specialGuest has quit [Changing host]
specialGuest has joined #ruby
burgestrand has joined #ruby
BrokenCog has quit [Quit: leaving]
<lectrick> I installed pry-doc and show-source set_trace_func still won't work :(
richwestcoast has quit [Ping timeout: 244 seconds]
<banisterfiend> lectrick: what ruby version?
paolooo has joined #ruby
richwestcoast has joined #ruby
Taichouchou2 has joined #ruby
<lectrick> banisterfiend: ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
<banisterfiend> lectrick: is pry-doc in your Gemfile etc?
<banisterfiend> lectrick: what's the output when u try to show-source set_trace_func ?
<lectrick> banisterfiend: It is not in the Gemfile yet.
<banisterfiend> oh, u have to add it
<lectrick> I installed it manually via the gem command
<lectrick> ok
<banisterfiend> ya but bundler will only let u require gems (even pry plugins) that are specified in Gemfile
<banisterfiend> bundler is a pain
mahmoudimus has joined #ruby
<banisterfiend> you could try adding pry-debundle
<banisterfiend> whic breaks out of the bundler jail and lets u require plugins not specified in Gemfile, but probably easier to just add pry-doc for now
<Xeago> wasn't support for gemfile.local added?
Zepo has joined #ruby
<Xeago> I saw it flying by in some other repo recently
<Xeago> or was that hacked in by them?
<lectrick> adding pry-doc.
Catnaroek has joined #ruby
<lectrick> BOOM worked.
haxrbyte has joined #ruby
ananthakumaran has joined #ruby
<banisterfiend> lectrick: k00
pskosinski has joined #ruby
t44786 has quit [Remote host closed the connection]
t93536 has joined #ruby
tagrudev has quit [Remote host closed the connection]
<banisterfiend> lectrick: one pretty sexy thing it can do is show (or try to anyway:P) C source of 3rd party extensions :D
<banisterfiend> im pretty proud of that
<banisterfiend> it works about 80% of the time :)
<Xeago> anyone knows if it is possible to search on a github repo?
haxrbyte_ has joined #ruby
<Xeago> from within a repo*
<banisterfiend> for a file name?
<banisterfiend> or for content?
<Xeago> content
resure_away has quit [Ping timeout: 245 seconds]
<banisterfiend> i dont think so, i think that's a thing u can only do for private repos
<banisterfiend> it's a 'premium' feature :)
<Xeago> blurgh, ill fork it into private then :\
hackeron has joined #ruby
<Xeago> then again
<Xeago> I couldn't edit on private repo's
heisenmink has quit [Remote host closed the connection]
<Xeago> well the option wasn't displayed
<Xeago> but using edit in the uri worked
pu22l3r has joined #ruby
<Xeago> https://github.com/search sucks tho >.<
zigomir has joined #ruby
LBRapid has joined #ruby
<banisterfiend> Xeago: cant u just clone it locally and then use ack
Catnaroek_ has joined #ruby
Catnaroek has quit [Ping timeout: 245 seconds]
jasonkuhrt has joined #ruby
<lectrick> The immediate-value classes like Fixnum, Symbol, TrueClass etc... What are those called?
<Xeago> base types?
Catnaroek_ is now known as Catnaroek
<banisterfiend> lectrick: immediates ;)
<lectrick> The ones which internally don't use a pointer
haxrbyte has quit [Ping timeout: 264 seconds]
<Xeago> value types?
<lectrick> Value types maybe?
<banisterfiend> no
<Xeago> prolly immediates as banisterfiend
<banisterfiend> they're called "immediate values"
<lectrick> ok.
jasonkuhr has quit [Read error: Connection reset by peer]
<banisterfiend> but it's a little bit of an implementation detail i think
<Xeago> my wording comes from languages that differentiate struct and class
<Xeago> which ruby doesn't afaik?
<banisterfiend> in languages that have structs and classes i dont think there's that much of a difference
<banisterfiend> iirc the only diff in C++ is the visibility of data members
<banisterfiend> the default visibilty
sendoushi has joined #ruby
jtgiri_ has joined #ruby
arkiver has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
hadees has quit [Quit: hadees]
sailias has quit [Ping timeout: 245 seconds]
<Hanmac> ruby has stucts too but i dont use them
<Xeago> structs can't have methods while classes can, heep/stack storage (which clr and jvm do care only little about)
<banisterfiend> Xeago: structs can have methods
<Xeago> wot?
<banisterfiend> in c++
<Xeago> ..
<Xeago> everything's possible in c++
ar__ has joined #ruby
joephelius has quit [Quit: WeeChat 0.3.8]
w400z has quit [Quit: Computer has gone to sleep.]
<banisterfiend> Xeago: also struct and class instances can both either be on stack or heap
pdtpatrick has quit [Quit: pdtpatrick]
resure_away has joined #ruby
jasonkuhrt has quit [Quit: Leaving...]
<ar__> Is it possible to wake up thread by particular event?
<Xeago> depending on allocation yes
Zepo has left #ruby [#ruby]
vitoravelino`afk is now known as vitoravelino
burgestrand has quit [Read error: Connection reset by peer]
burgestrand1 has joined #ruby
rakunHo has joined #ruby
<banisterfiend> Xeago: so, since C++ doesnt differentiate b/w structs and classes in the way you implied, what language did u have in mind?
Catnaroek has quit [Ping timeout: 245 seconds]
<banisterfiend> :P
<JonnieCache> lol theyre remaking red dawn with the chinese instead of the russians
<JonnieCache> amazing
cakehero has joined #ruby
<Xeago> languages that do not have a malloc directive or similar and handle that for you
vivien__ has joined #ruby
<Xeago> anyways, does anyone know, if I can do a negative boost using Tire?
sendoushi has quit [Remote host closed the connection]
rins has joined #ruby
ph^ has joined #ruby
philips_ has quit [Excess Flood]
bgupta has quit [Read error: Operation timed out]
burgestrand1 has quit [Quit: Leaving.]
DrShoggoth has joined #ruby
robertothais has joined #ruby
Criztian has quit [Remote host closed the connection]
sendoushi has joined #ruby
pu22l3r has quit [Remote host closed the connection]
philips_ has joined #ruby
BSaboia__ has joined #ruby
sendoushi has quit [Remote host closed the connection]
burgestrand has joined #ruby
<barefoot> JonnieCache: ZOMG they are destroying all the good movies!
robertothais has quit [Client Quit]
sailias has joined #ruby
LBRapid has quit [Quit: LBRapid]
s1n4 has joined #ruby
<JonnieCache> is the first one good then?
<JonnieCache> and in answer to your question: yes
mmitchell has quit [Remote host closed the connection]
BSaboia has quit [Ping timeout: 264 seconds]
Progster has quit [Ping timeout: 268 seconds]
<banisterfiend> JonnieCache: yeah and the super retarded thing is they're not even bothering to wait that long anymore b4 doing remakes
<banisterfiend> did u see they r already doing a remake of spiderman
pu22l3r has joined #ruby
<barefoot> wow
<Xeago> again
<JonnieCache> thats a "reboot" rather than a "remake" - they invented a whole new term to reduce the time they had to wait
t93536 has quit [Remote host closed the connection]
daniel_hinojosa has joined #ruby
naz has joined #ruby
t4743 has joined #ruby
savage- has quit [Remote host closed the connection]
<banisterfiend> given the trash hollywood is throwing at us, they deserve to get ripped off by honorable culture heroes like kim dotcom
hadees has joined #ruby
MasterIdler has quit [Quit: MasterIdler]
diegoviola has joined #ruby
zigomir has quit [Ping timeout: 245 seconds]
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
jasonkuhrt has joined #ruby
yasushi has joined #ruby
specialGuest has quit [Ping timeout: 264 seconds]
<shevy> long live linux!
<shevy> until RubyOS replaces it
qwerxy has quit [Ping timeout: 244 seconds]
qwerxy has joined #ruby
davidcelis has quit [Quit: K-Lined.]
yasushi has quit [Ping timeout: 246 seconds]
x77686d has joined #ruby
gloomer has quit [Ping timeout: 245 seconds]
jprovazn is now known as jprovazn_away
burgestrand has quit [Quit: Leaving.]
s1n4 has quit [Quit: leaving]
Vert has quit [Remote host closed the connection]
Synthead has joined #ruby
allyraza has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
thunderstrike has joined #ruby
carloslopes has quit [Quit: Leaving.]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
cakehero has quit [Quit: Leaving...]
resure_away has quit [Remote host closed the connection]
dangerousdave has joined #ruby
chimay_1 has quit [Quit: WeeChat 0.3.9-dev]
<Xeago> shevy: what exactly do you think rubyOS would be?
jgrevich has joined #ruby
arkiver has quit [Quit: Leaving]
schaerli has quit [Remote host closed the connection]
<libryder> an os that runs on top of a linux vm
<libryder> lol
jlogsdon has joined #ruby
baphled has joined #ruby
dmiller has joined #ruby
<shevy> nah, a mixture
<shevy> ideally an operating system where ruby could be used for everything, down to the hardware level
vectorshelve has joined #ruby
<shevy> in practice I suppose it'll boil down to a mix of ruby and C for speed
<shevy> all the unix core tools could easily be written in ruby
<vectorshelve> shevy: coming back to something interesting we talked about.. passing a parameter from ruby to a site and getting it's search result.. we could either parse the html using nokogiri or is there some better stable way ?
berserkr has quit [Read error: Connection reset by peer]
<shevy> ewwww
<shevy> nokogiri
<shevy> don't you know that I do not use XML vectorshelve
nanderoo has joined #ruby
<shevy> most html you can treat as a big strong and run .scan on it or similar
wmoxam has joined #ruby
wmoxam has quit [Changing host]
wmoxam has joined #ruby
maesbn has quit [Remote host closed the connection]
<shevy> for automation, you can use mechanize
maesbn has joined #ruby
* Muz slaps shevy.
<shevy> ack!
chrisbolton has joined #ruby
<Muz> Treating the HTML of a page as a string is a terrible thing to do.
t4743 has quit [Remote host closed the connection]
<shevy> at least it was a proper sentence :)
<Muz> Especially if you expect to test against it deterministically.
<shevy> a string is a string is a string
t54881 has joined #ruby
<seanwash> is a string
<shevy> is a duck!
<vectorshelve> shevy: yes exactly.. so that is why I considered you to be a better person to help me use something better..
<shevy> why something "better"
<vectorshelve> shevy: how about either of these two -> http://pastie.org/4610781
<shevy> I never recommended nokogiri in the first place so I can not recommend an ALTERNATIVE :P
ph^ has quit [Remote host closed the connection]
<shevy> what is the difference there
savage- has joined #ruby
<shevy> I use open() usually
<seanwash> Can anyone recommend some Ruby exercises? Ruby Koans any good?
Xeago_ has joined #ruby
<vectorshelve> seanwash: www.rubymonk.com
ThaDick has quit [Quit: zzzZZZ ...]
<seanwash> vectorshelve: Thanks! I'll check that out for sure.
MasterIdler has joined #ruby
ckrailo has joined #ruby
<vectorshelve> seanwash: np
maesbn has quit [Ping timeout: 240 seconds]
tcopp has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
<seanwash> vectorshelve: +1 computational thinking
<vectorshelve> seanwash: :)
<seanwash> vectorshelve: Is there a way to quick reply to someone that mentions you in IRC?
maletor has joined #ruby
<hoelzro> seanwash: depends on your client; I'm sure it's possible
<seanwash> hoelzro: Alright, I'll do some googling
ph^ has joined #ruby
pu22l3r has quit [Remote host closed the connection]
<shevy> I usually only type the beginning of the name
<shevy> like ve
<shevy> then I hit <TAB> key
<shevy> vectorshelve, hi!
<vectorshelve> shevy: your suggestions on the code.. well my use case is that I need to pass a ten digit number to http://www.pnrstatus.info/ and get the result... for example try with 4143564057
<shevy> vectorshelve why are you still doing rails :(
ThaDick has joined #ruby
<shevy> well just .scan() it with a regex?
<vectorshelve> shevy: no this is ruby.. I wanna build a gem for this :)
<shevy> where is the info in that html string
<shevy> the number
<shevy> where is it hidden?
<hoelzro> seanwash: what client are you using, btw?
<shevy> oh
sendoushi has joined #ruby
ekaleido_ has quit [Quit: leaving]
<shevy> you mean you want to pass a number to that site, via commandline or that script
<shevy> "Enter 10-digit PNR number"
<shevy> did you try mechanize yet?
<vectorshelve> shevy: what is mechanize ?
<seanwash> hoelzro: I'm using Adium on mac.
<shevy> a very very good ruby library
<shevy> you can use it to fill out html forms
tk__ has quit [Quit: ばいばい]
* Muz slaps shevy even more.
<shevy> vectorshelve http://mechanize.rubyforge.org/
kaleido has joined #ruby
<vectorshelve> shevy: reading it already :)
<Muz> Canonical example of why.
<shevy> Muz yeah I hear the propaganda often
<shevy> vectorshelve, you only need to find the name of the form
<shevy> then you can set its values like:
<shevy> f.form_loginname = ARGV[0]
<shevy> and when you are done
<shevy> you can do .click_button or submit
<shevy> to send it to the remote site
<shevy> hmm let me find the name of that <form>
baphled has quit [Ping timeout: 256 seconds]
<vectorshelve> shevy: I assume.. I need to use mechanize gem ryt ?
<shevy> yes :\
<vectorshelve> shevy: thanks
<shevy> but you could perhaps make a mini-mechanize gem
<vectorshelve> shevy: :)
<shevy> that only does a tiny subset
<shevy> like "fill out html forms"
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
cj3kim has quit [Client Quit]
wobr1 has quit [Ping timeout: 240 seconds]
<shevy> odd
<shevy> I cant find it in the html source of that page?
pu22l3r has joined #ruby
<vectorshelve> shevy: wierd
<shevy> hmmm
<shevy> is it generated dynamically perhaps?
_Vile has quit [Ping timeout: 246 seconds]
<shevy> oooh
<shevy> it is an <iframe>
<shevy> yeah
<shevy> <form name="pnrForm" method="post" action="http://www.indianrail.gov.in/cgi_bin/inet_pnrstat_cgi.cgi" onSubmit="return validatePNR()">
baphled has joined #ruby
<shevy> the name should be pnrForm
resure_away has joined #ruby
revans has joined #ruby
<shevy> "pnr-input-box"
<shevy> something like
<shevy> f.pnr_input_box = '158901258905'
<shevy> I think... not 100% sure, but something like that
<vectorshelve> shevy: right.. I am trying to run the first google example here http://mechanize.rubyforge.org/EXAMPLES_rdoc.html to try and get a hang of it
<shevy> man
<shevy> html is a mess ...
<shevy> all this embedded javascript for google adsense
<shevy> the <iframe> stuff
<shevy> ewwwww ewwww ewww
<vectorshelve> shevy: mechanize has a lot of dependencies -> Using diff-lcs (1.1.3) Installing unf_ext (0.0.5) with native extensions Installing unf (0.0.5) Installing domain_name (0.5.3) Using mime-types (1.19) Installing net-http-digest_auth (1.2.1) Installing net-http-persistent (2.7) Using nokogiri (1.5.5) Installing ntlm-http (0.1.1) Installing webrobots (0.0.13) Installing mechanize (2.5.1) Using rspec-core (2.11.1) Using rspe
arturaz has quit [Ping timeout: 264 seconds]
<shevy> yeah
<shevy> that is the drawback
wvms has left #ruby [#ruby]
<shevy> things tend to grow and grow and grow
sendoushi has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
<shevy> it's the rails disease of things
* Hanmac thought that iframe does either work only on IE or is an "invention" from apple
krawchyk_ has quit [Remote host closed the connection]
<shevy> vectorshelve, mechanize used hpricot for a while
<shevy> then they switched to nokogiri and I could not get nokogiri to work
<shevy> vectorshelve, but now you see, there is a need for SMALL and useful gems ;)
eldariof has quit [Ping timeout: 240 seconds]
<vectorshelve> shevy: hmm... but its throwing errors for me.. undefined method `q=' for nil:NilClass in the google example (first one) here http://mechanize.rubyforge.org/EXAMPLES_rdoc.html
Takehiro has quit [Remote host closed the connection]
aganov has quit [Quit: aganov]
sendoushi has joined #ruby
hukl has joined #ruby
<shevy> yeah that is the second level of breakage
<shevy> first it uses more and more other gems
<shevy> then it breaks
<shevy> :)
<shevy> welcome to ruby!!!
jrajav has joined #ruby
Takehiro has joined #ruby
<Hanmac> when did this room turned into a mechanize-channel?
mrsrikanth has joined #ruby
arkiver has joined #ruby
Agis__ has joined #ruby
<vectorshelve> shevy: well I didnt like mechanize.. I mean why would I want to make a gem using gems which itself have got multiple dependencies.. native simple code would be much better.. I thing
<vectorshelve> I think*
<shevy> Hanmac the moment when other people didn't help vectorshelve
<vectorshelve> shevy: Hanmac :)
w400z has joined #ruby
Eplemosen has quit [Quit: NOPE]
erichmenge has joined #ruby
mikepack has joined #ruby
invisime has joined #ruby
Xeago_ is now known as Xeago
<vectorshelve> shevy: mechanize does use nokigiri :) https://github.com/tenderlove/mechanize
<shevy> yea
<shevy> they abandoned hpricot
<shevy> bastards :(
dekroning has quit [Ping timeout: 244 seconds]
<Hanmac> helping vector is not a good game ... noone chould win in this game
maletor has joined #ruby
Squarepy has quit [Quit: Leaving]
alvaro_o has joined #ruby
<vectorshelve> shevy: :)
<invisime> are there any ruby IPC libraries that actually work with ~> ruby 1.9? dRb (and therefore Rinda) block when you try to find a service. are there any better alternatives?
<vectorshelve> Hanmac: you have won multiple times :)
justinmcp has quit [Remote host closed the connection]
<arkiver> If i have an array ["foo", "bar", "baz"], How can I create variables foo_attribute, bar_attribute, baz_attribute dynamically. Basically I want to do this to DRY my code.
<arkiver> These variables will be used later in the code
<hoelzro> arkiver: you can just invoke attr_reader and friends
<hoelzro> %w(foo bar baz).each do |attr| attr_accessor attr.to_sym end
<Muz> >> ["foo", "bar", "baz"].map {|i| Kernel.instance_variable_set("@#{i}", "your mum") } puts @foo + @bar
<al2o3cr> -e:1:in `eval': (eval):1: syntax error, unexpected tIDENTIFIER, expecting $end (SyntaxError), ...set("@#{i}", "your mum") } puts @foo + @bar, ... ^, from -e:1:in `<main>'
<Hanmac> attr methoden accept an array of symbols: attr_accessor *["foo", "bar", "baz"].map(&:to_sym)
<invisime> you could create a c extension to do it.
<shevy> hah
<shevy> Muz, now I know how to make you not use a '.'
<shevy> :)
<shevy> in ruby code!
CarlB_the_great has joined #ruby
<shevy> Hanmac, what is "attr methoden" man
<shevy> you think in german :D
<Hanmac> yeah ... stupid "baumkuchen"
Paul-Atreides is now known as enroxorz
<JonnieCache> baumkuchen...
<JonnieCache> arse-cake?
bigkevmcd has quit [Ping timeout: 245 seconds]
jlebrech has quit [Ping timeout: 268 seconds]
<JonnieCache> oh no just a kind of cake
bradhe has quit [Ping timeout: 265 seconds]
<JonnieCache> i thought it was a particularly insult
<JonnieCache> particularly creative
<shevy> Hanmac what is your biggest ruby project so far?
<JonnieCache> lol its 5 o clock and my brain is failing
<shevy> JonnieCache, how comes you know the word "kuchen"?
<Hanmac> shevy does my ogre binding or my wx binding counts?
<JonnieCache> shevy: did german in school
<shevy> Hanmac, I think it is C or C++ code right? so... that is not pure ruby code. I mean .rb files in a ruby project mostly
<shevy> JonnieCache cool
<arkiver> hoelzro, Can those variables names foo, bar be used later in the code ?
<shevy> I am sure your ogre stuff has thousands of lines of C++ code :D
<hoelzro> arkiver: what do you mean?
tnk1 has quit [Ping timeout: 244 seconds]
Igneous has joined #ruby
ThaDick has quit [Quit: zzzZZZ ...]
<Hanmac> shevy then i have nothing great ... :( what would be the bigger ruby code is this http://devel.pegasus-alpha.eu/projects/openrubyrmk
<arkiver> I want to call a method passing that foo_attribute to that method
<arkiver> hoelzro, ^
<Hanmac> arkiver:
<Hanmac> >>class A; attr_accessor *["foo", "bar", "baz"].map(&:to_sym);end; A.instance_methods(false)
<al2o3cr> (Array) [:foo, :foo=, :bar, :bar=, :baz, :baz=]
<shevy> cool
<shevy> RPG creator
<infinitiguy> How can I stop an each do loop from exiting a method upon a certain condition.. i..e I have something like nodename.each do | address| if address == "myaddress" do some stuff.. I'd like it to stop the method after it does some stuff.. if it doesn't have a match of address =="myaddress" then continue on each nodename until it has a match.
<Hanmac> shevy yeah but the development is currently a bit slow ... we need more man-power
<infinitiguy> I want to stop the method - but not stop the script
zommi has quit [Quit: Leaving.]
<shevy> Hanmac what is the scope of the project? I still maintain my bunch of RPG code in ruby for my old pen and paper group
<JonnieCache> infinitiguy: use an `until` loop
<JonnieCache> or while
elux has joined #ruby
<shevy> but 50% of it is very specific to our needs in the game world, which in turn often is a bit specific to the system used (DSA mostly, sometimes DnD)
dmiller has quit [Ping timeout: 252 seconds]
mahmoudimus has joined #ruby
<JonnieCache> or, filter your collection before you iterate it. thats probably the best
davidcelis has joined #ruby
pskosinski has quit [Remote host closed the connection]
<Hanmac> shevy to make an new RPGMaker with new core and so on
mneorr has quit [Remote host closed the connection]
<Hanmac> arkiver: you dont need any to_sym it still works without:
<Hanmac> >>class A; attr_accessor *["foo", "bar", "baz"];end; A.instance_methods(false)
<al2o3cr> (Array) [:foo, :foo=, :bar, :bar=, :baz, :baz=]
resure_away has quit [Remote host closed the connection]
<shevy> hmm ok I'll add #OpenRubyRMK to my irc channel list
<arkiver> Hanmac, Cool I'll try it out
bigkevmcd has joined #ruby
hoelzro is now known as hoelzro|away
_Vile has joined #ruby
_Vile has quit [Changing host]
_Vile has joined #ruby
iamjarvo has quit [Ping timeout: 244 seconds]
Goles has joined #ruby
beneggett has joined #ruby
sendoushi has quit [Remote host closed the connection]
CoolCold has joined #ruby
<CoolCold> hello guys
xorigin has quit [Quit: leaving]
<CoolCold> i'm a bit confused - i'm installing gitlab and it requires eventmachine
AlbireoX has joined #ruby
<CoolCold> i'm running bundle install --without development test --deployment , and it tries to compile eventmachine, while "gem list" shows eventmachine is already installed
<JonnieCache> it probably wants a different version to the one you have installed
<JonnieCache> eventmachine is used for a lot of different things
<CoolCold> JonnieCache: http://pastebin.com/hJNTWKUK
<infinitiguy> I'm a bit confused as to how until or while will help here - they don't seem to be able to iterate through a loop on their own. If I put a while or until inside of the each loop I would expect it to only break out of the while loop and the each loop would continue until the end of the list (in this case IP addresses).
robotmay_ has quit [Remote host closed the connection]
ThaDick has joined #ruby
<shevy> infinitiguy hmm I think that depends. I think a "return" statement, for instance, may break out of all loops perhaps?
qwerxy has quit [Ping timeout: 244 seconds]
__class__ has quit [Ping timeout: 245 seconds]
pdtpatrick has joined #ruby
<infinitiguy> return doesnt seem to do it - I think maybe break will - I'll try that next.
<JonnieCache> infinitiguy: i was suggesting replacing each with while
hukl has quit [Quit: Linkinus - http://linkinus.com]
<JonnieCache> infinitiguy: but actually you should just filter the collection before you call each
<JonnieCache> so it only contains elements you want, and you dont have to break out of the loop
<Mon_Ouie> e.g. use take_while
qwerxy has joined #ruby
<JonnieCache> one day i should really sit down and read through all the weird methods in enumerable
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
mneorr has joined #ruby
<shevy> haha
<infinitiguy> I'm not sure how to filter the collection. I get a list of ip addresses (soap objects) that are from an array. The methods that the api (f5 in this case) I'm using don't seem to allow me to say just give me this one host from the code I'm working from which is why I was taking the iteration route.
andrewstewart has joined #ruby
ckrailo has quit [Quit: Leaving...]
jamesaa has joined #ruby
t54881 has quit [Remote host closed the connection]
<shevy> didnt they add some new ones for 1.9.x?
t13853 has joined #ruby
bradhe has joined #ruby
ckrailo has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
<shevy> I dont think I have used take_while before
resure_away has joined #ruby
seanyo has joined #ruby
<kaleido> the f5 api is all kinds of "fun"
CarlB_the_great has quit [Remote host closed the connection]
linoj has joined #ruby
mucker has joined #ruby
mucker has quit [Client Quit]
mucker has joined #ruby
ryk has quit [Quit: Changing server]
resure_away has quit [Remote host closed the connection]
__class__ has joined #ruby
vitoravelino is now known as vitoravelino`afk
vDubG has quit [Ping timeout: 246 seconds]
arkiver has quit [Ping timeout: 264 seconds]
senny has joined #ruby
<infinitiguy> @kaleido - yep… I'm finding all sorts of fun things with it
<infinitiguy> *shakes fist in anger*
alexwh has quit [Ping timeout: 252 seconds]
dahan has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
mc0e has joined #ruby
pu22l3r has quit [Ping timeout: 245 seconds]
cbuxton has joined #ruby
gloomer has joined #ruby
gloomer has quit [Client Quit]
richwestcoast has quit [Quit: ( www.nnscript.com :: NoNameScript 4.22 :: www.esnation.com )]
pu22l3r has joined #ruby
mrsolo has joined #ruby
<dahan> Hello. On the link above is the core problem
<dahan> I convert DateTime object to Julian day number
erichmenge has quit [Quit: Be back later]
<dahan> Then convert Julian number back to DateTime object.
randomautomator has joined #ruby
<dahan> 12 hours get lost on the way
CannedCorn has joined #ruby
<CannedCorn> hey guys do any of you know how to push tags with the git gem?
allanm_ has joined #ruby
<shevy> dahan hehe sounds like a funny problem
michael7 has joined #ruby
recycle has joined #ruby
jtgiri_ has quit [Quit: jtgiri_]
xyon has quit [Quit: WeeChat 0.3.8]
mdmdm has quit [Quit: *p00f*]
<davidcelis> CannedCorn: the git gem?
<CannedCorn> yeah
<shevy> dahan, in_time_zone that is not standard ruby right?
bgupta has joined #ruby
<bnagy> you convert from a datetime to a day, yes, you lose precision
s1n4 has joined #ruby
<dahan> shevy: it's from rails, but doesn't matter. It is not the changing point
jtgiri_ has joined #ruby
xyon has joined #ruby
<dahan> bnagy: no. AJD - astronomical julian day is a rational number
allanm__ has quit [Ping timeout: 246 seconds]
xyon has quit [Client Quit]
<dahan> bnagy: having fraction of a day part
kvirani has quit [Remote host closed the connection]
upasna has joined #ruby
seanwash has quit [Quit: Leaving.]
<dahan> bnagy: exact 12 hours loss cannot be a matter of precision. It is a matter of an algorithm
jorge_ has joined #ruby
stkowski has joined #ruby
joephelius has joined #ruby
<bnagy> uh huh
recycle has quit [Ping timeout: 244 seconds]
jrajav has quit []
<bnagy> do it all without timezones, see how you go
<bnagy> anyway, bedtime
snearch has joined #ruby
mklappstuhl has quit [Ping timeout: 240 seconds]
ngoldman has joined #ruby
macmartine has joined #ruby
ringotwo has joined #ruby
himsin has joined #ruby
<Xeago> I must say
<Xeago> pry is cool
adeponte has joined #ruby
<Xeago> .$SHELL will bring up a new shell with all my shell niftyness :D
ngoldman has quit [Read error: Connection reset by peer]
sepp2k1 has joined #ruby
baphled has quit [Ping timeout: 240 seconds]
ngoldman has joined #ruby
sepp2k has quit [Ping timeout: 264 seconds]
chimay has joined #ruby
shevy has quit [Ping timeout: 252 seconds]
chimkan_ has joined #ruby
ringotwo has quit [Remote host closed the connection]
blazes816 has joined #ruby
jasonkuhr has joined #ruby
baphled has joined #ruby
jasonkuhrt has quit [Read error: Connection reset by peer]
<libryder> pry is sauce
<dahan> Question: how can I call a Class function from a module, which is included in the class?
timonv has quit [Remote host closed the connection]
jorge_ has quit [Remote host closed the connection]
Takehiro has quit [Remote host closed the connection]
<libryder> dahan: you have "include MyModule" in your class definition?
lusory has quit [Read error: No route to host]
Takehiro has joined #ruby
<chimkan_> you have to use extend MyModule if you are going to use as class method
<chimkan_> Include is for instance method in a class
theRoUS has quit [Read error: Operation timed out]
<dahan> that's what I mean
Guest52428 has joined #ruby
<dahan> i have a class function in the class.
<dahan> and I want to call it from a module that I include in the class
<dahan> without naming it directly!
rakunHo has quit [Remote host closed the connection]
<dahan> Planet.c_foo is what I want to achieve without using the token <Planet>
Phelps has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
ph^ has quit [Remote host closed the connection]
recycle has joined #ruby
shevy has joined #ruby
sneakyness_wk has joined #ruby
<chimkan_> try extend
<chimkan_> it's because include will need you to instantiate the planet class first
<chimkan_> p = Planet.new
<chimkan_> then you are able to call foo from Astro
<chimkan_> but if you use extend
<chimkan_> foo can be called
<chimkan_> Planet.astro
<chimkan_> and then you are able to call the self.class.c_foo
<chimkan_> just try
<chimkan_> change include for extend
Agis__ has quit [Quit: Agis__]
recycle has quit [Remote host closed the connection]
koshii has joined #ruby
<koshii> Hey guys if I have an array array = [:peanut, :butter, :and, :jelly] -- why does array[4,0] == [] ? There is no "4th place", or is the end of the array position 4?
<koshii> Because array[5,0] == nil
Guest52428 has quit [Quit: Quitting]
khakimov has joined #ruby
<koshii> If the above is true, it also explains why array array[0,1] == [:peanut] only, and not [:peanut, :butter] (the first "[" of the array being a position 0 in certain cases?!)
pskosinski has joined #ruby
alexwh_ has joined #ruby
<chimkan_> koshii maybe array starts with position zero?
<chimkan_> so array(4) doesn't have anything in it.
<koshii> chimkan_: Yes but why would array[5,0] == nil then?
Agis__ has joined #ruby
<koshii> chimkan_: Rather than also being []
<chimkan_> because there's nothing
<chimkan_> when ruby returns nothing it gives nil
<chimkan_> always
<chimkan_> array is referencing to variable array
<koshii> chimkan_: So "end of the array" is a kind of character at position 4 in this case? And "start of array" is position zero?
<chimkan_> if there's nothing that's what happens.
<koshii> "start of array" being [ rather than :peanut
<chimkan_> yu
<chimkan_> yup
matrixise has quit [Ping timeout: 246 seconds]
<chimkan_> it starts with :peanut
<chimkan_> that's it
<koshii> No...
<chimkan_> and its position is zero
<koshii> That's not what I'm asking.
<koshii> Maybe I don't understand what array[0,1] actually does.
<koshii> Because if the "1" position is :butter, shouldn't it return :butter?
Criztian has joined #ruby
mksm has quit [Read error: Operation timed out]
<koshii> Do you see what I mean?
<koshii> In C for example there is this "\0" kind of concept that is actually a character. Is it something like that?
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
sendoushi has joined #ruby
a_a_g has joined #ruby
<chimkan_> yup
mksm has joined #ruby
<blob> array[0,1] returns :peanut because its [start,length]
<chimkan_> array[start position, length]
<chimkan_> yup
ringotwo has joined #ruby
mksm is now known as Guest41231
<koshii> blob: Ah OK. But why does [4,0] return [] instead of nil?
<chimkan_> because 4 is the position 5th
<chimkan_> and there's nothing
tommyvyo has quit [Quit: Computer has gone to sleep.]
<koshii> blob: Because there is no "4th position" in the array unless arrays come with a C-like "\0" character.
<blob> right, so it returns an empty array
<koshii> chimkan_: I think there is a difference between [] and nil, yes?
<chimkan_> yup
<chimkan_> [] is an empty array
<chimkan_> nil is null, nil, nothing
<koshii> [5,0] == nil [4,0] == []
brianpWins has quit [Quit: brianpWins]
<koshii> This is what I am getting.
<koshii> And I am confused because I had not heard of a "\0"-like character in Ruby before.
<koshii> And if that's what it is, then it makes sense. But if not, I am still confused.
<Mon_Ouie> See the pattern: [0, 3] returns 3 elements, …, [3, 3] returns 1 element, [4, 3] returns 0 element, [5, 3] returns nothing
alexwh_ has quit [Quit: Quitting]
<shevy> koshii, in IRB I get [5,0] == nil # => false
vitoravelino`afk is now known as vitoravelino
<chimkan_> shevy but koshii is talking about [4,0]
<koshii> shevy: That's what I get too.
pu22l3r_ has joined #ruby
<koshii> shevy: And that makes sense.
pu22l3r has quit [Ping timeout: 260 seconds]
<Mon_Ouie> shevy: it's some_array[5, 0]
<koshii> shevy: But why is [4,0] [] instead of nil?
<a_a_g> what is some_array here?
<shevy> perhaps some_array is nil
<Mon_Ouie> An… array?
elhu has quit [Quit: Computer has gone to sleep.]
<koshii> Is there or is there not a "\0" character and where can I find docs on it?
alexwh_ has joined #ruby
<Mon_Ouie> It contains 3 elements here
<a_a_g> no, i mean, the values in the array
<a_a_g> ah ok
<shevy> koshii do you use pretty print? pp some_array
<Mon_Ouie> I didn't read everything, but I suspect it's the one from the ruby koans
ringotwo has quit [Remote host closed the connection]
<koshii> array = [:peanut, :butter, :and, :jelly]
<blob> array = [:peanut, :butter, :and, :jelly]
jerrett has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<koshii> Mon_Ouie: Exactly right.
<Mon_Ouie> Seeing how most people who even ask that question come from there
<shevy> x = "\0" # => "\000"
<koshii> And I'm trying to make sure I understand _everything_
ghanima has joined #ruby
<jerrett> Anyone know how to make ruby 1.9.3 unmarshal time objects without taking eons ? :\
<shevy> koshii "\000" is definitely not empty, nor nil
<Mon_Ouie> There was an image to make it clearer, not sure if I still have it in my logs
bluOxigen has quit [Ping timeout: 244 seconds]
<koshii> shevy: So position [4,0] IS "\000" then ?
<koshii> shevy: And all arrays have this at the end?
<shevy> array[4,0] # => []
<a_a_g> so some_array has 4 symbols. what was the question again (sorry, i joined midway)
<blob> koshii: no
<shevy> array[4,0].empty? # => true
<koshii> Are any of you guys C programmers? Do you know what I'm asking?
<Mon_Ouie> (I think it was made by apeiros)
<shevy> koshii you gave 0 as second argument to [] method
<koshii> a_a_g: I'm trying to understand why my array array = [:peanut, :butter, :and, :jelly] has this property -- array[4,0] == [] and array[5,0] == nil
<shevy> try array[4,1] and notice the difference
<shevy> eww
<shevy> bad example from me
<shevy> :)
<koshii> heh
<shevy> array[4,155] # => []
<shevy> array[4,155562323636] # => []
<blob> koshii: look at that link that explains the slice method
<shevy> array[4,0] # => []
<chimkan_> interesting
<a_a_g> is this a bug?
<chimkan_> so it's taking arr[5,0] example
<koshii> blob: Weird! a[5] => nil but a[5,1] => []
<Mon_Ouie> a_a_g: No, completely intended behavior
<chimkan_> from the imamge
<a_a_g> how/why is it intended?
<koshii> I'd sure like to know.
<shevy> yeah that is confusing
<Mon_Ouie> See the image
<chimkan_> so the array has six indexes
adamkittelson has joined #ruby
<chimkan_> the last one usually shows empty because it's the end of the array
bier_ has quit [Ping timeout: 245 seconds]
<Mon_Ouie> koshii: And no, arrays in Ruby aren't terminated by a magic element that they can't contain — the end of the array is known by keeping their size in memory.
<koshii> OK this makes more sense. So that means array[0,0] is also []
<Mon_Ouie> Correct
<koshii> OK, I finally get it.
<koshii> Thank you Mon_Ouie !
alexwh_ has quit [Quit: Quitting]
<a_a_g> but in this case the array has 4 elements
recycle has joined #ruby
<a_a_g> the image shows an array of 5
alexwh_ has joined #ruby
<a_a_g> ah, sorry, my bad
alexwh_ has left #ruby [#ruby]
<koshii> Thank god for IRC, seriously.
<koshii> This kind of stuff is pretty incredible to me when I really start to get it. Makes me realize how insanely smart people who write programming languages have to be.
chimay has quit [Quit: WeeChat 0.3.9-dev]
<blob> hmm thats a good image to help understand slicing. keep in mind arrays dont actually contain that extra element though
recycle has quit [Remote host closed the connection]
s1n4 has quit [Quit: leaving]
<eridani> why are you asking for a 0 length slice of an array/
<koshii> blob: It's just a convention? Why would it be included in the language then?
<blob> but that behavior is caused by the valid range being the length of the array
<blob> for slicing
<koshii> eridani: It's part of Ruby Koans.
chimay has joined #ruby
<koshii> eridani: Which apparently specializes in edge cases. :-)
Anonyneko has joined #ruby
aristidesfl has quit [Ping timeout: 245 seconds]
carloslopes has joined #ruby
<Mon_Ouie> Yes, it's really just a matter a convention; you *can* argue for it returning either nil or an empty array.
robert- has joined #ruby
tommyvyo has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
Takehiro has quit [Read error: Connection reset by peer]
<shevy> hmm it's a bit odd
<shevy> why does it return an empty array? does it make sense when looking at the arguments alone?
Takehiro has joined #ruby
<koshii> shevy: In my opinion no.
revans has quit [Ping timeout: 265 seconds]
<koshii> shevy: That's why I was puzzled about my results.
Morkel has joined #ruby
<shevy> for returning something alone, [5,0] seems to never return anything useful
<shevy> I use it for setting values though
<shevy> array[5,0] = 'hi'
<koshii> Whoa
<shevy> I like this more than .insert
<Xeago> >> ["derp"][1,0]='hey'
<al2o3cr> (String) "hey"
<shevy> works on strings too
Vert has joined #ruby
<Xeago> wot
<Xeago> ?
aristidesfl has joined #ruby
mengu has joined #ruby
<a_a_g> i still dont get why you dont go out of the array at 4, instead of 5
<Xeago> I do not get that logic at all
<a_a_g> saying you are past the last element but still inside the array makes no sense
khakimov has quit [Quit: Computer has gone to sleep.]
<a_a_g> unless its like the lisp null terminated list
<Mon_Ouie> #insert works on string too, though
areil has quit [Remote host closed the connection]
<Mon_Ouie> a_a_g: It makes sense if you consider that each index is placed before the matching element
<koshii> a_a_g: It doesn't make sense unless you look at that picture Mon_Ouie posted.
<koshii> Or if you consider that fact he just stated. Heh :-)
<Mon_Ouie> As opposed to *at* that specific element
myth17 has joined #ruby
dmiller has joined #ruby
<shevy> koshii but why does it return an empty array? does every non-empty array include empty arrays?
<a_a_g> so in a 4 element array, where is 4 placed?
<shevy> at the end!
apok has joined #ruby
<shevy> well, the index starts at 0
<a_a_g> after the last element and before an element that does not exist
<shevy> so 4 would be past it I suppose
bier_ has joined #ruby
ph^ has joined #ruby
<shevy> perhaps it comes right before Infinity
<a_a_g> why is index 4 in a 4 element array treated as being inside the array?
<shevy> it's like a moebius strip
<a_a_g> the array should end at the element after index 3
<shevy> an array inside an array inside an array inside a
emmanuelux has joined #ruby
<shevy> hmmm
<shevy> actually
<koshii> I see I've opened a can of worms here. :-)
<shevy> x = "abc" # => "abc"
<koshii> shevy: I wish I knew!
<shevy> x[3,0] # => ""
<shevy> this returns an empty string
<shevy> so it is consistent with the same on array, returning an empty array
artOfWar has joined #ruby
<shevy> and
<shevy> x[4,0] # => nil
<shevy> so we have the same behaviour for string and array
havenn has joined #ruby
<shevy> that makes me feel slightly better
<a_a_g> this feature is like some 'features' i've seen in MS Word
<koshii> heh
<a_a_g> no, no, no. Ruby! you are too elegant to have behave like this
resure_away has joined #ruby
jclem has joined #ruby
Phelps has joined #ruby
t13853 has quit [Remote host closed the connection]
t27415 has joined #ruby
<Mon_Ouie> For the record, trying the same thing in other languages: Python always returns an array no matter by how much you get past the end of the array, Common Lisp raises an error
recycle has joined #ruby
bjeanes has joined #ruby
mascool has joined #ruby
recycle has quit [Remote host closed the connection]
<shevy> cool
<shevy> hmmm and perl?
<shevy> I forgot how to make an array in perl :\
asuka_ has quit [Ping timeout: 240 seconds]
<a_a_g> its the same syntax i think
<a_a_g> at least used to be :P
<shevy> does perl have anything like irb?
<shevy> damn fossil language
AlbireoX has quit [Remote host closed the connection]
<a_a_g> there was the perl shell
resure_away has quit [Remote host closed the connection]
AlbireoX has joined #ruby
<Muz> shevy: a REPL? Of course.
<a_a_g> whats the position based on?
bjeanes has left #ruby [#ruby]
<Xeago> Anyone with some knowledge of Tire/elasticsearch
revans has joined #ruby
shadoi has joined #ruby
<Xeago> how do I boost within a query
jorge_ has joined #ruby
myth17 has left #ruby ["Leaving"]
khakimov has joined #ruby
<libryder> respond_to? checks the current class, not it's ancestor right?
myth17 has joined #ruby
<davidcelis> yes
<fowl> libryder: dont your objects respond_to methods they inherit?
<davidcelis> but if it inherits the method, it responds_to it
<Muz> You could call instance_methods(false) to get an array of methods that don't include inherited methods.
<libryder> fowl, yes but the ancestor version of this method i'm checking for throws a not implemented and for some reason respond_to?(:method_name) is failing on the child even though it's been overridden
fearoffish has quit [Ping timeout: 246 seconds]
Takehiro has quit [Remote host closed the connection]
<davidcelis> god why do people try to program ruby like it's java
<libryder> *an object-oriented language
<davidcelis> every time i see something like `def method() raise "implement in subclasses" end` i want to gouge my eyes out
<a_a_g> class A has methods x and y, such that x calls y. class B < A and has methods x and y. B.x calls super. Which y will get called?
<libryder> davidcelis: that's pretty standard OO design bro
theRoUS is now known as GenghisKen
AlbireoX has quit [Ping timeout: 240 seconds]
krawchyk has joined #ruby
specialGuest has joined #ruby
<davidcelis> NoMethodError
robert- has quit [Ping timeout: 244 seconds]
<libryder> method_defined?(:method_name) works
<libryder> but respond_to? doesn't
dahan has quit [Quit: dahan]
resure_away has joined #ruby
ringotwo has joined #ruby
<lectrick> Is there a shell that is written in Ruby?
<davidcelis> rush
fermion has quit [Quit: P]
<rking> That
<libryder> figured it out. Class.respond_to? is checking for class methods, not instance methods
<rking> 's a shell that you interact with in Ruby, too.
gift_ has quit [Ping timeout: 276 seconds]
<davidcelis> libryder: well of course it is
<davidcelis> Classes respond to class methods
<libryder> you could say that about any revelation
<davidcelis> tru dat
<lectrick> on dear: http://rush.heroku.com/
RegEchse has joined #ruby
gift_ has joined #ruby
rudyl313 has joined #ruby
asuka has joined #ruby
recycle has joined #ruby
kirun has joined #ruby
BiHi has quit [Quit: Computer has gone to sleep]
<libryder> oh dear as in awesome?
brianpWins has joined #ruby
<koshii> Why would you want a shell to necessarily be in pure Ruby?
<libryder> you still have all the regular bash stuff, this just gives you the ability to type ruby directly in the terminal
<koshii> Wait so it's like irb but also does bash-y stuff?
<koshii> I guess that is pretty cool if so.
w400z has quit []
bluOxigen has joined #ruby
bluOxigen has quit [Changing host]
bluOxigen has joined #ruby
<Xeago> unfortunate it is dead
<vectorshelve> carloslopes: hi dude :)
<carloslopes> vectorshelve: hi man
w400z has joined #ruby
Guest40369 has joined #ruby
<davidcelis> dude doesn't even look at the Issues
mrdodo has joined #ruby
<davidcelis> theres one that's been open (and fixed) for three years about mongrel as a dependency
c0rn_ has joined #ruby
ShadowBelmolve_ has joined #ruby
ShadowBelmolve__ has joined #ruby
beneggett has joined #ruby
erichmenge has joined #ruby
<Muz> Just as well, things like that Should Not Be.
<fowl> libryder: you could use pry and dot commands to get to the shell
jorge_ has quit [Remote host closed the connection]
<davidcelis> Muz: The Issue was to remove it as a dependency
<davidcelis> Muz: Which is was, very shortly after. Issue is still open
<davidcelis> it*
<davidcelis> three years
<Muz> davidcelis: I was commenting that it's just as well that it's dead.
<davidcelis> ah
<davidcelis> I don't see what the problem with rush as an idea is
<davidcelis> Why not provide higher-level syntax for the shell?
<vectorshelve> carloslopes: got my ping ?
<fowl> idk why not
voodoofish430 has joined #ruby
<carloslopes> vectorshelve: yea.. but wait a moment, i'm busy here
<Muz> It may just be me, but the more abstraction layers there are between me and the underlying system, the more wary I get of the potential for something to go tits up.
ph^ has quit [Remote host closed the connection]
c0rn_ has quit [Ping timeout: 264 seconds]
Russell^^ has joined #ruby
<vectorshelve> carloslopes: sure :)
<fowl> tis up! whoop whoop!
billyjoe23 has joined #ruby
<billyjoe23> what is this syntax? @forums.map(&:id)
recycle has quit [Remote host closed the connection]
xiaotian has joined #ruby
<billyjoe23> i've not seen the &:id before
<fowl> billyjoe23: & sends a param as a block
kaleido has quit [Quit: leaving]
c0rn_ has joined #ruby
<fowl> billyjoe23: since :id isnt a block, :id.to_proc gets called
kaleido has joined #ruby
Xeago has quit [Remote host closed the connection]
Guest40369 has quit [Remote host closed the connection]
ShadowBelmolve__ has quit [Remote host closed the connection]
macmartine has quit [Quit: Computer has gone to sleep.]
<billyjoe23> "It’s an incredibly elegant use of coercion and of closures." cool thx
_andre has joined #ruby
<_andre> hello
<_andre> does anyone know how to get an IO object from a C file descriptor in an extension?
<aarwine> Regarding "gem generate_index" - The docs seem to be a bit confusing with the option "no-" you can append to either flag. --legacy seems to generate marshall indexes, does --no-legacy not generate marshall indexes? What does it do? --modern stats that it generates indexes for gems newer than 1.2; is that a gem version or a ruby version? Is that still marshall or is that the yaml indexes?
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
kvirani has joined #ruby
johnjohnson has quit []
myth17 has quit [Quit: Leaving]
juarlex_ has joined #ruby
aantix has joined #ruby
aantix has quit [Read error: Connection reset by peer]
jorge_ has joined #ruby
recycle has joined #ruby
jrist is now known as jrist-gym
c0rn__ has joined #ruby
aantix has joined #ruby
recycle has quit [Remote host closed the connection]
juarlex has quit [Ping timeout: 246 seconds]
billyjoe23 has left #ruby [#ruby]
<vectorshelve> carloslopes: done bro ?
<davidcelis> broooo
saschagehlich has joined #ruby
<vectorshelve> davidcelis: :D
socialist has quit [Ping timeout: 268 seconds]
workmad3_ has joined #ruby
pskosinski has quit [Read error: Connection reset by peer]
macmartine has joined #ruby
snearch has quit [Quit: Verlassend]
c0rn__ has quit []
baphled_ has joined #ruby
chimkan_ has quit [Ping timeout: 256 seconds]
Taichouchou2 has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
<infinitiguy> is there an easy way to turn on print statements in ruby? What I envision is something like debug = True and then would I do my print/puts statements like if !debug.nil? print "This should only be printed if debug = True
<infinitiguy> or is there a better way to go about this
baphled has quit [Ping timeout: 244 seconds]
<libryder> you can override puts
<libryder> or print
elhu has joined #ruby
<infinitiguy> there may be cases where some puts/prints might need to be displayed, but I want to be able to turn on additional information that should only be seen if given a switch (or something else similar).
<infinitiguy> im not sure what you mean by override puts/print
sendoushi has quit [Remote host closed the connection]
jjbohn is now known as jjbohn|afk
resure_away has quit [Remote host closed the connection]
LorentzFactor has quit [Ping timeout: 264 seconds]
LorentzFactor has joined #ruby
Taichouchou2 has joined #ruby
dekroning has joined #ruby
<Spitfire> infinitiguy, why not just add a new function called "debug".
<Spitfire> Instead of using puts("hi there")
<Spitfire> Use debug("hi there")
<lectrick> holy crap, I just added instance methods and ivars to a symbol. I feel dirty
<Spitfire> And in the debug function, check the debug var, if it's true, then print the statement, otherwise ignore it/log it.
jorum has joined #ruby
recycle has joined #ruby
<Spooner> infinitiguy : Use log4r perhaps rather than rolling your own?
recycle has quit [Remote host closed the connection]
twigmorewelsh has quit [Quit: Leaving...]
twigmorewelsh has joined #ruby
chimkan_ has joined #ruby
t27415 has quit [Remote host closed the connection]
RichieEvan has joined #ruby
<infinitiguy> with log4r would I be able to log as well as print to console output for only a subset of data?
t28068 has joined #ruby
<aarwine> It's become quite obvious that --modern and --no-modern do drastically different things. Why do the docs not address it?
manizzle has quit [Read error: No route to host]
pskosinski has joined #ruby
<Spitfire> infinitiguy, fairly sure you should just be able to make multiple instances of the class for that, although I'm not familiar with log4r.
<Spooner> It is more that you can set debug level and it shows only those levels. Thus #debug, #info, #error, etc, write out ouput but can be turned on and off based on logging level. A gem can't magically know which variables you want to turn on and off logging for though.
workmad3_ has quit [Ping timeout: 260 seconds]
<Spooner> infinitiguy : Yeah, you can have multiple logger instances (I have one per class, for example, so I get the class name output as well as the debug message).
joephlius has joined #ruby
timonv has joined #ruby
csquared has joined #ruby
<Spooner> "with log4r would I be able to log as well as print to console output" - log4r isn't about logging to a file, but managing your logging output text. It is up to you where the output goes (console and/or file).
jasonkuhr has quit [Quit: Leaving...]
fearoffish has joined #ruby
andrewstewart has quit [Quit: Leaving...]
joephelius has quit [Ping timeout: 264 seconds]
answer_42 has quit [Ping timeout: 276 seconds]
havenn has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 244 seconds]
chrisja has joined #ruby
adambeynon has quit [Quit: Computer has gone to sleep.]
havenn has joined #ruby
vectorshelve_ has joined #ruby
vectorshelve_ is now known as newnick
wallerdev has joined #ruby
rudyl313 has quit [Ping timeout: 245 seconds]
paolooo has quit [Ping timeout: 245 seconds]
<lectrick> i was experimenting with some dsl ideas for specifying permissions on files and wrote this monstrosity in an irb: def r;:read;end; def w;:write;end; [:read,:write].each{|f| f.send(:eval, "def &(o); self.to_s + ' and ' + o.to_s; end")}; puts r&w; puts w&r
__class__ has quit [Ping timeout: 240 seconds]
newnick has quit [Client Quit]
johnjohnson has joined #ruby
kiyoura has quit [Ping timeout: 245 seconds]
vectorshelve_ has joined #ruby
<matti> lectrick: Files as on a file system?
vectorshelve has quit [Ping timeout: 245 seconds]
<lectrick> Although I couldn't find a way to tell a single symbol instance to include or extend a module with that method.
vectorshelve_ has quit [Client Quit]
<lectrick> matti: Yes, but the example doesn't show that part
<matti> Why would you do it?
vectorshelve has joined #ruby
<matti> Isn't that done already?
<matti> I might be missing bigger picture.
aantix_ has joined #ruby
<lectrick> Yes matti, it's called "rush", but I did not like the incredible verbosity of this syntax in it: file.access = { :user_can => :read_and_write, :group_and_other_can => :read }
havenn has quit [Ping timeout: 244 seconds]
__class__ has joined #ruby
<matti> Aaa...
<matti> Rush <3
<matti> A real user of Rush
<matti> Alive.
<lectrick> I'm considering it
<lectrick> Haven't been a "user" per se yet
<lectrick> But I'm getting tired of bash
<lectrick> and I keep typing ruby in my bash shell lol
aantix_ has quit [Read error: Connection reset by peer]
<matti> ;]
jerrad has joined #ruby
aantix_ has joined #ruby
paul_andrew has joined #ruby
<lectrick> Anyway there can easily be a DSL for file access permissions that could look like this: file.access[user: r&w, group: r, world: r]
rippa has joined #ruby
<lectrick> And that would be fucking sweeter than typing file.access = { :user_can => :read_and_write, :group_and_other_can => :read }
<matti> Hehe
aantix has quit [Ping timeout: 264 seconds]
aantix_ has quit [Read error: Connection reset by peer]
krz has joined #ruby
<matti> Cut it down to: file.set(:access, rw)
<lectrick> I know 'r' and 'w' could easily be instances of some SubPermission object or something, just wondered if I could actually add methods and attributes to a symbol and I could.
aantix has joined #ruby
<matti> Cut it down to: file.set(:owner, 'root', 'root')
<lectrick> matti: yeah, exactly
<matti> 'rw' of course.
aantix has quit [Read error: Connection reset by peer]
qwerxy has quit [Ping timeout: 244 seconds]
<lectrick> I mean, I could easily define rw, rwx, r, rx, etc etc but I was trying to be clever :)
aristidesfl has quit []
<matti> lectrick: Clever == Over-Engineered ;p
<lectrick> haha
<matti> lectrick: KISS man, KISS.
<vectorshelve> whats the differrne between print and pretty print ?
andrewstewart has joined #ruby
techsurvivor has quit [Read error: Connection reset by peer]
<matti> vectorshelve: Get complex data structure and use print, and then pp.
<matti> vectorshelve: ;]
<matti> vectorshelve: Difference will be apparent immediately.
ScottNYC has joined #ruby
resure_away has joined #ruby
<vectorshelve> matti: I know.. but verbally how do you define the difference :)
<Mon_Ouie> pretty print's output is pretty
<Mon_Ouie> print's output isn't
<matti> Haha
<matti> Mon_Ouie nailed it.
statarb3 has quit [Ping timeout: 264 seconds]
indian has joined #ruby
indian has quit [Changing host]
indian has joined #ruby
SirRamonGabriel has joined #ruby
burgestrand has joined #ruby
<TTilus> file.owner = :root
<TTilus> file.owner.access = :rw
ZachBeta has joined #ruby
geekbri has quit [Remote host closed the connection]
ph^ has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
<matti> TTilus: Too much to type.
recycle has joined #ruby
<matti> TTilus: But also better than the default ;]
recycle has quit [Remote host closed the connection]
TheShadowFog has quit [Quit: pls respond]
enyo has quit [Read error: No route to host]
blazed has joined #ruby
bluOxigen has joined #ruby
chimay has quit [Remote host closed the connection]
<shevy> RubyOS will be simple
<vectorshelve> is anybody good in design patterns here... I wanted to do Pacman game in ruby and had confusion regarding how to go about designing the whole game
<shevy> c
<shevy> c .
<shevy> c . .
<shevy> c . . .
bluenemo has quit [Remote host closed the connection]
<shevy> do you see where pacman has to go now vectorshelve
<shevy> vectorshelve, I think it is simplest to start write the game map first
jaylevitt has joined #ruby
<shevy> and what states it can have
<vectorshelve> shevy: hmmm...
chimay has joined #ruby
<shevy> http://images.pictureshunt.com/pics/p/pacman_game-1973.gif that is what states it can have
<shevy> can_move or not can_move (on the game field
<shevy> can have yellow dot
<vectorshelve> shevy: as for the mechanize i found it interesting.. i wrote one myself.. http://pastie.org/4611933 but coincidentally the site servers are down :)
<matti> I love git
<vectorshelve> shevy: dude yellow dot is about the UI :D
<vectorshelve> matti: me too
pu22l3r_ has quit [Remote host closed the connection]
<shevy> vectorshelve if you have a ncurses layout, you would have a dot too
seich- is now known as seich
<shevy> the dots determine whether the game was won or not
<vectorshelve> shevy: hmm.. but in a brief..how can I define the entire thing.. any doc or something for reference
<shevy> @game_over = true if @n_dots.empty?
<vectorshelve> shevy: so u mean dot class has the count and it keeps reducing ?
<shevy> where @n_dots would be an array counting the dots (or perhaps even better, query a game field class directly)
<shevy> I dunno... the simpler, the better
answer_42 has joined #ruby
<shevy> I usually use a @game_over variable though
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
Jay_Levitt has quit [Ping timeout: 245 seconds]
enyo has joined #ruby
schaerli has joined #ruby
<vectorshelve> shevy: nice
vectorshelve has quit [Quit: Page closed]
jorum has quit [Quit: Linkinus - http://linkinus.com]
ZachBeta has quit [Quit: Computer has gone to sleep.]
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
<lectrick> >> ObjectSpace.each_object(Symbol){|o| p o} #=> 0 ... Why?
<al2o3cr> (Fixnum) 0
yxhuvud has quit [Ping timeout: 245 seconds]
<lectrick> >> puts 'wtf'
<al2o3cr> (NilClass) nil, Console: wtf
<lectrick> (sorry)
<matti> LOL
<burgestrand> lectrick: Immediate objects (Fixnums, Symbols true, false, and nil) are never returned
gift_ has quit [Remote host closed the connection]
<Hanmac> lectrick it seems that they arent any symbols loaded :P it is not rails :D
a_a_g has quit [Quit: Leaving.]
<burgestrand> >> a = 102.7; b = 95; c = 12345678987654321; p "Count: #{ObjectSpace.each_object(Symbol) { |x| p x }}"
<al2o3cr> (String) "Count: 0", Console: "Count: 0"
<burgestrand> Um. Do not read and type. :P
<lectrick> Maybe they're not stored in the object heap or something?
<burgestrand> >> a = 102.7; b = 95; c = 12345678987654321; p "Count: #{ObjectSpace.each_object(Numeric) { |x| p x }}"
<al2o3cr> (String) "Count: 13", Console: (0+1i), 2.718281828459045, 3.141592653589793, 18446744073709551615, 3, NaN, Infinity, 2.220446049250313e-16, 1.7976931348623157e+308, 2.2250738585072014e-308, 285206720235383403330119216386156511998, 12345678987654321, 102.7, "Count: 13"
<shevy> ack
__class__ has quit [Ping timeout: 265 seconds]
recycle has joined #ruby
<burgestrand> grep
<shevy> finger
<burgestrand> lectrick: symbols are stored in a special way in MRI, same with fixnums, true, false, and nil
<burgestrand> fsck
<shevy> lol :)
<lectrick> well, those last 4 things you mentioned all have object ID's
<shevy> hmm why is there no unix command called "lol"
<lectrick> >> def lol; "LOL!"; end; lol
<al2o3cr> (String) "LOL!"
schaerli has quit [Ping timeout: 260 seconds]
<shevy> well it should do something a tiny bit more useful than that
<lectrick> >> lol #does it keep state?
<al2o3cr> -e:1:in `eval': undefined local variable or method `lol' for main:Object (NameError), from -e:1:in `eval', from -e:1:in `<main>'
<Hanmac> symbols and fixnums are bitshifted, true false, nil (and undefined) are constant values
pu22l3r has joined #ruby
Eldariof-ru has joined #ruby
deryl has quit [Quit: deryl]
mosheee has joined #ruby
mosheee has quit [Changing host]
mosheee has joined #ruby
geekbri has joined #ruby
blazed is now known as crixus
statarb3 has quit [Quit: Leaving]
__class__ has joined #ruby
moshee has quit [Ping timeout: 245 seconds]
Morkel has quit [Quit: Morkel]
recycle has quit [Remote host closed the connection]
elhu has quit [Quit: Computer has gone to sleep.]
melvinram has joined #ruby
<melvinram> How do I do this encoding? I could do force_encoding but that supposedly doesn't change the underlying bytes so that seems like a bad thing, right?
xyon has joined #ruby
<melvinram> I have a CSV file that is ASCII-8Bit encoding and I'm trying to encode it into UTF-8. string.encode('UTF-8') gives this error: Encoding::UndefinedConversionError: "\xA0" from ASCII-8BIT to UTF-8
<melvinram> sorry, that went out in reverse order
<matti> 8bit ASCII?
resure_away is now known as resure
resure is now known as resure_away
<melvinram> ASCII-8BIT
<Mon_Ouie> Ruby calls the binary encoding ASCII-8BIT
jorge_ has quit [Remote host closed the connection]
<matti> Ah
saltnvinegar has joined #ruby
Z_Mass has joined #ruby
<Mon_Ouie> melvinram: But the CSV file in your disk contains UTF-8?
havenn has joined #ruby
<matti> Encoding. Hell.
<matti> ;/
<Mon_Ouie> Anyway you should specify the encoding right when you open the file for CSV parsing
<melvinram> Mon_Ouie: I don't know. It seems like a regular file. Not sure how to check or change the file's encoding.
iamjarvo has quit [Ping timeout: 264 seconds]
aristidesfl has joined #ruby
<melvinram> Mon_Ouie: Well when I open it, it's actually using HTTParty
<Mon_Ouie> A "regular" file doesn't mean anything; a file just contains a sequence of byte, you can't *know* what its encoding, etc. is.
<Mon_Ouie> You can only try to *guess* it
mxweas has quit [Quit: Leaving...]
recycle has joined #ruby
saltnvinegar has quit [Client Quit]
Vert has quit [Ping timeout: 252 seconds]
recycle has quit [Remote host closed the connection]
<Mon_Ouie> I believe that HTTP headers specify the encoding of the body, and that an HTTP library would use those to set the encoding of the response
<melvinram> Mon_Ouie: gotcha
<melvinram> maybe there are options got HTTParty.get to set the encoding
seanyo_ has joined #ruby
cek has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
jjbohn|afk is now known as jjbohn
jaylevitt has quit [Quit: jaylevitt]
otters has quit [Ping timeout: 260 seconds]
i0n has joined #ruby
i0n has quit [Changing host]
i0n has joined #ruby
seanyo has quit [Ping timeout: 264 seconds]
Jay_Levitt has joined #ruby
Jay_Levitt has quit [Remote host closed the connection]
ar__ has quit [Quit: Leaving]
jorge has joined #ruby
seanyo_ has quit [Ping timeout: 264 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
beneggett has joined #ruby
recycle has joined #ruby
robert- has joined #ruby
robert- has quit [Client Quit]
schaerli_ has joined #ruby
mosheee has quit [Ping timeout: 265 seconds]
CannedCorn has quit [Quit: Computer has gone to sleep.]
ananthakumaran has quit [Quit: Leaving.]
williamcotton has quit [Quit: williamcotton]
revans has quit [Ping timeout: 272 seconds]
mneorr has quit [Read error: Connection reset by peer]
mneorr_ has joined #ruby
schaerli_ has quit [Remote host closed the connection]
recycle has quit [Remote host closed the connection]
seanwash has joined #ruby
Jay_Levitt has joined #ruby
jrist-gym is now known as jris
jris is now known as jrist
Spooner has quit [Ping timeout: 240 seconds]
ken_barber has joined #ruby
IrishGringo has joined #ruby
staunch has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
ShadowBelmolve_ has quit [Read error: Connection reset by peer]
burgestrand has quit [Quit: Leaving.]
Bonkers has joined #ruby
macmartine has joined #ruby
mrsrikanth has quit [Quit: Leaving]
ph^ has quit [Remote host closed the connection]
Agis__ has quit [Quit: Agis__]
ph^ has joined #ruby
Eldariof-ru is now known as eldariof
fkumro has joined #ruby
havenn has quit [Remote host closed the connection]
WeThePeople has quit [Ping timeout: 265 seconds]
wobr has joined #ruby
t28068 has quit [Remote host closed the connection]
t75323 has joined #ruby
sailias has quit [Ping timeout: 244 seconds]
Xeago has joined #ruby
brunosaboia__ has joined #ruby
pskosinski has quit [Read error: Connection reset by peer]
Rusher has joined #ruby
<Rusher> hey, I read ebook learn to program, and there's smt like this: da_man = ' Mr. T '; big_T = da_man[4]
<Rusher> what the heck is it for, how does it work?
fastred has left #ruby [#ruby]
<Hanmac> Rusher character accesstion:
<Hanmac> >> da_man = ' Mr. T '; big_T = da_man[4]
<al2o3cr> (String) " "
recycle has joined #ruby
<Hanmac> >> da_man = ' Mr. T '; big_T = da_man[5]
<al2o3cr> (String) "T"
<Rusher> I tried it but no output, in that book is written that 84 is the return value
machty has joined #ruby
<cek> 187
GuidovanPossum has joined #ruby
<Hanmac> Rusher the ebook is outdated, so
<Hanmac> >> da_man = ' Mr. T '; big_T = da_man[5].ord
<al2o3cr> (Fixnum) 84
becom33 has joined #ruby
kvirani has quit [Remote host closed the connection]
BSaboia__ has quit [Ping timeout: 245 seconds]
<becom33> whats the best way of passing argvement in the command line
blazes816 has quit [Quit: This computer has gone to sleep]
_andre has left #ruby [#ruby]
<fowl> becom33: a lot people like slop
<becom33> fowl, thanks I'll lookup for it
Know1edge has joined #ruby
Know1edge has quit [Changing host]
Know1edge has joined #ruby
<Rusher> well I understand the .chr method, but what does letters does with that method?
<Hanmac> >> 84.chr
<al2o3cr> (String) "T"
<Hanmac> >> "T".ord
<al2o3cr> (Fixnum) 84
xiaotian has quit [Quit: Computer has gone to sleep.]
crixus has quit []
<Rusher> 34.chr
<Rusher> yeh it's "I" is ASCII
WellMux has joined #ruby
<fowl> >> (1..20).map{rand(23..127).chr}.join''
<al2o3cr> (String) ">u\x7F/*rJWgI/s<G?3F@\x1CG"
<Hanmac> Rusher in the old days of ruby "string"[idx] returns only numbers wich was bad ... newer rubies return allways strings
manizzle has joined #ruby
<lupine_85> most cross-version option: string.split(/./m)[idx..idx]
<lupine_85> (or something like that, anyway)
manizzle has quit [Remote host closed the connection]
manizzle has joined #ruby
w400z has quit []
havenn has joined #ruby
Axsuul has joined #ruby
manizzle has quit [Remote host closed the connection]
joephlius is now known as joephelius
<fowl> >>(1..20).inject(''){|r,*|r<<rand(32..127).chr}
<al2o3cr> (String) "kbb(\\y l'r;Aw{-\x7F2yWE"
<Rusher> hold on I'm trying smt :)
manizzle has joined #ruby
elaptics is now known as elaptics`away
pskosinski has joined #ruby
sailias has joined #ruby
erichmenge has quit [Quit: Be back later]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
revans has joined #ruby
wobr has quit [Quit: Leaving.]
mahmoudimus has quit [Remote host closed the connection]
w400z has joined #ruby
<Rusher> Hanmac: ok but what does [4] parameter?
<Rusher> or [5]
Vert has joined #ruby
otters has joined #ruby
blazes816 has joined #ruby
<Rusher> etc.
GuidovanPossum has left #ruby [#ruby]
<Hanmac> the 5th or 6th char in the string ... begining with 0 so string[0] is the first
wallerdev has quit [Quit: wallerdev]
wendallsan has joined #ruby
<Rusher> ah finally I got it!
<Rusher> thank you
elhu has joined #ruby
seanyo has joined #ruby
geekbri has quit [Remote host closed the connection]
workmad3 has joined #ruby
t75323 has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
deryl has joined #ruby
t39517 has joined #ruby
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
reuf has joined #ruby
michael7 has quit [Remote host closed the connection]
emmanuelux has quit [Ping timeout: 244 seconds]
jorge has quit [Remote host closed the connection]
jtdowney has joined #ruby
philips_ has quit [Excess Flood]
eldariof has quit []
elhu has quit [Quit: Computer has gone to sleep.]
ringotwo has quit [Read error: Connection reset by peer]
Morkel has joined #ruby
ringotwo has joined #ruby
Rusher has left #ruby [#ruby]
philips_ has joined #ruby
timoshin has joined #ruby
c0rn__ has joined #ruby
chimay has quit [Quit: WeeChat 0.3.9-dev]
chendo_ is now known as chendo
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
qwerxy has joined #ruby
SqREL has joined #ruby
philips_ has quit [Excess Flood]
ThaDick has quit [Quit: I'm outta here!]
<staunch> any chance anyone can help me with a mechanize persistence error i am getting trying to login to a ssl site and logging in
Hanmac has quit [Ping timeout: 244 seconds]
<Muz> staunch: does your proxy allow connections to 443?
<Muz> Rather, visiting that site via an alternate browser (Firefox, Chrome etc), with that proxy, does it work?
Hanmac has joined #ruby
philips_ has joined #ruby
krawchyk has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
truent has joined #ruby
bradhe has quit [Remote host closed the connection]
truent has quit [Client Quit]
rippa has quit [Ping timeout: 268 seconds]
<staunch> goodieas
<staunch> thinking
<staunch> the proxy thing i think is the issue
<Muz> What're you using as a proxy?
recycle has quit [Remote host closed the connection]
ryan0x2 has joined #ruby
c0rn__ has quit []
Phelps has quit [Quit: Linkinus - http://linkinus.com]
recycle has joined #ruby
krz has quit [Quit: krz]
mengu has quit [Ping timeout: 264 seconds]
krz has joined #ruby
johnjohnson has quit [Ping timeout: 245 seconds]
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
jbw has quit [Ping timeout: 245 seconds]
cek has quit [Quit: жопа диридай диридиридай]
johnjohnson has joined #ruby
jorge has joined #ruby
mucker has quit [Ping timeout: 248 seconds]
recycle has quit [Remote host closed the connection]
erichmenge has joined #ruby
Progster has joined #ruby
sailias has quit []
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
jarek has joined #ruby
<shevy> ruby ruby ruby
fermion has joined #ruby
<workmad3> oooeeeoooeeeooo
pnkbst has joined #ruby
socialist has joined #ruby
t39517 has quit [Remote host closed the connection]
t39201 has joined #ruby
<workmad3> shevy: great... you just reminded me that ruby is on lego rock band... now I'm gonna have to play it :P
<shevy> I have a question
<shevy> I often have stuff like
socialist is now known as explody
<shevy> case user_input
<shevy> when :foo
<shevy> when 'bla'
<shevy> here is my problem, I seem to switch between these two
khakimov has quit [Ping timeout: 245 seconds]
<shevy> not in the same case menu, but in different case menus, in different files
<shevy> HELP!
resure_away has quit [Remote host closed the connection]
wobr has joined #ruby
<shevy> workmad3, lego rock? what is that... danish concert where guys play music and assemble things via lego blocks? :)
<Muz> shevy: you always want to use strings, or symbols? "case user_input.to_sym" etc.
<workmad3> Muz: ewww
enroxorz has quit [Quit: Leaving]
<workmad3> Muz: arbitrary user input to symbol...
<Muz> workmad3: well, he can turn it to a downcased string, or whatever the hell he likes. :p
<shevy> Muz I dont know! I mean, yes, I can convert... but the thing is, I do not seem to follow any concise way
<shevy> it is as if I randomly use one or the other :(
<shevy> I dont like this
<Muz> workmad3: what console do you have it on?
<workmad3> Muz: wii
<Muz> Oh.
khakimov has joined #ruby
axl_ has joined #ruby
pskosinski has quit [Remote host closed the connection]
Guest5516 has quit [Ping timeout: 240 seconds]
pskosinski has joined #ruby
<shevy> workmad3, when you use case
<shevy> do you use case for strings? or symbols or how
bradhe has joined #ruby
jbw has joined #ruby
<shevy> I mean you can use them via /\d+/ but I find that I use this only very rarely compared to strings or symbols
wobr has quit [Client Quit]
becom33 has quit [Ping timeout: 245 seconds]
becom33_ has joined #ruby
<becom33_> in ruby slop . doesnt it generate the help option automatically ?
maletor has quit [Quit: Computer has gone to sleep.]
jorge has quit [Remote host closed the connection]
<Mon_Ouie> It can generate it automatically, but you had to pass it a flag for it to do so last time I checked
<Mon_Ouie> Slop.parse args, :help => true do … end
<becom33_> Mon_Ouie, can u show me a example . Im kinda confused
bluOxigen has quit [Ping timeout: 244 seconds]
<workmad3> shevy: last time I used case (this afternoon) it was for exception class matching...
jorge has joined #ruby
ryan0x2 has quit [Remote host closed the connection]
PythonGirl has joined #ruby
<workmad3> shevy: I'm not sure I have a 'typical' case in all honesty... I just use whatever I need... if possible I'll try and remove it and push it into inheritance and polymorphism
<shevy> hmm ok
<shevy> that last bit sounds curiously complicated :)
<workmad3> sounds more complicated than it is :)
<shevy> hey becom33_ !!!
<shevy> becom33_ where have you been the last months!
<becom33_> hay bro yea shevy kinda got stuck in between studies
<workmad3> it's actually a nice way to remove complication, but it tends to be when you're doing case statements that switch on a type (or a proxy for a type)
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
<workmad3> you just push down the logic so that rather than having a big case statement, you instead just call a method on an object and the correct value will be returned depending on the type
<Mon_Ouie> The idea is to use method calling instead of conditions to select what portion of code should be run
hadees has quit [Quit: hadees]
<workmad3> ^^
dmiller has quit [Remote host closed the connection]
minijupe has joined #ruby
<Hanmac> but when you use a case without a statement in it, you will lose the right for Hanmac's support
wallerdev has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
burgestrand has joined #ruby
jorge has quit [Remote host closed the connection]
uris has quit [Read error: Connection reset by peer]
uris has joined #ruby
nanderoo has quit [Quit: Leaving.]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mikepack has joined #ruby
paul_andrew has quit [Ping timeout: 265 seconds]
havenn has joined #ruby
senny has quit [Remote host closed the connection]
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
jorge has joined #ruby
t39201 has quit [Remote host closed the connection]
cantonic has joined #ruby
t94607 has joined #ruby
pu22l3r has quit [Remote host closed the connection]
sepp2k1 has quit [Remote host closed the connection]
timoshin has quit [Remote host closed the connection]
<shevy> Hanmac do you use string or symbols for case when stuff
sirish has joined #ruby
<Hanmac> for internal symbols for external strings ...
PythonGirl has quit [Quit: PythonGirl]
<matti> No strings attached ;d
maletor has joined #ruby
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
pskosinski has quit [Read error: Connection reset by peer]
c0rn__ has joined #ruby
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
stkowski has quit [Quit: stkowski]
<shevy> what wait
<shevy> internal symbols
<shevy> external strings
<shevy> *confused*
jtgiri_ has quit [Ping timeout: 245 seconds]
<shevy> matti, how do you use long case/when structures please?
jrist is now known as jr-dentist
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
<matti> Long?
answer_42 has quit [Remote host closed the connection]
<matti> Define "long case structures"
<blazes816> shevy, most likely the best answer is don't. what are you trying to do that requires this huge switch?
sirish has quit [Ping timeout: 268 seconds]
<matti> blazes816: Sometimes it is cleaner than if .. elsif etc.
pskosinski has joined #ruby
<shevy> blazes816 I love case/when
<shevy> blazes816 input checking usually
Virunga has joined #ruby
<shevy> like loop { user_input = $stdin.gets.chomp; case user_input <--- HUGE CASE WHEN HERE }
jonathanwallace has quit [Remote host closed the connection]
<blazes816> matti: if there are a bunch of them yeah, but in that case there's also probably a better way
<matti> shevy: There is a pattern, which is not that popular in Ruby.
kenneth has joined #ruby
<matti> shevy: Called dispatch table ;]
<matti> shevy: Can replace ugly switch statements.
<shevy> :(
c0rn__ has quit [Client Quit]
<shevy> I need to decide on this annoying string vs. symbols thing...
<kenneth> hey there, i'm building a very simple ruby cli chat client for a demo
<workmad3> shevy: a.k.a. a hash of methods :)
<blazes816> shevy: in that case have an object responsible for executing these commands and call the methods accordingly
punkrawkR has joined #ruby
hadees has joined #ruby
<kenneth> i'd like to have all the messages from the chatroom be printed to stdout, but i'd like to always have the bottommost list be a prompt
dangerousdave has quit [Quit: Leaving...]
<blazes816> CMDs.new.send($stdin.gets.chomp) - ish
stopbit has quit [Read error: Connection reset by peer]
<shevy> hmm
<kenneth> is there a way to, when a message comes in, print it above the bottomost list?
khakimov has quit [Quit: Computer has gone to sleep.]
<shevy> wait
<shevy> blazes816, aren't those strings
asobrasil has left #ruby [#ruby]
<matti> shevy: Also, you can leverage polymorphism to make clean structures.
<shevy> wouldn't you need symbols for .send ?
<blazes816> no
<blazes816> but you can call #to_sym
mengu has quit [Read error: Connection reset by peer]
Morkel has quit [Quit: Morkel]
<workmad3> I'd probably want something like find_command($stdin.gets.chomp).execute myself
<Hanmac> object.send("string") works too you dont need .to_sym for that
<shevy> hmm ok
<blazes816> ex = CMDs.new; cmd = $stdin.gets.chop.to_sym; ex.send(cmd) if ex.respond_to cmd
<fowl> >> o=Object.new; def o.shevy() :get_funky end; o.send'shevy'
<al2o3cr> (Symbol) :get_funky
dangerousdave has joined #ruby
<shevy> strange, for some reason I thought one needs symbols
<blazes816> nasty for cramming into 1 line
miho has quit [Read error: Connection reset by peer]
<fowl> kenneth: you want a terminal ui lib, most ppl use ncurses but be warned it is not fun, you might as well use GKT or QT :)
Criztian has quit [Remote host closed the connection]
<fowl> Gtk
pskosinski has quit [Ping timeout: 264 seconds]
mikepack_ has joined #ruby
<kenneth> fowl: i wanna do a really really really simple terminal ui
<kenneth> but i guess nurse is the only way to do that?
<shevy> kenneth hmm perhaps via ncurses
<shevy> it's ugly though and you will hate it
mikepack has quit [Read error: Connection reset by peer]
<shevy> then you will want to stab your eyes out
<fowl> you could be brave and try to use raw ANSI/ConIO
<kenneth> i was hoping i could hack something together manually
<Hanmac> i uses my own wx binding ... but its not for terminal
<shevy> hehe Hanmac
matrixise has joined #ruby
fermion has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<workmad3> kenneth: you could... do you know the differences between various ttys?
Guedes0 has joined #ruby
<kenneth> nope, not really
<kenneth> only really looking to support xterm 256 though, this is for a demo
<kenneth> for a talk
__class__ has quit [Ping timeout: 260 seconds]
<kenneth> there's ansi escape code for erase the line, no?
<RubyPanther> I use ANSI color codes in xterm, they work fine
<kenneth> i think i can hack it together with that
<shevy> I'd really wish ruby-ncurses would be more fun
<RubyPanther> curses is the rather obvious choice though
<shevy> kenneth yes
<matti> Or, simplicity.
<matti> With readline.
<shevy> kenneth you can kill the full line, then start again at most-left area
<matti> Readline is dead simple for simple cli.
<kenneth> keep everything the user is typing in a buffer for each char, if a new message comes in, erase line, print the message, print newline, and print whatever was in the user's buffer
recycle has joined #ruby
<matti> shevy: Or, abuse IRC / Pry ;]
<matti> s/IRC/IRB/
<shevy> hmm
__class__ has joined #ruby
<shevy> kenneth, is that possible via Readline?
recycle has quit [Remote host closed the connection]
s0ber has quit [Read error: Connection reset by peer]
<kenneth> shevy: nope
<shevy> I still dont know of a way to read in any key for ruby
<shevy> like "left arrow key pressed" event
<shevy> or "shift + left arrow key pressed" event
ryan0x2 has joined #ruby
haxrbyte_ has quit [Remote host closed the connection]
<kenneth> shevy: it's not an input / output loop, it's output may happen while i'm typing, and should start printing at the second-to-bottom line
<shevy> odd
<shevy> that sounds complicated
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
<fowl> shevy: look at coolline
machty has quit [Ping timeout: 264 seconds]
s0ber has joined #ruby
<fowl> kenneth: to achieve what you want you're going to need some kind of input loop, possibly even using select() on stdin
erichmenge has quit [Quit: Be back later]
<kenneth> yeah
<kenneth> hmm
<kenneth> io streams are thread-safe right?
<Hanmac> thread-safe? maybe, but Hanmac-safe? maybe not :P
zastern has joined #ruby
machty has joined #ruby
<fowl> never tried. i have bad luck with threads
<zastern> Anybody know if rbenv+ruby-build is working in mountain lion, currently? I was thinking of switching, but I don't want to rvm implode unless rbenv is actually working
qwerxy has quit [Quit: offski]
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
<Hanmac> you could build your own software on osx? i didnt know apple allowed that
verto|off is now known as verto
<RubyPanther> zastern: just try it, they don't conflict you just comment out the rvm line in .profile or wherever
<zastern> RubyPanther: hmm. I use zsh actually, but yeah ok, thanks.
jorge has quit [Remote host closed the connection]
<RubyPanther> I didn't implode rvm until I'd been using rbenv for a few months
verto is now known as verto|off
Guedes is now known as Guest26352
* Hanmac uses neigher rvm nor rbenv
<RubyPanther> Actually I still didn't, I just used rm :)
jarek has quit [Quit: jarek]
Guedes0 is now known as Guedes
Guedes has quit [Changing host]
Guedes has joined #ruby
jarek has joined #ruby
<Hanmac> xD RubyPanther yeah, rm is all you need :D
evangelion has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
seanyo has quit [Ping timeout: 245 seconds]
__class__ has quit [Ping timeout: 248 seconds]
<evangelion> what's wrong with this script http://pastebin.com/gdX7sZ4T ?
<evangelion> it works with 1.8
<evangelion> but when i run it on 1.9 i get this error
pu22l3r has joined #ruby
<evangelion> Exception `Errno::EINVAL' at ./tun.rb:103 - Invalid argument - /dev/net/tun
<evangelion> i think something has changed in what ruby send to network interfaces with syswrite
<evangelion> but i can't find anything that explain what
rudyl313_ has joined #ruby
rudyl313_ is now known as rudyl313
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Taichouchou2 has quit [Remote host closed the connection]
__class__ has joined #ruby
Russell^^ has quit [Quit: Russell^^]
SqREL has quit [Quit: Leaving]
x77686d_ has joined #ruby
Russell^^ has joined #ruby
<RubyPanther> evangelion: it is not obvious what is actually even getting sent, so first figure out what data you're passing in exactly and then it should be easy enough to compare the APIs
reuf has quit [Quit: Leaving]
x77686d has quit [Ping timeout: 244 seconds]
x77686d_ is now known as x77686d
carloslopes has quit [Quit: Leaving.]
sailias has joined #ruby
<evangelion> RubyPanther: in theory i sysread the packet on computer A and then i try to push it on the tun interface created on computer B
<evangelion> and in fact it works on 1.8
paulovittor23 has quit [Remote host closed the connection]
elux has quit [Quit: Bye!]
<evangelion> anyway
<evangelion> let's check
cantbecool has quit [Quit: Computer has gone to sleep.]
pdtpatrick has quit [Quit: pdtpatrick]
pskosinski has joined #ruby
pu22l3r has quit [Read error: Operation timed out]
i0n has quit [Quit: Lost terminal]
Xeago has quit [Remote host closed the connection]
vjt has joined #ruby
dekroning has quit [Quit: leaving]
atmosx has joined #ruby
qwerxy has joined #ruby
kkimlabs has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
qwerxy has quit [Client Quit]
sailias has quit [Ping timeout: 264 seconds]
invisime has quit [Quit: Leaving.]
GenghisKen has quit [Ping timeout: 245 seconds]
gfontenot has joined #ruby
t94607 has quit [Remote host closed the connection]
und3f1 has quit [Quit: Leaving.]
t18818 has joined #ruby
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
infinitiguy has quit [Quit: Leaving.]
Guedes has quit [Ping timeout: 245 seconds]
jtdowney has quit [Read error: Connection reset by peer]
pnkbst has quit [Remote host closed the connection]
twigmorewelsh has quit [Ping timeout: 245 seconds]
saschagehlich has quit [Ping timeout: 245 seconds]
x77686d has quit [Remote host closed the connection]
x77686d has joined #ruby
w400z has quit []
vlad_starkov has quit [Remote host closed the connection]
DrShoggoth has quit [Quit: Leaving]
qwerxy has joined #ruby
__class__ has quit [Ping timeout: 265 seconds]
banisterfiend has quit [Ping timeout: 246 seconds]
randomau_ has joined #ruby
banisterfiend has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
naz has quit [Ping timeout: 252 seconds]
ph^ has quit [Remote host closed the connection]
recycle has joined #ruby
x77686d_ has joined #ruby
x77686d_ has quit [Client Quit]
__class__ has joined #ruby
alanp_ has joined #ruby
randomautomator has quit [Ping timeout: 264 seconds]
mml has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
<mml> threading gurus: why deadlock? https://gist.github.com/3519482
jclem has quit [Quit: Leaving...]
WellMux has quit [Ping timeout: 252 seconds]
lolzie has joined #ruby
x77686d has quit [Ping timeout: 248 seconds]
<lolzie> Doesn't specifying ClassName.method for every single class method kinda violate the whole DRY principle?
kenneth has quit [Quit: kenneth]
<lolzie> The redundancy must be a bit problematic when you decide to refactor/change the class name
<Mon_Ouie> def self.foo
kenneth has joined #ruby
alanp has quit [Read error: Connection reset by peer]
recycle has quit [Remote host closed the connection]
<rking> lolzie: Like Mon_Ouie is saying — within the context of a "class" definition, "self" == the class, so you can use it instead of the literal constant.
mneorr_ has quit [Remote host closed the connection]
<lolzie> rking: awesome, knew there was a better alternative, thanks :)
saschagehlich has joined #ruby
<rking> Mon_Ouie: I stole yo credit, son!!
<lolzie> Stole it with style
mneorr has joined #ruby
Wizywig has joined #ruby
Majost has quit [Ping timeout: 250 seconds]
jorge has joined #ruby
jorge has quit [Remote host closed the connection]
fearoffish has quit [Quit: Computer has gone to sleep.]
kkimlabs has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
LorentzFactor has quit [Read error: Connection reset by peer]
wmoxam has quit [Ping timeout: 268 seconds]
CoverSlide has quit [Ping timeout: 252 seconds]
saschagehlich_ has joined #ruby
jorge has joined #ruby
qwerxy has quit [Quit: offski]
kenneth has quit [Read error: Connection reset by peer]
seanwash has quit [Quit: Leaving.]
kenneth has joined #ruby
saschagehlich has quit [Ping timeout: 252 seconds]
saschagehlich_ is now known as saschagehlich
adeponte has quit [Remote host closed the connection]
AlbireoX has joined #ruby
jenrzzz has joined #ruby
c0rn_ has joined #ruby
dmiller has joined #ruby
<pskosinski> How can I so something like: echo "CONSTANT no_idea_how_many_chars def" | sed 's/CONSTANT \(.*\) def/\1/' ?
jorge has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
<pskosinski> It will give me "no_idea_how_many_chars"
<pskosinski> I can play with index etc… but there is a one method?
<jenrzzz> is the no_idea_how_many_chars part going to have spaces in it?
<pskosinski> No
c0rn_ has quit [Ping timeout: 256 seconds]
<pskosinski> Oh, split…
<jenrzzz> "CONSTANT no_idea_how_many_chars def".split()[1]
<pskosinski> Yes, thank you. :) Why I didn't think about it…
t18818 has quit [Remote host closed the connection]
t48487 has joined #ruby
<Muz> >> "CONSTANT no_idea_how_many_chars def".sub(/CONSTANT (.*) def/, '\1')
<al2o3cr> (String) "no_idea_how_many_chars"
Jay_Levitt has quit [Ping timeout: 245 seconds]
saschagehlich has quit [Quit: saschagehlich]
<Muz> If you're dead set on using your regex, for whatever reason.
larissa has joined #ruby
<pskosinski> Oh… so I misunderstood how sub works… thank you too. :)
<Muz> Could come up with a cleaner, and nicer solution if you explained the actual problem a bit more too though.
Spooner has joined #ruby
eignerchris has joined #ruby
banisterfiend has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
jgrevich_ has joined #ruby
c0rn_ has joined #ruby
jjbohn is now known as jjbohn|afk
jgrevich has quit [Ping timeout: 264 seconds]
jgrevich_ is now known as jgrevich
<pskosinski> Thank you but I think that I will do it. ^^
bier_ has quit [Ping timeout: 246 seconds]
recycle has joined #ruby
PythonGirl has joined #ruby
recycle has quit [Remote host closed the connection]
PythonGirl has quit [Client Quit]
<koshii> Ruby Koans is BRILLIANT
<koshii> Thanks, whoever made it!
c0rn_ has quit [Client Quit]
brunosaboia__ has quit [Read error: Connection reset by peer]
bier has joined #ruby
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
[Neurotic] has joined #ruby
statarb3 has quit [Ping timeout: 252 seconds]
dmiller has quit [Remote host closed the connection]
dmiller has joined #ruby
havenn has joined #ruby
SQLStud has joined #ruby
chussenot has quit [Quit: chussenot]
philips_ has quit [Excess Flood]
jjbohn|afk has quit [Quit: Leaving...]
philips_ has joined #ruby
vivien__ has quit [Ping timeout: 246 seconds]
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
minijupe has quit [Quit: minijupe]
MasterIdler has quit [Ping timeout: 265 seconds]
sdwrage has joined #ruby
seanstickle has joined #ruby
macmartine has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
allyraza has quit [Ping timeout: 264 seconds]
__class__ has quit [Ping timeout: 248 seconds]
joshman_ has quit [Ping timeout: 246 seconds]
mc0e has quit [Ping timeout: 244 seconds]
revans has quit [Quit: Linkinus - http://linkinus.com]
maletor has joined #ruby
robustus has quit [Ping timeout: 244 seconds]
c0rn_ has joined #ruby
recycle has joined #ruby
recycle has quit [Remote host closed the connection]
t48487 has quit [Remote host closed the connection]
t81309 has joined #ruby
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
__class__ has joined #ruby
zodiak has quit [Quit: Leaving]
c0rn_ has quit [Ping timeout: 252 seconds]
darren has joined #ruby
pskosinski has quit [Read error: Connection reset by peer]
<davidcelis> you're welcome
Averna has joined #ruby
Averna has quit [Max SendQ exceeded]
Averna has joined #ruby
kirun has quit [Quit: Client exiting]
lupine_85 has left #ruby ["Leaving"]
lupine_85 has joined #ruby
c0rn_ has joined #ruby
butblack has joined #ruby
qwerxy has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<maletor> why is topic only 193?
<seanstickle> As opposed to … ?
c0rn_ has quit [Ping timeout: 268 seconds]
<maletor> 18?
<seanstickle> 1.8 is old news
<Muz> 1.8 is deprecated.
<Muz> This channel isn't 1.9.3 specific, it's just signifying the latest official release via the topic.
c0rn_ has joined #ruby
Synthead has quit [Quit: p33 ba115]
dangerousdave has quit [Quit: Leaving...]
recycle has joined #ruby
<fowl> no, muz, he's right, this channel is 1.9.3 only
<Muz> Right.
Wizywig has quit [Ping timeout: 245 seconds]
iamjarvo has joined #ruby
chrisbolton has quit [Quit: chrisbolton]
wvms has joined #ruby
<zastern> so what does Hanmac use
jso has quit []
vlad_starkov has joined #ruby
mc0e has joined #ruby
dju has quit [Ping timeout: 246 seconds]
c0rn_ has quit [Ping timeout: 248 seconds]
g_rotbart has joined #ruby
nari has joined #ruby
ZachBeta has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
recycle has quit [Remote host closed the connection]
emmanuelux has joined #ruby
vlad_starkov has quit [Ping timeout: 248 seconds]
Logan has joined #ruby
Logan is now known as Guest32178
c0rn_ has joined #ruby
dju has joined #ruby
<Guest32178> .
MetaCosm has quit []
Guest32178 has left #ruby [#ruby]
sneakyness_wk has quit [Read error: Connection reset by peer]
jso has joined #ruby
ZachBeta has quit [Client Quit]
bier has quit [Remote host closed the connection]
deryldoucette has joined #ruby
axl__ has joined #ruby
blazes816 has quit [Quit: This computer has gone to sleep]
sneakyness_wk has joined #ruby
awarner has quit [Remote host closed the connection]
<havenn> Guest26352: .: not enough arguments
deryl has quit [Ping timeout: 245 seconds]
deryldoucette is now known as deryl
indian has quit [Ping timeout: 248 seconds]
davidcelis has quit [Quit: K-Lined.]
axl_ has quit [Ping timeout: 265 seconds]
axl__ is now known as axl_
Russell^^ has quit [Quit: Russell^^]
fearoffish has joined #ruby
melvinram has quit [Quit: melvinram]
bier has joined #ruby
ryh has quit [Remote host closed the connection]
johnlcox has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
blazes816 has joined #ruby
melvinram has joined #ruby
jonathanwallace has joined #ruby
luist has quit [Quit: luist]
uris has quit [Quit: leaving]
baphled_ has quit [Ping timeout: 244 seconds]
ringotwo has quit [Remote host closed the connection]
lkba has joined #ruby
araujo has quit [Quit: Leaving]
macmartine has quit [Ping timeout: 264 seconds]
jorge_ has joined #ruby
pskosinski has joined #ruby
w400z has joined #ruby
lolzie has quit [Ping timeout: 245 seconds]
dinkytoy has joined #ruby
Brainix has joined #ruby
sneakyness_wk has quit [Quit: AND AWAY]
cbuxton has quit [Quit: Leaving.]
LouisGB has quit []
wmoxam has joined #ruby
banseljaj is now known as imami|afk
Virunga has quit [Quit: Sto andando via]
t81309 has quit [Remote host closed the connection]
t95341 has joined #ruby
jorge_ has quit [Ping timeout: 265 seconds]
ken_barber has quit [Remote host closed the connection]
pu22l3r has joined #ruby
jr-dentist is now known as jrist
iamjarvo has quit [Ping timeout: 244 seconds]
qwerxy has quit [Quit: offski]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
x77686d has joined #ruby
jjang has joined #ruby
__class__ has quit [Ping timeout: 264 seconds]
nari has quit [Ping timeout: 260 seconds]
JoshWines has joined #ruby
havenn has quit [Remote host closed the connection]
SirRamonGabriel has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
zastern has quit [Remote host closed the connection]
melvinram has quit [Quit: melvinram]
infinitiguy has joined #ruby
reset has joined #ruby
S1kx has quit [Ping timeout: 260 seconds]
wpaulson has joined #ruby
pdelgallego has joined #ruby
pdtpatrick has joined #ruby
wpaulson has quit [Read error: Connection reset by peer]
AlbireoX has quit [Remote host closed the connection]
wpaulson has joined #ruby
mikepack_ has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 244 seconds]
wpaulson_ has joined #ruby
__class__ has joined #ruby
macer1 has quit [Read error: Connection reset by peer]
g_rotbart has quit [Remote host closed the connection]
wpaulson has quit [Ping timeout: 252 seconds]
wpaulson_ is now known as wpaulson