fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
mmitchell has quit [Ping timeout: 264 seconds]
<Elico1> Spaceghostc2c: you are not the only one but since it's something that meant to be used with rdbms then..
sailias has joined #ruby
hsbt_away is now known as hsbt
pricees has quit [Quit: leaving]
<Spaceghostc2c> elico1: What do you mean?
verto is now known as verto|off
banisterfiend has joined #ruby
xargoon has joined #ruby
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-rc2)]
sailias has quit [Client Quit]
mmitchell has joined #ruby
havenn has joined #ruby
xnm has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
<Elico1> Spaceghostc2c: means i dont use them often but this DB was built to be used in rdbms
<n_blownapart> hi I have two questions in comments on this paste regarding enumerators. thanks: http://pastie.org/4794256
josh^ has joined #ruby
havenn has quit [Remote host closed the connection]
lggr has joined #ruby
mensvaga has joined #ruby
emmanuelux has quit [Quit: emmanuelux]
<mensvaga> Here's an interesting (probably stupid, I know) problem:
mmitchell has quit [Ping timeout: 246 seconds]
<mensvaga> Somebody wrote something in ERB that takes a data structure, inside ERB and generates output.
Goles has joined #ruby
<mensvaga> I need to get a data structure outputted to an ERB data structure.
<mensvaga> We'll probably be changing this, but currently, the "input" to his stuff is an ERB data structure.
<mensvaga> How do I take a data structure in ruby (a collection of hashes, arrays of hashes, etc), and output it in an ERB data structure?
<mensvaga> very similar to: require 'json'; jj some_data_structure
zeromodulus has joined #ruby
bricker has joined #ruby
ij has quit [Ping timeout: 265 seconds]
n8888 has quit [Ping timeout: 245 seconds]
<n_blownapart> hi please help with commented questions here: http://pastie.org/4794256 thanks
<Spaceghostc2c> elico1: I don't understand what you're saying.
XedMada has joined #ruby
<Spaceghostc2c> A database being built to be used in a relational database management system?
lggr has quit [Ping timeout: 264 seconds]
IrishGringo has quit [Ping timeout: 246 seconds]
rubious has joined #ruby
ffranz2 has joined #ruby
havenn has joined #ruby
<mensvaga> n_blownapart: read the documentation about String, and see if << is the same as +
<mensvaga> As far as the other stuff is concerned, I have no idea.
lggr has joined #ruby
eignerch_ has quit [Remote host closed the connection]
<Elico1> Spaceghostc2c: a db structure that was meant to be used as relational..
xyzodiac has quit [Quit: Computer has gone to sleep.]
<mensvaga> n_blownapart: << and + are concatination for strings.
<Elico1> Spaceghostc2c: it seems like active record mysql is lacks some of the basic things
<n_blownapart> mensvaga: thanks, I know they're different from eachother, but not sure about side effects since the output is the same..
<mensvaga> They have different method documentation entries, but they appear to do the same thing, except one is called "append" and may call integer.to_s() or something.
<Elico1> mensvaga: << is not == + << is enumaration thing
<mensvaga> Try doing string + integer
<mensvaga> and then string << integer.
_adeponte has quit [Remote host closed the connection]
<mensvaga> elico1: are you reading the same documentation I am? http://www.ruby-doc.org/core-1.9.3/String.html#method-i-2B
libryder_ has left #ruby [#ruby]
AlbireoX`Laptop has joined #ruby
<n_blownapart> mensvaga: thanks will do. I'm a beginner. documentation often leaves me glazed over.
ph^ has joined #ruby
AlbireoX has quit [Read error: Connection reset by peer]
<mensvaga> n_blownapart: beginner programmer or beginner to ruby?
<mensvaga> There's a lot of stuff that's "Try it and see" :)
<n_blownapart> both mensvaga getting through a book: well-grounded rubyist
<n_blownapart> mensvaga: thanks I'm using pry to learn. any suggestions for best commands in pry aside from show-source and ?
AlbireoX has joined #ruby
<n_blownapart> for learning ^^
cw has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 244 seconds]
AlbireoX`Laptop has quit [Read error: Connection reset by peer]
<mensvaga> My advice to you would be to use more simple examples; a => 1, b => 2, c => 3, d => 4
diegoviola has joined #ruby
<mensvaga> (easier to type, less to read etc)
lggr has joined #ruby
sfim has joined #ruby
<havenn> n_blownapart: I think the best Pry command for learning is: help
<sfim> hi folks, im new to ruby and got stuck in creating a class. The problem is tha the classname is stored in a string. Any toughts?
<realfunny> object.methods is fun for beginners
<realfunny> also object.methods.sort
<havenn> n_blownapart: Then pick a command and, e.g.: help show-method
<blazes816> sfim: look up constantize, from rails, then reverse engineer how they do it (not very hard)
<n_blownapart> mensvaga: I'm doing well with some pretty complex logic, etc. struggling with enumberators and lambdas a bit. thanks havenn
<sfim> blazes816, thanks, i will try
<mensvaga> n_blownapart: It may seem dry, but you might want to start with an algorithm book
<n_blownapart> enumerators* ^^
<mensvaga> and then the De Morgan laws
<mensvaga> those are very important.
<Elico1> mensvaga: in string there is a spectial "<<" method..
<mensvaga> So, there's << and then the Special <<
<mensvaga> ?
<blazes816> haha
<sfim> blazes816, yeah, just what i was looking for!
<blazes816> capital <<
<mensvaga> (I'm not a ruby expert; I do consider myself to be a decent programmer though)
<blazes816> sfim: awesome, good luck!
swarley_ has joined #ruby
Guedes0 has quit [Ping timeout: 245 seconds]
<Spaceghostc2c> elico1: I posit that you are doing things wrong if you tie your domain to a persistence layer.
<Elico1> mensvaga: it's not about being expert but more like there is "<<" and there are "+=" and "+"
ph^ has quit [Ping timeout: 252 seconds]
davidcelis has quit [Quit: K-Lined.]
<mensvaga> Ah.
<Spaceghostc2c> Kind of one of those differentiators between a rubyist and a rails developer in my mind.
ckrailo has quit [Quit: Computer has gone to sleep.]
<mensvaga> single argument vs 2 arguments.
<n_blownapart> mensvaga: cool. could you elaborate on what an algorithm book is? at least for a beginner?
<Elico1> in string "<<" == "+"
<mensvaga> elico1: yes
<mensvaga> that's what we were talking about ;)
<mensvaga> n_blownapart: the wikipedia article is terrible on the topic.
<mensvaga> It's correct, but it's written in formal boolean algebra.
<mensvaga> Expressed in code, De Morgan's laws are:
<banisterfiend> mensvaga womensvaga
<Elico1> if you will take build a new class you will see that "<<" will not work without enumaration
<n_blownapart> elico1: yeah but my book prefers + because of apparentside effects that I cannot determine, in this prog: http://pastie.org/4794256
<mensvaga> 0 = 0; 1 = 1; !1 = 0; !0 = 1; 1 && 1 = 1; 1 && 0 = 0; 0 && 0 = 0; 0 || 0 = 0; 0 || 1 = 1; 1 || 1 = 1; , and so on and so forth.
<Elico1> Spaceghostc2c: if it's a good way to implement it then it's good
fyolnish has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 244 seconds]
<Spaceghostc2c> elico1: No. Never.
<Spaceghostc2c> It's just a poor design that works.
<mensvaga> banisterfiend: it's latin for "the mind wanders" or "the wandering mind". I don't mind that it has something close to lady parts in the name :)
<mensvaga> that and 'a' causes 'g' to not be pronounced as 'j'.
<Spaceghostc2c> High coupling, no cohesion, it's just one monolithic mess.
<mensvaga> If it were vagi or vage, then yes.
<mensvaga> vagA, nope.
lggr has joined #ruby
<Elico1> n_blownapart: it's pretty simple..
notVert has quit [Read error: Connection reset by peer]
<Spaceghostc2c> elico1: I've worked on enough projects to be able to say with complete confidence that building your app that tightly coupled to your framework and your persistence layer is a Bad Thing™ although it may not reveal itself as such for a while.
sfim has quit [Read error: Connection reset by peer]
ryanf has quit [Ping timeout: 268 seconds]
A1241 has joined #ruby
sfim has joined #ruby
<Elico1> n_blownapart: e.each { |string, war| string << "#{war}..." } creates\chaning the string in e...
A1241 has quit [Quit: Leaving.]
A124 has joined #ruby
<mensvaga> You know how there are JSON libraries that take a data structure and output JSON?
<mensvaga> How do I take a data structure and output it to something that ERB would use if I were defining variables inside of it?
rabidpraxis has joined #ruby
xyzodiac has joined #ruby
<mensvaga> I could make an ERB template for it, but that would just be silly.
<n_blownapart> elico1 but + is preferred because << produces side effects that I still don't see.
<Spaceghostc2c> n_blownapart: What do you mean?
<Spaceghostc2c> n_blownapart: It just appends to the current object without returning a new one. It modifies in place.
<Spaceghostc2c> Returning the same object.
yshh_ has quit [Remote host closed the connection]
<Elico1> well you can see it if you will write the right ode...
GraemeLion has joined #ruby
<n_blownapart> Spaceghostc2c: thanks . the book says one must be careful using << over + because of side effects. elico1 what there's an error? http://pastie.org/4794256
<Spaceghostc2c> n_blownapart: n = "My awesome"; puts n;puts n << " String"
asdfhoqwergfiqwe has joined #ruby
<Spaceghostc2c> n_blownapart: + will mean that you're creating multiple objects, which isn't bad, but when you don't need them, just concat.
aantix has quit [Ping timeout: 252 seconds]
<Elico1> i will give you an example: e.each { |string, war| puts string ; p string.object_id; }
lggr has quit [Ping timeout: 252 seconds]
<Elico1> see what you get...
<havenn> n_blownapart: Example in a gist: https://gist.github.com/3779328
<n_blownapart> havenn: elico1 Spaceghostc2c thanks all ! will study all of this...
<Spaceghostc2c> n_blownapart: Anytime, friend.
<n_blownapart> Spaceghostc2c: pax
<Spaceghostc2c> n_blownapart: Pax?
<n_blownapart> Spaceghostc2c: yeah latin for peace , my signiture
<Elico1> n_blownapart: you will get a big that you can see in that: e.each { |string, war| string << "#{war}..."; p string.object_id; }
<Spaceghostc2c> n_blownapart: Oh, cool.
<n_blownapart> signature*
<n_blownapart> elico1: cool thanks
<Elico1> Spaceghostc2c: about the rdbms maybe it stinks for someone who understands but I will not fight for this DB if they built and used it that way so be it.
<Spaceghostc2c> elico1: I don't think that building an app in that way is a very good thing to do.
<Spaceghostc2c> So if you do it, good luck, may God have mercy on your soul.
<mensvaga> That's how you can tell that Ruby is a young language.
<mensvaga> "God have mercy on your soul"
<Spaceghostc2c> mensvaga: Python is young in the same way.
swarley_ has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
ttt has joined #ruby
<mensvaga> As opposed to, "There might not be a God, but I know you'll be miserable."
<Spaceghostc2c> But hey it was started in 1995 as the first release.
<Spaceghostc2c> It was conceived in 1993 though.
<mensvaga> I kid of course, Here I am implying that some amount of Atheism should at least be apparent in a more mature programming language.
<Spaceghostc2c> mensvaga: There are old esoteric languages that really likely depend on the whim of the Gods.
mattyoho has joined #ruby
<Spaceghostc2c> Sometimes I even feel bad for sticking my code inside a rails project directory unless it's specific to the framework. DAO objects go into the file structure, but my models are completely standalone.
<havenn> mensvaga: Oh you mistake our meaning, we realize God is dead and purely wish his mercy in a postmodernist sense.
<mensvaga> there you go
<Spaceghostc2c> My DAO objects expose interfaces that are relevant to the domain, so I just replicate the API and implement the database portion again and my domain objects chug along happily.
<wmoxam> God isn't dead. I saw he tweeting last week
<wmoxam> *him
jimeh has quit [Ping timeout: 265 seconds]
yakitori has joined #ruby
ttt has quit [Ping timeout: 260 seconds]
lggr has quit [Ping timeout: 264 seconds]
iori has joined #ruby
kiyoura has joined #ruby
yshh has joined #ruby
yshh has quit [Remote host closed the connection]
yshh has joined #ruby
dmiller has quit [Remote host closed the connection]
kiyoura has quit [Read error: Connection reset by peer]
gabrielrotbart has joined #ruby
dustinleer has joined #ruby
yasushi__ has joined #ruby
linguini has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ph^ has joined #ruby
lggr has joined #ruby
savage- has quit [Remote host closed the connection]
katherinem13 has joined #ruby
AlbireoX has quit [Remote host closed the connection]
rubious has quit [Quit: Linkinus - http://linkinus.com]
AlbireoX has joined #ruby
<n_blownapart> elico1: hi you still on? I get an TypeError with that code including object_id
blazes816 has quit [Quit: blazes816]
<Spaceghostc2c> n_blownapart: Just ask. There are 610 people here, maybe one of them is a rubyist.
PragCypher has quit [Read error: Connection reset by peer]
nga4 has quit [Ping timeout: 248 seconds]
ncr100 has quit [Ping timeout: 246 seconds]
PragCypher has joined #ruby
AlbireoX has quit [Read error: Operation timed out]
Tearan has quit [Quit: Sleepy Badger....]
joelsbea1d has quit [Ping timeout: 246 seconds]
stan_man_can has joined #ruby
<mensvaga> If I need to get 3 "\t
<mensvaga> dammit
lggr has quit [Ping timeout: 265 seconds]
elux has joined #ruby
<n_blownapart> Spaceghostc2c: good call, hold on one sec..
<mensvaga> if I need to get 3 "\t" charactors appended together, what's the best way of doing it?
stan_man_can has quit [Client Quit]
<mensvaga> Perl (forgive me) has the x operator:
<mensvaga> 3 x "\t
<mensvaga> err, "\t" x 3
<Spooner> "\t" * 3
<mensvaga> which gives me "\t\t\t
<mensvaga> OK
<mensvaga> thanks.
<Spaceghostc2c> mensvaga: 3.times {}
<mensvaga> stupid keys close togethter, I'm having trouble typing '
<Spaceghostc2c> Or that.
Hanmac1 has joined #ruby
<Spaceghostc2c> We call that 'fat fingering' where I'm from. It's lulzy.
<mensvaga> My fingers aren't fat, so much as they're nubby, and I'm at a weird angle with the keyboard.
ph^ has quit [Ping timeout: 264 seconds]
<mensvaga> BUt yes, we call it the same thing here.
chrishunt has quit [Ping timeout: 245 seconds]
<Spaceghostc2c> mensvaga: Mine aren't either. It's a funny, not a literal.
banisterfiend has left #ruby [#ruby]
Hanmac has quit [Ping timeout: 264 seconds]
yasushi has joined #ruby
<mensvaga> Oh, there are people where it's very literal ;)
lggr has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<Spaceghostc2c> mensvaga: Yeah, but to call it fat fingering in a literal way is a bit too rude, don't you think?
cakehero has quit [Quit: Computer has gone to sleep.]
<n_blownapart> Spaceghostc2c: it was from this: using object_id , elico1 was trying to illustrate the diff between << and + -- but why the error?
xyzodiac has quit [Quit: Computer has gone to sleep.]
<n_blownapart> http://pastie.org/4794552 ^^ Spaceghostc2c
bradhe_ has quit [Remote host closed the connection]
<Spaceghostc2c> n_blownapart: Why are you using an enumerator? Is this just an example problem?
<mensvaga> Spaceghostc2c: big fingering sounds just as funny.
<Spaceghostc2c> mensvaga: I have finger swagger.
<mensvaga> But still, if you're worried about offending somebody with legitimately fat fingers, then why use the term at all?
<Spaceghostc2c> :(
<n_blownapart> yeah Spaceghostc2c an example on "attaching enumerators to other objects. a bit confusing..
<Spaceghostc2c> n_blownapart: Oh gotcha.
Chryson has joined #ruby
<n_blownapart> Spaceghostc2c: its a book example. the well-grounded rubyist (I like it)
Jamone has quit [Quit: Quit]
slicslak_ has quit [Ping timeout: 265 seconds]
<Spaceghostc2c> n_blownapart: Oh.
Monie has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
<n_blownapart> Spaceghostc2c: but where is the code trying to convert a String into an Integer?
slicslak has joined #ruby
wimplash has joined #ruby
lggr has quit [Ping timeout: 264 seconds]
Chryson has quit [Client Quit]
mr_no has quit [Quit: Sto andando via]
dustinleer has quit [Remote host closed the connection]
<Spaceghostc2c> n_blownapart: If you write that into a file and execute the file, what error do you get?
<n_blownapart> Spaceghostc2c: that was my next move lemme see thanks
c0rn__ has quit [Quit: Computer has gone to sleep.]
jarred has quit [Ping timeout: 245 seconds]
slicslak has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
dmiller has joined #ruby
jarred has joined #ruby
Elico1 has quit [Ping timeout: 264 seconds]
dev_ryan70 has quit [Remote host closed the connection]
Sargun has quit [Ping timeout: 256 seconds]
elux has quit [Quit: Bye!]
ianbrandt_ has quit [Quit: ianbrandt_]
Sargun has joined #ruby
<n_blownapart> Spaceghostc2c: from the editor, it doesn't run with object_id.
fyolnish has joined #ruby
moted has quit [Ping timeout: 240 seconds]
maletor has joined #ruby
sebastorama has joined #ruby
<n_blownapart> Spaceghostc2c: inject returns a bunch of strings, but I was expecting each one to have an object_id
lggr has quit [Ping timeout: 245 seconds]
<Spaceghostc2c> n_blownapart: Are they each separate string objects?
wimplash has quit [Quit: Leaving...]
voodoofish430 has quit [Quit: Leaving.]
<n_blownapart> Spaceghostc2c: no it should be just one, since we have used concat method , right?
<havenn> n_blownapart: after the first iteration, string is assigned to nil
forced_request has joined #ruby
<sfim> i have an array of strings. how do i pass each string of the array as argument to a method? sort like "expand" a string. same as {*} in tcl
<n_blownapart> oh, so it returns the first and only object_id, then throws error
<n_blownapart> ?^^ havenn Spaceghostc2c
bbttxu has joined #ruby
<havenn> n_blownapart: I think this is what you mean to do?: https://gist.github.com/3779468
xyzodiac has joined #ruby
ffranz2 has quit [Quit: Leaving]
lggr has joined #ruby
elico has joined #ruby
<havenn> n_blownapart: Example of what string is returning: https://gist.github.com/3779479
<havenn> It seems absolutely insane to use enumerable and inject like that >.>
Chryson has joined #ruby
ph^ has joined #ruby
<n_blownapart> havenn: its a book example
cbuxton1 has quit [Quit: Leaving.]
bricker has quit [Quit: Lost terminal]
<havenn> n_blownapart: In context maybe I'd think otherwise. =P
<n_blownapart> havenn: please elaborate
<n_blownapart> havenn: I'm checking out your second example thanks
xnm has quit [Ping timeout: 246 seconds]
GoGoGarrett has joined #ruby
talsamon has quit [Read error: Operation timed out]
talsamon has joined #ruby
Emmanuel_Chanel_ is now known as Emmanuel_Chanel
<havenn> sfim: You may be looking for Splat: method_calling_an_array(*the_array)
lggr has quit [Ping timeout: 240 seconds]
<havenn> sfim: e.g.: people = ["Rudy", "Sarah", "Thomas"]; say "Howdy!", *people
havenn has quit [Remote host closed the connection]
pingfloyd has joined #ruby
pingfloyd has quit [Client Quit]
awarner has joined #ruby
pingfloyd has joined #ruby
<n_blownapart> havenn: that is cool I amended the lines puts string.object_id; puts war.object_id -- got 4 which is nil before each war.object_id. thanks very instructive !
lggr has joined #ruby
seanstickle has joined #ruby
havenn has joined #ruby
Jellyg00se has joined #ruby
chendo_ has quit [Ping timeout: 256 seconds]
ph^ has quit [Ping timeout: 245 seconds]
<havenn> Oops, didn't actually run the second gist... just realized nil was printing blank lines, so changed it to nil.inpect...
chendo_ has joined #ruby
Tearan has joined #ruby
jarred has quit [Quit: jarred]
<n_blownapart> havenn: one sec sorting it out
ttt has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
gmci_ has quit [Quit: Computer has gone to sleep.]
jso has quit []
dpk has joined #ruby
bthesorceror has joined #ruby
bthesorceror_ has joined #ruby
bthesorceror has quit [Read error: Connection reset by peer]
bthesorceror_ is now known as bthesorceror
ttt has quit [Ping timeout: 240 seconds]
<n_blownapart> havenn: yeah so it returns nil and 4 after string id and each war id thanks very much interesting!
jasonkuhrt has joined #ruby
nari has joined #ruby
lggr has joined #ruby
bthesorceror has left #ruby [#ruby]
CannedCorn has joined #ruby
<CannedCorn> hey guys
<CannedCorn> do you ever use require 'bundler/setu[
<CannedCorn> require 'bunlder/setup'
<CannedCorn> when i use that it test:unit complains to no end about bundler
mk03_ has quit [Remote host closed the connection]
<CannedCorn> gems/bundler-1.2.1/lib/bundler/source.rb:516: warning: method redefined; discarding old revision
ttt has joined #ruby
AlbireoX has joined #ruby
<CannedCorn> anyone have ideas?
n_blownapart has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 264 seconds]
pipopopo has quit [Ping timeout: 268 seconds]
Ruler_Of_Heaven_ has joined #ruby
GraemeLion has quit [Quit: out]
<Spaceghostc2c> I have no ideas. I merely regurgitate the misinformation that was thrust upon me from childhood continually in an effort to find peace in a reality I don't understand due to the impenetrable shrouds of self-doubt and misguided desire to be 'normal'. This is the world today.
wimplash has joined #ruby
<bnagy> You know who had ideas? Hitler.
seoaqua has joined #ruby
<rking> Ideas are like… your opinion, mannn.
lggr has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
<CannedCorn> awesome
<Spaceghostc2c> Ideas? Where we're going we don't need ideas.
rakunHo has joined #ruby
chrishunt has joined #ruby
<bnagy> We're starting a cloud business?
awarner has quit [Remote host closed the connection]
tommyvyo has quit [Quit: Computer has gone to sleep.]
dagnachewa has quit [Remote host closed the connection]
ph^ has joined #ruby
<mensvaga> So, here's the result of me trying to convert a data structure as text input for a template:
<mensvaga> at least, that's the output of it, given an input.
<mensvaga> FML.
<mensvaga> I just needed something that converts a data structure to text. Done wrote a shitty output generator for it.
lggr has quit [Ping timeout: 246 seconds]
c0rn_ has joined #ruby
<bnagy> isn't that what pp does?
<mensvaga> Nope.
<mensvaga> Not "exactly"
lggr has joined #ruby
gmci has joined #ruby
<bnagy> awesome_print?
<Spaceghostc2c> bnagy: You're my favorite trollbruv.
cw has quit [Read error: Connection reset by peer]
<mensvaga> Yeah. Awesome print.
<mensvaga> I need to figure out what the hell the guy was thinking, and if the output of 'pp' would work, but I'm looking at his documents and I don't think it will.
<mensvaga> Don't get me wrong, I hate this stupid bullshit.
TandemAdam has left #ruby ["Leaving"]
dpk has quit [Ping timeout: 246 seconds]
seoaqua has quit [Ping timeout: 252 seconds]
<bnagy> couldn't you do that really insecurely in like 4 lines of code?
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
sent-hil has quit [Remote host closed the connection]
wimplash has quit [Quit: Leaving...]
BrokenCog has quit [Client Quit]
dpk has joined #ruby
<mensvaga> More like 30, all in one class, using recursion.
<mensvaga> Hell. I'll post the code. I don't care.
<bnagy> pf
adkron has joined #ruby
<bnagy> guess putting it in a class adds a couple of lines
<mensvaga> It, of course, ignores the fact that data can have quotes in it
lggr has quit [Ping timeout: 252 seconds]
<mensvaga> and if the key of a hash doesn't have a to_s method, it would barf
<bnagy> jesus fuck, my eyes
<mensvaga> but for what I need to get done, none of that will happen. I'm actually just outputting network scopes.
<bnagy> dude, NSFW that shit
ph^ has quit [Ping timeout: 256 seconds]
BrokenCo1 has quit [Quit: leaving]
joeycarmello has joined #ruby
<mensvaga> haha. Aside from the fact that it does something pretty stupid, what's wrong with the way it looks?
<bnagy> it's...
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
<bnagy> it's unbelievably bad
<bnagy> totally gratuitous use of class vars
<bnagy> using tabs instead of rjust
<bnagy> using to_s instead of inspect
<mensvaga> As for the use of class vars, I think I'm using an instance variable, which probably isn't terrible.
<bnagy> like, having a recursive method with a depth param is the right approach
<mensvaga> The code doesn't need to be re-entrant or anything like that.
<mensvaga> Agreed, but not going for thread safety here.
<bnagy> it has nothing to do with thread safety
<mensvaga> I'll read up on rjust and inspect though.
seoaqua has joined #ruby
<bnagy> the classvars are just horrible style
<bnagy> and completely unneccessary here
lggr has joined #ruby
<mensvaga> Can't say I agree with you and the rjust thing. Reading about inspect.
mxweas has quit [Quit: Leaving...]
<mensvaga> And yes, in a perfect world, I'd be passing depth around, and a pointer to the string accumulation of the output.
xpen has joined #ruby
<mensvaga> But at the same time, class instance variables can do the same thing.
chendo_ has quit [Ping timeout: 252 seconds]
<bnagy> those are not class instance variables
<bnagy> they are class variables
<bnagy> different. not same.
<mensvaga> I know what the differences are in other languages. If I should have used one @, then fine.
chendo_ has joined #ruby
<mensvaga> I do agree with the .inspect thing.
seoaqua has quit [Ping timeout: 252 seconds]
jgwong has quit [Ping timeout: 268 seconds]
<mensvaga> All right. Enough ruby coding for me.
<mensvaga> Good night, thanks the help :)
<adkron> Was that the sound of someone giving up?
BrokenCog has quit [Quit: leaving]
jgwong has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
butblack has joined #ruby
matrixise has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
yasushi_ has joined #ruby
bluOxigen has joined #ruby
lggr has joined #ruby
yasushi has quit [Ping timeout: 256 seconds]
yasushi__ has quit [Ping timeout: 256 seconds]
null-_ has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
realfunny has left #ruby ["WeeChat 0.3.8"]
seanstickle has quit [Quit: seanstickle]
radic has quit [Disconnected by services]
radic_ has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
radic_ is now known as radic
joofsh has quit [Quit: Leaving]
c0rn_ has quit []
love_color_text has quit [Remote host closed the connection]
vitor-br has joined #ruby
Banistergalaxy has joined #ruby
ph^ has joined #ruby
<_karstensrage> where is the documetation for File.read?
<_karstensrage> oh
<_karstensrage> parent is IO
<bnagy> glad to help
lggr has joined #ruby
BrokenCog has quit [Quit: leaving]
<asdfhoqwergfiqwe> xD
<_karstensrage> whats a good mailer gem?
snuglepuss has quit [Remote host closed the connection]
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
<Spaceghostc2c> _karstensrage: Depends on your specific needs.
<_karstensrage> i can definitely send mail from my local machine just in a terminal
slicslak has joined #ruby
pskosinski has quit [Ping timeout: 276 seconds]
Guest88336 has quit [Remote host closed the connection]
<_karstensrage> i just want to mail off some ascii text
deryl has quit [Quit: Leaving.]
<asdfhoqwergfiqwe> _karstensrage, How big volumes?
<Spaceghostc2c> So you just want to send a single email?
<_karstensrage> yes single email
<asdfhoqwergfiqwe> Simple SMTP
axl_ has quit [Quit: axl_]
BrokenCog has quit [Client Quit]
h8R has quit [Remote host closed the connection]
<_karstensrage> got a link
jasonkuhrt has quit [Quit: Leaving...]
<_karstensrage> Net::SMTP?
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
BrokenCog has quit [Client Quit]
CaptainJet has quit []
Cache_Money has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
AlbireoX has quit [Remote host closed the connection]
snearch_ has joined #ruby
AlbireoX has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
h4mz1d has joined #ruby
ryanlecompte has joined #ruby
lggr has joined #ruby
ph^ has quit [Ping timeout: 256 seconds]
snearch has quit [Ping timeout: 264 seconds]
AlbireoX has quit [Remote host closed the connection]
<_karstensrage> ?
<_karstensrage> im not finding anything like simple smtp
nightfalcon has joined #ruby
elico has quit [Quit: elico]
AlbireoX has joined #ruby
maletor has joined #ruby
Bosma has joined #ruby
ewag_ has joined #ruby
bradhe has joined #ruby
slicslak has quit [Ping timeout: 264 seconds]
Targen has quit [Ping timeout: 246 seconds]
pjr_ has quit [Ping timeout: 256 seconds]
pjr has joined #ruby
pskosinski has joined #ruby
pjr is now known as Guest96590
lggr has quit [Ping timeout: 240 seconds]
lggr has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
<RubyPanther> _karstensrage: You can either use Net::SMTP, or something like actionmailer (from rails, but available separately)
<Spooner> The pony & mail gems are pretty simple too.
butblack has left #ruby [#ruby]
dagnachewa has joined #ruby
<RubyPanther> Everybody wants a pony
djbpython has joined #ruby
sent-hil has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
chendo_ has quit [Ping timeout: 252 seconds]
chendo_ has joined #ruby
chendo_ has quit [Changing host]
chendo_ has joined #ruby
lggr has joined #ruby
seoaqua has joined #ruby
Spooner has quit [Ping timeout: 245 seconds]
chimkan_ has joined #ruby
forced_request has quit [Read error: Connection reset by peer]
chimkan_ has quit [Client Quit]
lggr has quit [Ping timeout: 265 seconds]
ttt_ has joined #ruby
ph^ has joined #ruby
cibs has quit [Read error: Connection reset by peer]
cibs has joined #ruby
havenn has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
robertotauille has joined #ruby
ttt has quit [Ping timeout: 260 seconds]
gabrielrotbart has quit [Read error: Connection reset by peer]
lggr has joined #ruby
h4mz1d has quit [Ping timeout: 264 seconds]
gabrielrotbart has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
iamjarvo has quit [Ping timeout: 256 seconds]
AndChat- has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
libryder has joined #ruby
justinmcp has quit [Remote host closed the connection]
sent-hil has quit [Remote host closed the connection]
Cache_Money has quit [Ping timeout: 265 seconds]
Banistergalaxy has quit [Ping timeout: 246 seconds]
slicslak has joined #ruby
Banistergalaxy has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
AndChat- has quit [Ping timeout: 244 seconds]
quest88 has joined #ruby
AlbireoX has quit [Remote host closed the connection]
lggr has joined #ruby
pskosinski has quit [Ping timeout: 276 seconds]
AndChat- has joined #ruby
Banistergalaxy has quit [Ping timeout: 244 seconds]
GoHuyGo has joined #ruby
slicslak has quit [Ping timeout: 256 seconds]
AndChat- has quit [Ping timeout: 244 seconds]
Banistergalaxy has joined #ruby
gmci has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 252 seconds]
seoaqua has quit [Ping timeout: 256 seconds]
JohnBat26 has joined #ruby
n_blownapart has joined #ruby
lggr has joined #ruby
djbpython has quit [Ping timeout: 246 seconds]
n_blownapart has quit [Read error: No route to host]
jasonkuhrt has joined #ruby
rippa has joined #ruby
robertotauille has quit [Quit: Leaving...]
dagnachewa has quit [Quit: Leaving]
lggr has quit [Ping timeout: 246 seconds]
joeycarmello has quit [Remote host closed the connection]
chrxn has quit [Remote host closed the connection]
lggr has joined #ruby
hsbt is now known as hsbt_away
jasonkuhrt has quit [Ping timeout: 264 seconds]
artOfWar has quit [Read error: Connection reset by peer]
artOfWar has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
seoaqua has joined #ruby
hsbt_away is now known as hsbt
n_blownapart has joined #ruby
artOfWar has quit [Remote host closed the connection]
ph^ has joined #ruby
n_blownapart has quit [Remote host closed the connection]
bananagram has quit [Ping timeout: 268 seconds]
CannedCorn has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 252 seconds]
reset has quit [Ping timeout: 272 seconds]
dhruvasagar has joined #ruby
riley526 has quit [Remote host closed the connection]
justinmcp has joined #ruby
yasushi_ has quit [Ping timeout: 244 seconds]
ananthakumaran has quit [Ping timeout: 252 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
adkron is now known as adkron_afk
manuelitox_ has joined #ruby
lggr has joined #ruby
ananthakumaran has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
lggr has quit [Ping timeout: 246 seconds]
<emsilva> matti: there? Remember your "Hash[*x].map { |k, v| [k.first, k.last, v.last] } }"? That can't be made to iterate over 4 entries instead of 2, right?
lggr has joined #ruby
mikepack has joined #ruby
chendo_ has quit [Ping timeout: 256 seconds]
adkron_afk has quit [Ping timeout: 256 seconds]
davidcelis has joined #ruby
xorgnak has quit [Ping timeout: 264 seconds]
lggr has quit [Ping timeout: 245 seconds]
adkron_afk has joined #ruby
chendo_ has joined #ruby
joeycarmello has joined #ruby
c0rn_ has joined #ruby
lggr has joined #ruby
discopig has joined #ruby
discopig has left #ruby [#ruby]
asdfhoqwergfiqwe is now known as _7894
seoaqua has quit [Ping timeout: 248 seconds]
manuelitox_ has quit [Ping timeout: 245 seconds]
joeycarmello has quit [Ping timeout: 265 seconds]
lggr has quit [Ping timeout: 244 seconds]
Guest64548 has joined #ruby
ph^ has joined #ruby
lggr has joined #ruby
ltsstar has joined #ruby
dhruvasagar has quit [Ping timeout: 265 seconds]
wpaulson has joined #ruby
wpaulson has quit [Client Quit]
ltsstar has quit [Quit: ltsstar]
joeycarmello has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
ananthakumaran has quit [Quit: Leaving.]
lggr has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
elico has joined #ruby
snearch_ has quit [Quit: Verlassend]
snearch has joined #ruby
wpaulson has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
slicslak has joined #ruby
jasonkuhrt has joined #ruby
manuelitox_ has joined #ruby
wuzzzzaah has joined #ruby
PragCypher has quit [Ping timeout: 246 seconds]
slicslak has quit [Ping timeout: 245 seconds]
hsbt is now known as hsbt_away
lggr has joined #ruby
mikepack has quit [Remote host closed the connection]
hsbt_away is now known as hsbt
jasonkuhrt has quit [Ping timeout: 264 seconds]
seoaqua has joined #ruby
ph^ has joined #ruby
joeycarmello has quit [Remote host closed the connection]
AlbireoX has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
mercwithamouth has quit [Ping timeout: 256 seconds]
Guest64548 has quit [Quit: Guest64548]
Rydefalk_ has quit []
mercwithamouth has joined #ruby
Rydefalk has joined #ruby
lggr has joined #ruby
PragCypher has joined #ruby
chendo_ has quit [Ping timeout: 265 seconds]
slicslak has joined #ruby
chendo_ has joined #ruby
Guest96423 has quit [Ping timeout: 264 seconds]
manuelitox_ has quit [Ping timeout: 244 seconds]
lggr has quit [Ping timeout: 256 seconds]
amskah has joined #ruby
lolmaus has joined #ruby
lggr has joined #ruby
havenn has joined #ruby
matrixise has quit [Ping timeout: 244 seconds]
sagax has joined #ruby
wwoodrum has joined #ruby
<wwoodrum> lp
<wwoodrum> Hi!!
<wwoodrum> I need some help with ruby programming homework. Really basic stuff, can donate $5 to your paypal fun for help.
<bnagy> wouldn't it be easier to do your own homework?
<bnagy> anyway, usually people will 'help' with general stuff, for FREE even
<wwoodrum> ive been doing it for 2 hours now and researched well over 50 sites, and the answer is not in my text book
lggr has quit [Ping timeout: 252 seconds]
<wwoodrum> Well.. the homework is just upcasing a string, which is easy and i've done that.
<wwoodrum> now if the string is over 3 characters I need to upcase the last 3 letters of the string. so superman ---> superMAN
rippa has quit [Ping timeout: 246 seconds]
adkron_afk has quit [Ping timeout: 256 seconds]
<wwoodrum> so what ive got is IF string.length < 4 then string.upcase else ___________ end
uris has quit [Quit: leaving]
<wwoodrum> any ideas?
<nightfalcon> x[-3..-1].upcase
adkron_afk has joined #ruby
<nightfalcon> x = string in your case
sent-hil has joined #ruby
lggr has joined #ruby
fantazo has quit [Remote host closed the connection]
<bnagy> that will upcase all of a 3 char string though
<wwoodrum> great ty so much
<wwoodrum> will try
<m3pow> but that will upcase just the last 3 Chars
<m3pow> and he will get "MAN" if i'm not mistaking
<bnagy> depends if "foo" is supposed to be "foo" or "FOO"
<Spaceghostc2c> FoO
<bnagy> yeah it also doesn't give you the whole string
<m3pow> print x[0..4] + x[-3..-1].upcase
<m3pow> in case of superman
<m3pow> or puts
<wwoodrum> ty m3 that worked but
<wwoodrum> if i type superman
<wwoodrum> i get supermanMAN
<m3pow> x = "superman"
<nightfalcon> you have to figure out
<m3pow> puts x[0..4] + x[-3..-1].upcase
<nightfalcon> how to remove the man part
<wwoodrum> oh gotcha
<wwoodrum> well its a input string
<wwoodrum> so
<m3pow> x[0..4] is the substring : "super"
<bnagy> that's a really brittle approach though
<m3pow> it is bnagy
banisterfiend has joined #ruby
<wwoodrum> if i type jesus ill need to return jeSUS
<bnagy> wwoodrum: what is the output you are supposed to get from "foo" ?
<wwoodrum> but i get jesusSUS
<wwoodrum> foo would just be FOO
<bnagy> ok then it's easy
<wwoodrum> anything over 4 characters needs last 3 to be caps
<bnagy> s[-3..-1] is a way to refer to the last 3 chars
<wwoodrum> lake --> lAKE
rakunHo has quit [Remote host closed the connection]
<wwoodrum> s[-3..-1].upcase work?
<m3pow> bnagy but it will only output the last 3 chars, not the whole string with the last 3 upcase'd
<m3pow> only AKE in the lake case
<bnagy> wwoodrum: almost
<bnagy> you can actually assign to string ranges as well
<bnagy> try s="foo"; s[0]='g'; p s
lggr has quit [Ping timeout: 256 seconds]
<bnagy> it modifies the string in place
<wwoodrum> can you use chop 3 times on a single string? then just use the "X"+"s[-3..-1].upcase"?
<wwoodrum> because chope just takes out the last character yes?
<bnagy> might work, but it's pretty gross
<bnagy> did you try my inplace replacement above?
<havenn> def cap_last_three string; string[0..-4] << string[-3..-1].upcase; end
<wwoodrum> brb gonna try some of these. ty for all the help guys!
frogprince has quit [Ping timeout: 264 seconds]
<havenn> wwoodrum: cap_last_three "pudding"; #=> "puddING"
elico has quit [Ping timeout: 264 seconds]
sspiff has quit [Remote host closed the connection]
<havenn> wwoodrum: Give $5 to a redhead and we're even.
<m3pow> haha
slicslak has quit [Ping timeout: 264 seconds]
<Spaceghostc2c> havenn: You're a redhead too?
<sent-hil> Any rubyists from NYC?
<Spaceghostc2c> Yeah. But I'm not one of them.
ph^ has quit [Remote host closed the connection]
lggr has joined #ruby
<havenn> Spaceghostc2c: Nope. My hair is brown. Just felt charitable to gingers.
<m3pow> havenn it does work
<_karstensrage> is Ruby capitalized or is it normally expressed as ruby
<havenn> _karstensrage: capitalized when used as part of speech, typically
<Spaceghostc2c> havenn: Good sir. It is appreciated by us gingers.
<wwoodrum> getting syntax error with that havenn
<Spaceghostc2c> I write it as roobee sometimes just to piss people off a bit.
<_karstensrage> well like if you saying something like "if you are familiar with ruby/RoR.... "
<_karstensrage> would it by ruby/RoR or Ruby/RoR
<_karstensrage> be not by
nga4 has joined #ruby
<havenn> _karstensrage: Ruby
<_karstensrage> ok, thanks
_karstensrage is now known as karstensrage
<havenn> wwoodrum: You better pay a redhead!
<havenn> wwoodrum: =P
<wwoodrum> any single redheads here?
AlbireoX has quit [Read error: Connection reset by peer]
<havenn> Spaceghostc2c: ?
AlbireoX has joined #ruby
justinmcp has quit [Remote host closed the connection]
bsmith_ has joined #ruby
lggr has quit [Ping timeout: 264 seconds]
bambanx has joined #ruby
<Spaceghostc2c> havenn: I'm a ginger, I was thanking you for your kindness.
<havenn> Spaceghostc2c: No, I meant are you single? (wwoodrum asks!) >.>
<bambanx> guys i have a file and i wanna import some functions of the other file , how i can do it? using some like include?
<wwoodrum> lol
<wwoodrum> i used puts "upcased: #{word.chop.chop.chop}" + "#{word[-3..-1].upcase}"
mahmoudimus has joined #ruby
<wwoodrum> and it works great
<wwoodrum> thank you all so very much
xorgnak has joined #ruby
<RubyPanther> It has to be ruby-red, and shaved like a Ruby or it doesn't count
<havenn> RubyPanther: If only I was female and a ginger... that would be inspiring.
AlbireoX has quit [Ping timeout: 252 seconds]
PragCypher has quit [Read error: Connection reset by peer]
<havenn> I guess I could dye my hair red and shave a ruby...
<bambanx> i should use require for use external files?
PragCypher has joined #ruby
<RubyPanther> Go for it, you'll be the talk the convention after-parties.
<RubyPanther> bambanx: Usually
lggr has joined #ruby
Guest91820 is now known as hardcore
<bambanx> i am on my current file and i wanna use some methods of the other file on the same directory RubyPanther how i can it pls?
<Spaceghostc2c> havenn: Oh, yeah. Single.
hardcore has quit [Changing host]
hardcore has joined #ruby
<Spaceghostc2c> RubyPanther: You're not a ginger, you can't make those decisions.
<Spaceghostc2c> You're not part of the tribe.
<RubyPanther> This may be news to you, Cartman, but hair color is not an ethnic group.
<Spaceghostc2c> I think you're just jealous because you have no interesting cultural history. :(
<bambanx> usgin this: require "motor" say cannot load file :/
frogprince has joined #ruby
wwoodrum has quit [Quit: irc2go]
<Spaceghostc2c> bodik: It has to be in the ruby path.
<havenn> bambanx: it isn't as common as require, but: require_relative
mirror1 is now known as bigmeow
<RubyPanther> I'm a direct descendant of Oliver Cromwell, and Irish on the other side, surely that makes for interesting cultural history.
<bambanx> what u mean havenn ?
jokar1 has quit [Quit: Leaving.]
<Spaceghostc2c> RubyPanther: I couldn't be more bored. :p
jokar has joined #ruby
<havenn> bambanx: Instead of 'require', use 'require_relative' (assuming Ruby 1.9+): require_relative 'file.rb'
<bnagy> you don't need .rb for requires only loads
<RubyPanther> One of my Irish-American ancestors was a cavalryman in the South, and he got some new orders... to drive his gf's people (she was Cherokee) off their land... so he stole his horse, deserted, and moved with her to NY.
<bambanx> ty havenn
areil has joined #ruby
frogprince has quit [Ping timeout: 246 seconds]
quest88 has quit [Quit: quest88]
lggr has quit [Ping timeout: 244 seconds]
pauC has joined #ruby
ryanf has joined #ruby
h4mz1d has joined #ruby
lggr has joined #ruby
ryanf has quit [Client Quit]
<bambanx> we have any good ocr gem?
maesbn has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
bradhe has quit [Remote host closed the connection]
lggr has joined #ruby
wereHams1er is now known as wereHamster
reset has joined #ruby
ryanlecompte has quit [Remote host closed the connection]
reset has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
reset has joined #ruby
wereHamster has quit [Changing host]
wereHamster has joined #ruby
frogprince has joined #ruby
aganov has joined #ruby
joeycarmello has joined #ruby
mvangala has joined #ruby
GoHuyGo has quit [Quit: Leaving]
Cache_Money has joined #ruby
mvangala_ has quit [Ping timeout: 256 seconds]
frogprince has quit [Ping timeout: 245 seconds]
budha has joined #ruby
arturaz has joined #ruby
joeycarmello has quit [Ping timeout: 265 seconds]
lggr has quit [Ping timeout: 244 seconds]
BrianJ has quit [Quit: Computer has gone to sleep.]
joshman_ has joined #ruby
lggr has joined #ruby
aces1up has quit [Remote host closed the connection]
aces1up has joined #ruby
nachtvos has joined #ruby
senny has joined #ruby
malcolmva has quit [Ping timeout: 246 seconds]
fboudrea1 has quit [Quit: Changing server]
icooba has joined #ruby
KevinSjoberg has joined #ruby
Jck_true has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
mattyoho has quit [Quit: mattyoho]
seoaqua has quit [Ping timeout: 252 seconds]
djdb has joined #ruby
adkron_a1k has joined #ruby
robustus has joined #ruby
matrixise has joined #ruby
h4mz1d has quit [Ping timeout: 264 seconds]
lggr has quit [Ping timeout: 248 seconds]
adkron_afk has quit [Ping timeout: 256 seconds]
pauC has quit [Quit: Ex-Chat]
Aaaarg has quit [Read error: Operation timed out]
h4mz1d has joined #ruby
Jck_true has joined #ruby
AndChat- has joined #ruby
Aaaarg has joined #ruby
zigomir has joined #ruby
lggr has joined #ruby
eikko has joined #ruby
fboudreau has joined #ruby
insulator has quit [Ping timeout: 276 seconds]
Banistergalaxy has quit [Ping timeout: 244 seconds]
Banistergalaxy has joined #ruby
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
AndChat- has quit [Ping timeout: 245 seconds]
bluOxigen has quit [Ping timeout: 246 seconds]
ttt_ has quit [Remote host closed the connection]
`gregorg` has quit [Changing host]
`gregorg` has joined #ruby
`gregorg` is now known as gregorg
timonv has joined #ruby
bluOxigen has joined #ruby
jprovazn_away is now known as jprovazn
undersc0re97 has joined #ruby
ttt has joined #ruby
AndChat- has joined #ruby
havenn has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 252 seconds]
undersc0re97 has left #ruby [#ruby]
Morkel has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
dakine has quit [Quit: Leaving]
Hanmac1 is now known as Hanmac
dakine has joined #ruby
ph^ has joined #ruby
futilegames has joined #ruby
diegoviola is now known as Guest84836
Banistergalaxy has quit [Ping timeout: 245 seconds]
A124 has left #ruby [#ruby]
AndChat- has quit [Ping timeout: 245 seconds]
Guest84836 has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
ckrailo has joined #ruby
karn has joined #ruby
cezar has joined #ruby
insulator has joined #ruby
cezar has quit [Client Quit]
lggr has quit [Ping timeout: 245 seconds]
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
Bosma has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
seoaqua has joined #ruby
lggr has joined #ruby
jasonkuhrt has joined #ruby
fboudreau has quit [Quit: leaving]
wallerdev_ has quit [Quit: wallerdev_]
Jck_true has quit [Ping timeout: 246 seconds]
Banistergalaxy has joined #ruby
banisterfiend has quit [Ping timeout: 250 seconds]
JohnBat26 has joined #ruby
bartj3 has joined #ruby
seoaqua has quit [Ping timeout: 245 seconds]
fboudrea1 has joined #ruby
jasonkuhrt has quit [Ping timeout: 246 seconds]
Cache_Money has quit [Ping timeout: 244 seconds]
Jck_true has joined #ruby
Chryson has quit [Quit: Leaving]
lggr has quit [Ping timeout: 256 seconds]
lggr has joined #ruby
A124 has joined #ruby
mbk has joined #ruby
elsifaka has joined #ruby
stepnem has joined #ruby
sylock has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
TommyBot1en is now known as Tommybotten
Tommybotten is now known as TommyBotten
<sylock> hello guys. I don't really know ruby and need to install a web application (katello). I have some problems trying to resolve dependencies. Firstly I want to know how to remove the use of bundler ? I have some gems installed by system package and it didn't work. It tells me using bundle install . but it's now worse
ckrailo has quit [Quit: Computer has gone to sleep.]
<sylock> so I'd like to revert and come back to the use of the sys gems and resolve then the problems
bradhe has joined #ruby
<Hanmac> sylock: ask #bundler ...
<sylock> ok ;)
ncamargo has joined #ruby
dhruvasagar has joined #ruby
lggr has joined #ruby
Bosox20051 has joined #ruby
seoaqua has joined #ruby
ncamargo is now known as BIGX333
canton7 has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
joshman_ has quit [Quit: Computer has gone to sleep.]
skogis has joined #ruby
bambanx has quit [Ping timeout: 246 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
lggr has quit [Ping timeout: 240 seconds]
gabrielrotbart has quit [Remote host closed the connection]
lggr has joined #ruby
shiki has joined #ruby
h4mz1d has quit [Ping timeout: 246 seconds]
adkron_a1k has quit [Read error: Connection reset by peer]
pauC has joined #ruby
<Paradox> there's a part of the earth's crust called
<Paradox> the sandwich plate
adkron_afk has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
bodik has left #ruby [#ruby]
RichGuk has quit [Quit: WeeChat 0.3.7]
Elhu has joined #ruby
<Hanmac> Paradox in a "correct" world, the Sandwich plate would be made of Sandwiches :(
<Paradox> sandwich island would grow sandwich related foods
lggr has joined #ruby
<Paradox> and sandwiches would be their only export
ndrei has joined #ruby
zommi has joined #ruby
<Paradox> and they'd own the word sandwich
<Paradox> so everyone else would call it bread-meals
<Paradox> just like how they'd grow pancreases at pancreas
dakine has quit [Ping timeout: 252 seconds]
<Paradox> and Chilie would make chile
PragCypher has quit [Remote host closed the connection]
sv has joined #ruby
tvw has joined #ruby
sv is now known as Guest70701
<Paradox> something i found funny
<Paradox> a lot of python tutorials focus on making an ugly spell checker
hoelzro|away is now known as hoelzro
<Hanmac> Paradox no, Chilie would be made of Chile :D
<Paradox> a lot of ruby tutorials focus on building a website or useful little script
nachtvos has quit []
<Paradox> lol
<Paradox> would the auntarctic plate be made out of cold aunts?
<Hanmac> i hope not, but i would not be suprised
PragCypher has joined #ruby
seoaqua has quit [Ping timeout: 244 seconds]
<Paradox> why can there be an auntarctic plate
<Paradox> but not an unclearctic
<Paradox> or would it be uncletropical
lggr has quit [Ping timeout: 246 seconds]
Eldariof18-ru has joined #ruby
lggr has joined #ruby
bartj3 has quit []
arietis has joined #ruby
iaj_ is now known as iaj
justinmcp has joined #ruby
Drager has quit [Changing host]
Drager has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
ccooke_ is now known as ccooke
bartj3 has joined #ruby
duracrisis_ has joined #ruby
flype has joined #ruby
duracrisis_ has quit [Client Quit]
lggr has joined #ruby
jasonkuhrt has joined #ruby
Hamed-R has joined #ruby
LouisGB has joined #ruby
bsmith_ has quit [Changing host]
bsmith_ has joined #ruby
bsmith_ is now known as bsmith
jimeh has joined #ruby
duracrisis_ has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
fboudrea1 has quit [Quit: leaving]
mxweas has joined #ruby
jasonkuhrt has quit [Ping timeout: 246 seconds]
adac has joined #ruby
lggr has quit [Ping timeout: 265 seconds]
PragCypher has quit [Read error: Connection reset by peer]
mucker has joined #ruby
lkba has joined #ruby
Hamed-R has quit [Ping timeout: 245 seconds]
frogprince has joined #ruby
duracrisis_ has quit [Ping timeout: 248 seconds]
bradhe has joined #ruby
bobbbo has joined #ruby
Criztian has joined #ruby
lggr has joined #ruby
haxrbyte has joined #ruby
paolooo has joined #ruby
nightfalcon has quit []
haxrbyte_ has joined #ruby
paolooo has left #ruby [#ruby]
maletor has quit [Quit: Computer has gone to sleep.]
paolooo has joined #ruby
dhruvasagar has joined #ruby
bradhe has quit [Ping timeout: 265 seconds]
Tearan has quit [Quit: Sleepy Badger....]
haxrbyt__ has joined #ruby
haxrbyte has quit [Ping timeout: 256 seconds]
lggr has quit [Ping timeout: 240 seconds]
elaptics`away is now known as elaptics
awestroke has joined #ruby
mehrdad has joined #ruby
<awestroke> I get a gem conflict when requiring a gem. How do I solve it? error paste coming up
haxrbyte_ has quit [Ping timeout: 248 seconds]
<mehrdad> hello everyone
Iszak has joined #ruby
<mehrdad> how to install rmagik?
<mehrdad> enyone know?
<awestroke> mehrdad: gem install rmagick, given you have the dependencies
<awestroke> mehrdad: what operating system?
<sent-hil> awestroke: is it gem conflict? it's saying no <name> found
berkes has joined #ruby
<mehrdad> awestroke> ubuntu 12.04.1
<awestroke> sent-hil: I pasted the wrong trace, see my updated version
BeLucid has quit [Remote host closed the connection]
<mehrdad> awestroke: "Could not find gem 'rmagick (>= 2.0.0)' in any of the gem sources listed in your Gemfile."
<mehrdad> awestroke: but i installed this.
<awestroke> mehrdad: using rubygems?
<mehrdad> awestroke: ya
pingfloyd has quit [Quit: pingfloyd]
Hamed-R has joined #ruby
Hamed-R has quit [Changing host]
Hamed-R has joined #ruby
lggr has joined #ruby
<awestroke> mehrdad: change to only "gem 'rmagick'"
<mehrdad> awestroke: i installed "rake" "rail"
<mehrdad> awestroke: what!?
<awestroke> in your gemfile
PragCypher has joined #ruby
<awestroke> you have listed it with a version
<mehrdad> awestroke: how?
<awestroke> open your Gemfile
<awestroke> and read it
<sent-hil> awestroke: i'm guessing net-ssh-console is already requiring net-ssh, so you don't need to it
<mehrdad> awestroke: what is loacation?
<Paradox> borderlands 2 is awesome
BeLucid has joined #ruby
<awestroke> sent-hil: that did it. Thanks
<awestroke> mehrdad: sounds like a misspelled version of location
fastred has joined #ruby
justinmcp has quit [Remote host closed the connection]
justinmcp has joined #ruby
moshee has quit [Ping timeout: 240 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Xeago has joined #ruby
lggr has quit [Ping timeout: 264 seconds]
Vainoharhainen has joined #ruby
joshman_ has joined #ruby
seoaqua has joined #ruby
lggr has joined #ruby
xeronic has joined #ruby
elico has joined #ruby
xorgnak has quit [Ping timeout: 264 seconds]
moshef has joined #ruby
<moshef> I'm using scan to find words in a string. It finds words that are only partially included, and I'd like to find exact match only. what do I do?
GeekOnCoffee has quit [Ping timeout: 244 seconds]
adkron_afk has quit [Ping timeout: 256 seconds]
amskah has quit [Ping timeout: 246 seconds]
<bnagy> anchors
diegoviola has joined #ruby
amskah has joined #ruby
<moshef> ?
berserkr has joined #ruby
PragCypher has quit [Quit: Leaving]
<m3pow> animal = Animal.new(noise) is the same thing as saying animal = Animal.new ; animal.noise = noise ?
<Banistergalaxy> No
<bnagy> moshef: anchor your regular expressions
<Banistergalaxy> It's not
<bnagy> what you think of as an exact match is probably something like /\S(\w+)\S/
<m3pow> in the same class method
<moshef> hmm
<bnagy> that's not a terrible sound regexp, but that's the idea
<moshef> I'm using something like hello|world|something
GeekOnCoffee has joined #ruby
lggr has quit [Ping timeout: 265 seconds]
<bnagy> if your expressions aren't anchored then they'll partial match, that's what regexps do
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
<m3pow> Banistergalaxy: http://pastebin.com/4jvDerAC
gyre008 has joined #ruby
gyre008 has quit [Client Quit]
<m3pow> when i call that class method does it output the same thing ?
lggr has joined #ruby
<Xeago> m3pow the result is the same, however using the constructor should `enforce` a more consistent model
<m3pow> thank you very much Xeago
<Xeago> however, it is always possible to circumvent the enforcement in ruby
<m3pow> i just wanted to know if it's possible to do that and get the same result
<Xeago> m3pow: consider having pre-set wrap-set and post-set bindings when setting a property
<Xeago> in that case, the versions are not the same
<m3pow> so it could have also be like this animal = Animal.new(noise,color); return animal
Elico1 has joined #ruby
lolmaus has quit [Read error: No buffer space available]
elico has quit [Read error: No buffer space available]
<Xeago> return is an optional statement in ruby
cantonic_ has joined #ruby
lolmaus has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
<Xeago> new Animal(noise,color)
<Xeago> woud be sufficient
<m3pow> thank you !
Tearan has joined #ruby
<Xeago> though one could also write it without enforcing parameters, without return: a=new Animal(); a.color=color;a.noise=noise;a
timmow has joined #ruby
<Xeago> m3pow: what's your programming experience?
<m3pow> beginner
<Xeago> first language?
<m3pow> just started Ruby a week ago
<Xeago> oky :)!
jgrevich has quit [Quit: jgrevich]
<m3pow> sorry for the noobie questions
Banistergalaxy has joined #ruby
amskahda has joined #ruby
<Xeago> Have you tried some calculating primes?
cantonic has quit [Ping timeout: 240 seconds]
<Xeago> or fibonacci?
cantonic_ is now known as cantonic
<m3pow> hmm no, not quite
amskah has quit [Ping timeout: 240 seconds]
_7894 has quit [Ping timeout: 240 seconds]
<m3pow> i am just following some tutorials atm
<Xeago> do you know how logic statements work?
<m3pow> yep
<Xeago> try doing fizzbuzz
lggr has quit [Ping timeout: 256 seconds]
<Xeago> Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."
chussenot has joined #ruby
arya_ has joined #ruby
lggr has joined #ruby
sheerun has joined #ruby
lkba has quit [Quit: Bye]
<Hanmac> Xeago we not doing your homework :D
AndChat- has joined #ruby
<Xeago> that's not homework
<Xeago> it's the fizzbuzz test/challenge/problem that is common at interviews
flype has quit [Read error: Connection reset by peer]
jasonkuhrt has joined #ruby
<Xeago> it's author says: this is hard because this kind of problem does not get taught during school
flype has joined #ruby
<Hanmac> try to solv that: :D } )"" : "zurB" ? 0 == 5 % i( + )"" : "zirF" ? 0 == 3 % i( |i|{pam.)001..1(
<Xeago> duckduckgo will tell you what this kind of problem is
<Muz> It's not hard, because it's so common and overdone.
<Muz> Much like the manhole cover question. Or travelling salesman.
workmad3_ is now known as workmad3
<Muz> It's a shit interview question because it's easy to prepare and parrot an answer without any real understanding.
<Xeago> Muz: while I agree with you, it's a good exorcise for m3pow
<Xeago> Muz: nowadays yes
<Muz> I'd argue that what'd be better is trying actually practical code examples.
lggr has quit [Ping timeout: 264 seconds]
Banistergalaxy has quit [Ping timeout: 246 seconds]
<Hanmac> i allready have the code ... (1..100).map{|i| (i % 3 == 0 ? "Frizz" : "") + (i % 5 == 0 ? "Bruzz" : "") }
<Xeago> nope
hsbt is now known as hsbt_away
Banistergalaxy has joined #ruby
AndChat- has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Remote host closed the connection]
flype has quit [Client Quit]
mahlon has quit [*.net *.split]
ged has quit [*.net *.split]
idoru has quit [*.net *.split]
voodoofish has quit [*.net *.split]
thnee has quit [*.net *.split]
willb has quit [*.net *.split]
robustus has quit [*.net *.split]
Kwpolska has quit [*.net *.split]
mr-rich has quit [*.net *.split]
mmercer has quit [*.net *.split]
asobrasil has quit [*.net *.split]
sirecote has quit [*.net *.split]
_br_ has quit [*.net *.split]
jhunter has quit [*.net *.split]
vitoravelino has quit [*.net *.split]
tomku has quit [*.net *.split]
SeanTAllen has quit [*.net *.split]
rcj_ has quit [*.net *.split]
madhatter has quit [*.net *.split]
zipkid has quit [*.net *.split]
ttt has quit [*.net *.split]
cibs has quit [*.net *.split]
thnee has joined #ruby
<Xeago> no the reboot has started
madhatter has joined #ruby
jhunter has joined #ruby
voodoofish has joined #ruby
vitoravelino has joined #ruby
vitoravelino has quit [Changing host]
vitoravelino has joined #ruby
zipkid has joined #ruby
robustus has joined #ruby
ttt has joined #ruby
cibs has joined #ruby
sirecote_ has joined #ruby
rcj_ has joined #ruby
mr-rich has joined #ruby
willb has joined #ruby
tomku has joined #ruby
jasonkuhrt has quit [Ping timeout: 248 seconds]
mmercer has joined #ruby
asobrasil has joined #ruby
adkron_afk has joined #ruby
<Hanmac> Xeago why did you say nope? oO
hsbt_away is now known as hsbt
AndChat- has joined #ruby
<Hanmac> okay i had errrors in the strings: (1..100).map{|i| (i % 3 == 0 ? "rizz" : "") + (i % 5 == 0 ? "Buzz" : "") }
<Xeago> because it does not satisfy the conditions
_br_ has joined #ruby
<Xeago> still not
lggr has joined #ruby
<m3pow> grrr let me do that one :P
<m3pow> stop pasting
ewag_ has quit [Read error: Connection reset by peer]
<Xeago> m3pow: don't worry, no solution so far :)
SeanTAllen has joined #ruby
mafs has quit [*.net *.split]
playmuc_ has quit [*.net *.split]
drmegahertz has quit [*.net *.split]
Nanuq has quit [*.net *.split]
Nanuq has joined #ruby
drmegahertz has joined #ruby
playmuc_ has joined #ruby
mafs has joined #ruby
ewag has joined #ruby
rakl has joined #ruby
Banistergalaxy has quit [Ping timeout: 246 seconds]
nari has quit [Ping timeout: 245 seconds]
forlan has joined #ruby
<Muz> Hanmac: if it satisfies neither condition, it should print the number.
ij has joined #ruby
Banistergalaxy has joined #ruby
Xeago_ has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
Tearan has quit [Quit: Sleepy Badger....]
mmercer has quit [*.net *.split]
A124 has left #ruby [#ruby]
AndChat- has quit [Ping timeout: 240 seconds]
<Axsuul> Good Ruby screencast for intermediate devs: https://vimeo.com/50069436
Hamed-R has quit [Ping timeout: 246 seconds]
mmercer has joined #ruby
justinmcp has quit [Remote host closed the connection]
lggr has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
Banistergalaxy has quit [Ping timeout: 240 seconds]
idoru has joined #ruby
mahlon has joined #ruby
ged has joined #ruby
mahlon is now known as Guest5541
ged is now known as Guest14722
dhruvasagar has joined #ruby
arya__ has joined #ruby
Kwpolska has joined #ruby
arya_ has quit [Ping timeout: 245 seconds]
fyolnish has quit [Remote host closed the connection]
banisterfiend has joined #ruby
lggr has quit [Ping timeout: 264 seconds]
Xer0niC has joined #ruby
nari has joined #ruby
cascalheira has joined #ruby
Hamed-R has joined #ruby
Hamed-R has quit [Changing host]
Hamed-R has joined #ruby
diegoviola has quit [Ping timeout: 264 seconds]
Criztian has quit [Remote host closed the connection]
xeronic has quit [Ping timeout: 265 seconds]
lggr has joined #ruby
arya__ has quit [Ping timeout: 246 seconds]
capsule_toy has joined #ruby
rakl has quit [Quit: sleeping]
Criztian has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
Criztian has quit [Remote host closed the connection]
capsule_toy has quit [Client Quit]
justinmcp has joined #ruby
lggr has joined #ruby
sent-hil has quit [Remote host closed the connection]
<jokar> Xeago_: hi
mucker has quit [Ping timeout: 245 seconds]
fastred has quit [Quit: fastred]
matrixis1 has joined #ruby
vlad_starkov has joined #ruby
matrixise has quit [Read error: No route to host]
lggr has quit [Ping timeout: 252 seconds]
Mon_Ouie has joined #ruby
kstephens has quit [Ping timeout: 264 seconds]
tsuru`` has joined #ruby
kstephens has joined #ruby
tsuru` has quit [Remote host closed the connection]
frogprince has quit [Read error: Connection reset by peer]
Neomex has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
Neomex has quit [Client Quit]
Mon_Ouie has quit [Ping timeout: 264 seconds]
lggr has joined #ruby
<Hanmac> m3pow do you have the code yet?
virtuose has quit [Read error: No route to host]
<moshef> I have a string and a bunch of words where I'd like to find some of them exactly within that string and some of them if just partially included. is it possible to do some 1 line regex for that?
iocor has joined #ruby
berserkr has quit [Ping timeout: 256 seconds]
troessner has joined #ruby
bbttxu has left #ruby [#ruby]
virtuose has joined #ruby
Banistergalaxy has joined #ruby
matrixis1 has quit [Ping timeout: 256 seconds]
<moshef> or should I split it to 2 scans? one for the exact match and one for 'loose' match?
<canton7> moshef, it's hard to visualise what you're asking. do you have an example?
lggr has quit [Ping timeout: 245 seconds]
matrixise has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
Dreamer3 has joined #ruby
matthewrobbins has joined #ruby
<Hanmac> moshef: like that:? m="str"; "stra strb strc xyz".scan(/\w*#{m}\w*/)#=> ["stra", "strb", "strc"]
<moshef> canton7: a (loose match) = ["hi", "bye"]. b (each match) = ["canton", "ruby"]. string = "hiii guys, canton and rub are sweet"
sent-hil has joined #ruby
karn has quit []
notVert has joined #ruby
<moshef> so hiii will be caught because it's loose match, canton because its exact. and rub won't be caught.
Averna has quit [Quit: Leaving.]
<moshef> Hanmac: think it'll be easier if I divide this into to. I need help with the regex for .scan that match exact words only
yasushi has joined #ruby
<moshef> because otherwise scan find 'loose' matches
<moshef> Hanmac: thoughts? :)
lggr has joined #ruby
<canton7> use \b ?
Xer0niC has quit []
<bnagy> THAT'S what I was trying to think of before :)
sguselnikov has joined #ruby
justinmcp has quit [Remote host closed the connection]
futilegames has quit [Quit: futilegames]
<bnagy> match space, $ ^ etc
<moshef> \b ?
<canton7> word boundary
<moshef> yeah tried $ ^
<moshef> but i have a bunch of words list that hi|bye
<moshef> and I'd like to have exact match for each individually.
<bnagy> moshef: like I said before, when you weren't listening, you need anchors
<moshef> sorry. what are anchors?
<bnagy> s.scan /\bfo|faao\b/
arietis has quit [Ping timeout: 252 seconds]
<bnagy> foo|faa but whatever
<moshef> "no bots, software or proxies .".scan /\bmoshe|bots\b/
<moshef> awesome
Hanmac has quit [Ping timeout: 252 seconds]
cantonic_ has joined #ruby
<moshef> so now i can combine this with the other words that I can find 'loose' right?
lggr has quit [Ping timeout: 264 seconds]
<bnagy> you'll need to group, when you use scan
<bnagy> "no bots, software or proxies .".scan /\b(soft|bots)\b/
<bnagy> should only match bots
sguselnikov has quit [Client Quit]
<moshef> tried something like that /bots|prox\bmoshe|bnagy\b/
bradhe has joined #ruby
arietis has joined #ruby
<moshef> with /b(word|word2)\ I'm getting nil's back
seoaqua has quit [Ping timeout: 256 seconds]
Criztian has joined #ruby
<moshef> what I did isn't ok? it does seem to work
<RubyPanther> string = "hiii guys, canton and rub are sweet" ; loose, tight = %w! hi bye !, %w! ruby canton ! ; string.scan(/(?:#{loose.join("|")})|(?:\b(?:#{tight.join("|")})\b)/)
cantonic has quit [Ping timeout: 256 seconds]
cantonic_ is now known as cantonic
<moshef> or not completely
Hanmac has joined #ruby
<moshef> RubyPanther: trying
Hanmac has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
Hanmac has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
Hanmac has quit [Read error: Connection reset by peer]
<RubyPanther> I love it when I get to write that much punctuation in a row. :) ("|")})|(?:\
bradhe has quit [Ping timeout: 265 seconds]
tadassce has joined #ruby
<bnagy> aaaand that's why using regexps sucks
<bnagy> starts of in games, ends up in unreadable shit like that
<moshef> RubyPanther: I love you dude
Hanmac has joined #ruby
Hanmac has quit [Read error: Connection reset by peer]
<RubyPanther> awwww, how sweet! Regexes are for lovers! hehehehe
Hanmac has joined #ruby
Hanmac has quit [Read error: Connection reset by peer]
lggr has joined #ruby
tadassce has left #ruby [#ruby]
tadassce has joined #ruby
ltsstar has joined #ruby
<moshef> RubyPanther: :)
<RubyPanther> bnagy: It depends on the value of readable
<moshef> RubyPanther: seriously tho, how do you guys reach that level of regex? shitload of practice?
shiki has quit [Remote host closed the connection]
eddie_ has joined #ruby
<canton7> it's just putting blocks together
tadassce has left #ruby [#ruby]
tadassce has joined #ruby
keanehsiao has joined #ruby
fixl has joined #ruby
<moshef> well easy to say one you know which blocks to put :()
tadassce has left #ruby [#ruby]
<eddie_> banisterfiend: There?
<RubyPanther> moshef: I'm not sure if it is a skill *nix gnomes and dwarves are born with, or if it gets flash-burned into your brain during a Perl list context accident
<bnagy> writing regexes like that is just like being a serial killer - you start off killing birds and cats, and gradually move up to killing and eating humans
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
<RubyPanther> No it is just pattern matching, it isn't that hard once you have some experience.
lggr has quit [Ping timeout: 245 seconds]
<RubyPanther> Once you learn to read (?:foo) as a single token, and understand the precedence of | then it is easier
skogis has quit [Ping timeout: 264 seconds]
<canton7> the interpolation makes it look worse than it is. take that out, and it's /(?:hi|bye)|(?:\b(?:ruby|canton)\b)/, which is two parts: the loose /(?:hi|bye)/ and the tight /?:\b(?:ruby|canton)\b/ . The ?: are just so the brackets don't create a match. Take them out, and the tight is /\b(ruby|canton)\b/ , which is a boundary followed by (ruby or canton) followed by a boundary
<canton7> * and the tight /(?:\b(?:ruby|canton)\b)/
adambeynon has joined #ruby
Hanmac has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
neurotech has joined #ruby
<moshef> canton7: thanks mate. very appreciated.
Hanmac has quit [Read error: Connection reset by peer]
SeanTAllen has quit [Changing host]
SeanTAllen has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
lggr has joined #ruby
tk__ has joined #ruby
<RubyPanther> 55.88% punctuation, like a strong gastrique
tommyvyo has quit [Quit: Computer has gone to sleep.]
<canton7> moshef, also rubular.com is good
<RubyPanther> Paring it down to just the inside of the regex and it is a lucky 62.26% punctuation
adambeynon has quit [Ping timeout: 246 seconds]
<moshef> RubyPanther: I'm getting a lot of "", "", "" on the array returned...
pskosinski has joined #ruby
<moshef> canton7: I know, using it once in a while
lggr has quit [Ping timeout: 264 seconds]
Xeago_ has quit [Remote host closed the connection]
<RubyPanther> moshef: you shouldn't, but you can add a () around the whole thing and it might help. Or pastie the data and code
Xeago has joined #ruby
<moshef> pasting, give me a sec
bartj3 has quit []
frogprince has joined #ruby
lggr has joined #ruby
amskahda has quit [Quit: Leaving]
sheerun has quit [Quit: sheerun]
<moshef> forgot to add, v is an array of words. say v = ["hi", "/bye/", "ruby"]
<moshef> RubyPanther canton7 thoughts?
<moshef> I can add a reject but it seems a bit wrong..
lggr has quit [Ping timeout: 240 seconds]
Ruler_Of_Heaven_ is now known as pipopopo
und3f has joined #ruby
bartj3 has joined #ruby
wargasm1 has quit [Ping timeout: 256 seconds]
<RubyPanther> moshef: I'd check what is actually getting into the word lists and narrow where the bug is that way first
lggr has joined #ruby
elaptics is now known as elaptics`away
justinmcp has joined #ruby
noxoc has joined #ruby
<moshef> i have
br4ndon has joined #ruby
<moshef> RubyPanther: updated the gist, check pls
<RubyPanther> moshef: I see a comment that talks about what is _intended_ to go into the arrays but nothing to check what is in them before the regex.
sheerun has joined #ruby
mneorr has joined #ruby
snearch has quit [Quit: Verlassend]
<RubyPanther> A problem should be smaller than what you have... either the lists are made wrong, or there is a bug in the regex
<moshef> RubyPanther: the comment is actually where is there, went with a debugger to check..
<moshef> RubyPanther: not what I think will be there...
lggr has quit [Ping timeout: 264 seconds]
hsbt is now known as hsbt_away
<moshef> you don't get any empty strings?
<RubyPanther> I don't care if a magic pony told you it is perfect, I can look right at the gist and see there is nothing outputting the values
<moshef> ill puts it
<moshef> i had a debugger (which i removed) thats why I know what it contains
<RubyPanther> and if the values are correct, then you can just skip the blahblah and assign the arrays and then run the regex, you wouldn't have that much code in a concise problem
* RubyPanther gets out the steel ruler.
<moshef> is this too much code?
wargasm has joined #ruby
<moshef> hmm
<moshef> sec
br4ndon has quit [Ping timeout: 240 seconds]
<moshef> RubyPanther: it happens because one of the arrays is empty, once I filled that array with something it returns just the word "software"
dhruvasagar has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby
<moshef> then joins results in "" and returns for most of the words...
<moshef> join*
<moshef> [].join("|")
lggr has joined #ruby
DracoDan has quit [Read error: Connection reset by peer]
DracoDan has joined #ruby
Forevernade has joined #ruby
<m3pow> Hanmac, i just managed to work out the first 2 parts of the program, to print Fizz for 3's and Buzz for 5's
bradhe has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
<moshef> RubyPanther: should I leave out the regex part if the array is empty?
JustinCampbell has joined #ruby
xpen has quit [Remote host closed the connection]
<RubyPanther> moshef: if some are empty that complicates things, either kludge it open with a value that will never match or else you'll have to either rework the regex or use multiple steps
bradhe has quit [Ping timeout: 256 seconds]
yshh has quit [Remote host closed the connection]
bsmith has quit [Ping timeout: 265 seconds]
monkegjinni has joined #ruby
<moshef> RubyPanther: I can either reject empty strings, or build the regex with conditions of array present
awestroke has quit [Remote host closed the connection]
Forevernade has quit [Ping timeout: 248 seconds]
<moshef> RubyPanther: what do you think is better?
fermion has joined #ruby
<RubyPanther> moshef: multiple small steps is almost always better, ideally that logic would actually be like... 5 short methods that call each other
<moshef> yeah, this method becomes too big
dhruvasagar has quit [Ping timeout: 248 seconds]
jasonkuhrt has joined #ruby
<moshef> RubyPanther: thanks
DrShoggoth has joined #ruby
dhruvasagar has joined #ruby
lggr has joined #ruby
zodiak has quit [Ping timeout: 240 seconds]
zodiak has joined #ruby
noxoc has quit [Quit: Leaving.]
larissa has joined #ruby
artm has joined #ruby
Hamed-R has quit [Quit: Leaving]
zz_chrismcg is now known as chrismcg
jasonkuhrt has quit [Ping timeout: 246 seconds]
<shevy> moshef! is your name josef?
Hanmac has joined #ruby
Hanmac has left #ruby [#ruby]
<moshef> shevy: no
<m3pow> hello shevy
<moshef> my name is (surprisingly) moshe
<shevy> aha, don't know that name much
<shevy> hi m3pow
lggr has quit [Ping timeout: 252 seconds]
<shevy> m3pow for power
<shevy> hmm wait
<shevy> m3pow for president!!!
<shevy> that's better
<m3pow> haha president ?
<m3pow> i don't like to be a** kissed
<shevy> hehehe
<shevy> or being told what to say :)
<RubyPanther> President of Your Own Desk, if you are a lucky dev
Xeago is now known as xeago
xeago is now known as Xeago
<m3pow> Xeago gave me a task to make a program called FizzBuzz
<RubyPanther> lol how hard can fizzbuzz be?
yasushi has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
<m3pow> well since i started ruby for ....aaa...a week
fyolnish has joined #ruby
<m3pow> and i'm a little pather, not a big panther
<m3pow> is good for me
<RubyPanther> Yeah, it is good for you for sure
frogprince has quit [Remote host closed the connection]
frogprince has joined #ruby
<shevy> m3pow what tasks must fizzbuzz solve
<moshef> using .tr('^A-Za-z0-9', ' ') to remove all non a-z/numbers chars, would like to ignore dots too
<shevy> hmm does it not already?
<shevy> "abc DEF . GHI".tr('^A-Za-z0-9', ' ') # => "abc DEF GHI"
<moshef> just added . in the end
hemanth has quit [Quit: Leaving]
<shevy> ah you mean, to not replace the '.'
<moshef> it does, I'd like to leave dots
<moshef> yeah
<moshef> did .tr('^A-Za-z0-9.', ' ')
<m3pow> from 1..100 all the numbers that are multiples of 3 to be marked with Fizz, those by 5 with Buzz and those that are multiples of 3 and 5 with FizzBuzz
<shevy> "abc DEF . GHI".tr('^A-Za-z0-9\.', ' ') # => "abc DEF . GHI"
<shevy> m3pow, sounds quite simple. (1..100).each # run it through a method that does that check
<m3pow> and i could only manage the first 2 parts
<shevy> via modulo
<m3pow> i assigned a range to a variable
<m3pow> numbers.each do |n|
<m3pow> now i must check n
<moshef> shevy: is the \ needed?
<shevy> 5 / 5 = 1, hence 0 remains. -> 5 % 5 # => 0
<m3pow> n % 5 == 0
<m3pow> n % 3 == 0
<shevy> moshef hmm no, you can omit it
elaptics`away is now known as elaptics
<shevy> for some reason I thought it was regex-syntax, but it works without \ too
lggr has quit [Ping timeout: 244 seconds]
<shevy> "abc DEF . GHI".tr('^A-Za-z0-9.', ' ') # => "abc DEF . GHI
<shevy> yeah m3pow
<shevy> solved!
<shevy> next task m3pow :)
<m3pow> yes yes but ..those that are multiple of 3 and 5 i must mark them as FizzBuzz
<Xeago> m3pow: gist what you currently have
<chrismcg> m3pow shevy: this is how not to do it https://speakerdeck.com/u/tomstuart/p/programming-with-nothing (awesome though)
<shevy> but you already have all that are marked with Fizz and Buzz
<m3pow> Xeago, you got me very intrigued
<shevy> so I think Fizz & Buzz => FizzBuzz
<m3pow> thanks
<shevy> I think the & can be used on arrays
<m3pow> and i must change the range to an array ?
<Xeago> m3pow: when I first got asked to make fizzbuzz, I had tons of fun doing it
Hanmac has joined #ruby
<moshef> shevy: yeah thats what I did. thanks
<shevy> chrismcg it does not want to play in my browser :(
<Xeago> shevy: chrismcg, there's also a blog post about it
<Xeago> where he goes into more detail
lggr has joined #ruby
<shevy> m3pow, wait, one thing after the other
<shevy> intersections work:
<shevy> %w( 1 2 3 ) & %w( 3 4 5 ) # => ["3"]
<shevy> the string "3" can be found in both arrays, so it is returned
robertotauille has joined #ruby
<shevy> well, all multiples of 3 and 5 must be divisible by both numbers
<m3pow> well if a numbers divides by 3 and 5 that means it can divide by 15
<Xeago> yup
<shevy> :)
<Xeago> m3pow: gist what you currently have
<RubyPanther> The trick with FizzBuzz is, how ugly can you make it without adding extraneous logic
<shevy> oh wait
<shevy> that is not a video? that is a slide?
zeromodulus has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<chrismcg> Xeago: a cool, that's a nicer read than the slides and has the full output :)
<shevy> haha I was clicking like mad on it and wondering why it didn't play
<m3pow> one moment Xeago
<shevy> omg
<shevy> "if we create a complex proc, we may assign it to a constant to give it a short name that we can reuse later."
<shevy> MACROS!!!
lggr has quit [Ping timeout: 248 seconds]
* m3pow hides
<shevy> wtf is this:
<shevy> lambda { |x| lambda { |y|
<shevy> a lambda in a lambda in a lambda???
<shevy> that is babushka programming
<chrismcg> shevy: wait till you see the slide with the fully expanded code :)
Virunga has joined #ruby
<shevy> that's how lambdas look
<shevy> hmm ok
<shevy> let me understand this
<shevy> lambda { |x| lambda { |y| x + y }}.call(3).call(4)
<shevy> the second .call() calls the first lambda?
<Xeago> the second call calls the inner lambda
hsbt_away is now known as hsbt
futilegames has joined #ruby
<Xeago> the first call returns the lambda { |y| 3 + y }
<Hanmac> lambda { |x,y| lambda { |y| x + y }.call(y)}.call(3,4)
<shevy> my brain fails at parsing :(
<Virunga> Should it return 7?
lggr has joined #ruby
<Virunga> >> lambda { |x| lambda { |y| x + y }}.call(3).call(4)
<RubyPanther> I haven't seen somebody that excited over macros since the BBS days
<m3pow> Xeago, can you help me in that pastie ?
<shevy> nah I am not excited about that
<shevy> the .call() code is ugly
<shevy> I like anonymous methods though
<Virunga> shevy: where did you that code?
<Virunga> shevy: i don't remember wrong you could use the [] parenthesis to make the call
nari has quit [Ping timeout: 245 seconds]
<Virunga> l = lambda {|x| p x}
<Virunga> l[3]
<shevy> yeah
<shevy> but I dont know
<Virunga> That's nicer maybe.
<shevy> lambdas will probably always be a mystery to me
<shevy> people love them and I dont know why
<Virunga> Less clear though
lggr has quit [Ping timeout: 252 seconds]
shiki has joined #ruby
justinmcp has quit [Remote host closed the connection]
<chrismcg> my brain broke fairly early on during that talk :)
<Virunga> I don't understand the aim of that article.
tris has quit [Excess Flood]
<chrismcg> Virunga: to show what you can do with just calling procs
<Virunga> For sure you'll know better about proc and lambda after that, though.
<chrismcg> nothing for practical day to day work :)
<Virunga> Oh, ok.
<Virunga> I never did real programming in ruby. I'm starting October 1st!! Yey!!!!
<shevy> I saw that rack uses lambda for test code
<shevy> lambda{ logger.call({}) }.should.not.raise
<shevy> lambda { Rack::Utils.parse_nested_query("x[y]=1&x[]=1") }.
<shevy> ah yes
<shevy> also for the main app
<shevy> app = lambda { |env| [200, {'Content-Type' => 'text/plain'}, "Hello, World!"] }
<shevy> why does it have to be a lambda though?
KevinSjoberg has joined #ruby
<Virunga> Why does it get a parameter and doesn't use it?
<workmad3> Virunga: because lambdas do parameter checks
<chrismcg> it doesn't, it can be anything that takes responds to call, takes env as a parameter, and returns an array with 3 entries
<workmad3> Virunga: and the rack 'interface' is basically a Callable that takes 1 param
chimkan has joined #ruby
emsilva has quit [Ping timeout: 248 seconds]
verto|off is now known as verto
jokar1 has joined #ruby
lggr has joined #ruby
justinmcp has joined #ruby
jokar1 has quit [Client Quit]
iocor has quit [Quit: Computer has gone to sleep.]
<m3pow> where did Xeago go
jokar1 has joined #ruby
jokar1 has quit [Client Quit]
<Virunga> mmm
jokar1 has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
jokar1 has quit [Client Quit]
rohit has joined #ruby
jokar1 has joined #ruby
Criztian has quit [Remote host closed the connection]
<shevy> to the kitchen
<shevy> cooking for his wife
tris has joined #ruby
jokar1 has quit [Client Quit]
jokar1 has joined #ruby
jokar1 has quit [Client Quit]
<m3pow> shevy did you solve that fizzbuzz thing ?
jokar has quit [Ping timeout: 245 seconds]
jokar has joined #ruby
<shevy> dunno
<shevy> did not write code
<shevy> :)
lggr has quit [Ping timeout: 245 seconds]
<m3pow> i will wait for Xeago to make lunch then ask him
<shevy> but if number % 3 == 0 and number % 5 == 0, then it is FizzBuzz
F1skr has joined #ruby
<m3pow> yes but how to test that ?
<shevy> do you really want me to write it hehehe
<shevy> ok here I go
<m3pow> ii was thinking of using Case statments
<m3pow> :s
<m3pow> Case x % 3 == 0 ...do this
<Xeago> erhm
daniel_- has joined #ruby
<Xeago> went eating pizza
<Xeago> lol
<m3pow> oh ...perfetto
Mon_Ouie has quit [Ping timeout: 246 seconds]
<m3pow> so the first thing is to check for Fizz Buzz
Peter-W has joined #ruby
<shevy> there are several ways to solve the problem
<shevy> this should be one way
<m3pow> instead of and could you use && ?
<shevy> I think so
<m3pow> ok
<shevy> run the code and try :)
<shevy> it can probably be made much shorter too
bradhe has joined #ruby
<Hanmac> shevy do you want so see my codegolf?
paulovittor23 has joined #ruby
<shevy> lol
<shevy> yeah
<workmad3> I like to monkey-patch a .fizzbuzz method onto Integer to do fizzbuzz, then do 'p (1..100).to_a.map(&:fizzbuzz)'
kryl99_ has joined #ruby
<m3pow> alias e puts that means "e" replaces "puts " ?
lggr has joined #ruby
Criztian has joined #ruby
<shevy> 1.upto(100){|i|p (a=(i%3==0?"Fizz":"")+(i%5==0?"Buzz":"")).empty?? i:a}
<Hanmac> oO you posting my code 'evil-face*
<shevy> m3pow not replaces but an extra alias
<shevy> yeah Hanmac
<m3pow> i understand, so after that command you can use both
<shevy> I must click twice on every PRIVMSG!
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
<shevy> yeah m3pow, it is not important to your problem btw, you can ignore the alias e
<m3pow> Xeago , you still around or ..still eating pizza ?
<m3pow> i know but i learned something
<shevy> Xeago has only two teeth
<shevy> pizza eating takes time
<shevy> what kind of pizza is he eating?
<m3pow> it does i know !
<shevy> I guess we now know he can't eat and type at the same time :)
cakehero has joined #ruby
<m3pow> i went to Italy once and was a restaurant where for 10 euros you could eat as much pizza as you wanted to
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<Virunga> :D
bradhe has quit [Ping timeout: 252 seconds]
<m3pow> i was STUFFED !
uris has joined #ruby
bigkevmcd has quit [Ping timeout: 240 seconds]
chimkan has quit [Quit: chimkan]
lggr has quit [Ping timeout: 256 seconds]
frogprince has quit [Ping timeout: 256 seconds]
<Virunga> m3pow: where are you from?
<m3pow> ahh Romania
Hamed-R has joined #ruby
<shevy> Italy has great food
<jokar> shevy: Hi,how can i write ASM language in ruby?
<shevy> jokar!
frogprince has joined #ruby
<shevy> have you even written hello world yet
<jokar> shevy :yes
<jokar> i use tryruby
<jokar> my progress is 46%
<shevy> I dont know what this means
<hoelzro> jokar: why do you want to write ASM in Ruby?
<shevy> ASM isn't that assembler language
<jokar> In C language i can use a header for it
<shevy> it's ugly and awful
<shevy> C is ugly too
<shevy> go use C
bigkevmcd has joined #ruby
<hoelzro> C is not ugly =)
<Hanmac> no one wants to write in ASM ... even your computer dont what that
<jokar> shevy: it is a question
banisterfiend has quit [Ping timeout: 250 seconds]
<hoelzro> jokar: if you want to call ASM code from Ruby, you'll probably want to use the C API to bind Ruby to ASM routines
<shevy> I have no idea if you can, you probably need to use C stuff to make use of ASM
chimkan has joined #ruby
<jokar> Thanks
<hoelzro> you almost definitely do
<jokar> hoelzro: Thanks
<Xeago> erhm, eating pizza :3
<Xeago> though, almost done
<shevy> INHEX BSR
<shevy> HEXERR JMP CTRL
<shevy> sounds like evil invocation ritual to summon a demon
<m3pow> Xeago, you've seen the git pastie ?
<Xeago> nope
<Virunga> m3pow: maybe you can write the first condition as n % 15 == 0, or n.remainder 15. :)
<Xeago> btw m3pow, use 2 spaces for indenting ;p
<Virunga> +1
<Hanmac> Virunga my code was the shortest: 1.upto(100){|i|p (a=(i%3==0?"Fizz":"")+(i%5==0?"Buzz":"")).empty?? i:a}
lggr has joined #ruby
<m3pow> Xeago, i just tabbed , on github is a bit different than what i have in Sublime
<Xeago> also, use &&, it is different than and
<Virunga> Hanmac: nice. :)
hsbt is now known as hsbt_away
<m3pow> that's what i asked shevy a couple of minutes ago
<m3pow> thanks for the tip Virunga
<Xeago> also m3pow look up what puts returns
<Virunga> m3pow: ;)
lggr has quit [Ping timeout: 240 seconds]
eddie_ has quit [Remote host closed the connection]
mark_locklear has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
<m3pow> Virunga, if i use the remainder method i get a "can't get coerced intro fixnum"
<Xeago> use %, it's clearer
<m3pow> but how do i use the remainder method
<Xeago> .remainder 2 #=> 1
<Xeago> 5.remainder 2 #=> 1
<Xeago> copy failed..
<Virunga> It returns the remainder so you have to negate the condition... Better use % :D
answer_42 has joined #ruby
<shevy> % is also shorter
<Virunga> I was wrong.
<Xeago> and more readable
<m3pow> so use !
<shevy> dunno if it is more readable :)
<Virunga> yeah
<Xeago> n%3==0 is arguably as good as !n%3
<shevy> I think for someone new to ruby, explicit is better
<shevy> for someone who wrote a lot of ruby code already however, being terse is better
<shevy> array = Array.new
<hoelzro> doesn't !n%3 always return false in Ruby?
<shevy> array = []
<hoelzro> since n % 3 returns a number, and they're always truthy?
<hoelzro> >> bot_up?
<hoelzro> =(
<m3pow> oruse unless n % 3 ?
<Xeago> NoMethodError: undefined method `%' for false:FalseClass
<bnagy> jokar: check out metasm
<hoelzro> m3pow: n % 3 will always be truthy, though
<bnagy> that will at least assemble it for you
<Xeago> ! has higher precedence than %
lggr has quit [Ping timeout: 244 seconds]
<hoelzro> or maybe I'm confusing falsiness in Ruby
<Xeago> so that won't work lol
<Xeago> hoelzro: it first evaluates a number to a boolean, then tries modulus
<bnagy> jokar: you can probably get something working with that plus FFI, even
<hoelzro> n % 3 coerces a number to a boolean?
<hoelzro> what?
<Xeago> no !n
<Xeago> and ! has higher precedence then %
<hoelzro> oh, I see what you mean
<Xeago> so !n => bool, into the nomethoderror
<hoelzro> ok, this is what I meant:
<hoelzro> !(n % 3)
<Xeago> yea, but that is worse than ==0 ;p
<bnagy> jokar: I don't talk in /query, sry
<Xeago> NoMethodError: undefined method `%' for false:FalseClass
<hoelzro> Virunga: not in Ruby
<Xeago> >> ! n%3
<Virunga> isn't zero represent false?
<Virunga> oh
<hoelzro> Xeago: I'm saying that doesn't work
<hoelzro> it will *always* be falsy
<hoelzro> for all numbers
<Virunga> yeah, i didn't know it.
<Xeago> yup, but without braces, it bails out even
<hoelzro> Virunga: only false and nil are falsy in Ruby
lggr has joined #ruby
answer_42 has quit [Ping timeout: 276 seconds]
noxoc has joined #ruby
chussenot has quit [Read error: Connection reset by peer]
chussenot has joined #ruby
geekbri has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
sailias has joined #ruby
paolooo has quit [Quit: Page closed]
tommyvyo has quit [Quit: Computer has gone to sleep.]
gmci has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.8]
mucker has joined #ruby
iori has quit [Remote host closed the connection]
lggr has joined #ruby
Hotel18250 has joined #ruby
Neomex has joined #ruby
moshef has quit [Quit: moshef]
kryl99__ has joined #ruby
iamjarvo has quit [Ping timeout: 246 seconds]
Hotel18250 has quit [Client Quit]
ltsstar has quit [Ping timeout: 245 seconds]
lggr has quit [Ping timeout: 246 seconds]
Neomex has quit [Client Quit]
kryl99_ has quit [Ping timeout: 264 seconds]
rohit has quit [Quit: Leaving]
wpaulson has joined #ruby
Neomex has joined #ruby
yalue has joined #ruby
thecreators has joined #ruby
Neomex has quit [Client Quit]
kryl99__ has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
mengu has joined #ruby
alek_b has quit [Remote host closed the connection]
lggr has joined #ruby
ndrei has quit [Read error: Connection reset by peer]
answer_42 has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
sailias has quit [Quit: Leaving.]
carloslopes has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
xpen has joined #ruby
<shevy> bnagy let's marry!
chimkan has quit [Quit: chimkan]
joofsh has joined #ruby
xyzodiac has joined #ruby
<shevy> wheee
<shevy> 639 folks here, 622 on #perl
<shevy> ruby is slowly winning against perl
<hoelzro> shevy: maybe you should measure in messages/hour =)
<hoelzro> #perl is pretty busy
lggr has joined #ruby
<shevy> nah
<shevy> the language is worse, so people need to ask more question
<shevy> :D
<hoelzro> good spin =P
<shevy> perl is still quite a step away in front of ruby http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
invisime has joined #ruby
<shevy> and not all perl projects have an equivalent in ruby
<shevy> webmin!
<hoelzro> ugh, Tiobe.
<hoelzro> and vice versa
Elhu has joined #ruby
bradhe has joined #ruby
tommyvyo has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
pskosinski has quit [Quit: Some alternative (not-controlled-by-fu*up-developers/moderators) Red Eclipse servers: http://altred.tk/lmaster]
jimeh has quit [Ping timeout: 264 seconds]
dpk has joined #ruby
zwevans has joined #ruby
pskosinski has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
frogprince has quit [Ping timeout: 244 seconds]
fantazo has joined #ruby
lggr has joined #ruby
Guest64548 has joined #ruby
etank has quit [Quit: WeeChat 0.3.8]
<workmad3> shevy: 'the language is worse, so people need to ask more questions' <-- that also applies to the tiobe ranking ;)
etank has joined #ruby
wpaulson_ has joined #ruby
chimay has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 244 seconds]
rippa has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
krawchyk has joined #ruby
wpaulson has quit [Ping timeout: 256 seconds]
wpaulson_ is now known as wpaulson
tommyvyo has quit [Quit: Computer has gone to sleep.]
theRoUS_ has joined #ruby
lggr has joined #ruby
cakehero has joined #ruby
DrShoggoth has quit [Quit: Leaving]
jonathanwallace has quit [Remote host closed the connection]
cakehero has quit [Client Quit]
mneorr_ has joined #ruby
jonathanwallace has joined #ruby
jonathanwallace has quit [Read error: Connection reset by peer]
Banistergalaxy has quit [Ping timeout: 245 seconds]
jonathanwallace has joined #ruby
chimkan has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
mneorr has quit [Ping timeout: 265 seconds]
Banistergalaxy has joined #ruby
linoj has joined #ruby
gfontenot has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
xpen has quit [Ping timeout: 244 seconds]
crodas has quit [Quit: Disconnecting from stoned server.]
dhruvasagar has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
dhruvasagar has joined #ruby
josh^ has quit [Remote host closed the connection]
TheMoonMaster has quit [Ping timeout: 264 seconds]
Guest44778 has quit [Ping timeout: 265 seconds]
Villadelfia has joined #ruby
lggr has joined #ruby
crodas has joined #ruby
TheMoonMaster has joined #ruby
xpen has joined #ruby
jbw has quit [Ping timeout: 264 seconds]
Villadelfia has quit [Remote host closed the connection]
jbw has joined #ruby
rabidpraxis has joined #ruby
wuzzzzaah has quit [Ping timeout: 256 seconds]
chimay has quit [Ping timeout: 246 seconds]
lggr has quit [Ping timeout: 256 seconds]
Villadelfia has joined #ruby
mksm has joined #ruby
keanehsiao has quit [Quit: keanehsiao]
mksm is now known as Guest52560
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
adkron_afk is now known as adkron
shiki has quit [Remote host closed the connection]
mneorr_ has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
justinmcp has quit [Remote host closed the connection]
PapaSierra has joined #ruby
GoGoGarrett has joined #ruby
tommyvyo_ has joined #ruby
tommyvyo_ has quit [Changing host]
tommyvyo_ has joined #ruby
lggr has joined #ruby
manuelitox_ has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
sailias has joined #ruby
XedMada has quit [Ping timeout: 264 seconds]
shiki has joined #ruby
mehrdad has quit [Read error: Connection reset by peer]
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
<m3pow> Xeago, still eating pizza ?
Villadelfia has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
iocor has joined #ruby
banisterfiend has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
<Xeago> nope been done for a while
<m3pow> new task for me :)
nari has joined #ruby
<Xeago> post solution first
lggr has joined #ruby
iamjarvo has joined #ruby
<m3pow> solution to what ?
<Xeago> fizzbuzz
<m3pow> i did
<Xeago> link it
<Xeago> I think it had issue's
<m3pow> let me browse the chat
<m3pow> i've tried it in IRB and it works
<Xeago> it outputs nil
<Xeago> it should output fizz fizzbuzz buzz or a number
<Xeago> never nil
nwest has joined #ruby
<m3pow> i in irb i get this : 1 2 Fizz 4 Buzz Fizz 8 Fizz
<Xeago> what does puts return?
<m3pow> puts returns a string usually right ?
<Xeago> 2
<Xeago> Fizz
<Xeago> nil
<Xeago> 4
<Xeago> is the output I get
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<matti> ?
<m3pow> i don't get a single nil
<Xeago> you sure?
<m3pow> you want a print screen :)
jeffreybaird has joined #ruby
<Xeago> as puts should always return nil, it does here anywyas
<Xeago> puts prints to stdout, and returns nil
<m3pow> i don't get a single nil in IRB
lggr has quit [Ping timeout: 246 seconds]
<m3pow> last thing i get is Buzz
<m3pow> which is 100, which is a multiple of 5
adkron has quit [Ping timeout: 265 seconds]
<Xeago> see nils
<m3pow> i see them
<m3pow> a moment
lggr has joined #ruby
ndrei has joined #ruby
ndrei has quit [Client Quit]
ndrei has joined #ruby
<Xeago> m3pow look up what puts returns
<m3pow> i know it always returns nil
<m3pow> i wonder why i don't see those nils
ndrei has quit [Client Quit]
daniel_- has quit [Ping timeout: 256 seconds]
chimkan has quit [Quit: chimkan]
ndrei has joined #ruby
ndrei has quit [Client Quit]
ndrei has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
the_jeebster has joined #ruby
asteve has joined #ruby
bradhe has joined #ruby
xpen has quit [Ping timeout: 252 seconds]
<workmad3> Xeago: 'puts nil' prints nothing btw ;)
<m3pow> instead of nil i think i get that blank space
ndrei has quit [Client Quit]
<matti> Meh.
<workmad3> Xeago: because puts calls to_s, and nil.to_s is ""
<matti> FizzBuzz is like men
<matti> Meh
<matti> (1 .. 100).each {|i| puts (i % 15 == 0 ? 'FizzBuzz' : (i % 5 == 0 ? 'Buzz' : (i % 3 == 0 ? 'Fizz' : i ))) }
ndrei has joined #ruby
<matti> There.
<matti> Go over it.
<matti> ;]
<m3pow> thank matti
lggr has quit [Ping timeout: 246 seconds]
<Xeago> matti, try using only 2 conditionals
<workmad3> matti: now solve it in brainfuck
ndrei has quit [Client Quit]
jasonkuhrt has joined #ruby
<workmad3> matti: and paste it in-chan without being kicked for flooding ;)
<matti> workmad3: I did wrote Brainfuck interpreter recently.
<matti> workmad3: So, tempting.
Drewch_ has quit [Excess Flood]
<Hanmac> matti my code was shorter :P
<m3pow> you've seen that Xeago
<workmad3> matti: but let me guess... you have better stuff to do for the next 50 years?
<bnagy> first write a ruby -> brainfuck compiler
<bnagy> in brainfuck, then run that in your interpreter
triptec_ has joined #ruby
<Xeago> m3pow: yea, opening irb first
<bnagy> I'll give you $50
<Xeago> and then pasting in your code
<matti> workmad3: I am at work now ;/
Drewch has joined #ruby
<workmad3> bnagy: your challenge is to write a ruby interpreter in brainfuck :P
<matti> Hanmac: I wrote it like that.
<matti> Hanmac: I don't even know if it works?
<matti> ;d
<matti> Where's the bot!
<matti> >>> p 'Miss you, honey'
<bnagy> workmad3: wouldn't that be like a million times easier?
<workmad3> matti: melted down and sold for scrap
<matti> :<
<matti> workmad3: We should write it in 8 bit ASM now.
<workmad3> bnagy: in all honesty, I have no idea
lggr has joined #ruby
<Hanmac> matti okay i use p not puts, but the result was similar
<Hanmac> this is my code: 1.upto(100){|i|p (a=(i%3==0?"Fizz":"")+(i%5==0?"Buzz":"")).empty?? i:a}
<bnagy> workmad3: well naively, you write a LLVM bytecode -> brainfuck
<matti> Hanmac: LOL
<bnagy> or some IL without sideeffects
<matti> Hanmac: You cheat.
<matti> Hanmac: No spaces.
<matti> ;]d
<matti> Hehehe
<m3pow> Xeago, how do i cure that Nil ?
<bnagy> then you just take YARV / MRI code and compile to llvm
triptec has quit [Ping timeout: 245 seconds]
triptec_ is now known as triptec
<matti> Xeago: I like the + there.
<Xeago> m3pow: how do you invoke your script atm?
CannedCorn has joined #ruby
<matti> Xeago: Clever.
<joofsh> Quick abstract question, every successfully completed action returns true in Ruby, correct? If I call a method and the last action of that method successfully completes, it will automatically return true such that its redundant to add a "return true"? So I could call a method from an if statement?
<Xeago> that's Hanmac's code, not mine
bradhe has quit [Ping timeout: 265 seconds]
<matti> Oh.
<matti> Sorry.
<matti> Hanmac: :P
<bnagy> joofsh: no
<matti> ...
<matti> s/Xeago/Hanmac/ in what I just said ;p
<banisterfiend> joast quite some confusion there my friend :P
<matti> banisterfiend: Pff
<Xeago> joofsh: it will return the last statement's returnvalue
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
* matti hugs banisterfiend
ndrei has joined #ruby
<bnagy> joofsh: almost nothing returns explicitly true, but everything except nil and false are truthy
<joofsh> bnagy: right, i'm having trouble grasp that concept of "truthy" lol
ndrei has quit [Client Quit]
<m3pow> i call the file through irb Xeago
<bnagy> so if some_meth ... will almost always work as you expect
cody-- has joined #ruby
<joofsh> bnagy: okay simple enough, I can just add a return true then
<bnagy> just not for the reason you thought :D
<Xeago> m3pow: try opening irb first
<bnagy> ok gtg
<Xeago> and then executing it
xpen has joined #ruby
ndrei has joined #ruby
<matti> workmad3: Actually.
ndrei has quit [Client Quit]
<Hanmac> matti my code is 6 chars shorter than yours when i remove the " " from yours
<matti> workmad3: Somebody did BF version.
<m3pow> doing now
<matti> Hanmac: Yes, yes. You clever you.
<m3pow> and yes i get those nils now :s
iamjarvo has quit [Ping timeout: 252 seconds]
<matti> Hanmac: With the +
<matti> Hanmac: Your Fizz-Penis is 6 chars shorter, I get it ;p
<Xeago> m3pow: the solution is simple
<m3pow> use print ?
<Hanmac> and "1.upto(100)" is shorter than "(1..100).each"
* matti yields his hat to Hanmac
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<matti> Hanmac: hehe
ndrei has joined #ruby
<Xeago> m3pow: want a thorough analysis of what is going on?
lggr has quit [Ping timeout: 245 seconds]
<Xeago> ifso, hit me in pm
<matti> Hanmac: What I did there was the first thing that came to my mind ;d
mmitchell has joined #ruby
ndrei has quit [Client Quit]
ndrei has joined #ruby
jasonkuhrt has quit [Ping timeout: 256 seconds]
Villadelfia has joined #ruby
Villadelfia has quit [Remote host closed the connection]
dpk has quit [Quit: Asleep at the keyboard.]
Peter-W has quit [Remote host closed the connection]
lggr has joined #ruby
daniel_- has joined #ruby
justsee has quit [Quit: Leaving...]
<matti> Hanmac: 74 c. if I squeeze it and use upto.
<matti> Hanmac: 1.upto(100){|i|puts(i%15==0?'FizzBuzz':(i%5==0?'Buzz':(i%3==0?'Fizz':i)))}
Peter-W has joined #ruby
banisterfiend has quit [Write error: Connection reset by peer]
<Hanmac> matti look at this: 1.upto(100){|i|puts(i%15==0?'FizzBuzz':i%5==0?'Buzz':i%3==0?'Fizz':i)}
<matti> O.
banisterfiend has joined #ruby
<matti> I pressumed () are needed.
<matti> Darn Ruby!
<matti> ;d
Rydefalk has quit [Read error: Connection reset by peer]
Rydefalk_ has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
ndrei has quit [Quit: leaving]
<matti> 70, nice.
ndrei has joined #ruby
triptec has quit [Read error: Connection reset by peer]
<matti> How long is yours?
triptec has joined #ruby
ndrei has quit [Client Quit]
ndrei has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
ndrei has quit [Client Quit]
v0n has joined #ruby
adkron has joined #ruby
ndrei has joined #ruby
lggr has joined #ruby
<Hanmac> ~71
daniel_- has quit [Ping timeout: 248 seconds]
mercwithamouth has joined #ruby
troessner_ has joined #ruby
<Hanmac> yours could be shorted to 67 if it use p instead of puts
stan_man_can has joined #ruby
ndrei has quit [Client Quit]
stan_man_can has quit [Client Quit]
awarner has joined #ruby
ndrei has joined #ruby
awarner has quit [Read error: Connection reset by peer]
<matti> Hanmac: But that ugly, isn't it?
ndrei has quit [Client Quit]
awarner has joined #ruby
<matti> Hanmac: Output will have ""
<Hanmac> hm maybe
ndrei has joined #ruby
<Hanmac> i mean maybe ugly
<matti> Hanmac: Thanks for this :) I love when peope better than me challenge me ;]
ndrei has quit [Client Quit]
joshman_ has quit [Quit: Computer has gone to sleep.]
troessner has quit [Ping timeout: 248 seconds]
ndrei has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
hsbt_away is now known as hsbt
stopbit has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
<heftig> 1.upto(100){|i|puts(i%15==0?:FizzBuzz:i%5==0?:Buzz:i%3==0?:Fizz:i)}
v0n is now known as panaman
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<heftig> 1.upto 100 {|i|puts(i%15==0?:FizzBuzz:i%5==0?:Buzz:i%3==0?:Fizz:i)}
<heftig> er
<heftig> whoops
<heftig> 1.upto(100){|i|puts i%15==0?:FizzBuzz:i%5==0?:Buzz:i%3==0?:Fizz:i}
<juha_> how about storing fizz and buzz to variables called a and b and then just printing a or b or a+b?
Rydefalk_ has quit [Read error: Connection reset by peer]
Rydefalk has joined #ruby
<Hanmac> juba_ i try it, its not shorter ...
<Xeago> Hanmac's versions is shortest
<Hanmac> hm no heftig is even shorter :P
lggr has joined #ruby
<Xeago> maybe with ruby 1.9 proc syntax, it can be made shorter
baphled_ has quit [Ping timeout: 264 seconds]
<heftig> 66 chars
Criztian has quit [Read error: Connection reset by peer]
<workmad3> well, it's not the shortest, but it doesn't use ternaries or comparisons :P
<workmad3> =["Fizz",nil,nil,"Buzz"];1.upto(100){|i|p [a[i%3],a[3+(i%5)],'',i].compact[0..1].join('')}
trooney_ is now known as trooney
Criztian has joined #ruby
<workmad3> a=["Fizz",nil,nil,"Buzz"];1.upto(100){|i|p [a[i%3],a[3+(i%5)],'',i].compact[0..1].join('')} even
shiki has quit [Remote host closed the connection]
elux has joined #ruby
<Hanmac> shevy your comment to that golf play?
CodeFriar has joined #ruby
ekaleido has joined #ruby
sallas has joined #ruby
ph^ has quit [Ping timeout: 244 seconds]
sallas is now known as ponty
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
statarb3 has quit [Quit: Leaving]
lggr has quit [Ping timeout: 244 seconds]
cakehero has joined #ruby
<workmad3> bit shorter: a,b=['Fizz'],['Buzz'];1.upto(100){|i|p [a[i%3],b[i%5],'',i].compact[0..1].join}
<workmad3> that's only 79 chars
<Xeago> I must say, workmad3 is cleverest
<Xeago> or the most clever..
jimeh has joined #ruby
lggr has joined #ruby
ekaleido has quit [Quit: leaving]
jasonkuhrt has joined #ruby
<matti> Xeago: LOL
<matti> Xeago: I should feel bad about my version?
<banisterfiend> Xeago i have a k00 one
TheX1le has left #ruby [#ruby]
<matti> ?
<Xeago> matti: never said so :O?
<matti> ;p
<matti> Xeago: But I can sense the pressue ;p
<matti> Heheh
<matti> :>
<Xeago> wot, I am confused lol
ananthakumaran has joined #ruby
boodle has joined #ruby
<matti> Xeago: Hehe, I am just being silly ;]
<Xeago> banisterfiend: I can't use delete in pry
<Xeago> why!?
lggr has quit [Ping timeout: 256 seconds]
baphled has joined #ruby
BIGX333 has quit [Remote host closed the connection]
ncamargo has joined #ruby
<matti> LOL
jasonkuhrt has quit [Ping timeout: 244 seconds]
<matti> workmad3: Works fine ;]
mbk has quit [Ping timeout: 240 seconds]
<banisterfiend> Xeago i like that cos it applies the fizzbuzz logic post-hoc during an automatic debuggin phase
<banisterfiend> Xeago what is delete?
elux has quit [Read error: Connection reset by peer]
<matti> workmad3: brainfuck.rb is the little naive interpreter I wrote to teach my friend Ruby a little more.
<workmad3> matti: heh
yshh has joined #ruby
<matti> workmad3: ? ;<
chimay has joined #ruby
<banisterfiend> Xeago tell me what is delete or i beat u
<banisterfiend> :P
<workmad3> matti: the brainfuck interpreter and bf solution :)
<matti> workmad3: What's wrong?
<matti> :<
<workmad3> matti: nothing, I just like it :)
<matti> workmad3: Ah :)
<workmad3> matti: and so I 'heh'ed :P
Morkel has quit [Quit: Morkel]
<matti> Ahhh.
sailias has quit [Quit: Leaving.]
<matti> I often interpret "heh" as "meh" as in Polish "heh" will be like "meh" :)
frogprince_mac has joined #ruby
<matti> ;p
BIGX333 has joined #ruby
lggr has joined #ruby
<banisterfiend> Xeago oh you mean the delete key
<banisterfiend> that's a readline issue
<banisterfiend> one sec
<banisterfiend> Xeago i think this is the second time i've linked you this, so pay attention this time: https://github.com/pry/pry/wiki/FAQ#wiki-delete_key
<banisterfiend> :)
nari has quit [Ping timeout: 265 seconds]
<Xeago> wot, no first time!
hsbt is now known as hsbt_away
<banisterfiend> ah ok, must be another dude on #ruby then
Hamed-R has quit [Ping timeout: 245 seconds]
ncamargo has quit [Remote host closed the connection]
<Xeago> what is \033 ?
<Xeago> beep
<Xeago> ?
<hoelzro> escape, probably
justsee has quit [Quit: Linkinus - http://linkinus.com]
lggr has quit [Ping timeout: 246 seconds]
Mon_Ouie has quit [Quit: WeeChat 0.3.8]
<hoelzro> used for terminal escapes and such
BIGX333 has quit [Ping timeout: 244 seconds]
<hoelzro> "\033[31m" # red
Mon_Ouie has joined #ruby
Goles has joined #ruby
yshh has quit [Remote host closed the connection]
<Xeago> ok
<Xeago> ty banisterfiend
wuzzzzaah has joined #ruby
<mensvaga> In ruby, is something like this possible:
<mensvaga> keys = ['a','b','c]; values = ['1','2','3']; hash = {}; hash[keys] = values
<mensvaga> ?
<Xeago> nope, but it is easily done
<the_jeebster> not sure if you can do all at once, but you could iterate through each key and value and add them to the hash
ananthakumaran has quit [Read error: Connection reset by peer]
ananthakumaran1 has joined #ruby
bradhe has joined #ruby
ndrei has quit [Quit: leaving]
<mensvaga> sweet, in the newer versions, it works
<Muz> keys.each_with_index {|k,i| h[k] = values[i]}
<mensvaga> actually
<mensvaga> no, it doesn't.
theRoUS_ has quit [Ping timeout: 246 seconds]
<mensvaga> it made the key the array
<mensvaga> hrm.
<mensvaga> OK.
lggr has joined #ruby
<hoelzro> you could probably do something with slice
<hoelzro> hmm
<hoelzro> Hash.slice is less powerful than I'd hoped
<elsifaka> what about [keys, values].transpose
<hoelzro> Hash[ keys.zip(values) ] would do it, I think
<elsifaka> nope
<elsifaka> Hash[[keys, values].transpose]
* hoelzro tries
<hoelzro> Hash[ keys.zip(values) ] indeed does the trick, mensvaga
bradhe has quit [Ping timeout: 245 seconds]
<elsifaka> mensvaga: didn't use zip yet
<mensvaga> fair enough!
<mensvaga> thanks.
<hoelzro> elsifaka: what's wrong with it?
<elsifaka> hoelzro: nothing
ph^ has joined #ruby
<elsifaka> hoelzro: it's just the first time I see this method :)
<hoelzro> oh, I see =)
<hoelzro> I was just playing around =)
_bart has joined #ruby
lggr has quit [Ping timeout: 265 seconds]
<elsifaka> hoelzro: liked it
<hoelzro> thanks!
<mensvaga> I still got an empty hash when I did hash[[keys,values].transpose]
<elsifaka> mensvaga: it's Hash (the constant)
<elsifaka> not hash
ffranz has joined #ruby
<mensvaga> ah.
<mensvaga> OK.
<mensvaga> thanks; that works.
<elsifaka> almost the solution as yours :)
<elsifaka> same*
Xeago_ has joined #ruby
tk__ has quit [Quit: ばいばい]
lggr has joined #ruby
aganov has quit [Quit: aganov]
<adkron> Are you trying to turn an array into a hash?
<Xeago_> two arrays actually
<adkron> [key1, value1, key2, value2]?
quest88 has joined #ruby
Elhu has quit [Ping timeout: 244 seconds]
DefV has quit [Ping timeout: 260 seconds]
<Xeago_> keys = ['a','b','c]; values = ['1','2','3'];
<adkron> Hash[*keys.zip(values)]
Spooner has joined #ruby
DefV has joined #ruby
Xeago has quit [Ping timeout: 245 seconds]
<adkron> err not the *
Elhu has joined #ruby
<adkron> Oh, I see that solution was already listed above
<adkron> I'm like a child who wonders into a conversation
<mensvaga> Shut the fuck up, Donny
Synthead has joined #ruby
<troessner_> :)
<troessner_> wanted to jump in there
<troessner_> and say the same thing
<adkron> I dabbled in pacifism once. Not in Nam, of course.
lggr has quit [Ping timeout: 246 seconds]
axl_ has joined #ruby
<troessner_> i think half a year ago there was a cast reunion
<troessner_> i almost cried
<troessner_> :)
philcrissman has joined #ruby
<troessner_> :)
theRoUS_ has joined #ruby
jjbohn has joined #ruby
<adkron> troessner_: thanks
arturaz has quit [Ping timeout: 244 seconds]
manuelitox_ has quit [Ping timeout: 246 seconds]
Xeago_ is now known as Xeago
lggr has joined #ruby
<troessner_> yw
larissa has quit [Quit: Leaving]
iamjarvo has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
ponty has quit [Quit: ponty]
F1skr has joined #ruby
xyzodiac has joined #ruby
iocor has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
bbttxu has joined #ruby
lggr has joined #ruby
dalton_ has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
arubin has joined #ruby
quest88 has quit [Quit: quest88]
dpk has joined #ruby
<dalton_> Is there a good resource that talks about interfaces to modules? Can modules assume that an instance variable exists in the class its mixed into? Should accessors be used instead (and is it ok to assume those accessors exist?) Thanks!
daniel_- has joined #ruby
ananthakumaran1 has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 244 seconds]
dakine has joined #ruby
frogprince_mac has quit [Quit: Leaving...]
jprovazn is now known as jprovazn_away
lggr has joined #ruby
sylock has quit [Quit: Page closed]
monkegjinni has quit [Ping timeout: 246 seconds]
adkron has quit [Ping timeout: 256 seconds]
sirecote_ is now known as sirecote
mercwithamouth has quit [Remote host closed the connection]
XedMada has joined #ruby
mercwithamouth has joined #ruby
Villadelfia has joined #ruby
matrixise has quit [Ping timeout: 244 seconds]
monkegjinni has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
ncamargo has joined #ruby
lolmaus has quit []
tommyvyo_ has joined #ruby
mengu has quit [Remote host closed the connection]
ncamargo has quit [Client Quit]
ltsstar has joined #ruby
alek_b has joined #ruby
bobbbo has quit [Quit: bobbbo]
Bosox20051 has quit [Quit: Leaving]
lucianosousa has joined #ruby
ncamargo has joined #ruby
darthdeus has joined #ruby
sagax has quit [Quit: Ухожу я от вас]
manuelitox_ has joined #ruby
mikepack has joined #ruby
ttt has quit [Ping timeout: 260 seconds]
ncamargo has quit [Client Quit]
tommyvyo_ has quit [Client Quit]
ananthakumaran has joined #ruby
sspiff has quit [Remote host closed the connection]
xpen has quit [Ping timeout: 244 seconds]
lggr has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
fantazo has quit [Remote host closed the connection]
tommyvyo_ has joined #ruby
sailias has joined #ruby
ryanlecompte has joined #ruby
[diecast]_ is now known as [diecast]
[diecast] has quit [Changing host]
[diecast] has joined #ruby
[diecast] has joined #ruby
eph3meral has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
darthdeus has quit [Quit: Linkinus - http://linkinus.com]
seoaqua has joined #ruby
maesbn has quit [Remote host closed the connection]
<troessner_> dalton_, i assume it
maesbn has joined #ruby
<troessner_> but you can make sure that they exist in something like the included callback
<Spooner> troessner_ : I was going to suggest that, but that wouldn't work reliably based on when the module is included. e.g. if you include MyModuleThatUsesZ; attr_reader :z
xpen has joined #ruby
lggr has joined #ruby
<troessner_> yeah, actually it was bullshit what i said on second thought
<troessner_> :(
deryl has joined #ruby
<Spooner> dalton_ : I'd suggest you try to use accessors though, since they'd fail if they were missing. Directly messing with @ivars is likely going to lead to trouble (unless you own both including class and included module).
ananthakumaran has quit [Ping timeout: 252 seconds]
<troessner_> Spooner, but using attr accessors doesnt solve this problem
notVert has quit [Remote host closed the connection]
ryanlecompte has quit [Remote host closed the connection]
gianlucadv has quit [Quit: ZNC - http://znc.sourceforge.net]
<troessner_> because inclusion of modules happens before initializing any variables
<troessner_> and before initialization you can't reliably test that they exist
maesbn has quit [Ping timeout: 264 seconds]
mneorr has quit [Remote host closed the connection]
<Spooner> Why not? It just means you'd get a nomethod error on use, rather than at inclusion time, if the including class didn't provide them.
rabidpraxis has joined #ruby
bbttxu has quit [Quit: bbttxu]
<Spooner> Whereas if you use ivars, unless you check whether they exist every time, they will default to nil.
ponty has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
<troessner_> Spooner, good point, you're right
<Spooner> Now we can discuss whether a module can add its own @ivars on the including class and get into even deeper water :D
gianlucadv has joined #ruby
davidcelis has quit [Quit: K-Lined.]
bartj3 has quit []
adambeynon has joined #ruby
<troessner_> dalton_, quick code snippet which might help you get going:
<troessner_> >> module M; def self.included(base); raise "OMG" unless base.new.respond_to?(:my_attr); end; end; class C; include M; attr_accessor :my_attr; end
<troessner_> => ni
<troessner_> Spooner, :D
Cache_Money has joined #ruby
berkes has quit [Quit: Ex-Chat]
<Spooner> troessner_ : You are creating a new base before it is finished. Not good :(
hoelzro is now known as hoelzro|away
<troessner_> Spooner, yes, this might lead to weird errors, i know
<troessner_> but how would you do it better?
lggr has joined #ruby
<troessner_> Spooner, personally i wouldn't do this at all but rather make sure stuff doesn't break by a decent test coverage
eph3meral has quit [Quit: eph3meral]
<Spooner> If you want to try to do it that way, you would be better off using base.public_instance_methods.include?(:my_attr)
<troessner_> ah, nice one
<troessner_> ;)
<Spooner> Though that doesn't work on 1.8 :D
<troessner_> I'd still rather go with a decent test coverage
<troessner_> :)
daniel_- has quit [Quit: WeeChat 0.3.8]
ph^ has quit [Read error: Connection reset by peer]
<Spooner> (methods is a list of strings, not symbols, in 1.8).
bradhe has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
bradhe has quit [Read error: Connection reset by peer]
JohnBat26 has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
bradhe has joined #ruby
<Spooner> Oh yes, tests are good. As long as it fails early (NoMethodError on accessing non-existant accessor, rather than missing @ivar beign nil or writing directly to an @ivar that uses some sort of validation or has secondary effects in the write method).
lggr has quit [Ping timeout: 256 seconds]
<Xeago> Is this proper: "Input comes from VideofyMe's API."?
<Xeago> or should it be VideofyMes ?
XedMada has quit [Ping timeout: 252 seconds]
daniel_- has joined #ruby
<Spooner> VideofyMe's
cakehero has quit [Quit: Leaving...]
jbohn has joined #ruby
nightfalcon has joined #ruby
<Xeago> ty
baroquebobcat has joined #ruby
lggr has joined #ruby
adac has quit [Quit: Leaving]
banisterfiend has joined #ruby
<Spooner> I'd probably write "from the VideofyMe API" though.
<Xeago> roger!
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
tommyvyo_ is now known as tommyvyo
cakehero has joined #ruby
frogprince_mac has joined #ruby
emsilva has joined #ruby
emsilva has quit [Changing host]
emsilva has joined #ruby
jjbohn has quit [Ping timeout: 246 seconds]
sheerun has quit [Quit: sheerun]
aantix has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
ij has quit [Ping timeout: 244 seconds]
ken_barber has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
jeff_sebring has joined #ruby
ananthakumaran has joined #ruby
mneorr has joined #ruby
Cache_Money has quit [Ping timeout: 252 seconds]
chrishunt has quit [Ping timeout: 244 seconds]
eph3meral has joined #ruby
arubin has quit [Quit: arubin]
wallerdev has joined #ruby
troessner_ has quit [Quit: Leaving]
futilegames has quit [Quit: futilegames]
senny has quit [Remote host closed the connection]
CannedCorn has quit [Quit: Computer has gone to sleep.]
lggr has joined #ruby
jbohn has quit [Quit: Linkinus - http://linkinus.com]
XedMada has joined #ruby
arubin has joined #ruby
blazes816 has joined #ruby
seoaqua has quit [Quit: 离开]
eph3meral has quit [Ping timeout: 252 seconds]
xyzodiac has joined #ruby
fermion has quit [Quit: P]
asteve has quit []
ph^ has joined #ruby
lkba has joined #ruby
manuelitox_ has quit [Quit: Ex-Chat]
manuelitox_ has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
lggr has quit [Ping timeout: 240 seconds]
davidcelis has joined #ruby
carloslopes has quit [Quit: Leaving.]
aces1up has quit [Remote host closed the connection]
aces1up has joined #ruby
ryanlecompte has joined #ruby
wchun has quit [Ping timeout: 252 seconds]
gani has joined #ruby
ponty2 has joined #ruby
ponty has quit [Ping timeout: 256 seconds]
ponty2 is now known as ponty
jjbohn has joined #ruby
dpk has joined #ruby
lggr has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
ananthakumaran has quit [Ping timeout: 264 seconds]
neurotech has quit [Remote host closed the connection]
deadghost has quit [Ping timeout: 256 seconds]
artm has quit [Quit: artm]
deadghost has joined #ruby
zigomir has quit [Quit: Leaving]
lggr has quit [Ping timeout: 240 seconds]
elsifaka has quit [Quit: Veloma e!]
philcrissman has quit [Remote host closed the connection]
slicslak has joined #ruby
ph^ has quit [Read error: Connection reset by peer]
gani has quit [Quit: leaving..]
Criztian has quit [Remote host closed the connection]
lggr has joined #ruby
punkrawkR has joined #ruby
ananthakumaran has joined #ruby
hoelzro|away is now known as hoelzro
jasonkuhrt has joined #ruby
Eldariof18-ru has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
evilsushi has joined #ruby
evilsushi has quit [Changing host]
evilsushi has joined #ruby
tgraham has joined #ruby
mikepack has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
xpen has quit [Ping timeout: 252 seconds]
xpen has joined #ruby
mikepack has quit [Remote host closed the connection]
moted has joined #ruby
joshman_ has joined #ruby
skogis has joined #ruby
tgraham has quit [Client Quit]
jasonkuhrt has quit [Ping timeout: 265 seconds]
tgraham has joined #ruby
Bosma has joined #ruby
ph^ has joined #ruby
NiteRain has joined #ruby
nightfalcon has quit []
noxoc has quit [Quit: Leaving.]
wchun has joined #ruby
lggr has joined #ruby
ph^ has quit [Remote host closed the connection]
mikepack has joined #ruby
tsuru`` has quit [Read error: Connection reset by peer]
joshman_ has quit [Client Quit]
joshman_ has joined #ruby
jbohn has joined #ruby
sheerun has joined #ruby
Forevernade has joined #ruby
juarlex has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
sheerun has quit [Client Quit]
ScottNYC has joined #ruby
sebastorama has quit [Remote host closed the connection]
GoHuyGo has joined #ruby
jjbohn has quit [Ping timeout: 264 seconds]
sheerun has joined #ruby
lggr has quit [Ping timeout: 265 seconds]
xpen has quit [Ping timeout: 244 seconds]
Iszak has quit [Quit: User has gone to sleep.]
twoism has joined #ruby
mahmoudimus has joined #ruby
bobbbo has joined #ruby
vaclavt has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
lggr has joined #ruby
manuelitox_ has quit [Ping timeout: 264 seconds]
jso has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
nga4 has quit [Ping timeout: 248 seconds]
bobbbo has quit [Client Quit]
dpk has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
ponty has quit [Quit: ponty]
daniel_- has quit [Quit: WeeChat 0.3.8]
matthewrobbins has quit [Ping timeout: 265 seconds]
nightfalcon has joined #ruby
m3pow has left #ruby [#ruby]
m3pow has joined #ruby
tgraham is now known as tgraham|away
lggr has joined #ruby
tgraham|away is now known as tgraham
zeromodulus has joined #ruby
daniel_- has joined #ruby
jrist is now known as jrist-mtg
philcrissman has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
adeponte has joined #ruby
pauC has quit [Quit: Ex-Chat]
<shevy> Hanmac I fell asleep a while before, just woke up
voodoofish430 has joined #ruby
manuelitox_ has joined #ruby
tommyvyo_ has joined #ruby
tommyvyo_ has quit [Changing host]
tommyvyo_ has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
lggr has joined #ruby
Chryson has joined #ruby
haxrbyte has joined #ruby
arubin has quit [Quit: arubin]
shevy has quit [Read error: Operation timed out]
haxrbyt__ has quit [Ping timeout: 246 seconds]
frogprince has joined #ruby
artm has joined #ruby
chimkan_ has joined #ruby
chrishunt has joined #ruby
lggr has quit [Ping timeout: 245 seconds]
withnale has joined #ruby
<Hanmac> shevy we played code-golf
LouisGB has quit []
haxrbyte_ has joined #ruby
jasonkuhrt has joined #ruby
eldariof has joined #ruby
LouisGB has joined #ruby
haxrbyte has quit [Ping timeout: 252 seconds]
<withnale> Hello. Is there a nice trick for performing a find on an array of hashes that provides an array where the given hash elements match?
lggr has joined #ruby
carloslopes has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
maletor has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
<withnale> list = [ { :a => 1, b =>2 }, { :a => 2, :b => 3}, { :a => 2, :b => 4 } ]
jgrevich has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
<withnale> newarray = list.find({ :a => 1, :b => 2})
dhruvasagar has joined #ruby
sneakyness_wk has joined #ruby
<withnale> trivial example, but with more hash items more items in the array. any short cut to doing this in a generic fashion?
<Hanmac> list.find{|h| h == { :a => 1, :b => 2}}
<withnale> there could be other hash items that I'mnot specifying
vaclavt has quit [Quit: vaclavt]
yakitori has quit [Ping timeout: 264 seconds]
<withnale> it should also work for... newarray = list.find({ :a => 2 })
<Hanmac> search = {:a => 1, :b=> 2}; list.select{|h|search.all?{|k,v| h[k]==v}}
lggr has quit [Ping timeout: 248 seconds]
jblack has joined #ruby
* withnale bows
<withnale> excellent
shevy has joined #ruby
jenrzzz has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
iocor has quit [Quit: Computer has gone to sleep.]
hoelzro is now known as hoelzro|away
JohnBat26 has joined #ruby
jso has quit []
JarJar has joined #ruby
hadees has quit [Quit: hadees]
lggr has joined #ruby
eignerchris has joined #ruby
chrismcg is now known as zz_chrismcg
<withnale> is there any way I could implement an OR so I found specify { :a => 1, :a => 2} ?
chussenot has quit [Read error: Operation timed out]
Vainoharhainen has quit [Quit: Leaving...]
<withnale> found specify = could specify
asteve has joined #ruby
jso has joined #ruby
chrisja has joined #ruby
Chryson has quit [Ping timeout: 246 seconds]
haxrbyte_ has quit [Remote host closed the connection]
dpk has joined #ruby
hoelzro|away is now known as hoelzro
mikepack has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 264 seconds]
elaptics is now known as elaptics`away
XedMada has quit [Remote host closed the connection]
XedMada has joined #ruby
BrokenCog has quit [Quit: leaving]
luckyruby has joined #ruby
d1zzYLuLz has joined #ruby
<Spooner> withnale : #any? rather than #all?
pu22l3r has joined #ruby
mikepack has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
BrokenCog has joined #ruby
<d1zzYLuLz> can somebody help me with eventmachine 0.12.10?? I get the error An error occurred while installing eventmachine (0.12.10), and Bundler cannot continue. when trying to "bundle install" w/ snorby
arubin has joined #ruby
baphled has quit [Ping timeout: 252 seconds]
nga4 has joined #ruby
love_color_text has joined #ruby
jrist-mtg is now known as jrist
lggr has joined #ruby
Xeago_ has joined #ruby
Elico1 has quit [Quit: elico1]
Xeago_ has quit [Read error: Connection reset by peer]
Drewch has quit [Ping timeout: 252 seconds]
sailias1 has joined #ruby
Xeago_ has joined #ruby
<Spooner> d1zzYLuLz : Try #eventmachine perhaps?
lggr has quit [Ping timeout: 256 seconds]
eka has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
<d1zzYLuLz> bundle install #eventmachine? still fails
deadghost has quit [Ping timeout: 256 seconds]
jcorcuera has joined #ruby
<Spooner> No, I mean the #eventmachine channel :D
<d1zzYLuLz> oh. derp
<d1zzYLuLz> lol
<Spooner> But yes, I'd try and see if you can "gem install eventmachine" to see if it is a problem with using that older version (current is 1.0.0)
Drewch has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
hadees has joined #ruby
eka has left #ruby [#ruby]
futilegames has joined #ruby
<shevy> By the way, the :=<- idiom is called the Overbite Man.
jcorcuera has left #ruby [#ruby]
<shevy> Overbite Man???
tyfighter has joined #ruby
manuelitox_ has quit [Read error: Connection reset by peer]
philcrissman has quit [Remote host closed the connection]
<RubyPanther> I love the koi with the human face, so wise and fatherly
lggr has joined #ruby
<d1zzYLuLz> Spooner: i think it is the issue that it's an old version, but snorby doesn't work w/ the new version
<d1zzYLuLz> thanks for the help though
<Spooner> d1zzYLuLz : OK. What OS, by the way?
<d1zzYLuLz> debian
cody-- has quit [Quit: goodbye]
<Spooner> Oh, OK, nothing unusual there (I can't compile 0.12.10 on this win64 system).
Forevernade has quit [Ping timeout: 252 seconds]
GoGoGarrett has joined #ruby
adamkittelson has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 256 seconds]
dustinleer has joined #ruby
twoism_ has joined #ruby
jasonkuhrt has quit [Quit: Leaving...]
unipol has joined #ruby
twoism has quit [Ping timeout: 256 seconds]
unipol has quit [Client Quit]
Goles has quit [Quit: Computer has gone to sleep.]
mmercer has quit [Quit: WeeChat 0.3.8]
mmercer has joined #ruby
lggr has joined #ruby
kenichi-away is now known as kenichi
iocor has joined #ruby
aces1up has quit []
<Hunner> Is the & operator on two arrays O(n^2) ?
dmiller has quit [Ping timeout: 244 seconds]
love_color_text has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 265 seconds]
bluenemo has quit [Remote host closed the connection]
<Hunner> Also, what would the time complexity of my_array.select { |e| /some_expression/ =~ e } be? O(n) if the regular expression doesn't have to be loaded every time the block is called, I think
<hoelzro> Hunner: why do you ask?
jeff_sebring has quit [Quit: Leaving]
<Hunner> hoelzro: Because I'm trying to figure out if supporting an array of regex searches is worth the time and space requriements over just using string comparison
rburton- has joined #ruby
<hoelzro> try benchmarking it =)
artm has quit [Quit: artm]
sepp2k1 has joined #ruby
lggr has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
mbk has joined #ruby
sepp2k has quit [Ping timeout: 246 seconds]
dmiller has joined #ruby
enroxorz-work has joined #ruby
<Spooner> You should my_array.grep /some_expression/ (or premake the regexp, of course)
Forevernade has joined #ruby
diegoviola has joined #ruby
tvw has quit [Remote host closed the connection]
zommi has quit [Quit: Leaving.]
artm has joined #ruby
ij has joined #ruby
lggr has quit [Ping timeout: 264 seconds]
<Hanmac> shevy did you read the newest what-if.kxcd.com ?
<Hanmac> i mean this: http://what-if.xkcd.com/
<shevy> didnt read it, I dont really follow xkcd
<shevy> so much to read! :(
manuelitox_ has joined #ruby
<heftig> screw the moon
<Gate> Its one hell of a drop.
dalton_ has quit [Remote host closed the connection]
<Hanmac> heftig: "what if we tried more power?" :D
<RubyPanther> Hunner: The array stuff is fairly well optimized C, most of it will be whatever the normal best case is. & is fast and generally more appropriate. If you're to the point of using a string for optimization IMO you should just write it in C anyways, though, even if you still use a string.
Xeago_ has quit [Remote host closed the connection]
<RubyPanther> Often minimizing n has better results
Mon_Ouie has quit [Remote host closed the connection]
Forevernade has quit [Remote host closed the connection]
philcrissman has joined #ruby
Mon_Ouie has joined #ruby
lggr has joined #ruby
ncr100 has joined #ruby
bricker has joined #ruby
c0rn__ has joined #ruby
<Spooner> "Unfortunately, the laser energy flow would turn the atmosphere to plasma, instantly igniting the Earth’s surface and killing us all." - This is what Science was invented for!
lggr has quit [Ping timeout: 246 seconds]
lyaunzbe has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
<lyaunzbe> clear
lyaunzbe has left #ruby [#ruby]
<shevy> rescue
enroxorz-work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Russell^^ has joined #ruby
k0m has joined #ruby
lggr has joined #ruby
dpk has joined #ruby
triptec_ has joined #ruby
daniel_- has quit [Ping timeout: 246 seconds]
boodle has quit [Quit: boodle]
mercwithamouth has joined #ruby
macmartine has joined #ruby
dmiller has quit [Remote host closed the connection]
triptec has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 265 seconds]
triptec_ has quit [Ping timeout: 265 seconds]
scx has joined #ruby
<scx> hello
dmiller has joined #ruby
<scx> i want to extract all tags with name "foo" (getElementsByTagName) from xml file
<scx> which class i should use?
internet_user has joined #ruby
<Spooner> nokogiri gem?
<k0m> I second nokogiri
statarb3 has quit [Quit: Leaving]
lggr has joined #ruby
jasonkuhrt has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
<scx> Spooner: ok, thx
bigmcq77 has joined #ruby
triptec has joined #ruby
gmci has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
dhruvasagar has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 244 seconds]
banisterfiend has joined #ruby
bradhe_ has joined #ruby
deadghost has joined #ruby
ianbrandt has joined #ruby
ken_barber has quit [Remote host closed the connection]
Mon_Ouie has quit [Remote host closed the connection]
dmiller has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
ianbrandt has quit [Remote host closed the connection]
areil has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 248 seconds]
ianbrandt has joined #ruby
ewag has quit [Ping timeout: 240 seconds]
hoelzro is now known as hoelzro|away
lggr has joined #ruby
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
JarJar has quit [Quit: Leaving]
sepp2k has joined #ruby
My_Hearing has joined #ruby
sepp2k has quit [Client Quit]
baphled has joined #ruby
awestroke has joined #ruby
Mon_Ouie has quit [Ping timeout: 264 seconds]
chimay has quit [Quit: WeeChat 0.3.9-rc1]
lessless has joined #ruby
manuelitox_ has quit [Ping timeout: 264 seconds]
<lessless> is it possible to see a method's source code?
lggr has quit [Ping timeout: 248 seconds]
CodeFriar has quit [Quit: Leaving...]
gvz has joined #ruby
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
My_Hearing is now known as Mon_Ouie
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Mon_Ouie> There's a method-source gem that can find it
<Mon_Ouie> Using built-in methods only, source_location is as close as you can get
<lessless> thanks
lushious has quit [Quit: FBI_KNOCKING_AT_MY_DOOR]
slicslak has quit [Ping timeout: 264 seconds]
jasonkuhrt has quit [Quit: Leaving...]
apok has joined #ruby
panaman has quit [Remote host closed the connection]
<reactormonk> Mon_Ouie: does method-source use the ruby parser?
dmiller has joined #ruby
lggr has joined #ruby
<Mon_Ouie> reactormonk: I haven't seen the source code in a while, but I think it does it a much more naive way (looking for ends, somehow)
<Mon_Ouie> At least that allows it to work for some metaprogrammed methods
<reactormonk> Mon_Ouie: good old regex vs. context-sensitive?
<Mon_Ouie> (When you class_eval def #{some_method_name}(…); end" it can still find it)
reset has quit [Quit: Leaving...]
manuelitox_ has joined #ruby
gmci has joined #ruby
bradhe_ has quit [Read error: Connection reset by peer]
philcrissman has quit [Remote host closed the connection]
bradhe has joined #ruby
gfonteno_ has joined #ruby
<reactormonk> oh, it executes the method in ruby 1.8 :-)
gfontenot has quit [Ping timeout: 240 seconds]
spathi_ is now known as spathi
monkegjinni has quit [Remote host closed the connection]
<Spooner> lessless : the "show-source" command in pry does this nicely for you.
bobbbo has joined #ruby
<reactormonk> Mon_Ouie: banister again... "BEGIN{throw :valid}\n#{str}"
<lessless> Spooner, already watching the screencast
lggr has quit [Ping timeout: 264 seconds]
jasonkuhrt has joined #ruby
<reactormonk> Mon_Ouie: I have to admit it's a beautiful hack of a code
lggr has joined #ruby
mark_locklear has quit [Ping timeout: 265 seconds]
etherdev has quit [Ping timeout: 268 seconds]
beneggett has joined #ruby
<lessless> Spooner, but it still use method-source at the end! ;D
<Spooner> Aye, it probably does, but it is more idiotproof and also allows you to see the C source (if using pry-doc as well as pry).
<reactormonk> lessless: guess what, the same guy wrote pry and method-source
daniel_- has joined #ruby
<Mon_Ouie> method-source was written *for* pry
Neomex has joined #ruby
alvaro_o has joined #ruby
Guest23766 is now known as issyl0
<lessless> Okay, that's really make me like WOW
qubit has joined #ruby
joast has quit [Quit: Leaving.]
monkegjinni has joined #ruby
<Spooner> Dont' be like that when you meet him. It goes straight to his head.
lggr has quit [Ping timeout: 265 seconds]
vaclavt has joined #ruby
Virunga has quit [Remote host closed the connection]
AlbireoX has joined #ruby
mucker has quit [Ping timeout: 245 seconds]
gfonteno_ has quit [Ping timeout: 256 seconds]
loves_color_text has quit [Remote host closed the connection]
loves_color_text has joined #ruby
gfontenot has joined #ruby
lggr has joined #ruby
axl_ has quit [Quit: axl_]
seme has joined #ruby
mark_locklear has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
completely_soake has joined #ruby
philcrissman has joined #ruby
<reactormonk> Spooner: ;-)
k0m has quit [Quit: Computer has gone to sleep.]
willclark has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
heisenmink has joined #ruby
<willclark> is xsd2ruby.rb from soap4r the only utility that can parse an xsd file and generate ruby classes?
notVert has joined #ruby
vaclavt_ has joined #ruby
lushious has joined #ruby
mark_locklear has quit [Ping timeout: 246 seconds]
joast has joined #ruby
heisenmink has quit [Remote host closed the connection]
guns has joined #ruby
heisenmink has joined #ruby
peneconleche has joined #ruby
dpk has joined #ruby
vaclavt has quit [Ping timeout: 248 seconds]
vaclavt_ is now known as vaclavt
awestroke has quit [Ping timeout: 256 seconds]
lggr has joined #ruby
<shevy> who wants to help with RubyOS
<GeekOnCoffee> shevy: ??
<shevy> an OS where as much ruby as possible is used
bbttxu has joined #ruby
<Spooner> shevy : rm -rf /rubyos
<shevy> :(
<Spooner> Does that help?
<shevy> that does not sound very constructive!
<shevy> it is easier to smash down a bridge than build one
* shevy nods wisely.
chrisbolton has joined #ruby
<rking> shevy: Get as far as booting something, anything, into a VM, then let me know.
<GeekOnCoffee> shevy: what's the point?
<shevy> ok!
<rking> shevy: Also, how much of the prior art have you studied?
<shevy> rking pfffffft prior art stinks
<shevy> go on the road and learn, said konfuzius!
<shevy> and take people with you, so you can learn from them too
<deryl> probably to showcase what ruby can do in the vein of OS management (boot scripts, after-boot system-mission-oriented) etc
<shevy> I actually tried to replace /etc/init.d with ruby scripts (the shell scripts there)
<chrisbolton> This is more of a logic question than a ruby questions but I've got an array of words, which I am going to loop through with an each block and see if they exist within a paragraph. If the word exists in the paragraph I want it to stop looping. Any ideas?
<rking> shevy: Seen Erlang on Xen? Seen https://github.com/pry/pry/wiki/pry-de#wiki-open-genera ?
<shevy> erlang on xen?
<rking> shevy: OK, so you're thinking about taking an existing thing and refactor it towards Ruby implementations?
<rking> shevy: Yes, it's cool but the site seems to be down.
<Mon_Ouie> chrisbolton: See Enumerable#find
<shevy> hmm no... I actually dont have one unchangable idea... on the other hand, I dont have a very clear vision either :(
<shevy> hmmmm
<wmoxam> shevy: it's not a stretch to write system tools in Ruby, a lot of them already use Perl
<shevy> perhaps I should learn erlang
lggr has quit [Ping timeout: 248 seconds]
<shevy> yeah wmoxam
<wmoxam> but there isn't a big advantage to doing so
<wmoxam> just like there isn't a big advantage to writing a Ports system in Ruby.
brianpWins has joined #ruby
<chrisbolton> Mon_Ouie: Do you know if there is an equivalent in CoffeeScript?
rburton- has quit [Quit: Linkinus - http://linkinus.com]
kirun has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
<shevy> in what language is Ports written? shell scripts?
<wmoxam> shevy: depends on the system ;)
<wmoxam> shevy: OpenBSD ports is written in Perl
<shevy> aha
<wmoxam> FreeBSD ports is in C I think
philcrissman has quit [Remote host closed the connection]
mark_locklear has joined #ruby
crankycoder has quit [Quit: leaving]
<wmoxam> shevy: Macports is written in tcl
<shevy> ack
lggr has joined #ruby
reset has joined #ruby
crankycoder has joined #ruby
<wmoxam> to be accurate, it's the package tools that are written in these languages.
jso has quit []
<wmoxam> in the BSDs at least the builds are all via make
<reactormonk> chrisbolton: javascript?
eikko has quit [Ping timeout: 252 seconds]
<chrisbolton> reactormonk: javascript will work I can refactor to coffee script.
willclark_ has joined #ruby
willclark has quit [Read error: Connection reset by peer]
<reactormonk> chrisbolton: I'd rather not use classes of coffeescript...
jlogsdon has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
<chrisbolton> reactormonk: Okay javascript then...
TheNumb has quit [Ping timeout: 276 seconds]
<reactormonk> chrisbolton: nah, coffeescript is fine.
<reactormonk> it polishes some of the edges of JS
<chrisbolton> reactormonk: I like it.
<chrisbolton> Especially for someone new like myself.
xkx has quit [Ping timeout: 240 seconds]
JarJar has joined #ruby
manuelitox_ has quit [Read error: Connection reset by peer]
eignerchris has quit [Remote host closed the connection]
manuelitox_ has joined #ruby
philcrissman has joined #ruby
<reactormonk> chrisbolton: learn javascript nontheless.
<chrisbolton> reactormonk: Any ideas on an alternative to Ruby's Enumerable#find method?
<chrisbolton> reactormonk: I plan on it.
<reactormonk> chrisbolton: underscore - but it does not support custom objects
nonotza has joined #ruby
lggr has joined #ruby
<chrisbolton> reactormonk: I wasn't aware.
lggr has quit [Ping timeout: 264 seconds]
cascalheira has quit [Quit: Leaving...]
nateberkopec has joined #ruby
v0n has joined #ruby
DracoDan has quit [Ping timeout: 265 seconds]
Coolhand has quit [Remote host closed the connection]
DracoDan has joined #ruby
tPl0ch has joined #ruby
tPl0ch has quit [Client Quit]
lggr has joined #ruby
the_jeebster1 has joined #ruby
nicoulaj has joined #ruby
the_jeebster has quit [Ping timeout: 245 seconds]
araujo has quit [Remote host closed the connection]
adambeynon has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
dmiller has quit [Ping timeout: 246 seconds]
slicslak has joined #ruby
dmiller has joined #ruby
jenrzzz_ has joined #ruby
jrajav has joined #ruby
Neomex has quit [Quit: Neomex]
jenrzzz has quit [Ping timeout: 252 seconds]
arubin has quit [Quit: arubin]
lggr has joined #ruby
hoelzro|away is now known as hoelzro
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
theRoUS_ has quit [Ping timeout: 244 seconds]
Chryson has joined #ruby
heisenmink has quit [Remote host closed the connection]
futilegames has quit [Read error: Connection reset by peer]
lggr has quit [Ping timeout: 265 seconds]
futilegames has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
ayawaska has quit []
emmanuelux has joined #ruby
lggr has joined #ruby
schaerli has joined #ruby
adambeynon has quit [Quit: Computer has gone to sleep.]
arubin has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
forlan has quit [Remote host closed the connection]
arietis has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
adambeynon has joined #ruby
WhereIsMySpoon has quit [Changing host]
WhereIsMySpoon has joined #ruby
lggr has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
lggr has quit [Ping timeout: 256 seconds]
Guest14722 is now known as ged
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
lggr has joined #ruby
chrxn has joined #ruby
dpk has joined #ruby
A124 has joined #ruby
Xeago has joined #ruby
CodeFriar has joined #ruby
Mon_Ouie has quit [Ping timeout: 264 seconds]
jbohn has quit [Read error: Connection reset by peer]
jjbohn has joined #ruby
Guedes is now known as Guedes_out
lggr has quit [Ping timeout: 245 seconds]
Criztian has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
JohnBat26 has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
lggr has joined #ruby
diegoviola has quit [Ping timeout: 245 seconds]
rippa has quit [Ping timeout: 240 seconds]
iocor has quit [Quit: Computer has gone to sleep.]
philcrissman has joined #ruby
mattp_ has quit [Ping timeout: 246 seconds]
snuglepuss has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
arubin has quit [Quit: arubin]
lamba_ is now known as lamba
lamba has quit [Changing host]
lamba has joined #ruby
GoHuyGo has quit [Quit: Leaving]
joelsbeard has joined #ruby
slux has joined #ruby
krawchyk has quit [Remote host closed the connection]
lggr has joined #ruby
k0m has joined #ruby
answer_42 has quit [Quit: WeeChat 0.3.8]
slux has quit [Remote host closed the connection]
slux has joined #ruby
robertotauille has quit [Quit: Linkinus - http://linkinus.com]
scx has quit [Ping timeout: 256 seconds]
tvw has joined #ruby
arubin has joined #ruby
eignerchris has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
hoelzro is now known as hoelzro|away
<lessless> why after sign_in() @current_user is nill in signed_in() https://gist.github.com/3784202 ?
eldariof has quit []
jso has joined #ruby
etherdev has joined #ruby
xkx has joined #ruby
lggr has joined #ruby
mercwithamouth has quit [Ping timeout: 264 seconds]
<canton7> lessless, is that module being included somewhere?
obryan has joined #ruby
<k0m> in sign_in cookies[:ussr] = user.id ussr supposed to be user?
<RubyPanther> lessless: @current_user ||= Player.find(cookies[:user_id]) if cookies[:user_id] # if cookies[:user_id] is false then the @current_user value doesn't get returned. You golfed it into the rough. :)
<k0m> or user_id
lggr has quit [Ping timeout: 256 seconds]
mercwithamouth has joined #ruby
<canton7> k0m, I suspect it's supposed to be user_id :P
<lessless> rofl, cookie[:user_id] :D
<lessless> i mean cookie[:ussr]
<k0m> so it is supposed to be ussr?
<lessless> no, :user_id
<k0m> ah okay :p makes more sense
gvz has quit [Quit: leaving]
jrist is now known as jrist-afk
bluOxigen has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
Tearan has joined #ruby
peneconleche is now known as peneconleche|awa
mattp_ has joined #ruby
tvw has quit [Ping timeout: 264 seconds]
chimkan_ has quit [Quit: chimkan_]
jlogsdon_ has joined #ruby
joelsbeard has quit [Ping timeout: 252 seconds]
lggr has quit [Ping timeout: 248 seconds]
alvaro_o has quit [Quit: Ex-Chat]
tvw has joined #ruby
sailias1 has quit [Quit: Leaving.]
<lessless> RubyPanther, but cookies[:user_id] actually equals user id
geekbri has quit [Remote host closed the connection]
jlogsdon has quit [Ping timeout: 245 seconds]
<canton7> lessless, you're missing the point?
<lessless> canton7, yeah
fantazo has joined #ruby
reset has quit [Read error: Operation timed out]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<lessless> i think that if i set @current_user=user in sign_in method, than @current_user will be initialized in signed_in? and not null
<canton7> ..unless, cookies[:user_id] is *always* set when @current_user is set
lggr has joined #ruby
workmad3 has joined #ruby
iocor has joined #ruby
<RubyPanther> lessless it might, if it is set. If it isn't set, you hit the bug. It is a bug. Something doesn't work and has known bugs, okay, it has known bugs. Maybe it also has unknown bugs. Why bother looking for unknown bugs before fixing the known bugs?
jasonkuhrt has quit [Quit: Leaving...]
qubit has left #ruby [#ruby]
obryan has quit [Remote host closed the connection]
<canton7> lessless, you probabl want to explicitely return @current_user from the current_user method
tgraham is now known as tgraham|away
tgraham|away is now known as tgraham
macmartine has joined #ruby
<lessless> canton7, look, please at this code - https://gist.github.com/3784328 , should it work?
cody-- has joined #ruby
justinmcp has joined #ruby
<canton7> lessless, depends what you want to do. You've cut out a lot of functionality
CodeFriar has quit [Quit: Leaving...]
slux has quit [Remote host closed the connection]
<lessless> RubyPanther, what can I do... it got all my attention ;)
tvw has quit [Ping timeout: 252 seconds]
willclark_ has quit [Quit: willclark_]
CodeFriar has joined #ruby
thillux has joined #ruby
lggr has quit [Ping timeout: 252 seconds]
<lessless> canton7, The whole purpose of this is to maintain sessions - user may login, act according to his role, and logout
tgraham has quit [Quit: Leaving...]
tgraham has joined #ruby
thillux has quit [Client Quit]
<lessless> set cookie on successful authorization, check on demand if is it authenticated user and delete cookie on logout or after session completes (browser close)
thillux has joined #ruby
bbttxu has quit [Quit: bbttxu]
lggr has joined #ruby
thillux has quit [Remote host closed the connection]
thillux has joined #ruby
thillux has quit [Remote host closed the connection]
slux has joined #ruby
mneorr_ has joined #ruby
vaclavt has quit [Quit: vaclavt]
chrisja has quit [Quit: leaving]
ZubKonst has joined #ruby
<canton7> lessless, I'm off in a sec, but https://gist.github.com/1696927 might be useful as a source of inspiration)
asteve has quit []
mneorr has quit [Ping timeout: 256 seconds]
murtas has joined #ruby
<murtas> Hi
noxoc has joined #ruby
joshman_ has quit [Remote host closed the connection]
<chiel> this will probably sound really stupid
joshman_ has joined #ruby
<chiel> but, how do you request a url in ruby?
<shevy> what means "request"
<shevy> you can open it via open-uri, open("url here")
<workmad3> chiel: depends a lot on what level of control you need
lggr has quit [Ping timeout: 256 seconds]
<chiel> workmad3: just want to read the contents of a url (communicating with an api)
mark_locklear has quit [Remote host closed the connection]
<chiel> shevy: thanks, will have a read. :)
jamjam has joined #ruby
<workmad3> chiel: well, open-uri is probably good for that, but you don't get much control over handling errors, HTTP method, content type, etc :)
Hanmac has joined #ruby
<lessless> canton7, he's using session hash O.O
<canton7> hmm?
<workmad3> chiel: at the other end of the spectrum is net/http, which has all of that but is really nasty
<chiel> workmad3: hmm, think i will stick with open-uri for now then :)
<workmad3> chiel: and there are many wrappers around net/http that give you nicer interfaces for certain styles. My particular poison is normally httparty :)
lledet_ has joined #ruby
<chiel> workmad3: it gets a +1 for the name alone. :D
lggr has joined #ruby
<canton7> lessless, probably a very bad idea to store a user ID in a cookie. Means the user can edit it to be whatever they want
<canton7> (unless some sort of signing system is in place)
<chiel> workmad3: what is it that makes you choose that gem (other than the awesome name :p)
statarb3 has quit [Ping timeout: 246 seconds]
<workmad3> chiel: it gives a nice balance between nice, clean code and control over how the HTTP request is made
<lessless> canton7, the cookie value is encrypted and according to rails security can't be forged
<canton7> lessless, aha fair play. I'm not a rails user
justinmcp has quit [Remote host closed the connection]
<canton7> and authinabox was written for sinatra, as you can see
<canton7> anyway, afk
k0m has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<chiel> workmad3: cool. well, i'll use that then. :)
lledet has quit [Ping timeout: 240 seconds]
lledet_ is now known as lledet
justinmcp has joined #ruby
Guest64548 has quit [Quit: Guest64548]
lledet_ has joined #ruby
bananagram has joined #ruby
diegoviola has joined #ruby
justinmcp has quit [Remote host closed the connection]
<workmad3> lessless: it's annoying responding in two channels to you, but as it's relevant here... 'cookies[:whatever] = value' is *not* secure
<workmad3> lessless: it can be read and altered by the user
cody-- has quit [Quit: goodbye]
<workmad3> lessless: you'd need to use 'cookies.signed[:whatever]' to set a cookie that is signed, meaning that it can be read but alterations are detectable
justinmcp has joined #ruby
gfontenot has quit []
<workmad3> lessless: incidentally, that is made clear in the doc page that *you* linked to in #rubyonrails :P
adamkittelson has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
justinmcp has quit [Remote host closed the connection]
<workmad3> canton7: if you're around, ^^ also for you so you don't have rails misconceptions floating around ;)
lggr has quit [Ping timeout: 244 seconds]
lledet has quit [Ping timeout: 246 seconds]
lledet_ is now known as lledet
pettsson has joined #ruby
reashlin has quit [Read error: No route to host]
Xeago has joined #ruby
alexwh has left #ruby [#ruby]
und3f has quit [Quit: Leaving.]
<lessless> workmad3, hmm, inspect those cookie it is encrypted, thanks for pointing this out, i'll check more
seme has quit [Ping timeout: 246 seconds]
slux has quit [Remote host closed the connection]
nwest has quit [Quit: Computer has gone to sleep.]
thillux has joined #ruby
lggr has joined #ruby
cascalheira has joined #ruby
hadees has quit [Quit: hadees]
paulovittor23 has quit [Ping timeout: 244 seconds]
BrokenCog has quit [Quit: leaving]
A124 has quit [Read error: Connection reset by peer]
GoHuyGo has joined #ruby
yalue has quit [Read error: Connection reset by peer]
<workmad3> lessless: are you confusing base64 encoded for encryption?
<lessless> this is how it's content look like: BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTUwMTA1NTRkNzBiZTIzNzg4ZTVlOGEzNmVmMDQzOTQ1BjsAVEkiEF9jc3JmX3Rva2VuBjsARkkiMUkwRjBvL1QzbC9TT1U3ODR0Yk5EQW1nOWtrV3h3TEExcHFqYXVoNzhmNlE9BjsARg%3D%3D--89048ecaec7908394bb6162765fb3c75ef0a2985
<lessless> not looks like base64 to me
<workmad3> lessless: what's the name of that cookie though?
<lessless> _tt_session
<workmad3> lessless: yeah, that's not the cookie you're setting
<workmad3> lessless: that's the session cookie that rails creates automatically
<workmad3> lessless: which *is* signed
dmiller has quit [Remote host closed the connection]
frogprince_mac has quit [Quit: Leaving...]
jrajav has quit []
mmitchell has quit [Remote host closed the connection]
s0ber has quit [Read error: Connection reset by peer]
A124 has joined #ruby
lggr has quit [Ping timeout: 244 seconds]
carloslopes has quit [Quit: Leaving.]
s0ber has joined #ruby
jlogsdon_ has quit [Remote host closed the connection]
jlogsdon has joined #ruby
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
riley526 has joined #ruby
shiki has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
ph^ has joined #ruby
<lessless> okay, but still, why @current_user equal to nill although it supposed to be initialized?
haxrbyte has joined #ruby
lggr has joined #ruby
dpk has joined #ruby
A124 has left #ruby [#ruby]
elaptics`away is now known as elaptics
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
joshman_ has quit [Ping timeout: 265 seconds]
ltsstar has quit [Quit: ltsstar]
jenrzzz has joined #ruby
jjbohn has quit [Quit: Leaving...]
JarJar has quit [Quit: Leaving]
mbk has quit [Read error: Connection reset by peer]
tekacs has quit [Quit: Disappearing... *poof*]
peneconleche|awa has quit [Ping timeout: 256 seconds]
tekacs has joined #ruby
Xeago has quit [Remote host closed the connection]
murtas has quit [Quit: leaving]
linoj_ has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
internet_user has quit [Remote host closed the connection]
dpk has quit [Quit: Asleep at the keyboard.]
ph^ has quit [Ping timeout: 264 seconds]
haxrbyte has quit [Read error: Connection reset by peer]
linoj has quit [Read error: Operation timed out]
lggr has joined #ruby
schaerli has quit [Remote host closed the connection]
linoj_ has quit [Ping timeout: 248 seconds]
haxrbyte has joined #ruby
triptec has quit [Read error: Connection reset by peer]
triptec has joined #ruby
haxrbyte_ has joined #ruby
Tearan has quit [Quit: Sleepy Badger....]
shobhitg has joined #ruby
daniel_- has quit [Ping timeout: 265 seconds]
tommyvyo_ has joined #ruby
manuelitox_ has quit [Ping timeout: 264 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
headius has joined #ruby
lledet_ has joined #ruby
lggr has quit [Ping timeout: 248 seconds]
haxrbyte has quit [Ping timeout: 256 seconds]
xyzodiac has joined #ruby
daniel_- has joined #ruby
lledet__ has joined #ruby
Coolhand has joined #ruby
mrdodo has joined #ruby
lggr has joined #ruby
<mrdodo> is there an opposite of abs? meaning it would make an integer always negative
hiroyuki has quit [Ping timeout: 245 seconds]
stepnem has quit [Ping timeout: 264 seconds]
slicslak has quit [Read error: Operation timed out]
adkron has joined #ruby
xyzodiac has quit [Client Quit]
<blazes816> -(-1.abs)
<blazes816> generally: -(my_var.abs)
lledet has quit [Ping timeout: 260 seconds]
lledet__ is now known as lledet
<mrdodo> blazes816: thats what i was thinking, i just wasn't sure if there was already a method that returned it
timonv has quit [Remote host closed the connection]
<mrdodo> blazes816: thanks
lledet_ has quit [Ping timeout: 264 seconds]
slicslak has joined #ruby
<Hanmac> look i found this: ~(nr).abs + 1
RegEchse has joined #ruby
alvaro_o has joined #ruby
lggr has quit [Ping timeout: 256 seconds]
Jonah11_ has joined #ruby
thone_ has joined #ruby
dmiller has joined #ruby
cpruitt has joined #ruby
<Jonah11_> is there an easy way to parse an html <table> so that it's cell data goes into a nested ruby array, with each inner array representing one row's data?
hiroyuki has joined #ruby
lggr has joined #ruby
Guedes0 has joined #ruby
hadees has joined #ruby
thone has quit [Ping timeout: 240 seconds]
mensvaga has quit [Quit: Page closed]
chimkan_ has joined #ruby
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
futilegames has quit [Quit: futilegames]
Guedes0 has quit [Client Quit]
Speed has left #ruby ["Leaving channel."]
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
peneconleche has joined #ruby
noxoc has quit [Quit: Leaving.]
<blazes816> Jonah11_: nokogiri
nicoulaj has quit [Remote host closed the connection]
tommyvyo_ has joined #ruby
lggr has quit [Ping timeout: 240 seconds]
iamjarvo has quit [Ping timeout: 246 seconds]
ph^ has joined #ruby
<Hanmac> shevy i found a way to avoid "-" in my code :D
workmad3 has quit [Ping timeout: 248 seconds]
lggr has joined #ruby
<shevy> hmm
<shevy> 5 - 5
<shevy> how
tvw has joined #ruby
iocor is now known as samphippen
lessless has quit [Remote host closed the connection]
alanp_ has joined #ruby
<Hanmac> 5 + ~5 + 1
alanp has quit [Ping timeout: 256 seconds]
<bperry> does that equal 1?
AlbireoX has quit [Read error: Connection reset by peer]
<Hanmac> no ~5 == -6
<bperry> interesting
AlbireoX has joined #ruby
<bperry> so ~x is x-(x*2)-1
pettsson has quit [Remote host closed the connection]
<bperry> is that right or did I misintepret what it is doing
wpaulson has joined #ruby
nightfalcon has quit [Remote host closed the connection]
<Hanmac> hm yeah ~x is the bitshift
dmiller has quit [Remote host closed the connection]
<blazes816> it doesn't shift, it's just complements, I beleive
<Spooner> bperry : It is a side effect of using twos compliment to represent integers. ~ is binary not.
tvw has quit [Remote host closed the connection]
tvw has joined #ruby
<Hanmac> no its not the shift its the flop
lggr has quit [Ping timeout: 245 seconds]
<Jonah11_> GoHuyGo, ty for the link
<bperry> I see
awarner has quit [Remote host closed the connection]
<Spooner> http://en.wikipedia.org/wiki/Two's_complement
jlogsdon has quit [Ping timeout: 248 seconds]
skogis has quit [Quit: bbl]
ph^ has quit [Ping timeout: 246 seconds]
lggr has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
tvw has quit [Remote host closed the connection]
tvw has joined #ruby
bobbbo has quit [Quit: bobbbo]
icooba has quit [Ping timeout: 252 seconds]
<Spooner> 00000101 (5) applying ~ (bit inversion) becomes 11111010 (-6) then adding 1 => 11111011 (-5) [I think; been forever since I did this shit]
GoHuyGo has quit [Quit: Leaving]
ken_barber has joined #ruby
diegoviola has quit [Read error: Connection reset by peer]
<Spooner> We use Ruby so we don't have to worry about this sort of crap any more.
* Spooner slaps Hanmac for forcing him to think again.
GoGoGarrett has quit [Remote host closed the connection]
tgraham has quit [Quit: Leaving...]
lggr has quit [Ping timeout: 246 seconds]
<blazes816> if @user.permissions & 0x400...
dmiller has joined #ruby
<shevy> heeh
<shevy> Spooner, Hanmac writes only such things
<matti> ?
<shevy> there are different activity levels of the brain
<shevy> ---
<shevy> level
<shevy> ---
<shevy> level
<shevy> Hanmac is on the higher level requiring more activity
ckrailo has joined #ruby
ken_barber has quit [Remote host closed the connection]
icooba has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.8]
arubin has quit [Quit: arubin]
lggr has joined #ruby
ken_barber has joined #ruby
ken_barber has quit [Remote host closed the connection]
Jonah11_ has quit [Read error: Connection reset by peer]
thillux_ has joined #ruby
chimkan_ has quit [Quit: chimkan_]
nonotza has quit [Quit: nonotza]
mmitchell has joined #ruby
dpk has joined #ruby
snearch has joined #ruby
lggr has quit [Ping timeout: 246 seconds]
lledet has quit [Quit: lledet]
LouisGB has quit [Ping timeout: 244 seconds]
thillux has quit [Ping timeout: 256 seconds]
stopbit has quit [Quit: Leaving]
c0rn__ has quit [Quit: Computer has gone to sleep.]
tvw has quit [Remote host closed the connection]
mmitchell has quit [Ping timeout: 264 seconds]
Russell^^ has quit [Quit: Russell^^]
tvw has joined #ruby
c0rn__ has joined #ruby
headius has quit [Quit: headius]
cpruitt has quit [Quit: cpruitt]
lggr has joined #ruby
jamjam has quit [Ping timeout: 256 seconds]
Criztian has quit [Remote host closed the connection]
riley526 has quit [Remote host closed the connection]
ij has quit [Ping timeout: 264 seconds]
philcrissman has quit [Remote host closed the connection]
ph^ has joined #ruby
philcrissman has joined #ruby
mmitchell has joined #ruby
josh^ has joined #ruby
mmitchell has quit [Remote host closed the connection]
cakehero has quit [Quit: Leaving...]
XedMada has quit [Quit: XedMada]
lggr has quit [Ping timeout: 256 seconds]
philcrissman has quit [Ping timeout: 244 seconds]
sneakyness_wk has quit [Read error: Connection reset by peer]
manuelitox_ has joined #ruby
sneakyness_wk has joined #ruby
fantazo has quit [Remote host closed the connection]
sneakyness_wk has quit [Read error: Connection reset by peer]
sneakyness__wk has joined #ruby
sneakyness__wk is now known as sneakyness_wk
lggr has joined #ruby
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tvw has quit [Remote host closed the connection]
wuzzzzaah has quit [Remote host closed the connection]
wuzzzzaah has joined #ruby
joofsh has quit [Ping timeout: 246 seconds]
Virunga has joined #ruby
ph^ has quit [Ping timeout: 245 seconds]
tvw has joined #ruby
kirun has quit [Quit: Client exiting]
justinmcp has joined #ruby
haxrbyte_ has quit [Ping timeout: 264 seconds]
lggr has quit [Ping timeout: 256 seconds]
brianpWins has quit [Quit: brianpWins]
lggr has joined #ruby
dagnachewa has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
bier has quit [Read error: Operation timed out]
thillux_ has quit [Remote host closed the connection]
Forevernade has joined #ruby
the_jeebster1 has quit [Quit: Leaving.]
friskd has joined #ruby
sent-hil has quit [Remote host closed the connection]
slicslak has quit [Ping timeout: 265 seconds]
sideshowcoder has quit [Read error: Operation timed out]
rabidpraxis has quit [Remote host closed the connection]
wargasm has joined #ruby
NimeshNeema has quit [Read error: Operation timed out]
jhowarth has quit [Read error: Operation timed out]
kapowaz has quit [Read error: Operation timed out]
caveat- has quit [Read error: Operation timed out]
lggr has quit [Ping timeout: 256 seconds]
GoGoGarrett has joined #ruby
fcoury has quit [Ping timeout: 246 seconds]
JC_SoCal has quit [Ping timeout: 246 seconds]
davidboy has quit [Ping timeout: 246 seconds]
GoGoGarrett has quit [Remote host closed the connection]
nari has joined #ruby
caveat- has joined #ruby
jhowarth has joined #ruby
brianpWins has joined #ruby
kaichanvong has quit [Ping timeout: 245 seconds]
sideshowcoder has joined #ruby
anildigital_work has quit [Ping timeout: 240 seconds]
dkannan has quit [Ping timeout: 252 seconds]
emmanuelux has quit [Quit: emmanuelux]
dkannan has joined #ruby
tvw has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
lggr has joined #ruby
NimeshNeema has joined #ruby
kapowaz has joined #ruby
daniel_- has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
budha has quit []
heftig has quit [Ping timeout: 240 seconds]
lushious has quit [Ping timeout: 252 seconds]
artm has quit [Quit: artm]
wpaulson has quit [Remote host closed the connection]
butblack has joined #ruby
wpaulson has joined #ruby
yakitori has joined #ruby
chrisbolton has quit [Quit: chrisbolton]
lggr has quit [Ping timeout: 256 seconds]
pcarrier_ has joined #ruby
elaptics is now known as elaptics`away
bier has joined #ruby
NimeshNeema has quit [Remote host closed the connection]
dkannan has quit [Remote host closed the connection]
randym has quit [Remote host closed the connection]
kapowaz has quit [Remote host closed the connection]
Spaceghost|cloud has quit [Remote host closed the connection]
dekz has quit [Remote host closed the connection]
jhowarth has quit [Remote host closed the connection]
im0b has quit [Remote host closed the connection]
patricksroberts has quit [Remote host closed the connection]
SeanTAllen has quit [Remote host closed the connection]
notbrent has quit [Read error: Connection reset by peer]
ctevie has quit [Remote host closed the connection]
lectrick has quit [Remote host closed the connection]
octarine has quit [Remote host closed the connection]
rcsheets has quit [Remote host closed the connection]
sr___ has quit [Remote host closed the connection]
[diecast] has quit [Remote host closed the connection]
garndt has quit [Remote host closed the connection]
moeSeth has quit [Remote host closed the connection]
dnyy has quit [Read error: Connection reset by peer]
Left_Turn has joined #ruby
Left_Turn has left #ruby [#ruby]
lggr has joined #ruby
garndt has joined #ruby
wpaulson_ has joined #ruby
lushious has joined #ruby
[diecast] has joined #ruby
rcsheets has joined #ruby
wpaulson_ has quit [Client Quit]
sfim has quit [Remote host closed the connection]
octarine has joined #ruby
wpaulson has quit [Read error: Connection reset by peer]
JC_SoCal has joined #ruby
davidboy has joined #ruby
gabrielrotbart has joined #ruby
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
ph^ has joined #ruby
dekz has joined #ruby
NimeshNeema has joined #ruby
justinmcp has quit [Remote host closed the connection]
lggr has quit [Ping timeout: 256 seconds]
snorkdude has joined #ruby
emanu has joined #ruby
lggr has joined #ruby
Ithrendil has joined #ruby
fcoury has joined #ruby
girasquid has joined #ruby
<girasquid> If I want to figure out the memory usage of a few different blocks - is there a library I can use to track that?
<matti> Not that I know of ;p
patricksroberts has joined #ruby
<Ithrendil> Hi
anildigital_work has joined #ruby
<Ithrendil> I would like to know how to convert a timestamp to a date like wednesday 24th september, how can i do this ?
<matti> Ithrendil: Look at Time.at
<Ithrendil> ok thx matti !
ken_barber has joined #ruby
locriani has quit [Remote host closed the connection]
<matti> ;]
<matti> Ithrendil: You may have to: require 'time'
<Ithrendil> have to do this if i use a framework like padrino ?
<matti> I am not sure what Padrino requires.
<matti> Try it, and if it fails then require time.
lggr has quit [Ping timeout: 246 seconds]
<Ithrendil> yes thank you matti!
ph^ has quit [Ping timeout: 256 seconds]
locriani has joined #ruby
<matti> Works fine
<matti> krzysztof@samsung:~$ ruby -rtime -e 'p Time.at(`date +%s`.strip.to_i)'
<matti> 2012-09-26 00:25:48 +0100
mmitchell has joined #ruby
bananagram has quit [Read error: Connection reset by peer]
<matti> Ithrendil: I mean, this will give you Time object :) You ten call strptime on it ;]
<matti> Ithrendil: You get the idea ;d
bananagram has joined #ruby
<matti> Ops. strftime ;p
rabidpraxis has joined #ruby
<matti> Typo.
mmitchell has quit [Remote host closed the connection]
JC_SoCal has quit [Remote host closed the connection]
davidboy has quit [Remote host closed the connection]
lggr has joined #ruby
thecreators has quit [Quit: thecreators]
xyzodiac has joined #ruby
thecreators has joined #ruby
octarine has quit [Remote host closed the connection]
fcoury has quit [Remote host closed the connection]
rcsheets has quit [Remote host closed the connection]
garndt has quit [Remote host closed the connection]
patricksroberts has quit [Remote host closed the connection]
[diecast] has quit [Remote host closed the connection]
anildigital_work has quit [Write error: Broken pipe]
NimeshNeema has quit [Remote host closed the connection]
butblack has left #ruby [#ruby]
yakitori has quit [Ping timeout: 240 seconds]
DracoDan has quit [Disconnected by services]
wpaulson has joined #ruby
wpaulson has quit [Client Quit]
joelsbeard has joined #ruby
<shevy> hmm
dpk has quit [Quit: Asleep at the keyboard.]
<shevy> how would I find out if ccache was installed or not, from a .rb script?
<shevy> or rather
<shevy> if ccache is available
justinmcp has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
<Ithrendil> actually my date format is : 2012-09-26 00:44:47 +0200
emanu has quit [Ping timeout: 245 seconds]
<Ithrendil> and i just would like to do : 26/09/2012
<shevy> got it. I will parse for "command not found" results
<matti> Ithrendil: strftime
dnyy has joined #ruby
<Ithrendil> ok matti thx
thecreators has quit [Ping timeout: 256 seconds]
<matti> Ithrendil: ruby -rtime -e 'p Time.at(`date +%s`.strip.to_i).strftime("%d/%m/%Y")'
<Virunga> Ithrendil: there's a gem where you give an example of date and he returns dates in that format.
<Virunga> Nice idea.
JC_SoCal has joined #ruby
<Ithrendil> Virunga, what's gem ?*
<matti> Yeah, I guess they are gems.
chimkan has joined #ruby
<matti> Most of them are slow as hell when it goes to date parsing / manipulation.
joofsh has joined #ruby
<matti> Nap time.
<matti> Have a good one lads.
<Ithrendil> matti, it works nice matti
<matti> '
<matti> ;]
freeayu has joined #ruby
lggr has quit [Ping timeout: 264 seconds]
jhowarth has joined #ruby
<Ithrendil> actually i do that : <%= @post.created_at.strftime("le %d/%m/%Y à %H:%M") %>
<Ithrendil> because i'm french xD
ctevie has joined #ruby
ctevie has quit [Changing host]
ctevie has joined #ruby
jhowarth has quit [Remote host closed the connection]
ctevie has quit [Read error: Connection reset by peer]
dnyy has quit [Remote host closed the connection]
falieson has joined #ruby
octarine has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
rabidpraxis has quit [Remote host closed the connection]
<falieson> please help? http://pastebin.com/UWYLP7q5
<falieson> it doesn't like my commas in line 22
lggr has joined #ruby
<shevy> what is the error
BrokenCog has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
rabidpraxis has joined #ruby
[diecast] has joined #ruby
<shevy> insert_new_tweet.execute {status.id}, {status.from_user}, {status.text}, {status.created_at}
<shevy> what is this
<falieson> twitter API
<shevy> no this
<shevy> {status.id}
nari has quit [Ping timeout: 240 seconds]
<shevy> are you sure this is valid ruby code?
<shevy> also, are you sure that you have called the method .execute correctly?
dnyy has joined #ruby
<shevy> you said that it does not like your commas, but it seems to me as if it would even like the {} before significantly less
ctevie has joined #ruby
ctevie has quit [Changing host]
ctevie has joined #ruby
swarley has joined #ruby
rabidpraxis has quit [Remote host closed the connection]
<falieson> shevy, http://twitter.rubyforge.org/ check out the @justinbieber example
<shevy> yes
<shevy> how does this example relate to your code
<shevy> specifically to line 22
friskd_ has joined #ruby
emanu has joined #ruby
<falieson> Twitter.search("to:justinbieber marry me", :rpp => 3, :result_type => "recent").map do |status|
<falieson> "#{status.from_user}: #{status.text}"
<falieson> end
<Ithrendil> falieson, i don't trust in a code written by @justinbieber xD
<shevy> yes I can read it
<falieson> you were asking me what {status.from_user}
<falieson> comes from
<shevy> yes
<shevy> "#{status.from_user}: #{status.text}"
<shevy> vs
<shevy> {status.from_user}
<shevy> do you now see the difference
randym__ has joined #ruby
friskd has quit [Ping timeout: 244 seconds]
friskd_ is now known as friskd
andreyluiz has joined #ruby
<swarley> #{} is interpolation in strings, {} is normal characters
randym__ is now known as randym
<swarley> Non literal strings
ckrailo has quit [Quit: Computer has gone to sleep.]
<falieson> oh, I thought # was douablequote
<shevy> hehe
<falieson> so I don't want the #{} then
<falieson> or rather the {}
lggr has quit [Ping timeout: 264 seconds]
<shevy> if you use {} alone, ruby will think this to be either a hash, or a block
<shevy> hash = {}
justinmcp has quit [Remote host closed the connection]
<shevy> method_call("hi") { CONFIG.keep_backup = true }
andreyluiz has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
<shevy> {status.from_user} <-- ruby is confused
<falieson> thanks for the explanation
dkannan has joined #ruby
<shevy> other way to make a hash quickly:
<shevy> { 'foo' => 'bar' }
<shevy> foo will point to bar (these are two string objects btw)
<falieson> so I have 1 more error
<falieson> as joined #ruby
<falieson> <swarley> #{} is interpolation in
<falieson> bad paste
F1skr has quit [Quit: WeeChat 0.3.8]
mneorr_ has quit [Remote host closed the connection]
<shevy> swarley needs more highlights
<shevy> :D
dagnachewa has quit [Quit: Leaving]
<swarley> XD
jimeh has quit [Ping timeout: 240 seconds]
<swarley> Makes me feel special
mneorr has joined #ruby
<Ithrendil> shevy, you're from austria ?
Averna has joined #ruby
moeSeth has joined #ruby
<falieson> haha
<falieson> error
<falieson> line 27
<falieson> with my rescue
ph^ has joined #ruby
<falieson> syntax error, unexpected keyword_rescue, expecting keyword_end
<falieson> I can't use both?
<falieson> ensure and rescue?
davidboy has joined #ruby
lggr has joined #ruby
<Spooner> falieson : You can. How are you using them?
<falieson> Spooner, http://pastie.org/4800565
ScottNYC has quit [Quit: ScottNYC]
<Spooner> falieson : You use rescue _before_ ensure.
snearch has quit [Quit: Verlassend]
<blazes816> ensure be last
jasonkuhrt has joined #ruby
<falieson> ah
<falieson> ok, thanks =)
tgraham has joined #ruby
<Spooner> Because the ensure block gets run after the rescue block (or instead of it if no exception raised).
<shevy> Ithrendil yeah, vienna
<Ithrendil> okok ^^
kaichanvong has joined #ruby
wuzzzzaah has quit [Quit: wuzzzzaah]
<falieson> sorry to keep bothering ya
justinmcp has joined #ruby
<shevy> I think the only other ruby guys from vienna are rails dudes, and I just can't get myself over to learn rails...
sr___ has joined #ruby
nilg has quit [Ping timeout: 256 seconds]
<shevy> I so rarely seem to need ensure
<falieson> I was just trying to be elegant with my first real script
<falieson> =)
<falieson> for work
<falieson> intern huzzah
ScottNYC has joined #ruby
<null-_> shevy: rails is awesome, I haven't use it though...
<falieson> So, http://pastie.org/4800609 inserts into the database once and then hits the rescue
<falieson> its supposed to loop 10 times
SeanTAllen has joined #ruby
<falieson> "=?
<Spooner> You should probably put the secret stuff in a config file (say yaml), that way the secrets are separate from the code and you don't need to worry about blanking them ;)
im0b has joined #ruby
<falieson> haha, thanks
sneakyness_wk has quit [Quit: you smell bad and you can't read good]
tar_ has joined #ruby
<Spooner> And, if the code is going into a public repos, then you just don't add the .yml file.
mikepack has quit [Remote host closed the connection]
havenn has joined #ruby
<Spooner> But I guess it isn't, so probably not a problem.
lggr has quit [Ping timeout: 246 seconds]