Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
sterNiX has joined #ruby
RichGuk has joined #ruby
seanstickle has joined #ruby
jsvana has quit [#ruby]
dnjaramba has joined #ruby
a__ has joined #ruby
dootdoot has joined #ruby
dotnull has joined #ruby
phantasm66 has joined #ruby
emocake has joined #ruby
banister_ has joined #ruby
workmad3 has joined #ruby
marvin_ has joined #ruby
dnjaramba has joined #ruby
stack_push has joined #ruby
Nisstyre has joined #ruby
ZachBeta has joined #ruby
glosoli has joined #ruby
a__ has joined #ruby
idletom has joined #ruby
dnjaramba has joined #ruby
samgranieri has joined #ruby
johndbritton has joined #ruby
dnjaramba has joined #ruby
ZachBeta has joined #ruby
ZachBeta has joined #ruby
kuzushi_ has joined #ruby
dootdoot has joined #ruby
sterNiX has joined #ruby
marvin_ has joined #ruby
looopy has joined #ruby
mikepack has joined #ruby
niklasb has joined #ruby
emocake has joined #ruby
milkpost_ has joined #ruby
milkpost_ has joined #ruby
wind has joined #ruby
dnjaramba has joined #ruby
wind has quit [#ruby]
Eth4n has joined #ruby
mikepack_ has joined #ruby
Richmond has joined #ruby
emocakes has joined #ruby
dv310p3r has joined #ruby
apok has joined #ruby
dnjaramba has joined #ruby
bonhoffer has joined #ruby
mikepack has joined #ruby
Fraeon has joined #ruby
igotnolegs has joined #ruby
dnjaramba has joined #ruby
ZachBeta has joined #ruby
Kn|t3__ has joined #ruby
td123 has joined #ruby
al3xnull has joined #ruby
glosoli has joined #ruby
al3xnull has joined #ruby
dnjaramba has joined #ruby
chrxn has joined #ruby
alup__ has joined #ruby
Aaaarg has joined #ruby
banisterfiend has joined #ruby
dagnachewa has joined #ruby
frequency9 has joined #ruby
yan_ has joined #ruby
liluo has joined #ruby
<yan_> so i have a function called "dbg_print" that just needs to log its input to a file.. i want to lock a mutex inside the function so that calls in different threads don't stomp over each other in the log.. what would be the best way to scope that mutex? create a module/class just for one function?
tymelx has joined #ruby
dnjaramba has joined #ruby
dhodgkin has joined #ruby
<tymelx> Question: I'm having some trouble with this code (http://pastebin.com/t9xSQirW). I'm generating a random 5 digit number and then want it displayed with styling. The number is outputted once with style and once without, I cant figure out why it's printing the number a second time without styling?
dnjaramba has joined #ruby
nari has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
dnjaramba has joined #ruby
cbuxton has joined #ruby
qtrqt has joined #ruby
a__ has joined #ruby
syskk has joined #ruby
syskk has joined #ruby
dnjaramba has joined #ruby
pdtpatr1ck has joined #ruby
bdon has joined #ruby
shtirlic has joined #ruby
dnjaramba has joined #ruby
Banistergalaxy has joined #ruby
incomprehensibly has joined #ruby
Jay_Levitt has joined #ruby
incomprehensibly has joined #ruby
mikeric has joined #ruby
ElderFain_ has joined #ruby
Jamoka has joined #ruby
snip_it has quit [#ruby]
Jamoka has joined #ruby
rushed has joined #ruby
randym has joined #ruby
ZachBeta has joined #ruby
RomyRomy has joined #ruby
Karmaon has joined #ruby
ZachBeta has joined #ruby
denom has joined #ruby
bonhoeffer has joined #ruby
dnjaramba has joined #ruby
akem has joined #ruby
jds has joined #ruby
Hanmac1 has joined #ruby
Sinistral_ has joined #ruby
a__ has joined #ruby
phantomfakeBNC has joined #ruby
Sinistral_ has joined #ruby
Sinistral_ has joined #ruby
dotnull has joined #ruby
rubbish has joined #ruby
rubbish has quit [#ruby]
cooldman69 has joined #ruby
caiges_ has joined #ruby
zulax has joined #ruby
<cooldman69> new to ruby, trying to add elements to an another array through if a condition is true within the initial array. But nothing is being added, nil array. http://pastebin.com/2AciAbHE
Seisatsu has joined #ruby
Nathandim has joined #ruby
pingfloyd has joined #ruby
nfluxx has joined #ruby
rurufufuss has joined #ruby
baroquebobcat has joined #ruby
Kn|t3_ has joined #ruby
<davidcelis> cooldman69: Item.all.select(&:boots).sample(1)
<davidcelis> look, one line
<cooldman69> davidcelis: damn you
<davidcelis> grabbing elements out of an array based on a condition => use Enumerable#select
<cooldman69> davidcelis: i see, i skipped over that in the api :/ but how do i do a false statement? != boots
dnjaramba has joined #ruby
<davidcelis> Item.all.select {|i| !i.boots }.sample(1)
<davidcelis> just turn it into a block and not it
mikepack has joined #ruby
<davidcelis> or you could do
<davidcelis> Item.all.reject(&:boots).sample(1)
<davidcelis> reject is the opposite of select, in that it will reject anything that holds true to that condition
<davidcelis> read through the ruby doc for Enumerable
<davidcelis> it is by far the most useful doc page
<davidcelis> by the way, there's also a #rubyonrails channel if you get any rails-specific questions
apok has joined #ruby
sroy2_ has joined #ruby
startling has joined #ruby
Fezzler has joined #ruby
<cooldman69> davidcelis: yes thank you, so far rails isn't the issue it is ruby. im a java person
phantomfakeBNC has joined #ruby
mxweas_ has joined #ruby
<rurufufuss> question: is it true that in a ruby source code, the regex expression /whatever,etc/ can only come after the following characters: (:=,~
banisterfiend has joined #ruby
dnjaramba has joined #ruby
Azure|dc has joined #ruby
nfluxx has joined #ruby
Azure|netbook|dc has joined #ruby
chrxn has joined #ruby
<cooldman69> davidcelis: ok i need multiple enumeraters, mana true boots false. can this be done in one line?
<davidcelis> rurufufuss: what?
<davidcelis> cooldman69: You mean item.mana has to be true, and item.boots has to be false?
akem has joined #ruby
<cooldman69> davidcelis: i think i figured it out actually, Item.all.select(&:mana).reject(&:boots).sample(5)
<davidcelis> yup, there you go
<davidcelis> just chain enumerables
<rurufufuss> davidcelis: writing a syntax highlighter settings for ruby, and there's a hacky setting for recognizing pattern -- filter by character that comes before that pattern
<cooldman69> davidcelis: haha thats great.
<rurufufuss> with javascript, it's (:=,
<davidcelis> rurufufuss: regular expressions are just objects. they can be treated as such
<davidcelis> if i were to just type: /blahblahblah/ in IRB
<davidcelis> it'd be fine
cobragoat has joined #ruby
<rurufufuss> hmm
<cooldman69> davidcelis: thanks for your help, i like ruby more than java i think hehe
<davidcelis> cooldman69: you can also just do it in a single enumerator, like... .select {|item| item.mana && !item.boots}
<davidcelis> cooldman69: but it's mostly up to you
dnjaramba has joined #ruby
<cooldman69> dnjaramba: the select and reject is the tidiest, but what does the & mean?
banister_ has joined #ruby
<davidcelis> cooldman69: array.select(&:method) means send `method` to each object in the array
<davidcelis> for example, [1, 2, 3, 4, 5].map(&:to_s) would return ["1", "2", "3", "4", "5"]
<davidcelis> each item in that array gets to_s called on it in the enumerable block
<davidcelis> it's just a quicker, cleaner way of sending one method or conditional to an enumerable instead of having to define an explicit block
<banister_> davidcelis: do u like it
<cooldman69> davidcelis: ah ok, thanks. seems a little weird to me at the moment
<davidcelis> banister_: ?
<banister_> davidcelis: the &:to_s syntax
<davidcelis> yes, it's cleaner
al3xnull has joined #ruby
dootdoot has joined #ruby
dnjaramba has joined #ruby
radic has joined #ruby
dnjaramba has joined #ruby
coderguy has joined #ruby
adamjleonard has joined #ruby
pdtpatr1ck has joined #ruby
pdtpatr1ck has quit [#ruby]
macabre^ has joined #ruby
rosalindwills has joined #ruby
rosalindwills has quit [#ruby]
jergason has joined #ruby
dnjaramba_ has joined #ruby
t3i has joined #ruby
ada2358 has joined #ruby
dootdoot has joined #ruby
nfluxx has joined #ruby
<t3i> I have some code that raises an exception, i then rescue this specific exception and raise another more specific one. I'm using rspec to check that my exception is raised. At the moment it is only reporting the first one is being raised. I'm wondering if there is a way to remove it so my exception is the one being raised?
iband has joined #ruby
milkpost_ has joined #ruby
dnjaramba has joined #ruby
frequency9 has joined #ruby
cobragoa_ has joined #ruby
Banistergalaxy has joined #ruby
linoj has joined #ruby
randym has joined #ruby
td123 has joined #ruby
pen has joined #ruby
divout has joined #ruby
khem_ has joined #ruby
<khem_> What do I need to do to get gem with my ruby-1.8.6 install? running make install only gave me the ruby interperter.
mikepack has joined #ruby
dagnachewa has joined #ruby
MaskRay has joined #ruby
banisterfiend has joined #ruby
<MaskRay> Hi all, i'm doing 99-prolog/lisp-problems in ruby and encounter a problem when i try to solve p27
<MaskRay> This is my attempt: http://paste.pocoo.org/show/553783
randym has joined #ruby
<MaskRay> however why do the `res' array contains only empty sub-arrays ?
wookiehangover has joined #ruby
wallerdev has joined #ruby
rippa has joined #ruby
samertm has joined #ruby
<samertm> hey
<samertm> if I wanted to write a script that could put in information and submit a form on a webpage
<samertm> where would I start?
syskk has joined #ruby
syskk has joined #ruby
Nisstyre has joined #ruby
<MaskRay> well, i regonized my problem as referred to deepcopy
Zolrath has joined #ruby
<samertm> what librar/ies|y/ would I need to do that
cbuxton has joined #ruby
gate has joined #ruby
nfluxx has joined #ruby
wusher has joined #ruby
phantasm66 has joined #ruby
<bob2> heh
<bob2> timing
bkorte has joined #ruby
kinderman has joined #ruby
<|DM|> wrong channel
<|DM|> don't open that.
mxweas_ has joined #ruby
bkorte has quit [#ruby]
krz has joined #ruby
<davidcelis> motherfucker.
<davidcelis> this is one of the few places i thought i was safe
<davidcelis> and you've ruined that feeling
Kn|t3_ has joined #ruby
c0rn has joined #ruby
pingfloyd has joined #ruby
havenn has joined #ruby
rohit has joined #ruby
looopy has joined #ruby
mikepack has joined #ruby
ZachBeta has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
krzkrzkrz has joined #ruby
krzkrzkrz has joined #ruby
krz has joined #ruby
mattonrails has joined #ruby
Eth4n has joined #ruby
JohnBat26 has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
zomgbie has joined #ruby
tonini has joined #ruby
adman65 has joined #ruby
mikepack has joined #ruby
x0F__ has joined #ruby
ZachBeta has joined #ruby
randym has joined #ruby
Eth4n has joined #ruby
i8igmac has joined #ruby
cobragoat has joined #ruby
nixmaniack has joined #ruby
<i8igmac> I have built a small tool for logging into a gameserver, im having trouble with this algorithm...
<i8igmac> It should last a extreamly long time...
<i8igmac> but seems to only last a few hours
<i8igmac> 3 loops, 2 of them are threads
<i8igmac> i tried to clean it up
<i8igmac> im simple but i dont understand why it hangs up
mattonrails has joined #ruby
jds has joined #ruby
phantomfakeBNC has joined #ruby
yoklov has joined #ruby
ghosTM55 has joined #ruby
xastion has joined #ruby
JohnBat26 has joined #ruby
notjohn has joined #ruby
thone has joined #ruby
djdb has joined #ruby
scalebyte has joined #ruby
remink has joined #ruby
<scalebyte> have a doubt in this method... https://gist.github.com/1868135 used to retrieve the latest activity id of the given user... is this the ryt way to do it since the function throws bugs at times
yxhuvud has joined #ruby
snip_it has joined #ruby
<scalebyte> ^^^ kindly help me crack this
fragrant has joined #ruby
<bob2> by 'bugs' do you mean 'exceptions'?
<fragrant> Hi, i heard that ruby is not scalable, Is that true?
<bob2> that's a pretty lame troll
<fragrant> So what is scalability problem actually? What does that scalability problem mean?
<banisterfiend> bob2: hey bobs, how are you finding ruby now you've been using it for a while
<bob2> first, define what 'scability' you're askign about
<fragrant> WCan anyone tell what is ruby scalability problem?
matthias_ has joined #ruby
gianlucadv has joined #ruby
phantomfakeBNC has joined #ruby
phantomfakeBNC has joined #ruby
<banisterfiend> fragrant: join #ruby-lang and ask zenspider
<bob2> better still, think about the question some more and ask a more detailed question instead
fragrant has quit [#ruby]
phantomfakeBNC has joined #ruby
<scalebyte> bob2: yes exceptions
startling has joined #ruby
Spockz` has joined #ruby
<scalebyte> bob2: what he meant by scalability is the efficiency in handling concurrent requests !!
rickmasta has joined #ruby
<bob2> if you say so
<bob2> ps it'd save a lot of time if you included the traceback in your initial paste
<yan_> is there a way to compare two strings, but instead of getting -1/0/1, find out the first character that the strings differ?
<scalebyte> bob2: could u find a better solution to my query on this https://gist.github.com/1868135
Sliker has joined #ruby
mikeric has joined #ruby
cableray has joined #ruby
<RubyPanther> scalebyte: https://gist.github.com/1868204
<RubyPanther> with rails/AR 3 it would be where instead of find :first
pen has joined #ruby
<RubyPanther> and .limit(1)
<scalebyte> RubyPanther: thanks mate... what do you think was the possible loophole in my code? I mean i knew there was something imperfect abt that
|DM| has joined #ruby
<RubyPanther> scalebyte: because you were requesting all the rows back from the database and then pulling the last one off in Ruby instead of telling SQL to order it and just give you one row
<scalebyte> RubyPanther: yep picking the first from desc dates will always give me the latest record !! :) thanks mate hope it will work fine !!
tk_ has joined #ruby
<scalebyte> RubyPanther: was the bug like "Not able to find activity_id" possible outcome of my crappy implementation ? :-/
<RubyPanther> scalebyte: yeah because not having the order means that there is not a defined order, and in many databases the last row is the last row changed
jaywastaken has joined #ruby
<scalebyte> RubyPanther: thanks mate so yur code does make perfect sense... and hope it will not give me any more bugs :)
randym has joined #ruby
Eth4n has joined #ruby
<scalebyte> RubyPanther: but the rows were never modified at all...
<RubyPanther> scalebyte: databases can be weird like that without an order
symb0l has joined #ruby
<RubyPanther> You always have to specify order where it matters
<scalebyte> RubyPanther: one last doubt https://gist.github.com/1868135 the last time before end is it the right way to do it since activite_id is not the pro=imary key
<scalebyte> RubyPanther: it still isnt working fine...
Shin-LaC has joined #ruby
Silker has joined #ruby
<scalebyte> RubyPanther: is it correct to do text = Activity.find(active_id).description ??
<RubyPanther> scalebyte: https://gist.github.com/1868275
<RubyPanther> no
<scalebyte> RubyPanther: didnt get the logic https://gist.github.com/1868275 completely UserActivity and Activity are two different models comepletely... UserActivity keeps track of all user activities and in the fuction when i give a date and a user id i want that to fect the most recent activity of the user within the date and from that activity_id I go to the activity model to feth its description !!
<RubyPanther> scalebyte: sorry https://gist.github.com/1868275
<scalebyte> RubyPanther: which method is better? line 1 to 5 ?
<scalebyte> RubyPanther: how can i do user_activity.activity.description ?
mafolz has joined #ruby
ph^ has joined #ruby
<RubyPanther> scalebyte: this is why you use associations. Whenever you have a foreign key, the model with a foreign key has a belongs_to :foo and the other side has has_many :bars (or has_one :bar)
KL-7 has joined #ruby
<scalebyte> RubyPanther: yes but these two models doesnt have an associations.. I want to directly fetch the records using queries... but Activity.find(active_id).description does work... s
ph^ has joined #ruby
<scalebyte> RubyPanther: i was wondering if there is any active_id whose description is nil.. could that be possible ?
<scalebyte> RubyPanther: in my mahcine there isnt any records as such but in the server where it is deployed,, i will have to check...
<RubyPanther> scalebyte: well, you _should_ add associations.
<scalebyte> RubyPanther: the issue it works most of the times.. but once it doesnt i need to trim some data..
<RubyPanther> this is not the year 2000. :)
bluOxigen has joined #ruby
<scalebyte> RubyPanther: how can I add associations could u just tell me in this case how could i go abt associations for this ?
Morkel has joined #ruby
<RubyPanther> scalebyte: in the UserActivity model you just add: belongs_to :activity, :foreign_key => 'active_id'
<scalebyte> RubyPanther: hey i already have an association user_activity belongs to activity
<RubyPanther> oh good
<scalebyte> RubyPanther: but no foriegn key... and actually the id in the activity model is promary and this active_id (variable) is used to address id
<scalebyte> RubyPanther: i guess where I am going wrong is
<scalebyte> text = Activity.find(active_id).description
<RubyPanther> scalebyte: AR doesn't care if it is a key in the db, it just uses the value of the column... the :foreign_key option is to compensate for it being called 'active_id' instead of 'activity_id'
<scalebyte> RubyPanther: ^ here
Asebolka has joined #ruby
<scalebyte> RubyPanther: yeah so i guess instead of text = Activity.find(active_id).description i will have to give text = Activity.find( id => active_id).description something like this !!
<RubyPanther> Then when you say user_activity.activity it does the same as Activity.find(active_id) but behind the scenes
<RubyPanther> no just do it like I said lol :)
<scalebyte> so what should the end product of the whole code be?
<scalebyte> user_activity.activity.description
<scalebyte> ??
mattonrails has joined #ruby
Banistergalaxy has joined #ruby
<scalebyte> RubyPanther: def last_activity_description(date, user_id) user_activity = UserActivity.find(:first, :conditions => ["Date(updated_at) <= ? and user_id = ?", dat e, user_id], :order => 'updated_at DESC') user_activity.activity.description end
Sliker has joined #ruby
<scalebyte> RubyPanther: workes fine... but will have to try on the server... :) wish me good luck lol everytihg seems to b working fine until i deploy it onto the sever
zommi has joined #ruby
bier has joined #ruby
<RubyPanther> good luck scalebyte
noyb has joined #ruby
xastion has joined #ruby
rms-ict has joined #ruby
pi3r has joined #ruby
krz has joined #ruby
looopy has joined #ruby
sspiff has joined #ruby
Kn|t3_ has joined #ruby
<scalebyte> RubyPanther:
<scalebyte> u there?
wenbert has joined #ruby
<scalebyte> RubyPanther: this is the error log https://gist.github.com/1868387
arturaz has joined #ruby
<RubyPanther> scalebyte: undefined method `activity' for nil:NilClass that means you need to assign the value to a temp and make sure you get a result before calling .activity
<scalebyte> RubyPanther: so what do I need to do? Its working fine on my system... there are no nil values too in my server database.. :-./ this is wierd
<RubyPanther> scalebyte: you just need an if. It is not a nil in the database, it is no result from your SQL.
akemrir has joined #ruby
dootdoot has joined #ruby
<scalebyte> RubyPanther: this is my actual function https://gist.github.com/1868412
<scalebyte> modify the description string once i retrieve it !!
berkes has joined #ruby
mikeric has joined #ruby
vraa has joined #ruby
<scalebyte> RubyPanther: need your help mate to solve this bug... :) its up and running on the server so i need to fix this quickly
nemesit has joined #ruby
<RubyPanther> you better not "need" my help, because I haven't received payment... lol
<scalebyte> RubyPanther: I can get you what u need even my girlfriend... lol.. but ryt now i need your expertise bro :)
<scalebyte> RubyPanther: and the error that I recieved in the begining is the same.. So I havent been able to crack the issue up till now !!
<RubyPanther> my gf is sitting next to me, if you make her mad I get an elbow in the eye
<RubyPanther> scalebyte: so what happens if there is no user activity today??
<RubyPanther> then user_activity is nil after the first line, right?
<scalebyte> RubyPanther: ya i know she is really the best gd in the world and all i was trying to exagerate was that u can get what u need from me once u help me crack this issue... pls.. its a do or die situation for me panther.. be my saviour and a ruby hero :)
<scalebyte> RubyPanther: gf* sorry spelling mistake
<RubyPanther> I am already a Ruby hero. http://stuff.rubypanther.com/images/jedi.png
<RubyPanther> scalebyte: you just need a line 2 like : return "" unless user_activity
<RubyPanther> or return "no activity" unless user_activity or whatever
<scalebyte> RubyPanther: no it actually keeps track of all user activities untill today... so it will definietely get me a record if the user has signed in atleast once.. and the user will definitely sign in since the user id that i am using is frn a tabkle that keeps trck of user logins
<RubyPanther> scalebyte: you still have to do _something_ there is no record other than just getting an exception ;)
marvin_ has joined #ruby
<scalebyte> RubyPanther: mate am sure someday u will definitely give radar a rum for his money.. the real ruby hero i must say
<RubyPanther> scalebyte: it can easily return no results even if there are rows because you have Date(updated_at) <= ?
<scalebyte> RubyPanther: could u modify the line for me pls so that i can do something like if it doesnt retuen activity id for a particular use it can leave the space empty or neglect the user
JohnBat26 has joined #ruby
<scalebyte> RubyPanther: i do Date(updated_at) <= ? since i want the rmost recent record close to the given date
<RubyPanther> something as simple as a time zone mismatch between whatever you're passing in and the database could cause you not to get results, so you _have_to_ check for results and do something reasonable if you don't find any activity... even if it is just to raise an exception with a better error message like raise "omg I didnt find any activities :((("
<scalebyte> RubyPanther: Date(updated_at) <= ? i get error when i give today's date also ... :)
Eth4n has quit ["part"]
Eth4n has joined #ruby
<RubyPanther> scalebyte: if you're just ordering it and want the latest date, you don't need a date <= thing at all, just the :order that you have already
<scalebyte> RubyPanther: how can i modify the code to wirte "No Activity Traced" corresponding to those users whose activity ids are not found? https://gist.github.com/1868387
<RubyPanther> scalebyte: return "No Activity Traced" unless user_activity # line 2
<scalebyte> RubyPanther: yes but again the activity id should be recent with respect to the date passed to the function ryt so ... will not I have to do both date <= and order
jaywastaken has joined #ruby
<scalebyte> RubyPanther: hw abt this ? https://gist.github.com/1868451
<RubyPanther> scalebyte: well if you are passing some date in, then the date has to be after the activity you hope to find, also this Date(updated_at) <= ? has to really work in your db with the value you pass in...
<RubyPanther> You can't hope to take a date as an argument like that and always get results
<scalebyte> RubyPanther: the most crazy part is it was working until some time...and then i again trim some data.. it starts working again... so is it really something thats got to do with the value I pass since the code remains the same
<RubyPanther> scalebyte: that won't work like what I said. If you only want one return, you still have to keep it from getting to the .description line
<scalebyte> RubyPanther: so hw can I modify the code could u help me pls ? am all frustrated and confused now with the pressure :(
<scalebyte> RubyPanther: mate u there?
<scalebyte> RubyPanther: helooo ruby hero ?? :(
<RubyPanther> sorry I've been recalled by the better half
<RubyPanther> scalebyte: return "No Activity Traced" unless user_activity # line 2
parus has joined #ruby
<scalebyte> RubyPanther: https://gist.github.com/1868451 is it correct now?
chimkan___ has joined #ruby
<scalebyte> RubyPanther: Ruby Hero... help... !!
<scalebyte> RubyPanther: :'( :'( I am confused.........
inetking has joined #ruby
Mekkis has joined #ruby
<scalebyte> RubyPanther: I am not getting the syntax correct hero...
45PAAAE30 has joined #ruby
ephemerian has joined #ruby
c0rn has joined #ruby
Dreamer3 has joined #ruby
<scalebyte> RubyPanther: is it correct nw hero ? https://gist.github.com/1868451
<banisterfiend> scalebyte: stpo that 'hero' stuff it sounds gay
<scalebyte> RubyPanther: banisterfiend : I hope noe it makes sense https://gist.github.com/1868451
ephemerian has joined #ruby
tvo has joined #ruby
tayy has joined #ruby
<scalebyte> banisterfiend: but both RubyPanther and myself have girlfriends
biomunky has joined #ruby
<scalebyte> banisterfiend: could you check if this code makes sense... if something wrong ? https://gist.github.com/1868451
fayimora has joined #ruby
<banisterfiend> scalebyte: no and stop talking to me, thanks :)
Spockz has joined #ruby
chimkan has joined #ruby
apoorvparijat has joined #ruby
<apoorvparijat> #join #jruby
<scalebyte> banisterfiend: y u angry with me... Did i do something wrong... I am sorry if any of my words offended you.. I apologizr
<banisterfiend> scalebyte: you're just annoying
<scalebyte> banisterfiend: sorry but I am not...
KL7 has joined #ruby
<davidcelis> what the fuck am i reading
kaktus has joined #ruby
nw` has joined #ruby
twelvechairs has joined #ruby
BiHi has joined #ruby
twelve_chairs has joined #ruby
daglees has joined #ruby
<Eth4n> davidcelis: thats not the usual style of convo here
<Eth4n> lol
<davidcelis> i know, i'm in here all the time
<davidcelis> but what the fuck
ZachBeta has joined #ruby
pen has joined #ruby
<Eth4n> scalebyte: The way you are trying to get answers is the wrong way.
<Eth4n> so hold the phone
<Eth4n> chill you cl*t
<Eth4n> calm your clam
eka has joined #ruby
<Eth4n> davidcelis: sound about right?
<Eth4n> s/chill your cl*t/chill your cl*t/
<Eth4n> erg
johndbritton has joined #ruby
tvo has joined #ruby
visof has joined #ruby
<scalebyte> Eth4n: actually i need to get this bug fixed ASAP.. i am a lil frustrated sorry if anyone was offended
ZachBeta has joined #ruby
<Eth4n> scalebyte: you're annoying the fuck out of people
<Eth4n> doingitwrong.rb
<scalebyte> Eth4n: sorry.. will take care from next time.. am new to the room.. kindly forgive and I apologize once again
<scalebyte> Eth4n: https://gist.github.com/1868451 this is what has been annoying me..not getting it ryt !!
Azure|dc has joined #ruby
<Eth4n> ok scalebyte
<Eth4n> what the fuck are you trying to do with that
<Eth4n> and maybe I can help
<scalebyte> Eth4n: its like.. user_activity retrieves the most recent activity_id of the user within the given date.. and so if it fails to retrieve the id i want to have another text instead thats y i do a unless
<scalebyte> Eth4n: sicne what I want ultimatelty is the description for the corresponding activity_id so if it fails to retrieve the activity_id in the first scope then I wanna have another string passed instead !!
<scalebyte> Eth4n: u can just look till line 6 since the other lines are just string modifications !!
<Eth4n> line 6
<Eth4n> theres not much there
<Eth4n> probably something wrong with another file
<Eth4n> or wherever
<scalebyte> Eth4n: this is the erro i get in the display page https://gist.github.com/1868387
<Eth4n> dude
<Eth4n> that is rails
<scalebyte> Eth4n: which means its not able to retrieve activity_id for certain user's iterations
jbw_ has joined #ruby
<scalebyte> Eth4n: yes...
<Eth4n> scalebyte: #rails
<Eth4n> this is #ruby
<Eth4n> not #rails
<Eth4n> er scalebyte
<Eth4n> try #RoR
<scalebyte> Eth4n: yeah... I am not able to connect to the rails room
<Eth4n> try registering your nick
<Eth4n> /MSG NickServ register password email
<scalebyte> Eth4n: someone from my office got banned in that room and since we use same IP no one at work can login to that room now
<Eth4n> sucks
<Eth4n> maybe that guy shouldn't have done what he did
<bob2> tis a shame but you need to sort it out
<scalebyte> Eth4n: we have to pay for someone else's mistake :(
<Eth4n> scalebyte: not my problem
<Eth4n> I don't know Rails
<shevy> hehe
<Eth4n> I've played with it
<scalebyte> Eth4n: i thought since rails is actually ruby's baby :) someone here wud be able to help me out !!
<shevy> scalebyte it's a huge ass framework. and not created by matz. so I dont get your claim
<bob2> contact an op for the channel and ask them to unban the ip
<bob2> and smack your idiot coworker
<scalebyte> bob2: the op himself banned him... none other than Radar
<bob2> ok but as above
<Eth4n> ^all of this^
<Eth4n> well scalebyte
<Eth4n> ops don't usually ban for no reason
<scalebyte> RubyPanther knows it but doesnt seem to respond now!!
Ammar01 has joined #ruby
Kambus has joined #ruby
<Eth4n> so your idiot coworker probably f**ked up
<bob2> anyway, go fix that
<bob2> instead of complaining
<scalebyte> Eth4n: it was told that the #rubyonrails room is dominated by australians
<scalebyte> Eth4n: eaxclty
<Eth4n> what the heck is wrong with that?
<bob2> that's good, since we're lovely
<bob2> anyway, stop whinging and go sort it out
<Eth4n> australians are a lovely group of people
<scalebyte> bob2: yes i have to but stcuk up in the middle !!
<Eth4n> except the abos
<scalebyte> bye thanks
<shevy> could be worse
<shevy> Australia > USA
<Eth4n> oh I kid
<Eth4n> I wonder if it's possible for me to not be an asshole
<Eth4n> I should probably work on that some more
<bob2> also swear less at strangers
<shevy> hehe
<Eth4n> probably a good idea
tatsuya_o has joined #ruby
jlebrech has joined #ruby
<shevy> and always wear clean underwear!!!
<Eth4n> yes
<Eth4n> unless you're into dirt underwear
<Eth4n> which would be odd
tatsuya_o has joined #ruby
<shevy> pink and dirty, that's how it ought to be every time you write ruby code
<shevy> (not you, I mean everyone)
<Eth4n> how about pink and clean
<Eth4n> i like clean code
chrismcg has joined #ruby
stayarrr has joined #ruby
<shevy> yeah talk about
Shrink has joined #ruby
<shevy> I finally am in the process of cleaning up code I wrote 6 years ago
<Eth4n> wow, lol
<shevy> 60 different classes in the old code. I dont know what to do ... so I'll probably end up with 100 different classes. :( but mostly small ones
<Eth4n> oh and
<Eth4n> I'm dark3rdre4ms
<shevy> complexity confuses me
<Eth4n> I believe we've talked before
<Eth4n> haha
Mekkis has joined #ruby
david_w_sprysoft has joined #ruby
<shevy> it's strange because on the one hand, a small class can make the overall code more robust and cleaner
<jlebrech> how do I find a uuid hidden in an email, "+(32 digits)@"
<shevy> but on the other hand, it often feels as if the problem of too-much-complexity is just moved and shuffled around
<jlebrech> email address*
<shevy> jlebrech I think a regex can take a number
<shevy> \d{32}
noyb has joined #ruby
<shevy> something like that
<jlebrech> would that pick up a hex?
akem has joined #ruby
ikaros has joined #ruby
tatsuya_o has joined #ruby
<shevy> hmm
<shevy> you can make the regex more stringent
<shevy> regex = /\+\d{32}@/
<shevy> and probably require a word to follow after the @ too
DuoSRX has joined #ruby
Divinite has joined #ruby
<Eth4n> I need to work on my regex skilles
<Eth4n> -e
pen has joined #ruby
<shevy> I too but I usually look at cheat sheets until the regex works
virunga has joined #ruby
aces1up has joined #ruby
rodasc has joined #ruby
apoorvparijat_ has joined #ruby
dice_ has joined #ruby
<aces1up> if i already have a large code base that wasn't built with TDD, what is the best approach for refactoring / building tests with rspec? any guides you guys can suggest?
alup__ has joined #ruby
burgestrand has joined #ruby
Schmidt has joined #ruby
bdon has joined #ruby
bdon has joined #ruby
twelvechairs has joined #ruby
sizz has joined #ruby
bdon has quit [#ruby]
hosiawak has joined #ruby
wenbert has joined #ruby
<shevy> aces1up no idea so far ... right now I am porting old code file-by-file to a new layout and structure. it's very tedious and boring :(
hron84 has joined #ruby
sayakb has joined #ruby
nuba has joined #ruby
sv has joined #ruby
ByteCrunch has joined #ruby
mpereira has joined #ruby
Mekkis has joined #ruby
<Divinite> There appears to be an attempt to DoS the server.
<shevy> duck!
tonini has joined #ruby
lavaman has joined #ruby
tayy has joined #ruby
<Divinite> I think he's/she's saying "Dodge this!"
vitoravelino has joined #ruby
vitoravelino has joined #ruby
sawjig has joined #ruby
<twelvechairs> how exciting!
arturaz has joined #ruby
<RubyPanther> poor scalybyte I wonder if he managed to stumble into a fix
seitensei has joined #ruby
<RubyPanther> writing it for him was going nowhere
<Divinite> twelvechairs: Although the attempt should be much more widespread, I think. He/She has got they're resources stretched thin.
<Divinite> *their
<twelvechairs> RubyPanther: I looked at his code too.. It was pretty poorly written
nw` has joined #ruby
etehtsea has joined #ruby
phantomfakeBNC has joined #ruby
senny has joined #ruby
mike has joined #ruby
Mission-Critical has joined #ruby
rms-ict_ has joined #ruby
<Divinite> I wonder what would happen if everyone left freenode at the same time....
iocor has joined #ruby
phantomfakeBNC has joined #ruby
vraa has joined #ruby
looopy has joined #ruby
mikekelly has joined #ruby
at5l has joined #ruby
djdb has joined #ruby
Helius has joined #ruby
king313 has joined #ruby
randym has joined #ruby
emocake has joined #ruby
polysics has joined #ruby
<polysics> hello
<polysics> anyone has experience with Thor, please?
<polysics> i would like to create a directory then do a bunch of things in there
<polysics> can i set the destination directory twice?
<polysics> like, i create the first, then move into it
<polysics> or is there a sort of "cd " command for Thor?
darthdeus has joined #ruby
chussenot has joined #ruby
<chussenot> hi
<chussenot> a newb question
<chussenot> can you explain this line of code ?
tomodo has joined #ruby
<chussenot> @order.pay!
<chussenot>
<tomodo> hi
<chussenot> !
<chussenot> what it mean ?
<polysics> it's pretty easy
<chussenot> ah ;)
<polysics> the @order isntance variable is getting its pay! method called
<polysics> ! is just a normal character to Ruby
<chussenot> why we don(t do @order.pay ?
<polysics> it is used to indicate the method will do something important, especially it will change the item on which it is called
ZachBeta has joined #ruby
<chussenot> ok
<polysics> pay! probably does stuff with money
<polysics> so it is a way to tell you "watch out, this method is important"
<tomodo> I got a problem running ruby code!!
<chussenot> ok
<chussenot> thanks
<tomodo> can anyoe tell me what to do?
<tomodo> it says /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- builder (LoadError)
<polysics> tomodo: you didn't say anything
<polysics> i woudl say you are simply missing a gem
<tomodo> I installed ruby gems!
<twelvechairs> tomodo: something in the program you are running requires the 'builder' gem
<tomodo> ok
<twelvechairs> try 'gem install builder'
<tomodo> NICE
<tomodo> thanks a lot
josephwilk has joined #ruby
<polysics> ruby gems does not mean "all gems" :-D
<Divinite> Oh god, imagine that polysics...
<polysics> 200Gb install size for a Ruby install? :-D
<Divinite> Every gem in one package.
<Divinite> polysics: Exactly.
<polysics> not to mention the bazillion gems that do all the same thing
<Divinite> polysics: Of course not! ;)
ikaros has joined #ruby
<polysics> that would be something to see though :-D
Deele has joined #ruby
<polysics> no one uses Thor here?
<Divinite> You mean Tor?
<polysics> no, Tor would be OT here
<polysics> Thor, the command line generator gem
<polysics> the one Ruby uses
<polysics> *Rails
<Divinite> Oh yeah! I thought I remembered that
<polysics> we use it in Adhearsion too but i suck at it currently :-D
<Divinite> I was having problems with Thor... iOS, you see.
<polysics> using Rhodes?
<polysics> i gave up on that
Stefunel has joined #ruby
<polysics> i just learned ObjectiveC, people only want iOS apps anyway
<Stefunel> could someone tell me please what does this do? $: << RUBY_LIB_LOCATION
<Divinite> No, I have ruby on a jailbroken iPod touch.
josephwilk has joined #ruby
<polysics> really? cool! i want one too
<Divinite> polysics: So it has problems compiling native gems -.-
<polysics> Stefunel: it is adding a path to your ruby include path
<polysics> i am not sure RUBY_LIB_LOCATION is a native value
josephwilk has joined #ruby
<Divinite> polysics: How do you tell ruby where your gcc is?
<polysics> omg
<polysics> i have absolutely no idea whatsoever
<polysics> :-P
<polysics> i'd symlink it
<polysics> to something that is in the path
<Divinite> Yeah, in /usr/bin
<Divinite> But, it still says "Problem compiling native extensions"
<Stefunel> polysics so $: is handling the ruby include path?
randym_ has joined #ruby
<polysics> Stefunel: exactly
<Stefunel> thanks
<twelvechairs> Stefunel: http://www.zenspider.com/Languages/Ruby/QuickRef.html has a good reference of pre-defined variables
flippingbits has joined #ruby
<twelvechairs> these things are unfortunately difficult to google :)
lateau__ has joined #ruby
<polysics> i'd say "horribly"
<Divinite> polysics: twelvechairs: Hang on, I'll try and get a log.
<polysics> ruby dollar sign will result in anything but Ruby, probably :-D
<banisterfiend> Divinite: can u run macruby on ios?
Ammar01 has joined #ruby
<Divinite> banisterfiend: I'm not sure. I'll try.
Phlogistique has quit [#ruby]
phantasm66 has joined #ruby
emocake has joined #ruby
polysics has quit [#ruby]
mcvitty has joined #ruby
Ammar01 has joined #ruby
<mcvitty> Hi guys, I know this is terrible code, how can I write it in a better, more ruby like way?
<tomodo> looks fine to me
<tomodo> you could use do while instead of while do
<tomodo> that saves the repitition
<mcvitty> sorry there's a ! there that shouldnt be there
davidpk has joined #ruby
lbotos has joined #ruby
ChampS666 has joined #ruby
<mcvitty> like this?
<mcvitty> is it nessisary to return r in this case?
hukl has joined #ruby
<mcvitty> or does ruby auto return
<tomodo> wait a sec
<mcvitty> the last variable used
Foxandxss has joined #ruby
<tomodo> why don't you pick a random index into uuids then return that element
<tomodo> instead of guessing and checking
<tomodo> that way you don't have to loop at all
<lbotos> Hi all, I'm new to ruby and playing around. I gem updated and installed eventmachine but when i require it in my test.rb file I get "in require no such file to load -- eventmachine (LoadError) Any Ideas? I've verified it's in my local gems.
<mcvitty> tomodo: is there a way to return n number of unique random numbers in a rang?
<tomodo> huh
<mcvitty> not sure how you'de do the random index thing
<mcvitty> don't think that would work
<mcvitty> unless you've pre-generated your uuids, but my uuids need to be four digit numbers from 1000-9999
<rippa> I'd probably do uuids = *(1000..9999)
<rippa> and then uuids.sample
<rippa> and delete that number
<mcvitty> nice
Foxandxss has joined #ruby
<mcvitty> rippa: thanks
<rippa> that wouldn't work so good if your numbers are 1..1e100 for example
<mcvitty> no this is fine, very small data set :)
<mcvitty> just good practice for me
award85 has joined #ruby
award85 has joined #ruby
EddieS has joined #ruby
dibri has joined #ruby
tommyvyo has joined #ruby
seanstickle has joined #ruby
Eth4n has joined #ruby
Eth4n has joined #ruby
Talvino has joined #ruby
pen has joined #ruby
Richmond has joined #ruby
glosoli has joined #ruby
probst has joined #ruby
bonhoffer has joined #ruby
Eth4n has joined #ruby
banseljaj has joined #ruby
randym has joined #ruby
Danzer has joined #ruby
Eth4n has joined #ruby
<Tasser> I need to convert an XML to HTML and some logic included - my first idea would be nokogiri + xmlbuilder - or does nokogiri have a build api as well?
Danzer has quit [#ruby]
<Tasser> yes, it does
looopy has joined #ruby
tonini has joined #ruby
tayy has joined #ruby
Sliker has joined #ruby
<JonnieCache> Tasser: nokogiri is libxml2+sugar
<JonnieCache> libxml2 is part of gnome so its pretty much rock solid for whatever you need to do
<adman65> hello JonnieCache
<adman65> I see you commented on my caching guide on HN. Cheers :D
<JonnieCache> yep
<JonnieCache> once again great article :)
<JonnieCache> w
<adman65> nice to see appreciating it. It's the best article on that topic from everything I've seen
<JonnieCache> more guides should be completely comprehensive like that, too many tutorials only tell part of the story
<adman65> exactly
<adman65> that's why I wrote it. And there is nothing even close to that on caching
<adman65> it's all like…oh look you can cache a fragment. k bye.
randym_ has joined #ruby
seanstickle has joined #ruby
probst has quit [#ruby]
<JonnieCache> 37signals have that apple magic where they can make their adherance to established best practices seem like the manifestation of their sublime genius
<adman65> eh
<adman65> that's just ddh
<adman65> dhh*
ph^_ has joined #ruby
<JonnieCache> like how apple passed off rsync as an innovation (time machine) im fairly sure those caching architectures were probably invented in the 70s or something...
<adman65> no doubt
<JonnieCache> clever bastards...
<adman65> o
<adman65> maybe I could submit my advanced caching think as a proposal for rails conf 2012
randym has joined #ruby
apeiros_ has joined #ruby
briankbuckley has joined #ruby
fayimora_ has joined #ruby
fayimora_ has joined #ruby
eighty4 has joined #ruby
nowthatsamatt has quit [#ruby]
ayaat has joined #ruby
<ayaat> asalam o alikum
tayy has joined #ruby
glosoli has joined #ruby
redjack1964 has joined #ruby
rohit has joined #ruby
ph^ has joined #ruby
randym has joined #ruby
ayaat has quit [#ruby]
rohit has quit [#ruby]
<redjack1964> hello everyon. I would like to know if in Ruby you do like in C++ or Java (for example) : 1 file = 1 class?
odinswand has joined #ruby
<JonnieCache> redjack1964: you are free to do that yes
BiHi has joined #ruby
<JonnieCache> redjack1964: in rails you have to do that because of the way it manages the loading of files
emocake has joined #ruby
<JonnieCache> it throws an exception at load-time if you dont
<redjack1964> JonnieCache: Ok. I'm new in Ruby and i was wondering if the most ruby users do like that :) .
<redjack1964> JonnieCache: Alright. For the moment i'm not a rails user but good to know, thank you for your answer.
<JonnieCache> i think its generally good to do it
<JonnieCache> depends how complex the project is
odinswan1 has joined #ruby
rfloriano has joined #ruby
ZachBeta has joined #ruby
<redjack1964> i think so. Like ruby code is less verbose the ruby file size is very often small. In Java or C++ it's almost mandatory to do this.
odinswand has joined #ruby
liluo has joined #ruby
ph^ has joined #ruby
fr0gprince_mac has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
Shrink has joined #ruby
rohit has joined #ruby
tuxaddicted has joined #ruby
looopy has joined #ruby
rohit has quit ["Leaving"]
tatsuya_o has joined #ruby
rohit has joined #ruby
iamjarvo has joined #ruby
clockwize has joined #ruby
|DM| has joined #ruby
MrGando has joined #ruby
<JonnieCache> aaargh rbenv is not setting my GEM_HOME any more...
tmiller has joined #ruby
dhruvasagar has joined #ruby
wenbert has joined #ruby
Jooka has joined #ruby
rohit has joined #ruby
niklasb has joined #ruby
ZachBeta has joined #ruby
fayimora_ has joined #ruby
randym has joined #ruby
<JonnieCache> or rather something else is setting it...
`brendan has joined #ruby
tommyvyo has joined #ruby
marvin_ has joined #ruby
tomzx has joined #ruby
davidpk has joined #ruby
nari has joined #ruby
dv310p3r has joined #ruby
sterNiX has joined #ruby
milkpost_ has joined #ruby
emocake has joined #ruby
kf8a has joined #ruby
samnang has joined #ruby
milkpost_ has joined #ruby
fayimora has joined #ruby
randym has joined #ruby
emmanuelux has joined #ruby
fatroxorz has joined #ruby
JonSchuff has joined #ruby
tatsuya_o has joined #ruby
v0n has joined #ruby
diago2 has joined #ruby
Sliker has joined #ruby
flippingbits has joined #ruby
QaDeS has joined #ruby
Gekz has joined #ruby
Gekz has joined #ruby
fayimora has joined #ruby
tatsuya_o has joined #ruby
Jackneill has joined #ruby
includex has joined #ruby
MrGando has joined #ruby
includex has joined #ruby
clockwize has joined #ruby
includex has joined #ruby
gvt has joined #ruby
includex has joined #ruby
includex has joined #ruby
workmad3 has joined #ruby
includex has joined #ruby
includex has joined #ruby
includex has joined #ruby
includex has joined #ruby
enroxorz-work has quit [#ruby]
includex has joined #ruby
mcvitty has joined #ruby
<mcvitty> Hi guys, I'm trying to use the new 1.9.3 ruby JSON
includex has joined #ruby
<mcvitty> I'm new to ruby
<mcvitty> but would I do something like?
<mcvitty> File.open('output.json', 'w') {|f| f.write(JSON::Ext::Generator::GeneratorMethods::String::to_json(delegates)) }
<mcvitty> delegates is a ruby array
<apeiros_> whether you would is something we can't say :)
<apeiros_> would you?
<apeiros_> I would use delegates.to_json
<mcvitty> ahh
<apeiros_> also, I would use do/end instead of {}, since you care about the side-effect, not the return value.
includex has joined #ruby
<mcvitty> apeiros_: so to_json isn't part of the standard ruby library
<apeiros_> no
includex has joined #ruby
<apeiros_> but you can add methods to existing classes
<apeiros_> and most json implementations add #to_json to core classes like Hash, Array and String
includex has joined #ruby
<Tasser> it's called "object-oriented" since it wouldn't be object-oriented to implement a to_json based on class, would it?
sspiff has joined #ruby
sspiff has joined #ruby
macabre has joined #ruby
<mcvitty> the stdlib 1.9.3 has json?
<mcvitty> Tasser: class based functions are still valid OO
<Tasser> mcvitty, if you ask an object what type it is, it stops being OO
<apeiros_> oh, seems like
<apeiros_> nice. makes sense. widespread format after all…
includex has joined #ruby
<mcvitty> yes but I'm still flummuxed how to actually us it
<mcvitty> use*
<apeiros_> require 'json'; [1,2,3].to_json
<apeiros_> try that in irb
<Tasser> apeiros_, you're not in the pry hype yet? ;-)
<apeiros_> alternatively, start irb using `irb -rjson`
<apeiros_> Tasser: I'm a lazy ass. but I want to. for like forever…
<shevy> well
<shevy> as cool as pry is, but irb comes bundled with ruby. it's like you tell newcomers to install extra layers on layers before being able to try out things
<mcvitty> apeiros_: thanks
<Tasser> apeiros_, gem install pry
<mcvitty> what's pry?
<Tasser> shevy, you still have to install ruby, so you could get your suite up and full anyway
<shevy> irb with more power
<mcvitty> nice
<apeiros_> irb with more sense
<Tasser> basically a REPL-based IDE
<mcvitty> cool
lee0741 has joined #ruby
<shevy> Tasser well take rails. it installs lots of things. last time I tried the tutorial, it told me to "gem install bundler" and then use bundler. the problem was, bundler on my machine never worked as the instruction said it would, and I could not figure out how to make it work. at that day it was frustrating because I just lost time in the end
Sailias has joined #ruby
<Tasser> the more complexity abstracted, the more fail?
<JonnieCache> wait until you see the extensions... :)
<shevy> hmm
<shevy> how many gems do you have installed locally JonnieCache?
neurodrone has joined #ruby
<JonnieCache> exactly one projects worth
krz has joined #ruby
<shevy> one gem?
<JonnieCache> because this morning i nuked and reinstalled all my rubies
<shevy> I am sitting on 25 right now
<shevy> haha
<shevy> why the nuke?
<JonnieCache> there was some screwey shit with my GEM_HOME env variable
<JonnieCache> so i decided to reinstall rbenv and evrything from scratch
yekta has joined #ruby
<JonnieCache> in the end i fixed the problem by just putting `unset GEM_HOME` in by .zshrc but ive no idea why thats needed, god knows what else was setting that
looopy has joined #ruby
<JonnieCache> but anyway i have 103 gems installed, and thats all from one project. my rails apps tend to have an embarassingly large list of dependencies
<shevy> yay!
<JonnieCache> 2/3 of that is testing and development tools though
<shevy> now that's a number
<JonnieCache> in production its probably closer to 25 or something
emocake has joined #ruby
<shevy> hmm
<shevy> I think the only gem I sometimes use here for myself is pry
<shevy> and perhaps json
<JonnieCache> well rspec in itself is 5 gems
<JonnieCache> capybara is 3 or 4
<JonnieCache> capistrano has like 6 dependencies. dev tools tend to be very modular
drknus has joined #ruby
<JonnieCache> has anyone in here used the so-called "falcon patch?" the performance patches for ruby 1.9.3?
banseljaj has joined #ruby
<Tasser> JonnieCache, I'd use jruby for performance ;-)
<shevy> I only know the falcon punch
<JonnieCache> its more startup time its trying ot improve
<Tasser> ah
<JonnieCache> obviously jruby is a good choice if you need serious throughput in production
<JonnieCache> not a great first port of call for development speedups
nixmaniack has joined #ruby
<Tasser> yep
ixti has joined #ruby
tvw has joined #ruby
td123 has joined #ruby
kinderman has joined #ruby
notjohn has joined #ruby
dv310p3r has joined #ruby
carlyle has joined #ruby
ZachBeta has joined #ruby
workmad3 has joined #ruby
chimkan has joined #ruby
Jay_Levitt has joined #ruby
tatsuya_o has joined #ruby
denom has joined #ruby
includex_ has joined #ruby
phantasm66 has joined #ruby
include__ has joined #ruby
waxjar has joined #ruby
philcrissman has joined #ruby
briankbuckley has joined #ruby
liluo has joined #ruby
bashdy has joined #ruby
jergason has joined #ruby
nemesit has joined #ruby
ounis has joined #ruby
<JonnieCache> hmmm i can confirm that this "falcon" patch does load rails 30% faster https://gist.github.com/1688857
ukwiz has joined #ruby
tehhobbit has joined #ruby
aldodelgado has joined #ruby
nixmaniack has joined #ruby
<ukwiz> I am trying to debug on 1.9.3, but am unable to install ruby-debug-base19
tayy has joined #ruby
rippa has joined #ruby
pete989 has joined #ruby
thone has joined #ruby
pete989 has quit [#ruby]
rizzy has joined #ruby
<ukwiz> I am using gem install ruby-debug-base19 I get the errors shown in http://pastebin.com/LLDzJc72
kpshek has joined #ruby
mengu has joined #ruby
Nisstyre has joined #ruby
<JonnieCache> the debugger doesnt work on 1.9.3 it sucks
yoklov has joined #ruby
<JonnieCache> you can either get a custom ruby-debug gem, or patch ruby
andrewhl has joined #ruby
<apeiros_> or use gdb
<JonnieCache> or pry-nav
emocakes has joined #ruby
glosoli has joined #ruby
<ukwiz> JonnieCache: being new to ruby, how would I do that?
happynoff has joined #ruby
<happynoff> Hi there. Is there a way to upcase a latin accented character ? Thanks
looopy has joined #ruby
<apeiros_> happynoff: yes. but not with plain ruby (except using gsub + a hash with all conversions)
<apeiros_> there are unicode gems that can do what you want.
<apeiros_> search for 'unicode' on rubygems.org or ruby-toolbox.com
<happynoff> apeiros_: ok :) thanks
adambeynon has joined #ruby
elliot__ has joined #ruby
incomprehensibly has joined #ruby
tayy_ has joined #ruby
albemuth has joined #ruby
<ukwiz> can anyone tell me how to get a working debug gem for 1.9.3 please
<apeiros_> rvm install 1.9.3 --patch debug
<happynoff> apeiros_: the 'unicode' gem is exactly what I need, thanks !
<ukwiz> apeiros_: I get patch 'debug' not found
<apeiros_> ukwiz: rvm get head
<shevy> whoa
<ukwiz> apeiros_: before the install?
<shevy> apeiros_, are you finally using rvm?
blueadept has joined #ruby
axl_ has joined #ruby
graybeard has joined #ruby
<JonnieCache> ukwiz: yes before the install
<JonnieCache> get head updates rvm
<apeiros_> shevy: hu? I've been using it for over a year now…
<apeiros_> might even be over two years…
<shevy> cool
axl_ has joined #ruby
tayy has joined #ruby
iamjarvo has joined #ruby
e|f has joined #ruby
happynoff has joined #ruby
happynoff has quit [#ruby]
theRoUS has joined #ruby
<ukwiz> I ran rvm get head, then rvm install 1.9.3 --patch debug and get Already installed ruby 1.9.3-pl25
fayimora has joined #ruby
skitrees has joined #ruby
carlyle has joined #ruby
workmad3 has joined #ruby
nixmaniack has joined #ruby
ZachBeta has joined #ruby
ph^ has joined #ruby
CannedCorn has joined #ruby
<CannedCorn> what happened to why?
<CannedCorn> im very bummed out
<tomodo> he moved on
jgarvey has joined #ruby
<CannedCorn> but why delete your stuff
<shevy> he died tragically in a car crash
<tomodo> maybe he had some kind of self conscious panic attack
<CannedCorn> yah
<tomodo> hard to guess
<shevy> he hated us all in the end
<CannedCorn> i dunno, i wish he just told everyone what the deal was
nowthatsamatt has joined #ruby
nowthatsamatt has quit [#ruby]
ceej has joined #ruby
<deryl> well you can join the rest of the world in wondering why. Here, have some fun with the folks on ycombinator: http://news.ycombinator.com/item?id=773106
gavit has joined #ruby
tatsuya_o has joined #ruby
<tomodo> maybe python programmeres threatended him to stop, because he was making ruby appealing to newbies
<shevy> the python guys are too concentrated on writing python scripts
<shevy> you don't even see them ranting against other languages much
<tomodo> uh
<tomodo> I constantly see python fans telling newbies not to learn whatever since python is better
<shevy> yeah they are usually right
<shevy> python > perl
<shevy> python > php
<tomodo> I tend to jut let them beacuse I don't want to startt a fight, but it's very rarely good advice
wenbert has joined #ruby
<shevy> what's your advice then
<JonnieCache> lots of people think hes deep into some sort of underground hipset art scene
<JonnieCache> well maybe not lots of people but some people
<rippa> damn, I keep watching for >end
<shevy> my biggest gripe with python is the explicit self
<JonnieCache> i find it amusing it assume that's true
<rippa> method and class definitions feel open without it
snip_it has joined #ruby
<JonnieCache> *hipster
<shevy> everyday they are shuffling it
<td123> shevy: my current opinion is py is better for somethings and ruby is better for others
<shevy> aha
<shevy> I dont know python too well
<shevy> so for me ruby is better for everything than python. save for speed perhaps
robacarp has joined #ruby
<JonnieCache> python is better for funky mathematical things
<JonnieCache> theres nothing in ruby to match numpy and its friends
<td123> JonnieCache: right, for math/science related things, I would argue py is much better solely because of existing libraries
<shevy> what means better
<shevy> can python do things ruby can not do?
Eth4n has joined #ruby
<td123> I just said solely because of exising libs
punkrawkR has joined #ruby
<td123> I'm not saying the language is better
iocor has joined #ruby
<shevy> ok then it's just an amount of code work missing in ruby to reach that python level
<td123> ya
ZachBeta has joined #ruby
<shevy> it's kinda weird what I do with my code at times, and document it
<shevy> In old code, I have stuff like "The argument bla is used for this and that."
<shevy> but as things deteriorate or get changed, the argument "bla" suddenly no longer exists
caiges_ has joined #ruby
<shevy> so the docu is outdated suddenly
<shevy> :(
andywww has joined #ruby
mikepack has joined #ruby
baroquebobcat has joined #ruby
ckrailo has joined #ruby
<td123> shevy: also, you need to build a community around it, which I think is an even bigger factor
blueadept has joined #ruby
g0bl1n has joined #ruby
Excureo has joined #ruby
Indian has joined #ruby
caiges_ has joined #ruby
csavola has joined #ruby
<ukwiz> I program in python and like it, but I thought that I should try ruby/rails. Unfortunately it seems impossible to get a working configuration
bbttxu has joined #ruby
<td123> ukwiz: can you give some errors?
<ukwiz> nonworking debug as a start
<davidcelis> How are you installing Ruby?
<deryl> yay for minimalistic details! cause we all know its *easy* to help when you don't give anything
<davidcelis> For reals, we need details, bro
Synthead has joined #ruby
<deryl> now, he's probably typing. :)
lorenzo__ has joined #ruby
lorenzo_ has joined #ruby
<deryl> ok.. maybe not
phantomfakeBNC has joined #ruby
straind has joined #ruby
<davidcelis> Maybe he's typing a novel for us
<ukwiz> I started with the system ruby. I am on opensuse which seems to have a backlevel version. I then googled and found an article describing rvm and how to install multiple versions, so I installed 1.9.3 head, and then found that debug doesn't work. Tried to install ruby-debug-base19. That didn't install
jaywastaken has joined #ruby
<deryl> well we did say include detai;
<deryl> becareful what you wish for right? :)
<ukwiz> yes I was typing, but unfortunately I am not a touch typer
Indian has joined #ruby
<deryl> ehh, i've yet to see 'packaged' rubies work corectly and as intended once you step outside their *very* narrowly construed usage patterns.
<deryl> tried installing from source under /usr/local or using RVM to intall and manage multiple rubies?
<deryl> tried anything outside of *packaged* crap?
daniel_hinojosa has joined #ruby
<ukwiz> so really all I want is a working ruby configuration - not too much to ask for?
virunga has joined #ruby
<ukwiz> deryl: Answered that in my long description
ohcibi has joined #ruby
<deryl> ukwiz: debug does work. you're referring to a patch that was goofy from the getgo nevermind cleanly applying in all instances.
<deryl> rvm i know for a *fact* will allow oyu to install 1.9.3 WITH debugging support, AND has no issues running ruby-debug19. see the patch dir in rvm for the 1.9.3 patch. p125 doesn't need it
<davidcelis> ukwiz: Did you `gem install ruby-debug`
<deryl> so for *me* (and i deal with these reports every day) its PEBKAC
hron841 has joined #ruby
<deryl> and you nee the '19' on the ruby-debug to get it to work. ruby-debug doesn't work with 1.9. ruby-debug19 does
<davidcelis> this says just `ruby-debug`: https://github.com/mark-moseley/ruby-debug
fortysixandtwo has quit [#ruby]
<deryl> davidcelis: port of, not the official
<davidcelis> ah
<davidcelis> well, listen to deryl over me, anyway
<deryl> gems earch ruby-debug -dr && gem search ruby-debug19 -dr
<davidcelis> i never use the debugger
<deryl> i don't either
<davidcelis> i just log or use puts statements...
robacarp1 has joined #ruby
<ukwiz> ok then, how do I get rid of ruby altogether from my system, and what do I have to do to install a properly working one?
<davidcelis> you installed it using rvm, you can uninstall it using rvm
<la_pedycti> ukwiz: rvm remove ruby
<deryl> you installed it originally with the package manager
macmartine has joined #ruby
<deryl> rvm will NOT work with ANY packaged ruby under OS control
<deryl> he has to use the package manager for that. whatever his system is
<davidcelis> oh he installed a packaged ruby on top of his system ruby? ah
<ukwiz> rvm remove ruby doesn't work
<la_pedycti> ukwiz: What is your OS?
<ukwiz> opensuse 12.1
kidoz has joined #ruby
<la_pedycti> ruby version?
<la_pedycti> try yum purge [ruby-package]
<ukwiz> ruby -v gives1.9.3pl33
<deryl> see my rvm removal script from the rvm.beginrescueend.com Troubleshooting page, then once you have rmeoved your RVM install and the system ruby, diabled the RVM sourcinglines in your $HOME/..bash_profile and/or .bashrc) then you log out, log back in (clean slate) and reinstall using the rvm.beginrescueend.com/rvm/install using the install line for the style you want installed
gabeh has joined #ruby
<la_pedycti> replace [ruby-package] with the package name
gabeh has joined #ruby
<davidcelis> p133?
<davidcelis> what?
<ukwiz> Derander_: I will also remove all the system ruby stuff as well
<la_pedycti> ukwiz: deryl's solution is more sensible
<deryl> yes, once oyu have done what la_pedycti is saying. RVM is not responsib le for nor uses, or in any way affects the system ruby
<davidcelis> is p125 no longer the latest?
<JonnieCache> p133 is HEAD i think
csexton has joined #ruby
<davidcelis> gotcha
<deryl> davidcelis: damn, that changed fast. i just put in p125 yesterday damn it :)
<JonnieCache> or maybe its what tcs is currently built against
<deryl> anyways, off to walk the dog, then back to work.
<JonnieCache> there is no 133 release
<JonnieCache> from ruby-core
<la_pedycti> anyways,is there a way to upgrade my 1.9.3 to 1.9.3p125 without reinstalling?
mxweas_ has joined #ruby
<deryl> under rvm 1.10.1|2 you just rvm upgrade 1.9.,3 1.9.3-p125 and reload rvm. you'll have to rebuild any gems that are using whatever has changed ebtween the two releases, but you already knew that
<ukwiz> interestingly I installed using rvm install 1.9.3-head and it gave me 133
gyre007 has joined #ruby
<gyre007> is anoyne here using Heroku ?
b26 has joined #ruby
zulax has joined #ruby
lkba has joined #ruby
stenno has joined #ruby
<tomodo> what's the best way to put unicode symbols into a ruby file?
<tomodo> should I just paste them in, or should I enter their escape codes?
blueadept has joined #ruby
blueadept has joined #ruby
<rippa> just write them there
<rippa> escape codes work too
<banseljaj> gyre007: Kinda
mxweas_ has joined #ruby
<gyre007> banseljaj, im a total newbie with it and im just wondering if it's free or not...their pricing page is using lots of Heroku terminology which I'm not familiar with yet...
soulcutter has joined #ruby
<banseljaj> gyre007: It is free for small development apps.
<banseljaj> I use it for production testing
<gyre007> :)
<gyre007> can you elaborate on "small development" apps part ;)
<JonnieCache> yeah its free if you run just one instance... the equivalent of running just one `rails server` command
<JonnieCache> so it will not cope with a lot of users but its very useful for testing and experimenting
<banseljaj> gyre007: and if your database size doesn't go beyond 25mb
<shevy> ukwiz yeah always decide which ruby you want to use
<shevy> if system ruby from distribution, then you should stick to it consistently
<hron841> what is the difference between rvm exec and rvm do?
<Tasser> shevy, and use some GEM_HOME and GEM_PATH variables :-)
<shevy> hmm
dhruvasagar has joined #ruby
<gyre007> JonnieCache, ah ok, because when I registered they didn't ask for any credit card information
davidpk has joined #ruby
<JonnieCache> they wont ask until you do something that costs money
<shevy> I myself of course recommend to use the source and compile into /usr prefix. then one would not need to use any GEM_* variables :)
<banseljaj> gyre007: They won't Unless you scale it up
<gyre007> hron84, there is a RVM channel on freenode
king313 has joined #ruby
<hron84> gyre007: thanks
<shevy> hmm actually
<shevy> I think if you compile into a standalone directory, you won't need GEM_* settings either... at least I dont recall that I had to do that hmm
_marvin has joined #ruby
S4P0 has joined #ruby
rfloriano has joined #ruby
<S4P0> oi
dark3rdre4ms has joined #ruby
shtirlic_ has joined #ruby
dibri has joined #ruby
friskd has joined #ruby
davidpk has joined #ruby
<gyre007> is Heroku using Passenger to run Rails code or are they using something else ?
<Tasser> gyre007, thin
<gyre007> Tasser, mm cheers
<banseljaj> grey thin
Eth4n has joined #ruby
Eth4n has joined #ruby
<gyre007> how do they compare form your experience guys...
<banseljaj> gyre007: If you want passenger, then you can use EnYa
<Tasser> gyre007, they're a totally different usecase. thin is standalone, eventmachine, minimalistic. mod_rack (nobody calls it that) is an apache plugin
<gyre007> Tasser, so thin is basically all in one package...webserver&middleware
<Tasser> gyre007, middleware? nah, your middleware is the whole Rack stack
<Tasser> or what's your definition of middleware?
<gyre007> Tasser, Im reading that it glues together Mongrel and Rack
<gyre007> afaik Mongrel is webserver RAck is ruby middleware
symb0l has joined #ruby
<gyre007> middleware meaning http interface thingy
<Tasser> gyre007, http parser?
<gyre007> Tasser, yeah
ed_hz_ has joined #ruby
<gyre007> Tasser, so mod_rack (passenger) scalability pretty much depends on apache scalability...whilst the Thin is pure ruby...mmm
<Tasser> gyre007, nah, thin is a lot of C
<gyre007> Tasser, well ruby is a lot of C too :)
Seisatsu has joined #ruby
matthias3 has joined #ruby
<shevy> hmm depends
b26 has joined #ruby
<shevy> the amount of OOP abstraction is hard to find in C, just look at Gtk Source code, which is kinda ugly
<shevy> (I like the design in Qt more, but I use ruby-gtk, where one has to read the C source docu often enough in order to build ruby-gtk apps)
<gyre007> shevy, Gtk is a TOTAL MESS...I wrote one app in Gtk when I was at my university...ehm wrote...I meant SUFFERED through it :)...Qt is actually quite nice...
apeiros_ has joined #ruby
<shevy> hehe
<gyre007> I wrote even some C++ libraries in Qt
Spockz has joined #ruby
davidcelis has joined #ruby
mxweas_ has joined #ruby
gvt has joined #ruby
anon117 has joined #ruby
includex has joined #ruby
includex has joined #ruby
includex has joined #ruby
includex has joined #ruby
includex_ has joined #ruby
includex has joined #ruby
seitensei has joined #ruby
alfism has joined #ruby
yawNO has joined #ruby
jameshyde has joined #ruby
yawNO has quit ["Leaving"]
includex has joined #ruby
<ukwiz> so I installed rvm, installed 1.9.3 via rvm, and when I type ruby -v I get a command not found. What have I missed?
<gyre007> ukwiz, you missed to run the following: rvm use 1.9.3
<ukwiz> gyre007: that command gives RVM is not a function, selecting rubies with 'rvm use ...' will not work.
ghanima has joined #ruby
<gyre007> can you copy paste the output of the following command ? type rvm |head -1
<gyre007> ukwiz, what OS are you running ?
fr0gprince_mac has joined #ruby
<ukwiz> gyre007: rvm is hashed (/home/dma/.rvm/bin/rvm)
<ukwiz> running opensuse 12.1
banisterfiend has joined #ruby
CodeZombie has joined #ruby
<shevy> ukwiz can you put the error msg to pastie.org ?
<ukwiz> which error message?
<gyre007> ukwiz, rvm needs some environment script to be run after the install script...it should be somewhere in /etc/profile.d/rvm.sh
<gyre007> try to run that script
kenperkins has joined #ruby
<gyre007> source it
<gyre007> source path_to_rvm_script
pdtpatr1ck has joined #ruby
<deryl> did you add the rvm sourcing line to your $HOME/.bash_profile like the docs said? and logged out thenback in or sourced the newly added entry? if you did a multi-uer install did you add your user to the rvm group and then log out and back in since groups are only identified at login time for users?
<ukwiz> gyre007: there isn't an rvm.sh in /etc
<deryl> then you did NOT use sudo during the install process?
<deryl> and it would be /etc/rvmrc and /etc/profile.d/rvm.sh not /etc/rvm.sh
<shevy> sudo is for weaklings!
<gyre007> ukwiz, not sure how it's done on Suse, but RedHat based distros are sticking it into /etc/profile.d/
<deryl> there ate TWO distinct ways (well 3 but only 2 are normal) of installing rvm
<shevy> it's always good to have deryl here when it comes to rvm
<deryl> gyre007: ALL the installs for linux do that
<shevy> noone else is as passionate ;)
<ukwiz> deryl: I followed the instructions for single user
<deryl> and on osx
<deryl> shevy: hehe i'm part of that project. course, i'm passionate
<gyre007> ukwiz, then there must be rvm.sh somewhere hiding in /etc/profile.d/ directory
lkba has joined #ruby
<deryl> gyre007: no, that is ONLY for multi-user installs
<gyre007> deryl, ah
<ukwiz> I did all the installation as user, not root
yoklov has joined #ruby
<deryl> he did a per user so he didn't install the rvm sourcing line properly, and/or didn't source it, and/or didn't point correctly to $HOME/.rvm/scripts/rvm for sourcing (either wrong path or didn't add it to .bash_profile, but added it to .bashrc instead)
<gyre007> ukwiz, mm I always do it as root
<deryl> gyre007: why? do you *need* multi-user installs of RVM?
<deryl> and you don't install as root, you sudo bash blahblahblabh which just elevates your privs so you can write dirs. you do NOT ever install AS root
johndbritton has joined #ruby
<deryl> in fact we have that in so many places all over the site its funny seeing people still do it and then try to tell you they read the site
<deryl> cause you damned sure know they didn't <g>
<ukwiz> deryl: .bash_profile contain: [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
<deryl> ukwiz: ok, and what did you do after that was added?
<deryl> just adding a line does nothing at all
<apeiros_> . ~/.bash_profile
<deryl> you still have to source the profile or log out then back in like i said
<apeiros_> or: source ~/.bash_profile (same thing)
<deryl> yeah its osx that doesn't seem to like the .
<ukwiz> I closed the terminal session and opend a new terminal
<deryl> seems to only work correctly when you use source
<apeiros_> deryl: hm? . works fine on osx…
<deryl> ukwiz: if your terminal doesn't launch the new session as a login that will never be evaluated
<apeiros_> at least in standard bash without effing stuff up :)
<deryl> apeiros_: not always. we have several documented cases where . did not work.
<deryl> which is why we moved to stating 'source' out directly
<apeiros_> deryl: odd… checked for shell and os-version?
<deryl> hehe yes
<deryl> we have reason to believe its the bash tht comes with osx. (3.x) because when we have users use brew or macports and intall 4.x the issue disappears
<apeiros_> I wouldn't be surprised if they had something installed…
<ukwiz> no difference with source...
<deryl> bash -l
<deryl> type rvm | head -n1
SegFaultAX has joined #ruby
<JonnieCache> zsh ftw
<deryl> zsh has caused far MORE headaches (especially with that damned oh-my-zsh) than any other shell
<td123> lol
<deryl> they use the oh-my-zsh modules for bundler and stuff and it screws things upo, the creator made a rvm module and that messed up..
<deryl> mpapis is working with him iirc to fix the rvm module
<JonnieCache> heh im using somebodys fork of oh-my-zsh which has a lot of the crap removed
<JonnieCache> youre right most of hte plugins suck.
<JonnieCache> i just like the amazing completion
<deryl> hehe
<deryl> for *me*, I 'grew up' with sh and bash. i'm not in the market to learn a new shell.
cwd1 has joined #ruby
<deryl> i'll trust you :)
<JonnieCache> tbh i dont have any idea what the zsh-specific features of it are
Araxia has joined #ruby
iamjarvo has joined #ruby
<RubyPanther> zsh was popular in the 90s, it probably pulled at least 2% of the users away from csh before everybody switched to bash instead
<JonnieCache> i use it exactly like bash, except when i press the tab key, magic occurs
orospakr has joined #ruby
<JonnieCache> i can type `lsof - <TAB>` and it lists the switches! whats not to like...
banisterfiend has joined #ruby
<RubyPanther> by "popular" I mean, if you knew a guy who did "scripting" and thought it made them an awesome programmer, but they didn't use any language except their shell because "why do people need more?" That guy was using zsh. 9/10 times. And none of even _their_ friends used it... even though they had all given it a basic attempt.
flippingbits has joined #ruby
matthias6 has joined #ruby
<JonnieCache> i am not a fan of shell scripting at all
<apeiros_> deryl: small question - do we still have to specify some flag for clang with current rvm & lion?
Eth4n has joined #ruby
Eth4n has joined #ruby
ukwiz has joined #ruby
<RubyPanther> the same guy used batchfiles instead of C or BASIC if they were on windows.
<deryl> apeiros_: depends on the version of ruby. p125 doesn't because its fixed for working with apple's gcc. earlier versions still do, and mpapis added a code check (or is adding and is just testing) for version and auto-removing|appending as needed
<apeiros_> ah, nice
<apeiros_> good to know
<JonnieCache> RubyPanther: lol that was me 12 or 13 years ago
<apeiros_> having a friend here, updating his stuff :)
<gyre007> ok, so I narrowed down my decision to Thin/Mongrel/Passenger-as-apache_module...what is your experience with these ? In terms of scaling web apps, resource usage etc..
<JonnieCache> when i was 12 i wrote a lot of batch files
<deryl> apeiros_: yeah we got hit on that.. 3 days? ago.
<deryl> apeiros_: not sure if thats *just* in HEAD though. i know it'll be backported to 'stable' of course. i just don't know if mpapis has finished his testing yet
zach_ has joined #ruby
<JonnieCache> gyre007: it doesnt really matter tbh. passenger+apache/nginx is very easy to setup
<RubyPanther> JonnieCache: I wrote a few with named procedures, but then I got an account on the ISP's shell server and switched... to csh
<deryl> JonnieCache: i still write shells cripts all the time. sometimes there's more involved setting up ruby to do someting that a fast down and dirty shellscript will get both written and finished its job before
<JonnieCache> thin/unicorn behind nginx is a little more setup but is ultimately more scalable
<JonnieCache> its not hard to swap at all
seanstickle has joined #ruby
<deryl> i still use apache, but i have several sites up that use the mod_rerwite+mod_proxy and unicorn
<gyre007> JonnieCache, how does performance compare of apache-passenger to Thin for example...
theishi has joined #ruby
<gyre007> will have to check that out...
<JonnieCache> i dont like the fact that shell scripts merrily carry on when something fails, unless you specifically check exit codes everywhere. it makes me nervous
<deryl> JonnieCache: C must scare the crap out of you then
<deryl> no bounds checking etc
<RubyPanther> Nothing it going to be "more scalable" than apache
<deryl> since iet lets you walk right off the end f an array
<gyre007> RubyPanther, :)
<JonnieCache> deryl: ah thats a whole different thing. when i sit down to write C thats part of the territory
<RubyPanther> "as scalable as" would be the ultimate holy grail. If you claimed more... it might actually just suck and you never needed to scale it and didn't know.
<deryl> part of the shell territory too
<JonnieCache> i dont appreciate that happening when im just trying to rename some damn files
<deryl> shells are interfaces. up to you to code the interface to react responsibly :)
<theishi> i am trying to use the Open3 in my script, do I need a require or anything similiar? I am getting uninitialized constant when I try to use it at the moment
<gyre007> another thing I'm thinking of is the hassle of setting up environment for rails apps...I mean, Heroku is pretty awesome but once you start running something big they start charging you...I want to set up something on my hosting server
<RubyPanther> theishi: ye
<RubyPanther> s
igotnolegs has joined #ruby
jgrevich has joined #ruby
<JonnieCache> theres a reason why C is so dangerous, its because youre close to the metal. with shell youre still as far from the metal as with ruby/python but with none of the benefits
kjellski has joined #ruby
<deryl> umm, the shell is your *frst* interface outside kernel land. its job is to be the intpreter between you and the kernel
<deryl> thats *alweays* been a shell's job
<theishi> RubyPanther: i tried require before asking btw
<deryl> so umm that doesn't fly. you're 1 step outside kernel land. don't expect miracles
davidpk has joined #ruby
<deryl> shells are interfaces/iintpreters. not jesus
eldariof has joined #ruby
wusher has joined #ruby
carlyle has joined #ruby
<JonnieCache> yeah thats a good point. im not saying its a failing of the shell, just articulating my frustration with my own shell scripting adventures
fpd has joined #ruby
wusher has quit [#ruby]
fr0gprince_mac has joined #ruby
<deryl> :)
<RubyPanther> theishi: require is easy, if it didn't give an error, you did it right. If it tells you file not found, that wasn't it.
wusher has joined #ruby
<RubyPanther> shell scripting sucks... for "historical reasons."
cbuxton has joined #ruby
<JonnieCache> I think its probably down to the fact that I was a little familiar with modern scripting languages before i really used a modern shell properly, so i came in with false expectations
eignerchris has joined #ruby
<theishi> RubyPanther: i guess i needed to put open3 down in lowercase letters ... thanks
<deryl> hehe thats sort of akin to my relationship with ruby. figured, I can shell script fairly damned well. can't be *that* much harder using ruby.. (enter rude awakening)
ukwiz_ has joined #ruby
maletor has joined #ruby
<deryl> taht being said, i wouldn't 8stop* using ruby even if you paid me :)
<RubyPanther> bash makes simple things hard, so you think you're doing neat stuff but really it is close to hello world
workmad3 has joined #ruby
<JonnieCache> if.. fi is upsetting to me
<deryl> what scares *my* socks off is thinking about learning lisp or something similar.
<deryl> now thats enough to give me nightmares
<JonnieCache> whys that?
<RubyPanther> bash isn't supposed to be easy though, it is supposed to be possible to do something new, but mostly to be compatible with crufty old Sys V init scripts
GV has joined #ruby
<JonnieCache> fear of wearing out your bracket keys?
<deryl> you ever look through some of the constructs? holy hell thats a scary language
<deryl> lol
<deryl> yeah that too
<deryl> my buddy TJ keeps trying to get me to really learn it. i keep fighting him hehe
<tomodo> what constructs??
<JonnieCache> tbh i havent looked at it properly. when i briefly experimented i didnt encounter anything that scary
<tomodo> LAMBDA
<JonnieCache> i mean list processing in general is quite mind-bending
virunga has joined #ruby
<JonnieCache> but its not complex. if anything its too simple
<deryl> we have different renditions of 'complex' then heh
TrueColors has joined #ruby
<JonnieCache> by complex i mean 'a lot of different interacting things to learn'
TC_ has joined #ruby
<JonnieCache> so by that metric C is not complex at all :)
<TC_> Hey, if I have a random fixnum eg: rand(1..300) how do I find out it's length? As in, how many digits are in the number.
<deryl> anyways.. time for dishes and then back to writing this article.
Eiam has joined #ruby
<shevy> TC_ one way would be to number.to_s.size
Russell^^ has joined #ruby
<TC_> to_s would be to string?
symb0l has joined #ruby
<shevy> TC_ #to_s converts too string, then you count the number of characters. which will be the numbers of digits in your number
<RubyPanther> lists aren't complex, that is what the Pathologically Eclectic Rubbish Lister is for.
<JonnieCache> to_s.size is probably the most sensible option
<JonnieCache> i would be fun to write a mathematical solution though
fpd has quit [#ruby]
<shevy> do you still have too much free time!!!
<shevy> dont you have to write more railsy things
<JonnieCache> hmmm yes always
<td123> TC_: I think you can use log to figure it out
<apeiros_> deryl: shouldn't be a problem (if it's only in head) - I told him to `get rvm head` anyway ;-)
<TC_> to_s works fine :) ty
<apeiros_> we're installing 1.9.3p125 with the falcon patch
<deryl> apeiros_: lol rvm get head
gavit has joined #ruby
<shevy> the falcon punch?
<shevy> rvm punch back
<shevy> !!!
<shevy> what happens when you throw a ruby at a falcon
<apeiros_> tiger uppercut!
<td123> ya, I think log_10 would work to get the size
<shevy> td123 it would?
mxweas_ has joined #ruby
<shevy> my first reaction was to try 5555.size
<apeiros_> deryl: ok, seeem 1.9.3 doesn't like my friends ancient xcode (3.2) - anything specific to do to use kenneth's gcc?
<td123> ceil(log_10(x)) would work
<td123> but the corner cases are 0 and 10^x numbers
<shevy> hehe
<td123> those are easy to check for :)
<apeiros_> floor iirc, not ceil
<td123> apeiros_: definitely ceil
<deryl> apeiros_: youu can use either the command line only tools from xcode installer that apple just released, or, if he's not doing any Mac specific coding (Cocoa Carbon ect) he can use the osx-gcc-installer
<td123> apeiros_: log_10 999 = 2.9..
<shevy> well ceil works not here on my ruby 1.8.7 though
<apeiros_> td123: I'm pretty sure floor + 1
<apeiros_> otherwise you get the corner cases
<deryl> or upgrade to 4.1 so he has the gcc-4.2 (and eliminate headaches with earlier ruby versions) and then step up to 4.2
<td123> apeiros_: you're right :)
<td123> floor(log_10(x)) + 1 :)
<deryl> 4.2/4.3 will NOT remove the gcc-4.2 (the last sane gcc from apple)
<apeiros_> deryl: so rvm will pick it up on its own? nothing to do for us?
<td123> that would have no special cases except <= 0
<deryl> after doing the upgrade to the gcc? yeah
<shevy> where is floor()
<deryl> rvm doens't really have an inkling of the gcc used other than checking the gcc version output and/or the kernel version and then checking the gcc version
<deryl> its not like you have to tell it to upgrade its idea of gcc to itself
<td123> shevy: I bet you could just call .truncate
<apeiros_> shevy: Math.floor
pdtpatr1ck has joined #ruby
<td123> though you should probably use floor to make more sense
nfluxx has joined #ruby
<deryl> apeiros_: basically meaning that we just check for text patterns from gcc version output and if it matches we add this or that flag. its not really 'version' aware beyond that
blazento has joined #ruby
<apeiros_> ok
<deryl> (thankfully. not its job to be)
<apeiros_> gotta reboot. postgres fiddles with /etc/sysctl.conf…
<deryl> yep
Ownatik has joined #ruby
tobago has joined #ruby
<JonnieCache> AAARGH. hpricot forcably downcases tag names. how helpful.
apok has joined #ruby
<JonnieCache> i know it shouldnt matter, tell that to the clown who camelcase all their xml
apeiros_ has joined #ruby
tvo has joined #ruby
tvo has joined #ruby
apeiros_ has joined #ruby
<any-key> does the xml standard specify case sensitivity?
<JonnieCache> its meant to be case insensitive i think
<JonnieCache> it certainly behaves that way in browsers and such, which is presumably why hpricot downcases everything
fayimora has joined #ruby
<any-key> so does your code require case sensitivity when dealing with the parsed file?
hadees has joined #ruby
skim1776 has joined #ruby
medik has joined #ruby
skim1776 has quit [#ruby]
skim1776 has joined #ruby
<apeiros_> any-key: xml is afaik case sensitive
<JonnieCache> basically there are tags in the xml called things like CompanyName. I want to convert them to symbols like :company_name but I cant because hpricot changes it to companyname
skim1776 has quit [#ruby]
<apeiros_> and that afaik comes with an "I'm pretty sure"
<apeiros_> html otoh is not case sensitive (html is sgml, sgml isn't case sensitive)
<JonnieCache> this upsets me becuase I cant just have a nice map function, instead I have to hardcode things
<any-key> Nokogiri may not do that
<JonnieCache> yes but thats another dependency of which I have far too many already. (i already need hpricot for something else)
<JonnieCache> its not a big deal really just annoying
Deesl has joined #ruby
ukwiz has joined #ruby
mrtheshadow has joined #ruby
<any-key> is there anything HPricot can do that Nokogiri can't?
Spockz has joined #ruby
<JonnieCache> hpricot is forgiving, it corrects bad xml like a browser does. nokogiri chokes on anything that isnt valid
<any-key> ah good point
<JonnieCache> i need something that will parse horrible client-supplied html without complaining
workmad3 has joined #ruby
<apeiros_> o0 I'm pretty sure nokogiri can do tag-soup too
<apeiros_> even though an xml parser is actually absolutely not supposed to…
<JonnieCache> not in my experience, nokogiri is just libxml2
<any-key> yeah it is
<apeiros_> JonnieCache: if you're really parsing html, use Nokogiri.HTML
<apeiros_> instead of Nokogiri.XML
badabim has joined #ruby
<JonnieCache> youre underestimating the state of some of the html i have to parse
<JonnieCache> a lot of it comes from MS word
<JonnieCache> dont ask
skim1776 has joined #ruby
skim1776 has quit [#ruby]
<apeiros_> o0
<any-key> sounds like you need a new job :P
fridim_ has joined #ruby
<JonnieCache> youre probably right. thats a complex situation though
<any-key> camel casing tag names is kind of fucked up
popsch has joined #ruby
<arturaz> how about using sgml parser to parse sgml?
Deesl has joined #ruby
<JonnieCache> tbh the whole thing should be json anyway
<any-key> JonnieCache: I think you should just throw some regex at it
<any-key> yes, it should
Jrz has joined #ruby
<any-key> or yaml...or anything that isn't XML
<JonnieCache> basically the financial services industry is stuck in the stone age
<any-key> heh most industries are
<JonnieCache> except the HFT people theyre way out in space year 5000
<popsch> I'm having troubles with updating an instance variable. these simple 2 lines of code fail (http://pastebin.com/TEDRYrGZ)
<seanstickle> And the OCaml finance people
<seanstickle> They do well.
<popsch> Uncaught exception: `@options[:token]' is not allowed as an instance variable name
<popsch> any help, please?
<Sp4rKy> a/W 37
<any-key> Sp4rKy: irc is hard
<shevy> popsch hmmm
<shevy> popsch perhaps it hates [] ?
dootdoot has joined #ruby
<JonnieCache> hmmm apparently Hpricot is not case sensitive if you put it explicitly in XML mode. it defaults to HTML mode
<any-key> JonnieCache: huzzah!
<popsch> shevy, but I want to update the entry in the array @options
remink has joined #ruby
<popsch> shevy, it should iterate and update @options[:token] then @options[:verbose] ...
<any-key> maybe I'm completely off, but why can't you just update it directly by saying @options["settings"] blahblahblah
<shevy> popsch yeah well
<shevy> if I remove the [] and just use @options, it works
<shevy> if I use the [] it does not hmm
<any-key> what exactly is config["settings"] returning?
<kjellski> how can I tell nokogiri that under a certain xpath I want all of the elements hitting the path?
<kjellski> nvm, didn't know that there is a nokogiri chan :/ sorry
dootdoot has joined #ruby
SegFaultAX has joined #ruby
redjack1964 has joined #ruby
notjohn has joined #ruby
skitrees has joined #ruby
skitrees has joined #ruby
<popsch> shevy, it works with just @options[key] ; it's my first ruby program, so I'm still learning. thanks for the help
jergason has joined #ruby
alanp has joined #ruby
SegFaultAX has joined #ruby
sterNiX has joined #ruby
rfloriano has joined #ruby
<shevy> hmm
<shevy> awww
<shevy> first program and people use instance_variable_set() magic :(
<shevy> I liked ruby more when things were simpler
krainboltgreene has joined #ruby
<any-key> yeah instance_variable_set is a bit advanced for a first attempt at ruby :P
nyrb has joined #ruby
<krainboltgreene> But it is SO COOL for building DSLs :D
<shevy> people believe too much in hype
<any-key> it is...but a DSL is kind of a crazy first project D:
flippingbits has joined #ruby
<krainboltgreene> Oh yeah. There are too few tools focused on introspection, for it to be a first project.
mxweas_ has joined #ruby
<any-key> I recommend screwing around with arrays and hashes and fun stuff like that first
<theishi> would stdin.puts("\n") be the equivelent of pressing enter in pOpen3?
bluenemo has joined #ruby
bluenemo has joined #ruby
SegFaultAX has joined #ruby
Natch| has joined #ruby
rickmasta has joined #ruby
<popsch> shevy, hm. this without the :, it is defining options["token"] instead of options[:token]
KL-7 has joined #ruby
redjack1964 has joined #ruby
dootdoot has joined #ruby
nemesit has joined #ruby
phantomfakeBNC has joined #ruby
hackeron has joined #ruby
yoklov has joined #ruby
<shevy> hmm with 10 ** 3 I get 10 * 10 * 10
<shevy> with 10 ** 5 I get 10 * 10 * 10 * 10 * 10
<shevy> how do I get the reverse?
<shevy> 10 ** x == 1000000
<shevy> where x would be 6, unless I miscounted :\
<seanstickle> Math.log10(1000000)
<shevy> oh yeah thanks
noyb has joined #ruby
wallerdev has joined #ruby
kirun has joined #ruby
gvt has joined #ruby
adeponte has joined #ruby
zomgbie has joined #ruby
<khem_> /usr/local/bin/rails runner 'Snorby::Jobs::SensorCacheJob.new(false).perform; Snorby::Jobs::DailyCacheJob.new(false).perform'
<khem_> /usr/local/lib/ruby/1.9.1/rubygems.rb:238:in `activate': can't activate rack (~> 1.3.2, runtime) for ["actionpack-3.1.0", "railties-3.1.0"], already activated rack-1.4.1 for ["rack-ssl-1.3.2", "railties-3.1.0"] (Gem::LoadError)
<khem_> whats wrong here?
Shin-LaC has joined #ruby
<Shin-LaC> is there a built-in way, in ruby, to drop into an interactive debugger during the execution of a script?
Spockz has joined #ruby
<seanstickle> Shin-LaC: arbitrarily, or at a fixed breakpoint?
rfloriano has joined #ruby
hukl has joined #ruby
<seanstickle> Shin-LaC: ruby-debug if the latter
<Shin-LaC> at a fixed breakpoint may be ok for now
<Shin-LaC> ruby-debug needs to be installed, right?
<seanstickle> Yup
<Shin-LaC> so, nothing built in
<Shin-LaC> what I really want to do is have a section of code where exceptions drop me into a debugger at the place where the exception occurred
<Shin-LaC> is there any gem for that?
<deryl> Shin-LaC: pry and pry-exception_handler
<Shin-LaC> thanks, let me look into that
popsch has joined #ruby
<deryl> err exception_explorer sorry
gabeh_ has joined #ruby
stephenjudkins has joined #ruby
phantomfakeBNC has joined #ruby
<Shin-LaC> pry exception_explorer says it's inspired by hammertime
<deryl> pry, pry-doc, pry-stack_explorer, pry-exception_explorer, plymouth, and either pry_debug 9for a pure ruby debugger NOT using ruby-debug*), or ruby-debug|ruby-debug19, and ruby-debug-pry gem which embeds pry into ruby-debug
<Shin-LaC> how do I choose between them?
coin3d has joined #ruby
<coin3d> is there a difference between 1..10 and 1…10?
<Tasser> coin3d, try it in irb
<deryl> just use the pr-exception_explorer. rather than attempting to get the hammertime set up. with the pry module you KNOW its set up for working diretly with pry
<deryl> why waste time futzing around
mxweas_ has joined #ruby
<deryl> coin3d: yes. and Tasser's point will make it clear
<Shin-LaC> well, I'm not using pry now, so I have no opinion in favor or against
<Shin-LaC> I'll just try pry
<coin3d> deryl: i tried it out, but didnt notice any difference.
<deryl> Shin-LaC: the key with pry (or so i'm finding) is thinking about where you put your binding.pry statements
yekta has joined #ruby
<Tasser> coin3d, (1..10).to_a
<Shin-LaC> is there any chance of doing a fix-and-continue type of thing? changing the script and reloading it?
SegFaultAX has joined #ruby
<Shin-LaC> if I'm inside script.rb and attempt to load it, what happens?
justinmcp has joined #ruby
<coin3d> Tasser: ah, thanks!
<coin3d> to_a, fascinating :P
<deryl> coin3d: 1..10 and 1...11 are Range objects; the three dots indicates that the end stops before the terminator, two dots indicates it includes the terminator.
phantomfakeBNC has joined #ruby
<kjellski> is there a way to express that you want to map to_s against your collection?
<kjellski> like array.map( to_s )
<deryl> (1...11).each do |i| ; puts i ; end and then change it to .. and run it again
<deryl> couldn't figure out why it was blowing up on me until i realized i was forgetting the pipes around i hehe
<Shin-LaC> so
<Shin-LaC> the documentation for pry-ee is very limited
shadoi has joined #ruby
<Shin-LaC> what scope does it act on?
<deryl> Shin-LaC: stick around for awhile. banisterfiend wrote pry. he's usually willing to answer well-thought questions.
Husel has joined #ruby
<deryl> just gotta wait til he comes life. usually later in the day
<Shin-LaC> ah, I see
chimkan_ has joined #ruby
<deryl> but do pay attention to the 'well-thought'
tenseiten has joined #ruby
<Tasser> coin3d, (0..(1/0.0)).to_a
<Shin-LaC> heh
<deryl> Tasser: actually how would I write that as a *single* line? (the .each) thats when it requires the {} correct?
<deryl> always get confused on that becuase i write mine out multiline like i showed
<coin3d> deryl, Tasser thanks
<Tasser> deryl, doesn't matter
<deryl> np
<coin3d> Tasser: nice cpu burn
<Tasser> deryl, people tend to use { } for one-liners but 4.times do |i| puts i end does work as well
raluxgaza has joined #ruby
<deryl> ok, wasn't sure if the ; were required. (should have just tried it but then we wouldn;'t be having this interesting conversation hehe)
MrGando has joined #ruby
zakwilson has joined #ruby
<Tasser> coin3d, welcome to the power of infinity
mengu has joined #ruby
mengu has joined #ruby
<ilteris> where's a good place to ask some .htaccess questions on this server?
apok has joined #ruby
pu22l3r has joined #ruby
Chaazd has joined #ruby
Chaazd has quit [#ruby]
<seanstickle> ilteris: #apache
<ilteris> thanks
kirun has joined #ruby
justinmcp has joined #ruby
_marvin has joined #ruby
samsonjs has joined #ruby
MrGando has joined #ruby
zulax has joined #ruby
regaman has joined #ruby
init has joined #ruby
<regaman> Is anyone here a reggity diggal
<regaman> You stupid "Diarrhea of the mouth" nuck. Up with shmit on black ass brown Hackel meal McJellicker. Harky Mc Jallillashter. Smuggin Mah Hellihole. Harb amin mon mif jalellamon brooms of mushkin boy a munchkin maggity von heffrin. Shtooty mic blackened. Shooty hick black and flubberdy bij ass rijjal.
<regaman> Shniggen munuh lik leggal perritolma penis pran chella maloney day breeze Paahster jam ban wikkle. Hella mah lun mick hella malole. Hella minull mic mella manoh. The roadline, it's illegal. Trully mulla mih nole. I'm a relladge-o-melladge-o-ram. Come on you fuckin dag asses.
<regaman> Damned ram bastions. McJellio oper Smelly gruthergrarin trilaxals. withers ground ring air Puggle dee maggle dee mack traggle Jeremy sniggle. Jeremy spoken, in next day I brusht boyered, I kicked a ball! mellaminorf troll protectors, trolls on the road! troll protectors, their stones of power glow!
<regaman> Fleeberty dith bub, a hick now a hither they humpty tance Hunchell munch a reg uhl schoolio tress nael Chuck a lick a loon baby tunes Weerz mellicorp To the wack ann watching machine wells darilla raptor plexing
<regaman> Shligga ligga millik hole Shligga ligga millik hole regamakio mathjul hah there Just like in Bart Simpson the Magazine! Ban ricky ban glicky jallo whip! menario mibs Pahorp pahilla thin meffrin slujjal jeggy moran magomorph baleener
<regaman> I spell it throwt, you spell it throat, the real way to spell it is throwt throwt THROWT! Hux a mex a lig dwarf dudikolan mail street. Rella manae, Rella Manae, Rye dut duh! I'm living on budgy placky street. Reggal dee deck shweener Hicker trellalicker
<regaman> What part of that doesn't make sense to you robo I'm rang dang smacking it up to the reck a heek a horn drom. Rag agg big chacka lo datey fifty. Sniggital maggal Shelly a jelly a jew lillaputan meglamarian necks booga man Rejja mella mic jeggal Baika looka reg tag
<regaman> Throat a pelly proat raick axe. It doesn't eat muggo whip. It's a piece of paiper. Scrubbity ass ragamahoun. Raggity ass maga muffin. Where's songy brother? Where's spongy brother? Jellanie mic flyer. Paloody pluck bag ack. Paloody pluck bag ack.
<regaman> Whyn you call it throat throwt. I'm a baffy hoe. Flivvy a niv von neffran. Purity and prudence I'm suing for diaper damage. Scragg a billy blunk rake rast eye heeker, playmus guy I don't know what a rubbity dabby is. Scrunny maloo lef heel hole. Scrunny maloo lef heel hole.
<regaman> Arthie shlellijge. Arthie shlellidge. Talking about a bee turning into a guano root. today I'm doing pasta, i crumble it and pan fry it. Fuckin frosty. david hippa lappa pomprin. Is anyone here a hemp hole? Yeah, well shnijjy mc millicker: i know billy knalavolitz.
<regaman> The Baby Faced Assassin pond. yrummin! Shmega melanie goetz I'm smacking it up to the electrify beam, smacking it to the galactify beam! Smackin the penis with the erectify beam! When will another green skroan the horrified scream
<regaman> Rubbity dag daggy dib dib, daggy daggy dib dib, daggy daggy diggy diggy dib, throwt a welly wheel wall Reppity shcrep bam bam rep rep paranep Shnubbity shnib up bam bam Givin' me twice, i a molst a meeka pleck. Givin' me twice, a molst a meeka pleck.
<regaman> Jeminee smucking smiggle. Halittle halorst hamerrian sects nep tep hotep gargle dee gook mackie mchellic hole. My niqqer dee dag sparky. Ponto comical blessnor I'm dain dead. Razor renzor manellik s-meg smeg you're all smegs. We're hovvy hella pruss miss puss Smelly mudga munaqqal Posta wicka holma melancholy laggam
<regaman> Shmelly a mellac. Cloaky active camoflauge mail bow Warez into a whoop coup daddy deam, I filed a lawsuit with G.L.E.A.M. Dag a ricka bleg nagg. Richel reprezhnik rally mic hoe whip.
<regaman> fucking ass licking piss sucking cunt. Threnthie oh pod throonis Tragallellah. bweeey eeeiw! bweeeeey ail! shnib polmans mahhal wourney Track a mix a meg norge
<shadoi> apeiros_: ATTN
<regaman> Flathican fellow street. Mc Grellae Mc Regegg. Prag a cuckian bag of gunk. Duh nuh nihh nuh farty milligers. Par boockalie twistie taiter. Tittly spoof bee Trellie oh dabble Antenna rethal Fucky daddy dicky Fucky daddy dicky
<regaman> Chucka lucka ling to the chucka looka lat, man can't be banned! Dee oh doing! Chili box sand reggat. Crackity raggity ann shaggy rab rabble smiley oh diley oh reggal na meck transhole In a tough manner pung dungh chicka licka bang dad. Guess what you smartie millickan jallefnaord. Spend rellik maholmes.
<regaman> Rudda boom boom dugging. My name is jameel my name's jamaan. Take this you fuckin' brack stab from buck hole. Brag a cuck of bintorns. I had to have jalooch to have breakfast. Trug a leck leg hole. Tellah mef raf. Trukkle trella lickle mazzle trag. Shab shab skrellix magellix
<regaman> Rang tang daggy daggy din din <new2>
<regaman> Roonah bucky blay lee! Roonah bucky blay lee! An aggle dee dak beyond the premier. switch up to a wedge pluckie A jecka looch reft round! poochin maleggal Drek a lek meek foamie. shlick a jig jeffjob A jella jitch manifest Horkin malurgis hoarde. prebelally mobijowrist.
<regaman> Fartily gas farts on someone's jacket. Hicka low daggal. Manil hill the jiller. Reet dih doo deh dih, reet deh doo duh. dendridic millimorph cardackio cleptio maggle Jackintoshy zillword. Just another macgasm trexie o mario bubble. I had to have a mummified wheat bread.
<regaman> Slaggy McNelly O-Loop. Hillie Millie. Mijujik calej loft, shweener screlly mellamanorf. The plux to the plack a leak a lithio meth galactical terrial tuesday. Ploody loon, back a toon! ron ton a jelly a shawn. Herd mah thuh fah thuh. Jeggal mig ella cracker. trellamanorf mick hick hole
<regaman> Rump tump tiddle doo, rump dump damn. Farbooky twistie taiter. Farbooky twistie oh plox. jickellastrip shtiffy Trellie oh dabble Sabba7kom allah bilkhair ya rawafeth 3ash men shafek. 3alaikom essalam mawlana. 9eqeleyya kaanat men madresat Averroes. plan dan duckalin jee uhst waistband
<regaman> Sparra kitha mellon hoh snail bookanees. Pucka hoonkin dick ass waste. Triclapian transcripts. Are you a jalellaputian? Arthie midge millik. See that is why I keep going "galactico trallie o-reggal" Cuckin twanbastin wigwams shmagga miggal smell-it syllabalistic macro. Oh-rellage oh ram
regaman was kicked from #ruby by apeiros_ [regaman]
regaman has joined #ruby
regaman was kicked from #ruby by apeiros_ [regaman]
<shadoi> apeiros_: thanks :)
<apeiros_> sry, I thought it happened in #ror
rfloriano has joined #ruby
blueadept has quit ["Leaving"]
<apeiros_> anyway, you're welcome… :)
chessguy has joined #ruby
ada2358 has joined #ruby
<apeiros_> odd bot… who writes such crap?
<apeiros_> bingo, now it *is* happening in #rubyonrails
<shadoi> probably testing out his fancy new random rap generator.
youdonotexist has joined #ruby
<ekaleidox> i had to resort to /ignore
<ekaleidox> sheesh
blueadept has joined #ruby
idletom has joined #ruby
S4P0 has joined #ruby
<kjellski> in what way is collect different from each if you don't use it to assign something?
<apeiros_> only the return value differs
<apeiros_> map can be implemented on top of each. in fact, that's what Enumerable#map is
<apeiros_> (map == collect, just a nicer term…)
<shadoi> map/reduce => collect/inject
<shadoi> though inject can do other weird shit
rramsden has joined #ruby
<shadoi> ah, maybe it's not different anymore
<Tasser> nope, it's not
<shadoi> good
* apeiros_ is anti-alias(es)
<shadoi> what about kerning? ;)
iMe has joined #ruby
robbyoconnor has joined #ruby
atmosx has joined #ruby
ribayr has joined #ruby
ribayr has joined #ruby
<kjellski> apeiros_, thanks, and by the way, thanks for being so rude the last time I came to get my variables into irb in a script
skitrees has joined #ruby
<shadoi> OH: "I came to get my variables in irb"
TC_ has joined #ruby
oposomme has joined #ruby
<apeiros_> shadoi: my kerning is sub-pixel-perfect. of course.
<kjellski> shadoi, basically that was my question
<shadoi> apeiros_: http://xkcd.com/1015/
<apeiros_> I don't even have to click that link to know what it is…
TC_ has joined #ruby
<shadoi> figures
havenn has joined #ruby
jmuniz has joined #ruby
blazento has joined #ruby
dwon has joined #ruby
<TC_> This is my script: http://pastebin.com/tuYbTaHJ and of course, this should be an eyesore to you. I started ruby yesterday and I'm expanding upon a the original irc script I found on the net. I added a Guess The Number game, works pretty well... however after 5 minutes with no correct answer - I want the game to end. See line 166 - 177
<TC_> Oh, this is an IRC Bot
<TC_> Now, ignore all that the main problem, is that while true should be an infinite loop, but isn't. puts "boo" does not execute every centisecond or however fast the loop goes.
<TC_> Instead, it only executes when data is received in irc.
mikeric has joined #ruby
bbttxu has joined #ruby
<ReinH> TC_: yes, you're using synchronous io
<TC_> So something is preventing the loop from infinitely going, and only being triggered upon receiving of data ... I'm not understanding why.
<TC_> What do you mean, ReinH?
<ReinH> I mean that your io is synchronous, and thus blocking
<ReinH> the program waits until select() returns
<TC_> io = input output?
<TC_> Ah, I understand.
Targen has joined #ruby
<shadoi> You should read about basic socket and IO programming before trying to solve a more complex problem with it.
visof has joined #ruby
[eko] has joined #ruby
eko has joined #ruby
eko has joined #ruby
tayy has joined #ruby
mrtheshadow has joined #ruby
robyonrails has joined #ruby
<TC_> grr, pdf wont open.
<TC_> it's fully loaded it just ... wont load. I'll save it and open it in adobe reader that way
__class__ has joined #ruby
<shevy> question
<shevy> I have a number like 0.00398107170553497
<shevy> is there a way to let ruby display this as 1.0039 * ( 10 ** -4) ?
<shevy> oops
<shevy> is there a way to let ruby display this as 3.98 * ( 10 ** -3) ?
<shevy> ruby does this for certain high negative numbers
<shevy> 0.00000000000000000001 # => 1.0e-20
<shevy> 0.00000000000000000071 # => 7.1e-19
<laen_> shevy: sprintf("%e", 0.00398107170553497)
ephemerian has joined #ruby
<ReinH> "%e" % n # is a shortcut
<laen_> Neat.
<ReinH> String#%
<shevy> oh interesting
<shevy> thanks!
trivol has joined #ruby
<shevy> how comes you guys know that?
<shevy> I don't think I've seen %e before
eko has joined #ruby
eko has joined #ruby
workmad3 has joined #ruby
Sailias has joined #ruby
coucher has joined #ruby
eko has joined #ruby
GiambalaGiambala has joined #ruby
<RubyPanther> man 3 sprintf
<RubyPanther> part of C89/99
<shevy> admit it panther, you never heard of it before!
<RubyPanther> I haven't memorized the manual, but I guarantee I've read it a few times.
Morkel has joined #ruby
eko has joined #ruby
eko has joined #ruby
stephans_ has joined #ruby
waxjar has joined #ruby
virunga has joined #ruby
<shevy> hmmm
<shevy> well I learned something new today!
<waxjar> does anyone know of a good / simple Last.fm gem?
<hukl> whats the recommended way of getting ruby-debug up and running on 1.9.3?
<RubyPanther> hukl: gem install ruby-debug19
heftig has joined #ruby
<hukl> RubyPanther: really? that works now ?
<hukl> i know that i need ruby-debug19 but that kind of broke on 1.9.3
<RubyPanther> hukl: you also need linecache19 and ruby-debug-base19
<RubyPanther> linecache19-0.5.13 the .12 isn't good enough http://rubyforge.org/frs/?group_id=8883
stringoO has joined #ruby
<RubyPanther> also ruby-debug-base19-0.11.26.gem from the same place
<RubyPanther> hukl: that should be all you need
<hukl> narf
<hukl> why can't that be a part of ruby?
<RubyPanther> in a few months we should have 1.9.4 which will include the new debug api
<hukl> oh really?
<RubyPanther> people who want the old api should hang tight on 1.9.2 until .4 comes out, because .3 removed the old stuff before having the new stuff
<hukl> RubyPanther: i see
alfism has joined #ruby
<RubyPanther> but these linecache19 and ruby-debug-base19 versions for 1.9.3 would be sucky on 1.9.2 so they aren't the default in rubygems
<hukl> RubyPanther: ok :/ i'll try to create a bundle file that gets everything right
<RubyPanther> Good luck! muhaha! lol :P
<hukl> hehe ;)
<hukl> RubyPanther: is there some document describing the debug api ?
elvillo has joined #ruby
elvillo has quit [#ruby]
<RubyPanther> not yet
CreativeEmbassy has joined #ruby
dcarper has joined #ruby
<hukl> RubyPanther: no announcement on some mailing list etc ? ;)
<hukl> i'll google it
<RubyPanther> Last I heard we're supposed to wait for a release because they weren't totally sure yet
chimkan_ has joined #ruby
mib_mib has joined #ruby
Synthead has joined #ruby
Sailias has joined #ruby
<shevy> 2.0 will be ready in the year 2015
workmad3 has joined #ruby
<mib_mib> hi guys, trying to use the oauth gem to do the same thing that this php code does, but its failing - can someone help me ? http://pastebin.com/JB3FdY70
dinduks has joined #ruby
odinswand has joined #ruby
theishi has joined #ruby
<theishi> I would like to create a AI program that runs DungeonCrawl. What is the best way to run an a fullscreen console based executable for this purpose?
nyrb has joined #ruby
apow has joined #ruby
tonini has joined #ruby
pandora17 has joined #ruby
ReachingFarr has joined #ruby
azureye has joined #ruby
<ReachingFarr> Is it better to check the RUBY_PLATFORM or ENV['OS'] variable to determine the operating system that is running the program?
<ReachingFarr> Nevermind. I see that there isn't an OS key in my ENV global, so that kind of renders that option pointless.
<Hanmac> why do you need to know?
<ReachingFarr> Hanmac: To parse the results of caller() correctly.
npinchot has joined #ruby
ciopte7 has joined #ruby
<ekaleidox> whats the difference between "@client.insert(:Statuses, key, {'body' => 'v', 'user' => 'v'})" and "client.insert(:Statuses, key, {'body' => 'v', 'user' => 'v'})"
<RubyPanther> "Ruby 1.8 don't have future. And Ruby 2.0 is coming." -- Yugui
kivi has joined #ruby
<theishi> I am trying to use popen, but for some reason it keeps freezing when I try stdout.read even though there should be something to display.... I can send commands fine though....
<RubyPanther> theishi: it is called "blocking"
<canton7> ekaleidox, @clients is an instance variable (viewable by all methods in your class), while clients is a local variable (viewable by stuff in its local scope only)
<ekaleidox> thank you
heftig has joined #ruby
virunga has joined #ruby
h4mz1d has joined #ruby
<theishi> RubyPanther: so you are saying I need to use the flush command?
Leon_Nardella has joined #ruby
<RubyPanther> theishi: perhaps, or switch to nonblocking methods
<RubyPanther> often calling flush is unhappy
MrGando_ has joined #ruby
MrGando has joined #ruby
Helius has joined #ruby
hoelzro has joined #ruby
<ReachingFarr> Would someone running Ruby on Windows be able to show me an example of the result of the `caller()` function?
MrGando has joined #ruby
<theishi> http://pastebin.com/XQKqQJ0e this my code RubyPanther .... the flush doesn't seem to handle the problem.... maybe the problem is obvious
cbuxton1 has joined #ruby
<RubyPanther> theishi: use gist or pastie.org or something, I am not going to fill out a captcha just to see your paste
wroathe has joined #ruby
krisfremen has joined #ruby
cbuxton has joined #ruby
<theishi> sorry RubyPanther didn't know about captchas...one sec
R3dy has joined #ruby
<theishi> pastie.org/3423248
<R3dy> if ruby -v returns 'ruby 1.9.2p0' then why would 'gem install' try to install to /usr/lib/ruby/gems/1.8/?
<ekaleidox> rvm --use 1.9.2 ? or even make it default?
philcrissman has joined #ruby
<ekaleidox> unless you used apt-get, in which case God help you
<RubyPanther> R3dy: for example if ruby and gem executables do not match
<R3dy> how can I make it default if I did not use rvm
<ekaleidox> update-alternatives
<R3dy> ekaleidox: I get that same response in this room somtimes if I do use rvm and to not use apt-get
<R3dy> I can't win LOL =P
<R3dy> update-alterantives is what I used to make 1.9 my default
<R3dy> that's why ruby -v returns 1.9.2p0
<ekaleidox> think theres a separate update-alternative for rubygems
<ekaleidox> i killed an drebuilt a VM and avoided apt-get entirely because of this same problem
crodas has joined #ruby
<R3dy> arg, guess I'll try an RVM install
<R3dy> the problem is I use a lot of pre-built VMs like backtrack and what not
<R3dy> and everytime I have to fight to get my custom ruby scripts working
<R3dy> sometimes it's a pain
<ekaleidox> im sure theres a much simpler fix, but its beyond my pea-brain
linoj has joined #ruby
<R3dy> lol for crying out loud. I get a permisions error on the first rvm install command
havenn has joined #ruby
<R3dy> which of course would prompt me to run the dang thing as sudo
<R3dy> accept I bet that will come back to bite me latter
<R3dy> sheesh
Mekkis has joined #ruby
adeponte has joined #ruby
<R3dy> pretty sure you aren't suppose to need sudo access to run this command
<burgestrand> R3dy: you’re not, unless you’re installing it system-wide
<R3dy> just ran it from my home dir
Asher has joined #ruby
Mekkis has joined #ruby
fonzy has joined #ruby
fonzy has quit [#ruby]
Tijmencc has joined #ruby
madmax_ has joined #ruby
robyonrails has quit [#ruby]
adeponte has joined #ruby
panthrodeb has joined #ruby
iocor has joined #ruby
indeterminate has joined #ruby
Sailias has joined #ruby
thoradam has joined #ruby
bakineggs has joined #ruby
snip_it has joined #ruby
sUperstar24 has joined #ruby
<sUperstar24> 5 vs 5 mix ?? steam on srv on
sUperstar24 has quit [#ruby]
sdwrage has joined #ruby
rbanffy has joined #ruby
bakineggs has quit [#ruby]
al3xnull has joined #ruby
enherit has joined #ruby
norex has joined #ruby
Indian has joined #ruby
pen has joined #ruby
<pen> hey
<pen> I saw a ruby on the right in limechat
<pen> :D
November has joined #ruby
maletor has joined #ruby
punkrawkR has joined #ruby
nixmaniack has joined #ruby
Natch| has joined #ruby
Schmidt has joined #ruby
linduxed has joined #ruby
gvt has joined #ruby
tayy has joined #ruby
dwon has joined #ruby
milkpost_ has joined #ruby
DrShoggoth has joined #ruby
mxweas_ has joined #ruby
Schmidt has joined #ruby
Mekkis has joined #ruby
zulax has joined #ruby
thecreators has joined #ruby
liluo has joined #ruby
dark3rdre4ms has joined #ruby
dark3rdre4ms has joined #ruby
looopy has joined #ruby
yoklov has joined #ruby
epochwolf has joined #ruby
ajsie has joined #ruby
ajsie has quit [#ruby]
ajsie has joined #ruby
ajsie has quit [#ruby]
linoj has joined #ruby
stephenjudkins has joined #ruby
dwon has joined #ruby
linduxed has joined #ruby
skitrees has joined #ruby
tomzx has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
pdtpatr1ck has joined #ruby
blueadept has joined #ruby
blueadept has joined #ruby
randym has joined #ruby
axl__ has joined #ruby
popsch has joined #ruby
CannedCorn has joined #ruby
pdtpatr1ck_ has joined #ruby
nari has joined #ruby
denom has joined #ruby
thebope has joined #ruby
johndbritton has joined #ruby
Foxandxss has joined #ruby
johndbritton has joined #ruby
<Shin-LaC> hm
sawjig has joined #ruby
<Shin-LaC> the pry thing requires ruby 1.9.2
<Shin-LaC> so I can't use it
epochwolf|2 has joined #ruby
* waxjar is listening to Convenient Parking by Modest Mouse (0:33/4:08)
<waxjar> oops wrong channel :/
<Shin-LaC> hammertime works, but only in lexical scope, it seems
<Shin-LaC> I'd like something with dynamic scope
<heftig> upgrade your environment :p
<heftig> you should be using ruby 1.9
epochwolf|2 has joined #ruby
epochwolf|2 has joined #ruby
<Shin-LaC> I still need to support 1.8
<heftig> you should still be using 1.9 :p
azureye has joined #ruby
<Shin-LaC> maybe some other time
<davidcelis> you should be using 1.9
yekta has joined #ruby
<Shin-LaC> sorry, I wasn't clear
<Shin-LaC> I'm not debugging something that also needs to run on 1.8
<Shin-LaC> I need this debugging support itself to also run on 1.8
<Hanmac> 1.8 is dead, use 1.9.3+
<davidcelis> 1.8 is dead. long live 1.9
<RubyPanther> "Ruby 1.8 don't have future. And Ruby 2.0 is coming." -- Yugui
<Shin-LaC> mac os x ships with 1.8.7
<davidcelis> install 1.9 using rbenv or rvm
<RubyPanther> system Ruby is for system packages, those are supposed to be a couple years behind :)
<davidcelis> ^
<Hanmac> does mac os x support software updates?
<td123> macos also ships with bash 3.2
<Shin-LaC> I want to minimize the number of dependencies
<Eiam> ..
<Shin-LaC> but ok
<Shin-LaC> I'll pretend to install 1.9
<davidcelis> or
<davidcelis> you could actually install it
<davidcelis> Hanmac: not for system packages
<RubyPanther> Shin-LaC: faced with imperfect choices, the Ruby community has chosen the encapsulate our dependencies instead of worrying about OSes being out of sync with each other
<davidcelis> Hanmac: those you have to install from source or using homebrew/macports
<Hanmac> so you need to buy new hardware?
<davidcelis> what?
<davidcelis> how did you even remotely get that from what I said?
<Hanmac> i mean if you want newer system packages, because you cant update, you need to buy new stuff?
Jay_Levitt has joined #ruby
<Eiam> no
<davidcelis> apple does not support software updates for that natively
<davidcelis> like i said, you have to use homebrew or macports
<davidcelis> or install up-to-date packages from source
<Shin-LaC> Hanmac: system stuff is updated on new OS X releases
<RubyPanther> never buy anything, you can run Ruby fine on most hardware from the 90s.
<Shin-LaC> if you want to follow updates to stuff in the meantime, you can install your own stuff
<Shin-LaC> but, for instance, homebrew needs to run on ruby 1.8
<Shin-LaC> because they don't want people to have to install 1.9 before running it
banisterfiend has joined #ruby
maletor has joined #ruby
<Shin-LaC> most people don't even want to use it to install ruby anyway
<davidcelis> no
<davidcelis> you'd use rbenv or rvm for that
<davidcelis> which is what i said earlier
<Shin-LaC> right
<Shin-LaC> so, bottom line, homebrew needs to work on ruby 1.8
bob2 has quit [#ruby]
<davidcelis> that's usually not difficult
<davidcelis> and, more often than not, comes down to using hashrockets
shevy2 has joined #ruby
azureye has joined #ruby
epochwolf has joined #ruby
fayimora has joined #ruby
andrewhl has joined #ruby
linduxed has joined #ruby
bigkm has joined #ruby
pabloh has joined #ruby
<tayy> how do i get sinatra to run a series of methods at a set time? (time is not fixed)
<pabloh> which gem's an easy command line parser?
geronimo_ has joined #ruby
<banisterfiend> pabloh: slop
<pabloh> banisterfiend: cool, thx!
Schmidt has joined #ruby
|DM| has joined #ruby
crankycoder has joined #ruby
frequency9 has joined #ruby
<thoradam> tayy: cron?
cbuxton has joined #ruby
TC_ has joined #ruby
havenn has joined #ruby
<TC_> how do I access the instnaced class inside a class method... if I make sense.
nkbuff has joined #ruby
<banisterfiend> TC_: u dont, unfortunately
<banisterfiend> ;)
<Hanmac> self ?
<banisterfiend> Hanmac: yo hanmac, how's things in g-town?
maletor has joined #ruby
<Hanmac> its cold&dark and its after bed time *nearly zzZ*
<banisterfiend> thoradam: man wordpress code rendering is ugly
<banisterfiend> Hanmac: you should move to spain
<thoradam> I think there are millions of plugins for it, but yeah that's fugly
iocor has joined #ruby
_obiJuan has joined #ruby
wroathe has joined #ruby
counterbeing has joined #ruby
TC_ has quit [#ruby]