apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p385: http://ruby-lang.org (ruby-2.0.0-rc1) || Paste >3 lines of text on http://gist.github.com
<havenwood> slyv: np, other way to write it (maybe clearer?): 118416 / 118416.fdiv(4620) #=> 4620.0
<Qwakeree> havenwood : do you use some special function of IRC for coppying nick name of user whitch you are writing?
<slyv> @havenwood: Mhm, that does seem cleaner
<havenwood> Qwakeree: I hit `tab` for autocompletion.
onemanjujitsu has joined #ruby
Criztian has quit [Remote host closed the connection]
<Qwakeree> just tab?
<havenwood> Qwakeree: Yeah, so for you I hit qw-tab and it gives me "Qwakeree: "
SCommette has quit [Quit: SCommette]
<Qwakeree> i have here something like that: /msg ChanServ and /msg NickServ
artOfWar has quit [Read error: Connection reset by peer]
<havenwood> Qwakeree: I like `tab` for autocomplete nicknames.
rakaar_ has joined #ruby
ilyam has quit [Read error: Connection reset by peer]
<Qwakeree> aaaaa
<peteyg> `tab` is great
artOfWar has joined #ruby
<Qwakeree> i see
<Qwakeree> thank you :-)
ilyam has joined #ruby
stopbit has joined #ruby
forced_request has joined #ruby
etcetera has joined #ruby
samphippen has joined #ruby
TheFuzzball has quit [Quit: Computer has gone to sleep.]
rakaar has quit [Ping timeout: 252 seconds]
x82_nicole has quit [Quit: Computer has gone to sleep.]
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
kenneth has joined #ruby
<forced_request> Can anyone help me with what should be a simple problem? https://gist.github.com/forced-request/4774831
mephux has quit [Excess Flood]
squidBits has quit [Quit: squidBits]
<Qwakeree> forced_request tell us whats up
<forced_request> Basically, I'm trying to figure out how to access the variable "@vars" that is defined in sim.rb (the main program) within the FunctionParser class
mephux has joined #ruby
artOfWar has quit [Remote host closed the connection]
<Jalada> You should probably pass it to the class
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
sn0wb1rd has quit [Quit: sn0wb1rd]
<Qwakeree> forced_request u can try change your variable from @vals to @@vals
<forced_request> Yeah, I thought about that but didn't think it seemed like the best option
<forced_request> I think I'll restructure the code a bit and see what happens
<forced_request> thanks!
anonymuse has quit [Quit: Leaving.]
AntiTyping has joined #ruby
<havenwood> forced_request: I'd put the sim.rb @vals in side the FunctionParser class or in a module that you can include.
tommyvyo has joined #ruby
banister_ is now known as banister`sleep
johnpcamara has quit [Quit: johnpcamara]
<slyv> Okay, I have some match data via .match, is it possible to add something arbitrary to that variable containing them?
techhelp has quit [Quit: This computer has gone to sleep]
flip_digits has joined #ruby
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
AndChat| has joined #ruby
pskosinski has quit [Quit: Red Eclipse: http://pawelk.pl/quinton-reeves]
onemanjujitsu has quit [Quit: onemanjujitsu]
flip_digits has quit [Client Quit]
<havenwood> s/in a module/in a constant on a module
cableray has joined #ruby
Banistergalaxy has quit [Ping timeout: 272 seconds]
jodok has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
phantasm66 has quit [Quit: *poof*]
mmitchell has joined #ruby
d34th4ck3r has quit [Ping timeout: 272 seconds]
ryanf has quit [Read error: Connection reset by peer]
halfdan has left #ruby [#ruby]
ryanf has joined #ruby
<havenwood> slyv: $~ is the global that points at the instance of the last match. You can edit that. You can't edit any of the globals that depend on $~.
<slyv> Aight, thank you.
benlieb has quit [Quit: benlieb]
nari has quit [Ping timeout: 252 seconds]
<havenwood> slyv: So no editing $&, $`, $+, $', or $1... except they change if you modify $~.
etcetera has quit [Read error: Operation timed out]
xlogic has quit [Remote host closed the connection]
<slyv> Alright, I understand now
_justin has joined #ruby
<havenwood> slyv: PS, dunno if you know it already, but Zenspider's QuickRef has a handy list of pre-def vars: http://zenspider.com/Languages/Ruby/QuickRef.html#pre-defined-variables
<slyv> No, I didn't know! Thanks for that!
arya has quit [Ping timeout: 248 seconds]
mmitchell has quit [Ping timeout: 260 seconds]
arya has joined #ruby
atmosx_desktop has quit [Quit: And so the story goes…]
wargasm has joined #ruby
joana_ has quit [Read error: Connection reset by peer]
tcstar has quit [Ping timeout: 245 seconds]
yshh has quit [Remote host closed the connection]
ericmathison has quit [Ping timeout: 256 seconds]
etcetera has joined #ruby
niklasb has quit [Ping timeout: 252 seconds]
hit has quit [Quit: hit]
jimeh has quit [Quit: Computer has gone to sleep.]
LouisRoR has quit [Ping timeout: 252 seconds]
Konboi has joined #ruby
cyong has joined #ruby
nga4 has joined #ruby
<aedornm> I've been waiting for this wifi blocking wall paper since 2004... everytime I look for it, it's still "coming soon".
karupanerura has quit [Excess Flood]
freakazoid0223 has quit [Quit: Leaving]
karupanerura has joined #ruby
<havenwood> aedornm: hmmm, seems like nsa-style copper mesh could get real expensive!
tjbiddle_ has joined #ruby
IrishGringo has quit [Ping timeout: 256 seconds]
danneu1 has quit [Ping timeout: 252 seconds]
<havenwood> aedornm: embedded stuff in wallpaper, hows it work?
<havenwood> "triangular snowflake-patterned mesh to filter out selected frequencies" cool :)
<aedornm> havenwood: but it's still not out yet, it makes me think of vapor-ware
<Nuck> Is it possible to make it so I can provide a "respond" method to a Proc?
_justin has quit [Quit: Leaving.]
kpshek has joined #ruby
<havenwood> aedornm: yeah, seems to be lots written about it but no prices to be found!
<aedornm> same with the anti-wifi paint that was supposedly out in 2009
tjbiddle has quit [Ping timeout: 260 seconds]
tjbiddle_ is now known as tjbiddle
cyong has quit [Max SendQ exceeded]
<Nuck> havenwood, aedornm: Supposedly American passports contain that mesh in the cover
fedza__ is now known as fedza
<Nuck> So that it blocks out signals fo the NFC chip normally
<aedornm> Nuck: My (US) passport is anything but anti wifi
squidBits has joined #ruby
mengu has quit [Quit: Leaving]
BRMatt has quit [Quit: Leaving]
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
cyong has joined #ruby
<Nuck> aedornm: haha I don't think NFC is on the 2.6GHz band
cyong has quit [Max SendQ exceeded]
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
cyong has joined #ruby
v0n has joined #ruby
<aedornm> hah well, it doesn't block NFC either
SCommette has joined #ruby
_nitti has joined #ruby
<Nuck> No? Weird, I'd heard they set it up to block that
<Nuck> But if not, that's certainly problematic
<Nuck> I'm beginning to think these meshes never existed in the first plce.
<aedornm> Unless it's very recent, within the past few months, nothing has changed
idkazuma has quit [Remote host closed the connection]
<aedornm> I was able to read info from a friend's passport that he got just recently (October) with my phone
<aedornm> closed/not closed, and even through a bag
sn0wb1rd has joined #ruby
v0n has quit [Read error: Connection reset by peer]
axl_ has quit [Quit: axl_]
alvaro_o has quit [Ping timeout: 246 seconds]
kpshek has quit []
joana_ has joined #ruby
<Nuck> aedornm: Yeah that sounds like NFC to me lol
angusiguess has joined #ruby
<aedornm> It's a big joke.. for all the money we toss into defense, we really fail at protecting things like identity
Vert has joined #ruby
<Nuck> If somebody made passport case cases which blocked NFC they'd probably get rich
<Nuck> Kickstart dat shit?
Pandaen has quit [Ping timeout: 248 seconds]
<aedornm> hah, well, the moment the anti wifi paint (supposed to block all wireless signals) I will totally start selling painted cardboard to people.
cyong has quit [Max SendQ exceeded]
bubblehead has joined #ruby
maxmanders has joined #ruby
_nitti has quit [Ping timeout: 260 seconds]
cyong has joined #ruby
<havenwood> polyester coated aluminum passport holder: http://www.tombihn.com/PROD/TB0932.html
cyong has quit [Client Quit]
QKO_ has joined #ruby
joofsh has joined #ruby
<havenwood> Another nice one from ThinkGeek: http://www.thinkgeek.com/product/910f/
djwonk has joined #ruby
<aedornm> havenwood: but it only block RFID, and actually doesn't block just degrades the signal quality. Won't do much for NFC since you already have to be close
<havenwood> Any OP on in the mood to update /title to ruby-2.0.0-rc2?? :)
biff_tannen has quit [Ping timeout: 252 seconds]
techhelp has joined #ruby
QKO has quit [Ping timeout: 260 seconds]
techhelp has quit [Remote host closed the connection]
<havenwood> aedornm: Take emi-shielded bags from old graphics cards layered with copper mesh and make your own? :D
slainer68 has quit [Remote host closed the connection]
maxmanders has quit [Ping timeout: 256 seconds]
<havenwood> if microwave radiation as crowd deterrent gets more popular it might be nice to have some nice shielded-but-comfy clothing. >.>
icole has quit [Remote host closed the connection]
<aedornm> lol
Pandaen has joined #ruby
robotmay has quit [Ping timeout: 256 seconds]
mythical has joined #ruby
maxmanders has joined #ruby
ilyam has quit [Quit: ilyam]
alvaro_o has joined #ruby
taoru has joined #ruby
niklasb has joined #ruby
danneu1 has joined #ruby
nari has joined #ruby
james__ has joined #ruby
Vektor has quit []
yshh has joined #ruby
Pandaen has quit [Ping timeout: 252 seconds]
willob has quit [Quit: Leaving.]
niklasb has quit [Ping timeout: 252 seconds]
<mr-rich> I want to monitor a ruby cli app, but I don't want to fill the screen up with numbers or dots. Is there a way to put a simple counter that overwrites the output each time?
adman65 has quit [Quit: adman65]
mrsolo has quit [Quit: Leaving]
danneu1 is now known as danneu
ner0x has quit [Quit: Leaving]
<danneu> mr-rich: could clear the screen each time
<danneu> mr-rich: system("clear")
maxmanders has quit [Ping timeout: 260 seconds]
<danneu> just like a frame buffer
onemanjujitsu has joined #ruby
<mr-rich> danneu: a little overkill ... I've seen shell scripts do this ... wondered if ruby could do the same ... like a progress bar or something ...
<havenwood> mr-rich: print "3"; sleep 1; print "\b2"; sleep 1; print "\b1"
<havenwood> mr-rich: TL;DR: "\b" to backspace and write over
<Nuck> Anyways, back to my original question, I'm trying to make a "respond" ability part of my DSL here, but I'm not sure how to go about it https://gist.github.com/NuckChorris/4782283#file-module-rb-L9
<Nuck> (file shows the exact situation)
<mr-rich> just found $stdout.flush ... ?
fmcgeough has joined #ruby
tensil has joined #ruby
<havenwood> mr-rich: you could use curses
<Nuck> havenwood: Or he could just curse at his computer.
almondev has quit [Read error: Connection reset by peer]
james__ has quit [Quit: Computer has gone to sleep.]
brianpWins has quit [Read error: Connection reset by peer]
<havenwood> Nuck: Whats a respond ability? This a DSL?
brianpWins has joined #ruby
the_mentat has joined #ruby
ngoldman has quit [Remote host closed the connection]
segv- has quit [Quit: segv-]
<Nuck> havenwood: Aye, it's a DSL
aantix_ has joined #ruby
uris has quit [Ping timeout: 256 seconds]
<Nuck> havenwood: But I'm trying to figure out how to implement it
almondev has joined #ruby
<havenwood> Nuck: So you want to make your own #respond method? What does it return?
johnpcamara has joined #ruby
jasonkuhrt has joined #ruby
skogis has quit [Ping timeout: 252 seconds]
ilyam has joined #ruby
marr has quit [Ping timeout: 252 seconds]
<slyv> Is there an easy way in ruby to get all the numbers before n number? Like given 5, output 4, 3, 2, 1?
aantix has quit [Ping timeout: 245 seconds]
<Nuck> havenwood: Returns nothing, it's an output command
Virunga has quit [Remote host closed the connection]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
sailias has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
etank has joined #ruby
<havenwood> slyv: hrmm... maybe: [*1...5].reverse; #or; (5 - 1).downto(1).to_a
<slyv> The latter looks the nicest :)
<slyv> Thanks!
<havenwood> slyv: np, dunno why I assumed you wanted an array - if you're iterating nicer to not convert it to an array I guess: (5 - 1).downto(1) { |i| puts i }
otherj has quit []
<slyv> Nah, was wanting it in an array
<havenwood> slyv: aha! cool then ;)
<slyv> :D
elaptics is now known as elaptics`away
samphippen has quit [Quit: Computer has gone to sleep.]
etcetera has quit []
uris has joined #ruby
tensil has left #ruby [#ruby]
bttf has joined #ruby
etcetera has joined #ruby
kenneth has quit [Ping timeout: 272 seconds]
tensil has joined #ruby
breakingthings has joined #ruby
daniel_- has quit [Read error: Operation timed out]
eka has quit [Quit: Computer has gone to sleep.]
pdamer has joined #ruby
apoch632 has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
allaire has joined #ruby
fermion has joined #ruby
tensil has left #ruby [#ruby]
dagnachew has joined #ruby
tensil has joined #ruby
<breakingthings> I'm working on an IRC bot application and am looking for some feedback on structure regarding my classes that maintain the connection and interact with the IRC server…
<breakingthings> I want to establish a way to listen and respond to PING;
yacks has joined #ruby
tensil has quit [Client Quit]
<breakingthings> I was thinking I would set up a Thread to read the socket and respond write "PONG" when it detects the server asking for a PING.
<breakingthings> However, that seems out of the scope and purpose of Connection or IO. Should this be in my main class, where it can assemble the connection and handle it there?
inokenty has quit [Quit: Leaving.]
dallasm has joined #ruby
joofsh has quit [Remote host closed the connection]
ephemerian has left #ruby [#ruby]
tensil has joined #ruby
forced_request has quit [Quit: Leaving]
emmanuelux has quit [Quit: emmanuelux]
ilyam has quit [Quit: ilyam]
QKO has joined #ruby
Onii-san has quit [Ping timeout: 276 seconds]
QKO_ has quit [Ping timeout: 260 seconds]
arya has quit [Read error: Connection reset by peer]
arya has joined #ruby
joofsh has joined #ruby
<danneu> mr-rich: i've actually used a few of the Ruby cli progress bar gems
<danneu> mr-rich: might get the best answer just reading their source
Onii-san has joined #ruby
d2dchat has quit [Remote host closed the connection]
<danneu> haha, there's actually a category for them
<mr-rich> danneu: did a print with a \r ... worked like a charm ...
ner0x has joined #ruby
<danneu> -____-
<danneu> breakingthings: i've had good responses asking for code review on reddit.com/r/ruby
beneggett has quit [Quit: Computer has gone to sleep.]
onemanjujitsu has quit [Quit: onemanjujitsu]
peteyg has quit [Ping timeout: 248 seconds]
beneggett has joined #ruby
Vert has quit [Read error: Connection reset by peer]
mythical has quit [Quit: mythical]
mikepack has quit [Remote host closed the connection]
SeanLazer has joined #ruby
dagnachew has quit [Remote host closed the connection]
mikepack has joined #ruby
lancepantz is now known as lancepantz_
jpfuentes2 has joined #ruby
brianpWins has quit [Quit: brianpWins]
mikepack has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
statarb3 has quit [Ping timeout: 245 seconds]
stormetrooper has quit [Quit: Death Star under attack]
alexim has joined #ruby
ahokaomaeha has joined #ruby
bricker is now known as bricker`work
huoxito has joined #ruby
ericmathison has joined #ruby
ilyam has joined #ruby
piotr__ has quit [Ping timeout: 260 seconds]
mikepack has quit [Ping timeout: 240 seconds]
mockra has quit [Remote host closed the connection]
otters has quit [Quit: WeeChat 0.4.0]
kpshek has joined #ruby
otters has joined #ruby
kpshek has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
nga4 has quit []
caleb_io has joined #ruby
jonahR has joined #ruby
aaronmacy has quit [Quit: Leaving.]
baba has quit [Quit: WeeChat 0.4.0]
toekutr has quit [Remote host closed the connection]
toekutr has joined #ruby
cableray has quit [Quit: cableray]
etcetera has quit []
etcetera has joined #ruby
inao has joined #ruby
megha has joined #ruby
enebo has quit [Quit: enebo]
forced_request has joined #ruby
arya has quit [Ping timeout: 248 seconds]
jodok has quit [Quit: jodok]
aaronmacy has joined #ruby
onemanjujitsu has joined #ruby
jonnie18 has quit [Ping timeout: 244 seconds]
pdamer has quit [Quit: pdamer]
dmiller1 has joined #ruby
josh_keith has quit [Ping timeout: 272 seconds]
arya has joined #ruby
hmarr has quit [Quit: Computer has gone to sleep.]
taoru_ has joined #ruby
nfk has quit [Quit: yawn]
the_mentat has quit [Quit: Computer has gone to sleep.]
Hanmac has joined #ruby
tommyvyo has joined #ruby
taoru has quit [Ping timeout: 260 seconds]
adeponte has quit [Remote host closed the connection]
Hanmac2 has quit [Ping timeout: 276 seconds]
artOfWar has joined #ruby
bttf has quit [Ping timeout: 240 seconds]
onemanjujitsu has quit [Quit: onemanjujitsu]
agarie has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
biff_tannen has joined #ruby
josh_keith has joined #ruby
QKO has quit [Read error: Operation timed out]
onemanjujitsu has joined #ruby
jonnie18 has joined #ruby
QKO has joined #ruby
SeanLazer has quit [Quit: SeanLazer]
krz has joined #ruby
Udom0 has joined #ruby
ahokaomaeha has quit [Ping timeout: 255 seconds]
tjbiddle_ has joined #ruby
vierja has quit [Read error: Connection reset by peer]
alexim has quit [Quit: sleep]
Norrin has joined #ruby
tjbiddle has quit [Ping timeout: 272 seconds]
tjbiddle_ is now known as tjbiddle
Norrin has left #ruby ["Textual IRC Client: www.textualapp.com"]
reactormonk has quit [Quit: WeeChat 0.4.0]
arya has quit [Ping timeout: 248 seconds]
Udom0 has quit [Read error: Connection reset by peer]
Udom0 has joined #ruby
johnpcamara has quit [Quit: johnpcamara]
etcetera has quit []
vierja has joined #ruby
toekutr has quit [Remote host closed the connection]
vierja has quit [Read error: Connection reset by peer]
apok has quit [Quit: apok]
reactormonk has joined #ruby
zeade has quit [Quit: Leaving.]
h4mz1d has joined #ruby
biff_tannen has quit [Ping timeout: 256 seconds]
biff_tannen has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
vierja has joined #ruby
tommyvyo has joined #ruby
otters has quit [Quit: WeeChat 0.4.0]
bricker`LA has joined #ruby
ShellFu has quit [Quit: Leaving]
otters has joined #ruby
arya has joined #ruby
elkclone has quit [Read error: Connection reset by peer]
etcetera has joined #ruby
bricker`1A has quit [Ping timeout: 276 seconds]
caleb_io has quit [Quit: caleb_io]
bricker`1A has joined #ruby
cobragoat has quit [Remote host closed the connection]
IrishGringo has joined #ruby
onemanjujitsu has quit [Quit: onemanjujitsu]
bricker`LA has quit [Ping timeout: 256 seconds]
onemanjujitsu has joined #ruby
TheFunnyOne has joined #ruby
<TheFunnyOne> lets talk ruby
TheFunnyOne has left #ruby [#ruby]
cupakromer has quit []
pdamer has joined #ruby
bradhe has joined #ruby
artOfWar has quit [Remote host closed the connection]
<breakingthings> ok
artOfWar has joined #ruby
ezkl has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
stormetrooper has joined #ruby
psyprus has quit [*.net *.split]
undersc0re97 has quit [*.net *.split]
SeanLazer has joined #ruby
arya has quit [Ping timeout: 248 seconds]
taoru_ has quit [Remote host closed the connection]
taoru has joined #ruby
jasonkuhrt has quit [Quit: Linkinus - http://linkinus.com]
anonwu has quit [Ping timeout: 272 seconds]
statarb3 has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
squidBits has quit [Quit: whoops]
arya has joined #ruby
gommo has joined #ruby
adeponte has joined #ruby
ner0x has quit [Quit: Leaving]
Norrin has joined #ruby
anonwu has joined #ruby
BadLarry has quit [Ping timeout: 245 seconds]
QKO_ has joined #ruby
havenwood has quit [Remote host closed the connection]
bricker`1A is now known as bricker
onemanjujitsu has quit [Quit: onemanjujitsu]
QKO has quit [Ping timeout: 256 seconds]
ryanjh has joined #ruby
etcetera has quit []
caleb_io has joined #ruby
warb0 has quit [Ping timeout: 252 seconds]
joeycarmello has quit [Remote host closed the connection]
nat_home has quit [Quit: Leaving.]
rupee has quit [Ping timeout: 272 seconds]
techhelp has joined #ruby
gcoderre has joined #ruby
plotter has joined #ruby
stormetrooper has quit [Quit: Leaving]
gcoderre has left #ruby [#ruby]
sepp2k has quit [Remote host closed the connection]
freakazoid0223 has joined #ruby
jrajav has joined #ruby
mockra has joined #ruby
jrajav has quit [Client Quit]
agarie has joined #ruby
BadLarry has joined #ruby
kascote has quit [Quit: Leaving...]
onemanjujitsu has joined #ruby
ozgura has quit [Ping timeout: 256 seconds]
johnpcamara has joined #ruby
Kingy has quit [Quit: Leaving]
otherj has joined #ruby
dustint has joined #ruby
tcstar has joined #ruby
etcetera has joined #ruby
ner0x has joined #ruby
joeycarmello has joined #ruby
undersc0re97 has joined #ruby
psyprus has joined #ruby
jeffreybaird has joined #ruby
caleb_io has quit [Quit: caleb_io]
otherj has quit [Client Quit]
etcetera has quit [Client Quit]
IceDragon has quit [Quit: Space~~~]
h4mz1d has quit [Ping timeout: 248 seconds]
ozgura has joined #ruby
oceansubie has joined #ruby
pavilionXP has quit [Read error: Connection timed out]
fermion has quit [Quit: Textual IRC Client: www.textualapp.com]
biff_tannen has quit [Ping timeout: 255 seconds]
dhruvasagar has joined #ruby
macmartine has joined #ruby
bean has joined #ruby
caleb_io has joined #ruby
jlast has quit [Remote host closed the connection]
bttf has joined #ruby
postmodern has joined #ruby
pdamer has quit [Quit: pdamer]
ozgura has quit [Ping timeout: 256 seconds]
oceansubie has quit [Remote host closed the connection]
dcwu has joined #ruby
rakaar_ has quit [Ping timeout: 256 seconds]
marek_ has joined #ruby
nat_home has joined #ruby
io_syl has quit [Ping timeout: 260 seconds]
agarie has quit [Remote host closed the connection]
anonwu has quit [Ping timeout: 255 seconds]
almondev has quit [Quit: ThrashIRC v2.8 sic populo comunicated]
cyong has joined #ruby
Qwakeree has quit [Ping timeout: 255 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
etcetera has joined #ruby
ilyam has quit [Quit: ilyam]
the_mentat has joined #ruby
x82_nicole has joined #ruby
bigkm has joined #ruby
AndChat| has quit [Ping timeout: 272 seconds]
ahokaomaeha has joined #ruby
<Nuck> Does each_line include the separator character in the line? Cause I'm trying to split this socket on \0 and it's still putting
<Nuck> \0 on the end
QKO has joined #ruby
megha has quit [Quit: WeeChat 0.4.0]
theshow has quit [Ping timeout: 256 seconds]
joofsh has quit [Remote host closed the connection]
hackerdude has joined #ruby
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
QKO_ has quit [Ping timeout: 252 seconds]
techhelp has quit [Quit: Leaving]
<Nuck> nvm found documentation of this
ozgura has joined #ruby
dustint has quit [Ping timeout: 260 seconds]
bradleyprice has joined #ruby
havenwood has joined #ruby
BrindleFly has quit [Quit: BrindleFly]
aapzak has quit [Ping timeout: 272 seconds]
aapzak has joined #ruby
ner0x has quit [Quit: Leaving]
Spooner has quit [Remote host closed the connection]
tylersmith has quit [Quit: tylersmith]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
josephholsten has joined #ruby
arya has quit [Ping timeout: 248 seconds]
beneggett has joined #ruby
etcetera has quit []
etcetera has joined #ruby
jlast has joined #ruby
bigkm has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
djwonk has quit []
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
joeycarmello has quit [Remote host closed the connection]
ryanf has quit [Read error: Connection reset by peer]
forced_request has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
adeponte has quit [Remote host closed the connection]
beneggett has quit [Quit: Computer has gone to sleep.]
sambio has quit []
arya has joined #ruby
beneggett has joined #ruby
breakingthings has quit []
SeanLazer has quit [Quit: SeanLazer]
bean has quit [Quit: Computer has gone to sleep.]
etcetera has quit [Ping timeout: 244 seconds]
xemu has quit [Quit: Nettalk6 - www.ntalk.de]
SeanLazer has joined #ruby
PanPan_ has joined #ruby
justsee has quit [Quit: Leaving...]
arya has quit [Ping timeout: 260 seconds]
divout has joined #ruby
<zzing> Is there any module that allows easy creation of tools of the type that take verb commands? (gem and apt-get are both examples)
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
ahokaomaeha has quit [Ping timeout: 276 seconds]
radic has quit [Disconnected by services]
Bry8Star has quit [Quit:]
radic_ has joined #ruby
bttf has quit [Ping timeout: 272 seconds]
etcetera has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
onemanjujitsu has quit [Quit: onemanjujitsu]
arya has joined #ruby
Demux_ is now known as Demux
sailias has quit [Quit: Leaving.]
icole has joined #ruby
freakazoid0223 has quit [Quit: Leaving]
_justin has joined #ruby
<shevy> zzing not sure how gems does that
<shevy> zzing but there are a few options
<shevy> zzing for elegance, I would recommend slop - https://github.com/injekt/slop
<shevy> there is optionparser and getoptlong
<shevy> if you dont need fancy manipulation, you could use ARGV directly
joeycarmello has joined #ruby
<shevy> (or through a method)
<shevy> def check_arguments(subsection = ARGV[0], arguments = ARGV[1..-1])
<zzing> slop will do it directly by the looks of it
<shevy> :)
invisime has left #ruby [#ruby]
<shevy> it's nicer than optionparser, but users have to install it
JumpMast3r has quit [Quit: JumpMast3r]
QKO_ has joined #ruby
<zzing> Not a problem, this is a system administration tool
<shevy> ok
<zzing> for me :-)
ryanf has quit [Ping timeout: 255 seconds]
<zzing> I am using web development and system administration as an excuse to move away from php, not have to do much in perl, and learn a nicer looking language :-)
QKO has quit [Ping timeout: 252 seconds]
<shevy> yeah
<shevy> I started with perl, then php, then wanted a better language. I had to pick between python and ruby
<shevy> matz had an old interview from 2003, that convinced me to try ruby first
<shevy> I think python has quite a bit more developers though
adeponte has joined #ruby
<zzing> It does, and it looks pretty, there is just something about it that bugs me.
otherj has joined #ruby
<jrabbit> ruby and python are pretty related
<zzing> I am a haskell fan as well.
onemanjujitsu has joined #ruby
moshee has quit [Ping timeout: 252 seconds]
onemanjujitsu has quit [Remote host closed the connection]
moshee has joined #ruby
Bry8Star has joined #ruby
allaire has quit []
uris has quit [Quit: Leaving]
<shevy> haskell seemed always very difficult
<shevy> I think haskell is not for dumb people
<shevy> I also think that ruby is too complex :P
<zzing> shevy, haskell is one of those languages that is easy to get into, but you get stuck in the mud within half an hour
<shevy> I dont know
<shevy> the structure of i.e. C or java is conceptually fairly simple
<shevy> haskell is very very different from that kind of flow
<zzing> certainly
<shevy> C is basically a bunch of functions doing things
<shevy> thermal_sys.c
<shevy> static ssize_t
<shevy> mode_show(struct device *dev, struct device_attribute *attr, char *buf)
<zzing> Java always strck me as an overly verbose language developed at a time when C++ was small. Since then C++ has grown into the most flexible native compiler that I knwo.
marek_ has quit [Remote host closed the connection]
<shevy> yeah Java is way too verbose
<zzing> Its funny though, I like Objective C
<shevy> I don't like that C++ is so complex and to be honest...
<shevy> I think there should have never been a C++
<shevy> they should have consolidated on a C like language
<zzing> It is great that we have C++ that is so flexible. That flexibility has a high cost for knowledge mind you.
dmiller2 has joined #ruby
jlast has quit [Remote host closed the connection]
<shevy> perhaps then we would not have suffered from java :-)
<shevy> some things in C++ are cool
<zzing> The C++ standards committee does amazing work, I wouldn't want their job.
<shevy> the << operator, it sucks that C does not have it
<zzing> C has the << operator
<shevy> it has?
<zzing> It is a binary shift left
<zzing> C++ redefined it on ostreams
<shevy> ah I see
marek_ has joined #ruby
<zzing> You know how printf is unsafe?
<shevy> nope, no real idea
<shevy> I always struggle when I hit pointers to pointers
<zzing> printf("%d"); that could crash
<zzing> In C++11 it is possible to write a completely safe compile time [type] checked version of printf.
<zzing> Thanks to template metaprogramming, that was discovered by accident in the 90s
dmiller1 has quit [Ping timeout: 255 seconds]
ilyam has joined #ruby
t0xik has joined #ruby
t0xik has quit [Remote host closed the connection]
dougireton has joined #ruby
octoberry has joined #ruby
ksinkar_ has joined #ruby
<shevy> hehe
<shevy> are you saying the C++ standards committee kind of works by accident as well? :D
<shevy> "We plan and devise the future - but most of our old features were discovered by accident!"
<shevy> or luck haha
slyv has quit [Quit: Computer has gone to sleep.]
<zzing> shevy, well imagine the work that would have gone into C++11 over the last decade. They have to extend the language with new features that have to work, cannot break anything from before, in an already complex language. That is a really tall order considering that C++98 was already complex.
<shevy> yeah
<shevy> it would be nice to have languages not have to remain backwards compatible though
<zzing> Look at Python 3 - they broke a lot.
ksinkar__ has joined #ruby
<shevy> yeah, I hate them for this
<shevy> it is no fun to learn python for me right now until the community has settled on one version
ksinkar_ has quit [Ping timeout: 260 seconds]
<zzing> shevy, I believe your last two statements are contradictory :P
jeffreybaird_ has joined #ruby
ezkl has quit [Quit: out!]
<shevy> zzing well
ksinkar__ has quit [Client Quit]
ezkl has joined #ruby
<shevy> zzing the problem is, how much will a new language be the same, and how much will it have changed
<zzing> C++ is a published international standard, if C++11 broke stuff, nobody would use it because of the installed base. The same thing with python3.
<shevy> for instance, on #python I was told that python2 and python3 are basically different languages
<zzing> I was warned about ruby updating can break things (whether or not this turns out to be true or a problem is yet to be seen)
<zzing> They quite are
jeffreybaird has quit [Ping timeout: 256 seconds]
jeffreybaird_ is now known as jeffreybaird
dallasm has quit [Read error: Connection reset by peer]
<zzing> C++11 feels like a different language, yet it is backwards compatible
<shevy> perl5 vs. perl6 would be an even larger difference, ruby 1.8.x and 1.9.x is a medium difference, only a few things changed (new syntax, some different warnings, encoding)
<zzing> What about this ruby2 in the topic?
dallasm has joined #ruby
<shevy> zzing yeah some gems tend to be annoying when one updates them, or the ruby version
<shevy> I think ruby2 will come in 2013
<shevy> I mean
<shevy> the finished one
aantix has joined #ruby
<zzing> An ecosystem like ruby really needs to be the paragon of stability - or a way of achieving it
etcetera has quit []
<shevy> hmm this is difficult
<aedornm> ruby... stability... paragon.
<shevy> i.e. how the different rails versions are incompatible
<zzing> How long until php adds ==== and =====? :-)
dougireton has quit [Quit: Leaving.]
ozgura has quit [Ping timeout: 240 seconds]
browndawg has joined #ruby
<shevy> dunno
<shevy> I stopped reading php updates when they added namespace... how do you do it... I think with \ ?
<aedornm> net/ftp appears to be slow for transfers. Can someone concur?
<zzing> I was shocked when I learned that the php equality operator wasn't transitive.
<shevy> php is like the ultimate glue language, even in its design
ryanf has joined #ruby
a_a_g has joined #ruby
caleb_io has quit [Quit: caleb_io]
<zzing> shevy, I don't think it has a design
<shevy> aedornm dunno, ruby is slow :D
bubblehead has quit [Remote host closed the connection]
<shevy> zzing yeah I am not sure myself either. I think in a way it is just a melting pot for functions that *could* be "useful" on the web
<zzing> probably
ngoldman has joined #ruby
josephholsten has quit [Ping timeout: 245 seconds]
gabrielrotbart has quit [Remote host closed the connection]
<shevy> I dont like rails that much but I am curious if it will grow, and if so, if growth will come at the expense over php too
<zzing> I would love something that was as easy as php to integrate into web pages, but was able to be compiled in a fashion like JSP watches for changes.
caleb_io has joined #ruby
<aedornm> shevy: Yes. It is. There's no way I'll be able to serve real time Fibonacci sequences to millions of people at the same time.
<zzing> I will give php that it is simple to get something basic going
<shevy> yeah
<shevy> test.php
<shevy> I'd wish ruby would have something equivalent by default
<zzing> There seems to be a lot of ruby implementations
h4mz1d has joined #ruby
browndawg1 has joined #ruby
<shevy> right, but installing rails is not always without problems
<zzing> shevy, take something like macruby, extract out the objective C bindings, and make use of the compilation and make it operate like a simple JSP
<shevy> I'd rather like to see ruby come with something stronger than cgi by default
<aedornm> Guess I'll just rewrite this to call curl instead until I can benchmark and figure out the discrepancy
browndawg has quit [Ping timeout: 255 seconds]
<zzing> Are there not abilities to just run a web server and have apache proxy over to it?
<shevy> zzing dunno really... I still use cgi myself
otherj has quit []
<zzing> I liked php_fpm with nginx, but it wasn't very scalable for multiple users with things like wordpress. .htaccess files are expensive, but really handy in the environment I administer
Jonah11_ has joined #ruby
<zzing> shevy, ever looked at thor?
SCommette has quit [Quit: SCommette]
ryanf has quit [Ping timeout: 245 seconds]
<Jonah11_> I am confused about "self". From an irb prompt, self returns "main", whose class is Object. yet if i require 'sinatra', i am able to call "get" but "self.get" returns a NoMethodError. I thought a method call without "self." always had an implied self...
<shevy> zzing not really, no
<shevy> Jonah11_ do you call self. within a class? or outside
<zzing> shevy, it seems to solve my problem of command line stuff really nicely. It seems to be aimed at a rake replacement but can be used in this way too.
ozgura has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
<shevy> zzing aha
<shevy> I get away by not having to use rake
<shevy> for instance, "iruby" is an alias I use, which installs all my ruby projects locally
<shevy> "iruby" points to "invoke install_ruby"
<aedornm> hmmm 103MB/s using Ruby net/ftp.. 98.4MB/s using curl. Okay, I'm confused now.
<shevy> where install_ruby is a method in a .rb file I require
dhruvasagar has quit [Ping timeout: 256 seconds]
<shevy> and "invoke" is the way I call ruby, with arguments, to load those .rb files
LouisRoR has joined #ruby
<shevy> so I dont have to use rakefiles, I can just use my normal scripts and .rb files
<shevy> aedornm curl is faster!!!
<shevy> aedornm let's try the obvious question first
brucelee has joined #ruby
<shevy> aedornm are you downloading pr0n? :P
<aedornm> oooh it's the block
<brucelee> what does the following syntax do "define :blahblah, :blahblah => foo do?
<brucelee> trying to figure out some code, and theres nowhere i can find in google, or im not sure what to search google for, that would tell me the answer to the above q
<aedornm> ooor not, it's only a tad bit less
micahgodbolt has joined #ruby
gommo has quit [Remote host closed the connection]
ebobby has joined #ruby
<aedornm> So when we run this on actual production systems we only get around 1-6MB/s transfers, and curl gets ~50, but this machine will easily get 100+MB/s, and seems to be generally faster than curl. So confused
stopbit has quit [Quit: Leaving]
QKO has joined #ruby
<ezkl> Net::FTP connects via plain old TCP or SOCKS sockets.
hackerdude has quit [Remote host closed the connection]
<shevy> brucelee you must try to "think" how the ruby parser sees it
adeponte has quit [Remote host closed the connection]
<shevy> brucelee so the first step is to try to find out what syntactic sugar is hiding what you see
micahgodbolt has left #ruby ["Textual IRC Client: www.textualapp.com"]
<shevy> brucelee first you should try to find out, what could "define" alone be?
jonahR has quit [Quit: jonahR]
QKO_ has quit [Ping timeout: 256 seconds]
LouisRoR has quit [Ping timeout: 244 seconds]
ninp0 has quit [Ping timeout: 244 seconds]
the_mentat has quit [Quit: Computer has gone to sleep.]
rakaar has joined #ruby
lushious has quit [Ping timeout: 252 seconds]
io_syl has joined #ruby
Fezzler has joined #ruby
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
johnpcamara has quit [Quit: johnpcamara]
<brucelee> shevy: i figured out what 'define' means
<brucelee> its a built in keyword used to define a new resource for chef
huoxito has quit [Quit: Leaving]
awarner_ has joined #ruby
mahmoudimus has joined #ruby
SeanLazer has quit [Quit: SeanLazer]
<brucelee> shevy: but what about the : character, what does that represent in ruby?
awarner has quit [Read error: Connection reset by peer]
<Kovensky> eval: :stuff.class
<brucelee> :blahblah => 01234
<brucelee> things like that
<Kovensky> << :stuff.class
<Kovensky> no evalbot? :(
<brucelee> ? :p
havenwood has quit [Remote host closed the connection]
<brucelee> so is : used to reference a class?
<shevy> brucelee it can not be built in
<aedornm> >> puts :stuff.class
<brucelee> shevy: built into chef
<eval-in> aedornm: Output: "Symbol\n" (http://eval.in/9644)
<shevy> brucelee it must be a method
<shevy> def define()
havenwood has joined #ruby
<brucelee> shevy: its a new keyword in the chef language
<shevy> so that is the first thing you can do
<shevy> what is "chef language"
<shevy> is it ruby or is it not
<brucelee> chef just builds on top of ruby
<Kovensky> >> :stuff.class
<eval-in> Kovensky: Output: "" (http://eval.in/9645)
<brucelee> its like a ruby library or something
<brucelee> im not quite sure how to explain it
<shevy> good, then it uses ruby
<brucelee> you can use everything in ruby in chef
Fezzler has quit [Client Quit]
<brucelee> chef is a program btw
<brucelee> not a language
<shevy> :\
<shevy> didn't you write it is part of the chef language before!
<shevy> anyway
<shevy> now that you know define() is a method
<shevy> you can translate this:
<shevy> define :blahblah, :blahblah => foo do
<shevy> into this:
havenn has joined #ruby
<shevy> define(:blahblah, :blahblah => foo) do
<shevy> ok?
skattyadz has joined #ruby
<shevy> so it is a method invocation, with two arguments
<brucelee> ok... so its a method that takes in some arguments, the arguments being :blahblah, :blahblah => foo_
havenn has quit [Remote host closed the connection]
<shevy> yes
<brucelee> shevy: but why use :
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<brucelee> what does that denote? :p
<Kovensky> < shevy> so it is a method invocation, with two arguments <-- not three?
<shevy> we will get to this
<shevy> Kovensky, well, every method always accepts a block
<shevy> Kovensky, I need to break it into smaller parts for brucelee :)
<Kovensky> shevy: I mean, isn't ":blahblah, :blahblah => foo" three arguments?
<shevy> brucelee we get to the : they are called symbols
<Kovensky> or am I confusing => with perl's
<shevy> Kovensky ah no
<shevy> we get to that too
<shevy> brucelee ignore the : for a moment
<shevy> let's look at:
<shevy> :blahblah => foo
<shevy> the ruby parser, being a funny guy, cheats
<shevy> :blahblah => foo is actually { :blahblah => foo }
<shevy> but you can omit the {} in the above example
ryanf has joined #ruby
<shevy> so this here:
<shevy> define(:blahblah, :blahblah => foo) do
<shevy> is actually
<shevy> define(:blahblah, { :blahblah => foo }) do
<brucelee> ok
<shevy> brucelee and now for the last part, before we go to symbols
<shevy> the "do"
skrewler has joined #ruby
<shevy> the do/end is a block ok? you can pass a block to every ruby method, always
<brucelee> i see
<brucelee> in c++ , it would be { }
<shevy> well
havenwood has quit [Ping timeout: 252 seconds]
<shevy> in ruby you normally use "def bla; end"
<shevy> so end is always used
<brucelee> i see
skrewler has quit [Client Quit]
<shevy> but you can replace do/end in blocks with {}
<shevy> so, in our example:
caleb_io has quit [Quit: caleb_io]
<shevy> define(:blahblah, { :blahblah => foo }) do # some new lines here end
<shevy> could be rewritten as
<shevy> define(:blahblah, { :blahblah => foo }) { # some new lines here }
meoblast001 has quit [Read error: Connection reset by peer]
<shevy> ok?
<brucelee> shevy: crystal clear so far
<shevy> ok good!
<shevy> now the easiest thing... symbols
<shevy> they are boring and lame and way too much attention is given to them
<shevy> "abc" is a string object
<shevy> abc <--- could be a variable named abc, or it could be a method call, abc()
<shevy> and :abc is always a symbol
lushious has joined #ruby
<shevy> symbols are unique, and always have the same object_id
<shevy> :abc.object_id # => 410738
<brucelee> i see
<brucelee> so its taking out the flexibility
<brucelee> that the language inherently gives u
cparen has joined #ruby
<shevy> whereas if you use a string object here
<shevy> "abc".object_id # => -613795388
<shevy> "abc".object_id # => -613797978
<shevy> it is never the same object, always a new one, ok?
<brucelee> ah ok
<shevy> so symbols are memory efficient, and thus faster bla bla bla
<brucelee> ohhhh
<shevy> but remember!!! the most important thing, they are damn boring
<brucelee> :P
<shevy> this is why they are used in a hash btw
<brucelee> shevy: that was very helpful
<shevy> if you have a few million keys, it is more useful to store as symbols, then string objects
<shevy> ok but now we must go back to the start again
<brucelee> ok
<shevy> with your new knowledge
<shevy> you will see that:
<shevy> define :blahblah, :blahblah => foo do
<shevy> is actually quite minimalistic, and thus rather elegant :D
<shevy> in some DSLs they use strings
<shevy> run "cat", :colour => 'black' do
havenwood has joined #ruby
dougireton has joined #ruby
<shevy> feed_at "12 o'clock"
<shevy> end
<shevy> hmm some DSLs do fancy things
<shevy> rails for instance
<shevy> those strange filters it has
<shevy> I am not sure how they are implemented...
etcetera has joined #ruby
<shevy> brucelee I think in a lot of ruby code, people just want to write as little as possible and achieve as much as possible with that
<brucelee> i see
<brucelee> yeah
<brucelee> the language is pretty elegant
<havenwood> the kendo of languages
<brucelee> i think thats the beauty of ruby
<brucelee> a short snippet of code can do so much
<brucelee> as compared to other languages :p
<shevy> yeah
<shevy> but it can be quite complex
h4mz1d has quit [Ping timeout: 260 seconds]
<brucelee> and i guess the more adept the programmer, the more elegant they can make the code
<shevy> I think conceptually php may be simpler than ruby
aaronmacy has quit [Quit: Leaving.]
<shevy> brucelee yeah, in many cases, but this also raises the barrier for newcomers :(
<brucelee> yeah
<shevy> I mean perhaps it is a good thing, you can always learn something new in ruby
ryanf has quit [Ping timeout: 260 seconds]
<brucelee> off topic, but doesnt the complexity of short code doing a lot make the code slower?
<shevy> but I found that for myself, there comes a point where I'd rather not learn too many new things
<shevy> brucelee don't know, probably not, it depends on what is used
<brucelee> theres also a huge rumour floating around that ruby is slow
<shevy> for example, take :symbols vs "strings"
<brucelee> not really a rumour, more like a stigma
<shevy> ruby 1.8.x was slow yeah
<shevy> I dont think 1.9.x is that slow anymore
<brucelee> i see
<wmoxam> brucelee: there's also a rumour that it can't scale
<brucelee> yeah i heard about that too
<brucelee> twitter ditched ruby on rails apparently
<wmoxam> and a growing rumour that it's not secure either
<shevy> brucelee, it depends on many factors, you can look at
<shevy> for rough estimates
<brucelee> im not sure what these rumours are based on, but im sure different developers have their reasons
marek_ has quit [Remote host closed the connection]
<shevy> dunno
<wmoxam> programming is like 90210. Programmers get all catty about who is sleeping with what programming language
<shevy> I really feel the scripting languages are way too close in terms of speed
<shevy> the one I count to the scripting language family, but being much faster, is lua
yacks has quit [Ping timeout: 255 seconds]
<shevy> so either one wants to be super fast, then one uses C. or one uses lua, for simplicity... and if not, then I really dont think there is a huge difference between perl php python or ruby (comparing most recent versions of all)
<havenwood> Ruby will have HPC MRuby soon...
<shevy> brucelee there are also a few tiny "tricks" one could make use
<shevy> brucelee for instance, if you have a string object a = "bla"; and you want to append to it, you could use either << or +=
aantix has quit [Quit: aantix]
<shevy> but += allocates one new string object so it is a tiny bit slower than <<
dougireton has quit [Read error: Connection reset by peer]
<wmoxam> ugh
<brucelee> ah
<aedornm> I'm going to redo everything in Go, because it's trendy.
dougireton has joined #ruby
<wmoxam> don't micro benchmark
<wmoxam> it's pointless
hemanth has joined #ruby
ananthakumaran has joined #ruby
<wmoxam> I mean if you're appending 20 trillion strings then maybe you've choosen the wrong tool to begin with
<wmoxam> otherwise it probably doesn't matter
<hemanth> >> [1,2,3,4].first(2)
<eval-in> hemanth: Output: "" (http://eval.in/9646)
liquid-silence has quit [Read error: Connection reset by peer]
<hemanth> >>[1,2,3,4].first(3)
<eval-in> hemanth: Output: "" (http://eval.in/9647)
<hemanth> :( ?
<havenwood> I don't always append 20-trillion strings, but when I do I use Ruby.
thone_ has joined #ruby
vlad_starkov has joined #ruby
nanothief has joined #ruby
thone has quit [Ping timeout: 245 seconds]
theshow has joined #ruby
yacks has joined #ruby
statarb3 has quit [Ping timeout: 252 seconds]
daniel_hinojosa has quit [Quit: Leaving.]
ilyam has quit [Quit: ilyam]
_justin1 has joined #ruby
<brucelee> hey, what does the symbol ||= usually do?
chrishunt has quit [Read error: Connection reset by peer]
<brucelee> i'd hate to keep asking, is there a link anywhere online with a bunch of examples that show what these ruby symbols do :p
_justin has quit [Ping timeout: 276 seconds]
atno has quit [Remote host closed the connection]
atno__ has quit [Read error: Connection reset by peer]
dougireton has quit [Quit: Leaving.]
aantix has joined #ruby
<havenwood> brucelee: a ||= b is shorhand for: a || a = b
atno has joined #ruby
<havenwood> brucelee: "or-equals"
ryanf has joined #ruby
shock_one has joined #ruby
cableray has joined #ruby
QKO_ has joined #ruby
Myk267 has joined #ruby
chrishunt has joined #ruby
QKO has quit [Ping timeout: 252 seconds]
bean has joined #ruby
aantix has quit [Ping timeout: 255 seconds]
mercwithamouth has quit [Ping timeout: 245 seconds]
tk_ has joined #ruby
spaceships has quit [Quit: leaving]
justsee has quit [Quit: Leaving...]
ryanf has quit [Ping timeout: 248 seconds]
_justin1 has left #ruby [#ruby]
AxisOfEval has joined #ruby
zzing has quit [Quit: Textual IRC Client: www.textualapp.com]
bradleyprice has quit [Remote host closed the connection]
stkowski has quit [Quit: stkowski]
octoberry has quit [Ping timeout: 245 seconds]
AntiTyping has quit [Quit: AntiTyping]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
skattyadz has quit [Quit: skattyadz]
tagrudev has joined #ruby
lolmaus has joined #ruby
bean has quit [Quit: Textual IRC Client: www.textualapp.com]
arya has quit [Ping timeout: 256 seconds]
b0oh has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
RehpotsirhC has joined #ruby
<RehpotsirhC> Hey hey, Is there any known issues with compiling ruby via multiple threads (ex: make -j 8)?
adeponte has joined #ruby
Yakko has joined #ruby
<brucelee> havenwood: thanks a lot
<brucelee> :)
Inoperable is now known as zz_Inoperable
billiam has quit [Quit: Leaving]
arya has joined #ruby
atyz has joined #ruby
nomenkun has joined #ruby
AxisOfEval has quit [Quit: Leaving...]
adeponte has quit [Ping timeout: 256 seconds]
<shevy> RehpotsirhC dont know, should not be
arya has quit [Ping timeout: 276 seconds]
<shevy> havenwood, hmm... trillions or trillians?
<shevy> haha funny
<shevy> so I suppose it is trillion, but the text on the picture says trillians
tjbiddle has quit [Quit: tjbiddle]
matchaw___ has joined #ruby
<shevy> "Trillian, a misspelling of trillion"
matchaw_ has quit [Ping timeout: 246 seconds]
<RehpotsirhC> shevy, Didn't think so. I'm trying a later revision to see if it was something patched.
backjlack has joined #ruby
brucelee has quit [Quit: Lost terminal]
arya has joined #ruby
justsee has quit [Quit: Leaving...]
b0oh has quit [Quit: Leaving.]
Jonah11_ has quit [Ping timeout: 272 seconds]
ryanf has joined #ruby
Jonah11_ has joined #ruby
<RehpotsirhC> Update: Using p385 I was able to compile it w/ multiple threads.
tagrudev has quit [Remote host closed the connection]
tagrudev has joined #ruby
erdsa has joined #ruby
arya has quit [Ping timeout: 245 seconds]
brianpWins has joined #ruby
erdsa has quit [Client Quit]
crackfu has joined #ruby
timonv has joined #ruby
banjara has joined #ruby
<Gate> chuck norris appends trillions of strings on a single line in an immutable string language using +.
goraxe has joined #ruby
ryanf has quit [Ping timeout: 260 seconds]
x82_nicole has quit [Quit: Computer has gone to sleep.]
b1rkh0ff has quit [Read error: Operation timed out]
arya_ has joined #ruby
<nat_home> what is the right way in ruby to find an element in a collection ? I did something like websvr = ec2.security_groups.find 'webservers' ; websvr = websvr.first
davetherat1 has quit [Remote host closed the connection]
<nat_home> but I'm pretty sure it can be done in 1 lnine
davetherat has joined #ruby
brianpWins has quit [Quit: brianpWins]
<nat_home> and security_groups is a collection cf http://docs.aws.amazon.com/AWSRubySDK/latest/frames.html
nilobject has joined #ruby
<nat_home> (which is an array)
carraroj has joined #ruby
QKO has joined #ruby
benlieb has joined #ruby
Mon_Ouie has quit [Ping timeout: 260 seconds]
ryanjh has quit [Ping timeout: 260 seconds]
aaronmacy has joined #ruby
QKO_ has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
ryanh has joined #ruby
chendo_ has quit [Ping timeout: 272 seconds]
nilobject has quit [Quit: leaving]
caleb_io has joined #ruby
Xeago has joined #ruby
yacks has quit [Ping timeout: 256 seconds]
brianpWins has joined #ruby
chendo_ has joined #ruby
cyong has quit [Quit: Leaving.]
bluOxigen has joined #ruby
thufir_ has joined #ruby
angusiguess has quit [Ping timeout: 260 seconds]
timonv_ has joined #ruby
billwanjohi has joined #ruby
timonv has quit [Read error: Connection reset by peer]
aaronmacy has quit [Quit: Leaving.]
b1rkh0ff has joined #ruby
Elhu has joined #ruby
arya_ has quit [Ping timeout: 252 seconds]
clooth has joined #ruby
arya_ has joined #ruby
nilobject has joined #ruby
benlieb has quit [Quit: benlieb]
uxp has quit [Ping timeout: 276 seconds]
adeponte has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
ebobby has quit [Quit: Lost terminal]
benlieb has joined #ruby
vlad_starkov has joined #ruby
uxp has joined #ruby
Xeago has quit [Remote host closed the connection]
yacks has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
ryanf has joined #ruby
workmad3 has joined #ruby
aganov has joined #ruby
crackfu has quit [Remote host closed the connection]
fasta_ is now known as fasta
d34th4ck3r has joined #ruby
puppeh has joined #ruby
relixx has joined #ruby
nomenkun has quit [Remote host closed the connection]
Marco has quit [Ping timeout: 272 seconds]
<cmyers> I am having a weird problem - I just uncommented the asset pipeline in my Capfile, and when I do my rails deploy, I see: executing "cd -- /home/adms/apps/adms/releases/20130213072659 && #<Capistrano::Configuration::Namespaces::Namespace:0x00000001848360> RAILS_ENV=production RAILS_GROUPS=assets assets:precompile && cp -- /home/adms/apps/adms/shared/assets/manifest.yml /home/adms/apps/adms/releases/20130213072659/assets_manifest.yml"
<cmyers> anyone know why it is running that weird thing instead of "rake"?
beliveyourdream has joined #ruby
mafolz has joined #ruby
<cmyers> running capistrano v 1.8.24
ryanf has quit [Ping timeout: 252 seconds]
<danneu> nat_home: check out ruby docs for enumerable and array (enumerable first)
<cmyers> oops, wrong window, I meant that for #capistrano. my bad =(
<shevy> nat_home you usually need to make a match
<shevy> nat_home let's consider a simple example
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
JumpMast3r has joined #ruby
<shevy> nat_home (1..10).select { |i| i % 2 == 0 } # => [2, 4, 6, 8, 10]
braoru has joined #ruby
arya_ has quit [Ping timeout: 272 seconds]
<shevy> nat_home now all you need to do is find the match you really want to, within the {} block
<danneu> select(&:even?) ^____^
huismon has quit [Read error: Connection reset by peer]
<shevy> danneu good that you participate, now since you introduced the &: for nat_home, would you please explain it to him :P
huismon has joined #ruby
<danneu> haha
justsee has quit [Quit: Leaving...]
<shevy> nat_home what does .security_groups actually return? if it is an array, you could use [0]
Elhu has quit [Quit: Computer has gone to sleep.]
cmyers has quit [Quit: leaving]
benlieb has quit [Quit: benlieb]
evenix has joined #ruby
<danneu> the heuristic 'select { |i| i.even? }' -> 'select(&:even?)' gets you plenty far
<shevy> well or just .find
<shevy> (1..10).find(&:even?) # => 2
Morkel has joined #ruby
predator117 has joined #ruby
<shevy> yeah, as danneu explain, this gets you the good girls
<shevy> on the couch... & looks like a couch
<shevy> you need to use mnemonics
dhruvasagar has quit [Quit: leaving]
angusiguess has joined #ruby
dhruvasagar has joined #ruby
<danneu> i mean, it was only 40min ago that nat_home was here
<danneu> theyll be back to drown in immaculate wisdom
yacks has quit [Quit: Leaving]
nilobject has quit [Quit: leaving]
nilobject has joined #ruby
<shevy> hehe
evenix has quit [Ping timeout: 252 seconds]
<shevy> I don't actually see the time and date of when someone asked something
etcetera has quit [Ping timeout: 255 seconds]
adeponte has quit [Remote host closed the connection]
andikr has joined #ruby
<shevy> so if there is like 3 days of silence here on #ruby, I would not know!!!
adeponte has joined #ruby
cparen has quit [Quit: cparen]
etcetera has joined #ruby
aaronmacy has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
fedza has quit [Ping timeout: 252 seconds]
LouisRoR has joined #ruby
relixx has quit [Quit: relixx]
haxrbyte has joined #ruby
JohnBat26 has joined #ruby
hamed_r has joined #ruby
adeponte has quit [Ping timeout: 276 seconds]
etcetera has quit [Client Quit]
angusiguess has quit [Ping timeout: 255 seconds]
beneggett has joined #ruby
justsee has joined #ruby
arya_ has joined #ruby
filipe has joined #ruby
dr_bob has joined #ruby
m3pow has joined #ruby
QKO_ has joined #ruby
anderse has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
Hanmac_ has joined #ruby
hashmal has quit [Quit: Computer has gone to sleep.]
taoru_ has joined #ruby
QKO has quit [Ping timeout: 276 seconds]
benlieb has joined #ruby
haxrbyte has quit [Ping timeout: 245 seconds]
cableray has quit [Quit: cableray]
TheFuzzball has joined #ruby
taoru__ has joined #ruby
taoru_ has quit [Read error: Connection reset by peer]
<shevy> is this hash easy to understand for other people?
<shevy> hash = { :sargument => :bold_brown, :sfancy => :bold_yellow, :sfile => :brown, :symlink => :blue, :swarn => :bold_red, :sdir => :bold_green, :simportant => :pink, :default_colour => :green }
<nilobject> 1.9 syntax is nicer, IMO
<nilobject> hash = { sargument: :bold_brown, sfancy: :bold_yellow ...
arya_ has quit [Ping timeout: 255 seconds]
taoru has quit [Ping timeout: 252 seconds]
haxrbyte_ has quit [Remote host closed the connection]
haxrbyte has joined #ruby
ryanf has joined #ruby
mockra has quit [Remote host closed the connection]
swex has joined #ruby
swex_ has quit [Ping timeout: 272 seconds]
zykes- has quit [Ping timeout: 245 seconds]
<shevy> nilobject hmm yeah, it would be shorter
josh_keith has quit [Ping timeout: 272 seconds]
timonv_ has quit [Remote host closed the connection]
zykes- has joined #ruby
ryanf has quit [Ping timeout: 245 seconds]
piotr_ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
joeycarmello has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
atyz has quit [Quit: Leaving...]
evansbee has quit []
d34th4ck3r has quit [Ping timeout: 248 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
zigomir has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
yacks has joined #ruby
josh_keith has joined #ruby
main has joined #ruby
elico has joined #ruby
bluOxigen has quit [Ping timeout: 248 seconds]
divout has quit [Quit: Leaving.]
lewix has joined #ruby
divout has joined #ruby
<lewix> does someone use textwrangler
Bosma has quit [Read error: Connection reset by peer]
<shevy> not me
joana_ has quit [Read error: Connection reset by peer]
elico has quit [Remote host closed the connection]
nilobject has quit [Quit: leaving]
emocakes has joined #ruby
mahmoudimus has joined #ruby
punkrawkR has joined #ruby
relixx has joined #ruby
nilobject has joined #ruby
Bosma has joined #ruby
benlieb has quit [Quit: benlieb]
main has quit [Ping timeout: 272 seconds]
taoru__ has quit [Remote host closed the connection]
taoru has joined #ruby
anchorspark has quit [Quit: WeeChat 0.3.2]
skcin7 has joined #ruby
maxmanders has joined #ruby
aapzak has quit [Ping timeout: 252 seconds]
jimeh has joined #ruby
yacks has quit [Ping timeout: 260 seconds]
aapzak has joined #ruby
emergion has joined #ruby
adeponte has joined #ruby
nari has quit [Ping timeout: 276 seconds]
thufir_ has quit [Quit: Leaving.]
erlingur has joined #ruby
d34th4ck3r has joined #ruby
ottbot has joined #ruby
ryanf has joined #ruby
anderse has quit [Quit: anderse]
gregory68 has joined #ruby
<gregory68> I'm a senile old man trying to upgrade ruby on heroku to version 1.9.3p385. Is this possible?
banseljaj is now known as imami|afk
TheFuzzball has quit [Quit: Computer has gone to sleep.]
yacks has joined #ruby
QKO has joined #ruby
QKO_ has quit [Ping timeout: 255 seconds]
lurch_ has joined #ruby
d34th4ck3r has quit [Ping timeout: 245 seconds]
nomenkun has joined #ruby
ryanf has quit [Ping timeout: 256 seconds]
relixx has quit [Quit: relixx]
anderse has joined #ruby
angusiguess has joined #ruby
<nilobject> gregory68: I lied. Looks like they only offer up to p327 right now. https://devcenter.heroku.com/articles/ruby-support#ruby_versions
<gregory68> :(
havenwood has quit [Remote host closed the connection]
decoponio has joined #ruby
arturaz has joined #ruby
marr has joined #ruby
hoelzro|away is now known as hoelzro
gregory68 has left #ruby [#ruby]
chichou has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
aaronmacy has quit [Quit: Leaving.]
francisfish has joined #ruby
seba4 has quit [Remote host closed the connection]
Elhu has joined #ruby
blaxter has joined #ruby
bradhe has joined #ruby
Criztian has joined #ruby
adman65 has joined #ruby
yacks has quit [Quit: Leaving]
bradhe has quit [Ping timeout: 272 seconds]
hmarr has joined #ruby
Xeago has joined #ruby
ozgura has quit [Remote host closed the connection]
<lewix> shevy: textmate?
<lewix> how to comment out an entire selection in one go
kristofers has joined #ruby
<lewix> s/paragraph/selection
<lewix> never mind
<lewix> wrong channel
blacktulip has joined #ruby
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
banjara has quit [Quit: Leaving.]
slainer68 has joined #ruby
ephemerian has joined #ruby
<Hanmac_> lewix osx software is always wrong :P
bettor has left #ruby [#ruby]
main has joined #ruby
blacktulip has quit [Ping timeout: 245 seconds]
adeponte has quit [Ping timeout: 256 seconds]
Al___ has joined #ruby
elaptics`away is now known as elaptics
<lewix> Hanmac_: hmm
yacks has joined #ruby
main has quit [Max SendQ exceeded]
main has joined #ruby
puppeh has quit [Read error: Connection reset by peer]
fixl has joined #ruby
mockra has joined #ruby
puppeh has joined #ruby
rdark has joined #ruby
<emocakes> morning
main has quit [Max SendQ exceeded]
blacktulip has joined #ruby
atyz has joined #ruby
julian-delphiki has quit [Read error: Connection reset by peer]
mockra has quit [Ping timeout: 252 seconds]
chussenot has joined #ruby
DuoSRX has joined #ruby
robotmay has joined #ruby
Jalada is now known as vinym
jerikl has quit [Read error: Connection reset by peer]
samphippen has joined #ruby
main has joined #ruby
vinym is now known as Jalada
Elhu has quit [Quit: Computer has gone to sleep.]
main has quit [Max SendQ exceeded]
Vainoharhainen has joined #ruby
Elhu has joined #ruby
joeycarmello has joined #ruby
bradhe has joined #ruby
buscon has joined #ruby
veer has joined #ruby
xkx has joined #ruby
veer is now known as Guest35194
<weeb1e> Anyone been able to get ruby-debug working on debian squeeze?
xkx has quit [Client Quit]
<weeb1e> I have tried all sorts of versions of it and its dependencies without any luck
pyrac has joined #ruby
xkx has joined #ruby
codecaster has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby
dallasm has quit [Remote host closed the connection]
_veer has quit [Ping timeout: 248 seconds]
main has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
joeycarmello has quit [Ping timeout: 276 seconds]
yfeldblum has quit [Ping timeout: 256 seconds]
d34th4ck3r has joined #ruby
tagrudev has quit [Remote host closed the connection]
QKO_ has joined #ruby
tagrudev has joined #ruby
razibog has joined #ruby
QKO has quit [Ping timeout: 256 seconds]
main has quit [Excess Flood]
lkba has joined #ruby
relixx has joined #ruby
buibex has joined #ruby
main has joined #ruby
rakaar has quit [Ping timeout: 252 seconds]
dkannan has joined #ruby
banjara has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
bradhe has quit [Ping timeout: 252 seconds]
Criztian has quit [Ping timeout: 276 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby
ozgura has joined #ruby
codecaster has quit [Quit: Leaving.]
Xeago has quit [Remote host closed the connection]
predator117 has quit [Quit: leaving]
timonv has joined #ruby
Criztian has joined #ruby
pu22l3r_ has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
buibex has quit [Ping timeout: 240 seconds]
evenix has joined #ruby
eka has joined #ruby
bricker_ has joined #ruby
predator117 has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
mahmoudimus has joined #ruby
dhruvasagar has quit [Remote host closed the connection]
<shevy> lewix I use bluefish 1.0.7
<shevy> emocakes! where is my cakessss!!!
monkegji_ has joined #ruby
<shevy> weeb1e is that a gem or built into ruby?
pu22l3r has quit [Ping timeout: 252 seconds]
evenix has quit [Read error: Operation timed out]
tensil_ has joined #ruby
<weeb1e> shevy: gem, I need it to use ruby-debug-ide so that I can attach a remote debugger
rakaar has joined #ruby
<shevy> aha, ok
bricker has quit [Ping timeout: 252 seconds]
<shevy> what does "gem list" give you?
tensil has quit [Read error: Operation timed out]
yfeldblum has joined #ruby
tensil_ is now known as tensil
<shevy> does it find that gem or not
mengu has joined #ruby
taoru_ has joined #ruby
<weeb1e> I can install the gem, and have tried many versions of it and its dependencies shevy
samuel02 has joined #ruby
<weeb1e> In the end I always get: gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so: undefined symbol: ruby_threadptr_data_type
relixx has quit [Quit: relixx]
<shevy> weeb1e also, always include the specific error you can see, to the best of your knowledge, right now I dont think anyone knows what is the error
<shevy> aha, ok, now we can see the error
jgrevich has quit [Remote host closed the connection]
<shevy> hmm I just installed the gem, it works fine here
<weeb1e> shevy: I also think I somehow broken rubygems while installing and uninstalling all these gems :|
<weeb1e> shevy: Debian squeeze?
<shevy> ruby-debug (0.10.4)
<shevy> ruby-debug-base (0.10.4)
<weeb1e> I installed it fine on an ubuntu box, but I need it working on debian
<shevy> weeb1e nope, I compile and install everything from source
<shevy> Hanmac uses debian
<shevy> where is ruby_threadptr_data_type ?
<weeb1e> I think it is part of linecache19, at least that is what I got from researching that error
<weeb1e> But I've tried many versions of it
angusiguess has joined #ruby
<shevy> well debian has a strict versioning scheme
<weeb1e> I also seem to have broken rubygems now after uninstalling and reinstalling these gems so many times
<shevy> and they dont like you installing gems
<weeb1e> $ sudo gem install ruby-debug-base19x –-pre
<weeb1e> - /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/config_file.rb:171:in `block in initialize': invalid byte sequence in UTF-8 (ArgumentError)
jodok has joined #ruby
<shevy> yeah, the encoding stuff is annoying
hit has joined #ruby
<shevy> btw
Dom_ has joined #ruby
<weeb1e> I tried updating rubygems and the same thing happens
<shevy> /usr/local/lib/ruby/ is debian having modified that
<weeb1e> Meh
taoru has quit [Ping timeout: 260 seconds]
lolmaus has quit [Read error: Connection reset by peer]
skcin7 has quit [Quit: Computer has gone to sleep.]
<shevy> weeb1e yes, first rule when using debian is to always stay within the apt-get/aptitude/dpkg and never abandon it
<shevy> my ruby_debug.so is at: /Programs/Ruby/1.8.7p370/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.4/lib/ruby_debug.so
<weeb1e> Often not an option since debians apt repo is far behind
<shevy> I use 1.8.7 right now ;)
<jrabbit> is testing that far behind?
<weeb1e> I'm using 1.9.3p286
<shevy> weeb1e that is your decision anyway, but you need to keep in mind that debian created problems that others don't quite have
<jrabbit> testing has ruby 1.9.3p194 (2012-04-20 revision 35410) [i486-linux]
dhruvasagar has joined #ruby
<shevy> I have 1.8.7p370 and 1.9.3p385
<shevy> lemme test on 1.9.3p385
alup has joined #ruby
<weeb1e> Ok, thanks
statarb3 has joined #ruby
<shevy> gem install ruby-debug
<shevy> aha, yes
<shevy> it fails
<shevy> "Can't handle 1.9.x yet"
emocakes has quit [Quit: emocakes]
<shevy> it gives this error to me, did you recieve this as well weeb1e ?
<shevy> this time we can not blame debian
<weeb1e> shevy: You need to install other things
<shevy> we could partially blame ruby-debug
<weeb1e> 'ruby-debug' is an old gem
<shevy> what do you mean
<weeb1e> Let me give you the correct gems
<shevy> hmm I see
<weeb1e> ruby-debug-base19x --pre
<shevy> what is that
<shevy> I dont have a ruby-debug-base19x
banjara has quit [Ping timeout: 252 seconds]
nari has joined #ruby
<weeb1e> That is a new fork of ruby-debug
<shevy> what gem command did you use?
<ezkl> debugger
<weeb1e> For 1.9
emocakes has joined #ruby
<emocakes> strange
<emocakes> something just tried to shut down my computer
<weeb1e> $ sudo gem install --pre ruby-debug-base19x
<weeb1e> Fetching: ruby-debug-base19x-0.11.30.pre10.gem (100%)
Agis__ has joined #ruby
<shevy> weeb1e aha
artOfWar has quit [Ping timeout: 248 seconds]
<emocakes> the russians!
Xeago has joined #ruby
<shevy> emocakes always the russians
<weeb1e> shevy: I've tried so many combinations of these commands
<shevy> Fetching: linecache19-0.5.12.gem (100%)
<shevy> weeb1e it failed here
<weeb1e> Even tried compiling the head of repos of this gem and its dependencies (linecache)
monkegji_ has quit [Remote host closed the connection]
<weeb1e> shevy: clone and build git://github.com/mark-moseley/linecache
<weeb1e> (I also tried installing a build gem version which was linked to in a report of someone solving the above native error, but same issue)
<weeb1e> *built
<shevy> this linecache thing refuses to compile
<weeb1e> It compiled fine for me
<weeb1e> $ sudo gem install ./linecache19-0.5.12.gem\nBuilding native extensions. This could take a while...\nSuccessfully installed linecache19-0.5.12\n1 gem installed
<shevy> hmm no, it hates me
<weeb1e> Meh
Hanmac_ has quit [Ping timeout: 245 seconds]
<weeb1e> Hates me more
<shevy> ohhhh
<shevy> I see something
relixx has joined #ruby
<shevy> a disguised error, a moment
<weeb1e> Remote debugging would speed up development so much, since I do all my development remotely
<weeb1e> Manual remote development with auto file syncing is a bit annoying
<shevy> nope sorry
<shevy> my 1.9.3 is broken in openssl
<shevy> dunno why
<banister`sleep> anyone here use s and ruby 2.0 ?
Elhu has quit [Quit: Computer has gone to sleep.]
<weeb1e> Meh :(
codecop has joined #ruby
taoru_ has quit [Remote host closed the connection]
taoru has joined #ruby
brianpWins has quit [Quit: brianpWins]
hit has left #ruby [#ruby]
<banister`sleep> weeb1e: perhaps pry-remote-em / pry-remote would work for u
dcwu has quit [Quit: Leaving.]
<weeb1e> banister`sleep: It is a EM based application, so I use pry sometimes, as well as other RPC interfaces
nat_home has quit [Quit: Leaving.]
arya has joined #ruby
<banister`sleep> weeb1e: then pry-remote-em is probably right for u
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<weeb1e> I was just hoping to be able to do debugging from my editer
<banister`sleep> oh ok
timmow has joined #ruby
<weeb1e> Switching windows all the time is a time waster
<weeb1e> I have so many damn windows open
<workmad3> hehe
timmow has quit [Read error: Connection reset by peer]
<workmad3> tabs ftw!!!
<weeb1e> workmad3: Each of my 100 windows have so many tabs open :P
<workmad3> :)
<weeb1e> I have multiple SSH client windows each with ~20 SSH session tabs
<workmad3> I tend to only have about 3 windows open... and then many tabs in each of them
mrhobbles has quit [Changing host]
mrhobbles has joined #ruby
<workmad3> screen ftw!!!
Matip has joined #ruby
<weeb1e> Then I have a bunch of sftp syncing scripts, multiple editors, etc
<workmad3> then you have one tab for each SSH client connection, and then multiple screen windows inside each tab
timmow has joined #ruby
<workmad3> but still, I'm just being facetious here ;)
<weeb1e> I need to somehow decrease the sftp syncing latency
Dom_ has quit [Remote host closed the connection]
<weeb1e> Yeah :P
<workmad3> weeb1e: buy faster electrons!!!
icole has quit [Remote host closed the connection]
<weeb1e> The speed and latency of the network is not the issue
mrhobbles has quit [Quit: Leaving]
<weeb1e> I think the sftp client just takes long to actually notice the changes
mrhobbles has joined #ruby
mrhobbles has quit [Changing host]
mrhobbles has joined #ruby
<workmad3> weeb1e: faster electrons would make everything faster
<weeb1e> My furthest box has 33ms away
<workmad3> weeb1e: as they'd also go through your CPU quicker
<weeb1e> *is
<weeb1e> Hehe
Nisstyre_ has joined #ruby
D4T has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
vierja has quit [Quit: Computer has gone to sleep.]
clocKwize has joined #ruby
bigkevmcd has joined #ruby
Mattix has quit [Ping timeout: 240 seconds]
Criztian has quit [Remote host closed the connection]
D4T_ has joined #ruby
hit has joined #ruby
<banister`sleep> anyone here use rails and 2.0 ?
<banister`sleep> MRI 2.0
Nisstyre has quit [Ping timeout: 240 seconds]
Hanmac_ has joined #ruby
lolmaus has joined #ruby
ericmathison has quit [Ping timeout: 252 seconds]
<Hanmac_> shevy i am currently building my rwx binding against ruby2.0 :P
D4T has quit [Ping timeout: 272 seconds]
D4T_ is now known as D4T
hit has left #ruby [#ruby]
baphled has joined #ruby
adeponte has joined #ruby
hmarr has quit [Quit: Computer has gone to sleep.]
predator117 has quit [Quit: leaving]
Elhu has joined #ruby
banjara has joined #ruby
predator117 has joined #ruby
Qwakeree has joined #ruby
stormetrooper has joined #ruby
<weeb1e> banister`sleep: You wouldn't happen to have experience using guard would you? I see it uses pry
lewix has quit [Ping timeout: 245 seconds]
<banister`sleep> weeb1e: no i dont, sorry
QKO has joined #ruby
adeponte has quit [Ping timeout: 260 seconds]
<weeb1e> Guard is doing something very strange to my gem requires, where it requires './lib/<gem_name>.rb' instead of the gem (even when using Bundler.require) and fails since my lib files are monkeypatches for the gems
poikon_ has joined #ruby
QKO_ has quit [Ping timeout: 255 seconds]
Amnesia has left #ruby [#ruby]
cha1tanya has joined #ruby
poikon has quit [Ping timeout: 272 seconds]
<weeb1e> Oh it is in fact not guard at all, but rspec...
<weeb1e> Maybe I should try a different testing framework
<Paradox> rspec <3
arya has quit [Ping timeout: 276 seconds]
Criztian has joined #ruby
<weeb1e> Does anyone know how to stop rspec from adding ./lib to the load path?
<workmad3> weeb1e: check your .rspec file
<arturaz> OT: What do people use for project/team management? Not only for tech tasks, but also design or "go to the bank to get the statement" or something.
<workmad3> weeb1e: does that have '-I lib' in it?
<weeb1e> I don't have such a file, I don't usually use rspec
lkba has quit [Ping timeout: 256 seconds]
<weeb1e> I am only trying to use rspec to be able to use guard for simple automated testing
<banister`sleep> arturaz: evernote
<weeb1e> This is turning out to not be so simple
havenwood has joined #ruby
arya has joined #ruby
<weeb1e> I think I'll try minitest, hopefully it won't go crazy and start adding random stuff to my load path
wyhaines_ has joined #ruby
wyhaines has quit [Read error: Connection reset by peer]
arturaz has quit [Remote host closed the connection]
bradhe has joined #ruby
havenwood has quit [Ping timeout: 244 seconds]
<banister`sleep> weeb1e: i like bacon
<banister`sleep> minitest is probably just as good though
dkannan_ has joined #ruby
daniel_- has joined #ruby
baphled has quit [Ping timeout: 256 seconds]
Norrin has left #ruby [#ruby]
dkannan has quit [Ping timeout: 252 seconds]
dkannan_ is now known as dkannan
beneggett has joined #ruby
hmarr has joined #ruby
banjara has quit [Ping timeout: 244 seconds]
samphippen has joined #ruby
baphled has joined #ruby
poikon_ has quit [Remote host closed the connection]
poikon has joined #ruby
<weeb1e> banister`sleep: I like cucumber for large scale testing, but minitest seems pretty awesome
arya has quit [Ping timeout: 272 seconds]
<banister`sleep> weeb1e: u're the only guy i've met who likes cucumber :)
zerba has joined #ruby
<weeb1e> Hehe
<hemanth> >> Time.now.sunday?
<eval-in> hemanth: Output: "" (http://eval.in/9661)
<hemanth> :|
<hemanth> >> p Time.now.sunday?
<eval-in> hemanth: Output: "false\n" (http://eval.in/9662)
<hemanth> :)
<hemanth> >> p [1,2,3,4].first(3)
<eval-in> hemanth: Output: "[1, 2, 3]\n" (http://eval.in/9663)
<hemanth> ;)
PanPan_ has quit [Quit: ChatZilla 0.9.90 [Firefox 18.0.2/20130201065344]]
<weeb1e> Oh cool, an eval bot
Mon_Ouie has joined #ruby
<hemanth> >> p Time.now.weekend?
<eval-in> hemanth: Output: "/tmp/execpad-e8dc19ea6d15/source-e8dc19ea6d15:1:in `<main>': undefined method `weekend?' for 2013-02-13 11:50:32 +0100:Time (NoMethodError)\n" (http://eval.in/9664)
<hemanth> wanted that method :{
haxrbyte has quit [Ping timeout: 272 seconds]
bradhe has quit [Ping timeout: 260 seconds]
matchaw___ has quit [Remote host closed the connection]
yacks has quit [Remote host closed the connection]
arya has joined #ruby
<weeb1e> >> require 'active_support/core_ext'
<eval-in> weeb1e: Output: "" (http://eval.in/9665)
theRoUS has joined #ruby
theRoUS has joined #ruby
<Xeago> banister`sleep: what is wrong with cucumber?
beneggett has quit [Quit: Computer has gone to sleep.]
<banister`sleep> Xeago: i dont use it, but the people who do who dont like say that it's aiming for a middle ground (between developers and stakeholders) that it doesnt quite reach. That it's neither useful for devs or stakeholders and that it's just unnecessary fluff that doesnt help
<Xeago> I haven't constructed my own opinion about cucumber but I share in the idea that it feels like hot fluffy air to me
<hemanth> [1,2,3,4].first(3) vs [1,2,3,4].take(3) hmm
<Xeago> but, don't have enough experience for an opinion
matchaw_ has joined #ruby
arturaz has joined #ruby
<banister`sleep> hemanth: i use take as it's back compatible
yfeldblum has quit [Ping timeout: 272 seconds]
<hemanth> banister`sleep, ha ok, back compatibilty matter :)
buibex has joined #ruby
arya has quit [Ping timeout: 248 seconds]
yfeldblum has joined #ruby
dcwu has joined #ruby
james has joined #ruby
james is now known as Guest42130
relixx has quit [Quit: relixx]
keymone has joined #ruby
emergion has joined #ruby
caleb_io has quit [Quit: caleb_io]
<banister`sleep> i dont always fail tests, but when i do, i fail them with a segfault: https://travis-ci.org/banister/binding_of_caller/jobs/4766223
arya has joined #ruby
banjara has joined #ruby
fermion has joined #ruby
<workmad3> banister`sleep: now all you need to do is write a test framework that will catch the segfault and give you a test failure :P
swex has quit [Ping timeout: 252 seconds]
<workmad3> banister`sleep: and don't forget to allow people to write tests that expect a segfault to occur ;)
<Xeago> omg, productivity just got killed, gstl high quality for free!
<Xeago> well, I guess I am almost done with my documentation then ;p
<workmad3> Xeago: don't you mean your documentation is done? :)
ferdev has joined #ruby
<Xeago> workmad3: how is that different than what I said?
<Xeago> ah, no it isn't done yet
<Xeago> writing the last page now
<Xeago> still have to formally describe all my references, cited works, and other materials used
Qwakeree is now known as Elixor
<Xeago> and translate..
<workmad3> Xeago: GSTL is calling ;)
Elixor is now known as Qwak
<Xeago> and export into multiple formats and check all formats for paging etc
arya has quit [Ping timeout: 252 seconds]
QKO_ has joined #ruby
* Xeago is probably going to write a typesetting system with a focus on ease of use, not on features
beliveyourdream has quit [Read error: Connection reset by peer]
QKO has quit [Ping timeout: 248 seconds]
techlife has quit [Read error: Connection reset by peer]
banister`sleep has quit [Remote host closed the connection]
dkannan_ has joined #ruby
techlife has joined #ruby
<Xeago> I do find latex too hard, but maybe I should just study it first
_JamieD_ has joined #ruby
beliveyourdream has joined #ruby
arya has joined #ruby
banister`sleep has joined #ruby
dkannan has quit [Ping timeout: 244 seconds]
dkannan_ is now known as dkannan
joelroa has joined #ruby
tensil has quit [Quit: tensil]
icole has joined #ruby
fixl has quit [Remote host closed the connection]
ssedano has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
hamed_r has quit [Quit: Leaving]
dcwu has quit [Read error: Connection reset by peer]
shock_one has quit [Read error: Connection reset by peer]
shock_one has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
banjara has quit [Ping timeout: 255 seconds]
BrindleFly has joined #ruby
Demux has quit [Ping timeout: 272 seconds]
icole has quit [Ping timeout: 260 seconds]
jodok has quit [Quit: jodok]
<jrabbit> Lyx makes latex pretty usable
<Xeago> lyx doesn't create latex
<Xeago> lyx has an internal format, that is translated/transformed to latex, at which point it is unreadable for normal users
Demux has joined #ruby
Qwak is now known as qwak
qwak has quit []
<jrabbit> really?
dmiller2 has quit [Ping timeout: 245 seconds]
<Xeago> uhu
<Xeago> you can instruct to leave an original latex file as latex
<Xeago> but that beats my point
havenwood has joined #ruby
berserkr has joined #ruby
Vert has joined #ruby
qwak has joined #ruby
qwak has quit [Client Quit]
emergion has quit [Quit: Computer has gone to sleep.]
qwak has joined #ruby
qwak has quit [Client Quit]
qwak has joined #ruby
ottbot has quit [Quit: WeeChat 0.4.0]
havenwood has quit [Ping timeout: 240 seconds]
joelroa has quit [Quit: Textual IRC Client: www.textualapp.com]
eka has quit [Quit: Computer has gone to sleep.]
jodok has joined #ruby
jodok has quit [Changing host]
jodok has joined #ruby
Gue______ has joined #ruby
monolar has joined #ruby
swex has joined #ruby
banister`sleep is now known as banisterfiend
qwak has quit []
qwak has joined #ruby
skattyadz has joined #ruby
qwak is now known as Qwak
Gue______ is now known as joelroa
arya has quit [Ping timeout: 252 seconds]
dustint has joined #ruby
arya has joined #ruby
bradhe has joined #ruby
evenix has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
alup has quit [Read error: Connection reset by peer]
puppeh has quit [Read error: Connection reset by peer]
khismetix has joined #ruby
bradhe has joined #ruby
alup has joined #ruby
<khismetix> Learning ruby… (coming from imperative languages) biggest thing for me is getting it with FP
puppeh has joined #ruby
joelroa has quit [Quit: Textual IRC Client: www.textualapp.com]
Qwak has quit []
Zespre_ has quit [Read error: Connection reset by peer]
joelroa has joined #ruby
<JonnieCa1he> khismetix: learn to replace all your loops with things like map and inject
Qwak has joined #ruby
Zespre has joined #ruby
<khismetix> ok.. that's good
Qwak has quit [Client Quit]
<JonnieCa1he> it all kinda flows from there once you can think in those terms. at least for very basic FP anyway
joelroa has quit [Client Quit]
<khismetix> One bit I've not grasped yet is the way they say a pure function shouldn't for example write to a stream
<khismetix> sees that as a side effect
<workmad3> khismetix: yes
<khismetix> how, in practice do you structure code to write to a stream for example (in FP)
arya has quit [Ping timeout: 252 seconds]
<JonnieCa1he> pure functional programming is a whole different level. best to just mix in functional stuff like map/inject into your imperative code at first
<JonnieCa1he> ruby is good for mixing like that.
puppeh has quit [Client Quit]
<workmad3> khismetix: ruby isn't a pure functional language though... ruby is an OO language with the ability to do some FP stuff if you like
yshh has quit [Remote host closed the connection]
<JonnieCa1he> if you want to learn pure FP for its own sake you might be better off in a language that enforces it, like haskell
<khismetix> ok sure
<jrabbit> or a lisp
<khismetix> so, if I had a ruby programme which contained a function which wrote to a file
<khismetix> is that breaking fp ?
<JonnieCa1he> well, all programs have to have side effects eventually, or they wouldnt be useful for anything
evenix has quit [Ping timeout: 272 seconds]
<khismetix> yes.. that was what I was thinking
<workmad3> JonnieCa1he: blasphemy!!!
<khismetix> ;)
arya has joined #ruby
<JonnieCa1he> in pure FP you limit those side effects to things like IO
<khismetix> ol
<khismetix> ok
<khismetix> can you give an example of stuff to avoid to stay within spirit of FP (within Ruby)?
<khismetix> obviously… loops replaced as you say
<JonnieCa1he> loops replaced only with things like map, which returns stuff
<JonnieCa1he> no using .each
monolar has left #ruby [#ruby]
<JonnieCa1he> .each exists explicitly for when you want side effects
<Xeago> JonnieCa1he: why no .each?
<khismetix> ok.. I had thought each was an FP feature within Ruby
<Xeago> same here
<JonnieCa1he> Xeago: what use is .each except for creating side effects? it doesnt return anything
banjara has joined #ruby
<JonnieCa1he> (i know it returns an enumerator but lets ignore that here)
<Xeago> JonnieCa1he: is that necessary for FP?
<JonnieCa1he> Xeago: for pure FP, yes. which is what we're discussing
<Xeago> you can pass in arbitrary functions (blocks), to be called on each block
arya has quit [Ping timeout: 248 seconds]
<workmad3> Xeago: right, but .each returns the array again, unchanged
<workmad3> Xeago: so without side-effects, the only thing you have to play with is the return value... if the return value remains unchanged, and you have no side effects, what you have is an identity function
d34th4ck3r has quit [Ping timeout: 240 seconds]
<Xeago> workmad3: than how would you call a function on each element of an array in FP?
<workmad3> Xeago: well, the only thing you'd care about in that case is the return value of those functions, in a new array
dkannan_ has joined #ruby
<workmad3> Xeago: so you'd use map ;)
jaygen has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 245 seconds]
jaygen has joined #ruby
<JonnieCa1he> basically use map all the time for everything because its the greatest concept in the history of CS
<JonnieCa1he> and it makes java programmers weep
Udom0 has quit [Ping timeout: 244 seconds]
<Xeago> interested in how to print the results of a function called on each element then
jaygen_ has joined #ruby
<Xeago> .map(:to_s).map(:display) ?
<workmad3> Xeago: display has side effects
<Xeago> I am kinda aiming for sideeffects: printing to output
jaygen has quit [Read error: Operation timed out]
dkannan has quit [Ping timeout: 256 seconds]
<workmad3> Xeago: exactly... but that has no place in pure FP
dkannan_ is now known as dkannan
<Xeago> workmad3: then pure FP has no use for programming if it cannot output data?
anderson has quit [Read error: Connection reset by peer]
<workmad3> Xeago: sure it can, but it has to output data only through the return value
relixx has joined #ruby
<JonnieCa1he> in practise when making a real program in this way you keep all the code that does IO (side effects) in one place, carefully controlled and segregated so state cannot leak out of it
<workmad3> Xeago: and when dealing with interfaces that aren't functional, then you have to break pure FP, but pure FP languages only allow you to do that in certain, controlled areas
anderson has joined #ruby
<JonnieCa1he> i think languages like haskell have special features to allow that
inao has quit [Quit: Leaving...]
arya has joined #ruby
QKO has joined #ruby
evenix has joined #ruby
<Nuck> Okay, how do I do those cool things like ActiveRecord does for validations, where a class method modifies the instance?
<workmad3> JonnieCa1he: yeah, I believe haskell does that though 'IO Monads'
<workmad3> JonnieCa1he: and in order to understand what they mean by a monad, you need more grounding in category theory then I have :)
atyz has quit [Quit: Leaving...]
QKO_ has quit [Ping timeout: 244 seconds]
<Nuck> All I want to do is make a special property acessor via `foo 'bar'` instead of defining the crap manually every time
Konboi has quit [Remote host closed the connection]
<Hanmac_> Nuck i think its a #rubyonrails question
<JonnieCa1he> its all in that article
<Nuck> This isn't Rails I'm working with
<workmad3> Nuck: you want to know how to create class macros
<Nuck> This is raw Ruby — I'm just trying to figure out how Rails does it so I can copy
<Nuck> workmad3: I guess that's the term?
<ninegrid> monads in general are not so much about strong speration of pure and stateful code, but enforcing a sequencing in the lazy functional environment by using partial application and continuations to build a function isomorphic to a linked list... think of the monad as the simicolon operator in languages where the simicolon denotes the termination of a statement... the monad syntax in haskell itself is just sugar over the underlying purely
<workmad3> Nuck: similar to things like 'attr_accessor' too, I'd guess
<Nuck> Ah yeah those!
<Nuck> I like you workmad3, you get me :P
<JonnieCa1he> well activesupport::concern exists to wrap that pattern in a handy module, so check out its source
krz has quit [Ping timeout: 255 seconds]
<workmad3> Nuck: and in essence, attr_accessor just defines two new methods on the class
<weeb1e> Ok, I'm done fighting with Guard
<weeb1e> No idea why it refuses to work
<workmad3> JonnieCa1he: AS::Concern exists to wrap the pattern of doing an 'extend ClassMethods' at the same time as including instance methods from a module
<weeb1e> But I will not roll my own guard using my own inotify implementation
<workmad3> JonnieCa1he: not to wrap around creating class macros
<weeb1e> *now
<Nuck> workmad3: I know, but I'm trying to figure out how — since it seems to be modifying the instance and adding methods and/or properties on it
<ninegrid> the real paradigm shift between functional and object oriented code is such that in an object oriented approach, .each enumerates a collection of objects and sends a message to each of them serially, those objects in turn may or may not update their own internal state, they key here is that new objects are not created, existing objects are mutated
<workmad3> JonnieCa1he: also, AS::Concern does that in a weird manner involving reimplementing its own module dependency system...
<weeb1e> It seems there is a real need for a simple automatic testing solution that "just works"
<weeb1e> At first glance Guard appeared to be just that, yet it is buggy and does not watch the files no matter what I do (which is its only job)
angusiguess has joined #ruby
<workmad3> Nuck: here's a sample implementation of attr_accessor ;) https://gist.github.com/workmad3/4944167
<ezkl> weeb1e: What environment are you running it in?
<weeb1e> ezkl: Linux
<ninegrid> in the functional approach a map will recurse a list of values, it does not send these values messages but applies a function to them, which in turn yields a *new* value... this is analogous to the way light passes through a system of lenses, photons strike the material of the lense and do not pass through, instead the electron shells in the atoms of the lense produce *new" photons... the end result in FP is not of passing messages ar
<ezkl> weeb1e: Hmm. I've never had issues w/ Guard in either Ubuntu LTS or Debian - OSX > 10.6 on the other hand
dkannan_ has joined #ruby
<weeb1e> ezkl: I'm literally trying to get it to work with the simplest possible test case
<workmad3> ninegrid: right, the functional approach basically builds up from different concepts compared to imperative or OO approaches
banjara has quit [Ping timeout: 248 seconds]
<Nuck> workmad3: Oooh that's extremely clear. In fact, now I don't know what the fuck ActiveSupport was trying to do haha
<ninegrid> the strong type system in a functional language combined with pure functions allow for a formal algebra, so in this way the functional program sees the peices of his program as a kind of projective geometry
<weeb1e> I want it to watch a single file and run minitest, yet it just does not
<Nuck> workmad3: Thanks for that!
<ninegrid> which for the inclined can be abstracted over with something called category theory
<workmad3> ninegrid: I've just never really internalised the alternative foundation :)
Kuifje has joined #ruby
Kuifje has joined #ruby
Kuifje has quit [Changing host]
<ninegrid> anyone serious about programming as a way of life should really use both paradigms
<workmad3> Nuck: well, that's one of the most basic ways to do a class macro with some metaprogramming :)
<Nuck> ... Now if only this damn vim bundle would syntax highlight define_method
<workmad3> Nuck: it's just a method ;)
<Nuck> workmad3: I knew that, but I still don't fully get how it mods an instance from within a class method
batlogg has joined #ruby
<workmad3> Nuck: it doesn't 'mod an instance'
<workmad3> Nuck: it defines a new instance method, same as using 'def' would
<Nuck> workmad3: I know but how is it getting access to the instance?
bubblehead has joined #ruby
TheFuzzball has joined #ruby
wmoxam has quit [Ping timeout: 246 seconds]
dkannan has quit [Ping timeout: 256 seconds]
dkannan_ is now known as dkannan
<workmad3> Nuck: well, in the same way that a body of a method defined with 'def' has the scope of a specific instance when you call the method
baphled has quit [Ping timeout: 252 seconds]
danieldocki has joined #ruby
<ezkl> weeb1e: Ahh… I generally use autotest w/ minitest
<workmad3> Nuck: the block you pass to 'define_method' has the scope of a specific instance when you call the method
jodok has quit [Ping timeout: 260 seconds]
batlogg is now known as jodok
<weeb1e> ezkl: autotest seems even more complex than Guard, it'll be easier to roll my own watcher :/
nari has quit [Ping timeout: 255 seconds]
<Nuck> workmad3: So basically the macros, instead of being run in context of the superclass, it's run in context of *this* class, and basically expands to a block which is evaluated within that?
<Nuck> I think I'm just too used to lexical scope to comprehend this easily haha
wmoxam has joined #ruby
chussenot has quit [Quit: chussenot]
<workmad3> Nuck: yes, when you call that 'attr_accessor' method, 'self' refers to the class you called it from
niklasb has joined #ruby
<workmad3> Nuck: so it defines the new instance method on that class
<clocKwize> hey
<Nuck> workmad3: ahhh, that's interesting and incredibly handy.
hybris has joined #ruby
<workmad3> Nuck: it's the same behaviour you get with any method call
<workmad3> Nuck: part of the beauty of ruby is that all of this doesn't fall out of special behaviour... it's all the same behaviour you get with normal objects
<workmad3> Nuck: because classes are themselves just objects ;)
<Nuck> I come from JS prototypes — classes being objects is no alien concept to me!
<Nuck> But this scoping certainly is
<workmad3> Nuck: well, not really
<workmad3> Nuck: if you define a method on a prototype, when you call that method, 'this' is the object you called the method on
<workmad3> Nuck: not the prototype object
fflush has joined #ruby
<Nuck> prototypes are a different form, but the base concept is still there
<Nuck> Yeah, the rules are quite different
<workmad3> Nuck: that's the exact behaviour you get here though ;) but instead of being a prototype chain of objects you have a class hierarchy ;)
idkazuma has joined #ruby
<workmad3> Nuck: you define a method on the superclass, when you call the method on a subclass the context stays as the subclass
ryanh has quit [Quit: Textual IRC Client: www.textualapp.com]
<Nuck> workmad3: ahhhh I see. That's definitely different from what I had expected, but I can see so many applications for that.
anderse has quit [Quit: anderse]
<Nuck> Another day, another way Ruby blows my mind.
<banisterfiend> Nuck: ruby oop system is really elegant and also very simple and consistent
<banisterfiend> but does take a few months to properly grok all the implications
<Nuck> Well isn't Ruby's oop based on good ol' Smalltalk OOP more than C++ OOP?
bradhe has joined #ruby
yshh has joined #ruby
<workmad3> Nuck: pretty much
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
carraroj has quit [Quit: Konversation terminated!]
<Nuck> I always loved the Smalltalk style. I'm actually also learning Obj. C right now so Smalltalk overload up in here.
carraroj has joined #ruby
ryanh has joined #ruby
ryanh has quit [Client Quit]
vlad_starkov has joined #ruby
<Hanmac_> >> class << (o=Object.new); class ABC; end;end; p o.singleton_class::ABC
<eval-in> Hanmac_: Output: "#<Class:0x8aed17c>::ABC\n" (http://eval.in/9749)
<Nuck> Please tell me ruby allows me to use an instance of a class as a constant's name. I really want to do terrible terrible things.
johnpcamara has joined #ruby
<banisterfiend> Nuck: what does that mean?
<workmad3> Nuck: need more explanation?
<Nuck> Like, instead of assigning a string as the name, using an actual object as the name
nfk has joined #ruby
<Nuck> It's a completely absurd concept that would allow me to do nothing but piss people off
krz has joined #ruby
Guest42130 has quit [Quit: Computer has gone to sleep.]
<workmad3> Nuck: as in 'MyClass.name' gives you back something other than a string?
<Nuck> Yeah
<Nuck> Foo.name => Bar
<workmad3> Nuck: yes, you can do that... 'class Foo; def self.name; bar; end; end'
<workmad3> Nuck: however, you *shouldn't* do that
<workmad3> *that should be Bar there, not bar, btw
<Nuck> workmad3: Like I said, I want to do terrible terrible things to the language.
<workmad3> Nuck: you can do terrible things much more easily ;)
<Nuck> I will maim and dismember this language eventually.
<workmad3> Nuck: 'class TrueClass; def !; true; end; end'
<Nuck> hahaha
<Nuck> workmad3: Reminds me of the old #define true false
pskosinski has joined #ruby
<Nuck> Classic unmaintainable code.
nfk has quit [Client Quit]
Elhu has quit [Quit: Computer has gone to sleep.]
keymone has quit [Quit: keymone]
jjbohn has joined #ruby
sepp2k has joined #ruby
<Hanmac_> nuck did you read my code line? you can even put it in the instance itself
<JonnieCa1he> def Kernel.rand(max); 3; end
monkegji_ has joined #ruby
havenwood has joined #ruby
nfk has joined #ruby
<JonnieCa1he> Nuck: check this out for some really horrible stuff https://github.com/yugui/evil-ruby/blob/master/lib/evil.rb
<Nuck> Interesting, Hanmac_. But not that elegant
undersc0re97 has quit [Quit: "The destruction of balance constitutes leaping forward and such destruction is better than balance. Imbalance and headache are good things." - Mao]
jodok has quit [Quit: jodok]
bradhe has quit [Ping timeout: 244 seconds]
jonahR has joined #ruby
atyz has joined #ruby
relixx has quit [Quit: relixx]
<Nuck> Okay, so I'm trying to create a class macro that sets something that can be getter'd but it's trying to resolve the local variable as a method... But aren't blocks lexically scoped?
<shock_one> JonnieCa1he, # completely random, I just throwed a dice.
jaygen has joined #ruby
<JonnieCa1he> i was thinking more of http://xkcd.com/221/
<JonnieCa1he> or alternatively, the real ps3 crypto core, where they really did that
<Nuck> haha
<workmad3> :)
relixx has joined #ruby
jaygen_ has quit [Read error: Operation timed out]
banjara has joined #ruby
havenwood has quit [Ping timeout: 240 seconds]
lewix has joined #ruby
<lewix> my ri is not complete for some reasons. any ideas?
roflmaus has joined #ruby
BRMatt has joined #ruby
<lewix> ri String.center
<lewix> Nothing known about String.center
monkegji_ has quit [Remote host closed the connection]
<lewix> also the output is odd
wargasm has quit [Read error: Connection reset by peer]
cha1tanya has quit [Ping timeout: 272 seconds]
vierja has joined #ruby
atyz has quit [Ping timeout: 240 seconds]
lolmaus has quit [Read error: Connection reset by peer]
fedza has joined #ruby
<shock_one> lewix, it's String#center
skattyadz has quit [Quit: skattyadz]
wargasm has joined #ruby
Criztian has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
monkegji_ has joined #ruby
<lewix> shock_one: no. I was looking for String.center and the problem is not only specific to String.center
<lewix> my ri command does not work properly
<lewix> I mean it's incomplete
dkannan_ has joined #ruby
monkegji_ has quit [Remote host closed the connection]
<lewix> or rather the output look different to what I expect
<Hanmac_> lewix what is your ruby version?
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<lewix> Hanmac_: (
kofno has quit [Remote host closed the connection]
divout has quit [Remote host closed the connection]
<lewix> Hanmac_: sorry. ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]
vierja has quit [Ping timeout: 252 seconds]
<Hanmac_> 1.9.2 is allready unsuported ...
kofno has joined #ruby
monkegji_ has joined #ruby
<shock_one> I don't have String#center in ri either.
dkannan has quit [Ping timeout: 276 seconds]
dkannan_ is now known as dkannan
grayson has joined #ruby
m8 has joined #ruby
<Hanmac_> for me both String.center and String#center works
dkannan has quit [Client Quit]
vlad_starkov has joined #ruby
<lewix> Hanmac_: thank you. I guess it's time to update
Virunga has joined #ruby
JohnBat26 has joined #ruby
xemu has joined #ruby
chussenot has joined #ruby
anderse has joined #ruby
browndawg1 has quit [Quit: Leaving.]
pu22l3r has joined #ruby
wf2f has quit []
pu22l3r has quit [Remote host closed the connection]
QKO_ has joined #ruby
pu22l3r has joined #ruby
bubblehead has quit [Remote host closed the connection]
QKO has quit [Ping timeout: 248 seconds]
taoru has quit [Remote host closed the connection]
beiter has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
keymone has joined #ruby
keymone has quit [Read error: Connection reset by peer]
pu22l3r_ has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
keymone has joined #ruby
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
djwonk has joined #ruby
vierja_ has joined #ruby
xemu has quit [Quit: Nettalk6 - www.ntalk.de]
banjara has quit [Ping timeout: 240 seconds]
cmyers has joined #ruby
arya has quit [Ping timeout: 248 seconds]
<cmyers> so....it looked sorta like if i cloned a repo on github, I could just install the gem anywhere by doing `gem install githubuser-gemname`, but now it seems github isn't hosting gems anymore. is it easy to just go make a rubyforge acct? will it automatically pull versions of the gem? how do I "just solve my damn problem now"?
xemu has joined #ruby
francisfish has quit [Remote host closed the connection]
bradhe has joined #ruby
vierja_ has quit [Ping timeout: 256 seconds]
tommyvyo has joined #ruby
francisfish has joined #ruby
carraroj has quit [Ping timeout: 240 seconds]
clocKwize has quit [Quit: clocKwize]
arya has joined #ruby
vikhyat has joined #ruby
fuzai has joined #ruby
Zespre has quit [Read error: Connection reset by peer]
hmarr has quit [Read error: Operation timed out]
Zespre has joined #ruby
<cmyers> isn't there anywhere I can host a gem where like, `git push` automatically causes a new version to be built?
<cmyers> I want maximum un-safe-ness here.
mark_locklear has joined #ruby
djwonk has quit []
<fuzai> Whats the proper way to pass an envrioment variable to EM.popen ? i've tried ("export TEST=testanswer; echo $TEST", callback) and from the normal popen example ([{ "TEST" => "testanswer"},"echo $TEST"]) with no luck]
nanothief has quit [Ping timeout: 252 seconds]
<cmyers> fuzai: have you tried just setting the ENV hash before the call?
<fuzai> no I haven't
<fuzai> i'll try that now
<cmyers> I think that might work =)
<cmyers> no promises
arya has quit [Ping timeout: 248 seconds]
<fuzai> np
palyer has joined #ruby
palyboy has quit [Read error: Connection reset by peer]
palyer has quit [Client Quit]
palyboy has joined #ruby
<fuzai> that looks like the winner, thank you
<cmyers> no problemo =)
robustus has quit [Ping timeout: 276 seconds]
bradhe has quit [Ping timeout: 256 seconds]
robustus has joined #ruby
vierja_ has joined #ruby
arya has joined #ruby
BizarreCake has joined #ruby
rakaar_ has joined #ruby
idkazuma has quit [Remote host closed the connection]
vierja_ has quit [Ping timeout: 252 seconds]
arya has quit [Ping timeout: 252 seconds]
rakaar has quit [Ping timeout: 252 seconds]
kpshek has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
angusiguess has quit [Ping timeout: 252 seconds]
atyz has joined #ruby
banjara has joined #ruby
<fuzai> if i have a webpage that spits out just JSON, what is an easy way to load it into a variable(s) ?
<cmyers> hash = JSON.parse(response.body) # or something similar
<cmyers> prob. need to require 'json'
<fuzai> ty i'm googing now
baphled has joined #ruby
carraroj has joined #ruby
<cmyers> grrr, peach is way less awesome than I anticipated
<cmyers> dear self: write a better peach. that is all.
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
clocKwize has joined #ruby
x0F_ is now known as x0F
Elhu has joined #ruby
vierja_ has joined #ruby
jjbohn has quit [Quit: Leaving...]
hmarr has joined #ruby
Qwak has joined #ruby
Qwak has quit [Client Quit]
robotmay_ has joined #ruby
relixx is now known as relix
havenwood has joined #ruby
robotmay has quit [Ping timeout: 272 seconds]
vierja_ has quit [Ping timeout: 276 seconds]
Guest__ has joined #ruby
johnpcamara has quit [Quit: johnpcamara]
Qwak has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
atyz has quit [Quit: Leaving...]
QKO has joined #ruby
aef has quit [Remote host closed the connection]
<Hanmac_> shevy guckguck
buibex has quit []
QKO_ has quit [Ping timeout: 272 seconds]
bradhe has joined #ruby
havenwood has quit [Ping timeout: 256 seconds]
joofsh has joined #ruby
haxrbyte has joined #ruby
alup has quit [Read error: Connection reset by peer]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
alup has joined #ruby
hybris has quit [Quit: Leaving]
haxrbyte_ has joined #ruby
xerxas has quit [Ping timeout: 264 seconds]
swistak35 has quit [Ping timeout: 264 seconds]
kaichanvong has quit [Ping timeout: 264 seconds]
drPoggs has quit [Ping timeout: 264 seconds]
<Hanmac_> what ...
strax has quit [Ping timeout: 264 seconds]
patricksroberts_ has quit [Ping timeout: 264 seconds]
fasta_ has joined #ruby
chrisramon has joined #ruby
banjara has quit [Ping timeout: 252 seconds]
<Hanmac_> >> [[1,2],[3,4]].each{|v| p v}
<eval-in> Hanmac_: Output: "[1, 2]\n[3, 4]\n" (http://eval.in/9760)
rawler has quit [Ping timeout: 264 seconds]
fasta has quit [Ping timeout: 264 seconds]
rawler_ has joined #ruby
<Hanmac_> >> [[1,2],[3,4]].each{|*v| p v}
<eval-in> Hanmac_: Output: "[[1, 2]]\n[[3, 4]]\n" (http://eval.in/9761)
<Hanmac_> >> [[1,2],[3,4]].each{|**v| p v}
<eval-in> Hanmac_: Output: "/tmp/execpad-0bf0a2c3c1bf/source-0bf0a2c3c1bf:1: syntax error, unexpected tPOW, expecting '|'\n[[1,2],[3,4]].each{|**v| p v}\n ^\n/tmp/execpad-0bf0a2c3c1bf/source-0bf0a2c3c1bf:1: synt ..." (http://eval.in/9762)
haxrbyte has quit [Ping timeout: 252 seconds]
cschneid has quit [Ping timeout: 264 seconds]
baphled has quit [Ping timeout: 252 seconds]
swistak35 has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
cool has quit [Ping timeout: 264 seconds]
drPoggs has joined #ruby
vikhyat has left #ruby [#ruby]
vierja_ has joined #ruby
jcrawford has quit [Read error: Connection reset by peer]
<Hanmac_> the last one returned {},{} for me ... oO
KB1ZIB has joined #ruby
pu22l3r_ has joined #ruby
Criztian has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
jcrawford has joined #ruby
willob has joined #ruby
wudofyr_ has quit [Remote host closed the connection]
wudofyr_ has joined #ruby
cschneid has joined #ruby
bradhe has quit [Ping timeout: 256 seconds]
chrisramon has quit [Quit: chrisramon]
__BigO__ has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
pu22l3r has quit [Ping timeout: 276 seconds]
vierja_ has quit [Ping timeout: 256 seconds]
inokenty has joined #ruby
decoponio has quit [Quit: my pc will be rebooting]
kpshek has quit []
buibex has joined #ruby
hybris has joined #ruby
tommyvyo has joined #ruby
KB1ZIB has quit [Read error: Connection reset by peer]
jodok has joined #ruby
jodok has quit [Changing host]
jodok has joined #ruby
invisime has joined #ruby
segv- has joined #ruby
Criztian has quit []
octoberry has joined #ruby
sailias has joined #ruby
djwonk has joined #ruby
angusiguess has joined #ruby
keymone has quit [Quit: keymone]
browndawg has joined #ruby
vierja_ has joined #ruby
arya has joined #ruby
himsin has quit [Ping timeout: 245 seconds]
carraroj has quit [Ping timeout: 256 seconds]
otherj has joined #ruby
batlogg has joined #ruby
batlogg has quit [Changing host]
batlogg has joined #ruby
blaxter has quit [Ping timeout: 246 seconds]
vierja_ has quit [Ping timeout: 245 seconds]
djwonk has quit [Ping timeout: 252 seconds]
grayson has quit [Quit: Textual IRC Client: www.textualapp.com]
<JonnieCa1he> cmyers: you can load gems from github with bundler
skattyadz has joined #ruby
<JonnieCa1he> cmyers: gem 'foo', :git => "http://github.com/bar/foo"
<JonnieCa1he> even gem 'foo', :git => "http://github.com/bar/foo", :ref => "abcdef12345654345rfgtryt"
octoberry has quit [Ping timeout: 256 seconds]
<cmyers> JonnieCa1he: nice - ty, that is very helpful
<JonnieCa1he> or gem 'foo', :path => "/home/cmyers/code/foo"
<JonnieCa1he> that way you dont have to re-bundle each time
<cmyers> that is perfect.
<JonnieCa1he> beware of issues on deployment though
<cmyers> yeah, still have to test
jodok has quit [Ping timeout: 260 seconds]
fuzai has quit [Quit: fuzai]
batlogg is now known as jodok
jerius has joined #ruby
robotmay_ has quit [Ping timeout: 260 seconds]
Banistergalaxy has joined #ruby
* Hanmac_ manages to install one of this C++ gems under ruby2.0trunk
theRoUS has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
bluenemo has joined #ruby
moos3 has joined #ruby
buibex has quit [Remote host closed the connection]
josh_keith has quit [Ping timeout: 272 seconds]
atyz has joined #ruby
<invisime> ruby 2.0?
solidoodlesuppor has joined #ruby
<invisime> oh man. that rc is only 5 days old.
<cmyers> even more not-backwards-compatible-er than 1.9.X =D
<JonnieCa1he> well 1.9 was pretty backwards compatible
moos3 has quit [Client Quit]
<Hanmac_> invisime that why i sayd thats its a trunk
moos3 has joined #ruby
atyz has quit [Client Quit]
jpfuentes2 has joined #ruby
robotmay has joined #ruby
banisterfiend has quit [Remote host closed the connection]
EPIK has quit [Ping timeout: 248 seconds]
lurch_ has quit [Ping timeout: 260 seconds]
joshman_ has joined #ruby
hashmal has joined #ruby
imami|afk is now known as banseljaj
yacks has joined #ruby
samuelj has joined #ruby
kernel_panik has joined #ruby
<kernel_panik> Hi to all!
vierja_ has joined #ruby
samphippen has joined #ruby
<kernel_panik> strange question.. if I have " foo.each |name,hash| do ..... end" how is foo? could you please make an example ?
breakingthings has joined #ruby
<samuelj> Hey everyone, I use the following snippet in quite a few different singleton classes. Is there a way I can extract it into a module and then include/extend that> http://pastie.org/6151592
geekbri has joined #ruby
<Muz> >> foo = {:your => :mum, :loves => :cock}; foo.each |key, value| do puts "#{key} #{value}" end
<eval-in> Muz: Output: "/tmp/execpad-0ecf6a8e4a86/source-0ecf6a8e4a86:1: syntax error, unexpected ',', expecting $end\n...loves => :cock}; foo.each |key, value| do puts \"\#{key} \#{val...\n... ^\n" (http://eval.in/9765)
<Muz> >> foo = {:your => :mum, :loves => :cock}; foo.each_pair |key, value| do puts "#{key} #{value}" end
<eval-in> Muz: Output: "/tmp/execpad-747793b07de5/source-747793b07de5:1: syntax error, unexpected ',', expecting $end\n... => :cock}; foo.each_pair |key, value| do puts \"\#{key} \#{val...\n... ^\n" (http://eval.in/9766)
<Hanmac_> >> foo = {:your => :mum, :loves => :cock}; foo.each_pair do |key, value| puts "#{key} #{value}"; end
<eval-in> Hanmac_: Output: "your mum\nloves cock\n" (http://eval.in/9767)
decoponio has joined #ruby
<samuelj> Might this be a case for SingleForwardable?
vierja_ has quit [Ping timeout: 256 seconds]
QKO has quit [Read error: Operation timed out]
josh_keith has joined #ruby
monkegji_ has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
QKO has joined #ruby
adambeynon has joined #ruby
eka has joined #ruby
jtharris has quit [Quit: WeeChat 0.4.0]
monkegjinni has joined #ruby
rmartin has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
jtharris has joined #ruby
SeanLazer has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
banjara has quit [Ping timeout: 252 seconds]
sailias has quit [Ping timeout: 240 seconds]
shock_one has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
angusiguess has quit [Ping timeout: 276 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
banisterfiend has joined #ruby
Criztian has joined #ruby
peregrine81 has joined #ruby
the_mentat has joined #ruby
<kernel_panik> thanks!
vierja_ has joined #ruby
tcstar has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 0.4.0]
rakaar_ has quit [Ping timeout: 248 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
pavilionXP has joined #ruby
hbpoison has joined #ruby
postmodern has quit [Quit: Leaving]
Dwarf has quit [Quit: BNC shit itself]
vierja_ has quit [Ping timeout: 244 seconds]
x82_nicole has joined #ruby
johnpcamara has joined #ruby
havenwood has quit [Ping timeout: 260 seconds]
chussenot__ has joined #ruby
Marco has joined #ruby
carraroj has joined #ruby
aquaranto has joined #ruby
pavilionXP has quit [Remote host closed the connection]
chussenot has quit [Ping timeout: 272 seconds]
chussenot__ is now known as chussenot
danielpcox has joined #ruby
aquaranto has left #ruby [#ruby]
Dwarf has joined #ruby
maxmanders has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby
atyz has joined #ruby
krz has quit [Ping timeout: 256 seconds]
Dwarf has quit [Client Quit]
monkegjinni has quit [Remote host closed the connection]
clocKwize has quit [Quit: clocKwize]
sailias has joined #ruby
monkegjinni has joined #ruby
clocKwize has joined #ruby
daniel_- has quit [Ping timeout: 260 seconds]
Targen has quit [Ping timeout: 276 seconds]
mercwithamouth has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
himsin has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
philcrissman has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
Dwarf has joined #ruby
bradhe has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
jgarvey has joined #ruby
otherj has quit []
pavilionXP has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
iambic has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
main has quit [Ping timeout: 240 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
vierja_ has joined #ruby
jrajav has joined #ruby
monkegjinni has joined #ruby
phantasm66 has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
allaire has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
lewix has quit [Ping timeout: 252 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
justsee has quit [Quit: Leaving...]
monkegjinni has quit [Read error: Connection reset by peer]
vierja_ has quit [Ping timeout: 248 seconds]
casheew has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
pdamer has joined #ruby
casheew has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
cdt has joined #ruby
samphippen has joined #ruby
banjara has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
Jackneill has joined #ruby
LBRapid has joined #ruby
adambeynon has quit [Quit: Computer has gone to sleep.]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 260 seconds]
casheew has quit [Read error: Connection reset by peer]
enebo has joined #ruby
monkegjinni has joined #ruby
arya has quit [Ping timeout: 248 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
arya has joined #ruby
monkegjinni has joined #ruby
casheew has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
cawaker has joined #ruby
cawaker has left #ruby [#ruby]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
beneggett has joined #ruby
v0n has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
nanothief has joined #ruby
prime has quit [Ping timeout: 264 seconds]
monkegjinni has joined #ruby
frogstarr78 has joined #ruby
stopbit has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
etcetera has joined #ruby
Hanmac_ has quit [Ping timeout: 245 seconds]
Jelco_ has quit [Ping timeout: 264 seconds]
alexhanh has quit [Ping timeout: 264 seconds]
Tarential has quit [Excess Flood]
alexhanh has joined #ruby
carloslopes has joined #ruby
Jelco_ has joined #ruby
evenix has quit [Read error: Connection reset by peer]
Tarential has joined #ruby
puppeh has joined #ruby
prime has joined #ruby
evenix has joined #ruby
samuelj has quit [Quit: Page closed]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
pavilionXP has quit [Ping timeout: 272 seconds]
beliveyourdream has quit [Remote host closed the connection]
nanothief has quit [Ping timeout: 252 seconds]
Dwarf has quit [Quit: BNC shit itself]
axl_ has joined #ruby
peteyg has joined #ruby
QKO_ has joined #ruby
chrisramon has joined #ruby
banjara has quit [Max SendQ exceeded]
ffranz has joined #ruby
quatar2 has joined #ruby
Dwarf has joined #ruby
djwonk has joined #ruby
banjara has joined #ruby
QKO has quit [Ping timeout: 244 seconds]
jjbohn has joined #ruby
<quatar2> Hi all! Beginner question, how do i run a file from irb? i just get "indefined local variable or method" but i have assigned a variable, but it dosent work anyway?
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
Mchl has quit [Quit: ZNC - http://znc.sourceforge.net]
_nitti has joined #ruby
hbpoison has quit [Ping timeout: 272 seconds]
jpfuentes2 has joined #ruby
ryanh has joined #ruby
chussenot has quit [Quit: chussenot]
<quatar2> Somebody? its seems like an easy question
Mchl has joined #ruby
etcetera has quit []
<hoelzro> quatar2: let me guess
<hoelzro> you have a variable in IRB
<hoelzro> and you refer to it from a script
<puppeh> I want to confirm that MRI 1.9.3 is not CoW-friendly
joshman_ has quit [Quit: Computer has gone to sleep.]
<hoelzro> which you load from irb?
<hoelzro> puppeh: correct
<puppeh> I'm trying in IRB to fork a new process, and then inspect in memory in OS X via the activity monitor
<puppeh> I watch it's shared memory going to 0
<puppeh> is that it?
<quatar2> hoelzro: exactly
banjara has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
<puppeh> but then I disable the GC
<puppeh> and fork again
<hoelzro> quatar2: ok, local variables are local to the unit of compilation
<puppeh> and again it goes to 0
moofy has joined #ruby
<hoelzro> so your script won't see them
andikr has quit [Read error: Connection reset by peer]
tk_ has quit [Quit: ばいばい]
philcrissman has quit [Ping timeout: 255 seconds]
<quatar2> ok, so how do i do it?
<puppeh> why is that?
djwonk has quit [Read error: Connection reset by peer]
nomenkun has quit [Remote host closed the connection]
<hoelzro> quatar2: well, what are you trying to do on a high level?
<hoelzro> puppeh: that I don't know
clooth has quit [Quit: clooth]
dmerrick has joined #ruby
blaxter has joined #ruby
bean has joined #ruby
bean has quit [Max SendQ exceeded]
bean has joined #ruby
<quatar2> hoelzro: Dude, im a total beginner, never done any programming before really. this is the first thing in the book im using, theres a script in the book, i saved it, and then i want to test it from irb, then i get that message.
<hoelzro> ok
spaceships has joined #ruby
<hoelzro> quatar2: could you paste the script?
jlast has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<quatar2> obj = Object.new
<quatar2> def obj.title
<quatar2> "Programmering i Ruby"
<quatar2> end
casheew has joined #ruby
<quatar2> def obj.author
<quatar2> "Martin Leterius"
<quatar2> end
<quatar2> def obj.pages
<quatar2> 415
<quatar2> end
<quatar2> def obj.text
<quatar2> "Denna text är mycket längre i en riktig bok."
<quatar2> end
<quatar2> def obj.current_page
<quatar2> 1
<quatar2> end
<hoelzro> um.
<quatar2> hoelzro: So if you could explaine as you would to a child! :-) Heres the script :
<hoelzro> ok, I know you didn't know any better
<hoelzro> but, as is noted in the channel's message, please use a pastebin for pastes > 3 lines
<quatar2> then im trying puts obj.title
emocakes has quit [Quit: emocakes]
<quatar2> ok, sorry
<hoelzro> it's ok
<hoelzro> just remember that in the future =)
<quatar2> i will sir
atyz has quit [Quit: Linkinus - http://linkinus.com]
<quatar2> :-)
<hoelzro> so this book tells you to save that in a script, and tells you you can refer to obj from irb?
<quatar2> yes
<hoelzro> what book is this?
havenwood has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
<quatar2> Swedish book! "programming in Ruby"
<Nom-> Hey guys... i'm trying out writing a native C extension to wrap around a library i'm using, and I seem to have a memory leak... is there something I'm supposed to do to allow Data_Wrap_Struct()'s to be freed up properly? I am defining a free method, and it *is* correctly free()ing the struct.
<hoelzro> quatar2: afaik, that is wrong
<hoelzro> quatar2: what version of Ruby does it cover?
<hoelzro> I don't think that ever worked, but I could be wrong
relix has quit [Read error: Connection reset by peer]
<hoelzro> Nom-: care to paste your codde?
carlyle has joined #ruby
miskander has joined #ruby
relixx has joined #ruby
<quatar2> dosent say wich version, cant find it anyway. but i use 1.9.2
<hoelzro> ok
<quatar2> i used rvm
<Nom-> Really basic at this point :)
<hoelzro> ok, so what you could do is put obj in a global
<hoelzro> ex. $obj
jrajav has quit [Quit: I tend to be neutral about apples]
<hoelzro> then you can use it in irb
<quatar2> its published 2007
djwonk has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<quatar2> so i put $ before obj?
<quatar2> in the script?
monkegjinni has joined #ruby
allaire has quit []
monkegjinni has quit [Read error: Connection reset by peer]
<hoelzro> quatar2: well, for now, just do $obj = obj at the end of the script
monkegjinni has joined #ruby
<quatar2> ahh, cool
pu22l3r has joined #ruby
<hoelzro> Nom-: hmm...I don't see anything terribly wrong there
monkegjinni has quit [Read error: Connection reset by peer]
carlyle has quit [Client Quit]
dallasm has joined #ruby
jodok has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
evenix has quit [Read error: Connection reset by peer]
<quatar2> i will try it out, thanks alot, problebly will get backt to you! Thanks for now!!
ffranz1 has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
jodok has joined #ruby
jodok has quit [Changing host]
jodok has joined #ruby
<hoelzro> best of luck =)
evenix has joined #ruby
monkegjinni has joined #ruby
<Nom-> hoelzro: That's disconcerting :) I suppose it's entirely possible the library i'm using is the one with the leak... i've tried doing an explicit free() on the struct, but it does a double free segfault if I do :(
monkegjinni has quit [Read error: Connection reset by peer]
relixx is now known as relix
<hoelzro> Nom-: yeah, I'm not surprised about that =/
<hoelzro> try seeing if the library has a leak, I guess
djwonk has quit [Client Quit]
braoru has quit [Quit: Leaving]
monkegjinni has joined #ruby
<Nom-> Which is about where my usefulness ends, because I'm not much of a C programmer :(
uris has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
pavilionXP has joined #ruby
<hoelzro> well, just try creating 100 of those objects, and freeing them
innohero has joined #ruby
<hoelzro> and run valgrind on the program
<moofy> uhm. hi. I'm new to ruby and i'm getting confused as to why my tiny script isn't working.
<hoelzro> moofy: welcome
jodok has quit [Client Quit]
<moofy> i made a file with a code_words variable and linked it with require_relative
monkegjinni has quit [Read error: Connection reset by peer]
<hoelzro> moofy: local variables aren't visible between files
ffranz has quit [Ping timeout: 248 seconds]
<moofy> ah.
pavilionXP has quit [Max SendQ exceeded]
<moofy> yeah it errors on me
carlyle has joined #ruby
<moofy> how do i make it see it?
evenix has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
pavilionXP has joined #ruby
evenix has joined #ruby
innohero has quit [Client Quit]
<quatar2> hoelzro : still the same bloody error message
<hoelzro> moofy: well, what does each script do?
<hoelzro> quatar2: you're referring to $obj in irb?
JumpMast3r has quit [Quit: JumpMast3r]
<moofy> the first one just puts things into code words. I'm trying to do part of _why's guide.
<hoelzro> moofy: could you paste the two scripts somewhere?
<moofy> so one file is just: code_words = { stuff here }
<quatar2> yes my friend, dosent work, maby im lazy now, should do my research better. But its in the book, so should work.
<moofy> then: code_words.each do |real, code|
<moofy> idea.gsub!( real, code )
<moofy> end
<quatar2> stupid book
<moofy> but i can't load it from the other file
<heftig> require_relative 'other_file'
joshman_ has joined #ruby
<moofy> yeah i have that. but i get the 'undefined local variable'
<heftig> ah, right
<heftig> use CODE_WORDS, not code_words
tcstar has joined #ruby
mengu_ has joined #ruby
mengu has quit [Read error: Connection reset by peer]
zz_chrismcg is now known as chrismcg
tagrudev has quit [Remote host closed the connection]
mcatch has joined #ruby
slainer68 has quit [Read error: Connection reset by peer]
philcrissman has joined #ruby
carlyle has quit []
slainer68 has joined #ruby
Norrin has joined #ruby
puppeh has quit [Remote host closed the connection]
<moofy> why does putting it in capitals let me share it between files?
<heftig> local variables don't carry over requires
vierja_ has joined #ruby
<heftig> CONSTANTS do
<heftig> (as will $global variables)
megha has joined #ruby
skum has joined #ruby
hbpoison has joined #ruby
matthewrobbins has joined #ruby
<moofy> so if i had it in the same file i could use code_words?
Konboi has joined #ruby
<heftig> yes
kaichanvong has joined #ruby
patricksroberts_ has joined #ruby
xerxas has joined #ruby
evenix_ has joined #ruby
strax has joined #ruby
Norrin has left #ruby [#ruby]
m3pow has quit [Read error: Connection reset by peer]
cool has joined #ruby
Vainoharhainen has quit [Ping timeout: 256 seconds]
vierja_ has quit [Ping timeout: 252 seconds]
banjara has joined #ruby
SCommette has joined #ruby
otherj has joined #ruby
dr_bob has quit [Ping timeout: 252 seconds]
freakazoid0223 has joined #ruby
evenix has quit [Ping timeout: 260 seconds]
otherj has quit [Client Quit]
dr_bob has joined #ruby
<Nom-> still reachable: 197,328 bytes in 144 blocks
<Nom-> Awesome. Looks like it's keeping some kind of global state. That'll be fun to get the vendor to fix.
<hoelzro> oh joy
casheew has quit [Read error: Connection reset by peer]
ffranz1 has quit [Quit: Leaving]
<hoelzro> glad you found it, though!
<Nom-> Thanks for the valgrind trick... that'll go into my mental notebook :)
<hoelzro> ;)
ffranz has joined #ruby
ffranz has quit [Client Quit]
casheew has joined #ruby
<Nom-> Oh here we go... utility functions... tibems_Close() frees up internal data structures
pu22l3r has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
carlyle has joined #ruby
carlyle has quit [Client Quit]
statarb3 has quit [Quit: Leaving]
asobrasil has quit [Ping timeout: 245 seconds]
dr_bob1 has joined #ruby
dr_bob has quit [Ping timeout: 272 seconds]
erlingur has quit [Quit: http://erlingur.is]
Illusioneer has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
otherj has joined #ruby
otherj has quit [Client Quit]
bradhe has joined #ruby
carlyle has joined #ruby
Hanmac_ has joined #ruby
<Illusioneer> So stop me if you've heard this one before, but I am trying to convert a array of hashes to a hash of hashes
koderde has joined #ruby
peregrine81 has joined #ruby
vierja_ has joined #ruby
relix has quit [Ping timeout: 256 seconds]
<Illusioneer> But every method i've tried wraps the child hashes inside of a one-dimensional array
<Illusioneer> making it a hash of arrays containing single hashes
<hoelzro> Illusioneer: would you mind pasting an example input, and what do you expect the output to look like?
havenwood has quit [Remote host closed the connection]
joshman_ has quit [Ping timeout: 260 seconds]
<Illusioneer> you mean of what the hashes should look like before/after?
<hoelzro> yes
anachronistic has joined #ruby
anachronistic has quit [Client Quit]
<Illusioneer> hmmm, hold on lemme put that together
QKO has joined #ruby
joshman_ has joined #ruby
vierja_ has quit [Ping timeout: 276 seconds]
malcolmva has quit [Read error: Connection reset by peer]
malcolmva has joined #ruby
QKO_ has quit [Ping timeout: 272 seconds]
d2dchat has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
chrisramon has quit [Quit: chrisramon]
peregrine81 has joined #ruby
dr_bob1 has left #ruby [#ruby]
danieldocki has quit [Quit: Linkinus - http://linkinus.com]
banjara has quit [Ping timeout: 255 seconds]
beneggett has quit [Quit: Computer has gone to sleep.]
skum is now known as vainofanskap
nateberkopec has joined #ruby
<shevy> dumdedum
JohnBat26 has quit [Read error: Operation timed out]
innohero has joined #ruby
chussenot has joined #ruby
swex has quit [Read error: Operation timed out]
bradhe has quit [Ping timeout: 245 seconds]
acies has left #ruby [#ruby]
billiam has joined #ruby
tommyvyo has quit [Read error: Operation timed out]
peregrine81 has quit [Quit: Computer sleeping.]
swex has joined #ruby
micahgodbolt has joined #ruby
otherj has joined #ruby
monkegjinni has quit [Remote host closed the connection]
kernel_panik has quit [Quit: Leaving]
robotmay_ has joined #ruby
peregrine81 has joined #ruby
danieldocki has joined #ruby
Guest___ has joined #ruby
monkegjinni has joined #ruby
McAfreak is now known as JMcAfreak
otherj has quit [Client Quit]
skattyadz has quit [Quit: skattyadz]
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
nat_home has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
robotmay has quit [Ping timeout: 272 seconds]
vierja_ has joined #ruby
techhelp has joined #ruby
geggam has joined #ruby
monkegjinni has joined #ruby
<innohero> hi
ryanh has quit [Quit: Computer has gone to sleep.]
monkegjinni has quit [Read error: Connection reset by peer]
mmitchell has joined #ruby
monkegjinni has joined #ruby
tommyvyo has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
<innohero> did ruby resolve the yaml issue yet??
<innohero> is it safe now?
<Hanmac_> innohero it was a rails issue not an ruby issue
haxrbyte has joined #ruby
monkegjinni has joined #ruby
<innohero> it was a gem isssue, so not rails only i suspect
monkegjinni has quit [Read error: Connection reset by peer]
micahgodbolt has left #ruby ["Textual IRC Client: www.textualapp.com"]
haxrbyte has quit [Remote host closed the connection]
haxrbyte_ has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
haxrbyte has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
Guest___ is now known as Guest123
aganov has quit [Read error: Connection reset by peer]
swex_ has joined #ruby
monkegjinni has joined #ruby
<Hanmac_> is it rubys fault when the developer unserialize untrusted user input?
monkegjinni has quit [Read error: Connection reset by peer]
vierja_ has quit [Ping timeout: 255 seconds]
Xeago has quit [Ping timeout: 276 seconds]
monkegjinni has joined #ruby
swex has quit [Read error: Operation timed out]
monkegjinni has quit [Read error: Connection reset by peer]
<TTilus> programmer's
monkegjinni has joined #ruby
<workmad3> innohero: the rails issue and the rubygems issue were both down to unserialising untrusted user input through a yaml load method that allowed execution of arbitrary code
peteyg has quit [Ping timeout: 252 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
<workmad3> innohero: it wasn't an issue with the yaml parser, it was an issue with how both places were using it
Konboi has quit [Remote host closed the connection]
<TTilus> the lib is to be blamed if it states to be "safe" (by whatever definition) but isnt
<JonnieCa1he> it didnt state itself as safe
danneu has joined #ruby
miskander has quit [Read error: Connection reset by peer]
<JonnieCa1he> its obviously not safe, its *designed* to create arbitrary objects
angusiguess has joined #ruby
<Hanmac_> i readed rubys bug tracker ... and the rails user nearly spammed the tracker with another stupid ideas how to solv that ... some had the idea to GC symbols or other stupid shit
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
<JonnieCa1he> lol who was that?
<TTilus> yep, and programmers building upon it should take that into account
<JonnieCa1he> do you mean rails developer or rails user?
pu22l3r has joined #ruby
monkegjinni has joined #ruby
<TTilus> primarily rails devs
banisterfiend has quit [Read error: Connection reset by peer]
monkegjinni has quit [Read error: Connection reset by peer]
* workmad3 hides from the rails hate
<JonnieCa1he> well the way rails used it was pretty obscure. the gemspec thing, i cant believe nobody noticed that
banisterfiend has joined #ruby
monkegjinni has joined #ruby
<JonnieCa1he> it was staring every gem developer in the face for *years*, every single day
monkegjinni has quit [Read error: Connection reset by peer]
<TTilus> dunno how widely the potential problems were known, prolly nobody really noticed
haxrbyte has quit [Read error: Connection reset by peer]
<TTilus> JonnieCa1he: i dont think it was such a surprise
brimil01 has joined #ruby
monkegjinni has joined #ruby
<workmad3> JonnieCa1he: yeah, although gotta wonder who's bright idea it was to allow XML parameters to be typehinted to YAML and deserialized a second time through that, before *anything* in the app was touched
monkegjinni has quit [Read error: Connection reset by peer]
<JonnieCa1he> workmad3: the way that came about was quite complex, to do with interactions between different libs
monkegjinni has joined #ruby
<JonnieCa1he> the yaml gemspec thing was just blatant
<workmad3> JonnieCa1he: because it wasn't just a side-effect of the XML parser... it was actually put in explicitly in a rails commit
interactionjaxsn has joined #ruby
bradhe has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
monkegjinni has quit [Read error: Connection reset by peer]
Guest24761 has quit [Quit: leaving]
<TTilus> commit security qa level isnt necessarily that guaranteed
<JonnieCa1he> hmm wasnt it more that they forgot ot blacklist the yaml type?
monkegjinni has joined #ruby
ErsatzRyan has joined #ruby
<JonnieCa1he> or did someone specifically enable it
monkegjinni has quit [Read error: Connection reset by peer]
<workmad3> JonnieCa1he: no, in a rails 2 commit, someone *added* the yaml type and passed it onto YAML.load
shock_one has joined #ruby
monkegjinni has joined #ruby
<JonnieCa1he> that is an epic fail. but i still maintain not as epic as yaml in gemspecs, with hindsight of course :)
monkegjinni has quit [Read error: Connection reset by peer]
Uranio has joined #ruby
techhelp has quit [Quit: This computer has gone to sleep]
<workmad3> yeah, both are pretty epic fails tbh :)
monkegjinni has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
geggam has quit [Ping timeout: 260 seconds]
anonymuse has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
<workmad3> just pointing out that the XML params one wasn't quite so much a 'complex interaction of other libraries' as its been made out :)
monkegjinni has joined #ruby
<JonnieCa1he> maybe im thinking of the second vuln, which was more complex wasnt it?
monkegjinni has quit [Read error: Connection reset by peer]
<JonnieCa1he> we're up to 3 now :)
<nat_home> shevy, danneu: thanks for the exponation… I was gone at the time of the answer but I read them this morning … thanks again
<workmad3> I believe the latest was an attr_protected one, haven't looked into that one tbh
<JonnieCa1he> thats number 3
monkegjinni has joined #ruby
<JonnieCa1he> there were 2 different yaml ones iirc
yfeldblum has quit [Ping timeout: 272 seconds]
<workmad3> the second one was the xml params that allowed remote code execution
<JonnieCa1he> oh well ive patched them all so i dont care :D
monkegjinni has quit [Read error: Connection reset by peer]
<Hanmac_> sample: http://bugs.ruby-lang.org/issues/7839 << Symbol.freeze_symbols
<workmad3> yeah :) I patched the latest one even though I never use attr_protected ;)
monkegjinni has joined #ruby
<workmad3> Hanmac_: pfft, 'class String; undef to_sym; end' <-- there we go, protect most railsers :)
monkegjinni has quit [Read error: Connection reset by peer]
a_a_g has quit [Quit: Leaving.]
<Hanmac_> xD
hbpoison has quit [Ping timeout: 276 seconds]
monkegjinni has joined #ruby
geggam has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
monkegjinni has joined #ruby
mafolz has quit [Remote host closed the connection]
monkegjinni has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 248 seconds]
ErsatzRyan has left #ruby [#ruby]
nfk has quit [Quit: yawn]
monkegjinni has joined #ruby
<Hanmac_> workmad3 or allow to_sym only for untraited? && !untrusted? strings
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
<Hanmac_> symbols itself cant be untrusted :P
monkegjinni has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<workmad3> Hanmac_: that sounds more reasonable :)
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
miked has joined #ruby
banjara has joined #ruby
monkegjinni has joined #ruby
<Hanmac_> symbols cant be taited .. it seems that they are stored in "forever-ware" ;P
monkegjinni has quit [Read error: Connection reset by peer]
samphippen has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
monkegjinni has joined #ruby
havenwood has joined #ruby
skattyadz has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
peregrine81 has joined #ruby
zigomir has quit [Quit: zigomir]
JMcAfreak has quit [Remote host closed the connection]
arturaz has quit [Ping timeout: 272 seconds]
<danneu> nat_home: haha wow
monkegjinni has joined #ruby
<danneu> nat_home: we've got some real delayed communication going on :P
Vert has quit [Remote host closed the connection]
monkegjinni has quit [Read error: Connection reset by peer]
mephux has quit [Excess Flood]
Umren has joined #ruby
mikeycgto has joined #ruby
rippa has joined #ruby
monkegjinni has joined #ruby
mikeycgto has quit [Read error: Connection reset by peer]
monkegjinni has quit [Read error: Connection reset by peer]
Shadow_S has joined #ruby
monkegjinni has joined #ruby
khismetix has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
D4T has quit [Quit: Textual IRC Client: www.textualapp.com]
mephux has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
innohero has quit [Quit: Leaving]
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
ahokaomaeha has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
Guest123 has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
monkegjinni has joined #ruby
Illusioneer has left #ruby ["PONG :kornbluth.freenode.net"]
monkegjinni has quit [Read error: Connection reset by peer]
yacks has quit [Ping timeout: 240 seconds]
ryanh has joined #ruby
ryanh has quit [Max SendQ exceeded]
joshman_ has quit [Ping timeout: 256 seconds]
joshman__ has joined #ruby
monkegjinni has joined #ruby
ryanh has joined #ruby
Spooner has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
m3pow has joined #ruby
octoberry has joined #ruby
monkegjinni has joined #ruby
x82_nicole has left #ruby ["Textual IRC Client: www.textualapp.com"]
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
johnpcamara has quit [Quit: johnpcamara]
jekotia has joined #ruby
mockra has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
mockra has quit [Remote host closed the connection]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
moofy has quit [Quit: moofy]
maletor has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
vierja_ has joined #ruby
alup has quit [Quit: Leaving]
monkegjinni has joined #ruby
plantseeker2 has quit [Quit: Nettalk6 - www.ntalk.de]
ananthakumaran has joined #ruby
beneggett has joined #ruby
cparen has joined #ruby
mikepack has joined #ruby
<shevy> hey nat_home
<shevy> nat_home on IRC we all idle to power, ultimately
jgrevich has joined #ruby
vierja_ has quit [Ping timeout: 245 seconds]
<shevy> alright
<shevy> why can we not restore the default state of ruby core classes?
<shevy> class String; def bla; end; end; String.restore # def bla would be killed
sayan has joined #ruby
dallasm has left #ruby [#ruby]
hamed_r has joined #ruby
<shevy> someone explain this to me before I request an issue on bugs rubylang please :D
axl_ has quit [Quit: axl_]
hasse has joined #ruby
bradhe has joined #ruby
Xeago has joined #ruby
hoelzro is now known as hoelzro|away
<Hanmac_> shevy hm that is ineresting, i would not stop you shevy
<shevy> Hanmac_ well
miked has quit [Quit: miked]
ananthakumaran has quit [Ping timeout: 245 seconds]
<shevy> I think there must be some reason why this isn't done
<hasse> A gem adds a rake task named foobar:hello, is it possible for me to hook into that task and run something before the actual task?
warreng has joined #ruby
<Hanmac_> shevy i currently tested my rwx against ruby2 ... this on the repo does not work with 2.0 yet :/
<shevy> but alright, I'll file one
<shevy> Hanmac_ hehe
<shevy> Hanmac_ why not?
banjara has quit [Ping timeout: 252 seconds]
plantseeker has joined #ruby
buibex has joined #ruby
ahokaomaeha has quit [Read error: Connection reset by peer]
jgrevich_ has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<Hanmac_> i need to rewrite the extconf.rb because of some warnings i need to disable for C++ gems
ananthakumaran has joined #ruby
QKO_ has joined #ruby
jgrevich has quit [Ping timeout: 272 seconds]
jgrevich_ is now known as jgrevich
<Hanmac_> (and that the pkg config command does something bad with the $LDFLAGS)
ckrailo has joined #ruby
yacks has joined #ruby
QKO has quit [Ping timeout: 244 seconds]
rakaar has joined #ruby
zz_Inoperable is now known as Inoperable
pu22l3r has quit [Remote host closed the connection]
cparen has quit [Quit: cparen]
ananthakumaran has quit [Ping timeout: 252 seconds]
chrisja has joined #ruby
_bart has joined #ruby
ananthakumaran has joined #ruby
Guest__ has quit [Quit: Computer has gone to sleep.]
peteyg has joined #ruby
niklasb has quit [Ping timeout: 255 seconds]
rupee has joined #ruby
vierja_ has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
beneggett has joined #ruby
ffranz has joined #ruby
axl_ has joined #ruby
arturaz has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
vierja_ has quit [Ping timeout: 256 seconds]
havenwood has quit [Remote host closed the connection]
khismetix has joined #ruby
guiguidoc has quit [Remote host closed the connection]
ffranz has quit [Client Quit]
daniel_hinojosa has joined #ruby
Hanmac_ has quit [Ping timeout: 245 seconds]
guiocavalcanti has joined #ruby
sn0wb1rd has quit [Quit: sn0wb1rd]
uris has quit [Read error: Operation timed out]
allaire has joined #ruby
rakaar has quit [Ping timeout: 252 seconds]
mlr has joined #ruby
bricker_ is now known as bricker
graft has quit [Ping timeout: 245 seconds]
davetherat has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
main has joined #ruby
matthewrobbins has quit [Ping timeout: 248 seconds]
bean has quit [Quit: Textual IRC Client: www.textualapp.com]
oldB has joined #ruby
bluenemo has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
davetherat has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
zigomir has joined #ruby
tcstar has quit [Read error: Connection reset by peer]
chrishough has joined #ruby
oldB is now known as r4stakWhere
Xeago has quit [Ping timeout: 252 seconds]
chrishough has quit [Remote host closed the connection]
Xeago has joined #ruby
vierja_ has joined #ruby
hamed_r has quit [Quit: Leaving]
r4stakWhere has quit [Client Quit]
banjara has joined #ruby
ahokaomaeha has joined #ruby
cdt has quit [Remote host closed the connection]
alex__c2022_ has joined #ruby
Catbuntu has joined #ruby
sn0wb1rd has joined #ruby
vierja_ has quit [Ping timeout: 256 seconds]
khismetix has quit [Quit: Computer has gone to sleep.]
ozgura has quit [Ping timeout: 256 seconds]
bean has joined #ruby
Xeago has quit [Ping timeout: 272 seconds]
alex__c2022 has quit [Ping timeout: 260 seconds]
zastern_ has joined #ruby
samphippen has joined #ruby
alex__c2022_ has quit [Ping timeout: 252 seconds]
buibex has quit [Remote host closed the connection]
tcstar has joined #ruby
brjannc has quit [Ping timeout: 260 seconds]
clocKwize has quit [Quit: clocKwize]
slainer68 has quit [Remote host closed the connection]
nilobject has quit [Quit: leaving]
nilobject has joined #ruby
zastern has quit [Ping timeout: 256 seconds]
etcetera has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
brjannc has joined #ruby
zeade has joined #ruby
timonv has quit [Remote host closed the connection]
pavilionXP has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
slainer68 has joined #ruby
JumpMast3r has joined #ruby
apok has joined #ruby
rakaar has joined #ruby
Criztian has quit [Remote host closed the connection]
joeycarmello has joined #ruby
khimera has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
brianpWins has joined #ruby
danneu has quit [Ping timeout: 252 seconds]
krz has joined #ruby
ozgura has joined #ruby
djwonk has joined #ruby
dmonjo has joined #ruby
robotmay_ has quit [Ping timeout: 260 seconds]
<dmonjo> is programming ruby 1.9 a good book? i am about to buy it any better one?
ananthakumaran has quit [Quit: Leaving.]
hasse has quit [Ping timeout: 245 seconds]
zastern has joined #ruby
alex__c2022 has joined #ruby
ozgura has quit [Remote host closed the connection]
Voodoofish430 has joined #ruby
generalissimo has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
robotmay has joined #ruby
havenwood has joined #ruby
<allaire> dmonjo: This one is the only one you need: http://shop.oreilly.com/product/9780596516178.do
lusory has joined #ruby
banjara has quit [Ping timeout: 245 seconds]
francisfish has quit [Remote host closed the connection]
zastern_ has quit [Ping timeout: 255 seconds]
havenwood has quit [Read error: No route to host]
havenwood has joined #ruby
brianpWins has quit [Quit: brianpWins]
Proshot has joined #ruby
pdamer has quit [Quit: pdamer]
<dmonjo> good for starters?
Catbuntu has quit [Quit: Auf wiedersehen]
tommyvyo has joined #ruby
zigidias has quit [Ping timeout: 248 seconds]
frem has joined #ruby
Catbuntu has joined #ruby
carloslopes has joined #ruby
zigidias has joined #ruby
QKO has joined #ruby
Criztian has joined #ruby
otherj has joined #ruby
apok has quit [Quit: apok]
arya has quit [Read error: Connection reset by peer]
daniel_- has joined #ruby
arya has joined #ruby
rakaar has quit [Ping timeout: 245 seconds]
QKO_ has quit [Ping timeout: 252 seconds]
otherj has quit [Client Quit]
ner0x has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
ephemerian has quit [Quit: Leaving.]
dmerrick has quit [Quit: dmerrick]
revagomes has joined #ruby
tenmilestereo has joined #ruby
breakingthings has quit []
revagomes has left #ruby ["Falow malangragem"]
dmerrick has joined #ruby
caleb_io has joined #ruby
djwonk has quit []
carloslopes has quit [Ping timeout: 252 seconds]
radq has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
uris has joined #ruby
yekta has joined #ruby
guiocavalcanti has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
guiocavalcanti has quit [Remote host closed the connection]
pskosinski has quit [Quit: Face of Red Eclipse: http://pawelk.pl/racist-red-eclipse-quin-zeroknight-gingerbear/]
guiocavalcanti has joined #ruby
tjbiddle has joined #ruby
joshman__ has quit [Quit: Computer has gone to sleep.]
etcetera has quit []
aaronmacy has joined #ruby
allaire has quit []
beneggett has quit [Quit: Computer has gone to sleep.]
carloslopes has joined #ruby
beneggett has joined #ruby
<mr-rich> Is it possible to write a hash to a file and then read it back in as a hash in another script?
etcetera has joined #ruby
joshman_ has joined #ruby
mockra has joined #ruby
guiocavalcanti has quit [Ping timeout: 272 seconds]
vainofanskap has quit [Quit: Leaving...]
sn0wb1rd has quit [Quit: sn0wb1rd]
<GeekOnCoffee> mr-rich: convert it to json
io_syl has joined #ruby
bradleyprice has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
sn0wb1rd has joined #ruby
ananthakumaran has joined #ruby
philcrissman has quit [Remote host closed the connection]
etcetera has quit [Client Quit]
banjara has joined #ruby
ezkl has quit [Quit: out!]
brimil01 has quit [Read error: Operation timed out]
dmiller2 has joined #ruby
etcetera has joined #ruby
rakaar has joined #ruby
<mr-rich> GeekOnCoffee: Is json built in to ruby 1.9.3 or does it require a gem to be installed? I ask because I don't have access to install gems on the system ...
RobW_ has joined #ruby
<shock_one> mr-rich, it's called serialization.
Nanuq has quit [Read error: Operation timed out]
percival__ has quit [Read error: Operation timed out]
SegFaultAX has quit [Read error: Operation timed out]
dnyy has quit [Read error: Operation timed out]
tylersmith has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
robotmay_ has joined #ruby
<havenwood> mr-rich: it is included, just: require 'json'
DarkFoxDK has quit [Read error: Operation timed out]
dotemacs has quit [Read error: Operation timed out]
<Spooner> mr-rich, json is a standard lib in 1.9, gem in 1.8. You might be better mashalling it though.
seich has quit [Read error: Operation timed out]
sn0wb1rd has quit [Remote host closed the connection]
RJ3 has quit [Read error: Operation timed out]
bluehavana has quit [Read error: Operation timed out]
thejefflarson_ has quit [Read error: Operation timed out]
d2dchat has quit [Remote host closed the connection]
byped has joined #ruby
Kingy has joined #ruby
<havenwood> mr-rich: Does it matter to you if the file is human-readable?
<havenwood> mr-rich: Or readable by multiple languages?
Nanuq has joined #ruby
dnyy has joined #ruby
willob has quit [Quit: Leaving.]
banjara has quit [Read error: Connection reset by peer]
ixx has quit [Ping timeout: 264 seconds]
tylersmith has quit [Client Quit]
DarkFoxDK has joined #ruby
robotmay has quit [Ping timeout: 260 seconds]
wr has joined #ruby
<mr-rich> havenwood: just need to read it in a different ruby script as a hash ... Human readable would be nice, though ...
<RobW_> Heyo. I'm doing some work on a Sass extension, dipping into the Ruby environment with very little knowledge of Ruby. Looks like at the end of a function you assert a new value to be 'returned' with Sass::script::[type].new(value). Number, Bool, String work well for type — what would I use if I want to return an array?
dmiller2 has quit [Ping timeout: 255 seconds]
chrismcg is now known as zz_chrismcg
<Spooner> mr-rich, YAML is another option (even more readable than JSON and more Ruby-friendly, such as supporting Symbols, but slower).
<Spooner> RobW_, Probably Array ;)
seich- has joined #ruby
SegFaultAX has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
Spooner has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
<RobW_> Spooner: Ha, that's what I tried first, but got the error "NameError: uninitialized constant Sass::Script::Array". Any thoughts?
<RobW_> I don't know if it's a particularity of Sass itself, or if I'm missing important Ruby syntax.
atyz has joined #ruby
nga4 has joined #ruby
mahmoudimus has joined #ruby
tworkin has joined #ruby
nat_home has quit [Quit: Leaving.]
<shevy> hmm did you pull it in
tylersmith has joined #ruby
<shevy> does Sass in irb give you anything
<shevy> if Sass works, next question is - does Sass::Script give you anything in irb
<shevy> if Sass is inconsistent, btw, report a bug ;)
buscon has quit [Quit: Leaving]
pdamer has joined #ruby
<tworkin> hey I'm having problems with a rakefile. rake is reporting "undefined (?….) sequence' in this regex m = r.match(/(?<name>.+)\t(?<url>.+) \((?<type>.+)\)$/)
dmiller2 has joined #ruby
<tworkin> looks like im running 1.8
<RobW_> shevy: First I've heard of the interactive shell. Thanks. Looks like I'm going to have to learn a little more than I bargained for.
danneu has joined #ruby
<mr-rich> GeekOnCoffee, shock_one, havenwood, Spooner: Thank you.
<RobW_> Sass::script has plenty of parameters/methods that work, so I think Array may be a purposefull omission.
banjara has joined #ruby
<shevy> RobW_ well, irb is nothing than running live ruby code
banisterfiend has quit [Remote host closed the connection]
<shevy> you could do the same if you write this into a .rb file
<shevy> but irb is easier
warreng has left #ruby [#ruby]
<shevy> RobW_ hmm don't they have a public, documented API?
<lectrick> Is it OK if I just have some kind of weird religious problem with @@attributes and just avoid using them at all costs?
innohero_ has joined #ruby
Catbuntu has quit [Quit: Auf wiedersehen]
<lectrick> If I need that I just use class-scope regular attributes that don't inherit
<shevy> RobW_, perhaps at http://sass-lang.com/docs/yardoc/#
<havenwood> deprecate class variables imho :P
mityaz has joined #ruby
* shevy agrees with havenwood
<lectrick> havenwood: shevy: ok good, so i'm not insane (yet)
<shevy> lectrick I think I saw only two examples of where class vars might have made sense
<shevy> one was to keep track of a counter (but which project needs that really?)
<lectrick> shevy: ok so for THOSE examples, use them, otherwise no :)
<RobW_> Thanks shevy. I'll poke around, wanted to ask here first in case I was missing something simple.
<shevy> the other was some kind of toggleable open/closed state
<lectrick> shevy: i bet they both could have been reimplemented as class-level attributes
<shevy> lectrick perhaps, I am not sure yet. the last time I used them, I had a bug in one of them, and it took me an hour to find it (I was noobish back then), and when I finally found it, I had to ask myself why I was using a @@var
<RobW_> Danke Schön.
<lectrick> by which I mean something like class This; def this.something; @something; end; end
Qwak has quit []
innohero_ has quit [Client Quit]
<shevy> lectrick yeah, I think that the @@class_vars are not really 100% needed
<lectrick> shevy yeah i think they are too ambiguous to make sense.
<shevy> I want to use only what is useful
<shevy> and in the case of class variables, I just don't see them being sufficiently useful
cobragoat has joined #ruby
<lectrick> should a class hold state, that's another debate haha
<shevy> of course you could try to use them wherever you can :D
<shevy> I even confused @foo with @@foo when I was not looking carefully at my code
<lectrick> yeah for all those reasons and more I just avoid them
<shevy> lectrick hmm perhaps it should hold state if it may be useful
<aboudreault> there is no difference between File.exist and File.exists, right?
willob has joined #ruby
brandon|work has quit [Read error: Connection reset by peer]
<shevy> aboudreault yeah, no difference. one is an alias to the main
willob has quit [Max SendQ exceeded]
<shevy> but I think it is: File.exist?
<shevy> not File.exist
anderse has quit [Quit: anderse]
<aboudreault> yes that is
brianpWins has joined #ruby
brandon|work has joined #ruby
krz has quit [Quit: krz]
<shevy> matz wanted to add only one
<shevy> but people complained while he was talking hehehe
ahokaomaeha has quit [Ping timeout: 240 seconds]
<shevy> it had to do with proper english style
<shevy> "if file exists, do this"
<shevy> versus
<lectrick> well, english would ask "File exists?"
<shevy> "if file exist, do this"
<lectrick> right
<shevy> yeah lectrick
rdark has quit [Quit: leaving]
<lectrick> i don't see a problem with aliasing things like that
dmonjo has quit [Quit: Leaving]
willob has joined #ruby
<shevy> might be that matz favoured "if file exist" hehehehe
willob has quit [Max SendQ exceeded]
<shevy> lectrick yeah
<lectrick> follows the ruby philosophy
<shevy> I like aliases a lot
_nitti has quit [Remote host closed the connection]
<lectrick> although if someone wanted to override it for some reason
<lectrick> that gets kind of messy
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<shevy> but every time you use them, you allow more flexibility in an API, and this might eventually make a big API ambigous or complex
philcrissman has joined #ruby
<shevy> def foo; puts 'hi from foo'; end; alias not_foo foo; not_foo()
willob has joined #ruby
<shevy> usually they override it by using alias_method to keep a reference to the old version
willob has quit [Max SendQ exceeded]
dmiller2 has quit [Ping timeout: 252 seconds]
<lectrick> shevy: yeah
<shevy> there is some ruby GUI toolkit that uses something like
<shevy> def test_widget
brandon|work has quit [Read error: Connection reset by peer]
willob has joined #ruby
sn0wb1rd has joined #ruby
<shevy> alias TestWidget test_widget
willob has quit [Max SendQ exceeded]
<lectrick> I have a question, if I alias a method that is actually defined on a superclass, is the alias only defined on the subclass?
<shevy> or something like that, I am not sure... is it ruby tk?
mrsolo has joined #ruby
<shevy> lectrick haha good question... hmmmmm I would think so
brandon|work has joined #ruby
<shevy> no wait
Kingy has quit [Ping timeout: 244 seconds]
<shevy> if you extend the superclass, all child classes should have it
<lectrick> also what is the best way to define method_missing but not mess with the root method_missing?
<shevy> you could define it within a class, or?
willob has joined #ruby
<lectrick> shevy: what I want to do is take SOME method_missings and then call super on the rest, I guess
radq has quit [Remote host closed the connection]
<shevy> class Foo; def method_missing(i); puts 'hi from '+i.to_s; end; end; Foo.new.kasdjl # hi from kasdjl
<lectrick> (and yes I know I should also define respond_to? also)
jpinnix has joined #ruby
<shevy> ah I see
<shevy> so you want to intercept some missing methods, not all
jpinnix has left #ruby [#ruby]
<lectrick> yes and pass the rest up
decoponio has quit [Quit: Leaving...]
<lectrick> but is there a main "method_missing" defined that I can even super to?
<shevy> hmmm
<lectrick> or do I jus raise at that point?
<shevy> not sure, it should work on the specific class
<shevy> and if you call super() inside method_missing, I would assume it sends it to the parent class
<shevy> def method_missing(method_name, *args, &block)
hybris has quit [Quit: Leaving]
tomask has joined #ruby
<shevy> puts "There is no method called #{method_name} here -- please try again."
<shevy> end
mattinahat has joined #ruby
<shevy> try it in a simple class
<lectrick> yeah i will experiment ty
<shevy> and probably with respond_to? or something, then super()
stkowski has joined #ruby
<shevy> I never tried :)
<shevy> a cool thing is that you can dynamically define new methods
Catbuntu has joined #ruby
<shevy> def method_missing
banisterfiend has joined #ruby
ozgura has joined #ruby
<shevy> define_method(:bla)
freakazoid0223 has quit [Quit: Leaving]
Shadow_S has quit [Quit: Textual IRC Client: www.textualapp.com]
willob has quit [Quit: Leaving.]
<mattinahat> I'm working on a script, and everything works fine most of the time. However, sometimes I get this error: https://gist.github.com/daswolle/e336bae0cc3e66c35924 and I have no idea why. Does anyone have an idea why it would say undefined method sometimes?
nfk has joined #ruby
willob has joined #ruby
willob has quit [Max SendQ exceeded]
<shock_one> mattinahat, you better gist the script
DuoSRX has quit [Remote host closed the connection]
<mattinahat> ok
adeponte has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
radq has joined #ruby
willob has joined #ruby
willob has quit [Max SendQ exceeded]
filipe has quit [Remote host closed the connection]
graft has quit [Read error: Operation timed out]
willob has joined #ruby
wr has quit [Ping timeout: 272 seconds]
willob has quit [Max SendQ exceeded]
QKO_ has joined #ruby
Al___ has quit [Quit: Al___]
graft has joined #ruby
<mattinahat> I'm parsing some information from emails both in the body and as attachments.
willob has joined #ruby
monkegji_ has joined #ruby
<mattinahat> It pulls the information from outlook web access and clicks buttonos with watir.
mlr has left #ruby [#ruby]
<mattinahat> buttons*
QKO has quit [Ping timeout: 256 seconds]
tommyvyo has joined #ruby
<havenwood> mattinahat: Is it maybe matching /Sex:.*/ to "Sex: "? Same problem with /Sex: .*/?
gg4 has quit []
mlr has joined #ruby
<Agis__> h
Agis__ is now known as popper
anonymuse has quit [Quit: Leaving...]
interactionjaxsn has joined #ruby
SCommette has quit [Quit: SCommette]
<mattinahat> havenwood: It should match "Sex: " because that field showed up in either 2 locations, I just checked if the header was present before actually storing the data of M, F, or P.
<shock_one> mattinahat, a[25].match(/^.*?:\s([MFP])/)[1] When it doesn' match, the match method returns nil. And you call [] on it
yekta has quit [Quit: yekta]
<mattinahat> Ah
dhruvasagar has joined #ruby
<mattinahat> I made a poor assumption then. I assumed if it found the header, then I would be able to match.
<graft> mattinahat: use a block
<shock_one> mattinahat, never trust user data
<graft> a[25].match() { |m| ... }
sayan has quit [Ping timeout: 240 seconds]
yacks has quit [Quit: Leaving]
vierja has joined #ruby
ahokaomaeha has joined #ruby
colonolGron has joined #ruby
<mattinahat> shock_one: ya, that's what I've been starting to see.
d2dchat has joined #ruby
<mattinahat> graft: could you point me to more info on that? I'm a bit new to ruby
generalissimo has quit [Remote host closed the connection]
cipherX123 has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
slainer68 has quit [Remote host closed the connection]
<cipherX123> Programming Ruby 1.9 book Vs The Ruby Programming Language book? which is better for beginners?
<popper> is any1 here familiar with how the GC in mri does mark-n-sweep? i'm particularly having trouble understanding the free list and the "next" pointer
<mattinahat> havenwood, shock_one, graft: Thanks for the help!
Rizzle has joined #ruby
<shock_one> mattinahat, no problem
chussenot has quit [Quit: chussenot]
vierja has quit [Ping timeout: 256 seconds]
radq has quit [Remote host closed the connection]
chussenot has joined #ruby
d2dchat has quit [Remote host closed the connection]
a_a_g has joined #ruby
wr has joined #ruby
Rizzle has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby
<cipherX123> better to develop code in a text editior or an ide for begineers?
<mattinahat> graft: Great, thanks!
<fflush> salut bonjour
d2dchat has joined #ruby
ananthakumaran has joined #ruby
<mattinahat> cipherX123: read both?
<fflush> cipherX123: essayer vim svp
<mr-rich> Ok, I'm writing a hash to a file using YAML and trying to read it back in to a hash. It writes fine, but when I read, all I get is the last line of the file. Any ideas?
Rizzle has joined #ruby
<cipherX123> mattinahat: i will read both but i need to start with one
<cipherX123> Programming Ruby 1.9 book Vs The Ruby Programming Language book
SCommette has joined #ruby
<shock_one> mr-rich, we need the code
<mr-rich> shock_one: reading/writing or both?
<mattinahat> cipherX123: I'm biased to O'Reilly, so I would read The Ruby Programming Language first
<shock_one> mr-rich, reading, if writing works correct.
davetherat has quit [Remote host closed the connection]
Elhu has joined #ruby
davetherat has joined #ruby
khismetix has joined #ruby
<mr-rich> shock_one: gimme a min ...
huoxito has joined #ruby
banisterfiend has quit [Remote host closed the connection]
maxmanders has quit [Ping timeout: 256 seconds]
aantix has joined #ruby
robotmay_ has quit [Remote host closed the connection]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
ShellFu has joined #ruby
nat_home has joined #ruby
maxmanders has joined #ruby
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<mr-rich> shock_one: www.paste.org/61360
<ShellFu> so I have 2 hashes. >h1 = { "hello" => "world", "foo" => nil }< and >h2 = { "hello" => "world", "foo" => "bar" }< Im trying to use merge! but am getting error >`merge': can't convert nil into Hash (TypeError)< I tried testing the value in the merge block, but I dont think it gets to that point. Any advice would be appreciated.
poikon has quit [Remote host closed the connection]
maxmande_ has joined #ruby
<shock_one> ShellFu, gist the code
wr has quit [Ping timeout: 252 seconds]
apoch632 has quit [Remote host closed the connection]
<ShellFu> ill just the two actual hashes
<ShellFu> gist
<mr-rich> shock_one: wtf? Worked for me ... I can't get to pastbin.com on my company laptop, so I use paste.org ...
maxmanders has quit [Ping timeout: 252 seconds]
ananthakumaran has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
RobW_ has left #ruby [#ruby]
beneggett has quit [Quit: Computer has gone to sleep.]
jrajav has joined #ruby
freakazoid0223 has joined #ruby
<shock_one> ShellFu, debug r and c right before this line. One of them is nel
<shock_one> nel -> nil
vierja has joined #ruby
<shock_one> mr-rich, gist
bigkevmcd has quit [Read error: No route to host]
<cipherX123> which books did you guys read
davetherat has quit [Remote host closed the connection]
<shock_one> cipherX123, all english books on the market
bigkevmcd has joined #ruby
<ShellFu> r is hash contains the nil value. Id like to take that value and give it "" or something so merge can append the value of c
miked has joined #ruby
c0rn has joined #ruby
<ShellFu> not sure where to address that. Was trying to do it in the merge block.
<ShellFu> basically id like to avoid another hash iteration
joshman_ has joined #ruby
banisterfiend has joined #ruby
davetherat has joined #ruby
BRMatt has quit [Quit: Leaving]
<shock_one> ShellFu, is r.class a 'Hash'?
Kingy has joined #ruby
d2dchat has quit [Remote host closed the connection]
<ShellFu> shock_one, Yes this is r >{"class2"=> {"key1"=>"value1"}>, "class3"=>nil}><
cipherX123 has quit [Quit: Leaving]
<shock_one> ShellFu, what about c?
ahokaomaeha has quit [Ping timeout: 252 seconds]
<mr-rich> shock_one: gist doesn't play well with IE ... :(
khismetix has quit [Quit: Computer has gone to sleep.]
buibex has joined #ruby
<ShellFu> shock_one, This is c >{"class3"=>{"key"=>"value"}}<
<shock_one> ShellFu, in this case merge should work
<ShellFu> it doesnt like the nil value in r
graft has quit [Ping timeout: 255 seconds]
wr has joined #ruby
<banisterfiend> shock_one: what does your nickname mean
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
BizarreCake has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
stormetrooper has quit [Quit: brunch]
browndawg has quit [Quit: Leaving.]
<shock_one> banisterfiend, nothing. When I was in 7th grade, I have found in some magazine a guy, who paint things on the walls (it was a popular theme these days), with a similar nickname. It looked very cool back then.
beiter has quit [Quit: beiter]
beardyjay has quit [Ping timeout: 255 seconds]
<mr-rich> shock_one: Long story short: Company laptop running XP/IE 7. gist doesn't play well with IE. Try this one: http://codepaste.net/fartbs
grieve has joined #ruby
fflush has quit []
cpx_ has quit [Remote host closed the connection]
tworkin has left #ruby [#ruby]
mengu_ has quit [Changing host]
mengu_ has joined #ruby
Es0teric has joined #ruby
alex__c2022 has quit [Read error: Connection reset by peer]
<quatar2> Hello! Need some beginner help. i get this : undefined local variable or method ’my’ for main:Object (NameError) here is the code https://gist.github.com/anonymous/4947309
alex__c2022 has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<quatar2> pretty please, wanna get to the next stage in my learnig process, getting tired of beeing a newbie! :-)
albakry has joined #ruby
albakry has quit [Changing host]
albakry has joined #ruby
timonv has quit [Remote host closed the connection]
<mr-rich> quatar2: you have my.book instead of my_book on line 15 ...
Xeago has joined #ruby
<quatar2> ahh thanks! my fault! Should have looked more closley, im lazy i suppose! :-) but now im gonna watch closer next time! Thanx alot!
octoberry has quit [Ping timeout: 272 seconds]
mattinahat has quit [Quit: Page closed]
<mr-rich> shock_one: did that paste link work?
miked has quit [Quit: miked]
d2dchat has joined #ruby
<shock_one> yes, but everything looks fine
adman65 has quit [Read error: Connection reset by peer]
<shock_one> mr-rich, what is the ooga after assignment?
QKO_ has quit [Read error: Operation timed out]
elico has joined #ruby
Xeago has quit [Remote host closed the connection]
QKO has joined #ruby
a_a_g has quit [Quit: Leaving.]
<mr-rich> shock_one: which line in the paste?
ssvo has joined #ruby
<shock_one> mr-rich, there are no lines, but last before Smaple ...
<shock_one> *no lines numbers
ananthakumaran has quit [Quit: Leaving.]
ryanh has quit [Quit: Computer has gone to sleep.]
dmiller2 has joined #ruby
<shock_one> by the way, save it with .yaml extension
<mr-rich> shock_one: the first ooga is initializing a hash. The seconed is reading the YAML file into the ooga hash ...
alup has joined #ruby
ryanf has joined #ruby
<shock_one> I know. What is it content? do «p ooga»
popper has quit [Quit: popper]
apok has joined #ruby
<mehwork> if everything in ruby is an object, why can't i do h.foo instead of h[:foo]?
chichou has quit [Remote host closed the connection]
<Mon_Ouie> Because the Hash class doesn't have a #foo method
<shock_one> mehwork, you can if you want
Elhu has quit [Quit: Computer has gone to sleep.]
<mr-rich> shock_one: after that, I tried pp ooga and all I get is the last line of the YAML file ... even tried doing a pp on the YAML.load and got the same thing ...
<Mon_Ouie> It has a #[] method which allows to retrieve the item for a key
<mehwork> shock_one: how? h.foo = h[:foo] ?
razibog has quit [Ping timeout: 245 seconds]
<mehwork> Mon_Ouie: i see
jerius has quit [Ping timeout: 260 seconds]
<shock_one> mehwork, method_missing
_nitti has joined #ruby
<mehwork> so i could just monkey patch Hash?
<mehwork> oh
<mehwork> like an magic setter?
<shock_one> mehwork, but you shouldn't
<mehwork> rails seems to do this somehow so i wanted to see if i could do it in ruby in general
jerius has joined #ruby
chussenot has quit [Quit: chussenot]
dmiller2 has quit [Ping timeout: 245 seconds]
shevy has quit [Ping timeout: 256 seconds]
<quatar2> im getting this instead <main> : private method ’turn_page’ called for #<Book:0x007f95b984d . And this time ive looked cloesly, but im problebly blind, can you help me? https://gist.github.com/anonymous/4947420
artOfWar_ has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
tobor_one has joined #ruby
drumsrgr8forn8 has joined #ruby
cpruitt has joined #ruby
<Mon_Ouie> OpenStruct is a class that's like a hash but dynamically defines new methods for setting/getting keys
ryanh has joined #ruby
Matip has quit [Quit: Leaving]
_nitti has quit [Ping timeout: 252 seconds]
<cpruitt> If there's a better channel for this please forgive me. I seem to suddenly be unable to run 'bundle update'. I get a "Fetching gem metadata from https://rubygems.org/.………" then another "Fetching gem metadata from https://rubygems.org/.." at which point network activity stops and ruby spikes my processor. Anyone have any thoughts? Anything with the recent ruby gems hubbub causing me a problem?
m3pow has quit [Remote host closed the connection]
chichou has joined #ruby
<mr-rich> shock_one: I see. Anything odd about the sample of the YAML file?
maxmande_ has quit [Quit: Computer has gone to sleep.]
cipasd has joined #ruby
<cipasd> hi guys
grieve has quit []
<mr-rich> shock_one: i don't see any curly brackets in that file ...
<cipasd> any ide that provides autocompletion of the methods?
<shock_one> mr-rich, yes, it doesn't look like just YAML keys-values
carraroj has quit [Quit: Konversation terminated!]
<shock_one> cipasd, the best one is RubyMine, hands down
<mr-rich> shock_one: anyway to correct that?
mark_locklear has quit [Ping timeout: 272 seconds]
anderse has joined #ruby
banjara has quit [Quit: Leaving.]
<mr-rich> shock_one: seems to be writing all kinds of extrainious information that I don't need ...
banjara has joined #ruby
<shock_one> mr-rich, I don't know. Try to correct the file manually, and then read it to see if it will help
cipasd has quit [Client Quit]
<mr-rich> shock_one: can you dump the yaml file that was created in your code?
joofsh has quit [Remote host closed the connection]
joofsh has joined #ruby
etcetera has quit []
maxmanders has joined #ruby
elux has joined #ruby
<mr-rich> shock_one: thanks so far. I think I know what the problem is. I'm getting data via SOAP and I think that is setting all kinds of esoteric data types that YAML can't seem to import back in ... I'll try cleaning up the data a bit ...
<shock_one> mr-rich, no problem
shevy has joined #ruby
aces1up has joined #ruby
<aces1up> can someone help me with this bit of code? Trying to sort one array by another array..
banisterfiend has quit [Read error: Connection reset by peer]
elaptics is now known as elaptics`away
banisterfiend has joined #ruby
aedorn has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
pskosinski has joined #ruby
etcetera has joined #ruby
ephemerian has joined #ruby
<shock_one> functions.sort!{ |f1, f2| run_order.index(f1) <=> run_order.index(f2) }
<shock_one> aces1up, I'm not sure it works as is.
<banisterfiend> shock_one: use sort_by instead maybe
<Mon_Ouie> the sort_by! version would normally be more efficient
<banisterfiend> shock_one: functions.sort_by { |v| run_order.index(v) }
angusiguess has joined #ruby
<shock_one> aces1up, yes, banisterfiend suggested a better version.
etcetera has quit [Client Quit]
<banisterfiend> Mon_Ouie: did you see the crazy new APIs MRI 2.0 supports? this is just a wrapper for it https://github.com/banister/debug_inspector
<Mon_Ouie> Nope
etcetera has joined #ruby
slainer68 has joined #ruby
__BigO__ has quit [Remote host closed the connection]
<aces1up> banisterfiend if i need to reference the assigned_to attribute to match inside the functions array would it be functions.sort_by{|v| v.assigned_to == run_order.index(v) }
pyrac has quit [Quit: pyrac]
<banisterfiend> aces1up: i dont think that's what u want to do
<banisterfiend> that would sort_by boolean true/false values according to that condition
<banisterfiend> bbl
icole has joined #ruby
cableray has joined #ruby
chichou has quit [Remote host closed the connection]
<Mon_Ouie> .index(v.assigned_to)
__BigO__ has joined #ruby
<aces1up> functions is an array of objects where as run_order is an array of symbols didn't think you could compare that way.
nicoulaj has joined #ruby
<shock_one> aces1up, describe what do you want to achieve in the end.
Elhu has joined #ruby
<aces1up> run_order = [:funct1, funct2], so functions should == [funct_obj.assigned_to == :funct1, funct_obj.assigned_to == :funct2 ]
m3pow has joined #ruby
<shock_one> it would be reduced to [true, true], for example
<aces1up> shock_one that make snese?
<Mon_Ouie> shock_one: I believe he means [the funct object for which assigned_to is :funct1, etc.]
<shock_one> aces1up, I wanted you to describe your task at more abstract level.
<aces1up> Mon_Ouie exactly yes.
<shock_one> after sorting you can map an array
sailias has quit [Ping timeout: 272 seconds]
pyrac has joined #ruby
jphpsf has quit [Ping timeout: 276 seconds]
<shock_one> I would write the code, but your Functions class' constructor doens't take any arguments
workmad3 has quit [Ping timeout: 252 seconds]
monkegji_ has quit [Read error: Connection reset by peer]
bluehavana has joined #ruby
ngoldman has quit [Remote host closed the connection]
percival__ has joined #ruby
<shock_one> functions.sort_by!{ |v| run_order.index(v) }.map!{ |v| Functions.new(v) }
<_bart> Regexp problem, how do I select everything until \n\n (two newlines in a row)
goganchic has joined #ruby
<shock_one> [^(\n){2}]
thejefflarson_ has joined #ruby
RJ3 has joined #ruby
<_bart> shock_one: ah elegant, thanks!
<_bart> shock_one: I mean an appearance of \n\n, not just two rows
<shock_one> _bart, doesn't it work?
_nitti has joined #ruby
<_bart> shock_one: it stops after passing just two single \n's
hbpoison has quit [Ping timeout: 252 seconds]
albakry has quit [Ping timeout: 260 seconds]
<shock_one> _bart, give me test string
josh_keith has quit [Ping timeout: 256 seconds]
monkegji_ has joined #ruby
<Mon_Ouie> /(.+?)\n\n/
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
<Mon_Ouie> (The interrogation mark is to make it non greedy; see what it matches on a string like "foo\n\nbar\n\n")
<mr-rich> shock_one: That was it! Converted everything to standard strings and it works!
nomenkun has joined #ruby
<Mon_Ouie> Might as well be .*? even
Uranio has quit [Quit: while you reading this, a kitty dies]
Morkel_ has joined #ruby
ryanf has quit [Read error: Connection reset by peer]
elico has quit [Ping timeout: 252 seconds]
dmiller2 has joined #ruby
autojack has joined #ruby
jphpsf has joined #ruby
Morkel has quit [Read error: Connection reset by peer]
Morkel_ is now known as Morkel
axl_ has quit [Read error: Operation timed out]
<_bart> Why does the regexp . not pass a newline? :/
elico has joined #ruby
ryanf has joined #ruby
<shock_one> _bart, you want a m option after regexp
axl_ has joined #ruby
<Mon_Ouie> Yeah, forgot about that
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
<autojack> asking out of curiosity: when we run the specs for one of our projects, the ruby process consumes upwards of 1.3G of RAM on 64 bit boxes, and around 800M on 32 bit ones. why the difference? using the same version of ruby compiled in rbenv with the same build options. (I am aware that there is something horribly wrong with these specs to be using that much RAM :)
robotmay has joined #ruby
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
<autojack> I suppose I should specify: Linux.
Lubinski has joined #ruby
<shock_one> autojack, because some data structures on x64 (like pointers and ints ) take more memory
timonv has joined #ruby
<autojack> I figured it was something like that.
skogis has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
mahmoudi_ has joined #ruby
<shock_one> autojack, You're lucky you don't know that. Some people can answer without a calculator how much is 2^32
dmiller2 has quit [Ping timeout: 244 seconds]
<autojack> heh
rakaar has quit [Ping timeout: 256 seconds]
robotmay_ has joined #ruby
QKO has quit [Read error: Operation timed out]
<aedorn> Trying to figure out why that's lucky ... hmmm never had to worry about unsigned integers?
mahmoudimus has quit [Ping timeout: 272 seconds]
tomask has quit [Quit: Išeinu]
Aristata has joined #ruby
robotmay has quit [Ping timeout: 256 seconds]
josh_keith has joined #ruby
<shock_one> aedorn, integers overflow is only a tip of the iceberg. It means he never worked with pointers.
Cooler_ has joined #ruby
Cooler_ has quit [Remote host closed the connection]
caleb_io has quit [Quit: caleb_io]
<CrazyDog_> tomorrow I'm alone with ruby
pavilionXP has joined #ruby
skattyadz has quit [Quit: skattyadz]
griffindy has joined #ruby
<Aristata> Ok guys, I need some advice. I have some information that needs to be displayed, a number of lists if you will. One list may be something like a, b, and c, while another may be something like a, b, c, and d. What I want to do, is make it so I am only ever showing the longest common list, so in that case it would be a, b, c, d. I basically need to take all my lists, and reject the ones that are contained by a more specific (read: longer) list. Anyone have any
<autojack> don't do anything dirty.
<aedorn> oh.. hmm. I miss pointer arithmetic.
QKO has joined #ruby
mengu_ has quit [Quit: Konversation terminated!]
<shock_one> Aristata, Do you want to take the longest list? array_of_lists.group_by(&:size).max.first
mercwithamouth has quit [Remote host closed the connection]
timonv has quit [Read error: Connection reset by peer]
elico has quit [Remote host closed the connection]
timonv has joined #ruby
beneggett has joined #ruby
ddv has quit [Changing host]
ddv has joined #ruby
<shock_one> Aristata, oh, got it. Do your lists contain unique elements?
IceDragon has joined #ruby
<Aristata> Sorry one second!
ngoldman has joined #ruby
zerba has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
autojack has left #ruby [#ruby]
skattyadz has joined #ruby
<Aristata> shock_one: Well, the final element of each list will always be unique, but thats all
benlieb has joined #ruby
<Aristata> shock_one: i will have things like: [a, b, c] and [a b c d], and [f, g h], [f]
vierja has quit [Ping timeout: 244 seconds]
<Aristata> So in those my result would be [a b c d] and [f g h]
<Aristata> If that make any sense!
<shock_one> Aristata, it is. You need to reject subsets.
<Aristata> Right
<Aristata> Is there an easy method for that I have just overlooked?
<shock_one> Does [b,a,c] count as subset of [a,b,c,d]?
mercwithamouth has joined #ruby
<Aristata> These will always appear in the same order, but in the event that they are out of order no they should not count
<shock_one> Aristata, no, there is no ready-made solution
SeanLazer has quit [Read error: Connection reset by peer]
punkrawkR^Home has joined #ruby
<shock_one> Aristata, I woul'd be much easier if there couldn't be [a,a,b]
<danneu> for some reason i can't tell waht you're trying to do. inputs: [a b c] [a b c d] [f g h] [f] ... output: [a b c d] [f g h] ?
SeanLazer has joined #ruby
Catbuntu has quit [Quit: Aranda56> Spanish music is the best ← LOLOL.]
JMcAfreak has joined #ruby
vierja has joined #ruby
beneggett has quit [Read error: Operation timed out]
<Aristata> shock_one: There will never be an a, a, b, (the items in the list are parent child relationships)
<shock_one> danneu, For each array, if there is a superset of it, then reject, otherwise select.
<Aristata> [parent > child > child > child ]
arya_ has joined #ruby
miked__ has joined #ruby
<Aristata> Correct
<shock_one> Aristata, so, in a single array all elements are unique?
<Aristata> Yup!
DrShoggoth has joined #ruby
<shock_one> Aristata, hold on.
<shock_one> Aristata, what if there is [a,b,c] and [a,b,c]
jpinnix has joined #ruby
<Aristata> That should never be possible either, however, in the event that does happen, it wouldn't matter, pick one and discard the other
sailias has joined #ruby
jpinnix has quit [Client Quit]
yopp has joined #ruby
arya has quit [Ping timeout: 248 seconds]
evenix_ is now known as evenix
beneggett has joined #ruby
<danneu> still dont understand the above input/output example, but you could intersect arrays ([a b] & [a b c]) #=> [a b] and then take the longest?
yopp has quit [Quit: yopp]
maxmanders has joined #ruby
kstephens has quit [Read error: Connection reset by peer]
xemu2 has joined #ruby
joshman_ has quit [Ping timeout: 244 seconds]
xemu has quit [Ping timeout: 272 seconds]
benlieb has quit [Quit: benlieb]
ngoldman has quit [Ping timeout: 240 seconds]
kstephens has joined #ruby
__BigO__ has quit [Remote host closed the connection]
mlr is now known as list
chussenot has joined #ruby
<TTilus> explaining the usecase would prolly help :)
list is now known as mlr
joshman_ has joined #ruby
fedza has quit [Ping timeout: 248 seconds]
kold has joined #ruby
ixx has joined #ruby
<Aristata> Well the use case is such: a user can select these "labels" and each label is either a child or a root of a tree of labels. On selecting a label, I am associating the parents all the way up
__BigO__ has joined #ruby
ixx is now known as Guest39035
objectivemo_ has joined #ruby
<Aristata> now if a has two children c and d I want to display something like this
<Aristata> a > c
<Aristata> a > d
sailias has quit [Quit: Leaving.]
<Aristata> I don't know if that makes a hell of a lot of sense
<Aristata> :/
objectivemo has quit [Ping timeout: 260 seconds]
objectivemo_ is now known as objectivemo
swarley| has joined #ruby
rmartin has quit [Remote host closed the connection]
macmartine has joined #ruby
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
<shevy> Aristata what does this mean, display
Villadelfia has quit [Ping timeout: 246 seconds]
Hanmac_ has joined #ruby
drumsrgr8forn8 has quit [Quit: WeeChat 0.3.9.2]
<mcatch> a hash perhaps? {a: [c,d], b: [a,e]}
Joelk has joined #ruby
SeySayux has quit [Ping timeout: 248 seconds]
JustinAiken has joined #ruby
<Aristata> shock_one: You are a life saver
_bart has quit [Ping timeout: 272 seconds]
<shock_one> I have read somewhere there is a method strict_superset, but I can't remember the exact name. Or is it some ActiveSupport extension?
<Aristata> This is going to work perfectly
<Aristata> I can't thank you enough
<Joelk> http://pastebin.com/nuPtifj2 - Thoughts on why I'm getting this error? If I run it by hand it works, in the failing situation it's being called by bundler, maybe order of something being installed?
<shock_one> Aristata, it's not elegant enough for me :)
<JustinAiken> If you have a string, such as "#<File:0xa3ad43c>", is there a way to the the File instance out of it?
<Aristata> shock_one: It's elegant enough for me to get this stuff up and running for my client, I can pretty it up next iteration if need be!
moofy has joined #ruby
swarley| has quit [Ping timeout: 276 seconds]
SeySayux has joined #ruby
<moofy> Hi. How would i go about searching through a file for a regular expression and returning only those strings that match?
<moofy> i tried this => https://gist.github.com/iNerdier/4948210 but it's very wrong.
griffindy has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
crazymykl has joined #ruby
rheoli has joined #ruby
thufir_ has joined #ruby
goganchic has quit []
<shock_one> moofy, what's wrong with it except hardcoding and not closing the file?
DuoSRX has joined #ruby
Jackneill has quit [Remote host closed the connection]
hbpoison has joined #ruby
tenmilestereo has quit [Quit: Leaving]
miked__ has quit [Quit: miked__]
<moofy> its just printing everything
<moofy> not just the uppercase word
Villadelfia has joined #ruby
bawigga has joined #ruby
mercwithamouth has joined #ruby
<shock_one> moofy, actually, you should replace open with readlines, if you have each word on the separate line. It will close the file automatically and also it returns array of strings instead of file
atyz has quit [Quit: Leaving...]
dmonjo has joined #ruby
martin_work has joined #ruby
<Hanmac_> moofy why not using File.foreach ??
<dmonjo> does ruby 1.9.3 install on rubymine 3.2.4?
sayan has quit [Ping timeout: 276 seconds]
mephux has quit [Excess Flood]
willob has quit [Quit: Leaving.]
khismetix has joined #ruby
<moofy> I'm very new at this. so uhh, mainly because i didn't know it existed.
carloslopes has quit [Remote host closed the connection]
ryanf has quit [Read error: Connection reset by peer]
<Hanmac_> in ruby you have a function for mostly everything :P
ryanf has joined #ruby
<moofy> uhm, readlines gives nothing at all
mephux has joined #ruby
<martin_work> hey all, whats the best way in 1.8.5 to sort a hash by its keys numerically, The keys are strings.
twoism has joined #ruby
mahmoudi_ is now known as mahmoudimus
<shock_one> moofy, foreach is better for your purposes, because it doesn't create an array.
<Hanmac_> martin_work update to newer ruby .... 1.8.5 dead for very long time
<moofy> okay.
<martin_work> yea, i wish
<moofy> the text is mostly like this
<moofy> pietr0, n. An advance agent of the reaper whose name is Indigestion.
<moofy> sigh. it's grabling.
arturaz has quit [Remote host closed the connection]
<moofy> pietr0, n Something blah blah blah….
<moofy> hmm. autonick -_
<moofy> PIE.
<martin_work> this is to output a yaml file.
ryanf has quit [Read error: Connection reset by peer]
<shock_one> martin_work, doesn't it work? http://stackoverflow.com/a/4339596/1149074
chussenot has quit [Quit: chussenot]
pyrac has quit [Quit: pyrac]
<aedorn> moofy: wait, so you only want it to print the word, not he whole line?
<havenwood> martin_work: You are stuck on Ruby 1.8.5??
<martin_work> yea :(
ryanf has joined #ruby
<Hanmac_> its like stuck in the Dark Age :P
<moofy> yeah
<moofy> just the word.
<havenwood> 1.8 End-of-Life in June, no more security updates. Time to 1.9!
<moofy> trying to split it up. so I can have the word and the text separately.
<aedorn> moofy: Okay, the problem is you aren't modifying words, you're just displaying the string if the string matches the regex
<martin_work> my laptops 1.9.3 if that makes ya feel any better.
<havenwood> martin_work: whew!
rheoli has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> Speaking of Ruby versions, ruby-2.0.0-rc1 could use a bump in the title to ruby-2.0.0-rc2
<havenwood> #ruby /title I mean
JustinAiken has left #ruby [#ruby]
<dmonjo> 1.9.3 is the latest stable right havenwood ?
<havenwood> dmonjo: 1.9.3-p385
QKO_ has joined #ruby
<havenwood> dmonjo: yup
<dmonjo> does ruby 1.9.3 install on rubymine 3.2.4?
<martin_work> havenwood we use the stock centos ruby, if there was a major security issue, I'm pretty sure redhat would back port.
<martin_work> though cents 5 is EOL pretty soon also :(
<dmonjo> will autocompletion for example work?
<dmonjo> with the new fucnitons
<Hanmac_> "Centos - software from the last century"
ngoldman has joined #ruby
QKO has quit [Ping timeout: 240 seconds]
willob has joined #ruby
<moofy> uhm so i have to use gsub to cut out the matching word?
maxmanders has quit [Ping timeout: 255 seconds]
<shock_one> moofy, which words do you want to display?
* Hanmac_ find it very funny when people think that they can get autocompletion on an extrem dynamic language like ruby :D
<shock_one> moofy, what is the format of your dictionary?
<Hanmac_> "Centos - Older than the Wheel and the Fire"
c0rn has joined #ruby
<havenwood> Stable Ruby 2.0.0 and RubyGems 2.0.0 just a couple weeks away! :)
<oz> :)
<aedorn> I can't wait to update to stable Ruby 2.0 and have all of these scripts break!
freakazoid0223 has quit [Quit: Leaving]
<aedorn> (okay, only two of them will break)
toekutr has joined #ruby
kold has quit [Remote host closed the connection]
<moofy> it's all
senj has joined #ruby
senj has quit [Remote host closed the connection]
<moofy> UPPERCASE, lowercase text here.
<moofy> i want to split them up.
<Hanmac_> hm there are still some little bugs in ruby 2.0 ... so i dont know if they can get them fixed ...
maxmanders has joined #ruby
alex__c2022_ has joined #ruby
<shock_one> You need to display UPPERCASE part of every word or select them somehow?
<banisterfiend> Hanmac_: what bugs did u find hannmaccy
<moofy> I'm just trying to display them right now to see if i got the right bit.
<Hanmac_> banisterfiend last time i had a problem that it does not build mathn/rational and mathn/complex ... so i need to call the extconf itself
<aedorn> moofy: perhaps .split will suit your needs better: words.split(', ', 2) where 0 will be your word, and 1 will be your definition
<banisterfiend> Hanmac_: have you tried that on rc2?
<shock_one> moofy, File.foreach( "dictionary.txt" ) { |word| puts word.match(/\A([A-Z]+)/)[0] }
<Hanmac_> banisterfiend then the pkg_config command in mkmf reakts different, for some reason they destroy the $LDFLAGS variable (so it does break my app)
alex__c2022 has quit [Ping timeout: 252 seconds]
<Hanmac_> baniserfiend: nightly build
<aedorn> assuming your text file is formatted the same way
alex__c2022__ has joined #ruby
alex__c2022_ has quit [Read error: Connection reset by peer]
<dmonjo> anyone uses vim for coding ruby?
<dmonjo> what is their feedback
<moofy> hmm
dhruvasagar has quit [Ping timeout: 252 seconds]
<havenwood> dmonjo: macvim is a popular option
dustint_ has joined #ruby
<danneu> dmonjo: vim is da mutt's nuts!
<moofy> that gives me a no method error
<dmonjo> i am using linuxmint
<danneu> dmonjo: type 'vimtutor' into a terminal.
<dmonjo> danneu: whats a mutt;s nuts
<Hanmac_> banisterfiend: what does [[1,2],[3,4]].map {||**v| v} returns on your newest ruby you have?
dustint has quit [Ping timeout: 248 seconds]
<havenwood> dmonjo: Yeah, vim is popular with Ruby. But also emacs, TM2, ST2, etc.
geekbri has quit [Remote host closed the connection]
<Hanmac_> banisterfiend: i mean [[1,2],[3,4]].map {|**v| v}
<aedorn> I use sublime text 2 purely because of smooth scrolling. It's vain.
<moofy> oh wait i'm silly.
<moofy> aha.
<moofy> why does one need the md[0] there?
<dmonjo> big difference between vi and vim?
<shock_one> in case the line doesn't match
<shock_one> dmonjo, very
_bart has joined #ruby
<dmonjo> coz mainly i use vi never tried vim
chussenot has joined #ruby
<shock_one> dmonjo, http://stackoverflow.com/questions/1159206/difference-between-vi-vim visual mode, syntax highlighting
<shock_one> dmonjo, alias vi = vim
<danneu> pretty sure vi and vim alias to vim
dmiller2 has joined #ruby
sayan has joined #ruby
<danneu> on systems i've used
bwlang has joined #ruby
<moofy> ah
<moofy> right. it prints a blank line otherwise.
<moofy> I really appreciate this help.
Umren has quit [Read error: Connection reset by peer]
ngoldman has quit [Ping timeout: 248 seconds]
bartj3 has quit []
d2dchat has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
sepp2k1 has joined #ruby
moshee has quit [Ping timeout: 252 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
dmiller2 has quit [Ping timeout: 260 seconds]
Kingy_ has joined #ruby
<aedorn> everytime I start work on this Ruby dbus interface to wpa_supplicant, I get about 1 line in and then stare off into space. At this rate it'll be done sometime by Christmas.
francisfish has joined #ruby
urrk has left #ruby [#ruby]
maxmanders has quit [Ping timeout: 256 seconds]
mahmoudi_ has joined #ruby
havenwood has quit [Remote host closed the connection]
<danneu> sounds fun!
joshman_ has quit [Ping timeout: 252 seconds]
Kingy has quit [Ping timeout: 272 seconds]
agarie has joined #ruby
<aedorn> maybe it's just ruby-dbus
jsilver has joined #ruby
davidcelis has quit [Ping timeout: 246 seconds]
maxmanders has joined #ruby
guiocavalcanti has joined #ruby
mahmoudimus has quit [Ping timeout: 252 seconds]
ngoldman has joined #ruby
<dmonjo> do you have vim autocompletion for ruby
bigmac has joined #ruby
djwonk has joined #ruby
davidcelis has joined #ruby
erlingur has joined #ruby
<Hanmac_> dmonjo: for sample even vim cant du autocompletion for methodmissnig stuff
colonolGron has quit [Quit: leaving]
atyz has joined #ruby
<dmonjo> i dont think the gui version is installed on my linuxmint
<dmonjo> :version doesnt show gui
Qwak has joined #ruby
<shock_one> Hanmac_, the only way to do it is execute the code on the fly.
<Hanmac_> yeah thats why i find it funny that somone wants auto complete for an dynamic language like ruby
asobrasil has joined #ruby
<aedorn> autocomplete slows me down, not sure about you guys
<shock_one> Hanmac_, don't you think it's doable? Some sort of dry run, without any IO.
kofno has quit [Remote host closed the connection]
LBRapid has quit [Quit: Leaving]
ezkl has joined #ruby
<Hanmac_> no
Xeago_ has joined #ruby
Xeago_ is now known as Xeago
<shock_one> Hanmac_, OK, but IDE could have a special rule to parse method_missing
<Mon_Ouie> Autocompleting using just words from current and others buffers has proved to be enough for me
agarie has quit [Read error: Connection reset by peer]
idkazuma has joined #ruby
<Mon_Ouie> I've always thought one solution would be to use a documentation tool like YARV to guess potential types and then completion candidates
<banisterfiend> Mon_Ouie: YARV? :D
<Mon_Ouie> YARD*
agarie has joined #ruby
ryanh has quit [Quit: Computer has gone to sleep.]
ezkl has quit [Client Quit]
philcrissman has quit [Remote host closed the connection]
sn0wb1rd has quit [Quit: sn0wb1rd]
philcrissman has joined #ruby
kofno has joined #ruby
psy_ has joined #ruby
workmad3 has joined #ruby
shock_one has quit [Ping timeout: 245 seconds]
<dmonjo> you guys use gvim i think it is better than vim as command line for coding right
<psy_> hello i have a little problem with my ruby version. it is ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] and on a debian 64bits. when i set net bind capability to ruby, and run it as an luser i got segmentation fault
luckyruby has joined #ruby
<psy_> when i try with 1.8, i have no errors
<psy_> any body has a clue?
angusiguess has quit [Ping timeout: 260 seconds]
<banisterfiend> 1.9.2p0 is ancient, use a 1.9.3
maxmanders has quit [Ping timeout: 256 seconds]
Aristata has quit [Quit: Leaving.]
_bart has quit [Ping timeout: 260 seconds]
<Hanmac_> banisterfiend: did you try [[1,2],[3,4]].map {|**v| v} on a 2.0er ruby?
sepp2k1 has quit [Ping timeout: 264 seconds]
<psy_> banisterfiend it isn't on debian repositories yet
<ShellFu> this valid: if cond1 and (cond2 or cond3)
<ShellFu> can you do something like that?
sayan has quit [Ping timeout: 252 seconds]
<banisterfiend> psy_: dont use debian repos
Elhu has joined #ruby
<psy_> banisterfiend you mean i download it from website, compile and install ?
<Hanmac_> psy_ recent debians have newer ruby
<banisterfiend> psy_: use rvm/rbenv/chruby
axl_ has quit [Quit: axl_]
<psy_> banisterfiend hmm, i have to install rvm, don't have it installed
<psy_> Hanmac_ which version? i'm still on 2.6.32-5-amd64 :}
sn0wb1rd has joined #ruby
maxmanders has joined #ruby
<Hanmac_> psy i think its in sid branch
SeanLazer has quit [Quit: SeanLazer]
waxjar is now known as a
<Hanmac_> i am on ubuntu and currently i have a nightly ruby :P
a is now known as waxjar
robotmay_ has quit [Ping timeout: 244 seconds]
ner0x has quit [Quit: Leaving]
<psy_> curious! on ruby-lang.org is mentionned that last version of ruby on debian is 1.9.2
zigomir has quit [Quit: zigomir]
<psy_> i'm installing rvm
chico_chicote has joined #ruby
<banisterfiend> Hanmac_: why dont you use a version manager ?
dmiller2 has joined #ruby
<psy_> Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p385
<Hanmac_> banister because i dont need one, and does the versions manager support "nightly"? and did you run my code??
maxmanders has quit [Ping timeout: 260 seconds]
alex__c2022 has joined #ruby
alex__c2022__ has quit [Read error: Connection reset by peer]
dustint_ has quit [Remote host closed the connection]
tetsu is now known as tetsus
atyz has quit [Quit: Linkinus - http://linkinus.com]
tetsus is now known as tetsuseus
atyz has joined #ruby
pdamer has quit [Quit: pdamer]
chussenot has quit [Quit: chussenot]
jphpsf has quit [Ping timeout: 252 seconds]
maxmanders has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
berserkr has quit [Quit: Leaving.]
<banisterfiend> Hanmac_: yeah, they cna install ruby-head
QKO_ has quit [Ping timeout: 256 seconds]
<banisterfiend> Hanmac_: just builds it from the repo
anonymuse has joined #ruby
dmonjo has quit [Quit: Leaving]
etcetera has quit []
kofno has quit [Remote host closed the connection]
_br_ has quit [Excess Flood]
kold has joined #ruby
<Hanmac_> i still dont like stuff like rvm ... and i wanted to try the multiarch feature :P
buibex has quit [Remote host closed the connection]
thufir_ has quit [Quit: Leaving.]
_br_ has joined #ruby
cousine has joined #ruby
jphpsf has joined #ruby
banjara has quit [Quit: Leaving.]
thufir_ has joined #ruby
pothibo has joined #ruby
banjara has joined #ruby
blacktulip has quit [Remote host closed the connection]
thufir_ has quit [Client Quit]
_br_ has quit [Excess Flood]
Joelk is now known as Joel
Joel has quit [Changing host]
Joel has joined #ruby
QKO has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
peregrine81 has joined #ruby
_br_ has joined #ruby
Spooner has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
kold has quit [Read error: Connection reset by peer]
matthewrobbins has joined #ruby
kold has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
joshman_ has joined #ruby
waxjar is now known as craig_david
etcetera has joined #ruby
craig_david is now known as waxjar
havenwood has joined #ruby
<psy_> banisterfiend Hanmac_, i have no more segmentation fault when i set capabilities to ruby-1.9.3 :)
<psy_> thx for the idea
kristofers has quit []
alup has quit [Quit: Leaving]
fermion has quit [Quit: Textual IRC Client: www.textualapp.com]
jerius has quit [Read error: Connection reset by peer]
jerius has joined #ruby
gabrielrotbart has joined #ruby
evenix has quit [Remote host closed the connection]
evenix has joined #ruby
kenneth has joined #ruby
LouisRoR has quit [Ping timeout: 252 seconds]
subbyyy has joined #ruby
<aedorn> hmmm... Net::FTP.new/open/connect doesn't have a timeout
codecop has quit [Remote host closed the connection]
yshh has quit [Read error: Connection reset by peer]
Axsuul has joined #ruby
Monie has quit [Quit: Quit]
willob has quit [Quit: Leaving.]
jsilver has quit [Remote host closed the connection]
yshh has joined #ruby
<Axsuul> Anyone here speak russian?
<Axsuul> read*
Mon_Ouie has quit [Ping timeout: 256 seconds]
kold has quit [Remote host closed the connection]
elux has quit [Quit: Bye!]
ahokaomaeha has joined #ruby
timonv_ has joined #ruby
evenix has quit [Ping timeout: 260 seconds]
<Axsuul> Nevermind, thanks :)
timonv has quit [Read error: Connection reset by peer]
lethjakman_lapto has joined #ruby
DuoSRX has quit [Remote host closed the connection]
<lethjakman_lapto> hey, does anyone know if ruby 2.0 will actually use bytecode?
gabrielrotbart has quit [Remote host closed the connection]
<whitequark> lethjakman_lapto: ruby 1.9 uses bytecode
<Spooner> I assume the question is whether we get it cached in .rbc files, which I'm guessing is still no.
jjbohn has quit [Quit: Leaving...]
<lethjakman_lapto> whitequark: really? is there a way to compile to bytecode?
TheFuzzball has quit [Quit: Computer has gone to sleep.]
<whitequark> lethjakman_lapto: it always compiles to bytecode.
francisfish has quit [Remote host closed the connection]
<Spooner> lethjakman_lapto, Yeah, it compiles to bytecode, but then runs it immediately. It doesn't cache it like Python or Java.
<lethjakman_lapto> oh
<Spooner> Though I'm not entirely sure why not...
<lethjakman_lapto> is it possible to turn that on? I'm looking for performance updates
mityaz has quit [Quit: See ya!]
emergion has joined #ruby
baba has joined #ruby
michaelaguiar has joined #ruby
<havenwood> lethjakman_lapto: What bottleneck are you running into?
<havenwood> lethjakman_lapto: What is taking too long?
_nitti has quit [Remote host closed the connection]
<michaelaguiar> I have ruby installed via homebrew, how can I switch to that version of ruby via terminal?
megha has quit [Ping timeout: 252 seconds]
<lethjakman_lapto> I wrote a CSV parser and it took about 10 times longer to parse the file
<Spooner> Use rubinius or jruby or topaz if you need to cache bytecode ;)
<havenwood> ^
dmiller2 has quit [Ping timeout: 255 seconds]
<lethjakman_lapto> it literally reads a line, and writes it out in a different order
<Spooner> lethjakman_lapto, 10 times longer than what?
idkazuma has quit [Remote host closed the connection]
<lethjakman_lapto> than the one I wrote in PHP with the same exact functionality
<havenwood> michaelaguiar: I use chruby (brew install chruby) to switch Rubies, works well! https://github.com/postmodern/chruby
<whitequark> ahem
<Spooner> lethjakman_lapto, You are using the csv in the 1.9.3 stdlib?
freakazoid0223 has joined #ruby
<whitequark> > Benchmark.measure { files.map { |f| RubyVM::InstructionSequence.compile_file f if File.exist? f } }
<whitequark> => 0.010000 0.000000 0.010000 ( 0.009100)
<lethjakman_lapto> 1.9.2
psy_ has quit []
<whitequark> this is for 2369 files from a huge Rails project
TheMoonMaster has quit [Excess Flood]
peregrine81 has quit [Quit: Computer sleeping.]
angusiguess has joined #ruby
sepp2k has joined #ruby
phantasm66 has quit [Quit: *sleeeep….]
<whitequark> oh wait, I screwed it up
TheMoonMaster has joined #ruby
<Spooner> lethjakman_lapto, Caching the bytecode would, at best, only speed up startup, not run-time.
<whitequark> lethjakman_lapto: => 1.460000 0.060000 1.520000 ( 1.523299)
<lethjakman_lapto> whitequark: could you explain that to me?
<lethjakman_lapto> Spooner: that makes sense
<havenwood> michaelaguiar: The brew formula for installing Ruby doesn't tell you the ENV vars to set? Hrm, it should it seems if it doesn't!
<whitequark> lethjakman_lapto: this means that compiling all files (2369) from a big rails project takes 1.52s on my machine
<whitequark> I think you hardly have a problem which bytecode caching will solve
hashmal has quit [Quit: Textual IRC Client: www.textualapp.com]
idkazuma has joined #ruby
l3ck has joined #ruby
<Spooner> whitequark, Depends if it takes 2s rather than 0.2s. Then compiling might be an issue. If it is 20s ratehr than 2 it probably isn't that important at all.
<lethjakman_lapto> whitequark: I think it's execution time
<havenwood> lethjakman_lapto: Your problem is likely in the way you're loading and parsing the csv. Can you paste a gist of the code you use to load and parse?
robotmay has joined #ruby
emergion has quit [Ping timeout: 264 seconds]
<whitequark> Spooner: it scales linearly with code size
<whitequark> Spooner: Python just has a really slow parser :)
maxmanders has quit [Quit: Computer has gone to sleep.]
<aedorn> I love listening to sales guys talk about this Ruby project. Q: "Do you record logs in some format? like XML?" A: "Well, we use so-and-so version of Linux."
<Spooner> whitequark, No, I mean that all we have is that it takes 10x longer, which could include compile time effects if the two times are very quick.
<lethjakman_lapto> I'll try and work something something up tonight when I'm back home.
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
kylewiest has joined #ruby
<kylewiest> having a problem with a lambda binding to local variables - https://gist.github.com/kwiest/4780313
peregrine81 has joined #ruby
<kylewiest> Any help is greatly appreciated
<workmad3> kylewiest: the problem there is that you're not binding to local variables
<Boohbah> >> puts (1..16).map{(33+rand(93)).chr}.join
<eval-in> Boohbah: Output: "`mrCmwZ<ihd_?{lu\n" (http://eval.in/9831)
banisterfiend has quit [Ping timeout: 260 seconds]
<kylewiest> workmad3: How do you mean?
<workmad3> kylewiest: you're binding to instance variables, and I bet the callback runs as instance_eval(&blk) to ensure your callback gets the context of the object
<workmad3> kylewiest: @run_callbacks is an instance variable, not a local variable
guyz has quit [Ping timeout: 245 seconds]
hashmal has joined #ruby
ssvo has quit [Quit: leaving]
digifiv5e has joined #ruby
digifiv5e is now known as Guest60518
djwonk has quit []
<kylewiest> workmad3: The behavior in the second file on the gist is what I would expect, but I'm thinking it is instance_eval'd when the callback is run
<kylewiest> thank you
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
Xeago_ has joined #ruby
Xeago is now known as Guest89249
Xeago_ is now known as Xeago
anderse has quit [Quit: anderse]
banisterfiend has joined #ruby
chico_chicote has quit [Ping timeout: 260 seconds]
bluOxigen has quit [Ping timeout: 252 seconds]
havenwood has quit [Remote host closed the connection]
etcetera has quit []
havenwood has joined #ruby
Criztian has quit [Ping timeout: 248 seconds]
carlyle has quit [Remote host closed the connection]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
nicoulaj has quit [Remote host closed the connection]
interactionjaxsn has quit [Remote host closed the connection]
Guest89249 has quit [Ping timeout: 248 seconds]
philcrissman has quit [Remote host closed the connection]
QKO has quit [Read error: Operation timed out]
havenwood has quit [Ping timeout: 260 seconds]
nat_home has quit [Quit: Leaving.]
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
martin_work has quit [Quit: martin_work]
emocakes has joined #ruby
alanp has quit [Read error: Connection reset by peer]
QKO has joined #ruby
alanp_ has joined #ruby
Guest60518 has quit [Ping timeout: 260 seconds]
frem has quit [Quit: Computer has gone to sleep.]
alanp_ is now known as alanp
emmanuelux has joined #ruby
banjara has quit [Quit: Leaving.]
bawigga has quit [Ping timeout: 255 seconds]
banjara has joined #ruby
gabrielrotbart has joined #ruby
michaelaguiar has quit [Quit: michaelaguiar]
Criztian has joined #ruby
tobor_one has quit [Quit: tobor_one]
bwlang has left #ruby [#ruby]
gabrielrotbart has quit [Remote host closed the connection]
tommyvyo has joined #ruby
bawigga has joined #ruby
Dwarf has quit [Ping timeout: 246 seconds]
jimeh has joined #ruby
jlast_ has joined #ruby
Kuifje has quit [Ping timeout: 252 seconds]
digifiv5e_ has joined #ruby
robotmay has quit [Ping timeout: 256 seconds]
ssvo has joined #ruby
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
Hanmac_ has quit [Ping timeout: 245 seconds]
jlast has quit [Ping timeout: 256 seconds]
kofno has joined #ruby
samuel02 has quit [Remote host closed the connection]
bricker_ has joined #ruby
zastern has quit [Remote host closed the connection]
danielpcox has quit [Ping timeout: 252 seconds]
bricker has quit [Ping timeout: 252 seconds]
axl_ has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
chico_chicote has joined #ruby
Dwarf has joined #ruby
piotr__ has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
jlast_ has quit [Remote host closed the connection]
etcetera has joined #ruby
piotr_ has quit [Ping timeout: 272 seconds]
Morkel has quit [Quit: Morkel]
angusiguess has joined #ruby
monkegji_ has quit [Remote host closed the connection]
gabrielrotbart has joined #ruby
theRoUS has quit [Ping timeout: 276 seconds]
radic_ has quit [Ping timeout: 260 seconds]
bean has quit [Quit: Computer has gone to sleep.]
EPIK has joined #ruby
jonathanwallace has joined #ruby
postmodern has joined #ruby
casheew has quit [Ping timeout: 252 seconds]
nmeum has quit [Ping timeout: 252 seconds]
arya_ has quit [Ping timeout: 248 seconds]
cousine has quit [Remote host closed the connection]
Stilo has joined #ruby
Nisstyre_ is now known as Nisstyre
casheew has joined #ruby
matthewrobbins has quit [Quit: matthewrobbins]
nateberkopec has quit [Quit: Leaving...]
peteyg has quit [Ping timeout: 252 seconds]
subbyyy has quit [Ping timeout: 248 seconds]
bawigga has quit [Quit: Computer has gone to sleep.]
chimkan_ has joined #ruby
jjang has joined #ruby
chendo_ has quit [Ping timeout: 252 seconds]
arya has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9.2]
nmeum has joined #ruby
poikon has joined #ruby
nari has joined #ruby
daniel_- has joined #ruby
bawigga has joined #ruby
chendo_ has joined #ruby
__BigO__ has quit [Remote host closed the connection]
<tjbiddle> Anyone like to share how they handle configuration? I'd like to have sensible defaults that can be overridden by a config file. Used YAML before, but wondering if that's the best option - especially as opposed to pure ruby. Need to r+w to the config file from the application.
geggam has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
m8 has quit [Quit: Sto andando via]
mlr has quit [Quit: leaving]
mlr has joined #ruby
maxmanders has joined #ruby
iambic has quit [Quit: leaving]
DrShoggoth has quit [Quit: Leaving]
samphippen has quit [Quit: Computer has gone to sleep.]
yshh has quit [Read error: Connection reset by peer]
<graft> anyone have a nice gem that will do like 105125.to_human => "105K" or some such?
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
DuoSRX has joined #ruby
araujo has quit [Ping timeout: 260 seconds]
solidoodlesuppor has quit [Ping timeout: 272 seconds]
yshh has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
jerius has quit [Ping timeout: 255 seconds]
<aedorn> tjbiddle: funny enough I'm contemplating that myself right now. We have 30 YAML files, but most contain a lot of duplication. Although, we don't have to worry about writing to the config from the application so configs based in Ruby is a good idea for us. I think for you, since you have to write back, probably not.
billiam has quit [Quit: Leaving]
_nitti has joined #ruby
<tjbiddle> aedorn: Yeah. That's what I was thinking. Rails does a lot of their configuration with Ruby and it's extremely clean, but we're it doesn't write back to it obviously.
kofno has quit [Read error: Connection reset by peer]
khimera has quit [Quit: khimera]
kofno has joined #ruby
v0n has quit [Read error: Operation timed out]
beilabs has joined #ruby
QKO_ has joined #ruby
_br_ has quit [Excess Flood]
khimera has joined #ruby
maxmanders has quit [Ping timeout: 252 seconds]
tealmage has joined #ruby
banisterfiend is now known as banister`sleep
QKO has quit [Ping timeout: 244 seconds]
_nitti has quit [Ping timeout: 248 seconds]
<IceDragon> >.> Is there a method that is invoked whenever you try to make a call to an object?
<IceDragon> or rather before the actual method call
<banister`sleep> IceDragon: no
<IceDragon> >_> damn
<banister`sleep> IceDragon: but people use proxy objects to accomplish the same thing
<banister`sleep> IceDragon: or they decorate their methods after the fact
<banister`sleep> using metaprogramming
ryanf has quit [Read error: Connection reset by peer]
<IceDragon> ;-; god damn it
khimera has quit [Client Quit]
ryanf has joined #ruby
_br_ has joined #ruby
<banister`sleep> IceDragon: what are you trying to do?
poikon has quit [Remote host closed the connection]
<IceDragon> Nothing really, I was looking over things like method_missing and method_added
<IceDragon> and was thinking about it
<banister`sleep> so why such extreme emotion? :)
<banister`sleep> hehe
<IceDragon> I kinda know the reason why, it doesn't exist. It would be a lag bastard
bttf has joined #ruby
tcstar has quit [Ping timeout: 255 seconds]
_br_ has quit [Excess Flood]
BrindleFly_ has joined #ruby
kofno has quit [Remote host closed the connection]
<banister`sleep> IceDragon: if you want that functionality though it's very easy to fake
<IceDragon> using method_added and a few eval tricks?
Patteh has quit [Ping timeout: 264 seconds]
BrindleFly has quit [Ping timeout: 252 seconds]
BrindleFly_ is now known as BrindleFly