ChanServ changed the topic of #ruby-lang to: Ruby 1.9.3-p125: http://ruby-lang.org | Paste >3 lines of text on http://pastie.org or use a gist
Tick-Tock has joined #ruby-lang
<zenspider> Asher: why is that an asshole comment?
<postmodern> what's the best way to take a String read from IO, and evaluate it for #{}s
hangingclowns has quit [#ruby-lang]
<postmodern> eval("%{" + readline + "}") ?
<zenspider> now that's a username...
<shevy> ewwwwwww eval
<zenspider> %{ ?
<postmodern> zenspider, what I'm trying to do is read in shell commands, but process #{} in them
tommyvyo has joined #ruby-lang
<zenspider> I'd prolly use gsub w/ a block
<postmodern> zenspider, ah good idea
<zenspider> depends on the possibly complexity of the contents of #{}
<zenspider> since you'd have to factor in nested {} just in case
<Asher> zenspider - b/c it tells nothing about why it is empty or where to find initialize… granted i figured out a few minutes later i should be looking in ext but commenting that nothing is there doesn't help me figure that out
gregf has joined #ruby-lang
<Asher> perhaps i overstated it
<Asher> but it is annoying
<Asher> i mean at least tenderlove's code is nice and easy to read
<zenspider> I dunno the context... but sometimes you do that simplely to have something that prevents the superclass' init from running
Kero has joined #ruby-lang
burns180_ has joined #ruby-lang
<Asher> it appears in this case it's just a placeholder to define ruby-side init for a mostly-C-implemented class
musha68k has joined #ruby-lang
brushbox has joined #ruby-lang
Skif_home has joined #ruby-lang
jacktrick has joined #ruby-lang
cschneid has joined #ruby-lang
musl has joined #ruby-lang
tomzx has joined #ruby-lang
burns180_ has joined #ruby-lang
thone_ has joined #ruby-lang
<jaimef> is there a way to reference a Rakefile from rake(1) from a different directory tree?
looopy has joined #ruby-lang
<qpingu> jaimef: import ?
<zenspider> rake -f is the easiest
<zenspider> rake -g is the awesomest
<jaimef> ahh --rakefile duh
<zenspider> -R as well
<zenspider> too many options if anything
<zenspider> ok. nevermind on -g being awesome...
<zenspider> it doesn't add to the local rakefile... it overrides it entirely
<jaimef> yeah 'rake --help' was not as useful
looopy has joined #ruby-lang
gsav has joined #ruby-lang
Avanine_ has joined #ruby-lang
srbartlett has joined #ruby-lang
ascarter has joined #ruby-lang
srbartle_ has joined #ruby-lang
burns180 has joined #ruby-lang
Avanine has joined #ruby-lang
<zenspider> jaimef: sure seems useful to me
<jaimef> ENORAKEFILE
<zenspider> WFM
<jaimef> just get "Could not locate GEMFILE"
<zenspider> cd; rake --help | head -1 # => rake [-f rakefile] {options} targets...
<jaimef> odd
WillMarshall has joined #ruby-lang
gregmoreno has joined #ruby-lang
<zenspider> jaimef: I don't know how you got that ... but obviously something is screwed up on your end
<jaimef> yeap
<zenspider> try `gem pristine rake`
<jaimef> system alias rake="bundle exec rake"
<jaimef> fscked up
<zenspider> well then that's your own fault
<zenspider> :P
S1kx has joined #ruby-lang
S1kx has joined #ruby-lang
<jaimef> yeah if I knew about it no doubt
WillMarshall has joined #ruby-lang
jenrzzz has joined #ruby-lang
looopy has joined #ruby-lang
gregf has joined #ruby-lang
neoesque has joined #ruby-lang
seanstickle has joined #ruby-lang
fayimora has joined #ruby-lang
coreydaley has joined #ruby-lang
igotnolegs has joined #ruby-lang
darkf has joined #ruby-lang
QoQOoO has joined #ruby-lang
<andrewvos> Hey is there a way not to have to `bundle exec`?
<andrewvos> With rvm?
<shevy> awww
<andkerosine> Just alias it?
<shevy> bundle & rvm united
<shevy> pain 2.0
* shevy hugs andrewvos comfortingly
<zenspider> remove bundler
<shevy> btw, I do confuse you two and*s ... andkerosine and andrewvos, you are like brothers!
<andrewvos> I am the one that gives you shit any time I can shevy.
<andrewvos> By the way, you're a dick.
<shevy> andrewvos xchat is helping me, you are in pink
woollyams has joined #ruby-lang
srbartlett has joined #ruby-lang
<shevy> there is no worse colour than pink
<andrewvos> shevy: Dude, I'm in irssi and you're in pink.
<andrewvos> Also, they're all pink on the inside ;)
<andkerosine> It's all black in there.
WillMarshall has joined #ruby-lang
<shevy> you two are really brothers
<andshevy> hi :)
<andrewvos> Mother of God. There's two now.
<andkerosine> Three!
<andshevy> we never die, we multiply!
<andkerosine> Oh... probably didn't mean and*s.
<andrewvos> Wish I had zsh in here. /ignore *shevy*<tab>
<andkerosine> #ruby-lang.users.reduce :*
<andkerosine> andrewvos: I smell a project?
<andrewvos> andkerosine: Irssi plugin? ignore-shevys.pl
<andkerosine> Well, that's that done.
<andrewvos> Yeah just joking shevy. I don't hate you really.
<andrewvos> andshevy: And I don't know what you're about :/
<andshevy> man we are a team now!
<andshevy> the andies!
<andshevy> and we all use sinatra
<andkerosine> andies.heroku.com
<andrewvos> Clicked link. Was disappoint.
slyphon has joined #ruby-lang
<andkerosine> Sorry... excluded http in the hopes it wouldn't linkify.
burns180_ has joined #ruby-lang
<andshevy> hey hey hey good things start slowly
<andshevy> there is even a monkey called andI
arronmabrey has joined #ruby-lang
<andshevy> or rather ANDi ... which is reverse for DNA integrated ... a real monkey patched monkey, with his DNA being patched! http://www.genomenewsnetwork.org/articles/01_01/ANDi.shtml
<andshevy> we andies are the best team ever
<andshevy> I gotta sleep soon though, I'll become andshevy tomorrow. night!
<andrewvos> yeah I'm off peace fuckers
verto has joined #ruby-lang
Luxx_ has joined #ruby-lang
burns180_ has joined #ruby-lang
takaokouji has joined #ruby-lang
shtirlic_ has joined #ruby-lang
Giddeon has joined #ruby-lang
lifestream has joined #ruby-lang
lifestream has joined #ruby-lang
<simon_weber> how can I get the actual functions backing operators like +, -, etc?
<andkerosine> And then the "click to toggle source" button.
<simon_weber> andkerosine: super, thanks
<andkerosine> Sure thing.
Sailias__ has joined #ruby-lang
Sailias_ has joined #ruby-lang
<simon_weber> andkerosine: I'm forced to use 1.8; any idea if that exists for 1.8?
headius has joined #ruby-lang
<andkerosine> http://google.com
<andkerosine> : P
Sailias__ has joined #ruby-lang
<andkerosine> The version is right there in the URL, my friend.
Sailias_ has joined #ruby-lang
<simon_weber> andkerosine: yeah, I blew it and put the wrong vn, haha - oops. got it
<andkerosine> Excellent.
<andkerosine> Curiosity abounds: whatcha doin'? : )
<simon_weber> basic compiler stuff. i've got operators in string form, and want a map from str -> function
<simon_weber> for constant propogation
<simon_weber> I'm a python guy; little out of my element here, haha
<cout> simon_weber: Fixnum.instance_method("+")
<cout> or "+@" if you want unary
<simon_weber> cout: super, even easier. thanks
Oloryn_lt1 has joined #ruby-lang
<cout> simon_weber: that's if you want a method object; if you just want to _call_ the method, use #send
<simon_weber> cout: can you give me an example of applying on two ints?
<cout> 42.send("+", 10)
<simon_weber> great, got it
burns180 has joined #ruby-lang
<Boohbah> puts IO.readlines('h').grep /#{IO.readlines's'}/
<Boohbah> can you make it shorter?
<zenspider> is it possible to delete an issue on github entirely? I'm getting fed up with abusive whiny bitches
gregf has joined #ruby-lang
<zenspider> Boohbah: why make it shorter?
<slyphon> dominikh: hey, 'tmux-ruby' still lives?
<dominikh> slyphon: It's still on my todo list
<slyphon> hah
<Boohbah> zenspider: for fun
<dominikh> slyphon: but it will need some adjustments for the new tmux versions and right now I don't have time for that
<slyphon> dominikh: have you considered gemming it?
<slyphon> ahh
<cout> zenspider: want me to take care of it? I can troll them. :)
<dominikh> slyphon: yeah, when I finally get a version done that has all the important features
<zenspider> cout: noooot exactly what I was looking for :P
<slyphon> what needs work?
<slyphon> i was gonna putz around with it to try and figure out how to make tmux do stuff
<zenspider> Boohbah: I find writing crystal clear code more fun
<dominikh> slyphon: no idea. has been months since I last looked at it. as I said, the last version it works with reliably is tmux 1.4. 1.5 and 1.6 might've changed some output so I have to update the parser
<slyphon> zenspider: i was gonna try and make a mean joke from that, but out of respect i didn't
<slyphon> zenspider: also, i'm too tired where it might have come out wrong
<slyphon> zenspider: anyway, "hi!"
<dominikh> slyphon: but maybe it works for what you want to do, dunno.
heppy_ has joined #ruby-lang
<slyphon> dominikh: hah, ok
<slyphon> i'll putz around
<zenspider> heh
<slyphon> zenspider: something like "Oh, since when?"
<slyphon> but, no reason for that
Faris has joined #ruby-lang
slimfit has joined #ruby-lang
* jaimef looks for a printing the output in a non-buffered fashion of a shell out. puts %x{ tail -f blah } seems to buffer severely
<slyphon> $stdout.sync = true
<slyphon> or $stdout.flush
<zenspider> don't try to control buffering... let the system win
<dominikh> that doesn't work too well when printing progress bars :P
<cout> jaimef: yeah, tail does that :(
<slyphon> ehhhhhh
<cout> jaimef: you can use the pty library to trick it into thinking it's writing to a terminal
<slyphon> there are cases where it's important to flush
* slyphon can't believe he just said that with a straight face
jakebaek has joined #ruby-lang
<jaimef> yeah trying pty
<jaimef> tail was just an example
<cout> require 'pty'; PTY.spawn("tail -f blah") { |r, w| r.each_line { |line| puts line } }
A124 has joined #ruby-lang
<cout> you can also write your own tail (seek to eof, sleep 1, clrerror, read, repeat)
srbartlett has joined #ruby-lang
pcboy has joined #ruby-lang
burns180_ has joined #ruby-lang
<jaimef> $stdout.sync = false worked
<dominikh> false is the default.
slimfit has joined #ruby-lang
<cout> jaimef: are you sure? $stdout.sync shouldn't have any effect on the behavior or /usr/bin/tail
<jaimef> tail was just an example, apparantly a very bad one
<jaimef> s/tail/cap task/g
<jaimef> yeah it did not work. using pty again
<dominikh> slyphon: you mean the ugly attr_reader + undef + def dance?
<slyphon> yeah
<slyphon> i've never seen that
<dominikh> slyphon: that's so that YARD documents it as an attribute getter even though it's a method. (and yes, in this particular case I could've used a plain alias_method on :name instead). Nowadays you don't need that anymore, but I have yet to update it
<dominikh> it has no practical meaning to Ruby
<dominikh> (you can see the same on l. 114-115 + l. 128, where it makes more sense. but still, old way of doing it)
<slyphon> i don't think your documentation system is supposed to influence you that way
<dominikh> well, it's not anymore.
<slyphon> hah
<slyphon> that's one case where i'd be like, "Y'know what, fuck it"
<dominikh> according to github, that file is 2 years old :)
<slyphon> hah
<slyphon> dominikh: would you still care about supporting 1.8.7?
<dominikh> slyphon: I actively refuse changes that would make it 1.8.7-compatible
<dominikh> that goes for all my projects
<dominikh> 1.8 has to die.
<slyphon> so 1.9.2 or death
konr` has joined #ruby-lang
<slyphon> ok
<dominikh> well, 1.9.1 usually works, too ;)
<slyphon> hahaha
<dominikh> actually I have yet to read the .2 and .3 changelogs and see if I use any specific features of those
rippa has joined #ruby-lang
looopy has joined #ruby-lang
s0ber has joined #ruby-lang
heppy has joined #ruby-lang
ericmuyser has joined #ruby-lang
ScottNYC has joined #ruby-lang
<slyphon> dominikh: i have to admit, i giggle when i do Tmux::Server.new.sessions.name = 'blah' and it changes the title bar of iterm2's window
<dominikh> slyphon: hehe
<dominikh> the joy of direct visible effect
<dominikh> *directly
<slyphon> hah!
<slyphon> yes
srbaker has joined #ruby-lang
rdeshpande has joined #ruby-lang
Giddeon has joined #ruby-lang
QoQOoO has joined #ruby-lang
rohit has joined #ruby-lang
schroedinbug has joined #ruby-lang
burns180 has joined #ruby-lang
WillMarshall has joined #ruby-lang
WillMars_ has joined #ruby-lang
<andkerosine> Why has nobody been kind enough to tell James Edward Gray that he /needs/ to change that picture?
<andkerosine> He's such a smart guy, but he's derping so hard there.
* slyphon laughs
heppy has joined #ruby-lang
cdnz has joined #ruby-lang
Joeysomo has joined #ruby-lang
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
Joeysomo has joined #ruby-lang
<seanstickle> Keeps people guessing
<seanstickle> They're all, "he's probably some sort of derp"
<seanstickle> And then they're all "whoa, he's smart and shit"
Joeysomo_ has joined #ruby-lang
gianlucadv has joined #ruby-lang
heppy has joined #ruby-lang
jenrzzz has joined #ruby-lang
<andkerosine> Is there no way for gem update to remove all of the older versions?
headius has joined #ruby-lang
Joeysomo has joined #ruby-lang
jakebaek has quit [#ruby-lang]
burns180_ has joined #ruby-lang
twittard has joined #ruby-lang
io_syl has joined #ruby-lang
michael_alex has joined #ruby-lang
heppy has joined #ruby-lang
cdnz has joined #ruby-lang
gsav has joined #ruby-lang
Joeysomo_ has joined #ruby-lang
wyhaines has joined #ruby-lang
chimkan_ has joined #ruby-lang
Joeysomo has joined #ruby-lang
<ezkl> andkerosine: `gem cleanup`
<ezkl> andkerosine: `gem stale` is helpful to identify gems you haven't accessed in a while.
michael_alex_ has joined #ruby-lang
<andkerosine> ezkl: Nice, thank you.
srbartlett has joined #ruby-lang
michael_alex_ has quit ["Ex-Chat"]
jenrzzz has joined #ruby-lang
michael_alex_ has joined #ruby-lang
slimfit has joined #ruby-lang
Joeysomo has joined #ruby-lang
Avanine has joined #ruby-lang
krz has joined #ruby-lang
brianpWins has joined #ruby-lang
burns180_ has joined #ruby-lang
Joeysomo has joined #ruby-lang
srbaker has joined #ruby-lang
Joeysomo has joined #ruby-lang
brianpWins_ has joined #ruby-lang
pankajdoharey has joined #ruby-lang
pankajdoharey has quit [#ruby-lang]
srbaker has joined #ruby-lang
Joeysomo has joined #ruby-lang
rohit has joined #ruby-lang
jenrzzz has joined #ruby-lang
toretore has joined #ruby-lang
jxie_ has joined #ruby-lang
Joeysomo_ has joined #ruby-lang
Joeysomo has joined #ruby-lang
Karmaon has joined #ruby-lang
andkerosine has quit [#ruby-lang]
burns180 has joined #ruby-lang
slyphon_away has joined #ruby-lang
<retro|cz> How I can convert from VALUE test to C char?
wmoxam has joined #ruby-lang
<retro|cz> NUM2CHR?
<Asher> StringValuePtr( test )
<Asher> for 1.9
<retro|cz> yuo
<retro|cz> yup
<retro|cz> thanks
<retro|cz> I try
<retro|cz> And back?
<Asher> sure
<retro|cz> from char to ruby string?
<erikh> rb_str_new2(ptr)
<retro|cz> erikh, ok
<retro|cz> that's what I'm using
<Asher> check out the header files
<erikh> and README.EXT
<Asher> yes
<Asher> i was typing that :)
<erikh> ha
<erikh> Asher: doing well I hope? Been a while since you've been in here.
<Asher> yah definitely
<Asher> i'm around just #pry gets stuck as the front tab and i get distracted ;)
<erikh> heh.
<retro|cz> ok thanks Asher and erikh
<Asher> my web framework is coming together tho - almost ready to use it in the first production instance
<Asher> aiming to open source in a few months
<erikh> fun times1
<erikh> !
Joeysomo has joined #ruby-lang
<Asher> yeah :)
<Asher> how about you?
<erikh> working like a dog
<erikh> converting our chef 9 stuff to chef 10
<erikh> working on a 0mq messaging layer + process manager
<Asher> how's 0mq been working out
<erikh> it's pretty fun
<erikh> fast as hell too
<Asher> i've been thinking about using it or something similar for embedded APIs
<Asher> to some web stuff
<Asher> haven't gotten to the point where i'm ready to have to determine specifics
<Asher> but i've been discovering some neat magic that ic an do as a result of writing cascading-configuration
<erikh> not sure what you mean?
<Asher> sorry i changed topics - which part
<Asher> embedded APIs you mean?
<erikh> err, all of it heh
<Asher> cascading configuration => https://github.com/Asher-/cascading-configuration
<erikh> sorry just woke up about 20 minutes ago, long week to boot
<Asher> embedded APIs i mean like cocoa/cocoa-touch API or even an API to embed stuff in another website (but without running code on the site where it's embedded)
x0F_ has joined #ruby-lang
<Asher> and no worries :)
<erikh> this cascading configuration is interesting
aza_kibo_ has joined #ruby-lang
<erikh> so, part of what I have to do for this service manager is let you configure services somehow
kitallis has joined #ruby-lang
<erikh> i came up with something like this (which is largely working at this point)
<Asher> i just realized that cascading-configuration-array-[unique, sorted, sorted-unique] aren't listed there yet
<Asher> but they should be in the list
<erikh> it uses inheritance to drive it though
<Asher> ya this sets up a multiple inheritance tree
<Asher> so it works with mixins
<erikh> hrm. I'll book mark it and look it over deeper on my weekend.
<erikh> now I think it's time for some mass effect 3
<Asher> love to hear any thoughts
<Asher> enjoy!
ankurgel has joined #ruby-lang
heppy has joined #ruby-lang
Joeysomo has joined #ruby-lang
A124 has joined #ruby-lang
Joeysomo has joined #ruby-lang
Gray has joined #ruby-lang
postmodern has joined #ruby-lang
burns180_ has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has joined #ruby-lang
takaokouji has joined #ruby-lang
dc5ala has joined #ruby-lang
takaokouji has joined #ruby-lang
rushed has joined #ruby-lang
lifestream has joined #ruby-lang
gregmore_ has joined #ruby-lang
vasanth has joined #ruby-lang
Defusal has joined #ruby-lang
Defusal has joined #ruby-lang
QoQOoO has joined #ruby-lang
<retro|cz> I'm defining module in C ext. Should I include blank module in ruby module_name.rb also?
<retro|cz> Is it best practice?
<retro|cz> Or should I define module in ruby and only add methods in C code?
<Asher> that's mostly an implementor decision
<Asher> i would say that if your module is all C code, don't worry about it
<Asher> but if you are mixing C and ruby code, it's nice to do so
<retro|cz> Asher, just C code for now
<retro|cz> Because I have problem with loading when I define module in Ruby and define it again in C.
<Asher> i would say the reason to add ruby blanks is to help people looking at ruby code realize they should look at the C
<Asher> but if it's just C code that's clear
<retro|cz> ok Asher
<retro|cz> thanks
frangiz has joined #ruby-lang
perryh has joined #ruby-lang
<retro|cz> Asher, and when module is defined in ruby code
<retro|cz> you should not call rb_define_module again in C ?
<Asher> yes you need to in C
<Asher> otherwise how will it know where your C method is?
<retro|cz> There is nothing like rb_open_module to get handle for existing module?
<Asher> oh i see
<Asher> well you want to get the constant that points to the module
<Asher> rb_get_const( rb_cObject, "ModuleName" )
<Asher> all ruby classes are rb_cClassName, modules are rb_mModuleName
tla has joined #ruby-lang
gokul has joined #ruby-lang
gjaldon has joined #ruby-lang
burns180 has joined #ruby-lang
<retro|cz> Asher, great
<retro|cz> thank you again
<Asher> glad to help
<Asher> i'm around here a bunch if you need more help w/ruby C stuff
<Asher> the C docs are often somewhat lacking
brownies has joined #ruby-lang
<Gray> Hi Guys
jxie has joined #ruby-lang
<Gray> lang = ['c#', 'ruby', 'php', 'delphi']
<Gray> puts lang.join(', ') #=> c#, ruby, php, delphi
<Gray> #okay, understand
<Gray> --
<Gray> puts lang.join(' :) ') + ' 8)' #=> c# :) ruby :) php :) delphi 8)
<Gray> #don't understand how it works
<Gray>
<Asher> join is creating a string with the parameter between each element of the array you join
twittard has joined #ruby-lang
<hagabaka> puts ["Paste", ">3", "lines", "of", "text", "on", "http://pastie.org", "or", "use", "a", "gist"].join(' ')
<wallerdev> haha
<Gray> i don't understand this: (' :) ') + ' 8)'
<wallerdev> its joining them with smiley faces, and then its adding a sunglass face to the end of the result of the joining with smiley faces
<wallerdev> so as two lines: str = lang.join(' :) ');
<wallerdev> str = str + ' 8)'
<hagabaka> it's the string literal ' :) ' surrounded by ( ), followed by +, then the string literal ' 8)'
<erikh> Gray: does your editor have syntax highlighting?
<erikh> that can help with things like that.
<hagabaka> change it to :] and 8] and it might be easier to understand
<Gray> nope
<Gray> erikh, nope
<erikh> Gray: what editor are you using?
<Gray> okay, i understand + ' 8)' -- just adds string ?
Avanine has joined #ruby-lang
<Gray> erikh, khm.. windows notepad :(
Avanine has joined #ruby-lang
ryanf has joined #ruby-lang
<erikh> Gray: hrm. checkout notepad++ or sublime text 12.
<erikh> err, sublime text 2.
<hagabaka> if you used pastie.org you could see it syntax highlighted ;)
<erikh> they're both "programmer's editors".
<erikh> and have features that make programming considerably easier.
<Gray> wallerdev: thanks.
<Gray> erikh: thank you!
<erikh> there are a lot of programmer's editors out there -- just try to find one that stays out of your way and helps for now.
gianlucadv has joined #ruby-lang
<Gray> erikh: i install notepad++ and found how use syntax highlighting. thanks again!
<erikh> enjoy
burns180_ has joined #ruby-lang
cyri_ has joined #ruby-lang
WillMarshall has joined #ruby-lang
rdeshpande has joined #ruby-lang
musha68k has joined #ruby-lang
tekin has joined #ruby-lang
Joeysomo has joined #ruby-lang
<retro|cz> Can I change warnflags in mkmf?
<erikh> probably via $CFLAGS
Joeysomo has joined #ruby-lang
gnufied has joined #ruby-lang
<retro|cz> I'm getting warning: multi-character character constant [-Wmultichar] erikh.
<retro|cz> Should it be ignored? It is not in cflags this option.
<erikh> hrm, probably not
<erikh> generally warnings are there for a reason :)
<erikh> it probably comes from something like -Wextra
nevynxxx has joined #ruby-lang
Joeysomo has joined #ruby-lang
<retro|cz> erikh, it doesn't, it shows for blank cflags also
<retro|cz> but thanks
<retro|cz> I'll try to remove warning by fixing code
QoQOoO has joined #ruby-lang
heftig has joined #ruby-lang
pp01bit has joined #ruby-lang
uniqanomaly has joined #ruby-lang
<retro|cz> this line is throwing that warning
<retro|cz> I think it is ok.
<retro|cz> And I can ignore it.
<retro|cz> What do you think?
<yorickpeterse> Morning lads
<retro|cz> yorickpeterse, hello
<erikh> that's because you want "" where you're using ''
<erikh> it's a good warning.
<erikh> and you probably want to if/else over strcmp() instead of a switch, or some other idiom like a hash table.
burns180 has joined #ruby-lang
<erikh> frankly I'm amazed that works at all
nebbie`` has joined #ruby-lang
<erikh> oh, I see now
<erikh> oh that's f'n weird.
<erikh> jumping over strings treated as multibyte chars
<erikh> probably hella fast, but a little scary
Nss has joined #ruby-lang
<retro|cz> erikh, yup
<erikh> anyhow, I imagine you could append -Wnone to $CFLAGS to get rid of the warnings.
<retro|cz> I belive webkit guys know what they are doing..
Joeysomo has joined #ruby-lang
<erikh> oh, I don't doubt that, it's just really weird.
<retro|cz> for me also :)
<retro|cz> -Wnone doesn't work for me
<retro|cz> but nevermind
<erikh> hrm. time to read the gcc manual :)
<retro|cz> yup
<retro|cz> I'm going to.
<retro|cz> But I will be happier with some warnings enabled :(
<retro|cz> Not just ignore all.
<Gray> help, plz
<retro|cz> ah, erikh
<retro|cz> it is -Wno-multichar
<Gray> why typed.push(word) replace object in array instead append it?
Joeysomo has joined #ruby-lang
zmack has joined #ruby-lang
<Gray> any help?
tekin has joined #ruby-lang
rolfb has joined #ruby-lang
<retro|cz> Gray, gets.chomp.split(' ')
<A124> Gray: 1) Why are you iterating like in C? 2) .split
<retro|cz> Gray, reason is that you are cleaning array every time
<retro|cz> if you move line 4 after line 2
<retro|cz> that should work
Guest68740 has joined #ruby-lang
<retro|cz> but this code doesn't work for me 1.9.3-p125
<A124> retro|cz: It's working for me
<A124> retro|cz: (Same version)
<Gray> retro|cz: yes, i'm fool
musha68k_ has joined #ruby-lang
<A124> Gray: And I failed.
Daerun has joined #ruby-lang
ramonmaruko has joined #ruby-lang
seoaqua has joined #ruby-lang
krzyhoo has joined #ruby-lang
<krzyhoo> Question. Can I use Nokogiti to autoremove any XML comments??? I need them in my ERB but they are not required in my output
<Gray> retro|cz: this works: ? http://pastie.org/3554499
roadkith has joined #ruby-lang
<Gray> retro|cz: i did all/something wrong?
<retro|cz> no
<retro|cz> gets.chomp gets whole line
<Gray> retro|cz: i know: http://pine.fm/LearnToProgram/?Chapter=07 first line...
Joeysomo has joined #ruby-lang
davidw has joined #ruby-lang
Carnage\ has joined #ruby-lang
igaiga has joined #ruby-lang
burns180 has joined #ruby-lang
futurechimp has joined #ruby-lang
Joeysomo has joined #ruby-lang
lbrent has joined #ruby-lang
francisfish has joined #ruby-lang
lbrent has joined #ruby-lang
<krzyhoo> so, anyone?
Cherrum has joined #ruby-lang
shyouhei_ has joined #ruby-lang
solars has joined #ruby-lang
Joeysomo has joined #ruby-lang
mytrile has joined #ruby-lang
nevynxxx has joined #ruby-lang
adambeynon has joined #ruby-lang
<manveru> krzyhoo: did you try?
Joeysomo has joined #ruby-lang
robgough has joined #ruby-lang
ericmuyser has joined #ruby-lang
workmad3 has joined #ruby-lang
Joeysomo has joined #ruby-lang
<krzyhoo> manveru: i tried to find a method for that
<krzyhoo> but didn't
verto has joined #ruby-lang
burns180_ has joined #ruby-lang
<manveru> >> puts Loofah.fragment('<a><!-- foo --></a>').scrub!(Loofah::Scrubber.new{|n| n.remove if n.name == 'comment' })
<manveru> <a></a>
<manveru> something like that
futurechimp has joined #ruby-lang
inTuxicated has joined #ruby-lang
Joeysomo has joined #ruby-lang
Asher has joined #ruby-lang
Joeysomo has joined #ruby-lang
fayimora has joined #ruby-lang
machine1 has joined #ruby-lang
verto has joined #ruby-lang
woollyams has joined #ruby-lang
Joeysomo has joined #ruby-lang
Jake232 has joined #ruby-lang
igaiga has joined #ruby-lang
<Gray> how can i compare string with each element in array of strings? http://pastie.org/3554983
burns180 has joined #ruby-lang
<matled> I'd like to define some helper methods that are available in all classes in the module. how would I do this? it seems module A; def helper; end; class B; include A; end; end works, is this the way to go?
DMKE has joined #ruby-lang
judofyr has joined #ruby-lang
<judofyr> RUBY RUBY RUBY RUBY
rue has joined #ruby-lang
<erikh> fry fry fry fry
rue_XIV has joined #ruby-lang
<judofyr> LUNCH!
<judofyr> brb
fayimora has joined #ruby-lang
inTuxicated has quit ["Konversation terminated!"]
canton7 has joined #ruby-lang
<kalleth> judofyr: 'aaaaaaa aaaaAAaaaAAaaaa'
<kalleth> right?
Fullmoon has joined #ruby-lang
rolfb has joined #ruby-lang
Slackwise has joined #ruby-lang
m3nd3s has joined #ruby-lang
tomzx has joined #ruby-lang
<judofyr> kalleth: ye
<heftig> matled: i'd segregate them into a helper module
<heftig> module A; module Helper; def self.foo; :foo; end; end; end; end
<heftig> whoops, too many ends
<heftig> then you can call Helper.foo from the classes
sat has joined #ruby-lang
<heftig> or alternatively, module Helper; module_function; def foo; :foo; end; def bar; :bar; end; end
<heftig> then you can either include Helper and call "foo", or call "Helper.foo"
Jake232 has joined #ruby-lang
<Gray> Guys, help me please, i can't solve this task:
<Gray> Let's write a program which asks us to type in as many words as we want (one word per line, continuing until we just press Enter on an empty line), and which then repeats the words back to us in alphabetical order. OK?
<Gray>
<shevy> and how far have you got
<shevy> have you got to fetch user input already
<Gray> I can not write a sorting algorithm. i'am moron? :\
<shevy> well it just says to not use .sort
<Gray> shevy: thats means that i need write sort by myself?
<Gray> so, as i understand we can compare strings using <, =, >,
<shevy> the <=> should be in module Enumerable
<shevy> but if you are not allowed to use any sort* method at all, I wonder a bit how you can tap into that
<matled> heftig: there is no way to define something within a module and have it available in all classes defined under the module?
<judofyr> matled: no
<shevy> oh
<shevy> not Enumerable I guess
<heftig> matled: of course
<heftig> just do "def self.foo" under module A
<shevy> not sure where <=> is
<heftig> ah, wait, nevermind
<judofyr> shevy: <=> is defined in the specific classes.
<heftig> i'm being stupid
<judofyr> shevy: just like #each
<matled> heftig: ok, but then it's A.foo
<heftig> matled: right
<Gray> shevy: as i understand andrew < zack #=> true
<matled> I think I'll use the Helper module. thanks
<Gray> shevy: as i understand: "andrew" < "zack" #=> true
<shevy> well
<judofyr> Gray: here's one silly algorithm: smallest = first element; loop through the array, if current < smallest then smallest = current. then push smallest to a new array, delete it from the first and repeat
<shevy> what would you have expected
burns180_ has joined #ruby-lang
<shevy> you were never comparing the length in the above code I suppose
m3nd3s has joined #ruby-lang
fayimora has joined #ruby-lang
apeiros_ has joined #ruby-lang
Defusal has joined #ruby-lang
Defusal has joined #ruby-lang
Defusal has joined #ruby-lang
reitelles has joined #ruby-lang
Sciggles has joined #ruby-lang
canton7 has joined #ruby-lang
gianlucadv has joined #ruby-lang
Sciggles has joined #ruby-lang
vasanth has quit [#ruby-lang]
Sciggles has quit [#ruby-lang]
Joeysomo has joined #ruby-lang
jcr has joined #ruby-lang
looopy has joined #ruby-lang
Indian has joined #ruby-lang
Joeysomo has joined #ruby-lang
m3nd3s has joined #ruby-lang
dreinull has joined #ruby-lang
dreinull has joined #ruby-lang
Defusal has joined #ruby-lang
Defusal has joined #ruby-lang
seoaqua has joined #ruby-lang
nevynxxx has joined #ruby-lang
nevynxxx has joined #ruby-lang
m3nd3s has joined #ruby-lang
burns180 has joined #ruby-lang
burns180 has joined #ruby-lang
A124 has joined #ruby-lang
<Gray> judofyr: could you see please: http://pastie.org/3555509
<erikh> shevy: <=> is implemented by Comparable
<judofyr> Gray: I was thinking something like this: http://cl.ly/0H0m2k3P0y3U3h1e0l0u
<erikh> (which is similar to Enumerable)
<judofyr> erikh, shevy: no it's not.
<erikh> eh?
<judofyr> erikh: Comparable implements <, >, >=, <= using <=>
<judofyr> erikh: just like Enumerable implements #detect using #each
<erikh> The Comparable mixin is used by classes whose objects may be ordered. The
<erikh> class must define the <=> operator
<erikh> correct
michael_mp has joined #ruby-lang
<erikh> sorry if I spoke incorrectly, but that's what I meant
<judofyr> ah
<judofyr> :)
<shevy> oh yeah that was its name... Comparable. Somehow Enumerable is easier to remember
kain has joined #ruby-lang
<judofyr> I think it's because we've learned that "Enumrable is awesome" from the the beginning
<matled> if I have a hash, call #to_a I get an array of arrays with two elements. how can I convert it back to a hash? Hash[*foo.flatten(1)] is quite strange to read imho
<judofyr> Comparable just sits there
<judofyr> matled: Hash[foo] should work in 1.8.7 and 1.9
<judofyr> Hash[{1 => 2}.to_a] # => {1 => 2}
<matled> judofyr: nice, somehow I missed that. thanks
<matled> even though some method to be called on the array would be nice for #map, #select, ... chains
<apeiros_> matled: like, to_hash?
<apeiros_> class Array; def to_hash; Hash[self]; end; end
<erikh> dirty monkeypatcher
<matled> apeiros_: exactly :)
<apeiros_> erikh: I feel no shame :-p
<erikh> ha
xjonc has joined #ruby-lang
<verto> erikh: lol
<verto> apeiros_: :D
<apeiros_> it's fascinating how implementing a blog allegedly takes 15 minutes in rails, yet I'm already in hour 3 of implementing a (very basic, mind you) addressbook…
malev has joined #ruby-lang
malev has joined #ruby-lang
adambeynon has joined #ruby-lang
<shevy> apeiros_ :D
<shevy> you are just damn slow ;)
<apeiros_> I guess so…
<judofyr> apieros: why are you implementing an address book?
<apeiros_> maybe the blog was just scaffolding `rails generate scaffold BlogEntry title:text text:text` and that was it…
<apeiros_> judofyr: I'm making a little presentation + workshop in our local rails community
<judofyr> ah
<apeiros_> about the swiss zip code system and using a directory service + other algorithms to have clean data
<judofyr> cool
<apeiros_> you wouldn't believe how important that is. my company wastes tens of thousands of dollars per year for data cleanup…
<judofyr> woah
<apeiros_> and I'm pretty sure that could be cut by a good 90% by using proper mechanisms during data input
kyrylo has joined #ruby-lang
gokul has joined #ruby-lang
<Gray> guys, for my too hard understand this "simple" algorithm http://cl.ly/0H0m2k3P0y3U3h1e0l0u
<Gray> this is mean that i'm blunt ? or this normal for beginner?
<judofyr> Gray: nah, sorting algorithms aren't that easy
<judofyr> Gray: but what are you not understanding?
<judofyr> Gray: actually
<Gray> i understand... but it takes about hour. And i feel bad because i can't create it by myself
<judofyr> I realize that it can be made much simpler
<apeiros_> Gray: getting a feeling for algorithms takes a while
<Gray> okay, thanks. guys.
<apeiros_> Gray: some people are more talented, others less, but at first exposure, I think it's pretty normal to not immediately grasp all aspects.
<shevy> yeah
<apeiros_> also, even for more experienced programmers, it's normal to start out with what we call "the naive approach/algorithm"
<shevy> Gray it is better to understand in tiny steps and not try to understand everything in one day
<Gray> apeiros_: my teacher in school says... that i will _never_ be programmer
<apeiros_> which is mostly just do "how would I do it if I'd do it manually?" and then convert that into a recipe, which in turn can be translated into code.
<shevy> Gray it is just a matter of practice
<apeiros_> Gray: sounds like an enabling teacher, eh? :D
<shevy> also that teacher is an idiot
virunga has joined #ruby-lang
fayimora has joined #ruby-lang
burns180_ has joined #ruby-lang
<judofyr> Gray: derp. I'm silly. there's an easier way: http://cl.ly/0u0d0u0H0v1U3A0w1e3M
mark_locklear has joined #ruby-lang
<Gray> judofyr: much easier :) !
<Gray> http://ruby-doc.org/core-1.9.3/Array.html#method-i-empty-3F but why here is not min method ?
<judofyr> Gray: because it's here: http://ruby-doc.org/core-1.9.3/Enumerable.html
<judofyr> Gray: all methods in Enumrable are available in Array
<judofyr> and Hash
<judofyr> and other places
<Gray> judofyr: okay, thank you!
kyrylo has joined #ruby-lang
wyhaines has joined #ruby-lang
<Gray> judofyr: also as i understand this code have 1 problem: http://cl.ly/0H0m2k3P0y3U3h1e0l0u
<judofyr> oh?
petercooper has joined #ruby-lang
<apeiros_> Gray: that code has problems with duplicates
<Gray> judofyr: when we type one word twice. typed.delete(min) will delete all
<Gray> same words
<Gray> apeiros_: yes
<apeiros_> Gray: you've got two options, a) make sure you delete only one
<judofyr> hm… I didn't realize
<apeiros_> or b) count how many times it occurs and push it that many times before deleting it
<Gray> judofyr: all duplicates will be deleted by this: typed.delete(min)
<judofyr> Gray: I see. alright, now you can fix it :)
gokul has joined #ruby-lang
<Gray> i try :) thanks :)
<judofyr> Gray: see #count or #delete_at + #index :)
jcr has joined #ruby-lang
justinxreese has joined #ruby-lang
enebo has joined #ruby-lang
yxhuvud has joined #ruby-lang
Zolrath has joined #ruby-lang
looopy has joined #ruby-lang
slyphon_away has joined #ruby-lang
fayimora has joined #ruby-lang
jaisoares has joined #ruby-lang
<Gray> thanks guys... seems to become a little clearer
<judofyr> Gray: nice. did you solve it, or have just been playing around with it?
<jaisoares> Hi everyone, could anyone please shed some light upon this issue? I posted a question on stackoverflow.com but still got no answer. http://stackoverflow.com/q/9628606/839270
<judofyr> Gray: hm… but then you delete the first word, regardless of where the smallest word is?
<judofyr> jaisoares: @name isn't "derived" from the object. it's a separate object that the person manages.
<Gray> judofyr: hmm... :( sorry. I need find way to get index min in typed
<judofyr> Gray: see Array#index :)
<jaisoares> judofyr: so I do have to implement the to_s method the way I posted if I want that functionality, right?
<judofyr> jaisoares: or override Person#taint
<judofyr> to also taint @name
burns180 has joined #ruby-lang
burns180 has joined #ruby-lang
<judofyr> jaisoares: I've rarely used #taint so I'm not sure what the best practices are…
<jaisoares> judofyr: thanks judofyr that really sound like a more proper solution
<jaisoares> judofyr: do you mind answering in stackoverflow what you said here so others with the same issue can profit from it, I'll accept your answer...
<judofyr> jaisoares: sure
<jaisoares> judofyr: thanks
<injekt> you should note that @name is a seperate object which is why a normal taint wont work and doesn't care about that objects attribtues
<jaisoares> judofyr: yes, injeckt is right, that should also be noted
<injekt> that's a new one
Zolrath has joined #ruby-lang
<Gray> judofyr: thanks :) seems it works http://pastie.org/3556003
<injekt> Gray: minindex = type.index(min); typed.delete_at(minindex); == type.delete(min)
<Gray> injekt: don't understand...
<injekt> Gray: [1,2,3].delete(3) removes the object 3; you're fetching the object, locating its index, then removing the object via its index
PhilCK has joined #ruby-lang
<Gray> injekt: when executed this : typed.delete_at(minindex) #=> from array "typed" will be removed object that have index == minindex,correctly?
<Gray> where I made ??a mistake?
Spooner has joined #ruby-lang
<judofyr> injekt: oh, you didn't follow the discussion above did you?
<judofyr> injekt: we can't use #delete because it removes duplicates
<judofyr> Gray: I think injekt was trying to say that we could use #delete instead
<injekt> judofyr: oh my bad
<injekt> tail end conversation
<Gray> judofyr: okay, thanks! so this http://pastie.org/3556003 ok?
<judofyr> Gray: you can use "min = typed.min" instead of the whole looping thing
mytrile has joined #ruby-lang
<judofyr> remove "typed.each do |wrd| … end"
mytrile has joined #ruby-lang
burns180_ has joined #ruby-lang
cg433n has joined #ruby-lang
<matled> how am I supposed to read DATA twice? DATA.tell and DATA.seek after reading once?
<judofyr> Gray: like this: http://cl.ly/3J1s1i3Z3j0Z022y453c (I was too lazy to re-paste)
<judofyr> matled: you're not supposed to read it twice :)
<matled> judofyr: says who? :)
<judofyr> matled: but yeah, I'd DATA.seek(0)
<matled> judofyr: then I'll start with #!/usr/bin/env ruby :)
<Gray> i remember :) and i just want finish that version :) without using min and sort
<matled> it's actually a file handle to __FILE__ seeked to the correct position
<Gray> methods
<judofyr> Gray: ah :)
<Gray> thanks :)
<judofyr> gret
<judofyr> great*
Joeysomo_ has joined #ruby-lang
<judofyr> Gray: if you need some feedback and #ruby-lang is lazy, you could always try judofyr@gmail.com. I usually respond pretty quickly :)
* apeiros_ notes that down
<Gray> judofyr: thank you very much!
<judofyr> apieros: you're welcome too :)
<judofyr> Gray: although, I must warn that sometimes it just gets stuck in my inbox forever :/
<Gray> judofyr: anti-spam filters? or if questions stupid? :)
<apeiros_> isn't that the same?
* apeiros_ has a stupid questions spam filter…
<judofyr> Gray: it's not about if the question is stupid or hard. I just sometimes feel like don't asking them right away, and before I know it I've forgotten it completely
<judofyr> and then I kinda say to myself "well, it's been so long, it doesn't matter anymore"
<apeiros_> it matches against "has anyone ever", and "it doesn't work", and "can somebody"
* injekt infiltrates past apeiros' filters with 'DIS DONT WORK PLS FIX'
<apeiros_> injekt: it's an advanced AI that recognizes your silly trick!!!
<injekt> :(
<apeiros_> wait, actually it's an NI, not an AI
<judofyr> apieros: what's up with the underscore btw?
<shevy> it means "apieros with style"
<apeiros_> it's there to confuse you, judofry
<apeiros_> also I think it makes my nick even more intimidating!
<shevy> yay! fry a judoka!
<injekt> no numer for jakucha
* judofyr loves LimeChat's highlighting of judofry: http://cl.ly/081Y163i3I3W3X0C073F
<injekt> hahaha
<injekt> judofry judofry judofry
<shevy> what
<shevy> did you photoshop that or why is that like 200% larger than the rest
<shevy> see this is the reason why kittens are murdered :(
burns180_ has joined #ruby-lang
<Tasser> I'm sure the _ part of apeiros_ is because he's leaking
<shevy> andrewvos, yeah I dont get math like that
adambeynon has joined #ruby-lang
io_syl has joined #ruby-lang
<Gray> judofyr: as you know i read this book. And finish exercise at chapter 7. But if not community i can't solve this task in (long-version). Should i go to next chapter or you can give me more exercies to training?
phlipper has joined #ruby-lang
<andrewvos> We can keep on doing this bro
<shevy> yeah but I don't get it
<judofyr> Gray: hm… kinda busy now, but you should be fine doing the next chapter
tekin has joined #ruby-lang
Sailias has joined #ruby-lang
<shevy> sinatra lesson 2!
sandbags has joined #ruby-lang
<judofyr> Gray: it's more important to understand the big picture than to focus solely on arrays. maybe the array exercises becomes easier when you've learnt more too :)
<shevy> Gray go to next chapter if you understood the rest of that chapter
<shevy> I never worked through the examples myself
<shevy> when you write your own things, you'll get plenty of exercise anyway
burns180 has joined #ruby-lang
krz has joined #ruby-lang
malev_ has joined #ruby-lang
leonL has joined #ruby-lang
jaisoares has joined #ruby-lang
mistym has joined #ruby-lang
znz_v has joined #ruby-lang
dv310p3r has joined #ruby-lang
wmoxam has joined #ruby-lang
Gray has joined #ruby-lang
<Gray> judofyr: i was disconnected, could you repet your last message
Defusal has joined #ruby-lang
Defusal has joined #ruby-lang
piglop has joined #ruby-lang
jaisoares has joined #ruby-lang
outoftime has joined #ruby-lang
robbrit has joined #ruby-lang
srbaker has joined #ruby-lang
<injekt> it's funny because using cloudapp really is quicker than copy and pasting text
burns180_ has joined #ruby-lang
kain_ has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
ascarter has joined #ruby-lang
seydar has joined #ruby-lang
<seydar> what's the state of affairs for datamapper?
<seydar> or should i just use activerecord for an orm
<seydar> ORM*
<yorickpeterse> Tried Sequel?
<seydar> yorickpeterse: oh snap, i totally forgot about that one. you recommend it?
<seydar> i remember having issues with it before, many years ago
<judofyr> seydar: I love Sequel
<judofyr> seydar: I'd wait for DM 2.0 if you want to use DataMapper
malev_ has joined #ruby-lang
<seydar> judofyr: roger roger. what's coming in 2.0 that isn't there now?
<yorickpeterse> seydar: I'm a fan of Sequel so yeah, I'd recommend it :)
<judofyr> seydar: well, they're finally implementing the data-mapper pattern instead of the active-record pattern
<seydar> judofyr: what's the ETA for 2.0?
<injekt> sequel <3
<seydar> so it sounds like i should be using sequel. hot damn it's been a long time
<seydar> i'm looking for a lil more abstraction there. is there anything else built on top of sequel or am i rolling my own slash not abstracting?
<Gray> arr = [["chapter: 1", "page 2"], ["chapter: 2", "page 34"]] #=> how can i puts only "chapter: 1" ?
<shevy> Gray you know that you access an array via [0] [1] etc.. right?
<judofyr> seydar: they're also using relational algebra (like Arel / AR 3)
<seydar> Gray: like shevy said, arr[0][1]
indstry has joined #ruby-lang
<shevy> :(
<shevy> he needs to understand first!
<seydar> Gray: arr[1] # => ["chapter: 1", "page 2]
<seydar> err, sorry, that's arr[0]
<seydar> Gray: arr[0][1] # => ... what do you think?
<shevy> his brain has to make "click"
<seydar> shevy: i'm sorry :-(
<shevy> hehe no worries
* judofyr clicks Gray's brain
wmoxam has joined #ruby-lang
<shevy> it is not responding
<seydar> quickly, gray, the only way out is to sudo rm -rf /
<shevy> earth to Gray, earth to Gray ... anyone there?
<judofyr> seydar: please, just don't.
<shevy> seydar, I once did that kinda, but differently
<shevy> I deleted some directories and used tab-completion
<shevy> but I also pressed the space key
<shevy> so one "match" (or result, rather) was to /
<seydar> shevy: hahahaha there was a bug in some uninstall script with that i remember
<shevy> hehe
<seydar> judofyr: alright, i won't do that again
<shevy> only positive thing is that you will remember those mistakes for a really long time
<Gray> guys?
<shevy> what
<injekt> GUYS
<shevy> is the brain back again
<seydar> YOU GUISE!!!!
ascarter has joined #ruby-lang
<shevy> turn it on turn it on turn it on
<judofyr> DISGUISE!
<Gray> i tried this puts arr[0].[0] #=> syntax error
<judofyr> Gray: remove the dot
<andrewvos> [0].[0]
<injekt> dat dot
<andrewvos> haha
<shevy> maaaaan
<judofyr> I had the MSN handle dot.dot@dot.dot
<shevy> notice that seydar's example had no .
<seydar> andrewvos: quality
<shevy> yet Gray's brain inserted a .
<shevy> we have to rewire that brain!
<Gray> ))))
<seydar> quickly! to the batbrainwirer!
<andrewvos> I wish I was ops so I could register someone emails like andrew.dotunderscorevos@blabla.com
<shevy> is it time for the andies again?
ezkl has joined #ruby-lang
<shevy> hmm missing on andkerosine :/
<seydar> shevy: remember that ruby shell we worked on from like literally 6 years ago?
<andrewvos> Six years ago? Jesus.
<shevy> seydar I think so, it had that nice ncurses drop down box right?
<seydar> shevy: yeah
<Gray> ))))
<shevy> hehe that one was cool
<shevy> seydar, we now live on the github days!
<seydar> shevy: well last semeseter i gave it a better shot. its syntax is entirely ruby
<shevy> oh?
<shevy> is it on github by chance?
gsav has joined #ruby-lang
<shevy> and do you know what happened to the main author back then? I think he was from south africa, never heard from him again though
<seydar> shevy: dbkeen. not sure
<seydar> that's what i did last semester. lot of fun. it ultimately couldn't replace bash due to a few problems, but i forced it as my main shell for a long time
burns180 has joined #ruby-lang
<seydar> god, that was fun
<seydar> i learned so much doing it the first time and i learned a shittonne doing it a second time
<Gray> so, my eglish is very bad... i don't should write "guys" yes?)
<seydar> if i could just get * and ~ expansions and a proper sandbox that remembers variables, i'd be using chitin full time
<seydar> Gray: haha, yes. "guys" is correct
<seydar> I HAVE DECIDED I SHALL USE SEQUEL!
<Mon_Ouie> Gray: However, it's "shouldn't", not "don't should" ;)
<seydar> Gray: where are you from?
rippa has joined #ruby-lang
<Gray> seydar: ehm.. small village in Russia :\
<Gray> http://maps.google.ru/maps?hl=ru&newwindow=1&q=stavropol&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&biw=1366&bih=667&um=1&ie=UTF-8&sa=N&tab=wl
<Gray> seydar: and you?
<rippa> stavropol is not a sma village
<Gray> rippa: less than 500,000 people
<seydar> Gray: USA
<Gray> a
<Gray> s
<seydar> Gray: my hometown has 5000 people in it
<rippa> Gray: still a city
<Gray> seydar: rippa, you from Russia? Was in Stavropol?
<rippa> no
<seydar> Gray: no, I'm from USA
<rippa> but I was in Onega
ezkl has joined #ruby-lang
<rippa> it has 30000
<seydar> shevy: what have you been working on lately?
<rippa> still a city
malev_ has joined #ruby-lang
m3nd3s has joined #ruby-lang
<Phrogz> Anyone got a better answer to http://stackoverflow.com/questions/4459330/how-do-i-temporarily-redirect-stderr-in-ruby than what I put in there already?
<Phrogz> Er...wrong URL.
<seydar> Phrogz: redirecting STDERR to a logger is a hack. so is it really much worse if you do a hack in your hack?
<Phrogz> Perhaps not. Why do you consider it a 'hack' to want to output errors and warnings from daemons in a place that may be later reviewed?
<seydar> don't let anyone know i said this, but i'm fine with what you wrote. also i can't really think of a better answer as it's specific to each logging app
<Phrogz> :)
<seydar> Phrogz: because it's mass redirection
fayimora_ has joined #ruby-lang
<seydar> it's clunky and a very sweeping gesture. not very controlled
<seydar> those are just my thoughts on it. but hey, it simple quick and painless
jasonw22 has joined #ruby-lang
slimfit has joined #ruby-lang
<shevy> argh
<shevy> I cant report issues at bitbucket?
m3nd3s has joined #ruby-lang
<shevy> cant those guys learn from github? :(
<darix> shevy: then they couldnt sell you jira anymore ;p
<shevy> maaaaaan
fayimora_ has joined #ruby-lang
<shevy> I often think "github isn't that great", but compared to other things, it is
<shevy> assembla is even worse than bitbucket
<shevy> code.google is somewhere in the middle...
<shevy> whee from apeiros https://github.com/apeiros/irb_drop
rayners has joined #ruby-lang
jxie has joined #ruby-lang
dragonkh has joined #ruby-lang
achiu has joined #ruby-lang
cdnz has joined #ruby-lang
<Phrogz> Nice; that's mostly all I use Pry for anyhow, as much as I want to love the crazy object/method scoping and cd and showing source and modifying source.
<Phrogz> Wow, that's tight tiny code, too.
<shevy> well
<shevy> eventually I am going to switch to pry one day
<shevy> but until then let's see how much irb still gives out
<shevy> hehe
<Phrogz> Wonder why he has require 'yaml' in there.
<Phrogz> Or 'pp' for that matter. Smells like maybe he just wants those always available for himself during debugging.
robbrit has quit [#ruby-lang]
burns180_ has joined #ruby-lang
<shevy> hehe
imperator has joined #ruby-lang
<imperator> greetings programs
m3nd3s has joined #ruby-lang
publicvoid has joined #ruby-lang
fayimora has joined #ruby-lang
fayimora has joined #ruby-lang
lchi has joined #ruby-lang
yorickpeterse has joined #ruby-lang
fayimora has joined #ruby-lang
slimfit has joined #ruby-lang
<shevy> hi master breather!
* shevy pictures imperator as a mixture of HAL, Darth Vader and the evil computer in Tron ...
Zolrath has joined #ruby-lang
rippa has joined #ruby-lang
<shevy> though it is always kinda funny that mankind can explore space with thousand of spacecrafts, build a deathstart, yet be entirely unable to cure biological damage in the future
<shevy> *deathstar
ascarter has joined #ruby-lang
<imperator> in star trek: the next generation, curing cancer is no problemo, but baldness? pfft, sorry
achiu has joined #ruby-lang
justinxreese has joined #ruby-lang
<shevy> lol
seydar has joined #ruby-lang
<seydar> anyone familiar with authentication with sinatra?
Luxx_ has joined #ruby-lang
<seydar> should i be using sinatra-authentication?
slimfit has joined #ruby-lang
Heimidal has joined #ruby-lang
<imperator> seydar, i'm not; you might have better luck in #sinatra
<seydar> grr, no one is active there
<seydar> imperator: what are you using?
<imperator> seydar, nothing at the moment :)
<seydar> lucky bastard
<seydar> i managed to fix it
<imperator> though i've done rails in the past
<shevy> rails rails rails
<shevy> everyone is on rails
<seydar> i had to do the registered bit which seems like a hack
<seydar> i want everyone to flock back to the command line
<seydar> the web will be the death of us all
<shevy> :)
<shevy> I see the web makes you happy
m3nd3s has joined #ruby-lang
<shevy> how do they say about XML ... if XML is not making you happy, you were not using it enough
Heimidal has joined #ruby-lang
<seydar> i really like ruby and the web though. the web is certainly an interesting platform to work with, and ruby makes it fun
<lianj> yea, telnet games are so much safer
Tearan has joined #ruby-lang
<seydar> SO MUCH effort has been poured into making web programming comfortable
<seydar> and you can tell
<seydar> it's so evident in ruby
<seydar> if ncurses apps were that way...
<lianj> rails/rack you mean
<seydar> lianj: yeah, you're right. that's where the effort's been
<seydar> i can understand why it would be bad to skew our efforts towards rails
<seydar> but towards rack? is that a bad thing?
<seydar> are there alternatives to rack?
<shevy> ncurses is so painful
<seydar> i know, right?
<seydar> i dunno how wm does it with sup
rdeshpande has joined #ruby-lang
dejongge has joined #ruby-lang
l0st1 has joined #ruby-lang
<seydar> i found this one project that had a beautiful ncurses abstraction over it
<seydar> and ithought i bookmarked it
<seydar> but evidently not
gianlucadv has joined #ruby-lang
wallerdev has joined #ruby-lang
heppy has joined #ruby-lang
amerine has joined #ruby-lang
ericmuyser has joined #ruby-lang
malev_ has joined #ruby-lang
burns180 has joined #ruby-lang
apeiros_ has joined #ruby-lang
butchanton has joined #ruby-lang
H2H has joined #ruby-lang
amerine has joined #ruby-lang
SuperTaz_work has joined #ruby-lang
chimkan has joined #ruby-lang
ericmuyser has joined #ruby-lang
beiter has joined #ruby-lang
<seydar> so who's using sequel?
* apeiros_ does
<seydar> sinatra-authentication uses User.set (where User < Sequel::Model) as a create method
<seydar> which is nominally strange since that's not what the name says
<seydar> and User.set also doesn't do that. it doesn't really seem to do much
<seydar> apeiros_: how do i fix this?
<apeiros_> no idea
<seydar> you done authentication with sinatra before?
<apeiros_> no
darkf has joined #ruby-lang
<seydar> fuck it, this thing really wants datamapper
<seydar> but you know what?
<seydar> NOT GONNA HAPPEN
<seydar> time to fuck shit up
<seydar> and modify some code
<seydar> but first, lunch
achiu1 has joined #ruby-lang
mrsolo has joined #ruby-lang
Avanine has joined #ruby-lang
burns180_ has joined #ruby-lang
dhruvasagar has joined #ruby-lang
fayimora has joined #ruby-lang
Heimidal has joined #ruby-lang
benanne has joined #ruby-lang
manojhans has joined #ruby-lang
spleeze has joined #ruby-lang
robbyoconnor has joined #ruby-lang
dreinull has joined #ruby-lang
Spooner has joined #ruby-lang
srbaker has joined #ruby-lang
Giddeon has joined #ruby-lang
gianlucadv has joined #ruby-lang
amerine has joined #ruby-lang
DMKE has joined #ruby-lang
brownies has joined #ruby-lang
burns180 has joined #ruby-lang
indstry has joined #ruby-lang
gjaldon has joined #ruby-lang
yorickpeterse has joined #ruby-lang
kyrylo has joined #ruby-lang
<crankharder> trying to write a module that hooks into ActiveSupport::TestCase's #setup method. alias chain method isn't cooperating. what am i doing wrong here? https://gist.github.com/2007990
<crankharder> trying to get my setup method to run before AS::TC's setup method
justinxreese has joined #ruby-lang
<crankharder> also, the test isnt' broken
lsegal has joined #ruby-lang
manojhans has joined #ruby-lang
MDmalLION has joined #ruby-lang
PigDude has quit [#ruby-lang]
<MDmalLION> what do I type to list all the methods in a class>
<shevy> .methods
<shevy> bar = Bar.new; bar.methods
MDmalLION has joined #ruby-lang
twittard has joined #ruby-lang
MDmalLION has joined #ruby-lang
robbyoconnor has joined #ruby-lang
ankurgel has joined #ruby-lang
ankurgel has joined #ruby-lang
indstry has joined #ruby-lang
A124 has joined #ruby-lang
MDmalLION has joined #ruby-lang
ankurgel has quit [#ruby-lang]
manoj has joined #ruby-lang
burns180_ has joined #ruby-lang
MDmalLION has joined #ruby-lang
achiu has joined #ruby-lang
ilyam has joined #ruby-lang
manojhans has joined #ruby-lang
MDmalLION has joined #ruby-lang
postmodern has joined #ruby-lang
MDmalLION has joined #ruby-lang
Sailias_ has joined #ruby-lang
MDmalLION has joined #ruby-lang
srbaker has joined #ruby-lang
tla_ has joined #ruby-lang
MDmalLION has joined #ruby-lang
wmoxam has joined #ruby-lang
MDmalLION has joined #ruby-lang
<imperator> Bar.instance_methods
<imperator> or Bar.instance_methods(false) if you don't want to show inherited methods
Keva161 has joined #ruby-lang
MDmalLION has joined #ruby-lang
zmack has joined #ruby-lang
lateau_ has joined #ruby-lang
qpingu has joined #ruby-lang
frem has joined #ruby-lang
MDmalLION has joined #ruby-lang
mssola has joined #ruby-lang
Hakon|mbp has joined #ruby-lang
Sailias_ has joined #ruby-lang
zmack has joined #ruby-lang
bubbadean has joined #ruby-lang
hashbangchris has joined #ruby-lang
malev_ has joined #ruby-lang
MDmalLION has joined #ruby-lang
tommyvyo has joined #ruby-lang
burns180 has joined #ruby-lang
lateau_ has quit [#ruby-lang]
gix has joined #ruby-lang
r3trofitted has joined #ruby-lang
MDmalLION has joined #ruby-lang
malev_ has joined #ruby-lang
MDmalLION has joined #ruby-lang
perryh has joined #ruby-lang
malev_ has joined #ruby-lang
Skif has joined #ruby-lang
MDmalLION has joined #ruby-lang
MDmalLION has joined #ruby-lang
tomzx has joined #ruby-lang
febeling has joined #ruby-lang
MDmalLION has joined #ruby-lang
dreinull has joined #ruby-lang
hagebake has joined #ruby-lang
hagebake has joined #ruby-lang
MDmalLION has joined #ruby-lang
MDmalLION has joined #ruby-lang
Stalkr_ has joined #ruby-lang
moemen has joined #ruby-lang
Heimidal_ has joined #ruby-lang
MDmalLION has joined #ruby-lang
malev_ has joined #ruby-lang
malev_ has joined #ruby-lang
burns180_ has joined #ruby-lang
MDmalLION has joined #ruby-lang
<shevy> that's much nicer
chimkan has joined #ruby-lang
chimkan_ has joined #ruby-lang
MDmalLION has joined #ruby-lang
MDmalLION has joined #ruby-lang
Natch| has joined #ruby-lang
rdavila has joined #ruby-lang
MDmalLION has joined #ruby-lang
verto has joined #ruby-lang
MDmalLION has joined #ruby-lang
Indian has joined #ruby-lang
MDmalLION has joined #ruby-lang
MDmalLION has joined #ruby-lang
burns180 has joined #ruby-lang
achiu has joined #ruby-lang
woollyams has joined #ruby-lang
slimfit has joined #ruby-lang
rue has joined #ruby-lang
MDmalLION has joined #ruby-lang
Swimming_Bird has joined #ruby-lang
burns180_ has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
zmack has joined #ruby-lang
MDmalLION has joined #ruby-lang
MDmalLION has joined #ruby-lang
MDmalLION has joined #ruby-lang
y3llow has joined #ruby-lang
s0ber has joined #ruby-lang
pbjorklund has joined #ruby-lang
zmack has joined #ruby-lang
Heimidal has joined #ruby-lang
y3llow has joined #ruby-lang
MDmalLION has joined #ruby-lang
davidw has joined #ruby-lang
y3llow has joined #ruby-lang
workmad3_ has joined #ruby-lang
y3llow has joined #ruby-lang
malev__ has joined #ruby-lang
Phrogz has joined #ruby-lang
<Phrogz> apeiros_: Why require 'pp' and require 'yaml' in irb_drop?
* Phrogz just rolls his own Sinatra authentication.
MDmalLION has joined #ruby-lang
<apeiros_> Phrogz: i have that in it? funny… I have that in irbrc anyway
<drbrain> power failure ☹
<apeiros_> Phrogz: I really have no idea why that is in… must be some relict. It shouldn't be in there.
yeltzooo has joined #ruby-lang
burns180 has joined #ruby-lang
<Phrogz> apeiros_: Cool. :)
kain has joined #ruby-lang
<Phrogz> Who was asking about Sinatra auth earlier, before my IRC went down?
<apeiros_> I think he went off
MDmalLION has joined #ruby-lang
curtism has joined #ruby-lang
curtism has joined #ruby-lang
<Phrogz> hokay
MDmalLION has joined #ruby-lang
freedrull has joined #ruby-lang
MDmalLION has joined #ruby-lang
phlipper has joined #ruby-lang
MDmalLION has joined #ruby-lang
wyhaines has joined #ruby-lang
MDmalLION has joined #ruby-lang
lifestream has joined #ruby-lang
burns180_ has joined #ruby-lang
MDmalLION has joined #ruby-lang
outoftime has joined #ruby-lang
virunga has joined #ruby-lang
BHensley has joined #ruby-lang
MDmalLION has joined #ruby-lang
ryanf has joined #ruby-lang
Heimidal has joined #ruby-lang
brianpWins has joined #ruby-lang
<owen1> can someone send a link to the recent github slideshow about documentation (mainly tomdoc)?
MDmalLION has joined #ruby-lang
dv310p3r has joined #ruby-lang
talkingrain has joined #ruby-lang
MDmalLION has joined #ruby-lang
<talkingrain> hi
<talkingrain> i want to extract information from Config::CONFIG or RbConfig::CONFIG
<talkingrain> whats the best way to do that in a 1.8 / 1.9 agnostic (or gnostic) way?
<talkingrain> ie... if 1.8 use the former, if 1.9 use the latter
<cout> I always use RbConfig
<talkingrain> cout: is that available on 1.8?
MDmalLION has joined #ruby-lang
jaisoares has quit [#ruby-lang]
<cout> e.g. RbConfig = Config if not defined?(RbConfig)
<talkingrain> ah
pbjorklund has joined #ruby-lang
MDmalLION has joined #ruby-lang
petercooper has joined #ruby-lang
MDmalLION has joined #ruby-lang
burns180 has joined #ruby-lang
drbrain has joined #ruby-lang
MDmalLION has joined #ruby-lang
ezkl has joined #ruby-lang
futurechimp has joined #ruby-lang
<imperator> RbConfig is in 1.8
boxmo has joined #ruby-lang
Spooner has joined #ruby-lang
MDmalLION has joined #ruby-lang
MDmalLION has joined #ruby-lang
leonL has joined #ruby-lang
Heimidal has joined #ruby-lang
MDmalLION has joined #ruby-lang
burgestrand has joined #ruby-lang
MDmalLION has joined #ruby-lang
MDmalLION has joined #ruby-lang
H2H has joined #ruby-lang
MDmalLION has joined #ruby-lang
burns180_ has joined #ruby-lang
MDmalLION has joined #ruby-lang
MDmalLION has joined #ruby-lang
MDmalLION has joined #ruby-lang
<Phrogz> Amusing; RbConfig/Config appears to have been the problem here http://stackoverflow.com/questions/9636043/problems-with-mongoid-and-one-to-many-relations
woollyams has joined #ruby-lang
slimfit has joined #ruby-lang
Sailias_ has joined #ruby-lang
gsav_ has joined #ruby-lang
Defusal has joined #ruby-lang
Defusal has joined #ruby-lang
lightcap has joined #ruby-lang
burns180 has joined #ruby-lang
wyhaines has joined #ruby-lang
skyjumper has joined #ruby-lang
dhruvasagar has joined #ruby-lang
towski has joined #ruby-lang
looopy has joined #ruby-lang
apeiros_ has joined #ruby-lang
looopy has joined #ruby-lang
shevy has joined #ruby-lang
robbyoconnor has joined #ruby-lang
<zenspider> sup my bitches?
<erikh> jus' chillaxin'
<zenspider> you don't actually say that in real life, do you?
<erikh> about as often as you say 'sup my bitches?'
<zenspider> I wonder if it is an east coast thing
<zenspider> dooood. that's all the time
<freedrull> anyone know how to run a single shoulda test with minitest? trying -n /mytest/ ...doesn't work.
<zenspider> and really... tenderlove IS my bitches :P
<erikh> heh, you know I'm from southern oregon, right?
<erikh> (and I'm actually in menlo park these days)
<zenspider> freedrull: run with -v first and see how shoulda names stuff
m3nd3s has joined #ruby-lang
<zenspider> menlo park? how do you like that?