apeiros_ changed the topic of #ruby-lang to: Ruby 1.9.3-p327: http://ruby-lang.org (ruby-2.0.0-preview2) || Paste >3 lines of text on http://gist.github.com
ryanlecompte has joined #ruby-lang
marcury has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
towski has joined #ruby-lang
ryanlecompte has quit [Read error: Connection reset by peer]
blazes816 has quit [Quit: blazes816]
Averna has joined #ruby-lang
marr has joined #ruby-lang
jsilver has quit [Remote host closed the connection]
jsilver has joined #ruby-lang
rmillerx has quit [Quit: rmillerx]
jsilver has quit [Remote host closed the connection]
znowi has quit []
robotmay has quit [Remote host closed the connection]
thone_ has joined #ruby-lang
mindbender1 has quit [Ping timeout: 265 seconds]
thone has quit [Ping timeout: 265 seconds]
kentos has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby-lang
chaosis has joined #ruby-lang
kentos has joined #ruby-lang
norc has quit [Read error: Connection reset by peer]
jsilver has joined #ruby-lang
towski has quit [Remote host closed the connection]
norc has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
norc is now known as Guest17119
marr has quit [Ping timeout: 265 seconds]
imperator has joined #ruby-lang
towski has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
towski has quit [Remote host closed the connection]
Swimming_Bird has joined #ruby-lang
sheerun has quit [Quit: ZNC - http://znc.in]
xyzodiac has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
mjio has quit []
[1]Brian has quit [Quit: HydraIRC -> http://www.hydrairc.com <- Go on, try it!]
marcostoledo has joined #ruby-lang
marcostoledo has quit [Client Quit]
stardiviner has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
wyhaines has joined #ruby-lang
andrewhl has joined #ruby-lang
mwjcomputing has joined #ruby-lang
nertzy has quit [Quit: Leaving]
jnoon has quit []
voker57 has quit [Read error: Connection reset by peer]
randym has joined #ruby-lang
neocoin has joined #ruby-lang
banisterfiend has joined #ruby-lang
blazes816 has joined #ruby-lang
mjio has joined #ruby-lang
hibariya has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
banisterfiend has quit [Ping timeout: 245 seconds]
pdswan_ has joined #ruby-lang
kgrz has quit [Ping timeout: 256 seconds]
kurko_ has joined #ruby-lang
earthquake has quit [Quit: earthquake]
earthquake has joined #ruby-lang
intellitech has joined #ruby-lang
xyzodiac has quit [Ping timeout: 256 seconds]
jnoon has joined #ruby-lang
wardrop has quit [Read error: Connection reset by peer]
wardrop has joined #ruby-lang
xyzodiac has joined #ruby-lang
wyhaines has joined #ruby-lang
Bosox20051 has joined #ruby-lang
krz has joined #ruby-lang
chendo_ has quit [Ping timeout: 264 seconds]
CaptainJet has quit []
chendo_ has joined #ruby-lang
jhn has joined #ruby-lang
Sambalero has joined #ruby-lang
Sambalero has quit [Remote host closed the connection]
kurko_ has quit [Quit: Computer has gone to sleep.]
chendo_ has quit [Ping timeout: 255 seconds]
wyhaines_ has joined #ruby-lang
chendo_ has joined #ruby-lang
wyhaines has quit [Ping timeout: 245 seconds]
voker57 has joined #ruby-lang
ryanlecompte has joined #ruby-lang
ddd has joined #ruby-lang
Drekonus has joined #ruby-lang
chendo_ has quit [Ping timeout: 265 seconds]
chendo_ has joined #ruby-lang
Drekonus has quit [Remote host closed the connection]
jhn has quit [Quit: Page closed]
mwjcomputing has quit [Quit: Leaving]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
xyzodiac has quit [Quit: Computer has gone to sleep.]
xyzodiac has joined #ruby-lang
Drekonus has joined #ruby-lang
Drekonus has quit [Quit: Leaving.]
quellhorst has quit [Remote host closed the connection]
Axsuul has joined #ruby-lang
postmodern has joined #ruby-lang
seanstickle has quit [Quit: seanstickle]
ryanlecompte has quit [Remote host closed the connection]
CaptainJet has joined #ruby-lang
irevert has joined #ruby-lang
irevert has left #ruby-lang [#ruby-lang]
madish has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121026125834]]
synthetix has joined #ruby-lang
jhn has joined #ruby-lang
methods has joined #ruby-lang
<jhn> Does anyone have experience with super basic sinatra and the twilio api and wants to pair with a newbie for like 15 minutes? :(
<shachaf> You'll probably have better luck if you ask specific questions that you have. :-)
<jhn> shachaf: Yeah, I had to give it a shot though... I'm putting everything into a gist right now to be as clear as possible.
methods has quit [Quit: Leaving.]
rohit_ has joined #ruby-lang
<jhn> So what I'm trying to do is to use the Twilio API to call my cellphone and have it say some text that is generated from an external source...
<jhn> The whole thing lives on Heroku as an app—here's what it looks like: https://gist.github.com/4192650 ; the actual text is generated locally on my machine.
<jhn> I just want to find a way to pass the text to this app using the terminal directly. I was trying to do it with curl but I haven't had any luck so far.
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
epitron has joined #ruby-lang
epitron has joined #ruby-lang
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
imperator has quit [Quit: Leaving]
tenderlove has quit [Remote host closed the connection]
<petercooper> jhn: You know about params[]?
<petercooper> jhn: You could use params[:text] in there, then call it with curl -d "text=whatever" http://localhost:XXXX/instructions
<jhn> petercooper: Yeah, that's sort of what I was trying to do before. I'll try again.
<zzak> petercooper: passing off the reins for jsweekly, eh?
<petercooper> Yesh
<zzak> still going to do the other newsletters tho?
<petercooper> For now!
<zzak> looking for new maintainers?
areil has joined #ruby-lang
<petercooper> Eventually, but want to see how it works out first.
<zzak> that should free you up some, how much time do you spend a week for those newsletters?
<jhn> petercooper: I don't think it'll work because I need to make a call to /call so that Twilio picks it up...
<petercooper> Oh right, so you never personally hit /instructions, just your app does?
<jhn> petercooper: If I post directly to instructions then it doesn't work
<jhn> Yes
<Spaceghostc2c> petercooper: Cooper no cooping! :p
wardrop has quit [Ping timeout: 256 seconds]
wardrop has joined #ruby-lang
<petercooper> zzak: I don't know for sure, it's hard to pin down. But several hours, at least.
rohit_ has quit [Read error: Connection reset by peer]
<zzak> petercooper: if and when you decide to step down from the news related stuff, you will suffer from some serious information addiction
nertzy has joined #ruby-lang
<zzak> withdrawls*
<petercooper> Possibly but that probably won't happen
<petercooper> Since the goal is to hand off already established newsletters to have time to launch new ones ;-)
<zzak> haha nice, i was more or less joking anyways
Aria has joined #ruby-lang
<zzak> what's next? cooper press ladygaga weekly?
<petercooper> from what i understand of modern Rubyists, a Ke$ha Weekly would do well
<matti> zzak: ;]
<zzak> even better
xyzodiac has quit [Quit: Computer has gone to sleep.]
<jhn> petercooper: Solved it by creating an another POST route that saved params[:value] into a class variable.
<Spaceghostc2c> Oh dear.
<jhn> petercooper: Now I can POST the info I want to pass to that address with curl and then curl /call so that the Twilio call is triggered. It's ugly but it works I guess...
sush24_ has joined #ruby-lang
sharma__ has joined #ruby-lang
sush24_ has quit [Ping timeout: 245 seconds]
rohit_ has joined #ruby-lang
jonasac has quit [Ping timeout: 246 seconds]
EvilJStoker has quit [Excess Flood]
burgestrand1 has joined #ruby-lang
jonasac has joined #ruby-lang
burgestrand has quit [Ping timeout: 248 seconds]
rippa has joined #ruby-lang
sharma__ has quit [Ping timeout: 256 seconds]
sharma__ has joined #ruby-lang
burgestrand1 has quit [Ping timeout: 256 seconds]
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
EvilJStoker has joined #ruby-lang
petercooper has quit [Ping timeout: 250 seconds]
A124 has quit [Quit: Leaving.]
rking has quit [Quit: BBIAB]
rippa has quit [Ping timeout: 264 seconds]
EvilJStoker has quit [Excess Flood]
Guest98404 has joined #ruby-lang
Guest98404 has quit [Excess Flood]
EvilJStoker_ has joined #ruby-lang
stonerfish has quit [Quit: Leaving.]
sharma__ has quit [Ping timeout: 252 seconds]
gsav has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
sush24_ has joined #ruby-lang
CaptainJet has quit []
Bosox20051 has quit [Quit: Leaving]
rivaler has joined #ruby-lang
mjio has quit []
rking has joined #ruby-lang
burgestrand has joined #ruby-lang
blazes816 has quit [Quit: blazes816]
andrewhl has quit [Remote host closed the connection]
EvilJStoker_ is now known as EvilJStoker
jhn has quit [Ping timeout: 245 seconds]
mjio has joined #ruby-lang
anannie has quit [Remote host closed the connection]
ebouchut_ has joined #ruby-lang
JohnBat26 has joined #ruby-lang
gix has quit [Ping timeout: 248 seconds]
datanoise has joined #ruby-lang
rivaler_ has joined #ruby-lang
tridge has joined #ruby-lang
rivaler__ has joined #ruby-lang
<ryanf> whitequark: hey, thanks for the RT
towski has joined #ruby-lang
rivaler has quit [Ping timeout: 265 seconds]
datanoise has quit [Ping timeout: 244 seconds]
gix has joined #ruby-lang
rivaler_ has quit [Ping timeout: 244 seconds]
sharma__ has joined #ruby-lang
sush24_ has quit [Ping timeout: 260 seconds]
rivaler__ has quit [Ping timeout: 265 seconds]
rohit_ has quit [Quit: Leaving]
ebouchut_ has quit [Quit: This computer has gone to sleep]
apeiros_ has quit [Remote host closed the connection]
blowfly_ has quit [Quit: Textual IRC Client: www.textualapp.com]
blowfly has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
tridge has quit [Remote host closed the connection]
rivaler has joined #ruby-lang
areil_ has joined #ruby-lang
mjio has quit []
areil_ has quit [Client Quit]
areil_ has joined #ruby-lang
charliesome has joined #ruby-lang
areil_ has quit [Client Quit]
areil has quit [Ping timeout: 256 seconds]
tjadc has joined #ruby-lang
<tdy> GPIO.output(GREEN_LED, True)
<tdy> GPIO.output(RED_LED, False)88 GPIO.output(GREEN_LED, True)
<tdy> oops
dc5ala has joined #ruby-lang
areil has joined #ruby-lang
flowerpot has joined #ruby-lang
ebouchut_ has joined #ruby-lang
ebouchut_ has quit [Client Quit]
tridge has joined #ruby-lang
tridge has quit [Remote host closed the connection]
chaosis has quit [Ping timeout: 260 seconds]
rue|w has joined #ruby-lang
tjadc has quit [Read error: Connection reset by peer]
Darkspiel has joined #ruby-lang
tjadc has joined #ruby-lang
kitallis has joined #ruby-lang
wyhaines_ has quit [Remote host closed the connection]
Carnage\ has joined #ruby-lang
mistym has quit [Remote host closed the connection]
postmodern has quit [Ping timeout: 245 seconds]
towski has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 245 seconds]
dr_bob has joined #ruby-lang
postmodern has joined #ruby-lang
Nisstyre-laptop has quit [Remote host closed the connection]
Nisstyre-laptop has joined #ruby-lang
postmodern has quit [Ping timeout: 264 seconds]
Croms has joined #ruby-lang
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
gnufied has joined #ruby-lang
facest has joined #ruby-lang
faces has quit [Ping timeout: 264 seconds]
afgeneralist is now known as afgeneralist_awa
esad has joined #ruby-lang
Croms has quit [Ping timeout: 252 seconds]
<yorickpeterse> Morning
Croms has joined #ruby-lang
sepp2k1 has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
vlad_starkov has joined #ruby-lang
datanoise has joined #ruby-lang
<Axsuul> Anyone wanna recommend me something better than Net::HTTP
datanoise has quit [Ping timeout: 264 seconds]
gix has quit [Ping timeout: 255 seconds]
<lzhz> Axsuul: what are your needs? Try https://github.com/jnunemaker/httparty
gix has joined #ruby-lang
esad has quit [Quit: Computer has gone to sleep.]
<gnufied> that is a layer over Net::HTTP
<gnufied> if you need something that uses its own http layer. look into Excon
tdy has quit [Read error: Connection reset by peer]
marr has joined #ruby-lang
esad has joined #ruby-lang
faustman has joined #ruby-lang
<Axsuul> gnufied: thanks
ebouchut_ has joined #ruby-lang
ebouchut has quit [Read error: Connection reset by peer]
agarcia has joined #ruby-lang
<lzhz> gnufied: looks nice
Guest____ has joined #ruby-lang
Gue______ has joined #ruby-lang
Guest____ has quit [Client Quit]
apod has joined #ruby-lang
Gue______ has quit [Client Quit]
apod has quit [Client Quit]
apod has joined #ruby-lang
zmack has joined #ruby-lang
solars has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
ryanf has quit [Quit: leaving]
workmad3 has joined #ruby-lang
tdy has joined #ruby-lang
EvilJStoker has quit [Excess Flood]
davidbalbert is now known as davidbalber|away
robotmay has joined #ruby-lang
<andrewvos> lzhz: You probably just need httparty. It's a layer over Net:HTTP as gnufied says, but is very nice to use.
<andrewvos> Net:HTTP works very well, it's just not fun to use.
<andrewvos> httparty makes it a lot better to use.
adambeynon has joined #ruby-lang
flowerpot has quit [Quit: Ex-Chat]
jsilver has quit [Remote host closed the connection]
faustman has quit [Ping timeout: 256 seconds]
EvilJStoker has joined #ruby-lang
workmad3 has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby-lang
babinho has quit [Ping timeout: 264 seconds]
Darkspiel has quit [Ping timeout: 255 seconds]
tbuehlmann has joined #ruby-lang
anannie has joined #ruby-lang
jsilver has joined #ruby-lang
jsilver has quit [Remote host closed the connection]
jsilver has joined #ruby-lang
<Paradox> andrewvos, lzhz the only problems with httparty are, as of this writing, it doesn't support file uploads
<Paradox> there is a gem that runs on top of httparty
<Paradox> but eh
sharma__ has quit [Ping timeout: 264 seconds]
runeb has joined #ruby-lang
<andrewvos> Paradox: excon looks good, have you used it before?
<Paradox> no
<Paradox> i mainly use httparty
<Paradox> and then the httparty-multipart for uploads
<Paradox> httparty is nice because it does automatic json serialization
judofyr has joined #ruby-lang
esad has quit [Quit: Computer has gone to sleep.]
znowi has joined #ruby-lang
gaveen has quit [Remote host closed the connection]
faustman has joined #ruby-lang
gix has quit [Ping timeout: 265 seconds]
burgestrand has quit [Ping timeout: 250 seconds]
gix has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
burgestrand has joined #ruby-lang
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
wallerdev has quit [Quit: wallerdev]
toretore has joined #ruby-lang
<Axsuul> Do you guys get Net::HTTP::Proxy unintialized constant?
postmodern has joined #ruby-lang
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<darix> Axsuul: it usually means you missed a requires.
<gnufied> andrewvos: I have used Excon plenty. fog is built on top of it, fwiw
<Axsuul> darix: I have a require 'net/http'
<darix> mechanize is also nice for poking at http apps
cultureulterior_ has joined #ruby-lang
<darix> Axsuul: just a guess ... require 'net/http/proxy'
<Axsuul> darix: already tried that :(
<darix> Axsuul: i would say put your code on a paste site
<Axsuul> Can any of you try it
<Axsuul> in your IRB
<Axsuul> require 'net/http'; Net::HTTP::Proxy
wyhaines has joined #ruby-lang
<judofyr> Axsuul: doesn't work here
<gnufied> it seems to be documented incorectly
mars777 has quit [Quit: mars777]
<judofyr> gnufied: where?
JohnBat26 has joined #ruby-lang
mindbender1 has joined #ruby-lang
<gnufied> oops, sorry I see it now. I was under the impression that it is being shown as constant in the example
<gnufied> but it is not
<Axsuul> ya, should be
sush24_ has joined #ruby-lang
<Axsuul> Net::HTTP.Proxy(...).new
<Axsuul> ty
<judofyr> it does say "Net::HTTP::Proxy has the same methods " though
<judofyr> which is kinda ambiguous
<judofyr> I don't like the convention of using :: for class methods :/
<judofyr> `ri Net::HTTP::Proxy` doesn't work, but `ri Net::HTTP.Proxy` does
<gnufied> judofyr: thats what confused me. using :: for class methods is so rare. :(
imperator has joined #ruby-lang
zmack has quit [Ping timeout: 255 seconds]
sush24_ has quit [Quit: This computer has gone to sleep]
zmack has joined #ruby-lang
anannie has quit [Ping timeout: 256 seconds]
m3nd3s has joined #ruby-lang
charliesome has quit [Ping timeout: 260 seconds]
anannie has joined #ruby-lang
charliesome has joined #ruby-lang
krz has quit [Quit: krz]
<postmodern> putting together some documentation
<postmodern> what's the url for apple's command line tools?
esad has joined #ruby-lang
esad has quit [Client Quit]
kurko_ has joined #ruby-lang
krz has joined #ruby-lang
krz has quit [Client Quit]
runeb has quit [Remote host closed the connection]
ioga_wrk has quit [Ping timeout: 276 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
<andrewvos> postmodern: You can install them inside xcode
<andrewvos> postmodern: If you have it
<postmodern> andrewvos, ah ha
<postmodern> andrewvos, i thought it was a separate dmg
<postmodern> andrewvos, for xcode-less installs
Mon_Ouie has joined #ruby-lang
<apod> postmodern: you can download it as separate dmg also from here: https://developer.apple.com/downloads/index.action but you need to login first
<postmodern> apod, excellent
<postmodern> apod, and is that only for Mountain Lion?
Hakon has quit [Quit: Leaving...]
<apod> postmodern: i think there is a Lion version also there
Paradox has quit [Read error: Operation timed out]
heftig has quit [Quit: leaving]
Paradox has joined #ruby-lang
Hakon has joined #ruby-lang
Hakon has quit [Client Quit]
cultureulterior_ has quit [Ping timeout: 260 seconds]
cultureulterior_ has joined #ruby-lang
blacktul_ has joined #ruby-lang
marr has quit [Ping timeout: 260 seconds]
blacktulip has quit [Ping timeout: 264 seconds]
runeb has joined #ruby-lang
vlad_starkov has joined #ruby-lang
ioga_wrk has joined #ruby-lang
rohit_ has joined #ruby-lang
<kke> is there some beautiful way to do something like first_row = true; foo.parse { |row| if first_row { do_stuff; first_row = false; } else { .. } }
<darix> kke: what is so bad about this code?
<andrewvos> postmodern: I'm actually just installing all the dev stuff on a new ML box
<andrewvos> postmodern: Let me know if you have any questions
<kke> darix: nothing, it works, but it always bugs me.
gaveen has joined #ruby-lang
gaveen has quit [Changing host]
gaveen has joined #ruby-lang
<darix> kke: well if you just do templating stuff
<darix> i saw something cool with iterators in a presentation recently
<kke> perhaps some local scoped "once { .... }" would be nice
<darix> ah you just need special treatment for the very first row?
<kke> yes
<darix> hm
<kke> and assigning a temp variable for that feels like 20 goto 10
<darix> for iterating over normal arrays or so you could use each_with_index { |row,i| if i ..
<darix> but hm
<apod> kke: foo.parse.with_index { |row, i | if i.zero? { do_stuff; first_row = false; } else { .. } } not sure if this would work with parse, but it works fine with map etc.
<kke> and that assigns a throwaway variable for each row for the GC to munch on
rohit_ has quit [Ping timeout: 260 seconds]
<darix> kke: well you will have to bite one bullet
<darix> unless your row object has someone you can use as indicator
cantonic has joined #ruby-lang
postmodern has quit [Quit: Leaving]
replore has joined #ruby-lang
<judofyr> kke: I've been thinking about an Array#with_state: [1, 2, 3].with_state { |ele, state| p [ele, state.first?, state.last?, state.next, state.prev, state.index] }
<judofyr> I think it would be useful
kristofferrr has joined #ruby-lang
kristofferrr has quit [Client Quit]
jds has quit [Ping timeout: 260 seconds]
jds has joined #ruby-lang
gaveen has left #ruby-lang ["Leaving"]
mindbender1 has quit [Ping timeout: 265 seconds]
rohit_ has joined #ruby-lang
GarethAdams has joined #ruby-lang
banisterfiend has joined #ruby-lang
rsl has joined #ruby-lang
<apeiros_> judofyr: .iterator ?
mindbender1 has joined #ruby-lang
<apeiros_> though, testing for an iteration property on every iteration, even though you know it will only be true in a single one, feels bad
<apeiros_> I prefer to do: do_special_thing(ary.first); ary[1..-1].each do …do_normal_thing… end
nyuszika7h has quit [Ping timeout: 246 seconds]
<kke> apeiros_: yeah that's fine if you have an array, but if you're doing something like parsing a large file line by line then you need something else
spuk has joined #ruby-lang
<apeiros_> kke: and why'd that be?
heftig has joined #ruby-lang
<apeiros_> do_special_thing(fh.gets); fh.each_line do …do_normal_thing… end
<kke> apeiros_: CSV.foreach('foo.csv') do |row|
<apeiros_> in that case a special method won't help you either. you'd need it on every class which provides iteration. see Enumerator for that.
fireglow has quit [Remote host closed the connection]
<apeiros_> csv = CSV.enum_for(:foreach, …); do_special_thing(csv.next); loop do do_normal_thing(csv.next) end
<kke> exotic
<apeiros_> generic
chaosis has joined #ruby-lang
nyuszika7h has joined #ruby-lang
<kke> if you need to do special_thing plus the normal thing for first row, then you must rewind somehow
<apeiros_> no
<apeiros_> then you refactor and use *methods*
<kke> gasp
<apeiros_> you know, like what you normally do when you do OO…
<apeiros_> csv = CSV.enum_for(:foreach, …); first_line = csv.next; do_special_thing(first_line); do_normal_thing(first_line); loop do do_normal_thing(csv.next) end
<apeiros_> 2 more statements, yikes! :)
<apeiros_> kke: but yeah, you can even rewind, if you want
<apeiros_> csv = CSV.enum_for(:foreach, …); first_line = csv.next; do_special_thing(first_line); csv.each do …do_normal_thing… end
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
fireglow has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 256 seconds]
leopard_me has joined #ruby-lang
madish has joined #ruby-lang
BlaXpirit has joined #ruby-lang
carloslopes has joined #ruby-lang
nevynxxx has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 245 seconds]
Aria has quit [Remote host closed the connection]
mindbender1 has quit [Ping timeout: 265 seconds]
<judofyr> apieros: I was thinking something like this: http://c.judofyr.net/ruby/array-with-state/
<apeiros_> judofyr: I understand. but I think array is the wrong place.
<judofyr> I agree, but the implementation was easier
<apeiros_> the state you're talking about is iteration state
<apeiros_> and Enumerator already exists
<judofyr> #last and #last? are tricky within Enumerator
<judofyr> or, maybe not #last?
<apeiros_> correct. you need #last and #length for those on the iterated element
<apeiros_> or you #peek on every iteration to see whether there'd be a #next
<apeiros_> which is potentially expensive
<apeiros_> (think Prime.each)
<apeiros_> alternatively you build up on each_cons(2)
<judofyr> I think it would be fair if #last just flattens it into an array
<judofyr> or, well, more like it have it buffer
x0F_ has joined #ruby-lang
x0F has quit [Disconnected by services]
x0F_ is now known as x0F
replore has quit [Remote host closed the connection]
marr has joined #ruby-lang
nevynxxx has quit [Quit: leaving]
<apeiros_> I'd only do that as a "last resort"
Theueip has joined #ruby-lang
<judofyr> apieros: hm. isn't there another way to detect end-of-enumrable other than calling #peek and rescuing StopInteration
<judofyr> ?
<judofyr> (that was a question)
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros_> judofyr: as said, each_cons(2)
<apeiros_> and/or size (if present)
replore_ has joined #ruby-lang
<apeiros_> as in: you can use a way which works in general and use that as a fallback, and implement optimized versions for containers which support it
banisterfiend has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby-lang
synthetix has quit [Ping timeout: 245 seconds]
xyzodiac has joined #ruby-lang
mindbender1 has joined #ruby-lang
m3nd3s has quit [Remote host closed the connection]
chaosis has quit [Ping timeout: 260 seconds]
Carnage\ has quit [Ping timeout: 265 seconds]
Carnage\ has joined #ruby-lang
rippa has joined #ruby-lang
workmad3 has joined #ruby-lang
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
rippa has quit [Ping timeout: 248 seconds]
runeb has quit [Remote host closed the connection]
rohit_ has quit [Quit: Leaving]
Swimming_Bird has joined #ruby-lang
nyuszika7h has joined #ruby-lang
nertzy2 has joined #ruby-lang
nertzy has quit [Ping timeout: 248 seconds]
rue|w has quit [Ping timeout: 264 seconds]
slyphon has quit [Ping timeout: 245 seconds]
runeb has joined #ruby-lang
jperry2 has quit [Quit: jperry2]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
slyphon has joined #ruby-lang
slyphon has quit [Read error: Connection reset by peer]
slyphon has joined #ruby-lang
slyphon_ has joined #ruby-lang
slyphon has quit [Ping timeout: 245 seconds]
outoftime has joined #ruby-lang
AndChat| has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 245 seconds]
m3nd3s has joined #ruby-lang
sailias has joined #ruby-lang
slyphon_ has quit [Ping timeout: 244 seconds]
S2kx has joined #ruby-lang
S1kx has quit [Ping timeout: 265 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
Hakon has joined #ruby-lang
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
nyuszika7h has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
Hakon has joined #ruby-lang
synthetix_ has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
xyzodiac has joined #ruby-lang
xyzodiac has quit [Max SendQ exceeded]
xyzodiac has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
mars777 has joined #ruby-lang
synthetix_ has quit [Remote host closed the connection]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Uranio has joined #ruby-lang
chaosis has joined #ruby-lang
Hakon has quit [Quit: Leaving...]
kgrz has joined #ruby-lang
Hakon has joined #ruby-lang
Hakon has quit [Client Quit]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
workmad3 has quit [Ping timeout: 245 seconds]
gnufied has quit [Quit: Leaving.]
vbatts has joined #ruby-lang
kitallis has joined #ruby-lang
rolfb has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
methods has joined #ruby-lang
outoftime has quit [Ping timeout: 260 seconds]
afgeneralist_awa has quit [Ping timeout: 255 seconds]
esad has joined #ruby-lang
gnufied has joined #ruby-lang
imajes has quit [Excess Flood]
enebo has joined #ruby-lang
Direktor has joined #ruby-lang
imajes has joined #ruby-lang
Direktor has quit [Read error: Connection reset by peer]
gsav has joined #ruby-lang
slyphon_ has joined #ruby-lang
rippa has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
tbuehlmann has quit [Remote host closed the connection]
esad has quit [Quit: Computer has gone to sleep.]
lcdhoffman has joined #ruby-lang
davidbalber|away is now known as davidbalbert
heftig has quit [Quit: leaving]
BigO has joined #ruby-lang
davidbalbert is now known as davidbalber|away
outoftime has joined #ruby-lang
sush24_ has joined #ruby-lang
davidbalber|away is now known as davidbalbert
datanoise has joined #ruby-lang
tjadc has quit [Remote host closed the connection]
gsav_ has joined #ruby-lang
gsav has quit [Quit: Lost terminal]
esad has joined #ruby-lang
davidbalbert is now known as davidbalber|away
bastilian has joined #ruby-lang
esad has quit [Client Quit]
marr has quit [Ping timeout: 256 seconds]
banisterfiend has quit [Remote host closed the connection]
esad has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
blazes816 has joined #ruby-lang
esad has quit [Client Quit]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
DEac- has quit [Read error: No route to host]
DEac- has joined #ruby-lang
imajes has quit [Excess Flood]
swav has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
imajes has joined #ruby-lang
Hakon has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
Hakon has quit [Client Quit]
runeb has quit [Remote host closed the connection]
replore_ has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
agile has quit [Remote host closed the connection]
wyhaines has joined #ruby-lang
wyhaines has quit [Client Quit]
LanceHaig has left #ruby-lang ["Leaving"]
carloslopes has joined #ruby-lang
ryanlecompte has joined #ruby-lang
justinseiter has joined #ruby-lang
solars has quit [Ping timeout: 265 seconds]
solars has joined #ruby-lang
Theueip has quit [Quit: Leaving...]
banisterfiend has joined #ruby-lang
justinseiter has quit [Ping timeout: 256 seconds]
justinseiter has joined #ruby-lang
topaz has left #ruby-lang [#ruby-lang]
justinseiter has quit [Ping timeout: 255 seconds]
fireglow- has joined #ruby-lang
workmad3 has joined #ruby-lang
Carnage\ has quit [Disconnected by services]
apod has quit [Quit: Leaving]
Carnage` has joined #ruby-lang
justinseiter has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
BlaXpirit-UA has joined #ruby-lang
agarcia has quit [Quit: Konversation terminated!]
runeb has joined #ruby-lang
runeb has quit [Read error: Connection reset by peer]
runeb has joined #ruby-lang
justinseiter has quit [Ping timeout: 255 seconds]
kitallis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
gnufied has quit [*.net *.split]
fireglow has quit [*.net *.split]
rsl has quit [*.net *.split]
BlaXpirit has quit [*.net *.split]
mindbender1 has quit [*.net *.split]
fireglow- is now known as fireglow
faces has joined #ruby-lang
gnufied has joined #ruby-lang
runeb has quit [Ping timeout: 248 seconds]
justinseiter has joined #ruby-lang
rsl has joined #ruby-lang
tockitj_ has joined #ruby-lang
crudson has joined #ruby-lang
facest has quit [Ping timeout: 250 seconds]
<tockitj_> if class includes module, and at the same time overrides one of its methods, is it possible to call that overridden method on object other than self ?
justinseiter has quit [Ping timeout: 250 seconds]
dr_bob has quit [Quit: Leaving.]
judofyr has quit [Remote host closed the connection]
slyphon__ has joined #ruby-lang
justinseiter has joined #ruby-lang
intellitech has quit [Ping timeout: 260 seconds]
slyphon_ has quit [Ping timeout: 245 seconds]
<andrewvos> tockitj_: super?
<andrewvos> I might be wrong
davidbalber|away is now known as davidbalbert
banisterfiend has quit [Read error: Connection reset by peer]
<tockitj_> andrewvos, super implicitly sends 'self'
justinseiter has quit [Ping timeout: 248 seconds]
justinseiter has joined #ruby-lang
swav has quit [Remote host closed the connection]
chaosis has quit [Ping timeout: 260 seconds]
<tockitj_> got it: Module1.instance_method(:over).bind(obj).call(params)
xyzodiac has quit [Quit: Computer has gone to sleep.]
solars has quit [Ping timeout: 256 seconds]
sent-hil has joined #ruby-lang
<singpolyma> ## yeah, the whole auction is live
sent-hil has quit [Remote host closed the connection]
justinseiter has quit [Ping timeout: 264 seconds]
<singpolyma> woah... wrong room
Carnage` has quit [Ping timeout: 264 seconds]
justinseiter has joined #ruby-lang
GarethAdams has quit [Quit: Leaving...]
Uranio has quit [Remote host closed the connection]
heftig has joined #ruby-lang
chaosis has joined #ruby-lang
marr has joined #ruby-lang
gregmore_ has joined #ruby-lang
justinseiter has quit [Ping timeout: 264 seconds]
gaveen has joined #ruby-lang
justinseiter has joined #ruby-lang
Carnage\ has joined #ruby-lang
davidbalbert is now known as davidbalber|away
gaveen has quit [Client Quit]
davidbalber|away is now known as davidbalbert
sn0wb1rd has quit [Quit: sn0wb1rd]
justinseiter_ has joined #ruby-lang
davidbalbert is now known as davidbalber|away
b3nt_pin has joined #ruby-lang
justinseiter has quit [Remote host closed the connection]
justinseiter_ has quit [Ping timeout: 245 seconds]
justinseiter has joined #ruby-lang
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
gnufied has quit [Quit: Leaving.]
just495 has joined #ruby-lang
swav has joined #ruby-lang
justinseiter_ has joined #ruby-lang
banister_ has joined #ruby-lang
davidbalber|away is now known as davidbalbert
just495 has quit [Read error: Connection reset by peer]
justinseiter has quit [Ping timeout: 265 seconds]
cored has quit [Ping timeout: 252 seconds]
davidbalbert is now known as davidbalber|away
sush24_ has quit [Quit: This computer has gone to sleep]
justinseiter_ has quit [Ping timeout: 248 seconds]
__butch__ has joined #ruby-lang
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
justinseiter has joined #ruby-lang
Carnage\ has quit []
justinseiter_ has joined #ruby-lang
Carnage\ has joined #ruby-lang
xyzodiac has joined #ruby-lang
justinseiter has quit [Ping timeout: 252 seconds]
bastilian has quit [Quit: Leaving...]
sn0wb1rd has joined #ruby-lang
justinseiter_ has quit [Ping timeout: 245 seconds]
justinseiter has joined #ruby-lang
areil has quit [Remote host closed the connection]
sent-hil has joined #ruby-lang
fushi has joined #ruby-lang
justinseiter_ has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
alvaro_o has joined #ruby-lang
Carnage\ has quit []
BigO has quit [Remote host closed the connection]
justinseiter has quit [Ping timeout: 256 seconds]
Carnage\ has joined #ruby-lang
justinseiter_ has quit [Ping timeout: 264 seconds]
bhus has joined #ruby-lang
BigO has joined #ruby-lang
justinseiter has joined #ruby-lang
swav has quit [Remote host closed the connection]
justinseiter_ has joined #ruby-lang
mindbender1 has joined #ruby-lang
fushi has quit [Quit: fushi]
ivanoats has joined #ruby-lang
justinseiter_ has quit [Read error: Operation timed out]
justinseiter has quit [Ping timeout: 248 seconds]
towski has joined #ruby-lang
davidbalber|away is now known as davidbalbert
justinseiter has joined #ruby-lang
dalekurt_ has quit [Read error: Operation timed out]
justinseiter_ has joined #ruby-lang
sush24_ has joined #ruby-lang
BigO_ has joined #ruby-lang
sepp2k has joined #ruby-lang
justinseiter has quit [Read error: Operation timed out]
BigO has quit [Ping timeout: 256 seconds]
banister_ has left #ruby-lang [#ruby-lang]
banisterfiend has joined #ruby-lang
<banisterfiend> anyone here use rbenv?
justinseiter has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
justinseiter_ has quit [Ping timeout: 256 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby-lang
<foucist> banisterfiend: hey, i'm sure a lot of people do.. why not ask your question anyways :P
__butch__ has quit [Quit: Leaving.]
<banisterfiend> ok, how do i pass along compile options when building a ruby? I specifically want -O0
<banisterfiend> (no optimization)
<banisterfiend> building a ruby with rbenv
mrsolo has joined #ruby-lang
justinseiter has quit [Ping timeout: 248 seconds]
<cout> banisterfiend: I think you can just set CFLAGS when you ru nmake
<cout> e.g. CFLAGS=-O0 make
xyzodiac has joined #ruby-lang
<cout> or maybe it's make CFLAGS=-O0
<cout> I can never remember which one works
<reactormonk> cout, both should actually work
<banisterfiend> cout: ah, but im not explicitly using 'make' im just using rbenv commands, but you think if i set CFLAGS rbenv will use those anyway?
<reactormonk> the first is usual bash syntax for env vars, the second one make syntax
<reactormonk> banisterfiend, if you export them
<foucist> banisterfiend: yeah i mean, you could try alias rbenv="CFLAGS=-O0 rbenv" or export CFLAGS=-O0 in your shell config
<cout> reactormonk: I've seen makefiles that ignore CFLAGS in one case and not in the other
<foucist> dunno if the alias trick would actually pass that to the compile
justinseiter has joined #ruby-lang
<banisterfiend> foucist: but really, wondered if rbenv had some built in options or strategy for doing this
<banisterfiend> i wondered*
<foucist> i'm not familiar with rbenv personally
m3nd3s has quit [Remote host closed the connection]
Hakon has joined #ruby-lang
hahuang65 has joined #ruby-lang
hahuang65 has quit [Client Quit]
<reactormonk> cout, then it's a fail of a makefile...
<reactormonk> cout, but that's possible either way
<cout> yep
sush24_ has quit [Quit: Leaving]
esad has joined #ruby-lang
apod has joined #ruby-lang
<rking> If you step back and think about the editing you do, you will invariably find the 'end' is a burdensome thing to edit.
<banisterfiend> rking: y?
<rking> Indentation-significant blocks, for whatever argument might exist against it, is less redundant
<rking> banisterfiend: I just find myself constantly having to fiddle with them
bastilian has joined #ruby-lang
<banisterfiend> rking: in emacs i have a hot key, i just press it, and it fixes up all indentation in teh buffer immediately
<rking> Yep, vim has that too, but you shouldn't have to hit it so much
<rking> Take the case of a simple 'Extract Method'
<cout> gg=G
sent-hil has joined #ruby-lang
<rking> Instead of taking the original sub-method, replacing it with a name, then going down and saying 'def newname' and pasting the body, you have to hop down and type a stupid 'end'
banisterfiend has quit [Remote host closed the connection]
<rking> It's probably 20 little things like that, all not in favor of 'end'
<rking> I argumentated so greatly that he quit. \o/
<bougyman> when I type dev newname the end automatically gets inserted.
<bougyman> I can't remember the last time I typed an 'end'
<bougyman> er def newname
cultureulterior_ has quit [Quit: cultureulterior_]
<bougyman> tis a habit from lisp where I always wanted the closing paren.
<rking> bougyman: I have that, too, thanks to endwise.vim — but they *still* get in the way
<bougyman> doesn't seem to happen here, i just have a one-liner that does it i got from some vimtip
<rking> Even with several layers of editor hacks to make up for the misfeature, they're still a nuisance
banisterfiend has joined #ruby-lang
<rking> bougyman: Just try to step back and see how many 'end'-related edits happen. It's a lot
<rking> All for IMO nothing
__butch__ has joined #ruby-lang
<bougyman> i don't do many end-related edits, that's what i'm saying.
<bougyman> i can't remember the last time I had to touch and end line
<eam> I'd rather make a bit of work for the author than to lose clear semantic meaning for subsequent readers
<eam> a good language is not about ease of writing, it's about ease of reading
<bougyman> +1
<rking> Heh, except the 'end's don't do anything for that.
<eam> I strongly disagree
<rking> Just redundant against what you already said with the blocks.
<bougyman> as do I.
<banisterfiend> eam: so you find python code harder to read?
<bougyman> are you proposing dropping the end and replacing it with indentation rules?
<eam> banisterfiend: yes, I do
<bougyman> are you aware there's python out there?
<rking> bougyman: For the next language after Ruby, yes.
<bougyman> python is a great language that I rarely touch because doing so makes me want to poke my eyes out.
<eam> in fact I even dislike ruby's end-of-statment semantics
<rking> eam: Hehe, OK. We're very different people. Screw explicit ;'s.
<banisterfiend> eam: what do u mean?
<eam> banisterfiend: I favor the semicolon
<bougyman> ew
<bougyman> now I fight you, too. hate explicit semicolon.
vlad_starkov has quit [Remote host closed the connection]
justinseiter_ has joined #ruby-lang
xyzodiac has quit [Quit: Computer has gone to sleep.]
<eam> and I hate any situation where some whitespace is more significant than other whitespace :)
<eam> but to each his own
<banisterfiend> eam: so, if you had a method that was just returning 'x' you'd just have: x;
<banisterfiend> on a line by itself?
<bougyman> i like as little punctuation as possible. but no less.
<eam> banisterfiend: sure
<banisterfiend> eam: that would look weird :)
<eam> banisterfiend: though I prefer "return x"
<bougyman> he probably would type 'return x;' even if it were implicit.
<bougyman> I do that often.
<bougyman> because then if I move code around I know that that's supposed to return.
<eam> I think implied contextual behavior makes code harder to read
<bougyman> well, i do 'return x', not 'return x;'
<bougyman> the semicolon seems to add nothing.
<bougyman> just works your pinkie
vlad_starkov has joined #ruby-lang
<banisterfiend> eam: i guess you're against 'everything is an expression' too?
<eam> bougyman: if it makes you feel better I don't feel as strongly about the semicolon as I do about explicit block ends
<eam> banisterfiend: how do you mean?
<eam> bougyman: but the thing the semicolon adds in value is an explicit, clear delineation between statements.
<banisterfiend> eam: in ruby, everything (or nearly everything) is an expression, everything returns a value. So you can go: x = if cond; y; z; end
<banisterfiend> eam: even class definitions return values, and method definitions
bastilian has quit [Quit: Leaving...]
<banisterfiend> eam: there is no distinction between "statements" and "expressions"
<eam> banisterfiend: that's fine. The reason I would use a return is to make intent clear
esad has quit [Quit: Computer has gone to sleep.]
Guest50800 is now known as ged
anjen has joined #ruby-lang
<eam> the utility and design of the language is distinct from the effort necessary to write code which makes intent clear
<eam> I can make many syntatically correct constructs in English, but I would be a poor writer if I used many of them
<banisterfiend> eam: so...you would have to maek such a distinction (which would be artificial in ruby) as i doubt you'd want people to end if-expressions with semicolons ?
Theueip has joined #ruby-lang
ged has joined #ruby-lang
<eam> banisterfiend: "end" and "}" and ";" are all non-whitespace identifiers. I'm ok with any of them ending a statement
esad has joined #ruby-lang
<bougyman> eam: you'd need end;, though
<rking> eam: Explicit returns punish short methods
<bougyman> to keep consistent
<eam> The use of the semicolon is in clearly distinguishing between two adjacent statements
<banisterfiend> eam: but that would be confusing to people coming from C, whre struct definitions to end with a ;
vlad_starkov has quit [Ping timeout: 260 seconds]
<banisterfiend> do*
<rking> And short methods are something I ♥, so explicit returns are something I ☠.
<eam> banisterfiend: blocks in C do not end with a ;
<banisterfiend> eam: struct definitions do
<eam> banisterfiend: I agree C's syntax is not as clean as it could be
<eam> I prefer ruby's syntax over C's, all told
<banisterfiend> yeah.
<banisterfiend> eam: so..in your idea, a pure method invocation would end with a ';' but a method invocation that takes a block wouldn't need one?
workmad3 has quit [Ping timeout: 250 seconds]
<eam> the reason I like the semicolon is to remove this kind of confusion: eval("1 - 1") vs eval("1 \n - 1") vs eval("1 - \n 1")
<eam> banisterfiend: something like that, sure
<eam> banisterfiend: I like perl's handling of the semicolon, for example
dc5ala has joined #ruby-lang
<rking> eam: Backslash also removes that confusion
<eam> rking: well, the semicolon only works if it's always required
<rking> Multi-line statements are less common, so it's a misoptimization to require a token for single-line statements.
<eam> see, again I prefer slightly more verbose syntax in the interest of removing ambiguity
<eam> anyway, it's a relatively minor thing
<rking> There isn't any ambiguity. The only ambiguity would be for people that don't know the language.
rins has joined #ruby-lang
m3nd3s has joined #ruby-lang
<rking> And again, people that don't know the language are less common, so catering to them is a misoptimization.
<eam> well, I disagree. People aren't perfect and mistakes happen
<ggreer> rking: just curious, why didn't you use if (pattern[0] == '/') ?
<eam> I've personally been bitten by placing an operator on the wrong line
<rking> ggreer: D'oh! Not thinking at all.
<ggreer> no biggie. that strcmp takes like 1 nanosecond
<rking> ggreer: I was mostly just trying to think about if I was going to be screwing up the behavior.
<ggreer> heh
<ggreer> it's fine
* ggreer merges
<rking> ggreer: I'd rather it be the char comparison so it communicates intent better. The strncmp() makes people stop and scratch their heads
<rking> ggreer: Can I redo it with that patch before you do?
<ggreer> hmm... well I need to find an appropriate animated gif before I can merge it
<ggreer> so... yeah go for it
datanoise has quit [Ping timeout: 260 seconds]
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
<rking> ggreer: (k)
sent-hil has quit [Remote host closed the connection]
sent-hil has joined #ruby-lang
<sent-hil> how to get list of constants defined by user?
<sent-hil> I did Object.constants(false), that listed everything
<rking> Anyone know if there's a Ruby profiler comparable to this badboy? http://search.cpan.org/dist/Devel-NYTProf/lib/Devel/NYTProf.pm#NAME
<rking> sent-hil: You could snapshot the list before the user gets a chance to define any more, then Array#- them
<rue> rking: Did you try running it with ruby --perl ?
apod has quit [Quit: Leaving]
Croms has quit [Quit: Croms]
<naquad> can i somehow tell bundle to allow system gems on deployment?
<rking> naquad: Sure. rm Gemfile
<rking> Aka don't use it
<rking> naquad: But Bundler solves a lot of deployment nightmares, so I'd not do that.
<rking> rue: Sure didn't. ☺
Croms has joined #ruby-lang
zmack has quit [Remote host closed the connection]
chaosis has quit [Ping timeout: 260 seconds]
<sent-hil> rking: good idea, thx
sent-hil has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 245 seconds]
Mon_Ouie has joined #ruby-lang
brianpWins has joined #ruby-lang
<rking> ggreer: Wow.
<rking> I guess I'm going to have to do another Pull Req to see what happens.
<ggreer> heh
methods has quit [Ping timeout: 248 seconds]
<rking> ggreer: Which would you rather see? Ag.vim or a part of Ack.vim's README that says how to configure it for ag?
<rking> (Or both?)
<rking> Also, do you use :Ack ?
dankest has joined #ruby-lang
<ggreer> :ack?
<ggreer> my main editor is textmate 1.5
<rking> Aha
<rking> So do you have any ag → editor integration?
rolfb has quit [Quit: Linkinus - http://linkinus.com]
<ggreer> yeah. I forked ackmate
rippa has quit [Ping timeout: 256 seconds]
<ggreer> since I don't use vim, I have no preference. I think ack and ag are similar enough that there's no need for an ag.vim
<ggreer> the minimum necessary change would be to add to ack.vim's readme
<rking> But :Ag is 33⅓% shorter than :Ack
<ggreer> heh
xyzodiac has joined #ruby-lang
datanoise has joined #ruby-lang
sent-hil has joined #ruby-lang
methods has joined #ruby-lang
<rking> I think it'd be best to draw maximum attention to ag by having both an explicit plugin + Ack.vim README mention.
<rking> We'll see.
<sent-hil> when I extend a module with #initialize method, why am I not able to call the #initialize method?
<rking> sent-hil: Well, #initialize is called on an instance
<rking> But Module's are not supposed to be instantiated. Would be a fun hack to attempt to make them instantiatable, though. ☺
<sent-hil> rking: i didn't want mods to be initialize, just wanted a default #initialize method
<sent-hil> rking: i thought #new and #initialize were pretty much the same, except #new returns the instance at the end
<rking> .new not #new
<sent-hil> rking: right
workmad3 has joined #ruby-lang
<sent-hil> rking: awesome, thx!
datanoise has quit [Ping timeout: 255 seconds]
anjen has quit [Quit: anjen]
chaosis has joined #ruby-lang
apeiros_ has joined #ruby-lang
xyzodiac has quit [Quit: Textual IRC Client: www.textualapp.com]
schaerli has joined #ruby-lang
willdrew has joined #ruby-lang
headius has joined #ruby-lang
BlaXpirit-UA has quit [Ping timeout: 245 seconds]
dalekurt has joined #ruby-lang
BlaXpirit-UA has joined #ruby-lang
ebouchut has joined #ruby-lang
ebouchut has quit [Client Quit]
ebouchut has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
runeb has joined #ruby-lang
JohnBat26 has joined #ruby-lang
<tockitj_> how does ruby denote class methods (if instance methods are using this notation: Enumerate#map)
sent-hil has quit [Remote host closed the connection]
<apeiros_> tockitj_: ::
<apeiros_> Time::at
<apeiros_> vs. Time#strftime
adambeynon has joined #ruby-lang
<tockitj_> apeiros_, thank you (:
kurko_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
datanoise has joined #ruby-lang
runeb has quit [Ping timeout: 260 seconds]
dalekurt has quit [Ping timeout: 265 seconds]
sent-hil has joined #ruby-lang
<rking> What's wrong with Time.at ?
ryanf has joined #ruby-lang
<rking> I actually don't get why the :: is ever used for class methods.
workmad3 has quit [Ping timeout: 252 seconds]
<bougyman> because it can be
<bougyman> if something can be done, someone will do it
<bougyman> and have a fully rationalized reason for doing so.
sent-hil has quit [Remote host closed the connection]
BlaXpirit-UA has quit [Quit: Quit Konversation]
<rking> That's a meta-rationalization.
<rking> I'm waiting for the non-meta-rationalization.
datanoise has quit [Ping timeout: 255 seconds]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
savage- has joined #ruby-lang
Mon_Ouie has quit [Read error: Connection reset by peer]
ryanlecompte has quit [Ping timeout: 256 seconds]
solars has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
heftig has quit [Read error: Connection reset by peer]
heftig_ has joined #ruby-lang
savage- has quit [Remote host closed the connection]
ryanlecompte has joined #ruby-lang
carloslopes has joined #ruby-lang
carloslopes has quit [Remote host closed the connection]
sent-hil has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
solars has quit [Ping timeout: 256 seconds]
<tockitj_> how to get method caller object
<banisterfiend> tockitj_: huh?
<tockitj_> just wandering if it is possible at all
lcdhoffman has joined #ruby-lang
<tockitj_> it can be convenient for 'event handlers', to be able to reach object that invoked them
chimkan has joined #ruby-lang
<banisterfiend> tockitj_: i wrote a gem for that, but it's naughty
<banisterfiend> tockitj_: dont use it in production
<tockitj_> heh, ok.. i'll just pass caller object.. or do some redesign
<rking> banisterfiend: What kind of failure do you picture it having in production?
towski has quit [Remote host closed the connection]
<rking> tockitj_: Actually, I think LSpace is worth looking into for your problem: http://cirw.in/blog/lspace
<banisterfiend> rking: i'm just not 100% sure it's not going to cause a segfault
ebouchut has quit [Quit: This computer has gone to sleep]
<rking> My vote is to start saying the opposite.
<rking> Then we'll find out if that happens.
<rking> Submit a pull req to Rails core and we'll find out real fast
<banisterfiend> lols
<banisterfiend> yeah it'd be hilarious if binding_of_caller got used in large, important gems
<banisterfiend> (outside of debugging gems of course)
<reactormonk> zenspider, how do you type do/end with enh-ruby-mode? always have to indent the 'end' manually
<rking> What's a use that it might have "in production"?
dc5ala has quit [Quit: Ex-Chat]
<rking> I'm sure it could DRY up something or another.
<banisterfiend> rking: ultra clean DSLs i guess
<rking> Oh, yeah definitely.
<rking> That's what we should do. Cook up a DSL that's based on it
<banisterfiend> well it already kind of made it into ruby 2.0
<reactormonk> no refinements though
lcdhoffman has quit [Quit: lcdhoffman]
Swimming_Bird has joined #ruby-lang
BlaXpirit has joined #ruby-lang
Carnage\ has quit []
<banisterfiend> reactormonk: they did, they're just limited
datanoise has joined #ruby-lang
<reactormonk> banisterfiend, oh? good to know
workmad3 has joined #ruby-lang
gsav_ has quit [Ping timeout: 252 seconds]
postmodern has joined #ruby-lang
rolfb has joined #ruby-lang
sent-hil has quit [Remote host closed the connection]
<tubbo> *sigh*…Elm is yet another reason why I wish we could write Ruby natively in the browser.
<tubbo> ruby would be perfect for the many applications currently dominated by browser JS
schaerli has quit [Remote host closed the connection]
sepp2k1 has joined #ruby-lang
gsav has joined #ruby-lang
sepp2k has quit [Ping timeout: 256 seconds]
m3nd3s has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 252 seconds]
afgeneralist has joined #ruby-lang
<yorickpeterse> except it's nowhere near as fast
<yorickpeterse> I'd say Lua would be a far better candidate
nignaztic has joined #ruby-lang
<tubbo> i guess if you were to make ruby "as fast" as JS, you'd have to remove significant parts of the stdlib
<tubbo> yorickpeterse: how does lua handle dependency management, requires/includes, etc.?
<reactormonk> or go with parenscript and macros :)
* lupine tries to work out why ruby would necessarily be slower than JS
<tockitj_> coffee script?
<lupine> preprocessor for JS
<tockitj_> correct (:
bradland has joined #ruby-lang
<reactormonk> lupine, still doesn't really help the fact for total lack of custom elements in a collcetion
<zzak> obviously if you want ruby to be faster than JS you need to remove the gvl and do everything async
<tubbo> tockitj_: i find you need to understand more about how JS works if you want to use Coffee
lordnaz has joined #ruby-lang
<lupine> ?
<bradland> so i'm pretty behind the times, i guess. i just read about fizzbuzz and wanted to see if i could do it quickly.
nignaztic has quit [Ping timeout: 265 seconds]
<bradland> this is what i came up with
<lianj> zzak: huh, v8 has a gvl too
<bradland> would that pass?
<bradland> i wasted some time trying to use a ternary operator on the if/else, but using puts within the ternary didn't work too well
<zzak> lianj: i fail at trolling
<bradland> could have assigned i suppose, but just went with the if/else
Nisstyre-laptop has quit [Ping timeout: 260 seconds]
<lupine> f||b ? puts f+b : puts i ought to work
<lupine> not that it matters, they're equivalent
<lupine> getting it down to a single puts might save you some time
<lupine> (or it might noot)
<lupine> in general, you want to collect an array of unmunged strings and do one big join at the end
MaddinXx has joined #ruby-lang
<yorickpeterse> tubbo: similar as with other languages
<yorickpeterse> the package manager is called luarocks
<bradland> lupine: thx for the feedback
KU0N has joined #ruby-lang
<lianj> yorickpeterse: but lua syntax sucks
<KU0N> Hello
davidbalbert is now known as davidbalber|away
<yorickpeterse> "But it's not Ruby!" - Every counter argument in #ruby-lang :)
lcdhoffman has joined #ruby-lang
<bradland> lupine: it looks like using puts in the ternary call throws an error every time
<bradland> hrm
<lupine> the ternary form requires brackets around function arguments, it seems
<lianj> yorickpeterse: no, its more annoying than prototype based
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<bradland> even with paren, it breaks: https://gist.github.com/4198165
<bradland> seems ternary is hard to work in there
<bradland> i have an idea though
<KU0N> Is it possible, when loading a file, to put it into a namespace (Module). For example if I require 'json' I want to access JSON like Something::JSON instead of JSON directly.
<bradland> i could just puts the block
<bradland> and use a return value
<andrewvos> KU0N: String concatenation?
cyri_ has joined #ruby-lang
<KU0N> I need that, because I have two rails application I'd like to load in the same script, but those two apps have the same model names
<lupine> I'm sure there's blazingly faster ways to do it
<bradland> lupine, yeah, that's more or less the same method i started with
<bradland> i collapsed some of the if/thens
<bradland> wanted it to be concise but readable
<bradland> would h
<rking> *Why* do people even mention speed on FizzBuzz solutions?
<bradland> would have liked a ternary in there
<lupine> c'est la vie, I guess
<bradland> i think your "first" solution to fizz buzz is the most important
<bradland> took me about three minutes
<bradland> i'm a "project manager", so i feel pretty good about that time
havenn has joined #ruby-lang
<lupine> if you want fast, uase a precomputed lookup table ^^
schaerli has joined #ruby-lang
<bradland> i'm sure there are plenty of people who could do it in 30 seconds
<rking> If you want it to be fast, don't use Ruby for this task
<bradland> lol
<lupine> well, "with ruby" is part of the problem description
<lupine> you could probably wrap any of these methods in ruby2c
<bradland> fizz buzz obviously isn't a speed problem
<rking> Then you're going to have to get very intimate with the way Ruby's string handling works
<lupine> which totally wouldn't be cheating
<bradland> it's a "can you solve this simple problem" problem
<lupine> rking, I managed to shave a good ten minuites off of a problem job at work by doing so
<lupine> well, that plus a few other bits
<rking> But it's ridiculous to try to optimize Ruby at the level of asking, "Is it faster to use a .join("\n") or a str += x + "\n" ?"
<lupine> notionally, for fizzbuzz, sure
<rking> Just code whichever is clearest
<lupine> but if it gets you an idea of what's happening behind the scenes, it can be very handy
davidbalber|away is now known as davidbalbert
<bradland> i still kind of like my original solution https://gist.github.com/4198093
<bradland> it reads like it describes the problem
<lupine> progressively building up larger and larger strings over time is remarkably slow
<rking> lupine: I like that one *so* much better.
<rking> s/lupine/bradland/
MaddinXx has quit [Remote host closed the connection]
<lupine> shame it's incorrect ^^
<bradland> it is?
<lupine> f||b rather than f&&b
<lupine> at least, if I understand the problem description correctly
<bradland> f&&b would only print if both were true
<lupine> right, which is what you want
<lupine> "fizzbuzz" printed if the number is divisible by both 3 and 5
<rking> lupine: You're being dumb.
<lupine> ?
<rking> That's the most accurate thing you've said so far.
<rking> bradland's is identical in output to yours.
* rking is being surly. Sorry.
nignaztic has joined #ruby-lang
dankest is now known as dankest|away
adambeynon has quit [Quit: Computer has gone to sleep.]
<bradland> lupine: the key to my solution is that f or b may be nil, in which case it won't be printed
<bradland> but that's a good sign that my example is bad
<bradland> it should be easily interpreted
<bradland> if it's non-obvious, it's no good, IMO
<rking> bradland: It's plenty obvious to someone who knows Ruby
<bradland> i should have left it with the if/elsif statements
<rking> And if someone is unsure about how it acts, they're in for an educational moment.
savage- has joined #ruby-lang
tridge has joined #ruby-lang
lordnaz has quit [Ping timeout: 256 seconds]
<lupine> oh $deity, you're right
<bradland> :)
<yorickpeterse> lianj: "the syntax sucks" "it's more annoying that prototype based" wat
nignaztic has quit [Client Quit]
nignaztic has joined #ruby-lang
<lupine> it's been a long, bad day
<lianj> yorickpeterse: yea, unrelated failures
ryanlecompte has quit [Ping timeout: 244 seconds]
davidbalbert is now known as davidbalber|away
tridge has quit [Remote host closed the connection]
bhus has quit [Quit: Leaving]
leopard_me has quit [Quit: Computer has gone to sleep.]
mjio has joined #ruby-lang
heftig_ is now known as heftig
chimkan has quit [Quit: chimkan]
bluepojo has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
<tockitj_> quote of a friend: 'If I have a private method called `foo=`, I *must* use `self`. If I have a private method called `foo`, I am *forbidden* to use `self`.'
<tockitj_> this is... ugly
elephants has joined #ruby-lang
elephants has left #ruby-lang [#ruby-lang]
<bradland> tockitj_: not sure I understand? i thought the purpose of 'self' is to make a class method, versus an instance method. i'm not sure what that has to do with wether the method is private.
<bradland> (asking because I'm learning, not because I think I'm right )
KU0N has left #ruby-lang [#ruby-lang]
<drbrain> bradland: when calling the method
lcdhoffman has quit [Quit: lcdhoffman]
<bradland> ah, ok. that makes sense then.
charliesome has joined #ruby-lang
<reactormonk> tockitj_, yep. in the first case, you would otherwise assign a local var.
rolfb has quit [Quit: Linkinus - http://linkinus.com]
<reactormonk> tockitj_, in the second case, you would call the method from out of scope, since you use explicit addressing.
lcdhoffman has joined #ruby-lang
<drbrain> bradland: actually, it's a little odd. Normally when calling private methods you can't supply a receiver, but self.foo= is a special case
elephants has joined #ruby-lang
<lupine> \o/ :)
dalekurt has joined #ruby-lang
apod has joined #ruby-lang
<drbrain> def foo(a) p a end; private :foo; self.foo 1 # => private method `foo` called for main
<drbrain> change foo to foo= and you won't get an error
schaerli has quit [Remote host closed the connection]
BigO_ has quit [Ping timeout: 244 seconds]
banisterfiend has quit [Ping timeout: 245 seconds]
elephants has left #ruby-lang [#ruby-lang]
methods has left #ruby-lang [#ruby-lang]
m3nd3s has joined #ruby-lang
sailias has quit [Quit: Leaving.]
lcdhoffman has quit [Quit: lcdhoffman]
<tockitj_> drbrain, i'd say that its more than little odd (:
<tockitj_> is there a possibility for change of this behavior ?
<tockitj_> private methods & accessors are not exactly rarity in ruby
<drbrain> tockitj_: unlikely, it's the only way you can make a private assignment method
sent-hil has joined #ruby-lang
_tca has joined #ruby-lang
BigO has joined #ruby-lang
slyphon__ has quit [Ping timeout: 245 seconds]
datanoise has quit [Ping timeout: 250 seconds]
BlaXpirit has quit [Quit: Quit Konversation]
willdrew has quit [Ping timeout: 255 seconds]
chaosis has quit [Ping timeout: 260 seconds]
Theueip has quit [Quit: Leaving...]
ryanf has quit [Ping timeout: 265 seconds]
bradland has quit [Quit: bradland]
schaerli has joined #ruby-lang
rsl has quit [Quit: Computer has gone to sleep.]
esad has quit [Quit: Computer has gone to sleep.]
<postmodern> what type of exceptions can Nokogiri::HTML() raise?
<postmodern> also http://nokogiri.org/Nokogiri/filter_methods returns 500 too easily
<andrewvos> postmodern: All the time for me.
esad has joined #ruby-lang
dankest|away is now known as dankest
Nisstyre-laptop has joined #ruby-lang
lcdhoffman has joined #ruby-lang
schaerli has quit [Remote host closed the connection]
davidbalber|away is now known as davidbalbert
headius has quit [Quit: headius]
datanoise has joined #ruby-lang
buscapepe has joined #ruby-lang
buscapepe has quit [Remote host closed the connection]
buscapepe has joined #ruby-lang
nignaztic has quit [Ping timeout: 256 seconds]
rivaler has quit [Quit: rivaler]
ryanf has joined #ruby-lang
datanoise has quit [Ping timeout: 252 seconds]
slyphon__ has joined #ruby-lang
imajes has quit [Excess Flood]
workmad3 has joined #ruby-lang
imajes has joined #ruby-lang
cyri_ has quit [Quit: cyri_]
apod has quit [Quit: Leaving]
runeb has joined #ruby-lang
enebo has quit [Quit: enebo]
esad has quit [Quit: Computer has gone to sleep.]
cyri_ has joined #ruby-lang
runeb has quit [Ping timeout: 244 seconds]
davidbalbert is now known as davidbalber|away
Carnage\ has joined #ruby-lang
stardiviner has joined #ruby-lang
lewrker has quit [Ping timeout: 252 seconds]
lewrker has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
chimkan_ has joined #ruby-lang
chimkan_ has quit [Client Quit]
jds_ has joined #ruby-lang
_tca has quit [Read error: Connection reset by peer]
jds has quit [Ping timeout: 244 seconds]
Carnage\ has quit []
datanoise has joined #ruby-lang
banisterfiend has joined #ruby-lang
Drekonus has joined #ruby-lang
slyphon__ has quit [Ping timeout: 245 seconds]
gsav_ has joined #ruby-lang
nignaztic has joined #ruby-lang
chimkan has joined #ruby-lang
buscapepe has quit [Remote host closed the connection]
justinseiter_ has quit [Ping timeout: 260 seconds]
datanoise has quit [Ping timeout: 260 seconds]
justinseiter has quit [Ping timeout: 250 seconds]
slyphon__ has joined #ruby-lang
pdswan_ has quit [Quit: pdswan_]
pdswan has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
gsav has quit [Ping timeout: 256 seconds]
gsav_ has quit [Ping timeout: 248 seconds]
ivanoats has quit [Remote host closed the connection]
slyphon__ is now known as slyphon
davidbalber|away is now known as davidbalbert
Drekonus has quit [Quit: Leaving.]
sent-hil has quit [Remote host closed the connection]
justinseiter_ has joined #ruby-lang
justinseiter has joined #ruby-lang
mars777 has quit [Quit: mars777]
chaosis has joined #ruby-lang
imajes has quit [Excess Flood]
justinseiter_ has quit [Ping timeout: 245 seconds]
justinseiter has quit [Ping timeout: 245 seconds]
imajes has joined #ruby-lang
stardiviner has quit [Ping timeout: 245 seconds]
davidbalbert is now known as davidbalber|away
faustman has quit [Ping timeout: 255 seconds]
justinseiter has joined #ruby-lang
justinseiter_ has joined #ruby-lang
justinseiter__ has joined #ruby-lang
cyri_ has quit [Quit: cyri_]
havenn has quit [Ping timeout: 256 seconds]
dankest is now known as dankest|away
nignaztic has quit [Quit: WeeChat 0.3.7]
brainspoil has joined #ruby-lang
justinseiter has quit [Ping timeout: 256 seconds]
justinseiter_ has quit [Ping timeout: 264 seconds]
justinseiter__ has quit [Ping timeout: 252 seconds]
brainspoil has quit [Client Quit]
workmad3 has quit [Read error: Operation timed out]
justinseiter has joined #ruby-lang
justinseiter_ has joined #ruby-lang
justinseiter__ has joined #ruby-lang
brianpWins has joined #ruby-lang
Drekonus has joined #ruby-lang
<zenspider> tockitj_: private methods outside of rails controllers aren't exactly abundant either.