<crankharder>
is there any way to make irb never output more than X amount of text?
kgrz has quit [Quit: Computer has gone to sleep.]
<crankharder>
like... say I did "a" * (10**100) -- that'd just scroll forever and ever. can i make irb cut that off automatically and give me my prompt back?
sn0wb1rd has joined #ruby-lang
<crankharder>
also, i'd rather not kill the console as i may have variables in it that i'm currently working with
ryanf has quit [Ping timeout: 256 seconds]
<crankharder>
also, i'm currently waiting for a terminal to stop scrolling right now, so i'll just keep trolling here
<crankharder>
:)
irleif has quit [Quit: Computer has gone to sleep.]
<heftig>
you could redefine ::IRB::Irb#output_value with whatever you want
mistym has quit [Remote host closed the connection]
alvaro_o has quit [Quit: Ex-Chat]
datanoise has joined #ruby-lang
irleif has joined #ruby-lang
<crankharder>
heftig: how does one do that?
Mon_Ouie has joined #ruby-lang
<heftig>
class ::IRB::Irb; alias :_old_output_value :output_value; def output_value; if @context.inspect?; ...output @context.last_value here...; else; _old_output_value; end; end; end
justinmcp has quit [Remote host closed the connection]
bousquet has quit [Read error: Connection reset by peer]
havenn has quit [Remote host closed the connection]
<cardoni>
nice
ridders24 has joined #ruby-lang
<cardoni>
erikh: do you mostly do sys admin type of work? (You have a crap ton of interesting chef-related repos on gh)
<ridders24>
hey guys, using the twitter gem and testing in irb, however when I try to request the first message from the timeline i get an error of Bad Authentication data. Why?
<erikh>
cardoni: these days, yeah.
ryanf has quit [Quit: leaving]
<cardoni>
nice. our sysadmin guy swears by chef. bastard keeps his recipes close to his chest, though
<cardoni>
hah
<erikh>
he doesn't really get devops, then.
snorkdude has quit [Remote host closed the connection]
<erikh>
the current place I'm at is pretty formative when it comes to infra still, but a big priority for me is getting to the point where our team is secure enough in giving the keys to the devs for the less complicated matters.
<erikh>
adding new packages, tweaking deployment, etc.
<cardoni>
hah. he's mostly joking, except for whatever scripts related to business he feels have more sensitive data and whatnot in 'em. The second request to check out his stuff is all it usually takes I've found.
<erikh>
ah, yeah. that's obviously a little more critical, but can be managed in other ways
<erikh>
e.g., you could have your chef tooling in one spot, and your sensitive bits in another, and make the non-sensitive bits available to the team
<cardoni>
Yeah, not sure why he doesn't just keep sensitive stuff in one yaml or something
<erikh>
but yeah, as long as he's not being all basement dweller sysadmin about it
<erikh>
store run, bbiab.
<cardoni>
later
flebel has quit [Read error: Connection reset by peer]
ridders24 has quit [Quit: Leaving]
flebel has joined #ruby-lang
twintail has joined #ruby-lang
sepp2k has joined #ruby-lang
roadt has quit [Ping timeout: 255 seconds]
roadt has joined #ruby-lang
dous has joined #ruby-lang
roadt has quit [Ping timeout: 245 seconds]
justinmcp has joined #ruby-lang
flebel has quit [Read error: Operation timed out]
flebel has joined #ruby-lang
icooba has joined #ruby-lang
sn0wb1rd has quit [Quit: sn0wb1rd]
wallerdev has quit [Quit: wallerdev]
Fullmoon has quit [Quit: Fullmoon]
Hakon has joined #ruby-lang
dous has quit [Remote host closed the connection]
<rking>
erikh: Ruby19Parser.new.parse() works perfectly fine.
<erikh>
interesting. good to know, thanks.
<rking>
erikh: If you're going to bug zenspider about it, I definitely advise doing so from the angle of, "Can you make the docs a bit clearer?" rather than "I found a bug: it doesn't support 1.9 style hashes"
<erikh>
yeah, I made a comment about the clarity of the docs earlier today, he wasn't in the mood for it
<rking>
I've had a similar experience for RubyInline. =)
<rking>
I bet he could get 10x the adoption if the docs were 2x better.
<erikh>
eh, I really doubt that.
<erikh>
there aren't many competing projects that do the same things and honestly, most of them have worse docs by comparison
justinmcp has quit [Remote host closed the connection]
<rking>
I wonder what takes the output of RubyParser/ParseTree and formats it back as text.
<erikh>
melbourne's docs don't even fill a single page of my browser window
<erikh>
dunno; he could definitely clarify that RubyParser isn't expected to work with 1.9, and that you should use Ruby19Parser though.
<erikh>
I'll ask him to.
icooba has quit [Quit: Computer has gone to sleep.]
<rking>
But even that isn't very clear.
<rking>
You have to gem install ruby_parser --pre
<rking>
2.3.1 doesn't give one hoot about 1.9, it seems.
<erikh>
oh, well, that may be why he hasn't changed the docs yet.
<rking>
The README.md for the project does say Ruby19Parser.new
kgrz has joined #ruby-lang
<erikh>
yeah, dunno. we're quickly heading back into that realm of pointless speculation, though.
<erikh>
yeah, not sure. considering the README.md on github probably reflects the prerelease (or an even newer tree) gem, intentions aren't very clear.
<rking>
Yes. The gem you get if you clone that repo then "rake gem" is the one that has Ruby19Parser, which is also the "gem install ruby_parser --pre" one.
<erikh>
diff them. also note that hoe has git tagging features on release.
Hakon has quit [Ping timeout: 245 seconds]
stiang has quit [Quit: stiang]
roadt has joined #ruby-lang
burgestrand has joined #ruby-lang
piyush has quit [Ping timeout: 252 seconds]
mytrile has joined #ruby-lang
anannie has joined #ruby-lang
facest has joined #ruby-lang
faces has quit [Ping timeout: 245 seconds]
kgrz has quit [Quit: Computer has gone to sleep.]
piyush has joined #ruby-lang
tbuehlmann has joined #ruby-lang
outoftime has joined #ruby-lang
ddv has quit [Changing host]
ddv has joined #ruby-lang
x0F__ has joined #ruby-lang
Assurbanipal has joined #ruby-lang
x0F__ is now known as x0F
x0F_ has quit [Ping timeout: 248 seconds]
justinmcp has joined #ruby-lang
jstemmer has quit [Quit: leaving]
sush24 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
twintail has quit [Quit: Leaving.]
wyhaines has joined #ruby-lang
banisterfiend has joined #ruby-lang
<banisterfiend>
sup
toretore has quit [Quit: Leaving]
cardoni has quit [Quit: cardoni]
stiang has joined #ruby-lang
outoftime has quit [Quit: Leaving]
stiang has quit [Client Quit]
wyhaines has quit [Remote host closed the connection]
benanne has joined #ruby-lang
stiang has joined #ruby-lang
jstemmer has joined #ruby-lang
anannie has quit [Read error: Connection reset by peer]
justinmcp has quit [Remote host closed the connection]
ananna has joined #ruby-lang
ananna has quit [Client Quit]
anannie has joined #ruby-lang
yats has quit [Ping timeout: 255 seconds]
jxie_ has joined #ruby-lang
<banisterfiend>
anannie: sup
tbuehlmann has quit [Remote host closed the connection]
<anannie>
hey banisterfiend
<anannie>
how are you doing today banisterfiend?
<banisterfiend>
anannie: not bad, u?
<anannie>
banisterfiend: Getting better all the time
jxie has quit [Ping timeout: 252 seconds]
kgrz has joined #ruby-lang
piyush has quit [Ping timeout: 245 seconds]
<rue>
What’s the state of the art in managing github from the CLI (main use case is pull requests both sending and receiving)? I’ve used git-pulls, but…?
<rue>
Semi-ot, but you’ll know
A124 has joined #ruby-lang
florentg2 has joined #ruby-lang
florentg2 has quit [Client Quit]
jxie_ has quit [Quit: leaving]
banisterfiend has quit [Read error: Connection reset by peer]
mytrile has quit [Quit: Leaving.]
roadt has quit [Ping timeout: 245 seconds]
kgrz has quit [Ping timeout: 246 seconds]
Axsuul has quit [Ping timeout: 276 seconds]
postmodern has quit [Quit: Leaving]
piyush has joined #ruby-lang
A124 has quit [Quit: Leaving.]
A124 has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
roadt has joined #ruby-lang
sush24 has joined #ruby-lang
krz has joined #ruby-lang
prathamesh_ has quit [Ping timeout: 260 seconds]
tbuehlmann has joined #ruby-lang
robbin_ has joined #ruby-lang
robbin_ has quit [Remote host closed the connection]
robbin_ has joined #ruby-lang
gmci has joined #ruby-lang
banisterfiend has joined #ruby-lang
<banisterfiend>
anyone here got ruby 1.8 ?
<matti>
I do.
<matti>
banisterfiend: ;] ;] ;] ;] ;] ;]
<banisterfiend>
matti: does Object#singleton_methods exist?
<tdy>
i can't call myself a grammar expert, so i can't say if it's strictly incorrect or just unnatural :)
<whitequark>
I know that the phrase was written by a russian programmer, and in Russian, the "given [noun]" is a correct, albeit slightly bureaucratic, word combination
datanoise has joined #ruby-lang
<whitequark>
the correct word-for-word translation would probably be "present [noun]"
elico has joined #ruby-lang
<whitequark>
it's not that I am, and I try not to bitch on people even when I'm 100% sure I'm correct, but looking at this phrase each time I open the project I work on is just too much
vlad_starkov has quit [Remote host closed the connection]
<tdy>
heh
achiu has joined #ruby-lang
<whitequark>
it awakens my inner grammar nazi, and he wants to spread fire and destruction.
Serial_Killer_C has quit [Remote host closed the connection]
havenn has joined #ruby-lang
jackhammer2022 has quit [Quit: Computer has gone to sleep.]
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
datanoise has quit [Ping timeout: 260 seconds]
ridders24 has joined #ruby-lang
<ridders24>
mistym: i looked into using the twitter API, however it appears that to even read somthing off a page, it requires me to be a authenticated user
<mistym>
ridders24: Oh, right. Authentication in the 1.1 API. Which is fairly dumb, and they don't even allow you to do it from a non-user context yet. But you can still use the old GET stuff from the v1 API for now without authenticating.
elico has quit [Quit: Elico]
<ridders24>
mistym: ahh ok maybe thats where i was going wrong then, cheers I'll look into that. Was frustrating keep getting the error about authentication
malev has quit [Remote host closed the connection]
slaytanic has joined #ruby-lang
vlad_starkov has joined #ruby-lang
BMF has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 246 seconds]
justinmcp has joined #ruby-lang
erichmenge has joined #ruby-lang
erichmenge has quit [Client Quit]
Carnage\ has quit [Ping timeout: 244 seconds]
twintail has joined #ruby-lang
_tca_ has quit [Quit: Lost terminal]
ryanlecompte has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
twintail has quit [Ping timeout: 260 seconds]
icooba has quit [Quit: Computer has gone to sleep.]
ryanlecompte has quit [Remote host closed the connection]
Axsuul has joined #ruby-lang
mytrile has joined #ruby-lang
elux has quit [Quit: Bye!]
snorkdude has joined #ruby-lang
gmci has joined #ruby-lang
havenn has quit [Remote host closed the connection]
justinseiter has quit [Read error: Operation timed out]
dinamicex1 has joined #ruby-lang
<dinamicex1>
Hi. Can someone explain me why when I declare a function( like attr_accessor) in the class Class then I can run that function inside an instance of the class Class (which is a class itself). Here is an example http://ideone.com/tE7LN
kentos has joined #ruby-lang
<steveklabnik>
dinamicex1: so
<steveklabnik>
there's a lot to this question
<steveklabnik>
the answer is 'because that's valid ruby'
<steveklabnik>
what part are you confused about, exactly?
voker57_ has quit [Ping timeout: 245 seconds]
<dinamicex1>
The fact that the function attr_accessor_with_history is defined in the class Class
<steveklabnik>
sure
<steveklabnik>
classes are classes in ruby
justinseiter has joined #ruby-lang
<steveklabnik>
;)
<steveklabnik>
1.9.3-p194 :001 > String.class => Class
voker57_ has joined #ruby-lang
<dinamicex1>
Yes.
<steveklabnik>
so, just like any other inheritance, if you defin something in Class, it will be available to all classes
<dinamicex1>
Wait? Is this inheritance?
<steveklabnik>
well
<steveklabnik>
i guess that's tricky, heh.
<dinamicex1>
I though a bit about it and it doesn't seem like it is. When I create a class like Foo I actually create an instance of the class Class
<steveklabnik>
sooo Class, Kernel, and Object are strange in ruby
<steveklabnik>
they have a werid relationship
<dinamicex1>
Not another class that inherits from Class.
workmad3 has joined #ruby-lang
<steveklabnik>
that would be Foo's singleton class. the 'instance of a class class'
<steveklabnik>
Foo itself would be a class that inherits from Class
<steveklabnik>
1.9.3-p194 :006 > class String
<steveklabnik>
1.9.3-p194 :007?> puts self.class
<steveklabnik>
1.9.3-p194 :008?> end
<steveklabnik>
Class => nil
<dinamicex1>
But if I will declare the attr_accessor_with_history in the Foo class, then why it wouldn't work to run attr_accessor_with_history :bar ?
<steveklabnik>
because of method lookup
<steveklabnik>
well
<steveklabnik>
if you define it inside Foo, it should work inside foos. I think. ugh, ruby hurts my brain sometimes. ;)