fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
ephemerian has left #ruby [#ruby]
ScottNYC has quit [Quit: ScottNYC]
chare has joined #ruby
mrdodo has quit [Ping timeout: 244 seconds]
flip_digits has quit [Quit: Computer has gone to sleep.]
ScottNYC has joined #ruby
Synthonic has joined #ruby
Synthonic has left #ruby ["Leaving"]
freeayu has joined #ruby
deryl has joined #ruby
dev_ryan_ has quit [Remote host closed the connection]
Progster has quit [Ping timeout: 260 seconds]
CodeFriar has quit [Quit: Leaving...]
qwerxy has quit [Ping timeout: 240 seconds]
Goles has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
elaptics is now known as elaptics`away
SCommette has joined #ruby
SCommette has quit [Client Quit]
Tobsn has quit [Quit: Leaving...]
qwerxy has joined #ruby
havenn_ has quit [Remote host closed the connection]
jarred has joined #ruby
<Veejay> Hi, is there anything risky with Marshaling a hash that looks like this: {:question_1 => 15, :question_2 => 16}
<jarred> Is anyone here familiar with MacRuby?
<Veejay> It never gets any more complicated than that, no deep nestin or objects and whatnot
<Veejay> jarred: #macruby maybe
specialGuest has quit [Ping timeout: 260 seconds]
chessguy has joined #ruby
bowlowni_ has joined #ruby
bowlowni has quit [Read error: Connection reset by peer]
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
s1n4 has quit [Quit: time to fall asleep]
karakedi has joined #ruby
apok has joined #ruby
<bluebie> Veejay: Depends how you marshall it
<bluebie> I'd recommend yaml
<Veejay> With Marshal
<bluebie> the marshalling stuff in ruby can change incompatibly between versions IIRC
<bluebie> so it's alright for cookies but not so much for anything you want to keep around for later
verto is now known as verto|off
<Veejay> Yeah nah it's just some stuff that doesn't matter much
<Veejay> The Ruby version won't change
<Veejay> But thanks for the heads up
<bluebie> I'd still just use yaml anyway - can't hurt
<bluebie> but yeah, go for it!
chessguy has quit [Remote host closed the connection]
banisterfiend has quit [Ping timeout: 245 seconds]
luckyruby has joined #ruby
micha_ has quit [Ping timeout: 276 seconds]
Y_Ichiro has joined #ruby
jgrevich_ has joined #ruby
jgrevich has quit [Ping timeout: 252 seconds]
jgrevich_ is now known as jgrevich
apeiros_ has joined #ruby
apeiros_ has quit [Ping timeout: 240 seconds]
emmanuelux has joined #ruby
ZachBeta has joined #ruby
Jay_Levitt has quit [Quit: Leaving...]
RegEchse has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
lianoshana_ has quit [Quit: This computer has gone to sleep]
mohits has quit [Read error: Connection reset by peer]
qwerxy has quit [Quit: offski]
jonathan_ has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
chare has quit [Ping timeout: 276 seconds]
mrdodo has joined #ruby
Jay_Levitt has joined #ruby
liluo has quit [Remote host closed the connection]
TorpedoSkyline has quit [Changing host]
TorpedoSkyline has joined #ruby
flaviodesousa has joined #ruby
justsee has joined #ruby
ScottNYC has quit [Quit: ScottNYC]
justsee has quit [Client Quit]
jonathanwallace has quit [Ping timeout: 268 seconds]
luckyruby has quit [Remote host closed the connection]
aantix has quit [Quit: aantix]
havenn has quit [Remote host closed the connection]
insecurlex has joined #ruby
havenn has joined #ruby
tayy_ has quit [Remote host closed the connection]
mneorr has joined #ruby
iori has joined #ruby
seanstickle has joined #ruby
banisterfiend has joined #ruby
sebicas has joined #ruby
freeayu has quit [Ping timeout: 244 seconds]
luckyruby has joined #ruby
defendguin1 has joined #ruby
<defendguin1> anyone know a good way to cleanup unused gems in rvm?
mneorr1 has joined #ruby
mneorr has quit [Ping timeout: 265 seconds]
TandemAdam has quit [Quit: Leaving]
liluo has joined #ruby
freeayu has joined #ruby
jenrzzz has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
fris has joined #ruby
azm has joined #ruby
Bosma has joined #ruby
S1kx has quit [Read error: Connection reset by peer]
blazes816 has joined #ruby
blazes816 has left #ruby [#ruby]
azm has quit [Ping timeout: 246 seconds]
<bperry> defendguin1: how do you know if it is being used?
niklasb has quit [Ping timeout: 244 seconds]
<bperry> think of it from gems perspective
mneorr1 has quit [Ping timeout: 265 seconds]
<defendguin1> yeah i know
<defendguin1> apt seems to know when a lib is being used and when it can be removed without hurting anything
<bperry> that is because dpkg registers every application
terrellt has joined #ruby
<terrellt> Is there a hash shortcut for "output if it exists"?
busybox42 has joined #ruby
blazes816 has joined #ruby
lledet has joined #ruby
justsee has joined #ruby
kuzushi has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
apok has quit [Ping timeout: 244 seconds]
gmci has quit [Quit: Computer has gone to sleep.]
gmci has joined #ruby
mohits has joined #ruby
jarred has quit [Quit: jarred]
mohits has quit [Changing host]
mohits has joined #ruby
jarred has joined #ruby
apok has joined #ruby
jarred has quit [Client Quit]
wvms has quit [Quit: wvms]
zhutingting1 has joined #ruby
freeayu has joined #ruby
pingfloyd has quit [Ping timeout: 268 seconds]
tnk1 has quit [Ping timeout: 268 seconds]
graspee_ has joined #ruby
graspee has quit [Ping timeout: 265 seconds]
pingfloyd has joined #ruby
yoklov has quit [Quit: computer sleeping]
QKO has joined #ruby
digitalcakestudi has joined #ruby
zhutingting1 has quit [Ping timeout: 252 seconds]
luckyruby has quit [Remote host closed the connection]
QKO_ has quit [Ping timeout: 272 seconds]
digitalcakestudi has quit [Quit: Leaving.]
digitalcakestud1 has joined #ruby
AnarchoTroll has quit [Quit: Leaving]
havenn has quit [Remote host closed the connection]
tnk1 has joined #ruby
k_89 has quit [Ping timeout: 272 seconds]
gen0cide_ has joined #ruby
perryh_away is now known as perryh
emmanuelux has quit [Ping timeout: 265 seconds]
yakko has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
igotnolegs has joined #ruby
radic_ is now known as radic
digitalcakestud1 has quit [Quit: Leaving.]
justsee has quit [Quit: Linkinus - http://linkinus.com]
zhutingting has joined #ruby
digitalcakestudi has joined #ruby
zhutingting has left #ruby [#ruby]
azm has joined #ruby
RegEchse has quit [Quit: <3 WeeChat (v0.3.9-dev)]
nixmaniack has joined #ruby
n1x has quit [Ping timeout: 246 seconds]
jasonLaster has quit [Remote host closed the connection]
jasonLaster has joined #ruby
digitalcakestudi has quit [Read error: Connection reset by peer]
digitalcakestudi has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
jasonLaster has quit [Read error: Connection reset by peer]
jasonLaster has joined #ruby
digitalcakestudi has quit [Read error: Connection reset by peer]
locriani has quit [Remote host closed the connection]
digitalcakestudi has joined #ruby
cousine has joined #ruby
nixmaniack has quit [Ping timeout: 276 seconds]
locriani has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
uris has joined #ruby
digitalcakestudi has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 265 seconds]
element8 has joined #ruby
element8 has left #ruby [#ruby]
digitalcakestudi has joined #ruby
digitalcakestudi has quit [Read error: Connection reset by peer]
savage- has joined #ruby
kyb3r has joined #ruby
freeayu__ has joined #ruby
freeayu has quit [Ping timeout: 272 seconds]
td123 has joined #ruby
seanstickle has quit [Quit: seanstickle]
digitalcakestudi has joined #ruby
digitalcakestudi has quit [Client Quit]
digitalcakestudi has joined #ruby
v0n has joined #ruby
infinitiguy has joined #ruby
blazes816 has quit [Quit: This computer has gone to sleep]
n_blownapart has joined #ruby
infinitiguy has quit [Quit: Leaving.]
<n_blownapart> hi . so apparently ruby allocates memory for a variable even when the code isn't executed. I called object_id on this variable out of curiosity and it gave me 4. why was the object_id number a single digit? thanks: http://pastie.org/4553519
<banisterfiend> n_blownapart: it just means it's nil
<banisterfiend> 4 => nil
<n_blownapart> banisterfiend: thanks. you mean nil's object_id is always 4?
<banisterfiend> n_blownapart: Yeah
ananthakumaran has joined #ruby
yoklov has joined #ruby
<n_blownapart> banisterfiend: interesting thanks man.
<bluebie> it's specified as 4 somewhere? I'd be surprised if the ruby devs went to any effort to maintain that in future versions O_o
<banisterfiend> on MRI anyway
<banisterfiend> i dont think there's any guarantee about what the object_id will be, just that it's constant for a given program
<bluebie> huh
<bluebie> false is 0, true is 2
<bluebie> I wonder what is 1 and 3
pac1 has quit [Quit: I got it one line of code at a time]
<bluebie> or maybe they take up two bytes in memory and those are relative pointers to some memory somewhere?
<rking> There are more patterns to the id's. Numbers are 1+2*h
<banisterfiend> bluebie: you can find out, with: ObjectSpace._id2ref(obj)
<banisterfiend> bluebie: you can find out, with: ObjectSpace._id2ref(id)
savage- has quit [Remote host closed the connection]
<bluebie> woah
<bluebie> 3 #=> 1
<banisterfiend> it's the cloest ruby gets to a pointer deref.
<rking> bluebie: Right. Because 1+1*2 == 3
<bluebie> that's a wacky system
<bluebie> I like it
<rking> I forget what leads to negative object_id's.
<bluebie> _id2ref(-3) #=> -2
<bluebie> negative object ids! crazy!
k_89 has joined #ruby
T-Gunn has joined #ruby
<banisterfiend> well they're only negative in 2's complement, but in actual VALUE is an unsigned long
<bluebie> orly?
<rking> I wonder what optimizations are built on those object_id assumptions.
<banisterfiend> rking: in pry type: show-source object_id
<banisterfiend> it'll tell u what's the dilly
<n_blownapart> bluebie: so wait to the layman, what does ObjectSpace._id2ref(id) do?
SCommette has joined #ruby
<rking> banisterfiend: No.
<rking> I type "$ object_id"
<bluebie> n_blownapart: It gives you the object which goes with a numeric object_id, so ObjectSpace._id2ref(false) == false.object_id
<rking> But yeah, that's cool. =)
<bluebie> er sorry
t9225 has quit [Remote host closed the connection]
<bluebie> other way around
drago757 has quit [Quit: drago757]
<bluebie> ObjectSpace._id2ref(false.object_id) #=> false
\13k has quit [Quit: gg]
t47227 has joined #ruby
<bluebie> too much foodcoma for me to be logical
banisterfiend has quit [Remote host closed the connection]
<n_blownapart> so in the end nil is not always 4, only within a single program?
<bluebie> so ruby stores immediate numeric integers in the object id, then switches to bignum class instnaces if it overflows?
<bluebie> what about floats? are they always objects?
flaviodesousa has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
banisterfiend has joined #ruby
mohits has quit [Read error: Connection reset by peer]
<bluebie> n_blownapart: It's always 4 in MRI (the normal version of ruby almost everyone uses)
<bperry> ruby is arbitrary precision
<bluebie> but it's an implementation detail - you shouldn't depend on it being that or your programs might stop working when everyone updates to ruby 3.0 or whatever
pricees has joined #ruby
n1x has joined #ruby
<bluebie> that said, nil.object_id #=> 4 in macruby too :>
<n_blownapart> bluebie: et al but most objects have id's that are what....6 or 7 characters?
<bluebie> object id's are numbers, not strings. They don't have any characters
<bperry> 1.9.3p194 :004 > (8.93939398473897498379483728943721984739214 + 3472984789237492317489327198473298174923174892310).object_id => 13795720
<bperry> 1.9.3p194 :005 >
<n_blownapart> bperry thats funny I like it.
<bperry> that technically returns a float btw
<bperry> which is backwards from how C does things
<bperry> float + int = int
<n_blownapart> bluebie: whats this about negative id numbers?
Spooner has quit [Ping timeout: 276 seconds]
<bluebie> n_blownapart: The way ruby stores objects in to variables is by putting the objects in to memory somewhere, then setting the variable to a number which corrosponds to the object's location in your computer's RAM somehow
macmartine has joined #ruby
<n_blownapart> bluebie: so in RAM some locations are ascribed negative numbers?
banisterfiend has quit [Ping timeout: 240 seconds]
<bluebie> n_blownapart: To make things faster though, if you're just using numbers it uses this tricky maths to store the numbers directly in the variables, so it doesn't need to reserve lots of memory for a lot of objects which are just representing numbers
<bluebie> no, the numbers are actually binary addresses - it's just that the numbers are being understood using two's compliment or something like that
<bluebie> it's a way of storing negative numbers as binary
<bluebie> so certain addresses display as negative numbers when you play around in ruby
<n_blownapart> bluebie: but not arbitrary?
freeayu__ has quit [Ping timeout: 246 seconds]
eko has quit [Read error: Connection reset by peer]
[eko] has joined #ruby
<bluebie> sort of
philips_ has quit [Excess Flood]
<bluebie> if it's not numbers or special things like nil, false, true, or undefined, then everything else is an object
digitalcakestudi has quit [Ping timeout: 245 seconds]
zeromodulus has quit [Read error: Connection reset by peer]
<bluebie> so the 'numbers' are just a numeric representation of the binary address ruby is using to find those objects in memory
zeromodulus has joined #ruby
<bperry> can you prove this with a quick one liner?
<bluebie> how ruby and the particular operating system ruby is running on decide to fit the objects in to memory could be different from computer to computer
<bperry> I believe you
pingfloyd has quit [Ping timeout: 248 seconds]
macer1 has quit [Quit: sleep...:<]
<bluebie> bperry: What do you mean? prove which idea?
<bperry> memory address holds value
* terrellt blinks
hemanth has joined #ruby
<bperry> unless I am misunderstanding what you are saying
<bluebie> prove that numbers are stored directly in to object id's?
<bluebie> as immediate values?
<bperry> yes, i can't replicate this
<bluebie> ObjectSpace._id2ref(-61) #=> -31
<bperry> (8.9343).object_id and (89343).object_id return object_id's that re not the value
<bperry> hmm
<bluebie> that's true in MRI 1.9.3
<bperry> I see
philips_ has joined #ruby
<Banistergalaxy> Floats are different
<Banistergalaxy> Floats are allocated
macer__ has quit [Read error: Connection reset by peer]
<n_blownapart> bluebie: my friend was trying to explain how memory changes location when a prog. changes scope, say for the var. x. sorry I'm a noob but that was fascinating. even if x = 100 through all the various scopes of a prog. the memory shifts for milliseconds ever so slightly ...am I correct?
<bluebie> but if you run that in macruby you'll get a range error, and if you run -62 in macruby it segfaults! fun!
<Banistergalaxy> On the heap
answer_42 has joined #ruby
vitor-br has quit [Quit: Saindo]
<bluebie> ObjectSpace._id2ref(61) #=> 15 in macruby though and 30 in MRI 1.9.3!
<bluebie> n_blownapart: No not really
<bluebie> Objects tend to stay in the same spot
<Banistergalaxy> Bperry floats are not immediates, only fixnums
<bluebie> 100 is a special case - as it's an integer number and it's not a bignum, it can just go right in the variable itself
<bluebie> but if it was something like, say "hello"
<bperry> Banistergalaxy: I don't get what you mean
<bluebie> then it's object_id would be the same regardless of scope, if you're talking about the same object
<Banistergalaxy> Bperry what don't you understands
freeayu__ has joined #ruby
<bluebie> on the other hand, "hello".object_id == "hello.object_id #=> false - those two strings are different objects even though their characters are the same, n_blownapart
<bperry> the immediate part
<bluebie> so sometimes it can seem like similar objects are going in to different spots in memory
hero has quit [Quit: leaving]
<bluebie> n_blownapart: All of this stuff is pretty messy details which languages like ruby try to keep you from needing to think about. Languages like C (which matz's ruby is written in) use 'pointers' extensively though - a pointer is a variable which contains the address of something in memory somewhere else, much like ruby variables, but without these special cases where it can have immediate numbers and false and true and all of that
jarred has joined #ruby
<bluebie> C can be fun to play with if you're at all curious
banisterfiend has joined #ruby
<bluebie> n_blownapart: If you're curious about learning C, there's a course I did at uni which was really fun, and the videos are online at http://www.youtube.com/playlist?list=PL6B940F08B9773B9F - it goes in to pointers and heaps and stacks and all of that in more depth
<banisterfiend> bperry: "immediate value" means it's embedded in the VALUE itself, it's not a pointer to another object on the heap
<banisterfiend> bperry: do you know what a pointer is
<banisterfiend> well an immediate value is not a pointer ;)
terrellt has quit [Quit: Few women admit their age. Few men act theirs.]
freeayu__ has quit [Read error: Connection reset by peer]
<n_blownapart> bluebie: thanks for the link. still working on how scope works...
<bluebie> n_blownapart: Is any particular part being tricky for you?
<T-Gunn> does rails 3.1.3 work with ruby 1.8.7 ?
savage- has joined #ruby
digitalcakestudi has joined #ruby
c0rn_ has quit []
zeromodulus has quit [Remote host closed the connection]
<bluebie> T-Gunn: http://lmgtfy.com/?q=rails+3.1.3+ruby+1.8.7 only if your installed version of ruby doesn't have a marshalling bug which crashes it
<n_blownapart> bluebie: banisterfiend might bail when he sees this but this prog. is opening vistas for me: http://pastie.org/4530517
<bperry> of course
<bperry> I understand what you mean now
<bluebie> n_blownapart: That sure is a cool program, but I think you need to work on better class names
<banisterfiend> n_blownapart: you could use: attr_reader :num
voodoofish has quit [Ping timeout: 272 seconds]
<banisterfiend> instead
<bluebie> I didn't know protected could do that!
<bluebie> You have schooled me n_blownapart
pingfloyd has joined #ruby
tchebb has quit [Quit: Leaving.]
freeayu__ has joined #ruby
<banisterfiend> n_blownapart: http://pastie.org/4553678
<n_blownapart> bluebie: I know it is a textbook example ...num was n before I changed it. I think the single letter names take any context out of it and makes one force oneself to follow the control-flow.
<bluebie> oh yeah
cbuxton has joined #ruby
<n_blownapart> but is this a good example to study scope? bluebie banisterfiend ?
<n_blownapart> I was struggling with how line 11 works. ^^
<banisterfiend> n_blownapart: not really
cbuxton has quit [Client Quit]
t47227 has quit [Remote host closed the connection]
locriani has quit [Remote host closed the connection]
t36663 has joined #ruby
<n_blownapart> banisterfiend: because the method definition is named the same, does the method hold its own scope?
<bluebie> n_blownapart: I imagine when you call c.num ruby thinks something like "this is allowed, but only if self.is_a?(c.class)"
<banisterfiend> n_blownapart: named the same as what?
<bluebie> basically checking if the class in which the code is running is a relative of the class of the object you're calling the protected method on
<banisterfiend> n_blownapart: @num and num are not the same name
<banisterfiend> one has an @ in front
<bluebie> @anything means an instance variable, so they are completely different and ruby doesn't think about them in the same way - if a method and an instance variable are named the same aside from the @ this makes no difference to ruby - they are strictly not related
<n_blownapart> banisterfiend: yeah, but I was thinking since the method merely holds a value, I thought that @num was basically changing scope.
<bluebie> the method doesn't hold the value, the instance variable does
<bluebie> the method just grabs the instance variable and returns it's contents
<banisterfiend> n_blownapart: i dont know what u mean...:P you're using the word 'scope' in a really weird way
<bluebie> the instance variable is held in the object
M- has joined #ruby
<bluebie> so, when you go C.new, it makes a place in memory which stores all the instance variables, and also says what class it's for, and that's your instance
<bluebie> A class contains methods, an instance contains instance variables and a pointer to the class they go with
<n_blownapart> I guess I mean the scope when the method num is called on c (c2) banisterfiend
<banisterfiend> n_blownapart: i really think you need to buy the book "learn to program" by chris pine
<bluebie> an object never, however, has a unique method with it's own unique values - methods are always in classes
<banisterfiend> n_blownapart: it'll help you get the right mindset, and after you've got that, you can move on to books like david a black's, etc
<n_blownapart> banisterfiend: oh shit. ok I'll get a hard copy. I have the pdf but can't use it on a laptop.
sebicas has left #ruby [#ruby]
mparodi has joined #ruby
<banisterfiend> n_blownapart: you'll probably just be able to skim it really quick
voodoofish has joined #ruby
<banisterfiend> n_blownapart: just fill in a few gaps, wont take long to get up to speed i think
Monie has quit [Ping timeout: 244 seconds]
<n_blownapart> yeah I did peter coopers book last year...most of it banisterfiend I was eager to get on to something tougher.
tomsthumb_ has joined #ruby
reactormonk_ has joined #ruby
mparodi_ has quit [Ping timeout: 240 seconds]
Banistergalaxy has quit [Ping timeout: 240 seconds]
reactormonk_ is now known as reactormonk
<n_blownapart> but thanks. but really the problem with this prog (and the insight I got) was that it was typical to name a method def. the same as all the identifiers. I still don't see the wisdom of this.
<n_blownapart> banisterfiend: bluebie ^^
v0n has quit [Ping timeout: 265 seconds]
lledet has left #ruby [#ruby]
<bluebie> n_blownapart: Giving them both the same name makes it easy to see they're related when you read it, but you are right in thinking it makes it easier for a typo to give your program an entirely different meaning
<bluebie> n_blownapart: I'd really recommend playing in irb all the time - it's great for figuring out stuff like this by experimenting and playing
<n_blownapart> bluebie: yeah like on line eleven you have the method on one side of the operator and the argument on the other sharing the same name.
<bluebie> n_blownapart: you can use semicolons instead of new lines to do stuff like classes all at once, creating little disposable ones and poking at them to see how they react in different situations
<reactormonk> n_blownapart: or even use pry
<n_blownapart> yeah thanks bluebie I use pry as per banisterfiend 's exortation
<banisterfiend> hehe
<bluebie> yeah, pry is a fancy alternative to irb with a bunch of great features
<bluebie> I should use pry more :P
<bluebie> always forget it exists!
<banisterfiend> bluebie: which features do you use?
QKO_ has joined #ruby
locriani has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
<bluebie> it should be the default in the next MRI I think!
<bluebie> banisterfiend: none, because I keep forgetting about it :)
<T-Gunn> #passenger hasnt been active for the past few hours.. im trying to make Passenger ignore a directory.. i added the PassengerEnabled off inside of a <Directory> to a conf file on my server that is included in the main httpd.conf (using cpanel) i have restarted apache and i still get the same error.. am i missing something?
<n_blownapart> bluebie: what was it about this prog. that you learned from? maybe you could shed some light on it.
<bluebie> I'd pretty much be happy with anything which doesn't freak out when I resize my terminal though
<banisterfiend> bluebie: i dont really care too much about that, people have been telling me to get it made the default, but really having it as a 'gem' is easy enough
<bluebie> maybe I should alias irb to pry in bash xD
<bluebie> oh pry is your creation?
ameck has joined #ruby
<banisterfiend> bluebie: yeah
gokul has quit [Quit: Leaving]
<bluebie> n_blownapart: I never really knew how 'protected' worked, now I see it's usefulness
mohits has joined #ruby
<n_blownapart> bluebie: oh cool. banisterfiend well pry's indenting is better, isn't it?
<bluebie> I've never been particularly interested in protecting and privating methods tho so I never payed much attention
<bluebie> everything in pry is better :P
havenn has joined #ruby
QKO has quit [Ping timeout: 240 seconds]
<n_blownapart> pry is easier to read with colors/indenting , for one. banisterfiend bluebie
freeayu__ has quit [Ping timeout: 260 seconds]
locriani has quit [Ping timeout: 240 seconds]
gen0cide_ has quit [Quit: Computer has gone to sleep.]
<bluebie> yay
<bluebie> okay aliased irb to pry
<bluebie> so now I can't forget and can get properly addicted!
MeTRaLHa__ has joined #ruby
randomau_ has quit [Read error: Connection reset by peer]
aantix has joined #ruby
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
andrewhl has quit [Remote host closed the connection]
freeayu has joined #ruby
adeponte has joined #ruby
jasonLaster has quit [Remote host closed the connection]
macmartine has quit [Quit: Computer has gone to sleep.]
digitalcakestudi has quit [Ping timeout: 244 seconds]
Bosma has quit [Ping timeout: 272 seconds]
jarred has quit [Quit: jarred]
artOfWar has joined #ruby
cloud|droid has joined #ruby
Banistergalaxy has joined #ruby
artOfWar_ has joined #ruby
banisterfiend has quit [Ping timeout: 246 seconds]
gatortater has joined #ruby
<Axsuul> Fundamental question: would 100 threads use the same memory imprint as 1 thread?
jgrevich has quit [Quit: jgrevich]
reactormonk has quit [Ping timeout: 276 seconds]
<bluebie> Axsuul: No way
<Axsuul> bluebie: is there any way to measure how much memory each thread consumes?
artOfWar_ has quit [Remote host closed the connection]
Tomasso has quit [Read error: Operation timed out]
<Axsuul> bluebie: well, its close isnt it? the only thing that differs is each thread would have a different heap?
<bluebie> graph ruby's memory usage with different numbers of threads?
<bluebie> it depends on the host OS too (as of ruby 1.9)
Monie has joined #ruby
artOfWar has quit [Ping timeout: 240 seconds]
<Axsuul> ubuntu
<bluebie> IDK
<bluebie> my undersanding is the reason threads are slow is a whole bunch of memory has to be allocated to them
n_blownapart has quit [Remote host closed the connection]
<bluebie> as well as switching in and out registers and things when context switching
<bluebie> event loop webservers have taken off recently because threads just aren't performant or efficient when speed or memory usage are important
<bluebie> but I don't have any specific numbers or anything beyond speculation
<bluebie> do some tests!
<burgestrand> 156 K on my system
<burgestrand> No, that’s, hm. Probably way less.
<bluebie> per thread?
<burgestrand> 28K for the first new thread
<burgestrand> … and that’s measuring in irb so I’d expect it to be a bit lower
<Axsuul> bluebie: hmm ok, arent webservers beginning to go back to concurrency? (i.e. puma)
<burgestrand> When I did it in pry it became 156 :p
<Axsuul> I know rails 4.0 will be threadsafe! by default
havenn has quit [Remote host closed the connection]
arvidkahl has joined #ruby
<bnagy> etc, that was just the first link I hit
luxurymode has quit [Quit: Computer has gone to sleep.]
<bluebie> does puma use threads or processes?
<burgestrand> bluebie: threads
<bluebie> weird
<burgestrand> we’re coming full circle in a few years I tell you
<bluebie> well I don't know then. I'm not up with all the latest in web server tech
<bluebie> what happened to make threads the next big thing again?
<bluebie> kernels just getting better at it with all this multiprocess stuff?
<bluebie> multiprocessor*
<Axsuul> yea threads are definitely starting to coem full circle again, also that celluloid gem has gotten a lot of traction lately
<bluebie> interesting that puma still sucks on MRI. Stupid GIL!
Goles has joined #ruby
<burgestrand> bluebie: only sucks in comparison to jruby :p
<burgestrand> … maybe
<bluebie> puma site also says rubinius is good stuff
t36663 has quit [Remote host closed the connection]
<Axsuul> i like that threads are making a comeback, because having to run multiple processes to achieve the same thing is a real memory hog
<Axsuul> its expensive
t90199 has joined #ruby
kyktommy has joined #ruby
<bluebie> I'm sure MRI would compete better with the global interpreter lock switched off
kyktommy has quit [Client Quit]
<burgestrand> bluebie: rubinius 2.x I’d assume
<bluebie> hopefully they rip that bandaid off soon and just force everyone to fix their broken crap
havenn has joined #ruby
<bluebie> is multiprocess still a memory hog if forking?
<burgestrand> yep
<burgestrand> in MRI it is
<bluebie> lame
<burgestrand> work has been done to improve that part
<bluebie> whatever as if I'll ever make anything that gets more than ten hits a minute
T-Gunn has quit []
\13k has joined #ruby
<Axsuul> yea, huge memory hog
<burgestrand> kind of cool what they do with the GCs in MRI for ruby 2.x :d
<Axsuul> i have 3 unicorn workers, each take up almost 500 MB
<burgestrand> or maybe even 1.9.4?
<bluebie> rubymotion is so neat
choffstein has quit [Remote host closed the connection]
burgestrand has quit [Quit: Leaving.]
AlbireoX_ is now known as AlbireoX
<bluebie> just a shame iOS is turning out to be such a shit platform
banisterfiend has joined #ruby
chare has joined #ruby
<bnagy> jruby y u no build?
<bnagy> great - moved all my prod onto jruby, now gotta move it all back cause of dumb bugs :P
<arubin> bluebie: How is it a shit platform?
Banistergalaxy has quit [Ping timeout: 260 seconds]
<eridani> which bugs?
<bluebie> I can't deal with how verbose objc is, or how apple seems to think these patchwork little language updates will fix what makes objective c so annoying to work in. Methods with named arguments are nice, but the order and presence of them is enforced, so it's just more typing - it's realistically unusable without an autocompleting IDE
<bnagy> eridani: http://pastie.org/4553696
<bluebie> xcode crashes so often it has a special feature where it can catch a crash and offer to just keep running regardless
<bnagy> intermittently, with 3 different ffi based gems
<bnagy> trying to build off git but ant is failing
<bnagy> ooh wait... maybe not that time :D
<bluebie> apple seems to be making no moves to make the platform more developer friendly - they seem to be acting as control freaks just for the sake of personality even when there's no benefit to iOS users in them doing so
<bluebie> playing with a Microsoft Surface tablet prototype was such a breath of fresh air
<bluebie> it's as if microsoft doesn't hate their developers. Nothing in the docs felt oppositional
<gatortater> sorry to interrupt. looking for some assistance with rvm. tried joining #rvm to no avail.
uris has quit [Quit: leaving]
noyb has joined #ruby
<banisterfiend> bluebie: literals have made things easier in objc
<bluebie> and the one glimmer of hope I had that they might fix at least some of the issues with iOS disapeared when Laurent Sansonetti left apple to found rubymotion. They should have made that product themselves, but instead they're dicking around with @[] operators and bullshit like that
<banisterfiend> bluebie: object literals
reactormonk has joined #ruby
Takehiro has joined #ruby
ryanf has joined #ruby
\13k has quit [Quit: gg]
yasushi has joined #ruby
<bluebie> objective c is to iOS what coffeescript is to node.js - it makes things a bit nicer, but the illusions of working in a nice dynamic language shatter frequently with painful results
ZachBeta has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<bnagy> gatortater: #rvm is really the best place
<bnagy> but go ahead, someone might know. I warn you now - I really dislike rvm compared to rbenv
<bnagy> just my personal opinion though
<gatortater> hm. first i've heard of rbenv
<banisterfiend> bluebie: i just think ruby wouldn't be performant enough
yasushi has quit [Remote host closed the connection]
<banisterfiend> bluebie: they need to use something like objc
<bluebie> rubymotion is roughly as performant as objective c for a lot of stuff
<bluebie> it compiles math very similarly
<bluebie> it doesn't use GC, it's all ARC-style memory management
<bnagy> gatortater: I don't respond in /query, sorry dude
<bluebie> the object and class system in ruby is pretty similar to objective c - they're similarly dynamic
<bnagy> it's for the best - gives other people a chance to jump in and help
<bluebie> you can write physics engines in ruby and things like that just fine
<banisterfiend> bluebie: we'd have to see benchmarks to know for sure, but my guess ruby could never be as fast as objc, and performance is important to them
<bluebie> the only thing they're struggling a little with is cyclic loops in memory management, but @lrz says he has some ideas on how to fix that
<gatortater> ok. still learning the do's and don'ts of irc. as well as figuring out cygwin and ruby on rails
<bluebie> I disagree - I think user experience is important to apple, and performance is a part of that - but spend five minutes with a winmo 7 device and you see pretty quickly that architecture makes more different to smoothness than cpu speed or language choice
<bnagy> cygwin...rails :<
SCommette has quit [Quit: SCommette]
<bluebie> I think a language like ruby would make developers faster and happier, and give them more time to focus on the important stuff, the user experience stuff.
<banisterfiend> bluebie: well 'macruby' already exists and a number of people are using it..
<bluebie> macruby doesn't have a lot of the optimisations rubymotion has (yet)
<bluebie> macruby for instance is garbage collected
<gatortater> i find my face mimics that emoticon more and more diving into this
<bluebie> lrz says he's going to try and backport some of the improvements though
<banisterfiend> bluebie: then believe him :)
gatortater has quit []
<bluebie> man, that surface tablet was really compelling
gatortater has joined #ruby
<bluebie> I was shocked
<bluebie> it's so rare for microsoft to make something good
reset has joined #ruby
scant has joined #ruby
banisterfiend has quit [Remote host closed the connection]
jarred has joined #ruby
<gatortater> bnagy: cygwin no good for this ruby on rails?
<bluebie> gatortater: y u no linux?
mike4_ has quit [Quit: bbl]
havenn has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<gatortater> cygwin came recommended by a friend. however, he uses a macbook pro and only offered it as a suggestion
ananthakumaran has quit [Quit: Leaving.]
Jackneill has joined #ruby
Jackneill is now known as Guest42311
<gatortater> some tutorials suggest cygwin as well
aantix has quit [Quit: aantix]
havenn has joined #ruby
reactormonk has quit [Ping timeout: 276 seconds]
yasushi has joined #ruby
<gatortater> bluebie: should i look into a duel boot for linux?
<bnagy> I thought rails ran natively
<bluebie> if you're a windows person and you're having trouble running rails directly in windows, I'd be more inclined to setup a little linux VM than duel boot
<bnagy> but I admit I have NFI I would never use it, even if I ever did webstuff :)
<bluebie> you can bridge it across that way and use text editors in windows and access the webserver in the virtual machine
<bluebie> another way you could do it which might be cute is to get a raspberry pi and make a mini devserver :)
<shaman42> and very mini devserver it would be
<bluebie> it runs ruby pretty well!
<bluebie> and hey it's like $40 to setup so that's pretty cool
<bluebie> I have one downstairs thinking about household chores :)
<bnagy> dual boot is so last century
<shaman42> 40 + sdcard + case + charger + ...
<bluebie> since the ffi guys patched their gem to work better on arm everything seems to be working great
mahmoudimus has joined #ruby
<bluebie> the raspberry pi is $35
<bluebie> a little sd card you probably already have, but if you don't five bucks would easily get you one
<gatortater> hm. lots for me to research. duel booting is something i did first year of college. wild times they were.
<bluebie> case? who needs one!
chare has left #ruby [#ruby]
zeromodulus has joined #ruby
<bluebie> and charger is just a usb port on a tv or phone charger or something like that
<bluebie> gatortater: It's a bit better these days - the linuxes have matured quite a bit
mahmoudimus has quit [Client Quit]
<bluebie> sadly the only thing I really loved in linux was gnome 2
<shaman42> thats the normal mantra bluebie ( i have rasberry pi too)
<bluebie> so now I am a mac person
<bluebie> mac's have plenty of unix to go around though, so it's a relatively happy safe space
stdev has joined #ruby
<shaman42> I have 10 or something phone chargers in my household and only one is suitable for rasberry pi.
quazimodo has joined #ruby
<quazimodo> how do I loop from 2012 to 1995
<quazimodo> or from 52 to 1
<shaman42> I didnt have sd-card big enough for rasberry pi as I dont play with toycameras
<bluebie> I'm running my pi off a charger only rated for 500ma but it's worked fine
azm has quit [Ping timeout: 240 seconds]
<bluebie> the pi is supposed to require 700ma, so, whatever, I guess the charger can do more than it's specs say
<bluebie> or the pi is very tollerant
<bluebie> quazimodo: how about (1995..2012).to_a.reverse.each
jorge has quit [Remote host closed the connection]
<quazimodo> bluebie: oh ok. Also, how come 8.downto(1).each do |i| doesnt work?
<quazimodo> also what does to_a do?
<bluebie> converts the range to an array
<bluebie> makes it easier to reverse it!
<quazimodo> hrmm
<bluebie> 8.downto(1).each do |i| puts i end works for me?
<bluebie> what's it not doing for you?
<quazimodo> oh i was doing
<quazimodo> 8.downto(1).each do |i|
<quazimodo> i
<quazimodo> end
<bluebie> oh you want it as an array?
<bluebie> 8.downto(1).to_a will give you that
<scant> i'm looking for a library with a c version of all those handy ruby functions, e.g. gsub. does such a thing exist?
<bluebie> or if you want to transform the numbers in to something else use map instead of each
<bluebie> checkout the docs for Enumerator for info on all the neat stuff you can do with it
<quazimodo> bluebie: im a ruby noob :(
<bluebie> quazimodo: Enumerator is cool! You'll love it!
<bnagy> Enumerable, probably
reactormonk has joined #ruby
banisterfiend has joined #ruby
<fowl> scant: String#gsub() is a c function, what are you saying?
<quazimodo> so hold up
<quazimodo> do ruby methods have internal documentation
zeromodulus has quit [Remote host closed the connection]
<bluebie> bnagy: 8.downto(1) returns an Enumerator, not an enumerable
<quazimodo> so that i can do a 'help' on a method and itll tell me what it deos?
<bluebie> banisterfiend: pry does I think?
<quazimodo> can i ask in irb for a method to be explained?
graspee has joined #ruby
<fowl> quazimodo: no, but pry does
<bnagy> bluebie: mixin
<banisterfiend> quazimodo: http://pryrepl.org
<bluebie> you can use ri at the command line for that, but irb doesn't. Pry is a really cool alternative to irb with lots of nice stuff like that
<fowl> quazimodo: you do show-source String#gsub or show-docs String#gsub
<banisterfiend> bluebie: can you ask bnagy if he uses pry yet
<bnagy> all the cool stuff is documented in Enumerable not Enumerator
<banisterfiend> bluebie: im too shy
<quazimodo> fowl: so for 8.downto(1)
<bluebie> bnagy: do you use pry yet?
Banistergalaxy has quit [Ping timeout: 272 seconds]
<bnagy> bluebie: no I just repl in my head with 100% accuracy
<quazimodo> show-docs integer#downto ?
<banisterfiend> bnagy: haha
<scant> fowl, where would i issue that command? within a ruby script?>
<fowl> quazimodo: yea
<bluebie> oh man irc is devouring my life!
<bnagy> banisterfiend: still haven't got into the habit, sry :)
<bluebie> I should go do something!
<banisterfiend> quazimodo: show-doc 8.downto
<quazimodo> didnt work
<bluebie> anything!
<bluebie> ttyl guys
<bluebie> stay nice :D
<banisterfiend> bluebie: cya
<fowl> scant: what function? what are you talking about?
<fowl> er command
<quazimodo> banisterfiend: excellent
<quazimodo> now to install prydoc
bluebie has quit [Quit: Linkinus - http://linkinus.com]
<banisterfiend> quazimodo: does it rock out your D. ?
<scant> fowl, what i really want is a down-and-dirty version of it using char*
<scant> something that doesn't have to fit in the general scope of the string class, just the function if it was to be written by itself in C
<fowl> scant: oh, so you're just saying random shit, well then, flim flammible deedoo
MeTRaLHa__ has quit [Quit: Full Throttle: você conhece, você confia [www.fullt.net]]
<quazimodo> banisterfiend: its kinda like emacs's helper function. I'm glad it exists
<fowl> scant: worble pixwapple morgenundend'da
<quazimodo> Im amazed at how much the emacs helper functions have become part of how i work now
<scant> why, if the great fowl can't understand it, surely it must be nonsense!
<banisterfiend> scant: u mad?
<fowl> scant: you're asking for a "down-and-dirty version of String#gsub" that uses char*, how can i respect you after such a request?
<scant> not mad, just looking for actual advice
<scant> fowl, did you read the next line? they go together :)
insecurlex has quit [Remote host closed the connection]
shiki has joined #ruby
cloud|droid has quit [Quit: Leaving]
codezombie has quit [Quit: Linkinus - http://linkinus.com]
cloud|droid has joined #ruby
codezombie has joined #ruby
codezombie has quit [Client Quit]
<fowl> why dont you do ruby regexes are simpler than that mess
defendguin1 has left #ruby [#ruby]
tatergator has joined #ruby
codezombie has joined #ruby
burgestrand has joined #ruby
queequeg1 has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
<scant> i'm doing a project in c, and i want to use the many handy ruby functions which are not built-in to c
Takehiro has quit [Remote host closed the connection]
gatortater has quit [Ping timeout: 250 seconds]
pricees has left #ruby [#ruby]
fris has quit []
ananthakumaran has joined #ruby
rakunHo has joined #ruby
GoGoGarrett has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
Axsuul has quit [Ping timeout: 272 seconds]
yasushi has quit [Remote host closed the connection]
yakko has quit [Remote host closed the connection]
yuriy has joined #ruby
Axsuul has joined #ruby
Axsuul has quit [Read error: Connection reset by peer]
Axsuul has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
reactormonk has quit [Read error: Operation timed out]
wargasm has joined #ruby
fuleo has joined #ruby
yxhuvud has joined #ruby
havenn has quit [Remote host closed the connection]
freak1 has joined #ruby
freak1 is now known as reactormonk
pskosinski has joined #ruby
Sgeo has joined #ruby
mahmoudimus has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
micha_ has joined #ruby
jrist has joined #ruby
gtuckerkellogg has joined #ruby
<quazimodo> what was the method that lists an objects methods?
Eldariof-ru has joined #ruby
jrist has quit [Quit: o no u din't]
moshee has quit [Ping timeout: 265 seconds]
<banisterfiend> quazimodo: ls -m
<banisterfiend> quazimodo: type: help
moshee has joined #ruby
zeromodulus has joined #ruby
timonv has joined #ruby
tonini has joined #ruby
Takehiro has joined #ruby
gurps has joined #ruby
<heftig> quazimodo: methods
<quazimodo> banisterfiend: haha i got it
<quazimodo> :D
timonv has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<banisterfiend> heftig: he's in pry,
cj3kim has joined #ruby
cj3kim has left #ruby [#ruby]
maesbn has joined #ruby
queequeg1 has quit [Quit: leaving]
n1x has quit [Ping timeout: 252 seconds]
banisterfiend has quit [Ping timeout: 276 seconds]
quazimodo has quit [Remote host closed the connection]
noyb has quit [Ping timeout: 245 seconds]
cloud|droid has quit [Ping timeout: 246 seconds]
maletor has joined #ruby
c0rn_ has joined #ruby
freeayu has quit [Ping timeout: 240 seconds]
cousine has quit [Remote host closed the connection]
tagrudev has joined #ruby
freeayu has joined #ruby
djdb has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
TPFC-SYSTEM has joined #ruby
wargasm has joined #ruby
quazimodo has joined #ruby
maesbn has quit [Remote host closed the connection]
senny has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Stalkr_ has joined #ruby
arvidkahl has quit [Quit: arvidkahl]
dekz has joined #ruby
idoru has quit [Ping timeout: 600 seconds]
Banistergalaxy has joined #ruby
QKO has joined #ruby
burgestrand has quit [Quit: Leaving.]
codezombie has quit [Quit: Linkinus - http://linkinus.com]
codezombie has joined #ruby
burgestrand has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
shiki has quit [Remote host closed the connection]
codezombie has quit [Client Quit]
codezombie has joined #ruby
codezombie has quit [Client Quit]
idoru has joined #ruby
QKO_ has quit [Ping timeout: 272 seconds]
Progster has joined #ruby
SegFaultAX|work2 has joined #ruby
yoklov has quit [Quit: computer sleeping]
scant has quit [Remote host closed the connection]
stdev has quit [Remote host closed the connection]
moshee has quit [Ping timeout: 240 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
senny is now known as Guest93734
TPFC-SYSTEM is now known as Guest58452
Seich has joined #ruby
maesbn has joined #ruby
bigkevmcd has joined #ruby
chare has joined #ruby
tonini has quit [Remote host closed the connection]
tonini has joined #ruby
himsin has joined #ruby
und3f has joined #ruby
Goles has joined #ruby
cloud|droid has joined #ruby
sspiff has joined #ruby
sspiff has joined #ruby
jprovazn has joined #ruby
banisterfiend has joined #ruby
micha_ has quit [Ping timeout: 276 seconds]
arturaz has joined #ruby
freeayu has quit [Ping timeout: 240 seconds]
burgestrand has quit [Quit: Leaving.]
t90199 has quit [Remote host closed the connection]
Morkel has joined #ruby
t80972 has joined #ruby
rh1n0 has joined #ruby
Eldariof-ru has quit []
ephemerian has joined #ruby
Guest58452 is now known as TPFC-SYSTEM
burgestrand has joined #ruby
freeayu has joined #ruby
tech|survivor has quit [Ping timeout: 268 seconds]
saispo has quit [Ping timeout: 260 seconds]
c0rn_ has quit []
luckyruby has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
dangerousdave has joined #ruby
tewecske has joined #ruby
burgestrand has quit [Quit: Leaving.]
rh1n0 has quit [Quit: Linkinus - http://linkinus.com]
vicky has joined #ruby
rh1n0 has joined #ruby
haxrbyte has quit [Ping timeout: 276 seconds]
vicky has quit [Client Quit]
Progster has quit [Ping timeout: 240 seconds]
tatergator has left #ruby [#ruby]
havenn has joined #ruby
MarGarina has joined #ruby
peterhellberg has quit [Remote host closed the connection]
hoelzro|away is now known as hoelzro
rh1n0 has quit [Quit: Linkinus - http://linkinus.com]
workmad3 has joined #ruby
havenn has quit [Ping timeout: 245 seconds]
elhu has joined #ruby
QKO_ has joined #ruby
QKO has quit [Read error: Operation timed out]
_zxc__ has joined #ruby
aganov has joined #ruby
locriani_ has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
igotnolegs has quit [Quit: Computer has gone to sleep.]
locriani_ has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
thone has joined #ruby
joephelius has quit [Quit: WeeChat 0.3.8]
wobr has joined #ruby
thone_ has quit [Ping timeout: 276 seconds]
bluefish_ has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
xorigin has joined #ruby
_zxc__ has quit [Quit: Page closed]
jarred has quit [Quit: jarred]
Speed has joined #ruby
shadoi1 has quit [Quit: Leaving.]
Criztian has joined #ruby
mneorr has joined #ruby
ryanf has quit [Quit: leaving]
berserkr has joined #ruby
cloud|droid has quit [Quit: Leaving]
eldariof has joined #ruby
freeayu has joined #ruby
apeiros_ has joined #ruby
cirwin has quit [Ping timeout: 276 seconds]
lampe2 has joined #ruby
SegFaultAX|work2 has quit [Ping timeout: 244 seconds]
berserkr has quit [Quit: Leaving.]
berserkr has joined #ruby
<quazimodo> guys
freeayu has quit [Read error: Connection reset by peer]
<quazimodo> I did rvm use gemset global
<quazimodo> how do I go back to what it was before that (i've no idea what it was)
lampe2 has quit [Client Quit]
lampe2 has joined #ruby
micha_ has joined #ruby
lampe2 has quit [Client Quit]
<tagrudev> quazimodo, by default it should be global
cezar has joined #ruby
<quazimodo> then why doesnt pry work anymore
freeayu has joined #ruby
mneorr has quit [Ping timeout: 276 seconds]
nilg has joined #ruby
<quazimodo> nvm
ringotwo has joined #ruby
<tagrudev> probably because you have installed it in a different gemset
greenysan has joined #ruby
haxrbyte has joined #ruby
micha_ has quit [Quit: Leaving]
M- has quit [Quit: This computer has gone to sleep]
lampe2 has joined #ruby
n1x has joined #ruby
cezar has quit [Quit: Leaving]
freeayu has quit [Read error: Connection reset by peer]
Beoran__ has joined #ruby
mneorr has joined #ruby
Beoran_ has quit [Ping timeout: 245 seconds]
Morkel has quit [Quit: Morkel]
ph^ has joined #ruby
freeayu has joined #ruby
peterhellberg has joined #ruby
mneorr has quit [Ping timeout: 244 seconds]
Vert has joined #ruby
ringotwo has quit [Remote host closed the connection]
lkba has quit [Quit: Bye]
n1x is now known as Guest35217
Speed is now known as Guest32434
elaptics`away is now known as elaptics
jastix has joined #ruby
CodeFriar has joined #ruby
charliesome has joined #ruby
CodeFriar has quit [Ping timeout: 272 seconds]
mneorr has joined #ruby
zii has quit [Read error: Connection reset by peer]
zii has joined #ruby
iori has quit [Remote host closed the connection]
Guest32434 is now known as Speed
Speed has quit [Changing host]
Speed has joined #ruby
xbayrockx has joined #ruby
mneorr has quit [Ping timeout: 276 seconds]
mklappstuhl has joined #ruby
lampe2 has quit [Quit: Leaving]
lampe2 has joined #ruby
qwerxy has joined #ruby
<fowl> praise apeiros_ , grand liberator!
<apeiros_> o0
<apeiros_> just cleaning out the closet…
<Mon_Ouie> What does it mean when someone is banned by barjavel.freenode.net?
<fowl> they will speak of this day for generations, the day that hundreds were forgiven their exile
deryl has quit [Quit: deryl]
tech|survivor has joined #ruby
<heftig> fowl: that doesn't make sense
<heftig> fowl: you could say "their sins"
Banistergalaxy has quit [Ping timeout: 245 seconds]
<banisterfiend> fowl: dont put up with your english being corrected by a german
<apeiros_> Mon_Ouie: I think from time to time the banlists get reinstated by freenode
<apeiros_> no idea why and when it happens and it's annoying as hell
Banistergalaxy has joined #ruby
<Muz> Happens after outages of services like Nickserv, and netsplits iirc.
t80972 has quit [Remote host closed the connection]
<apeiros_> also I'm totally missing a comment/reason to go with a ban
<fowl> heftig: it doesnt have to make sense, it just has to sound like it could have happened for people to believe it
<Muz> Along with a multitude of other edge cases in the IRCd.
t64168 has joined #ruby
<Muz> s/Nick/Chan/
workmad3 has joined #ruby
freeayu has quit [Ping timeout: 240 seconds]
<fowl> heftig: man lives in whales stomach for 3 days surviving on god's love, etc
Tobsn has joined #ruby
<quazimodo> im surprised how little traffic there is in #rails
<Muz> quazimodo: because you want #rubyonrails.
<apeiros_> quazimodo: that's because it's the wrong channel…
<heftig> fowl: no, i mean your sentence had a problem, not what you mean
<quazimodo> im retarded
<heftig> fowl: either "forgive" is the wrong verb or "exile" the wrong object
<quazimodo> :/
<fowl> your sentences have problems, go keep the EU afloat, kraut
<banisterfiend> fowl: hehe
<apeiros_> fowl: please, no insults
<quazimodo> cant even speak in that one :/
qwerxy has quit [Quit: offski]
specialGuest has joined #ruby
zii has quit [Read error: Connection reset by peer]
<Mon_Ouie> You need to register your nick for that
berserkr has quit [Ping timeout: 260 seconds]
markprovan has joined #ruby
freeayu has joined #ruby
<banisterfiend> Mon_Ouie: do you care about your parentheses matcher or did you just do it on a dare
<Mon_Ouie> I like having it
Banistergalaxy has quit [Ping timeout: 252 seconds]
<banisterfiend> Mon_Ouie: do you think kyrylo has fully recovered or do you think he still holds a grudge against you (for doing it b4 him)
EddieS has joined #ruby
Banistergalaxy has joined #ruby
EddieS is now known as Guest78821
jenrzzz has joined #ruby
<apeiros_> oh
<Mon_Ouie> I think he's fine
mengu has joined #ruby
<banisterfiend> Mon_Ouie: do you dare fully think kyrylo monkey puzzle tree goes back to the triassic grudge against you matcher fully
berserkr has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 256 seconds]
Speed has quit [Ping timeout: 252 seconds]
Emmanuel_Chanel has joined #ruby
kaiwren has joined #ruby
Morkel has joined #ruby
<apeiros_> o0
<apeiros_> monkey puzzle tree? triassic grudge?
<matti> ;-)
<chare> hi
<matti> Monday.
<matti> Sheesh.
<chare> can you hear me?
<matti> Hi, yes.
<matti> Roger.
<banisterfiend> chare: I doubt your masculinity now after your beautiful poem last night. Are you a dandy?
<matti> LOL
<chare> you've been drinking too much alcohol
<matti> banisterfiend: ;p
<banisterfiend> chare: do you remember that poem you write? it was very delicate, almost feminine
<banisterfiend> wrote*
<matti> There was a poem here?
<banisterfiend> chare: Yeah, chare wrote a poem last night
<chare> i need to know how to integrate accepting bitcoins into rails
<JonnieCache> banisterfiend: come on this is the ruby channel. if there's anywhere on freenode where we dont have to compel people to fit themselves into static types its here
<JonnieCache> ;)
xorox90 has joined #ruby
<banisterfiend> JonnieCache: hehe nice play on words
<banisterfiend> matti: here was chare's poem: Ruby i love blocks they do |every| every.thing().and() end Ruby if "you and i".split() "then #{self} alone" else ["we", "will"].join end
iori has joined #ruby
pingfloyd has quit [Quit: pingfloyd]
<matti> banisterfiend: Oh nice!
<matti> chare: I am touched ;-)
<chare> bitcoins
freeayu__ has joined #ruby
<chare> answer my question about bitcoins
fastred has joined #ruby
<matti> Haha
<banisterfiend> matti: he's being coy
<apeiros_> …
m104 has joined #ruby
<matti> banisterfiend: And needy ;)
Takehiro has quit [Remote host closed the connection]
<chare> apeiros_ i know you know the answer to my bitcoin question
freeayu has quit [Ping timeout: 272 seconds]
<matti> ;-)
<fowl> chare: bitcoins arent green no matter what you say
<chare> how is color green relevant here
tatsuya_o has joined #ruby
<banisterfiend> green oh how i love you green, horse on the hill, ship on the ocean
zz_chrismcg is now known as chrismcg
<matti> chare: He was thinking about $$ green.
Speed has joined #ruby
<matti> banisterfiend: Lol
<fowl> chare: we are debating the color of bitcoins? its not a question, they're blau
haxrbyte_ has joined #ruby
<matti> banisterfiend: I sprayed coffee all over my desk
<chare> fowl: just tell me how to accept bitcoins in rails
m104 has quit [Client Quit]
<fowl> chare: you must receive a Rails Revelation, do this by laying down on your local railroad tracks until you become Two, then you will Know.
<chare> fowl: you know you can't out troll me
<banisterfiend> chare: i'll tell you if you write another poem, this time about the color green
<fowl> not trolling, srs suggestion for your life direction
<banisterfiend> Over the face of the cistern the gypsy girl was swaying. Green flesh and green hair, with eyes of cold silver.
<chare> i'm going to make my website that accepts bitcoins and i'm banning your ip fowl
<chare> how do you like that
<fowl> i dont want your ugly blue coins anyways
mengu_ has joined #ruby
mengu_ has joined #ruby
mengu_ has quit [Changing host]
haxrbyte has quit [Ping timeout: 276 seconds]
* apeiros_ checks
<apeiros_> no, not #kindergarten
t64168 has quit [Remote host closed the connection]
t72690 has joined #ruby
Takehiro has joined #ruby
eighty4 has quit [Excess Flood]
<fowl> apeiros_: in kindergarten nobody gave you weird looks when you informed them that you have to use the restroom
eighty4 has joined #ruby
mengu has quit [Ping timeout: 276 seconds]
eighty4 has left #ruby [#ruby]
BRMatt has quit [Quit: ZNC - http://znc.sourceforge.net]
answer_42 has quit [Ping timeout: 276 seconds]
BRMatt has joined #ruby
cascalheira has joined #ruby
khakimov has joined #ruby
lampe2 has quit [Remote host closed the connection]
freeayu3 has joined #ruby
specialGuest has quit [Changing host]
specialGuest has joined #ruby
zeromodulus has quit [Remote host closed the connection]
freeayu__ has quit [Ping timeout: 260 seconds]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
Pip has joined #ruby
<Pip> How is Ruby now?
<banisterfiend> Pip: sleepy
<Pip> lol
freeayu3 has quit [Ping timeout: 248 seconds]
<Pip> What do you mean?
<chare> waiting for banistertfiend to go to sleep
answer_42 has joined #ruby
<chare> so i can do whatever i want
<banisterfiend> chare: what will u do
<oddmunds> you must lull him
<Pip> So what's the best way to install ruby on windows 7?
<oddmunds> windows installer?
<banisterfiend> chare: so u can write soppy poems again?
<chare> you think you so cool
<JonnieCache> thats when we all the fixtures and fittings round like a speakeasy and this becomes a haskell channel
<banisterfiend> chare: Yeah
<JonnieCache> when we spin*
<chare> 10 years from now ruby language will be dead
<Pip> chare, how do you know?
<chare> because statically typed languages will revive
ctp has quit [Quit: Linkinus - http://linkinus.com]
<fowl> someone will have written skynet in java by then
<Pip> lol
<Pip> chare, What will make them revivie successfully?
<chare> need for speed
heftig has quit [Ping timeout: 240 seconds]
<Pip> :D
<Pip> You know what? 10 years from now on, quantum computing will be realized
<Pip> By then, speed will be no problem at any time
<Muz> Maybe then we'll have systems that can recognise people talking crap on the Internet before it happens, and pre-emptively silent them.
<apeiros_> that day will be a silent day
freeayu has joined #ruby
<Pip> haha
<fowl> muz = the establishment
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
mengu_ has quit [Remote host closed the connection]
|ivan| has joined #ruby
jastix has quit [Quit: Leaving]
ProT-0-TypE has joined #ruby
zii has joined #ruby
<bnagy> Pip: jruby 64 bit works on 7
<bnagy> and afaik is still the only option for 64 bit
<apeiros_> OO
<apeiros_> ouch
<bnagy> windowsinstaller / devkit work
<bnagy> in wow32
<bnagy> apeiros_: yeah it's the devkit bit that's hard, apparently
<apeiros_> well, I don't feel sorry
<bnagy> and the usual native stdlib suspects
<fowl> devkit is simple to install
<fowl> just read the directions
<Pip> bnagy, Is jruby amazing?
socialist has quit [Ping timeout: 246 seconds]
<chare> what exactly does jruby do?
<bnagy> well it's unamazing me with some bugs at the moment, but I'm running of git
<JonnieCache> chare: its a ruby interpreter implemented on the jvm
<bnagy> fowl: it's the native 64 bit support that's the issue, not installing
<chare> doesn't ruby already have an interpreter written in C, why does another one exist
<fowl> o
<peterhellberg> I was under the impression that JRuby is the Ruby VM with the least problems under Windows… But who am I to say, wiped my last Windows installation back in 2003
<JonnieCache> well jruby gives seamless integration with java code
<peterhellberg> chare: It’s just an alternative, that happens to leverage the impressive JVM
<Muz> peterhellberg: well, other than the pain of setting up Java on Windows, and getting things into your path properly etc.
<bnagy> chare: because it's faster, has better parallelism, access to java libs and better portability :>
t72690 has quit [Remote host closed the connection]
<JonnieCache> and it also sidesteps several limitations of MRI, the standard C interpreter
<fowl> mri works fine on windows
<JonnieCache> arguably foremost amongst them the GIL
t21795 has joined #ruby
<bnagy> Muz: there is 0 pain now, the jruby installer has a with jvm option
<chare> so you're saying its faster than the original interpreter, guys working on original interpreter really dropped the ball on that one?
<Muz> Faster at certain things and has the wonderful position of having forethought.
<JonnieCache> its not really as simple as that
<bnagy> yeah it's also soooper slow to start up
<Muz> It has different features to the C interpreter though. Like the C interpreter allows for native extensions with C, jRuby allows for native interactions wtih Java.
<Muz> bnagy: nailgun sorts that out mostly.
yuriy has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<bnagy> but jruby is definitely the easiest install on windows atm
<Muz> Never really had any problems with the Ruby Windows Installer
<Muz> .
<Squarepy> ^
<bnagy> and has a good ffi, which more or less covers everything I care about
<bnagy> Muz: rubyinstaller + devkit is just more complicated to install, it's not a value judgement, just a statement of fact
<Muz> bnagy: it is? It's a single Nullsoft installer executable last time I checked.
<bnagy> the fact that I can do both without getting my dick caught in the ceiling fan doesn't mean the difference doesn't exist
fermion has joined #ruby
<Muz> bnagy: what's actually more complicated about the Windows Installer?
socialist has joined #ruby
<bnagy> the devkit install
<bnagy> and some nitpicking about they way they do paths, but that's again only relevant for devkit
<Muz> Isn't the devkit just extracting an archive file? Or have they managed to royally fuck that up.
<bnagy> extract, run an init, run a setup
<Muz> Although that said, whilst not complex, it's often confused me why this isn't just shipped and installed via the Windows Installer.
<bnagy> indeed
<chare> OMG INSTALLING RUBY ON LINUX...
<chare> nothing could be more painful
<ccooke> chare: what's so hard about apt-get install? ;-)
<bnagy> the fact that it doesn't work?
<ccooke> (</troll>)
<bnagy> for sensible definitions of work
<chare> uhh apt-get install doesn't work for ruby
<chare> you gotta go through rvm shit
* bnagy looks around for Hanmac
<hoelzro> chare: what do you mean "apt-get install doesn't work for ruby?"
<ccooke> chare: there's an argument to be had over what sensible should be defined as, in this case.
<hoelzro> what about it doesn't work for you?
<ccooke> hoelzro: indeed.
<chare> you explain to me why ruby has this rvm shittery
apeiros_ has quit [Ping timeout: 245 seconds]
freeayu has quit [Ping timeout: 245 seconds]
<ccooke> I use the system ruby for pretty much everything I do. It's perfectly adequate for my needs
<bnagy> as long as your needs don't involve, like, professionally coding in ruby
<ccooke> bnagy: Incorrect
<bnagy> or as long as you're running quantal
<ccooke> I do, in fact, do professional coding in ruby. And I'm running precise.
<hoelzro> chare: rvm exists so that a) people can try out different versions/implementations of ruby, and b) so people can use a consistent version of Ruby for application development without worrying out the vendor's Ruby
<fowl> if you dont believe a woman should have the right (and be encouraged) to `abort mission' take a long hard look at chare
<chare> another way of saying that they fucked up the language so now you have multiple incompatible versions of the language
<hoelzro> chare: out of curiosity, what's your programming background?
<ccooke> the issues with ruby pckaging are mostly problems with the ruby community being too dev-centric and not actually caring about end users (Okay, that *is* a trollish statement. It's one that I believe is true when I'm irritated,though)
khakimov has quit [Quit: Computer has gone to sleep.]
sspiff has quit [Remote host closed the connection]
perryh is now known as perryh_away
kaiwren has quit [Quit: kaiwren]
<JonnieCache> nah i reckon thats pretty much true, depending on who you define as the end users
<hoelzro> chare: it's not just for Ruby versions; it's also for dependencies
<JonnieCache> and if you add the word "enough" between "caring" and "about"
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
wallerdev has quit [Quit: wallerdev]
<ccooke> JonnieCache: yeah
<ccooke> I've found a lot of developers in language communities - not just ruby - fundamentally don't get why distro packaging exists and is good for users
ph^ has quit [Remote host closed the connection]
reset has quit [Quit: Leaving...]
<chare> ccooke: thats why they also make shitty user interfaces
freeayu has joined #ruby
cloud_droid has joined #ruby
cloud|droid has joined #ruby
cloud|droid has quit [Remote host closed the connection]
fish_ has joined #ruby
<fish_> hi
locriani has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
maesbn has quit [Remote host closed the connection]
Foxandxss has joined #ruby
mrdodo has quit [Remote host closed the connection]
<chare> conversation died
nazty has joined #ruby
mrdodo has joined #ruby
diegoviola has joined #ruby
specialGuest has quit [Ping timeout: 244 seconds]
<diegoviola> hi
<bnagy> everyone decided everyone else was trolling, all at the same time
<diegoviola> what's the difference with executing a rake task from your code in order to process a background job versus using something like resque for background processing? I understand that resque uses fork() to fork a child process and rake will create a new process, but what's the difference?
<JonnieCache> resque is a whole queueing system which can manage fleets of workers and stuff
ph^ has joined #ruby
AxonetBE has joined #ruby
locriani has quit [Ping timeout: 272 seconds]
<JonnieCache> github built it, its the full works.
<AxonetBE> I have an anoying issue because when I do this Date.new(2008, 02, 29).change(:year => 2011), I got invalid date because of the 28/29 days of february, how to fix this?, I thought ruby was taking this in account
mklappstuhl has quit [Ping timeout: 268 seconds]
<JonnieCache> spawning a rake task is, well, just spawning a rake task
LouisGB has joined #ruby
<JonnieCache> youre just using the convenient rake system to define and fire the task, everything else you have to do yourself
t21795 has quit [Remote host closed the connection]
<JonnieCache> so theyre suitable for different scenarios
t36891 has joined #ruby
<diegoviola> right, thanks
graspee has quit [Quit: leaving]
<bnagy> AxonetBE: that's not ruby, it's probably rails retardedness
mrdodo has quit [Ping timeout: 245 seconds]
<JonnieCache> AxonetBE: surely thats correct though because there was no 29th of feb 2011
<JonnieCache> it is an invalid date
Squee- has joined #ruby
<AxonetBE> JonnieCache: Yes I know, but how to do it then?
<AxonetBE> add a rescue and add −1 date?
gregorg has quit [Read error: Connection reset by peer]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
<bnagy> well it depends what you want to actually do
<JonnieCache> date.change(:year => 2011, :month => :03)
x0F_ is now known as x0F
gregorg has joined #ruby
<JonnieCache> give it a valid date basically? i dont really understant
<bnagy> what does changing a year mean?
<bnagy> that's why I think it's a stupid API
<JonnieCache> its just mutating a date object whats stupid about that
<bnagy> adding 365.25 * 3 to it?
<bnagy> it's stupid because you _can't_ just change the year part of a date and expect to always get a valid date
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
<bnagy> and the guys that wrote the API can't predict how you want to handle that error
<fowl> cant you add days
cantonic has joined #ruby
<fowl> to a date
<bnagy> that's what I'd probably do
specialGuest has joined #ruby
<bnagy> but I dunno what the logic is being used for
<JonnieCache> bnagy: its kind of fair enough of them though. dates are notoriously rife with edge cases and its unfair to expect the api designers to handle them
<JonnieCache> because they are potentially infinite
Guest42311 is now known as Jackneill
Jackneill has quit [Changing host]
Jackneill has joined #ruby
<bnagy> soooo... don't write an api like that then?
Banistergalaxy has quit [Ping timeout: 276 seconds]
<fowl> question: i get errors when I do X solution: try to avoid doing X
<JonnieCache> doctor doctor it hurts when i raise my arm!
nazty has quit [Ping timeout: 240 seconds]
apeiros_ has joined #ruby
mklappstuhl has joined #ruby
<matti> Hm.
<banisterfiend> matti: ;]
<matti> banisterfiend: :)
<matti> banisterfiend: We should have #rubypoems ;]
S1kx has joined #ruby
<JonnieCache> we have http://rubykoans.com/
pskosinski has quit [Quit: http://www.redeclipse.net -- Fast-paced online FPS]
<matti> banisterfiend: "Oh sweet closure, I shall pass thou reference."
<matti> banisterfiend: Oh dear, I am crap at it.
<matti> JonnieCache: :)
Apathetic has joined #ruby
<banisterfiend> if you believe in yourself you can do it well
<matti> LOL
|ivan| has quit []
<matti> banisterfiend: I am nowhere near chare level.
<Apathetic> is ruby > python?
<banisterfiend> matti: chare has the feminine touch though
<JonnieCache> Apathetic: ruby sucks
<Apathetic> okay JonnieCache
<matti> Apathetic: We only sit here and they promised us free stuff.
<matti> Apathetic: And wealth, and so on and so forth.
<matti> Apathetic: So far, still waiting.
socialist has quit [Ping timeout: 245 seconds]
CodeFriar has joined #ruby
burgestrand has joined #ruby
socialist has joined #ruby
kaiwren has joined #ruby
<Apathetic> in learning ruby, would I learn easier if I immediately use a framework?
<ccooke> Apathetic: what do you want to do with ruby?
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<ccooke> Is there a reason you want to learn (something you need to do) or is it just to learn?
<fowl> Apathetic: using a framework is generally easier than, for example, writing raw http headers
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
kyb3r has quit []
tk_ has joined #ruby
kaiwren has quit [Read error: Connection reset by peer]
kaiwren_ has joined #ruby
deryl has joined #ruby
<Apathetic> thanks fowl.
<Apathetic> ccooke, just for learning, and prolly make a site then.
<shevy> Apathetic you can write in .cgi too
jblack has joined #ruby
QKO has joined #ruby
<Apathetic> cgi?
<shevy> yes, you can use good old .cgi files too, written in ruby
Seich has quit [Remote host closed the connection]
heftig has joined #ruby
QKO_ has quit [Ping timeout: 252 seconds]
burgestrand has quit [Quit: Leaving.]
jjang has quit [Ping timeout: 276 seconds]
<quazimodo> possible to use Date to get the day name of a week??
<shevy> Date::DAYNAMES[Date.today.wday] # => "Monday"
<Pip> What is the best path for installation of JRuby?
<Muz> "Recycle Bin"
t36891 has quit [Remote host closed the connection]
<shevy> Pip /Programs/Jruby/VERSION_HERE
<Pip> Alright
t16815 has joined #ruby
<quazimodo> shevy: Date.new(2001,2,3).wday #=> 6 ?
<shevy> Pip also I don't think it will work for you
Seich has joined #ruby
<quazimodo> so i need to use DAYNAMES eh
<shevy> quazimodo well convert that number
Axsuul has quit [Ping timeout: 244 seconds]
<Pip> shevy, What do you mean?
answer_42 has quit [Quit: WeeChat 0.3.8]
<shevy> Pip it follows a scheme that is not common
<Pip> D:\Program Files\jruby-1.7.0.preview2
Seich has quit [Client Quit]
<shevy> ok so you use windows
<Pip> this is my desired path, is that okay?
<Pip> Yep, Win 7
<shevy> I suppose so
<quazimodo> shevy: i get it
<bnagy> shevy: u r genious! how u kno?
<shevy> I don't use windows often anymore, I usually use linux
<shevy> bnagy in the past I thought I could memorize everything
<Apathetic> what distro shevy
<shevy> these days... I don't memorize anything and only write down stuff so I dont have to remember
rizzy_work has quit [Ping timeout: 246 seconds]
<shevy> Apathetic Gobolinux! but it kinda died :(
<Apathetic> for development shevy?
<shevy> Apathetic yeah
<shevy> well
<bnagy> shevy: in the past I thought I could memoize everything
<shevy> I used windows only because of the games
<bnagy> but then I ran out of RAM :(
answer_42 has joined #ruby
Jake232 has joined #ruby
<answer_42> lisp
<shevy> but the games all seem to be similar these days... who has the better 3D engine
<JonnieCache> Pip: try and avoid a path with spaces in it
<JonnieCache> that causes problems i hear
<shevy> note that Pip's path follows the gobolinux convention pretty much
<shevy> where hardcoded /Programs could be replaced by $PROGRAMS, pointing to "Program Files", and the program_name-program_version jruby-1.7.0.preview2 could be split into an array with two components ["jruby","1.7.0.preview2"]
<Apathetic> so, rails doesn't need a web server?
<shevy> I think you can start it via webrick?
<fowl> it will run its own
d3vic3 has joined #ruby
<shevy> Apathetic, Item 4
<Apathetic> ah yeah, it says WEBrick/1.3.1 on the header
Seich has joined #ruby
<shevy> "This will fire up an instance of the WEBrick web server by default (Rails can also use several other web servers). "
Squarepy has quit [Read error: Connection reset by peer]
<chare> uh how do I connect rails to the outside world where my web app isn't just a sql database
Squarepy has joined #ruby
sspiff has joined #ruby
<chare> rails feels like as soon as you try to do something outside of the norm its impossible to figure out how to do it
<shevy> oh no chare can talk again :(
<JonnieCache> chare: how would you normally do it?
clocKwize has joined #ruby
heftig has quit [Read error: Connection reset by peer]
<chare> so if i have a graph database
<chare> how do i hook up to it
<chare> i've asked this before
<chare> and no one could answer
heftig has joined #ruby
<JonnieCache> depends what graph database
<JonnieCache> remember you can throw whatever code you like into app/models it doenst have to be activerecord classes
<workmad3> chare: not only does it depend what graph database, it depends on how you want to hook up to it...
Squarepy has quit [Read error: Connection reset by peer]
Squarepy has joined #ruby
<chare> rails normally does this magic mapping of the model to the database, what syntax do i use if i don't use sql then
<workmad3> chare: for example, if you used neo4j, you can either use it through the REST api, or you can have it embedded directly in your app (requires jruby)
<workmad3> chare: that's a completely different question
<chare> oh fuck i need to understand REST?
Squarepy has quit [Read error: Connection reset by peer]
<ccooke> chare: REST is pretty easy
<workmad3> chare: are you even using neo4j? remember I was just giving an example
cloud_droid has quit [Quit: Leaving]
<chare> in my views i reference variables that are in fact part of the model class and map to sql data, you're saying if i use neo4j through REST that this magic mapping will still work?
<workmad3> chare: there are other grapd dbs out there after all, and they have different mechanisms for communication
<JonnieCache> chare: all that mapping stuff is the preserve of activerecord. if youre not using activerecord it doesnt come into it
<workmad3> chare: hell, you can class RDF triplestores as graph DBs and they're typically queried through SPARQL
<workmad3> (or you can use the RDF.rb stuff for it)
pskosinski has joined #ruby
<chare> if magic mapping is coming from activerecord, then does that mean the controller class should just wing the rpc code to neo4j and populate instance variables for the view to use and do this all unmagically?
<workmad3> chare: and please stop talking about 'magic mapping'
<JonnieCache> chare: pretty much
<workmad3> chare: it's not 'magic'... it's just a bit of table introspection
<chare> MAGIC THE GATHERING
specialGuest has quit [Ping timeout: 244 seconds]
karakedi has quit [Ping timeout: 252 seconds]
<CodeFriar> If I have class A include Module B, shouldn't the Constants defined in class A be available to Module B ?
<hoelzro> CodeFriar: no, unless you explicitly say A::CONSTANT
<banisterfiend> CodeFriar: yes they should
<CodeFriar> ok, well thats one for and one against ...
<CodeFriar> they're working in my rspec tests
<CodeFriar> just not in my functional tests
<banisterfiend> CodeFriar: are you using class_eval at all?
<CodeFriar> no
cloud|droid has joined #ruby
jaylevitt has joined #ruby
<banisterfiend> they wont be available through a class_eval
<banisterfiend> well, they should def. be available because constants are looked up in the ancestor chain
<banisterfiend> CodeFriar: so stick a binding.pry in there and see what's going on
<banisterfiend> in your test where they're not being looked up
<CodeFriar> yeah, when i throw pry into the mix I definately do not have the constants
<hoelzro> oh, I see. I read the problem wrong.
<banisterfiend> CodeFriar: well first it's spelt *DEFINITELY*
<banisterfiend> for fuck sake
<banisterfiend> CodeFriar: second, do a bunch of YourClass.ancestors
<banisterfiend> to see if it's actually mixed in
<banisterfiend> and check whether the constants are in fact defined on the module
rohit has joined #ruby
<CodeFriar> banisterfiend: sorry for the spelling, still on my first cup o' coffee.
<banisterfiend> :)
<CodeFriar> the constants are defined in class A
<CodeFriar> and referenced in Module B that *is* mixed in.
<Apathetic> oh my, http://i.imgur.com/YpOJf.jpg
Jay_Levitt has quit [Ping timeout: 265 seconds]
<banisterfiend> CodeFriar: can you gist your session proving that? and proving that you cant access it, etc, and proving that the constants are defined on module u'r emixing in
<CodeFriar> banisterfiend: sure, I can post my session showing the ancestor chain, and that the class is defining the constants referenced in the module
<banisterfiend> CodeFriar: k00
<fowl> Apathetic: thats hella docs
<Apathetic> fowl, i only did gem install rails
<banisterfiend> Apathetic: do htis --no-ri --no-rdoc
<fowl> rails is huge lulz
<Apathetic> around 1gb?
<Pip> shevy, :D
adeponte has quit [Remote host closed the connection]
<JonnieCache> put the line "gem: --no-rdoc --no-ri" into ~/.gemrc and you'll never have to see that bullshit again
<JonnieCache> there was SO MUCH drama on this one github issue where the rubygems devs were refusing to make that the default
k_89 has quit [Ping timeout: 244 seconds]
<shevy> because they are girls
<JonnieCache> *rolleyes*
<fowl> JonnieCache: if it was the default, would the option to enable it be gem: --yes-rdoc --yes-ri ?
<JonnieCache> no it would obviously be --rdoc --ri
<Pip> Is there x64 version of RubyInstaller
<bnagy> no
<bnagy> did we not just cover this? :)
dpk has joined #ruby
<Pip> Oh, right :-)
<bnagy> if you need native 64 bit then use jruby
<fowl> Pip: im high too, dont worry (;
<bnagy> but tbh you probably don't
<JonnieCache> fowl: that gem: line in .gemrc just gets passed as arguments to every execution of the gem binary. --no-rdoc and so on are normal flags to that bin
<banisterfiend> CodeFriar: what is f.all ? and also the constant it's complaining about not finding is defined on User itself, not on the mixin, no?
chare has quit [Quit: Leaving]
<CodeFriar> banisterfiend: yes, it's defined on the User class not hte mixin. thats what i've been saying
<bnagy> hahah f.all
<Pip> I just had dinner, the brain lacks of oxygen
<bnagy> Math.sqrt( f.all? )
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
<CodeFriar> f.all is is just calling all on the f (user) object
linoj has joined #ruby
<fowl> JonnieCache: its hella useful btw, i tried to look through gems doc to find how to do that but as I looked around me at the text on the wall i became incredibly bored and forgot where I was.
<fowl> tl;dr thats a gem
<Apathetic> i can't find gemrc on my windows installation,
swair has joined #ruby
bluenemo_ has joined #ruby
bluenemo_ has quit [Client Quit]
bluenemo has quit [Read error: Connection reset by peer]
<banisterfiend> CodeFriar: oh, i got it round the wrong way, not the constants are not available :)
<banisterfiend> no the*
liluo has quit [Remote host closed the connection]
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
<CodeFriar> anything I can do to make that pattern work ?
sepp2k1 has quit [Quit: Leaving.]
<banisterfiend> CodeFriar: self::Constant
<fowl> CodeFriar: write an included? that uses const_get/set
<CodeFriar> fowl: could you say more ?
radic has quit [Disconnected by services]
radic_ has joined #ruby
<banisterfiend> CodeFriar: self.class::Const i mean
<Apathetic> ah it's located elsewhere
radic_ is now known as radic
<JonnieCache> Apathetic: you have to make the file
<JonnieCache> Apathetic: dont know where it should be under windows though
<fowl> CodeFriar: i would iterate over the constants when its included and copy them, but i've been told that my code is perl-ish
nwest has quit [Quit: Computer has gone to sleep.]
<shevy> your code is not perlish
<shevy> you omit the ()
<shevy> def foo arg
graspee_ has quit [Read error: Connection reset by peer]
cantonic has quit [Read error: Connection reset by peer]
<fowl> only on occasion, you need the ()s to do one liners
Banistergalaxy has joined #ruby
dhruvasagar has quit [Remote host closed the connection]
<CodeFriar> banisterfiend: thanks! self.class::CONST works. Rspec whines about it being accessed as a top-level constant but ... it works.
<banisterfiend> that's ruby not rspec whining, right?
<Apathetic> JonnieCache, how do I check if that gemrc was loaded mate?
<Apathetic> I placed it in ~/.gemrc
<JonnieCache> check that the options you put in there are being honored I guess?
<JonnieCache> i dont think theres an explicit way to check
hamstar has joined #ruby
<Apathetic> hmm okie.
<JonnieCache> if youve put that `gem: --no-rdoc --no-ri` line in there then just install a gem and you shouldnt see all that stuff about documentation
radic has quit [Ping timeout: 240 seconds]
berserkr has quit [Ping timeout: 276 seconds]
<Apathetic> ah, gem got installed immediately. thanks
dhruvasagar has joined #ruby
hamstar has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
doherty has joined #ruby
jenrzzz has joined #ruby
und3f has quit [Quit: Leaving.]
companion has joined #ruby
radic has joined #ruby
freeayu__ has joined #ruby
sspiff has quit [Ping timeout: 276 seconds]
locriani has joined #ruby
freeayu has quit [Ping timeout: 245 seconds]
cantonic has joined #ruby
Criztian has quit [Remote host closed the connection]
mklappstuhl has quit [Ping timeout: 276 seconds]
Criztian has joined #ruby
Squee- is now known as Pentacle
shiki has joined #ruby
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
Criztian has quit [Ping timeout: 244 seconds]
iori has quit [Remote host closed the connection]
jrajav has joined #ruby
kaiwren has joined #ruby
Pentacle has quit [Read error: Connection reset by peer]
yasushi has joined #ruby
lianoshana_ has joined #ruby
quazimodo has quit [Ping timeout: 240 seconds]
berserkr has joined #ruby
Pip__ has joined #ruby
kaiwren_ has quit [Ping timeout: 240 seconds]
quazimodo has joined #ruby
cloud|droid has quit [Quit: Leaving]
Pip has quit [Ping timeout: 276 seconds]
mahlon has quit [Read error: No route to host]
locriani has quit [Remote host closed the connection]
ged_ has joined #ruby
ged has quit [Read error: Connection reset by peer]
mahlon has joined #ruby
jaylevitt has quit [Quit: jaylevitt]
lianoshana_ has quit [Ping timeout: 244 seconds]
Apathetic is now known as Belieber
jenrzzz has quit [Ping timeout: 268 seconds]
ephemerian has quit [Quit: Leaving.]
bluenemo has quit [Remote host closed the connection]
lianoshana_ has joined #ruby
yasushi has quit [Remote host closed the connection]
geekbri has joined #ruby
`brendan has joined #ruby
verto|off is now known as verto
CodeFriar has quit [Quit: Leaving...]
rohit has quit [Quit: Leaving]
liluo has joined #ruby
tommyvyo has joined #ruby
iori has joined #ruby
Guest35217 has quit [Changing host]
Guest35217 has joined #ruby
Guest35217 is now known as n1x
jonathanwallace has joined #ruby
atmosx has joined #ruby
sspiff has joined #ruby
sspiff has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
carloslopes has joined #ruby
Strangebrew has joined #ruby
Strangebrew has left #ruby ["Leaving"]
swair has quit [Ping timeout: 276 seconds]
tommyvyo has quit [Quit: Computer has gone to sleep.]
t16815 has quit [Remote host closed the connection]
t53646 has joined #ruby
kpshek has joined #ruby
digitalcakestudi has joined #ruby
Vova has joined #ruby
Vova has left #ruby [#ruby]
shiki has quit [Remote host closed the connection]
markprovan has quit [Quit: Leaving.]
kpshek has quit [Ping timeout: 245 seconds]
shiki has joined #ruby
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
emmanuelux has joined #ruby
atmosx_noauth has joined #ruby
rakunHo has quit [Remote host closed the connection]
kpshek has joined #ruby
Takehiro has quit [Remote host closed the connection]
linoj has quit [Read error: Connection reset by peer]
<Belieber> look what i've got :D look what i've got: http://i.imgur.com/07TCI.jpg
linoj has joined #ruby
<JonnieCache> congrats :)
andrewhl has joined #ruby
<JonnieCache> whats browser is that?
<Belieber> chromium comodo build
tommyvyo has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
<JonnieCache> comodo build? combodo to me is either a dragon or a barely-compentent CA
<Belieber> okay, dragon.
<Belieber> haha
<Belieber> barely-competent CA?
<JonnieCache> certificate authority, the organisations that issue SSL certificates
lianoshana_ has quit [Quit: This computer has gone to sleep]
swair has joined #ruby
<JonnieCache> they got hacked and had their private signing keys stolen
<JonnieCache> supposedly by iranian amateurs but i dont believe that
CodeFriar has joined #ruby
Jay_Levitt has joined #ruby
Apathetic_ has joined #ruby
Apathetic_ has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Quit: leaving]
ken_barber has joined #ruby
dhruvasagar has joined #ruby
anybody has joined #ruby
<atmosx_noauth> iranian amateurs
<anybody> :O
<anybody> i'm not iranian
<atmosx_noauth> I'm an amateur
<anybody> me too
<fowl> im into voyeur
<atmosx_noauth> for reason of solidarity I support Iranian amateurs
Belieber has quit [Ping timeout: 248 seconds]
<atmosx_noauth> Russian amateurs written stuxnet apparently
<JonnieCache> http://pastebin.com/74KXCaEZ <=== a message from the supposedly l33t iranian patriotic hacker who bumped all those CAs
<atmosx_noauth> oh these amateurs
<JonnieCache> clearly nonsense
wangr has joined #ruby
<fowl> lol
<JonnieCache> get up to speed man obama already admitted to stuxnet
<anybody> oh my gosh they hacked comodo
<fowl> I'm not a group, I'm the equivalent of 1000 hackers!
niklasb has joined #ruby
<JonnieCache> its clearly a government group pretending to be a crazy kid in his bedroom. well it seems clear to me anyway
<atmosx_noauth> JonnieCache: on his twitter account?
<JonnieCache> eh?
<atmosx_noauth> JonnieCache: heh true. Imagine the surprise if it really was a kid in his bedroom hehe
CodeFriar has quit [Quit: Leaving...]
<JonnieCache> the guy issued a whole stream of statements http://pastebin.com/u/ComodoHacker
Spooner has joined #ruby
yasushi has joined #ruby
<JonnieCache> im convinced its a government looking to cover their activities with a bit of the lulzsec magic that was going on at that time
<JonnieCache> but i admit i dont have any actual evidence for that as such :)
<fowl> JonnieCache: are you the secret iranian man with the experience of 1000 hackers?
Belieber has joined #ruby
Belieber has joined #ruby
Belieber has quit [Changing host]
<fowl> needs a better name
<JonnieCache> now that you mention it "the strength of 1000 hackers" has a hilarious arabian-nights quality to it
anybody has quit [Read error: Connection reset by peer]
<JonnieCache> wonder if that was intentional
cassianoleal has joined #ruby
DuoSRX has joined #ruby
<Belieber> most of hackers are from fakistan
joephelius has joined #ruby
tectonic has quit [Ping timeout: 244 seconds]
<shevy> I like fuckistan
bluefish_ has quit [Quit: Ex-Chat]
cassianoleal has left #ruby [#ruby]
tectonic has joined #ruby
faulkner has quit [Ping timeout: 240 seconds]
ged__ has joined #ruby
mahlon_ has joined #ruby
MrWGW has quit [Ping timeout: 240 seconds]
obryan has joined #ruby
classix has quit [Ping timeout: 244 seconds]
ged_ has quit [Read error: Connection reset by peer]
classix has joined #ruby
MrWGW has joined #ruby
mahlon has quit [Ping timeout: 240 seconds]
spathi has quit [Ping timeout: 244 seconds]
faulkner has joined #ruby
hynkle has joined #ruby
fmcgeough has joined #ruby
cantonic has quit [Quit: cantonic]
locriani has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
Takehiro has joined #ruby
fmcgeough has quit [Client Quit]
fmcgeough has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
nanderoo has joined #ruby
sebicas has joined #ruby
kongy has joined #ruby
fuleo has quit [Ping timeout: 260 seconds]
<atmosx_noauth> 2 steps attack with lateral move, http://www.securelist.com/en/blog/208193786/Shamoon_the_Wiper_Copycats_at_Work - like Kung-Fu Panda!
nwest has joined #ruby
<shevy> wat
lkba has joined #ruby
choffstein has joined #ruby
ctp has joined #ruby
jrist has joined #ruby
spathi has joined #ruby
arietis has joined #ruby
locriani has quit [Remote host closed the connection]
locriani has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
wangr has quit [Remote host closed the connection]
GoGoGarrett has joined #ruby
Progster has joined #ruby
* Belieber broke FreeNode
fearoffish has joined #ruby
arietis has quit [Client Quit]
miho has joined #ruby
infinitiguy has joined #ruby
<shevy> Belieber you evil evil man
n1x has quit [Quit: Ex-Chat]
bbttxu has joined #ruby
locriani has quit [Ping timeout: 272 seconds]
wangr has joined #ruby
devdazed has joined #ruby
macer1 has joined #ruby
macer1 has joined #ruby
macer1 has quit [Changing host]
companion has quit [Remote host closed the connection]
macer1_ has joined #ruby
radic has quit [Disconnected by services]
[Neurotic] has quit [Quit: Leaving]
radic_ has joined #ruby
radic_ is now known as radic
t53646 has quit [Remote host closed the connection]
atmosx_noauth has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
t34590 has joined #ruby
v0n has joined #ruby
fuleo has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
cantonic has joined #ruby
digitalcakestudi has quit [Ping timeout: 248 seconds]
macer1__ has joined #ruby
macer1 has quit [Ping timeout: 260 seconds]
cantbecool has joined #ruby
banisterfiend has joined #ruby
sazboom has joined #ruby
macer1_ has quit [Ping timeout: 256 seconds]
cantbecool has quit [Client Quit]
macer1__ has quit [Remote host closed the connection]
cantbecool has joined #ruby
BiHi has joined #ruby
macer1 has joined #ruby
macer1 has joined #ruby
macer1 has quit [Changing host]
shiki has quit [Remote host closed the connection]
ananthakumaran has quit [Quit: Leaving.]
CodeFriar has joined #ruby
Apathetic_ has joined #ruby
mahmoudimus has joined #ruby
forrest has joined #ruby
klipeto has quit [Ping timeout: 240 seconds]
klip has joined #ruby
Belieber has quit [Ping timeout: 265 seconds]
mahmoudimus has quit [Client Quit]
uris has joined #ruby
mahmoudimus has joined #ruby
mahmoudimus has quit [Client Quit]
iamjarvo has joined #ruby
gift has joined #ruby
markprovan has joined #ruby
<sebicas> Anyone know something like this for Ruby? http://actionherojs.com/
digitalcakestudi has joined #ruby
markprovan has left #ruby [#ruby]
vlad_starkov has joined #ruby
macer1 has quit [Remote host closed the connection]
macer1 has joined #ruby
Tomasso has joined #ruby
johnlcox has joined #ruby
kongy has quit [Quit: kongy]
digitalcakestudi has quit [Ping timeout: 245 seconds]
ackz has joined #ruby
choffstein has quit [Remote host closed the connection]
specialGuest has joined #ruby
<workmad3> sebicas: best guess, I would suspect that eventmachine has plugins for all of those
linoj has quit [Quit: linoj]
yasushi has quit [Remote host closed the connection]
paolooo has joined #ruby
linoj has joined #ruby
xclite has joined #ruby
arturaz has quit [Remote host closed the connection]
ph^ has quit [Remote host closed the connection]
LouisGB has quit [Ping timeout: 272 seconds]
<sebicas> Grape ( https://github.com/intridea/grape ) is the closest I could find..
<sebicas> But still doesn't have the Socket's Part
yasushi has joined #ruby
Belieber has joined #ruby
Belieber has quit [Changing host]
Belieber has joined #ruby
<sebicas> And I like to use Ruby!
Apathetic_ has quit [Read error: Connection reset by peer]
t34590 has quit [Remote host closed the connection]
joshman_ has joined #ruby
AxonetBE has left #ruby [#ruby]
t73865 has joined #ruby
digitalcakestudi has joined #ruby
BlakeRG has joined #ruby
<lectrick> Is it possible to hook into when something goes out of scope?
<banisterfiend> lectrick: only with set_trace_func, but really your question is pretty vague :P
stopbit has joined #ruby
brasten has joined #ruby
pu22l3r has joined #ruby
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
Pip__ has left #ruby ["离开"]
jgarvey has joined #ruby
wvms has joined #ruby
_ikke_ has left #ruby ["WeeChat 0.3.7-dev"]
<shevy> lectrick define "goes out of scope"
fuleo has quit [Ping timeout: 260 seconds]
Takehiro has quit [Remote host closed the connection]
yasushi has quit [Remote host closed the connection]
jrajav has quit [Quit: The best darkness is strange and surprising]
jjbohn has joined #ruby
jjbohn has quit [Read error: Connection reset by peer]
jjbohn has joined #ruby
Takehiro has joined #ruby
jlogsdon has joined #ruby
Jake232 has quit [Quit: Computer has gone to sleep.]
<rking> Like in C++, when you declare a stack var then you know exactly when its destructor gets called.
lianoshana_ has joined #ruby
ananthakumaran has joined #ruby
Takehiro has quit [Remote host closed the connection]
kaiwren has quit [Quit: kaiwren]
<hoelzro> unfortunately, that's probably not doable in Ruby because of the nature of its GC
<hoelzro> but I could be wrong
<rking> lectrick: AFAIK the way Ruby people do similar is to just wrap the block in something else then yield inside.
digitalcakestudi has quit [Ping timeout: 276 seconds]
iori has quit [Remote host closed the connection]
<Mon_Ouie> Also using the ensure keyword to avoid problems in case of exceptions, etc.
Tobsn has quit [Quit: Linkinus - http://linkinus.com]
rump has joined #ruby
ConstantineXVI has quit [Quit: quit]
v0n has joined #ruby
<rking> Mon_Ouie: Aha, right. That's another reason people do that "guard" pattern on the stack.
<Belieber> can I ask why var.empty returns false whhile var.empty() returns an nometherror?
froy has joined #ruby
Takehiro has joined #ruby
<rking> Belieber: a) Odd nick. b) http://gist.github.com/ let's see more.
<fowl> you probably want #empty?
zemanel has joined #ruby
Takehiro has quit [Remote host closed the connection]
<fowl> rking: a belieber is one who believes in the Wholeness of bieber (PBUH)
<JonnieCache> Belieber: the method is called empty? there is no method empty without the ?
<rking> fowl: Yeah, that's why it's odd.
<Mon_Ouie> Well, yeah; the #empty? method exists, no the #empty method
<JonnieCache> in ruby methods that return true or false generally end in a ? but its not enforced
<fowl> Belieber: when this question comes up and im in pry, i think "ok, wtf is this `empty` method?" then like the l33t haxor i am i type "show-source fox.empty" and all my questions are answered (usually)
<fowl> (pryrepl.org)
<rking> Belieber: The trick here is that "?" is part of the method name. Imagine if it was a "q". ".emptyq" would not be weird. Now don't think of ".empty?" as weird.
andrewhl has quit [Remote host closed the connection]
<Belieber> ah .empty?() works
<fowl> also of value: show-doc String#empty?
<JonnieCache> the () is optional
Tobsn has joined #ruby
<rking> Optional and also uncool.
<Belieber> thanks guys
awarner has joined #ruby
<Belieber> ruby is for lazy typers eh?
<fearoffish> can't be bothered to answer that
<rking> Not about laziness. About omitting needless elements.
<rking> Vigorous coding is concise.
tonini has quit [Remote host closed the connection]
<Belieber> okay I think this is great place for me to start http://tryruby.org/
<rking> I should translate all of Strunk & White to programming.
Takehiro has joined #ruby
spathi has quit [Ping timeout: 244 seconds]
<JonnieCache> Belieber: yeah that site is good
spathi has joined #ruby
<JonnieCache> Belieber: http://rubykoans.com/ is similar but with slightly less handholding
<Belieber> though it takes time to run the command
<Belieber> ahh, thanks JonnieCache
Synthead has joined #ruby
Hanmac has joined #ruby
<peterhellberg> Ouch, I’ll probably need to upgrade an old Rails 2.3.14 app running under REE :/
<fearoffish> Belieber: my comment was irony by the way, I wasn't being an ass ;-)
v0n has quit [Ping timeout: 246 seconds]
Belieber is now known as Apathetic
rodasc has joined #ruby
zodiak has joined #ruby
DrShoggoth has joined #ruby
<JonnieCache> peterhellberg: upgrade it to what?
crodas has quit [Write error: Broken pipe]
<peterhellberg> JonnieCache: Probably 1.9.3-p194/Rails 3.2.8
<JonnieCache> peterhellberg: i strongly suggest you go 2.3 -> 3.0 -> 3.1 -> 3.2 rather than 2.3 -> 3.2
ameck has quit [Ping timeout: 245 seconds]
<JonnieCache> there have been a lot of big changes in those versions and it would suck having to implement them all at once
<peterhellberg> JonnieCache: Yeah, that is probably one of the better strategies
digitalcakestudi has joined #ruby
mikepack has joined #ruby
<JonnieCache> 3.0 is very different in all areas
<JonnieCache> then 3.1 has the asset pipeline. you really dont want all of that at once
<peterhellberg> In the best of worlds I’d just rewrite it in Sinatra
<JonnieCache> im sure you know all this but i recently had to do a similar job and its fresh on my mind
<JonnieCache> the pain, that is :)
<Sou|cutter> I feel like a lot of libs don't support 3.0 because AR is so different vs 3.1+
tagrudev has quit [Remote host closed the connection]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<JonnieCache> anything that hasnt been upgraded for 3.0+ by now is abandoned anyway. its not an issue
<peterhellberg> I just did a quick stab at upgrading all the way in a throwaway branch… It exploded in my face, as expected.
<Sou|cutter> you can just disable the asset pipeline though
<peterhellberg> Sou|cutter: Yeah, it’s an API anyways… so no HTML/CSS
<JonnieCache> the asset pipeline is actually great when you understand it, its just a lot to deal with all at once when youre upgrading an app
<Sou|cutter> ah, that would make things easier ;)
<JonnieCache> there is some gem that helps you upgrade as well, scans your app for old apis and gives you urls for guides how to update them
<JonnieCache> it works well
<Sou|cutter> oh really? What gem is that?
<Sou|cutter> I'd be curious..
Stalkr_ has joined #ruby
<JonnieCache> cant remember the name, its probably something like "rails3-upgrade" or whatever
<Sou|cutter> hah, I think you're right
companion has joined #ruby
SCommette has joined #ruby
<JonnieCache> yeah thats it. it even does the routes automatically, which is probably half the work facing peterhellberg if hes doing an api
specialGuest has quit [Changing host]
specialGuest has joined #ruby
erichmenge has joined #ruby
mklappstuhl has joined #ruby
<peterhellberg> Yep, I’m using that plugin… Life would be even more miserable without it :)
RegEchse has joined #ruby
tomsthumb_ has quit [Quit: Leaving.]
bradhe has joined #ruby
<banisterfiend> move this bs to #railsfags4life
radic has quit [Read error: Connection reset by peer]
v0n has joined #ruby
revans has joined #ruby
jasond has joined #ruby
digitalcakestudi has quit [Ping timeout: 240 seconds]
xbayrockx has quit [Read error: Connection reset by peer]
banisterfiend has quit [Read error: Connection reset by peer]
* any-key throws up rails gang sign
xbayrockx has joined #ruby
banisterfiend has joined #ruby
obryan has quit [Read error: Operation timed out]
* JonnieCache imagines the rails crew inventing gang signs for themselves, thinking its really funny then all getting stabbed at sxsw
<rking> Haha
obryan has joined #ruby
<any-key> Austin rails devs, unite!
<fowl> hlol
<any-key> no other austin ruby bros in here?
bbttxu has quit [Quit: bbttxu]
* rking = Lubbock.
<rking> And I'll actually be in Austin this weekend.
<rcassidy> b-austin (boston.)
<any-key> rking: woot!
nilg has quit [Remote host closed the connection]
<any-key> all the ruby action in texas is happening here
<tcopp> transplated from austin.
<shevy> rails ate ruby
<shevy> it's official now
Apathetic has quit [Ping timeout: 244 seconds]
anybody has joined #ruby
<fowl> >> ruby = Rails
<al2o3cr> -e:1:in `eval': uninitialized constant Rails (NameError), from -e:1:in `eval', from -e:1:in `<main>'
companion has quit [Ping timeout: 276 seconds]
<any-key> don't worry they fixed that in ruby 3.0
jorge_ has joined #ruby
gogiel has joined #ruby
imami|afk is now known as banseljaj
mklappstuhl has quit [Ping timeout: 240 seconds]
mneorr has joined #ruby
axl_ has quit [Quit: axl_]
deryl has quit [Quit: deryl]
k_89 has joined #ruby
macer1 has quit [Remote host closed the connection]
wargasm has quit [Read error: Connection reset by peer]
macer1 has joined #ruby
radic has joined #ruby
axl_ has joined #ruby
<any-key> my new favorite thing is codepen.io
andrewhl has joined #ruby
<any-key> jsfiddle is neat too, but I like codepen's UI
\13k has joined #ruby
digitalcakestudi has joined #ruby
<any-key> also, I'd like to wtf @ jruby's RAM needs
<any-key> I'd be screwed had my employer not given me 8GB of RAM
radic has quit [Disconnected by services]
radic_ has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
<anybody> is anybody there?
radic_ is now known as radic
BlakeRG has left #ruby [#ruby]
<peterhellberg> any-key: But to be fair, the JVM use all the memory you give it… right?
<any-key> basically
<any-key> it's fast, I can't deny that
<any-key> BUT it has a ridiculous startup time
banisterfiend has quit [Read error: Connection reset by peer]
<any-key> great in production, a PITA for local dev
Araxia has joined #ruby
banisterfiend has joined #ruby
areil has joined #ruby
bradhe has quit [Ping timeout: 265 seconds]
ctp_ has joined #ruby
davidroy has joined #ruby
wargasm has joined #ruby
<davidroy> someone know whats wrong with my syntax here… sports.map{|sport| [sport.id, sport.children.map{|ch| ch.map(&:id), ch.name.map(&:id)}} . or know of a better way to get all id values from a 3d object
<hoelzro> davidroy: what error do you get when you execute that?
ctp has quit [Ping timeout: 240 seconds]
verto is now known as verto|off
<peterhellberg> any-key: You can use NailGun for faster startup time
<davidroy> varies between needing a extra ] which i don't know where. Or 1.9.2p290 :001 > sports.map{|sport| [sport.id, sport.children.map{|ch| ch.map(&:id), ch.name.map(&:id)}}
<davidroy> 1.9.2p290 :002?> }
<davidroy> SyntaxError: (irb):1: syntax error, unexpected ',', expecting '}'
zinjacoder has joined #ruby
<davidroy> ...children.map{|ch| ch.map(&:id), ch.name.map(&:id)}}
<davidroy> ... ^
<any-key> |ch| ch.map(&:id), ch.name.map(&:id) is the problem
<any-key> dunno what that comma is there for
jblack has quit [Ping timeout: 252 seconds]
<any-key> do you want that to return an array
v0n has quit [Ping timeout: 246 seconds]
<any-key> also, I'd recommend refactoring, because that's kinda ugly :P
mklappstuhl has joined #ruby
<fowl> davidboy: when you do "return 1, 2" thats an implicit array, and you cannot use "1, 2" to implicitly return (syntax doesnt allow it)
<any-key> put square brackets around that part
meskyanichi has joined #ruby
<davidroy> ok i'll give them a try
swair has quit [Ping timeout: 276 seconds]
<davidroy> and all i want is a flat array of id values
<any-key> just place them randomly and everything should work out
* fowl pushes any-key
<fowl> lol
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
tk_ has quit [Quit: ばいばい]
<any-key> don't make me hurt you
obryan1 has joined #ruby
kvirani has joined #ruby
obryan has quit [Ping timeout: 276 seconds]
<peterhellberg> Oh, using the NailGun support in JRuby really makes a difference
<davidroy> any-key: yes is is very ugully code, i would like to have used just @obj.map(&:id) but this only gets me the first layer of id's
ridgehkr has joined #ruby
jprovazn is now known as jprovazn_away
<ridgehkr> i've tried to install middleman via "gem install middleman", but get this: http://hastebin.com/ratinobeme.pl
lianoshana_ has quit [Quit: This computer has gone to sleep]
<ridgehkr> OS X 10.7.4
wvms has quit [Quit: wvms]
<ridgehkr> anyone able to help?
<any-key> "You have to install development tools first."
mohits has quit [Remote host closed the connection]
<any-key> have you done that?
<ridgehkr> thank you, @any-key. Yes, i have installed Xcode and command line tools
<any-key> okay cool
<ridgehkr> using Xcode 4.4.1
<any-key> looks like you need ffi.h
<ridgehkr> how can i get that?
<any-key> do you have macports or homebrew installed?
<ridgehkr> i have homebrew
<ridgehkr> and rvm
<any-key> brew install ffi
<any-key> try that
<ridgehkr> ran that, got "Error: No available formula for ffi "
<any-key> or libffi
<any-key> I'm just guessing lol
<any-key> yeah libffi is what you want
<ridgehkr> i actually already have macports, ran that command, and got this. do i need to be concerned, or are things okay? http://hastebin.com/gisigokinu.pl
<ridgehkr> (i ran brew install libffi)
davidcelis has quit [Quit: K-Lined.]
dhruvasagar has quit [Ping timeout: 240 seconds]
freeayu__ has quit [Ping timeout: 260 seconds]
deryl has joined #ruby
<any-key> meh just try installing the gem again
<fowl> it says it was built
<fowl> doesnt it
<ridgehkr> dang. didn't work. got this: http://hastebin.com/tufesagaju.pl
<ridgehkr> true
SCommette has quit [Quit: SCommette]
v0n has joined #ruby
lianoshana_ has joined #ruby
radic_ has joined #ruby
radic has quit [Disconnected by services]
Takehiro has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
radic_ is now known as radic
SCommette has joined #ruby
Takehiro has joined #ruby
aganov has quit [Quit: aganov]
deo_ has joined #ruby
banisterfiend has joined #ruby
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
<ridgehkr> any ideas? :-/
anybody has quit [Ping timeout: 244 seconds]
apeiros_ has quit [Remote host closed the connection]
adac has joined #ruby
lusory has quit [Ping timeout: 244 seconds]
cantbecool has quit [Quit: Textual IRC Client: www.textualapp.com]
emmanuelux has quit [Ping timeout: 276 seconds]
<adac> Hi guys. How can I split a string by the last occurrence of a "/"?
fuleo has joined #ruby
mahlon_ is now known as mahlon
<JonnieCache> split on a regex thats something like /.*\/.*\Z/
d3vic3 has quit [Quit: leaving]
<JonnieCache> one of those .* will need a ? after it but I cant think of the specifics right now
<Mon_Ouie> Use #rindex to get the last index of "/", and simply get the parts around it with String#[]
<JonnieCache> or that
Tomasso has quit [Ping timeout: 245 seconds]
<shevy> long live ruby!
haxrbyte_ has quit [Remote host closed the connection]
FunnyLookinHat has joined #ruby
<ridgehkr> @any-key any more ideas?
<any-key> nope
superjoe has joined #ruby
<Mon_Ouie> ridgehkr: What's the compilation error log?
tomsthumb_ has joined #ruby
<ridgehkr> @Mon_Ouie the error at the command line, or in mkmf.log?
<Mon_Ouie> Latter
sazboom_ has joined #ruby
<ridgehkr> i actually can't find mkmf.log
<peterhellberg> >> "a/b/c/d".split(/\/(.?+)\Z/)
<al2o3cr> (Array) ["a/b/c", "d"]
<Mon_Ouie> And what's gem_make.out? I guess it's just the same as the command line output
mmitchell has joined #ruby
<ridgehkr> yes, the contents of that are here: http://hastebin.com/tufesagaju.pl
<mmitchell> anyone here feel like helping me out with rvm issues? :)
<ridgehkr> but i can't find mkmf.log
<any-key> mmitchell: #rvm
sazboom has quit [Ping timeout: 246 seconds]
<mmitchell> any-key: are you in that room now? I can't seem to join, instead get an error "#rvm Cannot join channel (+r) - you need to be identified with services"
mklappstuhl has quit [Ping timeout: 276 seconds]
peterhellberg has quit [Remote host closed the connection]
<Mon_Ouie> You need to register your nick and identify
<Mon_Ouie> See NickServ
<mmitchell> ahh ok
<adac> >> "a/b/c/d".split(/\/(.?+)\Z/)[0]
<al2o3cr> (String) "a/b/c"
aaroncm has joined #ruby
<adac> >> "a/b/c/d".split(/\/(.?+)\Z/)[1]
<al2o3cr> (String) "d"
wobr has quit [Ping timeout: 252 seconds]
<mmitchell> info mmitchell
radic has quit [Ping timeout: 245 seconds]
<mmitchell> oops, Mon_Ouie how do I send the "info" command to the irc server?
<mmitchell> or "register" etc.
<rcassidy> adac: there is also rpartition
<JonnieCache> type /msg nickserv help
<rcassidy> >> "a/b/c/d".rpartition("/")
<mmitchell> JonnieCache: cool thanks
<al2o3cr> (Array) ["a/b/c", "/", "d"]
RichGuk has left #ruby ["WeeChat 0.3.3-dev"]
carloslopes has quit [Ping timeout: 240 seconds]
<adac> rcassidy, looks cleaner :)
hadees has quit [Quit: hadees]
t73865 has quit [Remote host closed the connection]
t35494 has joined #ruby
erichmenge has quit [Quit: Be back later]
wargasm has quit [Ping timeout: 276 seconds]
<rcassidy> adac: are you using it to get a filename or something from a path?
zeromodulus has joined #ruby
savage- has quit [Remote host closed the connection]
<adac> actually it is a path, and i wnated to get back the last folder
<rcassidy> cos then the File module might have some more responsible utilities
bbttxu has joined #ruby
rlb3 has joined #ruby
<adac> /path/to/folder => folder
wargasm has joined #ruby
<adac> but the path here is a string
<rcassidy> >> File.dirname "/here/is/a/path/file.txt"
<al2o3cr> (String) "/here/is/a/path"
<rcassidy> uh, that's not it hang on
<rcassidy> lol
<Hanmac> >> File.basename("/path/to/folder")
<al2o3cr> (String) "folder"
<rcassidy> ty hanmac :)
<rcassidy> i was close
sazboom__ has joined #ruby
wpaulson has joined #ruby
<adac> hehe
<adac> thank you folks
geggam has quit [Quit: Leaving]
zeromodulus has quit [Remote host closed the connection]
ridgehkr has left #ruby [#ruby]
sazboom_ has quit [Ping timeout: 246 seconds]
eldariof has quit [Ping timeout: 260 seconds]
workmad3 has quit [Ping timeout: 244 seconds]
mparodi_ has joined #ruby
paulovittor23 has joined #ruby
hoelzro is now known as hoelzro|away
mklappstuhl has joined #ruby
Takehiro has quit [Remote host closed the connection]
mparodi has quit [Ping timeout: 252 seconds]
Progster has quit [Ping timeout: 246 seconds]
Takehiro has joined #ruby
haxrbyte has joined #ruby
SegFaultAX has joined #ruby
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has joined #ruby
kpshek has quit []
sebicas has quit [Quit: sebicas]
davidcelis has joined #ruby
davidcelis has quit [Read error: Connection reset by peer]
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
davidcelis has joined #ruby
CharlieSu has left #ruby [#ruby]
havenn has joined #ruby
tessi has quit [Ping timeout: 244 seconds]
benson has joined #ruby
bbttxu has quit [Quit: bbttxu]
bluenemo has quit [Remote host closed the connection]
MetaCosm has quit [Max SendQ exceeded]
MetaCosm has joined #ruby
circlicious has joined #ruby
circlicious has joined #ruby
circlicious has left #ruby [#ruby]
verto|off is now known as verto
strnx has quit [Ping timeout: 276 seconds]
<circlicious> hey
<circlicious> what is %Q {} for ?
n1x has joined #ruby
Muz has quit [Ping timeout: 245 seconds]
rcj_ has quit [Quit: ZNC - http://znc.sourceforge.net]
qwerxy has joined #ruby
<JonnieCache> its the same as ""
<JonnieCache> for when you really need a string literal with lots of quotes in it
Muz has joined #ruby
<circlicious> ok
rcj_ has joined #ruby
ddouglas has joined #ruby
n1x has quit [Remote host closed the connection]
xorigin has quit [Quit: leaving]
<ddouglas> excuse me folks, where might I find the rails production log file?
<JonnieCache> in the log directory of your rails app
<JonnieCache> RAILS_ROOT/log/production.log
<ddouglas> thanks
<JonnieCache> if it isnt there something is wrong
hynkle has quit [Quit: Computer has gone to sleep.]
recycle has joined #ruby
<Hanmac> and otherwise he should ask in a better channel
mahmoudimus has joined #ruby
mklappstuhl has quit [Ping timeout: 276 seconds]
<fearoffish> wait, Ruby and Rails are the same thing, aren't they????
<Muz> No.
<Muz> Ruby is a langauage. Rails is a framework built using the Ruby language.
<fearoffish> </sarcasm>
<fearoffish> I thought the multiple ??? would have shown that ;-)
<Muz> It's often hard to tell the idiots, trolls, noobs, and serious questions apart in here.
<fearoffish> understood, my apologies :)
randomautomator has joined #ruby
krusty_ar has joined #ruby
qwerxy has quit [Quit: offski]
<Hanmac> fearoffish it happends often that rails users wonder why some methods are not exist on plain-ruby too
shevy has quit [Ping timeout: 240 seconds]
<fearoffish> yeah, that I've seen
<fearoffish> which is why I teach my students Ruby first
ephemerian has joined #ruby
rking has quit [Ping timeout: 256 seconds]
adam__ has joined #ruby
benson has left #ruby ["Leaving"]
QKO has quit [Ping timeout: 240 seconds]
ProT-0-TypE has quit [Quit: Leaving]
qwerxy has joined #ruby
randomautomator has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
<Hanmac> fearoffish: teach them C first ... then C++, then Ruby
<Hanmac> and see how happy they are when they learned an "higher" language :P
<fearoffish> hehe
randomautomator has joined #ruby
<fearoffish> make them feel inadequate first, I get it
<fearoffish> ;)
<JonnieCache> if i was teaching programming to noobs i'd alternate between lessons using rails and lessons using ARM assembly on an embedded board
QKO has joined #ruby
<JonnieCache> i think that would give them a rounded view of the field :)
joast has quit [Quit: Leaving.]
<fearoffish> you'd collect any sharp objects when they enter the room, obviously
<JonnieCache> haha
savage- has joined #ruby
<JonnieCache> arm assembly is much easier than x86 assembly
tomsthumb_ has quit [Quit: Leaving.]
<JonnieCache> im not a bastard
<fearoffish> haha
<Hanmac> you mean any C# objects? XD
<fearoffish> :)
aspiers has quit [Ping timeout: 252 seconds]
<JonnieCache> seriously though i think thats a good idea. at the end of the course you could get the arm chips talking to the rails apps through json
<JonnieCache> obviously the students would have to be fairly smart
<Hanmac> ARM is cool, rails is not :P
<JonnieCache> alright, sinatra, whatever
mohits has joined #ruby
whalesalad has joined #ruby
<whalesalad> hey guys how do you do inline if/else? this is not working, "Admin" if user.admin? else "---"
lianoshana_ has quit [Quit: This computer has gone to sleep]
<JonnieCache> condition ? trueval : falseval
<whalesalad> is that the only way to do it?
<JonnieCache> its called a ternery conditional
<whalesalad> i've seen blah if x before
radic has joined #ruby
<whalesalad> like the human readable variant
<JonnieCache> i think you can do `if cond then foo else bar` perhaps
<JonnieCache> its the `then` thats the weird bit
<fearoffish> but 99% of debs understand ternary, so I'd use that
<fearoffish> devs*
<JonnieCache> also you can do `blahblah() if foo`
maletor has joined #ruby
<JonnieCache> but you dont get an else
greenysan has quit [Ping timeout: 240 seconds]
<whalesalad> dammit. I understand it as well but I am from the python world where you write sentences of code basically
<Hanmac> whalesalad you could do "x if y" but in that form you cant use else
<whalesalad> okay
<whalesalad> cool, thanks guys
<fearoffish> no need to 'dammit' me, jesus!
<whalesalad> haha
und3f has joined #ruby
<JonnieCache> `if x then y else z` is as close to a sentence as your going to get surely?
mneorr has left #ruby [#ruby]
yoklov has joined #ruby
<JonnieCache> omg i just used to wrong form of you're
adeponte has joined #ruby
artOfWar has joined #ruby
<fearoffish> yes you did, shame on you
<JonnieCache> whats the name of that japanese thing called where you stick your sword through your stomach again?
<fearoffish> you also failed to apostrophe the dont
<JonnieCache> jesus that sentence wasnt up to much either was it?
<heftig> harakiri
<whalesalad> this works fine, user.admin? ? 'Admin' : ''
<whalesalad> this does not work, if user.admin? then 'Admin' else ''
deryl has quit [Quit: deryl]
<whalesalad> the sentence thing is not working hehe
<heftig> or seppuku
<Hanmac> JonnieCache if i had an ARM chip/system i would test my c++ gems :P
azm has quit [Ping timeout: 276 seconds]
<fearoffish> sure it is: 'Admin' if user.admin?
<whalesalad> fearoffish: the else bit.
<whalesalad> i specifically need that empty string
<JonnieCache> Hanmac: you have a phone, right?
<JonnieCache> everyone has an arm system
luxurymode has joined #ruby
<fearoffish> '' ||= 'Admin' if user.admin? maybe?
<JonnieCache> ick
<Hanmac> yeah ... but imo its not good enough to develop ruby stuff on it ...
<fearoffish> haha
Agis__ has joined #ruby
<JonnieCache> look
<JonnieCache> fuck conditionals
<fearoffish> okay, so it wasn't syntactically correct or pretty
<JonnieCache> user.role.title_case
<Agis__> hey, anyone here that's subscribed on DestroyAllSoftware screencasts?
<JonnieCache> there we are
<davidcelis> Agis__: plenty
<fearoffish> JonnieCache: ++
<Agis__> I was thinking to subscribe either in this or railscasts...
apok has quit [Quit: apok]
shevy has joined #ruby
<Agis__> what do you think?
lianoshana_ has joined #ruby
<fearoffish> I respect RailsCasts a lot
<JonnieCache> the railscasts are great
Progster has joined #ruby
<JonnieCache> if you get paid to do rails $9 a month is nothing for what you get
<davidcelis> Agis__: both
<fearoffish> if you want just rails, that is
<Agis__> sure
deo_ has quit [Quit: Leaving]
xorox90 has quit [Quit: 전 이만 갑니다.]
<fearoffish> PeepCode is good also
<fearoffish> s/good/great
<davidcelis> Agis__: Railscasts will help you get better at Rails. Destroy All Software will help you get better at software and architecting it
<JonnieCache> yes peepcode is very indepth
Eldariof-ru has joined #ruby
rking has joined #ruby
urbann has joined #ruby
qwerxy has quit [Quit: offski]
mmitchell has quit [Remote host closed the connection]
artOfWar has quit [Remote host closed the connection]
tewecske has quit [Read error: Connection timed out]
artOfWar has joined #ruby
jasonLaster has joined #ruby
workmad3 has joined #ruby
mmitchell has joined #ruby
fuleo has quit []
choffstein has joined #ruby
<Agis__> I see
m_3_ has quit [Read error: Connection reset by peer]
vitoravelino is now known as vitoravelino`afk
reactormonk has quit [Ping timeout: 245 seconds]
lampe2 has joined #ruby
kenichi has joined #ruby
pdtpatrick has joined #ruby
insecurlex has joined #ruby
joast has joined #ruby
yoklov has quit [Quit: computer sleeping]
m_3 has joined #ruby
adamkittelson has joined #ruby
geggam has joined #ruby
mramaizng has joined #ruby
<lampe2> hey i wanne write a gem for a Learning Metadata Object short LOM. this are just some metadata fields like mp3tags but i wanne write them so that everybody how uses this can use it with there database. should i write a activedata, datamapper extension ?
digitalcakestudi has quit [Ping timeout: 265 seconds]
apeiros_ has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
havenn has quit [Remote host closed the connection]
deryl has joined #ruby
insecurlex has quit [Remote host closed the connection]
hoelzro|away is now known as hoelzro
havenn has joined #ruby
bluenemo has joined #ruby
iori has joined #ruby
lurch_ has joined #ruby
apeiros_ has quit [Ping timeout: 265 seconds]
<lurch_> hi, after doing a "bundle install --path vendor", how do i tell "bundle exec" to load gems from the "vendor" subdir?
pdtpatrick has quit [Remote host closed the connection]
reactormonk has joined #ruby
adac has quit [Ping timeout: 248 seconds]
ringotwo has joined #ruby
<fearoffish> it should automatically
t35494 has quit [Remote host closed the connection]
<fearoffish> it writes a .bundle file
Criztian has joined #ruby
bricker88 has joined #ruby
<fearoffish> which it loads in
t90197 has joined #ruby
Guest93734 has quit [Remote host closed the connection]
<Paradox> booobs!
Jackneill has quit [Read error: Connection reset by peer]
<shevy> yes!
<lurch_> fearoffish: thanks
hynkle has joined #ruby
vitoravelino`afk is now known as vitoravelino
tatsuya_o has quit [Remote host closed the connection]
mrsrikanth has joined #ruby
butblack has joined #ruby
qwerxy has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
butblack has left #ruby [#ruby]
bbttxu has joined #ruby
havenn has quit [Remote host closed the connection]
MarGarina has quit [Ping timeout: 244 seconds]
<devdazed> hi all, im using net/smtp to send a message and in the message body I have something like "#{my_array.join('\n')" when the message is sent the line breaks seem to have been escaped. is there any way around this?
haxrbyte has quit [Remote host closed the connection]
carloslopes has joined #ruby
<workmad3> devdazed: join("\n"), not join('\n')
carloslopes has quit [Client Quit]
carloslopes has joined #ruby
cirwin has joined #ruby
havenn has joined #ruby
davidroy has quit [Quit: davidroy]
<devdazed> jesus, total brain fart. thanks workmad3
<workmad3> devdazed: :)
mohits has quit [Ping timeout: 276 seconds]
_sazboom_ has joined #ruby
locriani has joined #ruby
apok has joined #ruby
havenn has quit [Remote host closed the connection]
roicho has joined #ruby
eighty4 has joined #ruby
eighty4 has joined #ruby
eighty4 has quit [Changing host]
eighty4 has quit [Excess Flood]
elaptics is now known as elaptics`away
s1n4 has joined #ruby
elaptics`away is now known as elaptics
sazboom__ has quit [Ping timeout: 246 seconds]
eighty4 has joined #ruby
majyk has joined #ruby
bier has quit [Ping timeout: 240 seconds]
zinjacoder has quit [Quit: Peace!]
havenn has joined #ruby
ddouglas has quit [Quit: Ex-Chat]
lurch_ has quit [Quit: lurch_]
BiHi has quit [Quit: Computer has gone to sleep]
roicho has left #ruby ["Leaving"]
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
indstry has joined #ruby
indstry has quit [Client Quit]
qwerxy has quit [Quit: offski]
<luckyruby> http_response = http.response.split("\n").map(&:strip).join("\n") How would I do the same using only regex?
indstry has joined #ruby
indstry has quit [Client Quit]
<davidcelis> why use regex for that?
<luckyruby> would it not be faster?
<cirwin> http_response.gsub! /\s+$/, ''
<davidcelis> http.response.gsub /\s+\n\s+/, ''
<davidcelis> cirwin: wouldntyoursremovespacesbetweenwords?
apok has quit [Remote host closed the connection]
<cirwin> no, but it only removes spaces at the end of lines
<davidcelis> oh the $
<davidcelis> true dat
<cirwin> yours misses spaces at the beginning of the string
t90197 has quit [Remote host closed the connection]
apok has joined #ruby
bier has joined #ruby
<davidcelis> personally i think the split-map-join is fine
QKO_ has joined #ruby
<cirwin> davidcelis: but it might be slooow!
t24371 has joined #ruby
<davidcelis> OH NOEZ
<davidcelis> true
<luckyruby> heh, i'll benchmark and let ya guys know the diff
<davidcelis> luckyruby: thx
<cirwin> luckyruby: you'll have to be better at regexes than either of us :)
majyk has left #ruby ["Leaving"]
specialGuest has quit [Ping timeout: 244 seconds]
graft has joined #ruby
graft has joined #ruby
luxurymode has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
v0n has quit [Ping timeout: 246 seconds]
QKO has quit [Ping timeout: 245 seconds]
br4ndon has joined #ruby
c0rn_ has joined #ruby
hoelzro is now known as hoelzro|away
Monie has quit [Quit: Quit]
ananthakumaran has quit [Quit: Leaving.]
ananthakumaran has joined #ruby
jeff_sebring has joined #ruby
havenn has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
Niamkik has joined #ruby
Monie has joined #ruby
Monie has joined #ruby
Monie has quit [Changing host]
havenn has joined #ruby
BrokenCog has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
hadees has joined #ruby
alvaro_o has joined #ruby
andrewhl_ has joined #ruby
mrsolo has joined #ruby
<doherty> This application uses ActiveRecord. I have an object with subnet_id, which is a foreign key. I need to search the foreign table for that item, get squid_proxy_id, which is also a foreign key, and get the object that squid_proxy_id refers to. I've never used ActiveRecord before - how can I do that?
mramaizng has left #ruby [#ruby]
elhu has quit [Ping timeout: 244 seconds]
<Hanmac> doherty i think you are in the wrong channel ... try #rubyonrails
<davidcelis> was about to answer, realized this is #ruby
elaptics is now known as elaptics`away
<doherty> alrighty
andrewhl has quit [Ping timeout: 265 seconds]
havenn has quit [Ping timeout: 268 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<luckyruby> heh, both of yours didn't work
<davidcelis> honestly bro just do the split-map-join :P
<luckyruby> so i combined both of what you guys had and ended up with http_response = http.response.gsub(/^\s+|\s+$/,'')
<Hanmac> doherty: the problem is that there are ruby users that not uses ActiveRecord before ... but mostly rails users did
<doherty> It's no problem. Thanks for the pointer
<cirwin> luckyruby: gsub! is designed for this case
cj3kim has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
sdfasdf has joined #ruby
stkowski has joined #ruby
sdfasdf has left #ruby [#ruby]
v0n has joined #ruby
macmartine has joined #ruby
cj3kim has quit [Client Quit]
deryl has quit [Quit: deryl]
codabrink has joined #ruby
<codabrink> What is the best way to convert a number to a string of that length of a specific character?
<codabrink> For example converting 5 => "#####"
<Hanmac> >> "#" * 5
<al2o3cr> (String) "#####"
<codabrink> Thank you Hanmac
<davidcelis> >> 5.times { print "Odelay! " }
<al2o3cr> Odelay! Odelay! Odelay! Odelay! Odelay! (Fixnum) 5
wendallsan has joined #ruby
<wendallsan> anyone have any experience with watir? I'm trying to navigate a site with some hidden elements that appear as you interact with a form on the page, but interacting with the form via watir doesn't seem to make the element visible, even though doing this manually does make the element visible.
<Hanmac> >> 5.times.map { "Odelay! " }.join
CoverSlide has joined #ruby
<al2o3cr> (String) "Odelay! Odelay! Odelay! Odelay! Odelay! "
lianoshana_ has quit [Quit: This computer has gone to sleep]
noyb has joined #ruby
joephelius has quit [Quit: brb]
<iamjarvo> wendallsan: is the test headless?
virunga has joined #ruby
<wendallsan> iamjarvo: yes
<fowl> >> 5.times.map { "Happy happy " }.*(5).join
<al2o3cr> (String) "Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy Happy happy "
shadoi has joined #ruby
mahmoudimus has joined #ruby
<iamjarvo> is there a way you can make it not headless and look at what its doing? also im guessing this is a javascript test did you specify that it is a js test
mklappstuhl has joined #ruby
greenysan has joined #ruby
<wendallsan> iamjarvo: sure thing, let me just set the browser to something other than xvfb and try again
<fowl> >> 3.times.map{"\x03#{rand(10)}HI"}.join
<al2o3cr> (String) "\x035HI\x038HI\x033HI"
<fowl> >> puts 3.times.map{"\x03#{rand(10)}HI"}.join
<al2o3cr> (NilClass) nil, Console: HIHIHI
t24371 has quit [Remote host closed the connection]
TPFC-SYSTEM has joined #ruby
t45105 has joined #ruby
ryan0x2 has joined #ruby
lianoshana_ has joined #ruby
gmci has quit [Quit: Computer has gone to sleep.]
<davidcelis> >> 30.times.map { "
<al2o3cr> (String) ...
<al2o3cr> ... "\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\x92\xA9\xF0\x9F\ ...
<al2o3cr> ... x92\xA9\xF0\x9F\x92\xA9"
juarlex has quit [Read error: Connection reset by peer]
juarlex has joined #ruby
<macer1> LOL
gmci has joined #ruby
<davidcelis> >> print "ಠ_ಠ"
<davidcelis> oh cmon
<davidcelis> ಠ_ಠ
<macer1> (ノಥ益ಥ)ノ ┻━┻
<macer1> also I dont think print works
<macer1> ruby have puts
<Hanmac> "
<macer1> >> puts "(ノಥ益ಥ)ノ ┻━┻"
<macer1> o.O
<wendallsan> iamjarvo: aha, you hit it on the head, there was a popup modal window thing coming up that wasn't happening when I was going through it manually as I'd proably already set a sesison cookie or something
<wendallsan> iamjarvo: huge thanks
<fowl> (づ。◕‿‿◕。)づ
cj3kim has joined #ruby
<iamjarvo> wendallsan: anytime
<fearoffish> awwwe, peek at you!
Jake232 has joined #ruby
qwerxy has joined #ruby
<davidcelis> macer1: Of course Ruby has print
<davidcelis> macer1: I used it above
ajones_ has joined #ruby
ltrujillo has joined #ruby
amiddleton has joined #ruby
tclayton_ has joined #ruby
<macer1> >> print "srsly?"
<al2o3cr> srsly?(NilClass) nil
<macer1> >> puts "test"
<al2o3cr> (NilClass) nil, Console: test
workmad3 has quit [Ping timeout: 248 seconds]
fastred has quit [Quit: fastred]
DuoSRX has quit [Remote host closed the connection]
\13k has quit [Quit: gg]
Agis__ has quit [Quit: Agis__]
insecurlex has joined #ruby
insecurlex has quit [Read error: Connection reset by peer]
<Hanmac> fowl i have found an sexy fanart with holly short XD
<fowl> whos that? link anyways
<fowl> >> print 3.times.map{"\x03#{rand(10)}HI"}.join
<al2o3cr> HIHIHI(NilClass) nil
<fowl> >> print 3.times.map{"\x02\x03#{rand(10)}HI"}.join
<al2o3cr> HIHIHI(NilClass) nil
<fowl> oh this channel filters it
<macer1> >> require 'base64'; puts Base64::decode64("KO++ieCypeebiuCypSnvvokg4pS74pSB4pS7Cg==").force_encoding("utf-8")
banisterfiend has quit [Read error: Connection reset by peer]
<macer1> ...
<macer1> cmon
fermion has quit [Quit: Computer has gone to sleep.]
<macer1> bad bot
peregrine81 has joined #ruby
banisterfiend has joined #ruby
iori has quit [Ping timeout: 240 seconds]
voodoofish430 has joined #ruby
<lampe2> hey i code a main file with a class lom and i got a subdirectory with a file called general.rb now i wanne use the methods in the lom class how can i do that?
<fearoffish> require '../lom.rb' would do it
Squarepy has quit [Ping timeout: 240 seconds]
luxurymode has joined #ruby
havenn has joined #ruby
gen0cide_ has joined #ruby
hynkle has quit [Ping timeout: 244 seconds]
<Hanmac> lampe2 no ... use require_relative "../lom.rb"
<lampe2> her you can find the code https://github.com/lampe/lom
locriani has quit [Remote host closed the connection]
locriani has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
fermion has joined #ruby
opus has joined #ruby
ltrujillo has quit [Quit: Ex-Chat]
ajones_ has left #ruby ["Ex-Chat"]
<lampe2> if i do require_relative it says `<main>': private method `general' called for :Lom::Lom (NoMethodError)
fmcgeough has quit [Quit: fmcgeough]
<fearoffish> ruby 1.9?
cek has joined #ruby
<lampe2> fearoffish, yes
cek has quit [Quit: жопа диридай диридиридай]
<fearoffish> hmm, that's the only reason I've seen that before
<shevy> lom lom lom
<shevy> in 1.8 times, good old plain require was enough
<lampe2> oh i got it :D
<shevy> sometimes things regress before they progress
<lampe2> i must says that the method is public :D
Vert has quit [Read error: Connection reset by peer]
jasonLaster has quit [Remote host closed the connection]
fmcgeough has joined #ruby
fmcgeough has quit [Client Quit]
jasonLaster has joined #ruby
DuoSRX has joined #ruby
<Hanmac> lampe2 you defined general in the wrong scope maybe
mohits has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
jasonLas_ has joined #ruby
gfontenot has joined #ruby
<lampe2> yeah Hanmac it was private...
hynkle has joined #ruby
jasonLaster has quit [Read error: Connection reset by peer]
amiddleton has quit [Quit: Ex-Chat]
cakehero has joined #ruby
joephelius has joined #ruby
bluenemo_ has quit [Remote host closed the connection]
<luckyruby> went from 69 to 72 req/s when I switched to regex
havenn has quit [Ping timeout: 244 seconds]
SeySayux has quit [Ping timeout: 244 seconds]
<lampe2> uff iam confussed right now... i wanne to something like myobject.myobject.mymethod and i dont know how to do that...
havenn has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
sebicas has joined #ruby
emmanuelux has joined #ruby
havenn has quit [Remote host closed the connection]
Spooner has quit [Ping timeout: 248 seconds]
linoj has quit [Quit: linoj]
havenn has joined #ruby
<Hanmac> lampe2:why that? " myobject.myobject" ... or what do you want ecactly?
aantix has joined #ruby
axl_ has quit [Ping timeout: 252 seconds]
<shevy> lampe2 no
<shevy> foo.method_name
<shevy> lampe2, in method_name, you can try to return another object
pzol has left #ruby ["Sayonara!"]
mrdodo has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
havenn has quit [Remote host closed the connection]
<lampe2> i got a LOM object this has for example a General object in it and Educational object. now i wanne say LOM.General.Title and this puts the title
rump has quit [Quit: rump]
haxrbyte has joined #ruby
havenn has joined #ruby
<shevy> lol Hanmac
banisterfiend has joined #ruby
<doherty> What does the nil method mean in "if @thing.nil?"
<shevy> lampe2, usually what follows behind the . is the name of the method
monobit_ is now known as asteve
<shevy> lampe2, so when you do foo.General then General() is a method. def General
sebicas has left #ruby [#ruby]
<shevy> it's ugly to use upcase method name however
<shevy> doherty, "if @thing is nil"
<shevy> @thing = nil
johnlcox has quit [Ping timeout: 268 seconds]
<shevy> or uninitialized
Araxia has quit [Quit: Araxia]
<shevy> @thing = "some value" # @thing is not nil
<lampe2> okay shevy but how i can than do lom.general.title ?
SeySayux has joined #ruby
<lampe2> just def general.title ?
havenn has quit [Remote host closed the connection]
<doherty> okay, I didn't recognize the word "nil" :P
haxrbyte has quit [Remote host closed the connection]
patient has joined #ruby
haxrbyte has joined #ruby
<shevy> doherty it means nothing, or "does not exist", null, nada
<shevy> niente
<shevy> non existerano
<shevy> hmm I am outta words now
<lampe2> ohhhhhh
<lampe2> thx shevy :D
GoGoGarrett has joined #ruby
fris has joined #ruby
<patient> hey guys, i'm creating a ruby project and was wondering if it's a good practice to name both the class file on 'lib/' and the main file on 'bin/' after the project
<shevy> how many "class files" do you have
<patient> for now one
<patient> it's a small project
<shevy> if your project is called patient_likes_ruby
<shevy> and you have a class called PatientLikesRuby
echobravo has quit [Ping timeout: 246 seconds]
<shevy> then you have a directory called lib/ first
<shevy> and inside that lib/ directory you will have a
<shevy> patient_likes_ruby.rb files
<shevy> and a
<shevy> patient_likes_ruby/ directory
<Sou|cutter> What's the right way to serialize and deserialize from a file with Marshal.dump ? I'm getting a Encoding::UndefinedConversionError Exception: "\xE8" from ASCII-8BIT to UTF-8 when I try to write a Marshal.dump of a hash that AFAICT contains all utf-8 strings and Time objects
ctp_ has quit [Quit: Linkinus - http://linkinus.com]
<shevy> aaaaah Encoding fun :-D
<Sou|cutter> shevy: indeed
<patient> hm shevy :/ and what goes under the 'patient_likes_ruby/' dir?
<fris> trying to use a gem to create github repos, it worked fine before, but now im getting an error http://pastie.org/4557678
<shevy> patient the file with your class
hoelzro|away is now known as hoelzro
dhruvasagar has joined #ruby
<shevy> damn freenode spam!
<patient> for what i was peeking at github, i thought 'lib/patient_likes_ruby.rb' and 'bin/patient_likes_ruby.rb' was more the "ruby way" to do it
rump has joined #ruby
<shevy> bin/ is simple
<patient> the file on bin/ being what i call on terminal
hynkle has quit [Ping timeout: 256 seconds]
<shevy> yes
<shevy> patient, well I suppose if your project really just has one .rb file, you can put it into lib/
<shevy> but for more than one, people will create a directory
<patient> i see
cantonic has quit [Ping timeout: 260 seconds]
Takehiro has quit [Remote host closed the connection]
<patient> if the project starts to grow, i should create a 'name_of_project/' dir and move my lib/ files there, then?
ras0ir has joined #ruby
<davidcelis> patient: lib/file.rb should do one of two things. Declare a top-level class named after the file, or declare a module named after the file.
<patient> right right
<shevy> patient, yes, except for one base .rb file loading your other files
<davidcelis> patient: If it declares a module and you'll be nesting classes or other modules inside of it, you should also make lib/module_name/ to declare nested shit.
<davidcelis> patient: And this is recurisve, so if a nested module has other nested modules, continue making directories as needed.
t45105 has quit [Remote host closed the connection]
t36288 has joined #ruby
<patient> thanks for the tip davidcelis, but my question is more where to put my "executable" file, the file responsible for instantiating stuff on 'lib/'
<patient> the interface with the user, so to speak
und3f has quit [Ping timeout: 276 seconds]
<davidcelis> patient: Executables go in bin/
<davidcelis> name them whatever you want.
<davidcelis> but you should exclude the .rb extension
<patient> and there's nothing against having a project named 'test', a 'lib/test.rb' containing a Test class and a 'bin/test.rb' responsible for instantiating a Test object and doing it's business?
<davidcelis> instead, have the top-line of the ruby file be a ruby shebang: #!/usr/bin/env ruby
<patient> oh i see
bluenemo has quit [Remote host closed the connection]
mohits has quit [Ping timeout: 265 seconds]
<davidcelis> having a file extension on executables that you run from the command line is not typical
<patient> right
<patient> that was pretty helpful, thanks a lot davidcelis and shevy
<davidcelis> and no, there is nothing against what you just described
<shevy> yeah once you wrote two or three projects on your own, you'll understand it intuitively
<patient> just moving from compiled languages, so it's still a bit weird to me
zemanel has quit [Quit: Remote hottie closed the connection]
rippa has joined #ruby
hynkle has joined #ruby
reset has joined #ruby
joephelius has quit [Ping timeout: 260 seconds]
brianpWins has joined #ruby
SCommette has quit [Quit: SCommette]
wallerdev has quit [Quit: wallerdev]
fris has quit [Quit: .]
arvidkahl has joined #ruby
s1n4 has quit [Quit: leaving]
<Sou|cutter> maybe I have to File.open('foo', 'wb') instead of 'w'...
qwerxy has quit [Quit: offski]
ackz has quit [Read error: Connection reset by peer]
azm has joined #ruby
ackz has joined #ruby
banghouse has joined #ruby
<lampe2> why ruby says her nillclass if i call l = Lom.new; putsl.general ? the source: https://gist.github.com/3406459
ananthakumaran has quit [Quit: Leaving.]
<doherty> I have an array of objects, each with an attribute called name. How do I say "If none of the objects are named 'Bacon', then flip the pancakes"?
llaskin has joined #ruby
<llaskin> anyone have experience with the ruby mysql class?
khakimov has joined #ruby
jimpsson has joined #ruby
broerd has joined #ruby
hynkle has quit [Read error: Connection reset by peer]
<hoelzro> doherty: you could probably use Enumerable#none?
<hoelzro> ex. if objects.none? { |o| o.name == 'Bacon' } then flip_pancakes end
SeySayux has joined #ruby
SeySayux has quit [Changing host]
rump has quit [Changing host]
rump has joined #ruby
jgrevich has joined #ruby
apeiros_ has joined #ruby
azm is now known as Guest89825
dhruvasagar is now known as Guest5934
und3f has joined #ruby
kryptek_ has quit [Quit: changing servers]
<doherty> So, that block will set o to each element in turn (that's what |o| means), and then runs the test "o.name=='Bacon'"
<hoelzro> yup
johnlcox has joined #ruby
<doherty> sweet
banisterfiend has quit [Read error: Connection reset by peer]
Axsuul has joined #ruby
Bosma has joined #ruby
<doherty> Are the question and exclamation marks at the end of methods part of the method name, or is that a method modifier or operator or something?
broerd has left #ruby [#ruby]
banisterfiend has joined #ruby
<hoelzro> doherty: part of the name
joephelius has joined #ruby
<hoelzro> ? means a predicate
<doherty> Is there a convention for their use?
<hoelzro> ! means something "dangerous"
havenn has joined #ruby
<hoelzro> which can range from mutating the given object
<hoelzro> (ex. string.sub vs string.sub!)
<hoelzro> or doing something "radical"
<hoelzro> (ex. exit vs exit!)
hynkle has joined #ruby
<doherty> okay, thanks
zburt has joined #ruby
paolooo has quit [Ping timeout: 245 seconds]
<zburt> I have a method called "add_contact". I have a variable, foo, whose value is "add_contact". How can I use foo to call add_contact() (and pass in params)?
<hoelzro> zburt: you can accomplish that with the send method
lurch_ has joined #ruby
<rcassidy> ruby 1.8.5 makes me sad :(
<zburt> hoelzro: send(foo, params) ?
Takehiro has joined #ruby
<hoelzro> ex. obj.send 'foo'.to_sym, *params
Takehiro has quit [Remote host closed the connection]
t36288 has quit [Remote host closed the connection]
elhu has joined #ruby
<apeiros_> no need for to_sym
ph^ has joined #ruby
t94086 has joined #ruby
<apeiros_> but if you use a literal, use a symbol straight away.
<hoelzro> oh? I wasn't aware of that!
<hoelzro> awesome =)
<zburt> Does send need to be called on an object
<apeiros_> zburt: of course
<apeiros_> zburt: *all* methods must be called on an object
havenn has quit [Ping timeout: 256 seconds]
<apeiros_> methods without an explicit receiver are called on self
caiges has joined #ruby
<zburt> send(h[type], :device_id => @device_id, :flex_id => @flex_id, :number => num)
<zburt> Like that?
<hoelzro> that should do it
Takehiro has joined #ruby
<hoelzro> as long as you want to call h[type] on self
mikepack has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 240 seconds]
SCommette has joined #ruby
<lampe2> why i got her i nilclass error i dont get it https://gist.github.com/3406459 ?????
emmanuelux has quit [Ping timeout: 276 seconds]
<lampe2> if i call on Lom.general
<zburt> Thanks hoelzro
doherty has quit [Quit: Leaving]
<hoelzro> lampe2: try Lom::Lom.general
<apeiros_> lampe2: line 10 should probably go into initialize?
<hoelzro> also, your def general method definition is redundant
<hoelzro> attr_accessor supplies that for you
rippa has joined #ruby
Speed has joined #ruby
erichmenge has joined #ruby
<lampe2> if have updatet it still nilclassmethod when i do: l = Lom.new; l.general ??? the code: https://gist.github.com/3406631
<hoelzro> lampe2: try l = Lom::Lom.new
stopbit has quit [Read error: Connection reset by peer]
<Speed> How does one get the number after the decimal point without rounding on a float? For instance 2.4 -> 0.4. My solution was to do "n - n.to_i" or divmod(1), but that isn't accurate
<Speed> or should I use big Decimal
erichmenge has quit [Client Quit]
<lampe2> hoelzro, in my main i got includeed lom so this is not the error the nilclasserror comes when i call general
kenichi has quit [Remote host closed the connection]
<Speed> (24.4).divmod(1) => [24, 0.3999999999999986]
<fowl> Speed: remainer 1, in this case 2.4 % 1 => 0.4
<fowl> or about
erichmenge has joined #ruby
rlb3 has quit [Quit: rlb3]
<Speed> fowl try it :P
stopbit has joined #ruby
<fowl> >> 2.4 % 1
<al2o3cr> (Float) 0.3999999999999999
<Speed> 24.4 % 1 => 0.3999999999999986
<Speed> :)
<Speed> I guess BigDecimal is needed
<danheberden> .39999999 IS .4
<patient> Float class has a floor method i believe
<hoelzro> lampe2: what line is it occurring on?
<apeiros_> >> "%.40f" % 24.4
<al2o3cr> (String) "24.3999999999999985789145284797996282577515"
<fowl> lol
erichmenge has quit [Client Quit]
<apeiros_> Speed: 24.4 is not 24.4
<danheberden> oh, well THAT isn't
<apeiros_> that's how floats work
<Speed> yeah I know :/
<fowl> 24.4 isnt 24.4?
erichmenge has joined #ruby
<apeiros_> no, (float)24.4 is an approximation of (decimal)24.4
<lampe2> hoelzro, her https://gist.github.com/3406655 on line 8
<Speed> heh (a = BigDecimal.new("24.4") % 1).to_f
<hoelzro> I'm not sure what's wrong, sorry
<apeiros_> oh dear…
<apeiros_> >> "%.40f" % (a = BigDecimal.new("24.4") % 1).to_f
<al2o3cr> -e:1:in `eval': uninitialized constant BigDecimal (NameError), from -e:1:in `eval', from -e:1:in `<main>'
<apeiros_> >> require 'bigdecimal'; "%.40f" % (a = BigDecimal.new("24.4") % 1).to_f
<al2o3cr> (String) "0.4000000000000000222044604925031308084726"
aldodelgado has joined #ruby
<Speed> I need it down to 2 decimals anyway
coyo has joined #ruby
<lampe2> okay but thx to try to help :) hoelzro
<fowl> >> "%.4f"%(1.0/0)
<al2o3cr> (String) "Inf"
<apeiros_> Speed: then what's your problem with 0.3999999999999986 ?
<Speed> hmm
specialGuest has joined #ruby
<Speed> I could round it yes, heh
<apeiros_> …
radge has joined #ruby
<Speed> I'm just used to avoid any rounding to my part
<apeiros_> if you display a float to N digits, you *always* round it
<zburt> Is there an RSpec equivalent to have_content that accepts regex?
<apeiros_> again, that's how floats work.
llaskin has left #ruby [#ruby]
mtfk has left #ruby [#ruby]
reset has quit [Quit: Leaving...]
caiges has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Spooner has joined #ruby
<apeiros_> Speed: you may want to read how float works
caiges has joined #ruby
<apeiros_> it might help you to understand what you're actually doing
lianoshana_ has quit [Quit: This computer has gone to sleep]
caiges has quit [Client Quit]
Progster has quit [Ping timeout: 272 seconds]
<fowl> so if the floating points are inaccurate, why has nobody invented fixed point floats
<hoelzro> fowl: that's what BigDecimal is for
<rcassidy> lol at 'fixed point float'
<coyo> fowl: floating points are usually accurate enough for most things, but each language will have special objects for big numbers.
<apeiros_> fowl: define 'fixed point float'
<apeiros_> and yes, probably your definition will simply define what bigdecimal is.
<coyo> fowl: are you familiar with artimus fowl?
<fowl> in that case, see bigdecimal
<fowl> coyo: no
bluenemo has joined #ruby
bluenemo has quit [Remote host closed the connection]
<coyo> fowl: http://www.artemisfowl.com/ (warning, flash)
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
jenrzzz has joined #ruby
<coyo> they are children's books, but i enjoyed them when i was younger.
banisterfiend has quit [Read error: Connection reset by peer]
Morkel has quit [Quit: Morkel]
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
d3vic3 has joined #ruby
banisterfiend has joined #ruby
erichmenge has joined #ruby
t94086 has quit [Remote host closed the connection]
rlb3 has joined #ruby
t95477 has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
Speed is now known as Guest61094
mikepack has joined #ruby
coyo has quit [Changing host]
coyo has joined #ruby
k_89 has quit [Ping timeout: 272 seconds]
banseljaj is now known as imami|afk
fermion has quit [Quit: P]
n1x has joined #ruby
ringotwo has quit [Remote host closed the connection]
tomsthumb_ has joined #ruby
echobravo has joined #ruby
tommyvyo_ has joined #ruby
tommyvyo_ has joined #ruby
tommyvyo_ has quit [Changing host]
cj3kim has quit [Read error: Connection reset by peer]
hemanth has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
tommyvyo has quit [Read error: Connection reset by peer]
Sgeo_ has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
tommyvyo_ is now known as tommyvyo
burgestrand has joined #ruby
havenn has joined #ruby
hemanth has joined #ruby
wargasm1 has joined #ruby
Guest61094 is now known as Speed
lianoshana_ has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
tomsthumb_ has quit [Client Quit]
wargasm has quit [Ping timeout: 276 seconds]
Sgeo has quit [Ping timeout: 276 seconds]
vlad_starkov has joined #ruby
burgestrand has quit [Ping timeout: 240 seconds]
graspee has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
havenn has quit [Ping timeout: 245 seconds]
ringotwo has joined #ruby
Bosma has quit [Ping timeout: 240 seconds]
qwerxy has joined #ruby
PapaSierra has quit [Read error: Connection reset by peer]
atmosx has joined #ruby
maletor has joined #ruby
verto is now known as verto|off
Jake232 has quit [Read error: Connection reset by peer]
Bosma has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
seich_ has joined #ruby
mike4_ has joined #ruby
mrsrikanth has quit [Quit: Leaving]
banisterfiend has quit [Read error: Connection reset by peer]
<atmosx> aloha
banisterfiend has joined #ruby
wallerdev has joined #ruby
kenichi has joined #ruby
elux has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
<davidcelis> atmosx: not sure if saying hello, or goodbye
<atmosx> well hello :-)
shadoi has quit [Quit: Leaving.]
<shevy> aloha is the traditional greeting of the sugar daddies
<atmosx> I lost almost a week reading about SQLite3 design to end up with 3 tables in 1 sqlite3 db.
<shevy> then comes the hip swinging
<shevy> yay!
Jake232 has joined #ruby
adac has joined #ruby
<atmosx> add the festivities I've written 0 lines in almost 6 days… and if you had asked me when I created mr_sqlite.rb I was sure that it will be ready in aprox 3 hours
<atmosx> sugar daddies?
paolooo has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
kirun has joined #ruby
chriskk has quit [Quit: chriskk]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
tclayton_ has quit [Quit: Ex-Chat]
shadoi has joined #ruby
banisterfiend has joined #ruby
johnlcox has quit [Quit: Computer has gone to sleep.]
<rcassidy> >> __method__
<shevy> yes
<al2o3cr> (NilClass) nil
<rcassidy> o_O
<shevy> aloha - swinging on the beach with a drink in their hands
erichmenge has quit [Quit: Linkinus - http://linkinus.com]
<shevy> atmosx, I think you have the sugar daddy shape already
<shevy> lots of beer
erichmenge has joined #ruby
Stalkr_ is now known as Stalkr_brb
erichmenge has quit [Client Quit]
<atmosx> hehe I don't drink beers
<atmosx> I drink coca-cola
specialGuest has quit [Changing host]
specialGuest has joined #ruby
macer1 has quit [Remote host closed the connection]
erichmenge has joined #ruby
<atmosx> I seriously want some goodies
<shevy> what kind of goodies
<atmosx> goodies is something like macdonalds
Stalkr_brb is now known as Stalkr_
t95477 has quit [Remote host closed the connection]
t25904 has joined #ruby
<atmosx> only 5 times more tasty
<atmosx> It's a Greek chain of fast food.
<atmosx> Since pizza in Greece sucks big time, while in Chech Republic is comparable only with South Italian pizza
<atmosx> I'll go junk-food
<atmosx> and I finnished my db design which is *normalizatoin read&
SQLStud has joined #ruby
kenichi has quit [Ping timeout: 256 seconds]
rasbonics has joined #ruby
jrajav has joined #ruby
rasbonics has quit [Client Quit]
rasbonics has joined #ruby
johnlcox has joined #ruby
mikepack has quit [Remote host closed the connection]
JStoker has quit [Excess Flood]
banisterfiend has quit [Read error: Connection reset by peer]
pzol has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
Guest89825 has quit [Ping timeout: 268 seconds]
banisterfiend has joined #ruby
mikepack has joined #ruby
<diegoviola> i'm iterating on a method like this: obj.some_method.each ... but sometimes that method would return nil so it will get me an error, what's a good way to workaround that?
<diegoviola> sorry for the n00b question
<hoelzro> (obj.some_method || []).each, perhaps?
und3f has quit [Ping timeout: 276 seconds]
ras0ir has left #ruby [#ruby]
opus has quit [Quit:]
<savage-> Array(obj.some_method).each { |x| ... }
<savage-> if obj.some_method returns nil, then Array(nil) => []
Progster has joined #ruby
berserkr has quit [Quit: Leaving.]
<diegoviola> what will that do?
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
bradhe has joined #ruby
macmartine has joined #ruby
locriani has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
blazed has joined #ruby
wargasm1 has quit [Ping timeout: 245 seconds]
<diegoviola> Array(obj.some_method).each <-- each will be run only if what returns is an array?
Tomasso has joined #ruby
bradhe has quit [Remote host closed the connection]
<hoelzro> diegoviola: no, it'll convert the argument to an array
<hoelzro> Array(nil) happens to return []
mikepack has quit [Remote host closed the connection]
<diegoviola> oh
<diegoviola> ty
<diegoviola> very nice
<diegoviola> thanks
qwerxy has quit [Quit: offski]
moshee has quit [Ping timeout: 252 seconds]
axl_ has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
mikepack has joined #ruby
stopbit has quit [Read error: Connection reset by peer]
stopbit has joined #ruby
elhu has joined #ruby
Niamkik has quit [Remote host closed the connection]
yekta has joined #ruby
JStoker has joined #ruby
naz has quit [Read error: Connection reset by peer]
tchebb has joined #ruby
und3f has joined #ruby
QKO has joined #ruby
Guest5934 has quit [Ping timeout: 240 seconds]
jblack has joined #ruby
forrest has quit [Quit: forrest]
QKO_ has quit [Ping timeout: 245 seconds]
rlb3 has quit [Quit: rlb3]
rizzy has quit [Quit: Leaving]
IPGlider has joined #ruby
lianoshana_ has quit [Quit: This computer has gone to sleep]
tomsthumb_ has joined #ruby
atmosx has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Read error: Connection reset by peer]
paolooo has quit [Ping timeout: 245 seconds]
obryan1 is now known as obryan
kenichi has joined #ruby
banisterfiend has joined #ruby
wpaulson has joined #ruby
johnlcox has quit [Quit: Computer has gone to sleep.]
cesurasean has joined #ruby
nilg has joined #ruby
macer1 has joined #ruby
macer1 has joined #ruby
macer1 has quit [Changing host]
<cesurasean> where do i post to for this chan? is pastebin.com ok?
<apeiros_> gist.github.com, pastie.org are the preferred
<otters> "okay" is the perfect way to describe pastebin.com
<apeiros_> pastebin still add riddled?
<otters> yes
<shevy> long live pastie.org!
<shevy> and the otter. long live all the cuddly otters
blazed has quit []
<shevy> whoa almost 700 folks here
tvw has joined #ruby
<shevy> #python still leading on us... 1024 something there
* Hanmac cross its fingers
cj3kim has quit [Quit: This computer has gone to sleep]
<Hanmac> nooo :(
<lampe2> hmpffffffffffffff
<shevy> #perl at 640
<shevy> hah!
<lampe2> i cant get this thing to work...
<shevy> surprising to see python having so many more people tho
<shevy> lampe2 why not
<shevy> lampe2 do you have CLARITY IN YOUR MIND what you want
Eldariof59-ru has joined #ruby
<Hanmac> ruby it more "cute" then python ... but its "mean"er too :P
v0n has quit [Ping timeout: 246 seconds]
<otters> ruby is less shit than python
<lampe2> shevy, what i want is this: when i do l = Lom.new than i can do something like that l.general.title = " title" and if i only do l.general.title it return the title
<diegoviola> ruby <3
lianoshana_ has joined #ruby
<diegoviola> do you guys like rubinius?
<diegoviola> :D
<Mon_Ouie> Then make l.general return some object (it's vague what it's supposed to represent) that has a title accessor
gentz has quit [Ping timeout: 272 seconds]
<diegoviola> what do you think of it, do you use it?
<lampe2> Mon_Ouie, this is what i do: https://github.com/lampe/lom/blob/master/lib/lom.rb but it says nilclass for general
jgrevich has quit [Ping timeout: 276 seconds]
<Mon_Ouie> Because it's spelt initialize
Eldariof-ru has quit [Ping timeout: 248 seconds]
<lampe2> oh nooooo
<lampe2> nooooo
<cesurasean> im trying to find out how to fix this error with an app im trying to install; http://pastie.org/4558176
<Mon_Ouie> It's funny they abbreviated tons of things (to_str, to_sym, dup, …) but not that
<cesurasean> can someone assist me real quick??
johnlcox has joined #ruby
<lampe2> OMG it works
<lampe2> thx Mon_Ouie
Guedes is now known as Guedes_out
mklappstuhl has quit [Ping timeout: 276 seconds]
cool has joined #ruby
cool has joined #ruby
cool has quit [Changing host]
cool has joined #ruby
sepp2k has joined #ruby
<Mon_Ouie> cesurasean: There's a version conflict. rake/tasklib.rb has been loaded from the gem and rake.rb from stdlib
hynkle has quit [Ping timeout: 252 seconds]
cantonic has joined #ruby
Morkel has joined #ruby
carloslopes has quit [Quit: Leaving.]
jasonkuhrt has joined #ruby
Juul has joined #ruby
Chryson has quit [Quit: Leaving]
gentz has joined #ruby
coyo has quit [Quit: Heaven is not a place, it's being with people who love you.]
banisterfiend has quit [Read error: Connection reset by peer]
<macer1> matti: hey
davidcelis has quit [Quit: K-Lined.]
<jasonkuhrt> Hi, I have a problem with heroku-mongo-sync, a plugin for the heroku cli, when the ruby script a rescue LoadError occures indicating that require 'mongo' failed, but when I try the same thing (require 'mongo') in irb, it seems to work, any help is much appreciated
<matti> Hi macer1
banisterfiend has joined #ruby
<macer1> can you try to help me with EM and bindata :D?
chriskk has joined #ruby
kristopolous has joined #ruby
hynkle has joined #ruby
jeff_sebring has quit [Quit: Leaving]
wpaulson_ has joined #ruby
<kristopolous> so I want to do something like "module A; require 'file'; end" ... is there a way?
elhu has quit [Quit: Computer has gone to sleep.]
v0n has joined #ruby
<apeiros_> kristopolous: you can do just that. but it makes little to no sense.
<apeiros_> what problem are you trying to solve?
jrajav has quit []
<kristopolous> I have some solution where people can pull together multiple arbitrary ruby files
<kristopolous> and it works ok so long as they don't contain the same class names
workmad3 has joined #ruby
<apeiros_> that's what namespacing exists for
<apeiros_> you namespace classes to avoid name collisions
<kristopolous> right, but I don't want to transfer the problem to the users
katherinem13 has quit [Quit: katherinem13]
<kristopolous> I would like to be able to wrap their code cleanly
<kristopolous> and transparently
<cirwin> kristopolous: you could eval the string loaded from the file
<cesurasean> Mon_Ouie, how do i fix the version conflict then?
<cirwin> that's what rackup files do
<apeiros_> you won't make it easier for the user by coming up with an intransparent, non-idiomatic solution.
<kristopolous> I've thought of that
<apeiros_> use proper and tried ruby idioms.
<apeiros_> reinventing the wheel here will lead to a worse solution.
<kristopolous> right, but my users aren't necessarily rubyists
<kristopolous> they just want to get things done
hynkle has quit [Ping timeout: 252 seconds]
wpaulson has quit [Ping timeout: 272 seconds]
<kristopolous> so I want to make their lives as easy as possible
<TTilus> kristopolous: what is your usecase?
wpaulson_ is now known as wpaulson
<cirwin> kristopolous: give your users what they need, not what they want :
<cirwin> :)
<kristopolous> well this solution is a web-stack that enables people to build front-ends to large applications that run on custom rigs ... most of the people going in are EE or C/C++ people
mklappstuhl has joined #ruby
<kristopolous> they probably are quite shaky with html/js/ruby etc
<cirwin> EE?
<kristopolous> electrical engineers
<cirwin> cool
<TTilus> kristopolous: what you are asking for, or rather what it sounds like, is not an easy one at all
johnlcox has quit [Quit: Computer has gone to sleep.]
<kristopolous> for many of them, OOP would be a bit too much of a burden
<kristopolous> or a hassle
<kristopolous> or should I say, the smart ones don't have the problem I just described
<kristopolous> I need to solve it for the other ones
cantonic has quit [Quit: cantonic]
yoklov has joined #ruby
<kristopolous> anyway, eval is the thing in question
<TTilus> kristopolous: how complex are the "front ends"?
<kristopolous> is there much of a penalty?
<cirwin> kristopolous: pry won't work unless you set the __FILE__ and __LINE__ right
katherinem13 has joined #ruby
<cirwin> and watch out for crazy syntax
<kristopolous> pry?
<TTilus> something like single webpage?
reset has joined #ruby
<kristopolous> some of them do single web page
<kristopolous> some of them, don't
iamjarvo has quit [Ping timeout: 244 seconds]
<kristopolous> some of them are using erb and haml, and others frontpage
macer1_ has joined #ruby
jbw has quit [Ping timeout: 276 seconds]
<TTilus> im talking about the ones created by the people you need this protections for?
macer1__ has joined #ruby
johnlcox has joined #ruby
<cesurasean> Can someone elaborate what Mon_Ouie was trying to tell me?
<kristopolous> I didn't really go deep into the architecture
<kristopolous> past the point of having to do this
hadees has quit [Quit: hadees]
p2w has joined #ruby
rippa has quit [Ping timeout: 246 seconds]
<TTilus> could you run the parts as separate processes and avoid the whole namespace issue alltogether?
bowlowni_ has quit [Remote host closed the connection]
macer1 has quit [Ping timeout: 276 seconds]
<macer1__> oops
<macer1__> kernel panic
<kristopolous> well it all sits on top of rainbows
<macer1__> >.>
macer1__ is now known as macer1
macer1 has quit [Changing host]
macer1 has joined #ruby
<kristopolous> and the user uses a command line tool that writes a rackup file behind the scene
<macer1> so as I wrote, matti..
JustinCampbell has joined #ruby
macer1_ has quit [Ping timeout: 260 seconds]
nanderoo has quit [Quit: Leaving.]
h4mz1d has joined #ruby
<TTilus> kristopolous: plus you would gain os level protection against all sorts of runaway code
macer1_ has joined #ruby
<kristopolous> oh I can't do it
macer1 has quit [Disconnected by services]
macer1_ is now known as macer1
macer1 has quit [Changing host]
macer1 has joined #ruby
mneorr has joined #ruby
Takehiro has quit [Remote host closed the connection]
davidcelis has joined #ruby
<macer1> matti, can you help me with that eventmachine we talked last time :D?
headius has joined #ruby
Foxandxss has joined #ruby
<cesurasean> im trying to find out how to fix this error with an app im trying to install; http://pastie.org/4558176
<cesurasean> can sommeone help me out?
graspee has quit [Quit: leaving]
<kristopolous> eval(File.open ... it is then
elux has quit [Quit: Bye!]
Guedes has joined #ruby
Guedes has joined #ruby
Guedes has quit [Changing host]
graspee has joined #ruby
<Mon_Ouie> cesurasean: I don't know, it just indicates there's something wrong about the way rake is loaded
<Mon_Ouie> One guess would be the gem needs to be explicitly activated before being required
_sazboom_ has quit [Ping timeout: 246 seconds]
<Mon_Ouie> (gem "rake"; require "rake")
<cesurasean> gift, ive read all that. nothing seems to work.
<gift> meh.
hynkle has joined #ruby
<cesurasean> i tried to install 0.8.7, but it says packages rely on the version of rake i already have.
BlakeRG has joined #ruby
jgrevich has joined #ruby
cantonic has joined #ruby
<BlakeRG> is there an equivalent to PHP's htmlspecialchars() ?
tvw has quit [Remote host closed the connection]
jbw has joined #ruby
t25904 has quit [Remote host closed the connection]
t9202 has joined #ruby
h4mz1d has quit [Ping timeout: 244 seconds]
<cirwin> BlakeRG: check the docs for your framework
<BlakeRG> cirwin: i'm not using any web framework
jjbohn has quit [Quit: Leaving...]
<canton7> I think there's something in CGI
fforbeck has joined #ruby
jrxiii has joined #ruby
JStoker has quit [Excess Flood]
DeeJayTwo has quit [Remote host closed the connection]
<cirwin> there's also an HTMLEntities gem
s1n4 has joined #ruby
<BlakeRG> is there a difference between a gem and a module? or is it just a terminology thing
katherinem13 has quit [Quit: Might IS right.]
<workmad3> BlakeRG: there's a big difference...
katherinem13 has joined #ruby
<jrxiii> hello all
mneorr has quit [Read error: Connection reset by peer]
JStoker has joined #ruby
mneorr has joined #ruby
<shevy> BlakeRG a .gem is like an archive like .tar.bz2
<shevy> BlakeRG, a module is just "module Foo" in a .rb file
<BlakeRG> so a gem can contain many modules?
<shevy> so those two things don't have much in common really. there may be zero, one or several modules in any .gem file
<shevy> yes
<shevy> or zero modules
<shevy> if you don't use "module" keyword for instance
CodeFriar has quit [Quit: Leaving...]
cirwin has left #ruby [#ruby]
<shevy> then everything will be in one namespace and people may hate you (though, you could use a class as namespace too)
<shevy> class Foo; module Bla; def self.test
<shevy> Foo::Bla.test
jenrzzz has joined #ruby
Eldariof59-ru has quit []
SegFaultAX has quit [Ping timeout: 276 seconds]
SegFaultAX has joined #ruby
jlogsdon has quit [Remote host closed the connection]
ryan0x2 has quit [Remote host closed the connection]
cj3kim has joined #ruby
QKO_ has joined #ruby
elhu has joined #ruby
opus has joined #ruby
azm has joined #ruby
azm has joined #ruby
azm has quit [Changing host]
pu22l3r has quit [Ping timeout: 260 seconds]
waxjar has joined #ruby
hynkle has quit [Ping timeout: 246 seconds]
h4mz1d has joined #ruby
QKO has quit [Ping timeout: 248 seconds]
geekbri has quit [Remote host closed the connection]
bowlowni has joined #ruby
hamstar has joined #ruby
hynkle has joined #ruby
<shevy> ok
<shevy> can someone explain to me the difference between python OOP and ruby OOP especially in regards to subclassing
chrismcg is now known as zz_chrismcg
hynkle has quit [Client Quit]
fforbeck has quit [Quit: Leaving]
whalesalad has quit [Quit: whalesalad]
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
miho has quit [Remote host closed the connection]
jorge_ has quit [Remote host closed the connection]
Takehiro has joined #ruby
<workmad3> shevy: python allows MI, ruby has SI with mixins (via modules)
BrokenCog has quit [Quit: leaving]
seich_ has quit [Quit: leaving]
p2w has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Seich has quit [Quit: ZNC - http://znc.in]
t9202 has quit [Remote host closed the connection]
t72227 has joined #ruby
hadees has joined #ruby
mjbamford has joined #ruby
tayy has joined #ruby
lianoshana_ has quit [Quit: This computer has gone to sleep]
tnk1 has quit [Ping timeout: 245 seconds]
ringotwo has quit [Remote host closed the connection]
t72227 has quit [Remote host closed the connection]
und3f has quit [Quit: Leaving.]
Takehiro has quit [Ping timeout: 276 seconds]
echobravo has quit [Quit: Pull the pin and count to what?]
t39302 has joined #ruby
ringotwo has joined #ruby
JarJar has joined #ruby
burgestrand has joined #ruby
BlakeRG has quit [Quit: Leaving.]
<shevy> aha
<shevy> hmm
banisterfiend has quit [Read error: Connection reset by peer]
nilg has quit [Read error: Connection reset by peer]
<shevy> how do they determine which method to use, if several exist?
<shevy> with same name
SCommette has quit [Quit: SCommette]
<workmad3> shevy: they have a lookup algorithm, similar to ruby's, that collapses the method looking into a list
DrShoggoth has quit [Quit: Leaving]
<workmad3> shevy: I think it's a depth-first tree search
gfontenot has quit []
<workmad3> shevy: but I'm not certain :)
shiki has joined #ruby
banisterfiend has joined #ruby
<shevy> hmm hmm hmm
mjbamford has quit [Quit: Bye!]
BlakeRG has joined #ruby
BlakeRG has left #ruby [#ruby]
ph^ has quit [Remote host closed the connection]
revans has quit [Quit: Linkinus - http://linkinus.com]
v0n has quit [Ping timeout: 246 seconds]
SquirrelPoop has joined #ruby
mneorr1 has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
BlakeRG has joined #ruby
axl__ has joined #ruby
<BlakeRG> how do i check if a pattern matches in a regex? like this? if /MyRegEx/ =~ string
<SquirrelPoop> Hi. new RoR (.NET converted) dev here. I would like to ask if there is anyone would be willing to share with me a chat-based resource where I could ask for assistance on some RoR-related issues?
recycle has quit [Remote host closed the connection]
<BlakeRG> SquirrelPoop: join #rubyonrails
<SquirrelPoop> Thank you BlakeRG.
<shevy> BlakeRG that is reversed
<shevy> x = "foo bar"
<shevy> x =~ /a/
<shevy> or in a conditional
SquirrelPoop has left #ruby [#ruby]
<shevy> if (x =~ /a/)
<shevy> or without () I suppose
<davidcelis> ~=
<davidcelis> FTFY
<davidcelis> er
Xpl01t has joined #ruby
<BlakeRG> it looks like ~= is returning an integer
<davidcelis> damn
<davidcelis> i am totally off my game today
<shevy> if x =~ /a/
<shevy> I think you can omit the ()
<davidcelis> BlakeRG: the integer returned is the index of the match
<Hanmac> shevy: "string =~ regex" and "regex =~ string" both exist
<BlakeRG> that equates to true though ?
<shevy> hmmm
<shevy> regex first?????
tommyvyo has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
axl_ has quit [Ping timeout: 244 seconds]
axl__ is now known as axl_
<shevy> ok
<Hanmac> >> /e/ =~ "abcde"
<al2o3cr> (Fixnum) 4
<shevy> this makes me want to slay kittens
answer_42 has quit [Remote host closed the connection]
Jake232 has quit [Read error: Connection reset by peer]
<davidcelis> so "foo bar"["foo bar" =~ a] == "foo bar" =~ a
<shevy> ready the sacrifice!
<Hanmac> you mean that i was right again? :P
t39302 has quit [Remote host closed the connection]
<shevy> it's a bug
<davidcelis> well, i wrote that out wrong, but you get the idea
t79418 has joined #ruby
<shevy> I swear the pickaxe never mentioned this
<Hanmac> "foo bar".match(regex) is better when you want the currect matches
<davidcelis> shevy: ?
<davidcelis> shevy: =~ returns the index of the first match, or nil if no matches are found
<Hanmac> dvidcelis: he means that he is confused because "string =~ regex" and "regex =~ string" both exist
<davidcelis> ah
<shevy> davidcelis, I am fine with the string =~ /regex/
<shevy> but I hate the /regex/ =~ string thing
<Speed> How does one subclass Integer/Fixnum? In essence I want to make a subclass where I could use the .new method to parse a specific string into a number
<shevy> Must.Find.Kitten.Now
punkrawkR has joined #ruby
<macer1> >> "abcde" =~ /e/
<al2o3cr> (Fixnum) 4
<macer1> 404 kitten not found
<shevy> lol
hoelzro is now known as hoelzro|away
<shevy> I am content with just one
<shevy> Speed, good question. Aren't Integers not real objects in ruby?
<Speed> Integer is just a base for Bignum and Fixnum
<shevy> well
<shevy> they don't seem to have .new
<BlakeRG> if that = 7.. then why would if /football/ =~ x evaluate to TRUE ?
<shevy> so I am not sure how you instantiate them Speed
<lectrick> What is the difference between "alias new_method old_method" and "alias :new_method :old_method"?
tvw has joined #ruby
<Hanmac> shevy because Integer.new does not make any sense :P
clocKwize has quit [Quit: clocKwize]
<Speed> I could cheat and write a wrapper that would have a Fixnum as a member var, but that seems wrong
<shevy> lectrick the second looks like a syntax error
<Speed> well not really wrong just more code that subclassing
<shevy> Hanmac but I thought everything is an object!!!
<Hanmac> lectrick: i prefer: alias_method :new_method, :old_method
<heftig> lectrick: none
<lectrick> shevy: lol. Hanmac I know but... heftig: ok thought so.
banisterfiend has quit [Read error: Connection reset by peer]
locriani has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
<heftig> unlike alias_method, alias also works on global variables
<Hanmac> the difference between alias and alias_method, the second one can be overwitten
_bart has joined #ruby
<heftig> (alias is a language feature)
Morkel has quit [Quit: Morkel]
<apeiros_> Speed: why'd you subclass just to get a method to parse into Fixnum/Bignum?
v0n has joined #ruby
<apeiros_> why not just write that method and let it return Fixnum/Bignum
<shevy> alias :foo :bar really works?
<burgestrand> lectrick: alias_method is a method, alias is a keyword
banisterfiend has joined #ruby
<apeiros_> alias can also alias globals
<apeiros_> dirty, dirty lil' thing
<fowl> come on shevy you should be used to discovering new facts about the crazy syntax
<BlakeRG> whats the =~ operator called?
<apeiros_> the blargh operator
<apeiros_> actually, no idea
<waxjar> it's not an operator, it's a method :)
<fowl> the sperm
<apeiros_> also that
<apeiros_> and that
<lampe2> is this a good way to check if data is valid? https://gist.github.com/3408064
<Speed> apeiros_: I have a method right now, it just seems more logical to make a separate class for it and build functionality there
<Hanmac> waxjar: its an method that looks like a operator :P
<shevy> lol
<shevy> the sperm operator
mmitchel_ has joined #ruby
Squee- has joined #ruby
<apeiros_> Speed: um, no, it makes no sense to add a class just to parse a value to an existing class
<Hanmac> >> defined?(- 1)
<al2o3cr> (String) "method"
t79418 has quit [Remote host closed the connection]
<lampe2> sry here with syntex highlighting https://gist.github.com/3408070
mmitchell has quit [Ping timeout: 245 seconds]
radge has quit [Ping timeout: 276 seconds]
t47735 has joined #ruby
cantonic has quit [Quit: cantonic]
<apeiros_> Speed: ruby ain't java, you don't need a DateTimeParserFactoryFactory just to parse a date.
<Speed> well that's not the ONLY functionality I intend to put in it
<apeiros_> we can just have DateTime.parse
yxhuvud has quit [Ping timeout: 256 seconds]
locriani has quit [Ping timeout: 240 seconds]
<shevy> lampe2, why do you use if self.valid?
<shevy> why not
<shevy> if valid?
<apeiros_> Speed: also there's already various methods to parse strings to numbers
<lectrick> burgestrand: yes, ty
<apeiros_> see Kernel#Integer and String#to_i for the two related to integers
<Hanmac> Speed & apeiros_ : in ruby you have singletonclasses of singletonclasses :P
<lampe2> shevy, to much java coding in the last days... :)
mklappstuhl has quit [Ping timeout: 276 seconds]
<apeiros_> Hanmac: sounds lonely
<shevy> well
<shevy> at least you'll pickup ruby quickly then
juancabrito has joined #ruby
<lampe2> this is why i wont to learn ruby. i dont wanne code in java ... :)
opus has quit [Quit:]
<Hanmac> >> Object.singleton_class.singleton_class.singleton_class
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<al2o3cr> (Class) #<Class:#<Class:#<Class:Object>>>
<Hanmac> :'P
<infinitiguy> Hiya, I'm trying to build a gem into an RPM. I used gem fetch to get the source, used gem2rpm to build my spec, and when I run rpmbuild against the spec I get ruby-gems >= 1.3.7 is needed by ruby-gems-softlayer_api-1.0.5-1.noarch however rpm -qa shows me that it is already installed - rubygems-1.3.7-3.el5.kb.1
<infinitiguy> anyone have any ideas as to where I might search next to find out what is holding things up? I'd think this shouldve worked.
<lampe2> but is the valid? method okay so or is raise to hard ? https://gist.github.com/3408070
opus has joined #ruby
exchgr has joined #ruby
exchgr has quit [Client Quit]
<juancabrito> I can not install ruby 1.9.3 with rvm, I'm getting 'Error running 'make '' can anyone help please?
<shevy> infinitiguy, latest rubygems is version 1.8.24 http://rubyforge.org/projects/rubygems/
kuzushi has quit [Ping timeout: 272 seconds]
<infinitiguy> but wouldn't >= 1.3.7 mean that 1.3.7 should work?
bricker881 has joined #ruby
yekta has quit [Quit: yekta]
<shevy> should work yeah
echobravo has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
<apeiros_> lampe2: valid? should return true/false and not raise in this case IMO
<shevy> you can also try "gem env" to see if something is messed up
specialGuest has quit [Quit: WeeChat 0.3.8]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
azm has quit [Ping timeout: 268 seconds]
jrist has quit [Ping timeout: 276 seconds]
<apeiros_> (I'm generally much in favor of early raise, but this method is specifically to query the validity… only getting true in return and otherwise an exception is wrong IMO)
Seich has joined #ruby
cesurasean has left #ruby [#ruby]
bricker88 has quit [Ping timeout: 265 seconds]
_sazboom_ has joined #ruby
ringotwo has quit [Remote host closed the connection]
<infinitiguy> hrmm env looks good
<infinitiguy> RubyGems Environment:
<infinitiguy> - RUBYGEMS VERSION: 1.3.7
<infinitiguy> - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
<infinitiguy> - RUBY VERSION: 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
<infinitiguy> sounds like this needs some googling
macmartine has joined #ruby
JarJar has left #ruby ["Leaving"]
d3vic3 has quit [Quit: leaving]
machty_ has joined #ruby
<machty_> is there a way to send my client an .rb file and have it be a double-clickable script that runs on the desktop?
Criztian has quit [Remote host closed the connection]
<davidcelis> if they have ruby installed
Criztian has joined #ruby
<machty_> they do, but once i do that, (and this is mac) how do I get it so that it runs the script instead of trying to text edit it?
<davidcelis> chmod +x my_script.rb
<machty_> and they'd have to do that on their computer before that worked?
<davidcelis> now it's an executable
<davidcelis> no, you do it
TheFuzzball has quit [Ping timeout: 244 seconds]
Squee- has quit [Quit: This computer has gone to sleep]
<davidcelis> you'll probably need a ruby shebang on the top of the file as well
<davidcelis> #!/usr/bin/env ruby
<machty_> that can't be right… if i send that to them, that information won't be preserved
<davidcelis> and make sure it's 1.8 compatible
<davidcelis> machty_: bro, file permissions are always preserved
<davidcelis> what are you even
<davidcelis> talkin aboot
<machty_> haha
<machty_> pemissions are attached to the files themselves?
<machty_> not the file system?
<davidcelis> of course, what else would they be attached to
<davidcelis> the file system is just files
<davidcelis> directories are files
<davidcelis> everything's a file
<machty_> permissions and so on
<shevy> sure. if you wget a file chmodded 444 from i.e. ftp, the file will have 444 chmod
<machty_> you guys are blowing my mind
ringotwo has joined #ruby
<shevy> perhaps windows does something else
<davidcelis> fuck windows
<davidcelis> it doesn't count
<BlakeRG> i think zip maintains the execute bit.. but tar can maintain all of the unix perms
davidroy has joined #ruby
banghouse has quit [Remote host closed the connection]
i0n has quit [Quit: Lost terminal]
Tobsn has left #ruby ["Linkinus - http://linkinus.com"]
aldodelgado has quit [Quit: aldodelgado]
zeromodulus has joined #ruby
wvms has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
<machty_> guys, i think you're wrong
Criztian has quit [Ping timeout: 252 seconds]
<machty_> or at least, tell me what i did wrong
chare has joined #ruby
<davidcelis> did you shebang it
<machty_> i chmodded fart.rb as 007, so its -------rwx
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<machty_> i upload it to s3
<davidcelis> fart.rb?
<machty_> download it again, and it has new permissions
<RubyPanther> permissions are in the file's metadata
<davidcelis> WHAT DOES THIS SCRIPT DO
<machty_> it puts "SHIT"
<machty_> i'm juvenile with my filler
<davidcelis> machty_: nice
sirecote_ has quit []
<machty_> RubyPanther: where is metadata stored? not with the file, right? just as extra data in the filesystem right?
NightMonkey has joined #ruby
<RubyPanther> in some filesystems this metadata exists in a different part of the filesystem and is opaque. Usually it is physically stored as part of the file.
<davidcelis> pretty sure OSX handles it with the file
<eam> it's stored with the inode
<shevy> I store it in my pants
cj3kim has joined #ruby
cj3kim has quit [Changing host]
cj3kim has joined #ruby
greenysan has quit [Ping timeout: 256 seconds]
<RubyPanther> You're shouldn't have to worry about it beyond the abstract concept that files have metadata. And it is stored somewhere for you. By some command line tool or permissions dialog.
<eam> tar only records basic permissions, not things like extended file ACLs
Squee- has joined #ruby
<NightMonkey> Howdy. Is there a way to turn up verbosity in curb, when curb is called from Savon?
<machty_> RubyPanther: right, but i think there's no guarantee that uploading and downloading the file will preserve those perms
<apeiros_> mac os' classic os had a resource fork
<apeiros_> and it's a shame that nobody copied the idea
<apeiros_> it was way better than what we have now.
<eam> apeiros_: they did - many filesystems have them
<machty_> ANYWAY, the point is I don't think i can chmod the perms on a ruby file and expect it to be the same when my client downloads it
<RubyPanther> machty_: that depends on the client. In my world, yes, metadata is always preserved.
<apeiros_> eam: they put it into the file system, not the file
<eam> apeiros_: I know
<eam> as I said, the feature exists on many other filesystems
<apeiros_> which is fine for metadata related to the filesystem, but not fine for metadata related to the file itself
bbttxu has quit [Quit: bbttxu]
<BlakeRG> machty_: try gzipping the file before sending it up to s3
kuzushi has joined #ruby
<machty_> BlakeRG: ah ha, that might do it
<RubyPanther> There was a time, in the age of MS-DOS, when I would sometimes lose permissions during a file transfer and restore them by hand.
the_jeebster has joined #ruby
<davidcelis> with your BEAR HANDS??
ackz has quit [Quit: Leaving.]
<shevy> with his paws
<RubyPanther> And CD-ROM disk can be rather annoying precisely because of preserved permissions.
<the_jeebster> crazy. anyone seen this github binary visual diff addition?
<davidcelis> the_jeebster: ?
<eam> apeiros_: as I said, several filesystems provide unstructured storage for implementing things like resource forks
<eam> xfs is one such example
<the_jeebster> davidcelis: say you commit an image change, github has transitional sliders to visually differentiate the two files
<RubyPanther> In the days when you had to set your modem's COM port and IRQ... by setting unmarked jumpers on various pin blocks
<the_jeebster> pretty epic
<davidcelis> the_jeebster: damn i hadnt noticed. that's pretty cool
<RubyPanther> It only takes one long night of trial and error if you don't have the manual.
<davidcelis> the_jeebster: now if only they'd make the news feed remotely fucking useful again
<the_jeebster> yeah, newsfeed looks whack now
<machty_> ok, thanks, i have a solution. but now even on my own mac with chmod +x, i can't just double click the .rb in Finder and ahve it run the script. it just opens XCode. even with chmod +x and shebang
<davidcelis> the_jeebster: it's redundant with the notification center now. only watched repos show up there
<davidcelis> or followed users
workmad3 has quit [Ping timeout: 240 seconds]
<davidcelis> the_jeebster: there's no point in starring repos now other than popularity points
banisterfiend has quit [Read error: Connection reset by peer]
Doc_X has quit [Remote host closed the connection]
<lampe2> is there a simple way to flatten an hash that is in an array ?
juancabrito has left #ruby [#ruby]
pskosinski has quit [Ping timeout: 240 seconds]
<Mon_Ouie> What do you mean by flattening a hash?
banisterfiend has joined #ruby
dangerousdave has quit [Quit: Leaving...]
<lampe2> Mon_Ouie, something like this {:h => {:a => "test"}}
jasonkuhrt has quit [Quit: Leaving...]
recycle has joined #ruby
<Mon_Ouie> That doesn't explain what flattening is supposed to do
atmosx has joined #ruby
BlakeRG has left #ruby [#ruby]
<lampe2> Mon_Ouie, like in an array [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10] to [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
s0ber_ has joined #ruby
<Mon_Ouie> So what would happen with a hash like this one? {:a => 1, :b => {:c => 2}, :d => 3}
gfontenot has joined #ruby
<davidcelis> Mon_Ouie: My guess is he'd want :b to disappear and the inner hash to be merged with the outer
<atmosx> .flatten! ?
<lampe2> {:a => 1, :b => {:c => 2}, :d => 3} = {:a => 1, :c => 2, :d => 3}
Bosma has quit [Quit: leaving]
DuoSRX has quit [Remote host closed the connection]
clocKwize has joined #ruby
<atmosx> I'd flatten! it
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
s0ber has quit [Read error: Operation timed out]
<Mon_Ouie> There's no Hash#flatten!
s0ber_ is now known as s0ber
<atmosx> well, you can create it.
<atmosx> last time I checked ruby classes were open
<Mon_Ouie> Well I guess that was his question in the first place
<philcrissman> ... and Hash#flatten returns an array, not a hash. http://ruby-doc.org/core-1.9.3/Hash.html#method-i-flatten
elhu has quit [Quit: Computer has gone to sleep.]
aaroncm has quit [Quit: Computer has gone to sleep.]
_sazboom_ has quit [Quit: EPIC5-1.1.4[1667] - amnesiac : jedi knights do it with force]
<lampe2> my problem is i that i got a method that must take 1..10 parameter but if i give the method something like this ["test","test2"],"test","test","test","test","test","test",{:h => {:a => "test", :b => "test"}} it counts the h as 1 not as 2
<atmosx> yes
<atmosx> that's the good with flatten that returns an array
<Mon_Ouie> lampe2: You can build a new hash, adding every pair in the initial hash, unless the value is a hash, in which case you merge on the result of the method called recursively
cantonic has joined #ruby
alanp has joined #ruby
nixmaniack has joined #ruby
krz has joined #ruby
pskosinski has joined #ruby
<lampe2> my problem is i that i got a method that must take 1..10 parameter but if i give the method something like this ["test","test2"],"test","test","test","test","test","test",{:h => {:a => "test", :b => "test"}} it counts the h as 1 not as 2
<lampe2> hups sry
asteve has quit []
_bart has quit [Quit: _bart]
dagnachewa has joined #ruby
jblack_ has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<atmosx> y should it count h as 2?
n1x has quit [Ping timeout: 272 seconds]
alanp_ has quit [Ping timeout: 276 seconds]
<atmosx> I'd count it as 8
<patient> just curious, you guys use vim + terminal to run the test suite or a dedicated vim command/plugin? (the vim users ofc)
<atmosx> err 7 if I strat from 0
<atmosx> patient: I don't run a test suite
<patient> that's a possibility too :)
jblack has quit [Ping timeout: 245 seconds]
banisterfiend has joined #ruby
x0F has quit [Read error: Connection reset by peer]
<atmosx> patient: I just use vim, so I can't understand what are you reffering to. I didn't do any test-driven dev yet :-P
stkowski has quit [Quit: stkowski]
micha_ has joined #ruby
x0F has joined #ruby
tech|survivor has quit [Quit: WeeChat 0.3.8]
techsurvivor has joined #ruby
jenrzzz has quit [Quit: leaving]
<davidcelis> patient: use vim to run your test suite? what?
jenrzzz has joined #ruby
<davidcelis> why not just Rake::TestTask
jenrzzz has quit [Client Quit]
jenrzzz has joined #ruby
jenrzzz has quit [Client Quit]
jenrzzz has joined #ruby
jenrzzz has quit [Client Quit]
<patient> hm, haven't learn about rakefiles yet
t47735 has quit [Remote host closed the connection]
Progster has quit [Ping timeout: 240 seconds]
<patient> i'm using 'rspec' in the terminal for now
ringotwo has quit [Remote host closed the connection]
t53084 has joined #ruby
<patient> but you call 'rake' on terminal too, right?
<waxjar> just copy paste the examples, really :P
ringotwo has joined #ruby
stopbit has quit [Quit: Leaving]
infinitiguy has quit [Quit: Leaving.]
<patient> waxjar i never feel right with myself when i do it :P i need to understand it, at least the basics
lampe2 has quit [Ping timeout: 276 seconds]
ringotwo_ has joined #ruby
ringotwo has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
jenrzzz has quit [Client Quit]
<Mon_Ouie> I don't use vim, but surely you can just run the command that runs the tests without installing any plugin?
jenrzzz has joined #ruby
jenrzzz has quit [Client Quit]
<patient> sure Mon_Ouie, that's what i'm doing now ;) i was thinking if the fellow vimmers had a more integrated/optimized way of doing it
jenrzzz has joined #ruby
ladder4 has quit [Max SendQ exceeded]
jorge_ has joined #ruby
luxurymode has quit [Quit: Computer has gone to sleep.]
ladder4 has joined #ruby
qwerxy has joined #ruby
<lectrick> Does stabby lambda allow -> do instead of ->{ ?
fantazo has joined #ruby
<lectrick> ok seems it does based on my simple irb test case of "-> do end"
greenysan has joined #ruby
sebicas has joined #ruby
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
[Neurotic] has joined #ruby
jenrzzz has quit [Client Quit]
mneorr1 has quit [Quit: Leaving.]
jenrzzz has joined #ruby
jorge_ has quit [Ping timeout: 276 seconds]
avalarion has quit [Quit: No Ping reply in 180 seconds.]
Johanna_Meszoros has joined #ruby
Jay_Levitt has quit [Ping timeout: 246 seconds]
dagnachewa has quit [Quit: Leaving]
Johanna_Meszoros is now known as avalarion
<davidcelis> i love it when people answer their own questions
wereHamster has quit [Ping timeout: 245 seconds]
greenysan has quit [Ping timeout: 256 seconds]
krusty_ar has quit [Read error: Connection reset by peer]
ccooke has quit [Ping timeout: 240 seconds]
wereHamster has joined #ruby
mneorr has joined #ruby
micha_ has quit [Quit: Leaving]
cesurasean has joined #ruby
robbyoconnor has joined #ruby
<cesurasean> How would I go about fixing this? - /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- json/add/rails (LoadError)
cantonic has quit [Quit: cantonic]
lampe2 has joined #ruby
dekz has quit [Ping timeout: 240 seconds]
ccooke has joined #ruby
krusty_ar has joined #ruby
krz has quit [Quit: krz]
juha_ has quit [Read error: Connection reset by peer]
dekz has joined #ruby
krz has joined #ruby
<lampe2> Mon_Ouie, thx for your help
krz has quit [Client Quit]
krz has joined #ruby
Squee- has quit [Quit: This computer has gone to sleep]
opus has quit [Quit:]
<lampe2> Mon_Ouie, thx for your help
<lampe2> hups sry
jenrzzz has quit [Quit: brb uninstalling]
<Synthead> is there a ruby builtin that will percent-escape ' ?
<Synthead> sorry, ampersand (&) escape
jenrzzz has joined #ruby
Seich has quit [Ping timeout: 260 seconds]
t53084 has quit [Remote host closed the connection]
opus has joined #ruby
t51823 has joined #ruby
apeiros_ has quit [Remote host closed the connection]
<Hanmac> Synthead what do you want?
OranGO has joined #ruby
OranGO has left #ruby [#ruby]
<fowl> Synthead: no builtin
Seich has joined #ruby
<fowl> htmlentities gem should do it
cesurasean has left #ruby [#ruby]
<Mon_Ouie> CGI.escape_html
<Mon_Ouie> (in require 'cgi')
johnlcox has quit [Ping timeout: 252 seconds]
<Synthead> "test'ing".gsub(/'/, "\\'") returns "testinging". why?
<macer1> >> "test'ing".gsub(/'/, "\\'")
<al2o3cr> (String) "testinging"
s1n4 has quit [Quit: leaving]
h4mz1d has quit [Ping timeout: 240 seconds]
<Synthead> yeah, why not test\'ing ?
<macer1> "test'ing".gsub(/[']/, "\\'")
kirun has quit [Quit: Client exiting]
<davidcelis> Synthead: you have to puts or print it
jblack_ has quit [Ping timeout: 252 seconds]
<macer1> >>"test'ing".gsub(/[']/, "\\'")
<al2o3cr> (String) "testinging"
<macer1> uhh
<davidcelis> >> print "test'ing".gsub(/'/, "\\'")
<al2o3cr> testinging(NilClass) nil
<davidcelis> or not
<davidcelis> broked
<macer1> use puts
Squee- has joined #ruby
<davidcelis> >> puts "test'ing".gsub(/'/, "\\'")
<al2o3cr> (NilClass) nil, Console: testinging
<Synthead> yeah, wth, man
Seich has quit [Client Quit]
<macer1> oh
<Mon_Ouie> \' is replaced with what is placed after the match ($')
<macer1> I know I know
<macer1> yeah exactly
mneorr has quit [Ping timeout: 245 seconds]
<Mon_Ouie> Just like \1 is replaced with the first capture group
<Mon_Ouie> Hence you need to escape twice
<Synthead> that's really strange
<macer1> >>"test'ing".gsub(/'/, "/\/\'")
<al2o3cr> (String) "test//'ing"
jenrzzz has quit [Quit: RESTARTING]
cj3kim has quit [Quit: This computer has gone to sleep]
jenrzzz has joined #ruby
<Synthead> macer1: I'm looking for test\'ing
<macer1> >>"test'ing".gsub(/'/, "\/\'")
<al2o3cr> (String) "test/'ing"
<Mon_Ouie> I think that's not what you meant to do ;)
<macer1> uh
<macer1> >>"test'ing".gsub(/'/, "/\'")
<al2o3cr> (String) "test/'ing"
<macer1> ...
<macer1> >>"test'ing".gsub(/'/, "//'")
<al2o3cr> (String) "test//'ing"
<Mon_Ouie> >> "test'ing".gsub("'", "\\\\'")
<al2o3cr> (String) "test\\'ing"
<Synthead> Mon_Ouie: if $ is the end of the line, what is $' ?
<Mon_Ouie> No, $' is a global variable
<Mon_Ouie> "foobar" =~ /b/; puts $'
<Mon_Ouie> >> "foobar" =~ /b/; puts $'
<al2o3cr> (NilClass) nil, Console: ar
<Mon_Ouie> Having that bot to show it is nice :)
mengu has joined #ruby
mike4__ has joined #ruby
specialGuest has joined #ruby
specialGuest has joined #ruby
specialGuest has quit [Changing host]
<Synthead> so $' is the last match?
cj3kim has joined #ruby
Seich has joined #ruby
<fowl> see the ruby quickref
<Mon_Ouie> No, it's the post match string — only one match is considered by Ruby
<fowl> bookmark it
<Mon_Ouie> The last and only match in that string is "b"
cakehero has quit [Quit: Computer has gone to sleep.]
obryan has quit [Quit: Konversation terminated!]
mike4_ has quit [Ping timeout: 276 seconds]
IPGlider has quit []
mike4__ is now known as mike4_
SegFaultAX has quit [Ping timeout: 268 seconds]
<macer1> fuck the system -
<macer1> >> puts "test'ing".chars.collect {|b| (b == "'") ? '\\'+"'" : b}.join
<al2o3cr> (NilClass) nil, Console: test\'ing
<macer1> :P
joshman_ has quit [Ping timeout: 240 seconds]
iamjarvo has joined #ruby
headius has quit [Quit: headius]
<Mon_Ouie> Or you could just
<Synthead> Mon_Ouie: oh wow
<Synthead> Mon_Ouie: that's insane
<Synthead> Mon_Ouie: thanks!
<Mon_Ouie> >> "test'ing".gsub("'") { "\\'" }
<al2o3cr> (String) "test\\'ing"
<macer1> >> "test'ing".gsub("'") { "\'" }
<al2o3cr> (String) "test'ing"
<macer1> >> "test'ing".gsub("'") { "/\'" }
<al2o3cr> (String) "test/'ing"
<macer1> >> "test'ing".gsub("'") { "\\'" }
<al2o3cr> (String) "test\\'ing"
<Hanmac> >> puts "test'ing".gsub("'",'\\\\\'')
<al2o3cr> (NilClass) nil, Console: test\'ing
<macer1> uh
<macer1> Hanmac: X.X
mmitchel_ has quit [Remote host closed the connection]
<Hanmac> or with "
<Hanmac> >> puts "test'ing".gsub("'","\\\\'")
<al2o3cr> (NilClass) nil, Console: test\'ing
<Mon_Ouie> macer1: You realize / has no special meaning whatsoever?
<macer1> ah
erichmenge has quit [Quit: Be back later]
<macer1> my bad
tommyvyo has quit [Quit: Computer has gone to sleep.]
ged__ is now known as ged
<macer1> >> require 'active_support'
<al2o3cr> -e:1:in `eval': cannot load such file -- active_support (LoadError), from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<macer1> >> `gem install active_support`
<al2o3cr> /usr/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':, It seems your ruby installation is missing psych (for YAML output)., To eliminate this warning, please install libyaml and reinstall your ruby., ERROR: While executing gem ... (Errno::ENOENT), No such file or directory - /home/jrajav
rovalent has joined #ruby
diegoviola has quit [Read error: Connection reset by peer]
urbann has quit [Remote host closed the connection]
<macer1> >> fork while true
<al2o3cr> [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno: 11), [FATAL] Failed to create timer thread (errno..., [FATAL] Failed to create timer thread (errno: 11)
<macer1> damn :D
andrewhl_ has quit [Remote host closed the connection]
<Mon_Ouie> You can try anything you want, it's pretty safe ;)
Stalkr_ has quit [Quit: Leaving...]
<macer1> the problem is old version was easy to crash :/
<macer1> now it is written in node.js
<Mon_Ouie> It is? The github version, updated 3 days ago, is in Ruby
FunnyLookinHat has quit [Quit: Leaving]
banisterfiend has quit [Read error: Connection reset by peer]
<macer1> oh the old was node.js?
<Hanmac> macer1 yeah ... its now safe, forced by evolution :P
<macer1> anyway
<macer1> it is spawning new process
<macer1> and crashing the process doesnt crash the bot ;/
syamajala has joined #ruby
<macer1> Hanmac: yup :D
justinmcp has joined #ruby
<macer1> I have a super cool way to crash ruby
<macer1> but the parent process cant crash this way
* Hanmac feels good because he was an evolutional factor
<macer1> I was too :D
jorge_ has joined #ruby
awarner has quit [Remote host closed the connection]
<danheberden> >> file = File.new('/etc/passwd', 'r'); while(line=file.gets); puts line; end; file.close;
<al2o3cr> (NilClass) nil, Console: root:x:0:0:root:/root:/bin/bash, bin:x:1:1:bin:/bin:/bin/false, daemon:x:2:2:daemon:/sbin:/bin/false, mail:x:8:12:mail:/var/spool/mail:/bin/false, ftp:x:14:11:ftp:/srv/ftp:/bin/false, http:x:33:33:http:/srv/http:/bin/false, nobody:x:99:99:nobody:/:/bin/false, dbus:x:81:81:System message bus:/:/bin/false, jrajav:x:1000:100::/home/jrajav:/bin/bash, al:x:1001:1001::/home/al:/bin/bash
cousine has joined #ruby
<macer1> danheberden: it is chroot and not uid 0
peregrine81 has quit [Quit: Computer sleeping.]
<macer1> >> `/usr/bin/gem install acive_support`
<al2o3cr> /usr/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':, It seems your ruby installation is missing psych (for YAML output)., To eliminate this warning, please install libyaml and reinstall your ruby., ERROR: While executing gem ... (Errno::ENOENT), No such file or directory - /home/jrajav
quest88 has quit [Quit: quest88]
<danheberden> bitchin
<macer1> ...
<macer1> ayfkm?
<macer1> >> Dir['usr/bin/*']
<al2o3cr> (Array) ["usr/bin/ruby", "usr/bin/gem", "usr/bin/sudo"]
<macer1> >> `usr/bin/gem install acive_support`
<al2o3cr> /usr/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>':, It seems your ruby installation is missing psych (for YAML output)., To eliminate this warning, please install libyaml and reinstall your ruby., ERROR: While executing gem ... (Errno::ENOENT), No such file or directory - /home/jrajav
<macer1> what the..?
justinmcp has quit [Remote host closed the connection]
lampe2 has quit [Quit: Leaving]
<Hanmac> macer1 its not build with yaml support ... you cant change that :P
<macer1> damn -_-
SegFaultAX has joined #ruby
<macer1> crashing ruby is fun
<macer1> but the parent can't crash
<macer1> hmm...
kvirani has quit [Remote host closed the connection]
recycle has quit [Remote host closed the connection]
banisterfiend has joined #ruby
<machty_> hey, in rails console, if i type 2.weeks, it yields => 14 days, but 2.weeks.to_s yields "1209600"… where is the 14 days coming from? how do i get it to explicitly to yield "14 days" in my rails app?
<macer1> >> File.open('fail', 'w') {|f| f.write('???') }
<al2o3cr> -e:1:in `eval': Permission denied - fail (Errno::EACCES), from (eval):1:in `open', from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<machty_> i'm also just curious about the mechanics behind what's happening
imami|afk has quit [Ping timeout: 246 seconds]
jgrevich has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
kvirani has joined #ruby
<macer1> the 1209600 is number of seconds
jgrevich has joined #ruby
<Hanmac> machty_ you are in the wrong channel :(
<machty_> BALLS
SegFaultAX has quit [Ping timeout: 272 seconds]
SQLStud has quit [Read error: Connection reset by peer]
Vendethiel has joined #ruby
banseljaj has joined #ruby
Squee- has quit [Quit: This computer has gone to sleep]
<ged> >> IO.read( '|-' ) or exec 'usr/bin/sudo', 'ps', 'aux'
<al2o3cr> , [FATAL] Failed to create timer thread (errno: 11)
<ged> >> RubyVM::OPTS
<al2o3cr> (Array) ["direct threaded code", "inline method cache"]
rovalent has quit [Quit: Linkinus - http://linkinus.com]
flip_digits has joined #ruby
qwerxy has quit [Quit: offski]
Takehiro has joined #ruby
<macer1> who want to see a cool trick to segfault ruby :D?
recycle has joined #ruby
<ged> >> File.read( __FILE__ )
<al2o3cr> -e:1:in `eval': No such file or directory - (eval) (Errno::ENOENT), from (eval):1:in `<main>', from -e:1:in `eval', from -e:1:in `<main>'
<Mon_Ouie> It's run using ruby -e
<macer1> and sudo
<ged> Heh.
bowlowni has quit [Remote host closed the connection]
<Mon_Ouie> And the only two binaries you can use are sudo and ruby
cj3kim has quit [Quit: This computer has gone to sleep]
rodasc is now known as crodas
<matti> macer1: Sorry, I was busy. I am on-call today.
<heftig> ps isn't there, either
<heftig> so sudo is useless
<macer1> matti: oh, no problem.
<macer1> ping me when you have time
aoeuhtnsid has joined #ruby
overclucker has quit [Quit: bye bye]
SegFaultAX has joined #ruby
<macer1> the bot will be a lot better if it just ran code using ruby sandbox
<macer1> a lot easier to crash :/
<aoeuhtnsid> hi I want to use https://github.com/perrym5/mumble-ruby to create a mumble bot. I can connect and do things, but then my script reaches the end and my bot leaves. How do I keep the script running so that my bot doesn't die?
* macer1 is a TeamSpeak3 fan :3
lkba has quit [Ping timeout: 240 seconds]
QKO has joined #ruby
kvirani has quit [Remote host closed the connection]
Takehiro has quit [Ping timeout: 276 seconds]
<aoeuhtnsid> macer1, ah that may also be something I have to worry about, but my question is more basic. What's the best way to prevent the ruby interpreter from reaching the end of my script and stopping the script? i.e. do I put some sort of infinite loop at the end?
Progster has joined #ruby
<macer1> while true
<aoeuhtnsid> macer1: thanks!
the_jeebster has quit [Quit: Leaving.]
<macer1> but its not a good idea as any while true will be using all cpu if you dont sleep a little
<macer1> i.e loop { 1 } is using all cpu
QKO_ has quit [Ping timeout: 252 seconds]
jgarvey has quit [Quit: Leaving]
Hama has joined #ruby
Takehiro has joined #ruby
<macer1> >> sleep until false
<macer1> >> puts "hi"
<al2o3cr> (NilClass) nil, Console: hi
<macer1> damn
<ged> >> require 'dl'
<al2o3cr> , [FATAL] Failed to create timer thread (errno: 11)
<ged> Awww... ;)
yoklov_ has joined #ruby
<macer1> >> puts "hi"
<al2o3cr> , [FATAL] Failed to create timer thread (errno: 11)
<macer1> pwnd :D?
<macer1> ^^
<macer1> epic win
<Hanmac> :P
yoklov has quit [Read error: Connection reset by peer]
<macer1> >> puts "am I dead :(?"
<al2o3cr> , [FATAL] Failed to create timer thread (errno: 11)
<macer1> jrajav have a new bug to fix, hehe
fbernier has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
Tarellel has joined #ruby
zeromodulus has quit [Remote host closed the connection]
ephemerian has quit [Quit: Leaving.]
adac has quit [Ping timeout: 246 seconds]
Hama has quit [Remote host closed the connection]
cousine has quit [Remote host closed the connection]
TheLZA has quit [Ping timeout: 245 seconds]
berserkr has joined #ruby
cassianoleal has joined #ruby
lkba has joined #ruby
Vendethiel has quit []
SegFaultAX has quit [Ping timeout: 244 seconds]
cassianoleal has quit [Quit: Leaving.]
SegFaultAX has joined #ruby
macer1 has quit [Remote host closed the connection]
BrokenCog has joined #ruby
BrokenCog has joined #ruby
BrokenCog has quit [Changing host]
recycle has quit [Remote host closed the connection]
Squee- has joined #ruby
dpk has quit [Quit: Asleep at the keyboard.]
M- has joined #ruby
cassianoleal has joined #ruby
Takehiro has quit [Remote host closed the connection]
QKO has quit [Ping timeout: 245 seconds]
tomsthumb_ has quit [Quit: Leaving.]
virunga has quit [Quit: Sto andando via]
emmanuelux has joined #ruby
yoklov_ has quit [Ping timeout: 245 seconds]
tewecske has joined #ruby
tewecske has quit [Max SendQ exceeded]
fbernier has quit [Ping timeout: 240 seconds]
aoeuhtnsid has quit [Quit: Page closed]
machty has joined #ruby
Tarellel has quit [Quit: Tarellel]
machty_ has quit [Read error: Connection reset by peer]
iamjarvo has quit [Ping timeout: 244 seconds]
jasonLas_ has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
jasonLaster has joined #ruby
ezra has joined #ruby
ezra has quit [Changing host]
ezra has joined #ruby
Takehiro has joined #ruby
jjang has joined #ruby
pu22l3r has joined #ruby
berserkr has quit [Quit: Leaving.]
uris has quit [Quit: leaving]
jarred has joined #ruby
jasonLaster has quit [Ping timeout: 256 seconds]
Squee- has quit [Quit: This computer has gone to sleep]
cassianoleal has quit [Quit: Leaving.]
jjbohn has joined #ruby
tommyvyo has joined #ruby
Progster has quit [Ping timeout: 260 seconds]
macer1 has joined #ruby
macer1 has joined #ruby
macer1 has quit [Changing host]
eywu has joined #ruby
eywu has quit [Client Quit]
zodiak has quit [Quit: Leaving]
eywu has joined #ruby
<macer1> executing "fork while true" in irb wasn't good idea...x.X
Takehiro has quit [Remote host closed the connection]
paulovittor23 has quit [Remote host closed the connection]
tomsthumb_ has joined #ruby
QKO has joined #ruby
Vert has joined #ruby
hamstar has quit [Quit: Leaving]
JustinCampbell has quit [Remote host closed the connection]
Speed has quit [Remote host closed the connection]
Z_Mass has joined #ruby
reactormonk has quit [Ping timeout: 265 seconds]
v0n has quit [Ping timeout: 246 seconds]
reactormonk has joined #ruby