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/
dankest joined #ruby
cooper joined #ruby
r0bby_ joined #ruby
younerd left #ruby
robbyoconnor joined #ruby
nerded joined #ruby
austinbv joined #ruby
iocor joined #ruby
fatguylaughing joined #ruby
iamjarvo joined #ruby
Nies joined #ruby
pen_isident joined #ruby
jbhewitt joined #ruby
<ceej> is it possible to check if a string is a boolean true or false?
<ceej> instead of == true
alanp joined #ruby
emocakes joined #ruby
<jensn> ceej: A string is always true.
bwlang joined #ruby
techhelp joined #ruby
Eaven joined #ruby
eignerchris joined #ruby
stephenjudkins joined #ruby
shutchie left #ruby
ohergal joined #ruby
rsampaio joined #ruby
ultraviolet joined #ruby
bafilius joined #ruby
h4mz1d joined #ruby
robyurkowski joined #ruby
<shevy> ceej do you mean a string like "true" or "false"
<shevy> but you can omit == true ceej in conditionals
mickn joined #ruby
evantravers joined #ruby
evantravers joined #ruby
PerfM joined #ruby
<PerfM> sup hoes
AngerNESS joined #ruby
<PerfM> what's everyone up to tonight?
<AngerNESS> this is a ruby channel
<AngerNESS> keep it on topic
<PerfM> I'm just making conversation
<AngerNESS> oh
<AngerNESS> stupid
<PerfM> All is far in love and war
yekta joined #ruby
<AngerNESS> far
<AngerNESS> HAH
<AngerNESS> LERN TO SPELL
<PerfM> hahaha
Rango joined #ruby
<PerfM> Hi, Rango2
<AngerNESS> hey Rango2, i need to learn ruby
<AngerNESS> any good books?
<AngerNESS> i already learned emerald and sapphire
<PerfM> AngerNESS, I got some good books...
<PerfM> in my pants
<AngerNESS> baggy pants?
<AngerNESS> SO HIP
<PerfM> Yeah, they have pockets on the inside so I can stuff books in them
<PerfM> so rad
<PerfM> 2011 is so cool
<AngerNESS> it's hot here
<AngerNESS> i go commando
<emocakes> i have one of those laptop stands for my laptop
<emocakes> so i lie in bed
<emocakes> as i am a bit overweight
<emocakes> and it's hot here as well
<emocakes> lying in bed naked with laptop stand = win
<AngerNESS> erm
<AngerNESS> is this where i say
<AngerNESS> TMI
<emocakes> what do you mean tmi?
<PerfM> TOO
<PerfM> MUCH
<PerfM> INFO
<emocakes> what do you mean?
<PerfM> emocakes, get with the program bro
<PerfM> emocakes, how can cakes be emo?
<AngerNESS> emocakes: do you also have a razorblade with you?
<emocakes> just sharing my story homeboy
<AngerNESS> and icing?
<emocakes> the cake which cuts itself
<PerfM> hahahahah
<emocakes> that way i dont have to get up and move to the kitchen
<PerfM> thats hilarious!
<emocakes> which is a big task mind you
<AngerNESS> mind me what?
<emocakes> my joints aren't what they used to be
<AngerNESS> ah
<emocakes> ever since i put on this extra weight things have been harder
<AngerNESS> OMG
<emocakes> and I get bed sores as well
<AngerNESS> GO ON THE BIGGEST LOSER
<emocakes> whats that?
<AngerNESS> I LOVE THAT SHOW
<emocakes> are you calling me a loser?
<AngerNESS> YOU WOULD FIT RIGHT IN!
<PerfM> emocakes, no, he is calling himself a loser
<PerfM> a big fat loser
<emocakes> oh alright, I guess anyone who watches that show would be
<PerfM> a big fat ruby booking reading loser
<emocakes> I personally prefer national geographic documentaries
<PerfM> also, who uses commas nowadays, amirite?
<AngerNESS> you just did
<PerfM> lol
<emocakes> I use commas, got a problem?
<PerfM> yeah, I facepalmed when I realized that AngerNESS
<AngerNESS> you just did again
<PerfM> emocakes, this means we are soulmates
<emocakes> if I wasn't so overweight I would get up and hit you guys with my walking support stick
<PerfM> commamates
<PerfM> cause emocakes don't have souls
<emocakes> PerfM, as long as you dont mind being on top
pen joined #ruby
<PerfM> pen
<PerfM> be my frend
<emocakes> I can't really get on top anymore
<AngerNESS> pencil
<PerfM> penis
<AngerNESS> be MY frind
<emocakes> pen island?
<PerfM> "penis be MY friend"
<PerfM> bahaha
<AngerNESS> STFU
<PerfM> AngerNESS, don't be such a pedo
<PerfM> you sicko
<emocakes> how old are you guys?
<emocakes> im 43/m/seattle
<emocakes> we should go to starbucks sometimes
Behi joined #ruby
<emocakes> you seem like some pretty cool young guys
<emocakes> i like young guys
<emocakes> no homo
<emocakes> I think is the correct term
<PerfM> yes
<PerfM> emocakes, you're so hip for an old man
<emocakes> now PerfM, why call me old? I still think that I have my 'ears to the streets'
<emocakes> mind you, I haven't seen the streets, or sunlight for over 8months, thank god for online grocery shopping
<LiquidInsect> I think your ears are streets behind
<PerfM> cause no one says, "ears to the streets"
<PerfM> LiquidInsect, lol
<emocakes> do people still use the term 'jive turkey'?
<PerfM> yes
<LiquidInsect> daily.
<PerfM> when we want to sound old
<emocakes> oh alright, so I'm not that out of touch
<emocakes> PerfM, you are such a tease
<emocakes> admit it, fat older men who develop bed sores turn you on
austinbv joined #ruby
<AngerNESS> emocakes: that is nasty
<AngerNESS> don't hit on my girl
<emocakes> we can share, ever wanted to do some group action?
<emocakes> I could teach you guys ruby
<emocakes> if you could wash my back, literally
<AngerNESS> no
<AngerNESS> i hate you already
<PerfM> hahahahaha
<emocakes> come on, I'll buy you guys sandwiches
<AngerNESS> i don't want it
<AngerNESS> you think we're so cheap we can't buy sandwiches?
<emocakes> even tuna, cucumber and mayonaisse? whats wrong with you young whipper snappers these days
<AngerNESS> you asswhold
<emocakes> back in my day
<AngerNESS> *whole
<PerfM> emocakes, no one buys sandwiches anymore
<AngerNESS> *hole
<emocakes> i'll buy you guys some coke then
<emocakes> or some brown sugar
<emocakes> I know kids are still into that stuff
<emocakes> have you guy's ever heard of the Vietnam war?
<PerfM> Yes
<PerfM> I lived it
<emocakes> when we meet up for coffee I can show you my tat's
<emocakes> and tell you some really cool stories of that time
<AngerNESS> how does a hobo like you get on irc?
<emocakes> I was a good looking chap back then, probably the same age as you are now
<emocakes> I SERVED FOR MY COUNTRY ANGERNESS
<emocakes> i deserve the internet
<PerfM> an old man with tat's?
<PerfM> hottttttt
<AngerNESS> and wrinkly
<emocakes> so a/s/l PerfM and AngerNESS
<emocakes> ?
<AngerNESS> no
<emocakes> then we can get onto trading pics
<AngerNESS> this isn't omegle wrinkly hobo
<emocakes> want to go on omegle?
<AngerNESS> my thumb is more attractive than you
<PerfM> it really is
<PerfM> he has a nice thumb
<emocakes> do you put your thumb in your ass?
<AngerNESS> no, i don't store things in there
<AngerNESS> LIKE HOBOS DO
<emocakes> it's the only place other hobos won't try to steal from!
<emocakes> well look, my offer still stands, we meet up, have coffee, i tell you war stories, you wash my back.
<AngerNESS> stop agreeing with me and trying to be my friend
<emocakes> I am your friend!
<emocakes> your best friend!
<emocakes> I like you alot
<emocakes> you remind me alot of myself
<AngerNESS> we go together like crap and piss
<PerfM> emocakes, this is a pedo free zone
<emocakes> you have never heard of vietnamese scat porn then
<emocakes> this is a child free zone.
<emocakes> are you guy's like 13?
<PerfM> No it's not
* AngerNESS smacks emocakes
<emocakes> yes, it is
* AngerNESS smacks emocakes
hydrozen joined #ruby
<emocakes> any kid who wants to learn ruby is just asking for it
sythe joined #ruby
sythe joined #ruby
<emocakes> so have you guys thought about it? shall we arrange a date?
<emocakes> PerfM? AngerNESS?
<emocakes> friends? buddies?
<AngerNESS> emocakes: gtfo
<emocakes> ?
<PerfM> emocakes, you can't cyber me while I'm cybering AngerNESS
<shevy> emocakes not bad man but you gotta improve
<emocakes> shevy I know
<emocakes> i let my game down
<emocakes> it was more interesting at the start
<emocakes> I'm suffering from writers block
<PerfM> and stupidness
<shevy> happens to everyone
<AngerNESS> and wrinkleness
<PerfM> esp. to you shevy
<emocakes> out of 10, what would you rate that performance (at the start anyway)
<shevy> the energy is strongest in the beginning, then it goes downhill
<havenn> emocakes: You do realize that this is #ruby (http://www.mystyle.com/mystyle/shows/ruby/index.jsp) not #ruby-lang (http://www.ruby-lang.org/en/).
<emocakes> yes
alanp_ joined #ruby
<emocakes> yes havenn, I love that show
<emocakes> it's such an inspiration
<emocakes> ok AngerNESS and PerfM, well played
<AngerNESS> wut
<AngerNESS> i don't play chess
<emocakes> you didnt actually believe I wanted to let you guys wash my back did you?
<PerfM> I like chess
<PerfM> yaay!
<emocakes> I have a mexican for that
<PerfM> chesss!
<shevy> mi perro es un gato
<AngerNESS> emocakes: i reported you to the authorities for being racist
<havenn> My fav is lichess.org (PHP on Symphony)
<shevy> lichless??
<PerfM> emocakes, and for cybering underaged children
<emocakes> how was I racist AngerNESS?
<shevy> AngerNESS why are you working for the authorities :(
<havenn> shevy: Hrm, haven't thought about the meaning li-to-the-chess...., but: http://en.lichess.org/
<AngerNESS> !ops emocake is being racist
<shevy> nice
<shevy> good idea
<shevy> but it is written in PHP? :(
<emocakes> !ops no one gives a fuck, you guys are acting like you are 12yo
<emocakes> php ftw
<emocakes> thankgod this isnt ruby-lang
Cervajz joined #ruby
<AngerNESS> emocakes: please be nice :(
<emocakes> ruby is for assclowns who don't understand the true power of PHP and ASP
<AngerNESS> my friends are mexican
<AngerNESS> and they would never wash your back
<PerfM> my friends are assclowns :(
<emocakes> and? they are good labourers
<emocakes> good work ethic
<emocakes> mucho cheapo
<PerfM> and they understand the true power of PHP and ASP
<AngerNESS> it would take an army to wash your whole back you fatty
<PerfM> hahahah
<emocakes> have you ever had them write an essay?
<shevy> emocakes you are not bringing any arguments pro or contra
terraUNDverra joined #ruby
<shevy> I lost chess against the computer :(
<havenn> shevy: Yeah, it has some strange openings, but consistently beats me. >.>
<shevy> round 2
dbgster joined #ruby
sdwrage joined #ruby
<shevy> I lost AGAIN!
<shevy> I can not believe this...
<PerfM> why? you were born a loser
aask left #ruby
<shevy> PerfM everyone can improve
<emocakes> not me obviously
<emocakes> i'm fat, old and lonely
wmoxam joined #ruby
Manhose_ joined #ruby
luoluoluo joined #ruby
ultraviolet joined #ruby
<AngerNESS> stupid emocakes
<emocakes> :(
<terraUNDverra> emocakes: you were good in your prime though http://www.youtube.com/watch?v=mlTlpzBJUKs&feature=related
<emocakes> something like that terraUNDverra
raincole joined #ruby
mxweas_ joined #ruby
wmoxam joined #ruby
<PerfM> you're all perverts
<PerfM> and when you get klined
<PerfM> don't blame it on me
<PerfM> unless you thank me in advance
<emocakes> klines are for suckers
<emocakes> i get o:lines
<AngerNESS> yeah right
<AngerNESS> like you'd get opered
<PerfM> more like frownlines
ruby_noob joined #ruby
<PerfM> ...
<AngerNESS> ...
<emocakes> ...
<PerfM> is this channel based on that song "ruby"
<emocakes> -->> tumbleweed -->
Indian joined #ruby
pen joined #ruby
dotnull joined #ruby
<terraUNDverra> PerfM: let's get drunk
elyos joined #ruby
yfeldblum joined #ruby
<PerfM> is this channel based on that song "ruby"
<PerfM> terraUNDverra, okies, but I don't get wasted on irc
<terraUNDverra> PerfM: yes it's based on that song
<PerfM> yaay!
* PerfM hugs terraUNDverra
<terraUNDverra> PerfM: sing it 2 me
<emocakes> ruby, dont take your love to town
<emocakes> such a great song
rhinux joined #ruby
<PerfM> lol terraUNDverra
<PerfM> emocakes, I was thinking this one
goodieboy joined #ruby
erebor joined #ruby
<emocakes> pfft, young faggots
<emocakes> kenny rogers song had a significance to it
<AngerNESS> !ops emocakes said young faggots
<emocakes> kaiser cheifs are just some other lame 'rock' band
<PerfM> !ops emocakes is a pedo
<emocakes> like, red hot chilli peppers
<PerfM> emocakes, I think you should run to the bathroom, you have shit coming outta your mouth
<emocakes> i'm sure you think you are really alternative PerfM
* tdubellz lobs some toilet paper after emocakes
<emocakes> but your not
<tdubellz> also !ops pings me
<PerfM> emocakes, I think I am really brilliant
<PerfM> and you are not
<emocakes> kenny rogers is a hero
<tdubellz> so try to be civil emocakes
<emocakes> i am being civil
pnegri joined #ruby
<emocakes> they are clogging up my internet pipes saying kenny rogers is irrelevant to todays society
<emocakes> I also find the allegations of me being a pedophile unfounded
<emocakes> I never touched those girls
<PerfM> emocakes, go away
<emocakes> I was here first!
hydrozen joined #ruby
krz joined #ruby
<PerfM> emocakes, lies
<emocakes> quit trying to troll PerfM, you fail
<emocakes> hard
<PerfM> I'm not trolling D:
<PerfM> I'm just a friendly irc who is not fond of pedos
<PerfM> no harm in that
<AngerNESS> don't be mean to perfm
rsampaio joined #ruby
nerded joined #ruby
<shevy> why not
<shevy> you "3" are the same
<PerfM> Who 3?
zmanfx joined #ruby
roaminghorse joined #ruby
pabloh joined #ruby
ohergal joined #ruby
Evixion joined #ruby
yuwang joined #ruby
* PerfM sings "ruby" to terraUNDverra
wmoxam joined #ruby
crescendo joined #ruby
crescendo joined #ruby
pen joined #ruby
randym_ joined #ruby
jfredett joined #ruby
dagnachewa joined #ruby
bigkm joined #ruby
ryanf joined #ruby
Asher joined #ruby
mikeycgto joined #ruby
mikeycgto joined #ruby
pen_isident joined #ruby
<shevy> PerfM you and your two alteregos
kevinbond joined #ruby
jay_zawrotny joined #ruby
Y_Ichiro joined #ruby
sdwrage joined #ruby
Eaven joined #ruby
ultraviolet joined #ruby
sdavis joined #ruby
seivan joined #ruby
stephenjudkins joined #ruby
kevinbond joined #ruby
lobo_d_b joined #ruby
rbanffy joined #ruby
austinbv joined #ruby
<jwang> can constants be accessed from outside of a class, e.g. from a module or superclass?
davecarp joined #ruby
<terraUNDverra> jwang: Yeah
<shevy> jwang if you scope to it
<shevy> module Foo; Bar = "bla..."; end; Foo::Bar
nanoyak joined #ruby
flip_digits joined #ruby
gregorah joined #ruby
<jwang> I'm thinking of the module accessing a constant in the mixin class. module Foo; def abc; return BAR_CONST; end; end; class Bar; extends Foo; BAR_CONST = 123; end;
<jwang> I think that's the right terminology...
<emocakes> shevy, who's the third?
<jwang> the module/superclass doesn't know the name of the mixin class/subclass where the constants are
<shevy> emocakes two or three, it's still too much
* emocakes agrees, the only reason i started was because I saw their stupid conversation
<emocakes> about going commando
Manhose__ joined #ruby
Cervajz joined #ruby
hacim left #ruby
wuntee joined #ruby
tomzx joined #ruby
havenn joined #ruby
j3r0m3 joined #ruby
<wuntee> is it possible to have a mixed set of data in a string - for example, readable text, and binary/hex? like(this obviously won't work): y=0xab + "static string" + 0x55
manizzle joined #ruby
stephenjudkins joined #ruby
genexp joined #ruby
<gregorah> wuntee: like "#{0xab} static string #{0x55}"? or you mean something different?
cjs226 joined #ruby
cjs226 joined #ruby
dzhulk left #ruby
<wuntee> eh, I'm looking to build a set of data that will eventually be passed through a tcp channel, it a binary protocol, where the tcp payload will be something like: 00 aa 00 04 00 0b USERNAME 00 0c PASS
dasfugufish joined #ruby
<wuntee> gregorah: so, no, that won't even work, #{0xab} will result in the string '171'
<gregorah> yeah. I'm going to have to escalate this to L2 support. Please hold.
<emocakes> wuntee it is possible
<emocakes> but how are you going to parse it out?
<emocakes> the hex could be read as a string etc
<wuntee> i don't need to parse it, i am creating the client side, assume the beginning is a "magic" value that can't be represented as text
<emocakes> so define your own class?
<wuntee> this is what i was looking for: "\x00\xaa\x00\x04USERNAME"
whitequark left #ruby
<wuntee> hmm, that won't work with all hex values though "\x0b" will come out as 0x00 0x62
<wuntee> nm, i was forgetting the 'x'
theRoUS joined #ruby
theRoUS joined #ruby
p0y joined #ruby
tobyo left #ruby
nat2610 joined #ruby
<nat2610> what is the best lib to do html / javascript in ruby ?
<nat2610> I looked at ruby cgi and it felt pretty limited
<gregorah> ... ruby on rails?
<nat2610> no, not a framework
<nat2610> it's too big / heavy for my need
<jwang> shevy, terraUNDverra: got it to work in the super class: self.MYCONST
<jwang> self::MYCONST
<nat2610> I just want to be able to write static html and include javascript
genexp joined #ruby
lyken joined #ruby
<shevy> nat2610 hmm
<shevy> static html and javascript, sounds like a static site?
Targen joined #ruby
<lyken> trying to install dropbox via gem using 'gem install dropbox' however the machine has no dev tools so it fails cause make is missing. is there a way i can build that on another server and move the gem over ?
<shevy> nat2610, have a look perhaps at http://www.sinatrarb.com/ I suppose you can just redirect it easily to your static html
x0F_ joined #ruby
apok joined #ruby
QaDeS joined #ruby
<nat2610> that's also a framework shevy
<nat2610> ideally I'm looking at runing my ruby as a cgi
<nat2610> so just doing a require ...
<nat2610> and let ruby generate the html
nerded joined #ruby
<shevy> wait a moment
<shevy> (1)
<shevy> "<nat2610> I just want to be able to write static html"
moondiamond joined #ruby
<shevy> (2)
<shevy> "<nat2610> and let ruby generate the html"
<shevy> what now man!
<nat2610> ok I want to have object
<nat2610> giving them to a lib
<nat2610> and they generate the html
anachronistic joined #ruby
<nat2610> kind of like what ruby cgi does
<shevy> yeah I am doing that kinda
<shevy> all html tags are method calls
<nat2610> but with more extensive things like the capatbility or doing javascript
<shevy> div {
<shevy> h1 'hi!'
<shevy> }
<shevy> not sure how you want to include javascript, you mean you write the javascript into .js files and then load them up?
<shevy> the main thing ruby .cgi does is give you parameters to forms
<nat2610> t
<nat2610> yeah I want to put for example on the <from> onsubmit
<nat2610> that kind of thing
<shevy> don't think there is a lot out there
<shevy> basically everything is a framework
<shevy> so you'd have to cherry pick what you'd like to use
<shevy> or write a wrapper around the ruby cgi stuff
anachronistic joined #ruby
cbuxton joined #ruby
anachronistic left #ruby
<aces1up> i have a array of objects, an attrib of each object is a symbol with a function type ex :create, :default.. I want to sort these based on another sort order array that contains the two symbols [:create, :default] which is the order i want the other array sorted.. how would i do this sort of thing?
acts_as_david joined #ruby
nari_ joined #ruby
<shevy> you want to sort it based on alphabetical order?
<shevy> well you could always call .to_s and then sort
<aces1up> shevy no if the run_order array = [:create, default] i want all the objects in the object_array, to have first all the objects with function_type :create, the with function_type :default, hope that makes sense.
yuwang joined #ruby
<lyken> anyone got any pointers for compiling a gem on one machine to use on another?
<terraUNDverra> lyken: dont do it, have that gem compiled on that other machine
<lyken> terraUNDverra: production server has no dev tools
<lyken> but i've got a mirror staging server
<lyken> excactly the same setup
<lyken> but with dev tools
JStoker joined #ruby
anachronistic joined #ruby
anachronistic left #ruby
gregorah left #ruby
openpercept joined #ruby
anachronistic joined #ruby
<krz> whats the equivalent of doing this js code: Date.UTC(1970, 10, 10) in ruby ?
austinbv joined #ruby
stephenjudkins joined #ruby
cpruitt joined #ruby
wyhaines joined #ruby
<shevy> krz what is that doing
<shevy> hmm perhaps
openpercept joined #ruby
<shevy> Time.utc(1970,"jan",1,20,15,1)
<shevy> Time.utc(1970,10,10) # => Sat Oct 10 00:00:00 UTC 1970
<lyken> terraUNDverra: i caved and installed devtools on production box, save me a few hours of sanity, thanks
ksinkar joined #ruby
<krz> hm
anachronistic left #ruby
mikepack joined #ruby
Targen joined #ruby
kawa_xxx joined #ruby
gayasentinel joined #ruby
moondiamond joined #ruby
Emmanuel_Chanel joined #ruby
JStoker joined #ruby
GreaseMonkey joined #ruby
Cervajz joined #ruby
Cervajz joined #ruby
radic_ joined #ruby
maggie_n joined #ruby
Targen joined #ruby
fixl joined #ruby
ultraviolet joined #ruby
CannedCorn joined #ruby
Fezzler joined #ruby
yuwang joined #ruby
austinbv joined #ruby
lobo_d_b joined #ruby
hemanth joined #ruby
gayasentinel joined #ruby
austinbv_ joined #ruby
mxweas_ joined #ruby
Adman65 joined #ruby
pen joined #ruby
pen_isident_ joined #ruby
jcubed joined #ruby
<jcubed> greetings
MekkisFreenode joined #ruby
otakutomo joined #ruby
<jcubed> is there a ruby channel for asia?
developi_ joined #ruby
h4mz1d joined #ruby
dnjaramba joined #ruby
lkba joined #ruby
enroxorz2 joined #ruby
randym joined #ruby
austinbv joined #ruby
mxweas_ joined #ruby
ananthakumaran joined #ruby
Squee-D joined #ruby
dankest joined #ruby
tayy joined #ruby
apow joined #ruby
Banistergalaxy joined #ruby
_catch joined #ruby
wmoxam joined #ruby
fixl joined #ruby
openpercept joined #ruby
ABK joined #ruby
otakutomo joined #ruby
voodoofish joined #ruby
randym_ joined #ruby
stephenjudkins joined #ruby
stringoO joined #ruby
a_a_g joined #ruby
macmartine joined #ruby
steph021 joined #ruby
RyanV joined #ruby
<RyanV> can someone please tell me why this isnt working?
<aces1up> is there a way to get all instances objects of a particular class?
<RyanV> the split action works, but the strip doesnt
<Hachima> try taking out the for
bluOxigen joined #ruby
<RyanV> i tried that
<RyanV> same result
RLa joined #ruby
<RyanV> off of that, why would you use "for" or not
<RyanV> heftig: thanks! that worked
<RyanV> strip! returns the original array items stripped huh
<RyanV> vs a copy
<RyanV> which in this case, i didn't save to anything
<heftig> RyanV: you only use
<heftig> RyanV: you only use "for" in a "for var in enumerable" construct
<RyanV> enumerable is still a vague-ish concept to me. still newish to ruby, but I'm getting into some advanced stuff
<heftig> for var in [1,2,3]; puts var; end
<RyanV> oh ok
<sullx> anyone here have experience with autoit?
<heftig> sort-of equivalent to [1,2,3].each do |var|; puts var; end
<heftig> the only difference I remember is "var" being declared in the outer context
<RyanV> gotcha
<heftig> well, so it would be:
<RyanV> i never use that method of writing out anyways
<heftig> var = nil; [1,2,3].each do |var|; puts var; end
<RyanV> for actor in actors
yuwang joined #ruby
Seisatsu joined #ruby
stephenjudkins joined #ruby
ampex joined #ruby
<heftig> ah, whoops
<heftig> the latter isn't true anymore in 1.9
stephenjudkins joined #ruby
sayem joined #ruby
yxhuvud joined #ruby
<sullx> what kind of OS automation libraries are out there for ruby
wookiehangover joined #ruby
eft joined #ruby
<rboyd> what do you mean by OS automation?
QKO joined #ruby
<shevy> he means libraries that write ruby code for him
<sullx> shevy, exactly. rboyd, clicks, button presses, etc
<shevy> RyanV in ruby it is easier to use list.each (enumerator.each) than the "for x in y" constructs
<RyanV> yeh i never use them.
<RyanV> for the most part at least
<RyanV> I've been writing a lot generators lately tho
<RyanV> to populate a database
<RyanV> so I've been using for a lot
Asher joined #ruby
lyken left #ruby
sandstrom joined #ruby
kuzushi joined #ruby
smgt joined #ruby
manizzle joined #ruby
dnyy joined #ruby
dankest joined #ruby
p1d joined #ruby
d3c joined #ruby
ph^ joined #ruby
xpot joined #ruby
sdavis joined #ruby
JStoker joined #ruby
savage- joined #ruby
Banistergalaxy joined #ruby
EddieBluh joined #ruby
timonv joined #ruby
ryanf joined #ruby
JumpMast3r joined #ruby
luoluoluo joined #ruby
mrpanda joined #ruby
Bonkers joined #ruby
davecarp joined #ruby
cbuxton joined #ruby
djdb joined #ruby
JStoker joined #ruby
<aces1up> can i do an array array delete with another arrya?
<aces1up> array?
<aces1up> so for any elements in matched array, delete in orignal array?
onisen joined #ruby
<mrpanda> ary1 - ary2
acts_as_david joined #ruby
<aces1up> that is destructive? ex ! ???
<aces1up> modifies 1?
<aces1up> ary1 ?
<mrpanda> no
jbpros joined #ruby
<aces1up> that is what i would like.
<mrpanda> its easy to get destructive: ary1 -= ary2
<Banistergalaxy> aces1up: reject!
moondiamond joined #ruby
djdb joined #ruby
dhruvasagar joined #ruby
robotmay joined #ruby
mxweas_ joined #ruby
ananthakumaran joined #ruby
enikar joined #ruby
mafolz joined #ruby
ultraviolet joined #ruby
thecreators_ joined #ruby
JohnBat26 joined #ruby
tvw joined #ruby
Nanuq joined #ruby
batlock666 joined #ruby
looopy joined #ruby
zommi joined #ruby
heftig joined #ruby
daglees joined #ruby
daglees joined #ruby
pamorf joined #ruby
dhruvasagar joined #ruby
workmad3 joined #ruby
Morkel joined #ruby
Cervajz_ joined #ruby
stephenjudkins joined #ruby
pi3r joined #ruby
cyri_ joined #ruby
petschbot joined #ruby
<envygeeks> is there a way to make singleton methods private?
sooli left #ruby
<ryanf> envygeeks: define it with the class << self syntax instead of self.whatever
openpercept joined #ruby
<ryanf> then you should be able to use the normal private thing
<envygeeks> mind proving a quick example? I love you long time you do :D
<envygeeks> providing*
<ryanf> class << self; def foo; bar; end; private; def bar; 10; end; end
<ryanf> in theory
<envygeeks> ryanf ah okay I see now, now would that work if I'm including singleton? or should I just skip singleton stdlib and just make new private in that case?
<ryanf> oh
<envygeeks> The entire class is a singleton (I'm a huge fan of singletons now :P)
<ryanf> i didn't know you meant the Singleton module
<ryanf> i know basically nothing?
<ryanf> oops
<ryanf> ... about the Singleton module
<ryanf> i am on my phone :)
akem joined #ruby
<ryanf> anyway someone else might know how that would apply
<envygeeks> Yeah I only include the singleton module to make new private but I can always just do private_class_method :new and skip singleton
<envygeeks> actually that would be a good stackoverflow question for other people who might have this issue
<ryanf> i don't really see the advantage over just making a module with singleton methods
ikaros joined #ruby
<ryanf> you can keep state in it, it can't be instantiated, there is only one
<ryanf> what else do you need
<envygeeks> I need everything possible you know how I am I over think things
Deiu joined #ruby
Helius joined #ruby
nari_ joined #ruby
Sargun_Screen joined #ruby
berkes joined #ruby
<shevy> envygeeks yeah, you gotta manage complexity
<shevy> the mind plays tricks on you
<envygeeks> Yeah I dropped out singleton module, made new private on the class and implemented ryanf's singleton idea, it was much simpler and elegant then fighting to find a more complicated solution
terraUNDverra joined #ruby
Gonzih joined #ruby
incluye joined #ruby
timonv joined #ruby
Deiu left #ruby
Adman65 joined #ruby
apeiros_ joined #ruby
nicoulaj joined #ruby
pen joined #ruby
mengu_ joined #ruby
stephenjudkins joined #ruby
bastiman joined #ruby
LiquidInsect joined #ruby
BiHi joined #ruby
pencilcheck joined #ruby
will302 joined #ruby
robbyoconnor joined #ruby
timonv joined #ruby
luoluoluo joined #ruby
pen_ joined #ruby
fortysixandtwo joined #ruby
adrake_ joined #ruby
zastaph joined #ruby
sandstrom joined #ruby
sandstrom joined #ruby
hemanth joined #ruby
robotmay joined #ruby
iocor joined #ruby
xec joined #ruby
mengu_ joined #ruby
Norrin joined #ruby
ephemerian joined #ruby
jbpros joined #ruby
otakutomo joined #ruby
Telling joined #ruby
stoffus joined #ruby
<terraUNDverra> RubyPanther: lol
<envygeeks> apparently people only use private because people think it's it /actually/ hides the method from being used according to this guy
<envygeeks> so private is useless nobody use it!
petschbot_ joined #ruby
Mchl joined #ruby
<terraUNDverra> envygeeks: do you use it
james_cotterill joined #ruby
<envygeeks> Yeah I was using private to prevent a singleton method from being called (since it relies on class variables set by a wrapper) you know to prevent user ignorance
<envygeeks> but this guy comes off with this: "Why are private methods worth worrying about? They aren't really private anyways (AnyClass.send(:private_method, args)). You can get almost as much functionality by documentation." like it even applies to what I was using private for
petschbot joined #ruby
hurikhan|Work joined #ruby
vitoravelino joined #ruby
adambeynon joined #ruby
fixl joined #ruby
michael_mbp joined #ruby
<michael_mbp> hi all
<michael_mbp> - if r.en_title.blank? || r.ar_title.blank? || r.fr_title.blank? || !r.cover_en.exists? ....
<michael_mbp> any thoughts on how I can make this more compact?
dhruvasagar joined #ruby
timonv joined #ruby
mxweas_ joined #ruby
<Tasser> [:en, :ar, :fr].any? {|lang| r.send("#{lang}_title").blank? or
<Tasser> ! r.send("cover_#{lang}).exists?
<Tasser> }
tatsuya_o joined #ruby
Manhose joined #ruby
iocor joined #ruby
jeekl joined #ruby
jeekl joined #ruby
djdb joined #ruby
AllStruck left #ruby
Telling joined #ruby
Asher joined #ruby
stephenjudkins joined #ruby
M- joined #ruby
openpercept joined #ruby
jensn_ joined #ruby
workmad3 joined #ruby
lukaszkorecki joined #ruby
Manhose_ joined #ruby
davecarp joined #ruby
<Tasser> michael_mbp, why not #any? you have 'false' as valid data?
hinogi joined #ruby
hinogi joined #ruby
<michael_mbp> not my code
<michael_mbp> someone else forked it
<michael_mbp> that's my last take on it
<Tasser> ah well ^^
<michael_mbp> oh just saw your one
<michael_mbp> nice
<michael_mbp> yeah that makes sense
<michael_mbp> I'm just duplicating the call in the view
<michael_mbp> - if check_attributes(r, %w(en_title ar_title fr_title), %w(cover_en cover_ar cover_fr insert_en insert_ar insert_fr))
<Tasser> it's a bit ugly due to "#{}"
<michael_mbp> nah
<michael_mbp> I like string interpolation :)
<michael_mbp> very handy
<Tasser> I don't like methods called via string iterpolation
<michael_mbp> why?
<Tasser> just define a method on the object so you can call #title(:en)
Manhose__ joined #ruby
<Tasser> I don't like arbitrary data in the method name
<michael_mbp> ah that's true
<michael_mbp> interesting
satyavvd joined #ruby
Whiskey- joined #ruby
<Whiskey-> hay i have on someway got multiplay gems home
<Whiskey-> how do i remove one of them?
Johnnus_ joined #ruby
Manhose__ joined #ruby
bwwrd joined #ruby
Indian joined #ruby
stephenjudkins joined #ruby
Tuxist joined #ruby
timonv joined #ruby
theRoUS joined #ruby
workmad3 joined #ruby
robyurkowski joined #ruby
vitoravelino joined #ruby
vitoravelino joined #ruby
roaminghorse joined #ruby
jensn joined #ruby
<krz> I'm not the best at ruby. not yet at least. but trying to figure out if i can do something like
<krz> ('Wed, 19 Oct 2011'.to_date..Date.today).map do |month, year|
<krz> anyone what to help me out with this?
Banistertab joined #ruby
vitoravelino joined #ruby
vitoravelino joined #ruby
<Tasser> krz, require 'date'; (Date.parse('Wed, 19 Oct 2011')..Date.today) generates each day
<krz> Tasser actually I'm trying to do something like: pseudo code: (1.years.ago.to_date..Date.today).map { |month, year| puts "#{month} - #{year}" }
fermo joined #ruby
workmad3 joined #ruby
<krz> i need the output to be 11 - 2010, 12 - 2010, 01 - 2011, 02 - 2011, 03 - 2011, etc
Manhose__ joined #ruby
qiyong joined #ruby
<qiyong> what is a task? is it defined somewhere?
<qiyong> with rake i mean
iocor joined #ruby
<krz> ok let me repeat. with (1.years.ago.to_date..Date.today) how can i output 11 - 2010, 12 - 2010, 01 - 2011, 02 - 2011, 03 - 2011, etc
<krz> i think that question is clearer
RomD joined #ruby
trivol joined #ruby
iocor joined #ruby
oponder joined #ruby
stephenjudkins joined #ruby
girlself2 joined #ruby
<girlself2> http://www.cooladboards.com/?thevoid1http://www.cooladboards.com/?thevoid1http://www.cooladboards.com/?thevoid1http://www.cooladboards.com/?thevoid1http://www.cooladboards.com/?thevoid1http://www.cooladboards.com/?thevoid1http://www.cooladboards.com/?thevoid1http://www.cooladboards.com/?thevoid1http://www.cooladboards.com/?thevoid1http://www.cooladboards.com/?thevoid1http://www.cooladboards.com/?thevoid1http://www.cooladboards
girlself2 left #ruby
vitoravelino joined #ruby
vitoravelino joined #ruby
tk_ joined #ruby
Mon_Ouie joined #ruby
Mon_Ouie joined #ruby
iocor joined #ruby
iocor joined #ruby
jimmytwo joined #ruby
dhruvasagar joined #ruby
ghosTM55 joined #ruby
emocakes joined #ruby
ixti joined #ruby
vitoravelino joined #ruby
JonnieCache joined #ruby
dhruvasagar_ joined #ruby
heldopslippers joined #ruby
tayy joined #ruby
becom33 joined #ruby
stumpydwarf joined #ruby
<becom33> is their better way to seperate strings than using split ? because Im trying sepecrate the string using the space . the problem is it wont seperate perfectly if theirs no space after the last word :/
stephenjudkins joined #ruby
<becom33> anyone ?
<Afal> sounds like you need split
<workmad3> becom33: what do you mean 'won't separate perfectly if there's no space after the last word'?
<heldopslippers> you could try to use a regex :)
justinmcp joined #ruby
pen joined #ruby
stephenjudkins joined #ruby
aglenday joined #ruby
Hellojere joined #ruby
<zastaph> I made my ruby project structure according to the rubygems standard, however it's not really a gem that I need to require from somewhere else, it's my main project. Doing "ruby lib/foo.rb" fails at its require's probably because $LOAD_PATH is not right.. Do I need to build and locally install as gem each time I want to run it?
<workmad3> zastaph: are you willing to use bundler in your app?
<zastaph> not sure what it is.. but I did bundle gem foo to create the initial project structure
oponder joined #ruby
<heldopslippers> zastaph you should use bundler.
<heldopslippers> it's the best way to manage your gems (and versions)
<zastaph> great, another thing to read up on before I can start developing :)
austinbv joined #ruby
<zastaph> sounds a bit like rvm that I also use
<zastaph> just on app basis
<apeiros_> zastaph: you can also use the -I option when starting the app
<apeiros_> ruby -Ipath/to/your/lib yourexecutable.rb
<apeiros_> (you can also use multiple -I options)
<terraUNDverra> apeiros_: do u have one of those unusual archaic germanic names, something like sven or something?
<apeiros_> terraUNDverra: if you're referring to 'apeiros', that's not germanic.
<terraUNDverra> apeiros_: i mean your real name
<qiyong> what is => ?
<qiyong> => is , ?
<terraUNDverra> qiyong: i dont know
becom33 joined #ruby
<apeiros_> terraUNDverra: I don't think my real name is archaic, no.
<becom33> I asked a quistion while ago :/ did anyone awnser that ?
* Tasser pokes apeiros_
bluOxigen joined #ruby
<apeiros_> hi Tasser
<becom33> whats -c in ettercap ?
<SolarisBoy1> man ettercap?
<zastaph> apeiros_, full path? -Ilib not enough?
<heldopslippers> qiyong its the same or greater then.
<apeiros_> zastaph: relative path to cwd is ok
<becom33> what ? SolarisBoy1
<heldopslippers> for example: 3 >= 2 would be true
<Mon_Ouie> No, he said "=>"
<Mon_Ouie> Which has at least two meanings in Ruby
<zastaph> apeiros_, yay that worked
<heldopslippers> how i mean 3 => 2 ;)
<Mon_Ouie> No, eval "3 => 2" is a syntax error
<heldopslippers> or it could be from a hash or something:
<SolarisBoy1> becom33: as per the man page it enabled ncurses gui
<heldopslippers> {:hello => 'test'}
<Tasser> apeiros_, railshöck?
<heldopslippers> ah well then it is just the other way arround ;) thanxs Mon_Ouie
<apeiros_> I love it how all of you guys are guessing about the context instead of just, you know, ASK HIM FOR IT.
<apeiros_> Tasser: probably not
<Tasser> suckage
<becom33> anyone ?
enikar joined #ruby
<qiyong> in hash =>, what is it?
<heldopslippers> haha lol! apeiros_ well yes. that would be possible too.
<SolarisBoy1> ?
<Mon_Ouie> Yes, it can be used to associate a key with its value in a hash-literal, or to store the exception object in a variable (rescue Something => ex)
<becom33> thanks
randym joined #ruby
<heldopslippers> qiyong: it is to define what the value is: {:key => value}
<heldopslippers> but if you use 1.9.2 you could also use the new syntax: {key: value} (notice the : )
<becom33> damn it I asked the question in the wrong channel lol
<qiyong> :foo and 'foo', are they the same?
<Tasser> qiyong, symbol <-> string
jensn joined #ruby
becom33 joined #ruby
pnegri joined #ruby
Vendethiel joined #ruby
<becom33> anyone ?
iocor joined #ruby
ultraviolet joined #ruby
conntrack joined #ruby
conntrack joined #ruby
moondiamond joined #ruby
moondiamond_ joined #ruby
impatientspoon joined #ruby
dnjaramba joined #ruby
bwlang joined #ruby
stephenjudkins joined #ruby
berkes joined #ruby
nerded joined #ruby
ksinkar joined #ruby
tomzx joined #ruby
robyurkowski joined #ruby
moondiamond joined #ruby
emocakes joined #ruby
milkpost_ joined #ruby
rickmasta joined #ruby
<becom33> anyway is their any better way to separet strings without using split ? because Im trying to split a string using space . but it wont separte perfectly unless their is a space in the end of the string
qiyong joined #ruby
<qiyong> is gem a file format?
<qiyong> !gem
<qiyong> .gem
vmil86 joined #ruby
<jensn> qiyong: Yes, it is essentially a tar ball with a specific structure.
aglenday joined #ruby
tatsuya_o joined #ruby
sepp2k joined #ruby
<apeiros_> you can rename it to .tar and unpack it.
<terraUNDverra> apeiros_: iphone or android?
<terraUNDverra> whch camp are you, oh and watch this for the lolz https://www.youtube.com/watch?v=6h5JSojJN3Y
<Tasser> apeiros_, you don't even have to rename it :-P
mcginleyr1 joined #ruby
becom33 joined #ruby
aglenday joined #ruby
terraUNDverra joined #ruby
<apeiros_> Tasser: true. I'm a clicky-guy
Banistertab joined #ruby
<apeiros_> and who tf is that terra guy?
d3c joined #ruby
<Tasser> apeiros_, hostmask ftw
<Tasser> I'm a ready-guy :-)
rickmasta joined #ruby
<apeiros_> Tasser: oh… (mask)
dnjaramba joined #ruby
<apeiros_> terraUNDverra: if I'd get a samsung, I simply could not decide: http://farm7.static.flickr.com/6119/6351394329_549cd8a502_o.png?__SQUARESPACE_CACHEVERSION=1321492746269
<apeiros_> to take…
<terraUNDverra> apeiros_: galaxy s2
<terraUNDverra> it's the top of their range
<terraUNDverra> and whips the pants off the iphone4 IMO
<JonnieCache> and it has an unlocked bootloader so you can put CM straight onto it
<terraUNDverra> but im a fanboy
<terraUNDverra> JonnieCache: yeah and it's a very easy process to root it and overclock it, takes about 5 mins in total
<terraUNDverra> well 10 mins
ananthakumaran joined #ruby
shevy joined #ruby
<JonnieCache> tbh i lost the ability to give a shit about phones about a week after I got my galaxy S
oponder joined #ruby
tommyvyo joined #ruby
<terraUNDverra> i overclocked my galaxy to dual core 1.4 ghz from dual core 1 ghz
<JonnieCache> i use the browser to read articles in queues and on public transport, and I use the maps when I'm lost, but otherwise life's too short
<terraUNDverra> JonnieCache: do you use goggles?
<JonnieCache> i used it in that first honeymoon week and went ZOMG this is amazing!
<JonnieCache> but i dont really have a use for it. i dont do a lot of shopping
<apeiros_> the moment I have to worry about clock speed of my phone is the moment I know I have the wrong phone…
<qiyong> is 'table' a keyword?
becom33 joined #ruby
<apeiros_> qiyong: no. google zenspiders quickref
<apeiros_> he covers all keywords
<terraUNDverra> apeiros_: well i dont really think of it as a phone, it's more like a freaking ultra portable laptop :P
<apeiros_> yeah, I tried, but for that, phones are too small.
<terraUNDverra> JonnieCache: i use goggles for lots of things, when im getting movies out i can just point it at the cover and it tells me reviews/scores for the movies straight away
<apeiros_> my phone is a phone, a music player and a camera. occasionally it's also an information point.
SolarisBoy joined #ruby
<apeiros_> for anything else, I prefer my mba
<terraUNDverra> JonnieCache: if i see a foreign flag i dont recognize, use goggles to tell me what country straight away. Very useful when my country was hosting international sporting events
dnjaramba joined #ruby
<terraUNDverra> apeiros_: do u have a tablet ?
<emocakes> morning guise
<JonnieCache> yeah if i had some sort of dynamic and exciting silicon valley style life where i was constantly hanging out in bookstores, exchanging contact information with people and posing for photos in nightclubs and shit then I'd probably love my smartphone a lot. but i don't ;)
<JonnieCache> I tell you what is good though: google sky map
<JonnieCache> that shit still blows my mind
<terraUNDverra> JonnieCache: back to black silence melt and mourn
<terraUNDverra> :*
<apeiros_> terraUNDverra: I have an ipad (from the company, not mine), but I barely ever use it.
<qiyong> does python have something like rake?
wmoxam joined #ruby
<becom33> anyway is their any better way to separet strings without using split ? because Im trying to split a string using space . but it wont separte perfectly unless their is a space in the end of the string
M- joined #ruby
<JonnieCache> becom33: what does it actually do? what do you mean that it wont separate "perfectly?"
Banistertab joined #ruby
mengu_ joined #ruby
terraUNDverra joined #ruby
<terraUNDverra> JonnieCache: tablets are interesting too, just got mine a few days ago, still trying to figure out how/where it fits into my life. Currently just using it as a modern variation of the 'radio' where i carry it from room to room streaming music
<qiyong> file "config.cfg" => ["config.template"] do
<qiyong> end
<terraUNDverra> qiyong: why dont u read a tutorial
<qiyong> anyone explain me the => part above?
<JonnieCache> terraUNDverra: LOL thats exactly what I do with my work ipad. use it as a radio, as in I use it to stream actual BBC radio stations. This amuses me no end.
<JonnieCache> it seems best for idly browsing the web while watching tv, but i try not to do that. its the modern disease.
<apeiros_> qiyong: as others already told you, it's part of the hash-literal syntax
<terraUNDverra> JonnieCache: haha yeah, i really hope i come up with more uses soon enough otherwise i just spent $800 on a fancy radio
<apeiros_> qiyong: `file "config.cfg" => ["config.template"] do` is the same as `file({"config.cfg" => ["config.template"]}) do`
<qiyong> apeiros_: so it forms a hash?
<JonnieCache> I imagine its great for navigating on a long car journey.
dnjaramba joined #ruby
<apeiros_> qiyong: yes. it's the part between the key and the value of a key-value pair in a literal hash.
paraglade joined #ruby
becom33 joined #ruby
<terraUNDverra> JonnieCache: ah it's also great as a recipe book
<terraUNDverra> JonnieCache: have it by you when you're cooking
<qiyong> apeiros_: do you know if python have something like rake?
BiHi joined #ruby
<apeiros_> qiyong: no, I wouldn't know.
<JonnieCache> oh yeah that too. it wipes clean nicely. it does seem to be a pattern, its best uses are as an absurdly high-tech replacement for 100+ year old inventions
nanderoo joined #ruby
danielpunt joined #ruby
<terraUNDverra> yeah
Shrink joined #ruby
<apeiros_> gah, stupid oracle… is there some shorter synonym for "potential for conflict"?
<JonnieCache> actually I've forgotten the best thing I've used it for: its an absolutely amazing control surface for live music/DJing
<terraUNDverra> contentious
<terraUNDverra> JonnieCache: how does that work? what's an app i can dl to try that out?
<terraUNDverra> ah i have a galaxy tab btw, not an ipad so probably not available for me anyway
<JonnieCache> theres this thing called touchOSC where you can draw faders, knobs and all sorts of controls onto the ipad, then have them send midi to the PC
<JonnieCache> http://hexler.net/software/touchosc - it works for android too
<terraUNDverra> nice
<terraUNDverra> JonnieCache: does ipad have swype yet?
<terraUNDverra> that's one of the main reasons i got the galaxy tab rather than ipad
<JonnieCache> iOS doesnt support third party keyboards or anything like that
<terraUNDverra> JonnieCache: can you touch type on it?
<JonnieCache> agreed swype is the best reason to get and android
<terraUNDverra> JonnieCache: yeah that sucks, i have like 4 different keyboards i can use on android
cjs226 joined #ruby
<terraUNDverra> all of them are badass
<JonnieCache> you can type pretty fast on iOS with practice but you have to look at the keyboard most of the time because there's no tactile feedback
pen_isident joined #ruby
<JonnieCache> swype on the other hand is amazing
<terraUNDverra> JonnieCache: really? even the standard samsung keyboards give you feedback
<JonnieCache> dont think it would work so well on a tablet though
<terraUNDverra> a little buzz right makes a difference
pHcF joined #ruby
<JonnieCache> yeah it probably vibrates a bit, but what I mean is you cant tell by touch when you're on the home row
<terraUNDverra> JonnieCache: well on a tablet you can shrink the swype keyboard down and jam it in the bottom right corner
<terraUNDverra> so u can still swype adequately with it
<JonnieCache> ahhh
<terraUNDverra> JonnieCache: strangely im kinda excited about the microsoft tablets
<terraUNDverra> seems the windows phone wasn't fail after all, the nokia lumia 800 looks beautiful
Tuxist64bit joined #ruby
<terraUNDverra> JonnieCache: also, microsoft thave the best language for development IMO: C# > objc > java
<JonnieCache> yeah by all accounts its a really good OS. lets hope nokia have gone back to making indestructable phones like back in the day
oponder joined #ruby
<JonnieCache> you used to be able to pelt a 3310 overarm against a brick wall and it wouldn't blink
<terraUNDverra> hehe
<terraUNDverra> JonnieCache: there's some good vids online of ppl dropping galaxy s2 and iphone4's from various heights and seeing which one fares better
<terraUNDverra> (s2 only ends up with a minor scratch, iphone4 has a completely shattered screen)
becom33 joined #ruby
sie joined #ruby
<becom33> why arn't anybody awnsering my question ? am I askin it wrong ?
<sie> Is anyone here familiar with formtastic for rails? I'm having trouble with the select boxes
<becom33> why arn't anybody awnsering my question ? am I askin it wrong ?
jfredett joined #ruby
hundfred left #ruby
stephenjudkins joined #ruby
<sie> becom33 - either no one knows or you should wait.
<sie> be patient
bwlang joined #ruby
dankest joined #ruby
yfeldblum joined #ruby
p0y joined #ruby
qiyong joined #ruby
<qiyong> how do i call my rails in gems?
enroxorz joined #ruby
nomadmonad joined #ruby
iamjarvo joined #ruby
<nomadmonad> hello everyone!
<nomadmonad> where should I ask how to cope with bundler dependencies? Is this the right place?
<nomadmonad> I'm running bundler install, and getting two different deps, one requiring nokogiri 1.4.0 and other 1.5.0. Bundler install stops. How to fix things?
Shrink joined #ruby
<dankest> nomadmonad: Can you gist your console?
<nomadmonad> dankest: sure, here: https://gist.github.com/1388695
Adman65 joined #ruby
<nomadmonad> it seems osheet is using xmlss which depends on nokogiri ~> 1.4.0 (http://rubygems.org/gems/xmlss)
<Tasser> nomadmonad, well, upgrade ohsheet or downgrade capybara
<nomadmonad> osheet is on it's latest version, as a published gem
Guest78465 joined #ruby
<Tasser> oh, upgrade xmlss
<nomadmonad> I can try to clone the repos of osheet and xmlss, pump up the nokogiri in xmlss's gemspec, check it still passes, but then what?
Pip joined #ruby
tatsuya_o joined #ruby
<nomadmonad> how can I get my local source be used by bundler instead of rubygems.org's version of the gem
<apeiros_> nomadmonad: we use :git option in bundler for that
<JonnieCache> or :path
<nomadmonad> apeiros_: does it mean I should also publish my changed version? to get the :git option work? Or does it work locally?
terraUNDverra joined #ruby
<JonnieCache> :git accepts any git repo, so it can be local or on a server
<JonnieCache> but if its local, using :path is probably easier
terraUNDverra joined #ruby
<apeiros_> nomadmonad: git does not imply publishing, no
<apeiros_> provide a valid git repository and you're fine
<apeiros_> that can be a local directory just as fine as a github repo
Banistertab joined #ruby
bwlang joined #ruby
moshef joined #ruby
<moshef> what do you use !! for?
<terraUNDverra> moshef: cast to a boolean
Jackneill joined #ruby
Jackneill joined #ruby
<moshef> meaning?
<moshef> returns true or false if nil as well?
<terraUNDverra> moshef: !!nil ==> false
<terraUNDverra> moshef: !!1 ==> true
<nomadmonad> oh, you can see my newbieness clearly, but let me check one more thing. If I add gem xmlss, :path => "/my/local/xmlss", how does the heroku deploy get the gem? Does bundler "bundle" all my gems at my local workstation and heroku push then copies them over?
<moshef> ok, thanks
<moshef> i am getting weird results tho
<terraUNDverra> moshef: believe in yourself and you'll get through
<moshef> hehe, true that
<moshef> thanks
<terraUNDverra> np
<apeiros_> nomadmonad: well, the repository must - of course - be reachable from wherever you package the bundle. I don't use heroku, but if it plays nice with bundler, you should be able to package locally.
<nomadmonad> apeiros_: sounds clean. As I'm a bit unfamiliar with the tool set, I'm just checking I got it correctly. So running bundle install will make some package, which will then, supposedly, be copied over to Heroku during deployment. Ie. the /my/local/xmlss does not have to be present at Heroku?
<nomadmonad> well, in this case this is not a problem, I can publish my own version of xmlss at github and point there. But just wanted to understand the underlying logic in this.
<apeiros_> nomadmonad: iirc it is `bundle package`
<apeiros_> (sorry, we got the whole process scripted away, so I'm only familiar with the idea of how it works)
<apeiros_> so the basic mechanic is: you prepare for deployment locally by packaging. that puts everything your app depends on into the app itself.
<apeiros_> you can then deploy without even having network access on your server. all you have to do is copy your app over to the server. and there you tell bundler to use the stuff that came packaged with your app.
pongwon joined #ruby
<apeiros_> but iirc, they described that workflow pretty well on the bundler website…
dnjaramba joined #ruby
cpruitt joined #ruby
james_co_ joined #ruby
Cervajz_ joined #ruby
vitoravelino joined #ruby
james_co_ joined #ruby
jsaak joined #ruby
becom33 joined #ruby
Dangr_ joined #ruby
Dangr_ joined #ruby
Dangr_ left #ruby
speggey joined #ruby
rboyd joined #ruby
dnjaramba joined #ruby
a_a_g left #ruby
robyurkowski joined #ruby
<nomadmonad> yey! So :path does not work with Heroku. As I guessed the gems are not sent during the push, just the sources, and Heroku's bundler tries to hunt the same packages, claiming: The path "/my/local/xmlss" does not exist!
<nomadmonad> so time to try :git instead, that prolly works
steph021 joined #ruby
steph021 joined #ruby
wmoxam joined #ruby
MekkisFreenode joined #ruby
dnjaramba joined #ruby
michael_mbp joined #ruby
pen joined #ruby
zastaph joined #ruby
dv310p3r joined #ruby
steph021 joined #ruby
steph021 joined #ruby
crankycoder joined #ruby
wyhaines joined #ruby
emptyflask joined #ruby
steph021 joined #ruby
capt_crunch___ joined #ruby
capt_crunch___ joined #ruby
steph021 joined #ruby
steph021 joined #ruby
goodieboy joined #ruby
terraUNDverra joined #ruby
flip_digits joined #ruby
ph^ joined #ruby
goodieboy joined #ruby
dcarper joined #ruby
goodieboy joined #ruby
iocor joined #ruby
stephenjudkins joined #ruby
emmanuelux joined #ruby
bbttxu joined #ruby
g0bl1n joined #ruby
goodieboy joined #ruby
kennethreitz joined #ruby
becom33 joined #ruby
ceej_ joined #ruby
jwill joined #ruby
goodieboy joined #ruby
goodieboy joined #ruby
frogstarr78 joined #ruby
goodieboy joined #ruby
terraUND_ joined #ruby
nerded joined #ruby
joe_loui joined #ruby
nerded_ joined #ruby
prtksxna joined #ruby
<nomadmonad> that worker perfectly
<nomadmonad> all of this just sounds way too much work just to get a lib with fancy oldish dependency back in line
ceej joined #ruby
<nomadmonad> there should be bundler option :override_gem_dep_into => "1.5.0" available instead
<joe_loui> Hey, I got a problem with ruby-debug19 and ruby 1.9.3-p0, I'm trying to install the gem from mark mosely repo with bundler, but bundler says: "Could not find gem 'ruby-debug19 (>= 0) ruby' in git://github.com/mark-moseley/ruby-debug.git (at master)"
<joe_loui> any hints?
<yfeldblum> nomadmonad: would be nice; suggest it at https://github.com/carlhuda/bundler/issues
<yfeldblum> joe_loui: so far as i'm aware, ruby-debug19 is not yet compatible with ruby-1.9.3
rippa joined #ruby
jbpros joined #ruby
ceej joined #ruby
<joe_loui> yfeldblum: Yes, but I'm looking for fix, I supposed that if you install the last version of ruby-debug directly from the repo maybe a solution could be already implemented
dnjaramba joined #ruby
<joe_loui> but right now, it seems that I'm having a more bundler issue than ruby-debug19 thing
<yfeldblum> joe_loui: any reason you need to use 1.9.3?
bier joined #ruby
bier|tp joined #ruby
rboyd joined #ruby
<yfeldblum> joe_loui: what i'm doing right now is using 1.9.3 for its little speed boosts and if i need to debug i'll drop back down to 1.9.2 for that
iocor joined #ruby
dotnull joined #ruby
durre joined #ruby
<joe_loui> yfeldblum: the same reason for me
<joe_loui> performance
<joe_loui> but as you, I need to debug
brianherman joined #ruby
<joe_loui> and it's not handy have to downgrade to 1.9.2 everytime that I put a debugger line
<durre> hi! I'm using rubygems with sass & compass perfectly on osx, ubuntu & windows. our buildserver however is solaris. when I type "sass" ... I get this error: http://pastebin.com/33bYy3ue ... not sure what's missing
<yfeldblum> joe_loui: are you using rvm?
<joe_loui> yfeldblum: yes
runa joined #ruby
Hellojere joined #ruby
<yfeldblum> joe_loui: that's good ... i don't quite know what to tell you though ... until Mark Mosely releases a ruby-debug19 compatible with 1.9.3, personally, i'm just going to cancel the rails server, switch rubies, restart it, and debug ...
jensn joined #ruby
<terraUND_> joe_loui: what features do you use of ruby-debug?
<terraUND_> joe_loui: just examining state ? or using next/step ?
<joe_loui> yfeldblum: yeah, it's a shame, but it seems rare that I can't install the gem directly from the repo..
james_cotterill joined #ruby
<joe_loui> terraUND_: next/step is right now what I need most
<joe_loui> I tryed with pry, but it does not have that feature
<terraUND_> joe_loui: yeah i hear pry is getting that feature soon though as a plugin
Know1edge joined #ruby
<joe_loui> terraUND_: cool! it's a really awesome ruby console
impatientspoon joined #ruby
Manhose joined #ruby
rubyphunk joined #ruby
rubyphunk left #ruby
StitchedKite joined #ruby
<durre> any ideas would be very welcome :)
fatguylaughing joined #ruby
ikaros joined #ruby
<yfeldblum> durre: regarding...?
<durre> teamcity
<yfeldblum> what about teamcity?
brianherman joined #ruby
runix__ joined #ruby
stephenjudkins joined #ruby
theRoUS joined #ruby
theRoUS joined #ruby
iocor joined #ruby
akem joined #ruby
tommyvyo joined #ruby
<durre> yfeldblum: sorry, teamcity was supposed to end up in my console, not irc :)
<durre> yfeldblum: and I was saying earlier: hi! I'm using rubygems with sass & compass perfectly on osx, ubuntu & windows. our buildserver however is solaris. when I type "sass" ... I get this error: http://pastebin.com/33bYy3ue ... not sure what's missing
dcarper joined #ruby
vladyn joined #ruby
<vladyn> guys
<durre> also, this error occurs when I type "gem" also... which is strange since the sysadmin was able to run gem install sass, gem install compass etc
<vladyn> can somebody help with RegEx find / replace I want to find : in a time context ilke 19:00 and replace with 19h00
vidyapraveen joined #ruby
Telling joined #ruby
<vladyn> but when I do \d: or \d(:) ot selects 9:
<vidyapraveen> hello
_catch joined #ruby
<vladyn> can I find : symbol preceding by a digit and replace exactly this symbol
dv310p3r joined #ruby
gianlucadv joined #ruby
<yfeldblum> durre: are you using an isolated copy of ruby (e.g. with rvm) or system ruby on your build server?
macmartine joined #ruby
albemuth joined #ruby
beakerma_ joined #ruby
<durre> yfeldblum: I dont know. I don't have access to install on that server so the sysadmin did it. from his notes it looks like he downloaded http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.gz and then compiled ruby
vidyapraveen joined #ruby
<nomadmonad> yfeldblum: thanks for suggesting. Here it is. Feel free to add a comment. https://github.com/carlhuda/bundler/issues/1549
runix__ left #ruby
runix__ joined #ruby
vidyapraveen1 joined #ruby
<vidyapraveen1> hello
terraUNDverra joined #ruby
<vidyapraveen1> .
<yfeldblum> cool
vidyapraveen left #ruby
ckrailo joined #ruby
tobym joined #ruby
d-snp joined #ruby
<yfeldblum> durre: looks like something is trying to require stringio and failing ... stringio is part of the ruby stdlib ... maybe sysadmin did not install all the ruby dependency packages first before compiling ruby?
rsampaio joined #ruby
<durre> yfeldblum: maybe :) I can see that the stringio.so file is where ruby says it isnt :)
dasfugufish joined #ruby
<yfeldblum> durre: stringio.so may be trying to load something else but failing
JumpMast3r joined #ruby
<durre> yfeldblum: yeah. I just noticed he did it right on 2 out of 3 build servers so he probably just forgot something
flippingbits joined #ruby
<yfeldblum> durre: general solution for getting the server right every time is chef (http://www.opscode.com/chef/) or puppet (http://projects.puppetlabs.com/projects/puppet)
DaZ joined #ruby
iDespera` joined #ruby
goodieboy joined #ruby
msuszczy joined #ruby
dyer joined #ruby
john2x joined #ruby
steph021 joined #ruby
steph021 joined #ruby
codespectator joined #ruby
jbpros joined #ruby
apok joined #ruby
<bwlang> hmm what's up with File.writable? false if the directory is writable, but file does not exist. What's a good way to test that I will be able to write to a file later in the program's execution?
ksinkar joined #ruby
Dangr_ joined #ruby
<moshef> im going over a list of users with users.each and i want to check if there is the wod foo in every user.email . how should i do that?
josemota joined #ruby
dasfugufish joined #ruby
p0y joined #ruby
msuszczy left #ruby
<bwlang> moshef: maybe keep a count of foos? foocount+1 if user.email.include?('foo'), then compare your count with users.length after the loop. Could also do this with a .select i think
Cervajz joined #ruby
<yfeldblum> users.all?{|u| u.email =~ /\bfoo\b/}
<cpruitt> Looking gor a gem/library that will allow me to use a .rb script to: open a window/view, draw simple graphics (circles, squares, lines), update/redraw that display at intervals (i.e. outputting to an image format won't work). Anyone have a good suggestion? I've looked at shoes but would prefer something I can can just run from terminal. I'm on OS X
p0y_ joined #ruby
<StitchedKite> cpruitt: honestly i wouldn't know on osx however gtk will do what you want
probst joined #ruby
hinogi joined #ruby
hinogi joined #ruby
looopy joined #ruby
dyer joined #ruby
nerded joined #ruby
p0y joined #ruby
nerded joined #ruby
rboyd joined #ruby
andrewpthorp joined #ruby
<Tasser> bwlang, looks like you'll have to call it on the dir too :-)
<Tasser> bwlang, or just go for it and rescue
nerded joined #ruby
<bwlang> Tasser: yeah - that sucks, since Dir doesn't have any permission methods... I a quick file.open('foo','a') to test.
dankest joined #ruby
pootpoot joined #ruby
burgestrand joined #ruby
brianherman joined #ruby
jeremy_c left #ruby
terraUNDverra joined #ruby
RomD joined #ruby
<JonnieCache> cpruitt: if you only need to target OS X there's MacRuby which has full access to all the OS X cocoa apis
Rango joined #ruby
<cpruitt> StitchedKite: Thanks I'll take a look
<JonnieCache> then there's the QT bindings
kevinbond joined #ruby
<cpruitt> JonnieCache: Yeah I've looked into it and want to play with it a bit (for other things) but I think it's overkill for this. Looking for something quick & dirty.
brianherman joined #ruby
erebor joined #ruby
<cpruitt> I know there's open gl bindings too but I've always heard open gl is a little messy
monkey13 joined #ruby
apeiros_ joined #ruby
kenichi joined #ruby
<JonnieCache> its not messy as such, just really low level, as you would expect
<Tasser> bwlang, why test even?
<JonnieCache> tbh it probably is quite messy
<bwlang> Tasser: because the program runs for 6 hours... would suck if it fails at the last minute to write output.
<JonnieCache> cpruitt: ruby's big weakpoint is GUIs.
vidyapraveen2 joined #ruby
<JonnieCache> if you want a dirty hack you could just use a browser. serve up some json, feed it via ajax into a page that uses raphael or something to draw svg graphics
nerded_ joined #ruby
vidyapraveen2 left #ruby
yekta joined #ruby
artOfWar joined #ruby
brianherman joined #ruby
<Tasser> bwlang, oh.
<Tasser> bwlang, 6h? wtf?
nerded joined #ruby
<cpruitt> JonnieCache: Yeah, to be honest I've never really had this need before. I do most of my stuff for the web anyway. Just trying to hack together a quick simulation sort of thing just to see if I can. Need to refresh a couple times a second so browser probably wont work too well. I'll look at the others & see what looks the least complicated.
<bwlang> Tasser: working on 100G+ DNA sequence files
macabre joined #ruby
dankest joined #ruby
looopy joined #ruby
<apeiros_> bwlang: sounds like something where it starts to pay off doing the intense parts in C
<JonnieCache> cpruitt: you could get it to refresh at 2Hz or so with a browser, youd just have to optimise it a bit. ultimately it will probably be quicker than hacking with the super heavyweight GUI frameworks if you havent done it before
<JonnieCache> bwlang: ruby is slow. i wouldnt do bulk DNA processing in ruby…
<apeiros_> I would. but I would only do the prototyping in pure ruby.
<bwlang> JonnieCache, apeiros_: things are fast enough in ruby at the moment... mostly i'm wrapping other tools
<JonnieCache> ahh
<apeiros_> then see where it takes the most time and if necessary reimplement that part
lkba joined #ruby
<cpruitt> JonnieCache: may be so. Wouldn't be the worst way to do it.
<apeiros_> as it seems, bwlang considers the "if" condition to be "false" :)
<JonnieCache> fuckit just render ascii art to the console. get your trigonometry on
<cpruitt> JonnieCache: I'll keep it on the table, it's not a bad suggestion, just not what I was originally going for.
<rboyd> why is Ruby-FFI so named? is ffi an acronym?
<burgestrand> foreign function interface
vidyapraveen2 joined #ruby
<rboyd> ty
<apeiros_> rboyd: google. it's awesome.
vidyapraveen2 left #ruby
<Tasser> apeiros_, lmgfy. it's awesome ;-)
<apeiros_> Tasser: I was considering it
Banistertab joined #ruby
<burgestrand> I am awesome too
<burgestrand> >:(
jcromartie joined #ruby
<apeiros_> Tasser: funny. google seems to indeed personalize search results - for me, ffi gets the right one on top. via lmgtfy, it's 3rd result…
<jcromartie> Is it safe to use Tempfile.open to create a temp file that will only be used to create a tar archive (with backticks and tar)
<Tasser> apeiros_, you're fast :-P
<JonnieCache> have you seen the new "verbatim" option on google? its down in the search tools bit on the left
<JonnieCache> it disables all the annoying autocorrection/guessing that google does
flippingbits joined #ruby
<Tasser> JonnieCache, iirc tempfile deletes the file instantly after creation, so other processes can't acess it
<JonnieCache> v useful for code
artOfWar joined #ruby
<jcromartie> Tasser: I intend to move the temp file into place before the end of the block
bafilius joined #ruby
<apeiros_> JonnieCache: oh, nice
<jcromartie> it *seems* to work
<Tasser> jcromartie, hm, oke
<jcromartie> but it seems strange to create a file, write to it from another process, then move it, and then close and unlink the original!
<jcromartie> In Java the temp file creation just returns a path to a newly created file
<rboyd> apeiros: what was your query? guess my google fu is broken
<jcromartie> but there's nothing like that in Ruby
<jcromartie> not in Tempfile
<apeiros_> rboyd: "ffi"
<jcromartie> because Tempfile.new/open returns a new (opened) file-like object
<apeiros_> rboyd: for acronyms, I tend to use acronymfinder.com too. quite nice.
LiquidInsect joined #ruby
<rboyd> apeiros: yea, I get the rubygems page and github, neither of which expanded the acronym from what I could see
<apeiros_> burgestrand: yes, you're awesome sauce!
<burgestrand> jcromartie: the file is not unlinked until the Tempfile object is garbage collected, but it is closed after the block finishes
<metrix> I am using "system(java -jar "cmd") in a jruby script. When I ctrl-c the command in windows the java command continues to run in the background. How do I force the executed command to exit when a ctrl-c is read?
<burgestrand> apeiros_: \o/
<jcromartie> burgestrand: yes, so I guess I should dive into source
<jcromartie> see what happens if the file is moved in the mean time, etc.
<jcromartie> because I'm just trying to get filesystem atomicity out of this
<jcromartie> i.e. create a temp file, write to it, then move it into the "real" place
travisjeffery joined #ruby
lobo_d_b joined #ruby
esparkman joined #ruby
brianherman joined #ruby
craigglennie joined #ruby
RyanV joined #ruby
monkey13 joined #ruby
maletor joined #ruby
eywu joined #ruby
Mahoek joined #ruby
<iamjarvo> im trying to import data using the CSV lib but my csv has accented words. what encoding should i set?
kenichi joined #ruby
<Tasser> iamjarvo, file <your file> should guess the encoding
<Tasser> try utf-8 for european data
<iamjarvo> Tasser i get this invalid byte sequence in UTF-8
<Tasser> iamjarvo, read and apply
travisjeffery joined #ruby
<iamjarvo> Tasser what do you mean
<iamjarvo> Tasser this is my read line csv_text = File.read(v).force_encoding('utf-8')
<burgestrand> It might very well be in some other encoding than UTF-8
monkey13 joined #ruby
<apeiros_> iamjarvo: File.read(v, :encoding => 'utf-8')
sullx joined #ruby
<iamjarvo> apeiros_ got the error still
<apeiros_> iamjarvo: wasn't a solution.
<apeiros_> it does the same as your force_encoding.
<iamjarvo> kk
<Tasser> iamjarvo, grab a shell, execute file <the csv file>
<iamjarvo> Tasser pardon my lack on knowledge. how would i execute it in terminal
cbuxton joined #ruby
travisjeffery joined #ruby
<Tasser> iamjarvo, os?
<iamjarvo> osx
<Tasser> ask apeiros_
<jcromartie> A ha! The Tempfile#unlink method checks for existence first.
<apeiros_> fire up Terminal.app
<iamjarvo> yep
<jcromartie> So it's safe to move
<apeiros_> then: cd yourdir
<apeiros_> then: file filename
<iamjarvo> cded into the directory where the file is
<iamjarvo> got this back winelist.csv: Non-ISO extended-ASCII text, with CR line terminators
<iamjarvo> sounds like a problem
lkba joined #ruby
<apeiros_> iamjarvo: what's the source of your file? (region/country)
<iamjarvo> i made it in excel
<iamjarvo> but there are accented words
beilabs joined #ruby
<apeiros_> excel ain't a country
<iamjarvo> i know but im in the us
<iamjarvo> just wanted to tell you that i made it
<burgestrand> there’s cities named excel
<burgestrand> :d
<apeiros_> then try iso-latin-1
<iamjarvo> "excel aint a country i heard off"
<iamjarvo> lol reminds me of pulp fiction
<apeiros_> afaik that's the default for western ms stuff
flippingbits joined #ruby
<apeiros_> sorry, ruby would know it as "iso-8859-1"
sandstrom joined #ruby
sandstrom joined #ruby
cpruitt joined #ruby
<iamjarvo> apeiros_ but then when i look in the db i don't see the accented characters
<apeiros_> iamjarvo: the db is an additional system. you have to ensure a) that you read the data in the correct encoding, b) ensure that your database is set up to satisfy that encoding and c) that your database connection is set up to satisfy that too
<apeiros_> alternatively you have to translate somewhere between those systems
<iamjarvo> interesting
<apeiros_> but really, it starts off with that you HAVE to know what encoding the data uses you're reading.
<apeiros_> oh, and since you're viewing the db's contents in yet another system, this whole mumbojumbo applies there too…
tayy joined #ruby
<apeiros_> i.e., your viewing app must satisfy the encoding, it must connect to the db using the right encoding etc.
<iamjarvo> apeiros_ to figure that out i guess i have to find out where the characters originate from or what encoding the require
<apeiros_> can you extract a piece of the excel file where you know it has an accented char? using ruby that is…
dhruvasagar joined #ruby
<apeiros_> if so, make sure your terminal.app runs in utf-8 mode
<iamjarvo> i think i will have to deal with this problem later
<apeiros_> then fire up irb. there you ensure you're having a proper readline and not that shitty editline
paulydeez_ joined #ruby
<iamjarvo> i need to get more of the program done
<apeiros_> you read the data, extract that bit, re encode it to utf-8, print it
stephenjudkins joined #ruby
<apeiros_> if it shows up correctly, you determined the source encoding.
<apeiros_> e.g. with a plaintext file: puts File.read(path, :encoding => your_guess).encode('utf-8')
<iamjarvo> thanks apeiros_ . appreciate it, kind of spent good few hrs on it, but now i have english data in so that should get me to the end of the app until i need to make things look nice
heftig joined #ruby
ikaros joined #ruby
SegFaultAX|work joined #ruby
Banistertab` joined #ruby
Banistertab joined #ruby
marcuspat joined #ruby
minijupe joined #ruby
zommi joined #ruby
<iamjarvo> apeiros_ got some good news!
v4n_ joined #ruby
Araxia_ joined #ruby
<iamjarvo> opened the csv in a text editor and changed the file encoding to utf8
vitoravelino joined #ruby
avitzurel joined #ruby
tshauck joined #ruby
travisjeffery joined #ruby
nerded joined #ruby
travis joined #ruby
michael_mbp_ joined #ruby
jensn joined #ruby
ghanima joined #ruby
enroxorz joined #ruby
enroxorz joined #ruby
savage- joined #ruby
akem joined #ruby
looopy joined #ruby
petschbot joined #ruby
diverdude joined #ruby
<diverdude> Hello. I am trying on my mac to run $sudo gem install less, but it just hangs...is there any way to check whats going on?
<apeiros_> diverdude: `gem -v` gives what?
<apeiros_> also: are you behind a proxy?
<diverdude> apeiros_: no im not
<diverdude> 1.3.6
Cervajz joined #ruby
<diverdude> apeiros_: thats what gem -v gives me
<apeiros_> ancient rubygems… update that one first. I'm not sure whether 1.3.6 still bulk-updated. if so, it may just be pulling exabytes of data…
h4mz1d joined #ruby
<diverdude> apeiros_: aha ok...so how do i update that? sudo gem update ?
<apeiros_> gem update --system
<apeiros_> might take quite a while too. check whether there's data being transferred over your network (simplest way is to use activity monitor, you won't be able to tell whether it's ruby that transfers the data, though)
<apeiros_> diverdude: oh, wait…
<diverdude> its stating that its putting 1.8.11 now
<apeiros_> are you on a system ruby?
smgt joined #ruby
<diverdude> apeiros_: im just on a macbook pro
dhruvasagar joined #ruby
<apeiros_> yes, but do you use the ruby that comes preinstalled?
<diverdude> apeiros_: yes
<apeiros_> :-/
<diverdude> what?
<apeiros_> I'd generally advise to leave that one alone and install a newer ruby additionally.
<apeiros_> rvm works great on osx.
<diverdude> anyway it failed in the update :)
<apeiros_> ouch
<diverdude> i just need one gem for less css actually
joe_loui left #ruby
<apeiros_> oh, yeah, well, you can download the gem and install by `gem install -l path/to/gemfile.gem`
voodoofish430 joined #ruby
stringoO joined #ruby
artOfWar joined #ruby
gianlucadv joined #ruby
choffstein joined #ruby
<choffstein> This is probably a stupid question, but why is it if I do Time.at(Time.utc(1998,12,22).to_i)) I get 12/21/1998 back with a time-zone offset?
adamkittelson joined #ruby
shadoi joined #ruby
paissad joined #ruby
<choffstein> Ahh…I need Time.at(…).utc. Right
ianbrandt joined #ruby
Russell^^ joined #ruby
tegila joined #ruby
lord12341 joined #ruby
<lord12341> anyone have experience with Jenkins + Ruby?
dhruvasagar joined #ruby
enviable joined #ruby
<lord12341> i'm getting this error: http://pastie.org/private/pcdouqiky9axufh6zqlva though the file I am requiring definitely exists...
<tegila> any experience with passenger errors ? http://pastie.org/2910187
<LiquidInsect> lord12341: so if you were to, say, open irb from that same directory, and do File.stat("lib/Portal/Setup.rb"), you don't get an ENOENT error?
petschbot joined #ruby
tvo joined #ruby
tvo joined #ruby
terraUNDverra joined #ruby
josh___ joined #ruby
enviable left #ruby
Algorith joined #ruby
maggie_n joined #ruby
<lord12341> LiquidInsect: lemme chekc
<lord12341> should I be in the same directory as Tester.rb?
<lord12341> or in the same dir as ./?
terraUNDverra joined #ruby
stephenjudkins joined #ruby
n8ji joined #ruby
<LiquidInsect> lord12341: you need to be in whatever directory you ran that script from
macabre joined #ruby
Fezzler joined #ruby
<lord12341> hrm ok
jensn joined #ruby
<LiquidInsect> lord12341: in fact you may have just answered your own question. When you load a file, your relative paths are driver from your current working directory, not the directory the script exists in
<lord12341> yep
<lord12341> i did
<LiquidInsect> lord12341: if you want to refer to the current file's path, you can use __FILE__ to get the current file's full path
Jake232 joined #ruby
<lord12341> so when I require "lib/Portal/Setup.rb" change it to require "__FILE__/lib/Portal/Setup.rb" ?
thomaslee joined #ruby
Nss joined #ruby
sdwrage joined #ruby
hotch joined #ruby
<hotch> hey does anyone know if rails scaffolds are generated via template files, directly from source or...?
<LiquidInsect> lord12341: no
incluye joined #ruby
<LiquidInsect> __FILE__ refers to the file's full path
<LiquidInsect> you could do: (one sec)
<LiquidInsect> File.open(File.join(File.dirname(__FILE__), "path/relative/to/current/file"))
<LiquidInsect> or in your case require instead of File.open
<lord12341> LiquidInsect: instead of doing "require"?
<lord12341> File.open it?
tayy_ joined #ruby
<LiquidInsect> no
<LiquidInsect> dude I just said
<LiquidInsect> or in your case require instead of File.open
<hotch> anyone? on where scaffolds are stored? inside of code or in templates?
tegila left #ruby
tayy__ joined #ruby
Indian joined #ruby
looopy joined #ruby
sdavis joined #ruby
robotmay joined #ruby
tatsuya_o joined #ruby
Helius joined #ruby
travisjeffery joined #ruby
Targen joined #ruby
artOfWar joined #ruby
pHcF_ joined #ruby
babinho joined #ruby
EddieBluh joined #ruby
<philcrissman> hotch: what exactly do you mean? They come from a template file... which has code in it.
tvw joined #ruby
<philcrissman> :/ oh. Gone.
Adman65 joined #ruby
sdavis joined #ruby
heldopslippers joined #ruby
tayy joined #ruby
ph^_ joined #ruby
dasfugufish1 joined #ruby
josemota joined #ruby
Cervajz_ joined #ruby
kevinbond joined #ruby
docwhat joined #ruby
jbw joined #ruby
looopy joined #ruby
mengu joined #ruby
Indian joined #ruby
fritzthecat_ joined #ruby
emmanuelux joined #ruby
v0n joined #ruby
stephenjudkins_ joined #ruby
p1d joined #ruby
tehgeekmeister joined #ruby
sdwrage joined #ruby
robyonrails joined #ruby
j3r0m3 joined #ruby
dasfugufish joined #ruby
Jake232 joined #ruby
nanoyak joined #ruby
luoluoluo joined #ruby
hjdivad joined #ruby
statarb3 joined #ruby
becom33 joined #ruby
kirun joined #ruby
NuclearLucifer joined #ruby
<becom33> I'm trying to split a url like mysite.com/index.php?id=1 with the domain id and 1 . not sure how to do with split . is their any simpler way ?
libertyprime joined #ruby
brianherman joined #ruby
jetblack joined #ruby
aeufemio joined #ruby
brianherman joined #ruby
fritzthecat_ joined #ruby
j3r0m3__ joined #ruby
<becom33> no one ?
<apeiros_> becom33: take a look at the URI class
looopy joined #ruby
gnarg joined #ruby
Dreamer3 joined #ruby
moted joined #ruby
airhorns joined #ruby
codespectator joined #ruby
looopy joined #ruby
sandbags joined #ruby
dabaR joined #ruby
<dabaR> What is the purpose of the rbconfig module?
sepp2k joined #ruby
jarjar_prime joined #ruby
michael_mbp joined #ruby
flip_digits joined #ruby
j3r0m3 joined #ruby
sdavis joined #ruby
codespectator joined #ruby
tightwork joined #ruby
Draco_ joined #ruby
cjs226 joined #ruby
nanoyak joined #ruby
j3r0m3__ joined #ruby
libertyprime left #ruby
tightwork joined #ruby
cpruitt left #ruby
tightwork joined #ruby
<shevy> to annoy people when it is not working
<shevy> becom33 you could use a regex
<shevy> becom33 otherwise you could split at '='
<sie> What's the .map(&: magic called?
<shevy> sie the drunken butterfly operator
bbttxu joined #ruby
<shevy> "proc-apply on every element"
<sie> does &: go only with map, collect and likes?
dnjaramba joined #ruby
<samuelkadolph> sie: & passes the argument as the block to the method call. If it's not a proc it calls to_proc on the object which is Symbol#to_proc
tvo joined #ruby
tvo joined #ruby
tightwork joined #ruby
jbw joined #ruby
jbpros joined #ruby
tightwork left #ruby
<samuelkadolph> And Symbol#to_proc maps to proc { |obj, *args| obj.send(self, *args) }
j3r0m3 joined #ruby
Manhose joined #ruby
<sie> Oh, cool — got it, now the other question — haskell had this neat technique of passing a function that has one argument in it already, and the second one can be specified later. Could it be possible to do something like it in ruby without blocks or lambdas?
<samuelkadolph> You could wrap a proc around the call but no ruby doesn't let you do that
* sie bows.
dankest joined #ruby
j3r0m3__ joined #ruby
Morkel joined #ruby
wlos joined #ruby
norex joined #ruby
ablemike joined #ruby
teolicy joined #ruby
<DeeJayTwo> Hmm.. suppose I do @blah = Array.hash in an initialize method
<DeeJayTwo> then in another method, I call @blah.count
<DeeJayTwo> why doesn't it work?
<teolicy> Hi. I was wondering what's the general sentiment here about Heroku, as compared to a more DIY AWS deployment, for a medium size app (~50K uniques per day).
<DeeJayTwo> I looks like it works from within the initialize method...
<shevy> DeeJayTwo what is .hash
<DeeJayTwo> err....
<DeeJayTwo> sorry,
<shevy> also what is the error you get when you do that
<DeeJayTwo> I meant @blah = Hash.new
<teolicy> (more background: I manage platform for such a Python/django app, not very happy with my current cloud provider, considering switching cloud provider or moving to Heroku; since not much experience at #django with Heroku, I thought I'd ask here)
<shevy> DeeJayTwo on a hash, .count works
j3r0m3 joined #ruby
<shevy> {}.count # => 0
<DeeJayTwo> undefined method `count' for {"3ware 9xxx"=>true}:Hash (NoMethodError)
<ablemike> teolicy: I don't like heroku.
<ablemike> For larger apps.
<teolicy> ablemike: Why?
<ablemike> It gets too expensive.
<ablemike> We roll our stuff on Contegix's cloud service and build our own boxes.
<shevy> DeeJayTwo {"3ware 9xxx"=>true}.count # => 1
<DeeJayTwo> so why is the count method not found?
<teolicy> ablemike: Well, I thought I'm an OK chap insofar as UNIX administration/architecture goes, and I was amazed at how bloody much we were paying indirectly in efforts I had to put into managing our humbleish deployment of ~10 servers.
<shevy> DeeJayTwo your ruby is weird
<DeeJayTwo> I defined blah in object.initialize
<shevy> DeeJayTwo what's your ruby version?
Azure joined #ruby
<DeeJayTwo> and I try to count it in another method....
<shevy> DeeJayTwo does that syntax work in your IRB?
<teolicy> ablemike: Looking at the price tag, I'm happy to pay about a 3x markup per "dyno" when compared with AWS/Rackspace/whatever, so long as I'd be willing to believe it will really reduce the time I spend on platform by about 75%-90%.
<DeeJayTwo> ruby 1.8.5 (2006-08-25) [i386-linux]
<teolicy> ablemike: Don't you share this view?
<shevy> DeeJayTwo ah interesting ... perhaps that ruby version does not have that method
<ablemike> teolicy, if you have the time to tune the application and make it really lean… then maybe
<shevy> I am using ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux]
<ablemike> teolicy: i also like to be in 100% control of my environment
<shevy> DeeJayTwo if you can upgrade to 1.8.7 you should. If you can't you could try to define a "def count" method on class Hash
<ablemike> a VM on contegix or AWS is about as close are you are going to get to bare metal
<teolicy> ablemike: I don't get this. Let's say I don't have the time to do so, and I end up with something 5x larger than what I really need. So 10 "dynos" rather than 2.
j3r0m3__ joined #ruby
<teolicy> Still, that's just $320. Throw in a dedicated database for ~$600. That's not such a big amount to pay.
<ablemike> teolicy: thats an insane amount to me
<teolicy> ablemike: Heck, if it will reduce my platform related work even 50%, I'm sure my investors will be happy if I'd pay $1200, too.
<teolicy> ablemike: You are aware of the going hourly rate for a good engineer, no? :)
<ablemike> teolicy: yes. And if they are worth their money, you shouldn't need all that many hours.
<ablemike> once a db is setup and tuned, theres nothing else to do but watch it.
<teolicy> ablemike: What about security patches? What about backups? What about testing your backups? What about adding webservers and removing them? What about monitoring? What about writing that 'tiny web app' just so you can read the production logs without logging into the production machines all the time? What about... You get the picture.
babinho joined #ruby
<ablemike> the only hard part about that is monitoring
<ablemike> backups = duplicity
<teolicy> ablemike: At the moment, we pay SD about $250 just for monitoring. And I'm unhappy with the service as it is.
<teolicy> (SD==Server Density)
<teolicy> (and we tried also CloudKick)
iocor joined #ruby
<ablemike> teolicy: we always end up doing all of our own IT
<ablemike> we host our own repos
<ablemike> maintain all the backups
robyurkowski joined #ruby
<ablemike> we've got a bunch of scripts now to handle it all
<ablemike> monitoring is the only area where we are failing
<ablemike> going to roll nagios soon
<teolicy> ablemike: I get that, but why? Scripts are something that needs to be developed. And tested. And fixed. "scripts" isn't a magic word for "code that writes itself"... :)
<teolicy> ablemike: And the time I spent configuring our nginx, and uwsgi (Python equivalent for Phusion), etc, etc. I'm thinking... why not make all that go *poof*.
<ablemike> teolicy: we've solved the same problem over and over enough now that our scripts are pretty bullet proof
babinho joined #ruby
<ablemike> blah !
<ablemike> I had to completely reinstall passenger and ruby the other day on a live server
<ablemike> it was down for less than 4 minutes
<ablemike> it's not that hard to host ruby applications
j3r0m3 joined #ruby
<ablemike> even heavy traffic sites
<teolicy> ablemike: OK, thanks for your insights.
<ablemike> word
<teolicy> Someone feels differently? Any happy Heroku customers here?
<ablemike> Don't get me wrong
<ablemike> heroku is awesome
<ablemike> to me it just isn't cost effective on larger sites
<teolicy> ablemike: I'm just thinking - we tell our investors we'll be pulling in millions of dollars of annual revenue if we succeed. Why should I care about... say, $15K yearly for our servers?
<teolicy> ablemike: Are you sure all you were saying is optimizing the wrong variable?
<ablemike> if you are going to spend the money, get a dedicated managed VM from Contegix.
<ablemike> let their Noc do it all.
GreaseMonkey joined #ruby
<teolicy> ablemike: Maybe I'm wrong here, but it makes much more sense to be that a bunch of hackers as competent as you and me wrote something like Heroku, which is a bit like your 'bulletproof' scripts only much much more tested and feature-full, than to believe that Contegix are somehow able to staff their NoC with hackers as competent as you and me.
<teolicy> s/sense to be/sense to me/
<samuelkadolph> Wow, that company looks like a giant scam to me
<samuelkadolph> The name and website scream "set up to rake in cash and eventually file for Chapter 11"
kc_edm joined #ruby
* apeiros_ goes back doing crazy things
<teolicy> samuelkadolph: Heroku or Contegix? :)
<samuelkadolph> Contegix
thone_ joined #ruby
felipegb joined #ruby
felipegb joined #ruby
j3r0m3__ joined #ruby
<ablemike> samuelkadolph: ???
<ablemike> contegix is amazing. I've been at all the big hosts and noone can compare to contegix. Seriously. Their service is amazing.
otakutomo joined #ruby
lord12341 left #ruby
<teolicy> ablemike: If no Heroku, my next-in-line is AWS, much because of their rich offering of services. I gather here again you'd prefer a VM from contegix and setup your own postgres/varnish/memcached/rabbitmq/whatever, right?
<teolicy> s/a VM/a clean-slate VM/
<ablemike> teolicy: I am extremely biased.
<teolicy> ablemike: How so?
tayy joined #ruby
<ablemike> 1. I am St. Louis based (so is CTX). 2. I know most of the team in the Noc. They make me feel dumb. 3. I am friends with one of the founders.
<ablemike> But all of that aside, they've been Linux Magazine's Reader Choice award winners year after year…
<ablemike> They really know their shit :)
robbinn joined #ruby
travisjeffery joined #ruby
j3r0m3 joined #ruby
_theriffer_ joined #ruby
<teolicy> ablemike: Anyway, thanks for your commentary.
<ablemike> no sweat :)
huxleyd joined #ruby
travisjeffery joined #ruby
<teolicy> ablemike: Say, one more thing: how do you do monitoring today?
<teolicy> (ablemike: i.e., before nagios?)
<ablemike> right now we are using hyperic
<ablemike> and I hate it
DeM0nFiRe joined #ruby
<DeM0nFiRe> Hello
j3r0m3__ joined #ruby
pootpoot left #ruby
trivol joined #ruby
travis joined #ruby
becom33 joined #ruby
looopy joined #ruby
dnyy joined #ruby
pantsman joined #ruby
pantsman joined #ruby
dyer joined #ruby
<kc_edm> hoping someone can help me with my internal gem repo
<kc_edm> if i add more than 1 version of the same gem, gem install fails
<kc_edm> i.e. rake (0.9.2.2, 0.8.7) causes: ERROR: Could not find a valid gem 'rake' (>= 0) in any repository
<kc_edm> if the constraint is just >= 0, why doesn't it just pick the newest?
huxleyd joined #ruby
travisjeffery joined #ruby
kevinbond joined #ruby
GoldenPie joined #ruby
havenn joined #ruby
j3r0m3 joined #ruby
p1d joined #ruby
crankycoder joined #ruby
<shevy> good question!
LiquidInsect joined #ruby
mikeric joined #ruby
becom33 joined #ruby
flock joined #ruby
Nisstyre joined #ruby
bozhidar joined #ruby
j3r0m3__ joined #ruby
flippingbits joined #ruby
bbttxu joined #ruby
thecreators joined #ruby
kmmndr joined #ruby
rbanffy joined #ruby
j3r0m3 joined #ruby
hornairs joined #ruby
elliot98 joined #ruby
king313 joined #ruby
petschbot joined #ruby
<becom33> I have a module file called modf.rb and file.rb in the same folder when I do require 'modf.rb' Im getting require error
j3r0m3__ joined #ruby
elliot98 joined #ruby
Axsuul joined #ruby
<becom33> anyone ?
<samuelkadolph> becom33: require searches $LOAD_PATH, not the current directory.
<becom33> so what can I do load the file in my path ?
<samuelkadolph> It's not in your path
<elliot98> any CORBA implementations for Ruby?
<becom33> I have the module file in my path . but when I require you says its not searching my path right ? so Im askin how can I load the file in my path ? samuelkadolph
<samuelkadolph> $PATH is from your shell and has nothing to do with $LOAD_PATH in ruby
<becom33> I guess I got you confused .. in the same folder . I have both files in the same folder
<samuelkadolph> And?
<becom33> I need to load the modf.rb into file.rb
<samuelkadolph> You could use load or add your directory to $LOAD_PATH
<elliot98> so is it possible to create CORBA objects for Ruby?
RyanV joined #ruby
<samuelkadolph> elliot98: http://lmgtfy.com/?q=ruby+corba
fridim_ joined #ruby
acml joined #ruby
<elliot98> thanks! but a lot off the results seem outdated, wondering if there's any up to date info
manizzle joined #ruby
<shadoi> That's because nobody sane would still be using CORBA for new dev! :)
seivan joined #ruby
<elliot98> shadoi: the wonders of legacy compatability!
<shadoi> sad story
<elliot98> basically, a certain system's API was built around CORBA
<elliot98> and trying to use Ruby instead of Java or C++ with CORBA feels like fitting an old car with a rigged up engine
sullx joined #ruby
<elliot98> just wondering, why even for its time, did CORBA seem so complicated?
j3r0m3 joined #ruby
<shadoi> design by committee
burgestrand joined #ruby
rhinux joined #ruby
wyhaines_ joined #ruby
devdazed joined #ruby
j3r0m3 joined #ruby
Jake232 joined #ruby
btanaka joined #ruby
flippingbits joined #ruby
Draco_ joined #ruby
eywu joined #ruby
eywu left #ruby
skrewler joined #ruby
emocakes joined #ruby
skrewler joined #ruby
<becom33> cant we do like if check =~ /"Whole Line Check"/
skrewler joined #ruby
<becom33> if check has the "Whole line check" inside it ?
<burgestrand> \A (start) and \z (end)
<burgestrand> That’ll check the whole string though, if you only care about any one line to contain that full text use ^ and $
M- joined #ruby
<burgestrand> So… /\Athis full line must be included, and nothing else\z/
j3r0m3__ joined #ruby
goodieboy joined #ruby
milkpost_ joined #ruby
pHcF joined #ruby
sdwrage joined #ruby
<becom33> burgestrand: like this ? http://pastebin.com/u4Z0ey6X
goodieboy joined #ruby
<burgestrand> Looks like you were after something completely different
rickmasta joined #ruby
<burgestrand> Here, play with this: http://rubular.com/
RLa joined #ruby
tayy joined #ruby
<becom33> burgestrand: how is that suppose to help me with coding ?
<becom33> burgestrand: how is that suppose to help me with coding ?
<becom33> nvm got it
<burgestrand> Sorry, I just want to eat cookies, me tired.
<burgestrand> Figured you could try yourself to a regex.
<samuelkadolph> burgestrand: He doesn't strike me the figure-it-out-yourself type
<burgestrand> In my defence there is a reference on the bottom of that page and it displays results in near real-time. ^^
<mitchty> so, my googlefu is weak, and I'm confused now, what encoding works to get the extended ascii charset to print say from 132.chr? US-ASCII is no bueno, ASCII-8BIT is a no show BINARY is also broken
<burgestrand> Perceived real-time, that is
ikaros joined #ruby
j3r0m3 joined #ruby
<burgestrand> mitchty: depends what character you believe that’ll be, it’s valid in some encodings but not all
<mitchty> yeah but say for example I'm just dumping out a puts to my terminal, which is in utf8 atm
<mitchty> never had issues dumping out extended ascii in perl, so i'm confused
jfredett joined #ruby
ziggles joined #ruby
<burgestrand> If you want to dump a *character*, you’ll have to define an encoding that contains that specific character if you want to print it properly, if you just want to dump the bytes I’d call inspect on the string before printing it
<burgestrand> No idea if there’s a better way than inspect ^^
<shevy> it all sucks
<samuelkadolph> Extended ASCII does suck
<burgestrand> As far as I know extended ASCII is ambiguous?
<samuelkadolph> Yes, there is no actual extended ASCII encoding. http://en.wikipedia.org/wiki/Extended_ASCII
<burgestrand> Yeah, and without encoding a mere byte is pretty much useless
<burgestrand> if you want to display it as a character that is :)
looopy joined #ruby
<mitchty> yeah i'm just going to go with the U+25whatever line drawing characters
FreezingCold joined #ruby
<mitchty> trying to use extended ascii looks like a nightmare, cp1202 might work but whatever
j3r0m3 joined #ruby
<RLa> aren't there suitable chars in unicode?
<samuelkadolph> Yeah, that's unicode
iocor joined #ruby
randym joined #ruby
iocor joined #ruby
<burgestrand> Could use them straight from there, puts "\u2570" works well for me with my 1.9 ruby and UTF-8 terminal
stephenjudkins joined #ruby
lobo_d_b joined #ruby
<mitchty> burgestrand: basically what I did
abstrakt joined #ruby
<burgestrand> mitchty: :)
<mitchty> burgestrand: well i made a dumb hash of the ones I wanted but meh
<mitchty> the three things I hate: encodings, unicode, and not having food
<burgestrand> I like encodings and unicode, it means I can finally write my alphabet everywhere and it actually displays correctly
<samuelkadolph> The first two are redundant
<samuelkadolph> And the third is kind of implied by being an animal
<burgestrand> Unicode I like because it’s huge
<mitchty> the unicode standard though is nuts
<burgestrand> Yeah
Mch1 joined #ruby
<burgestrand> I am happy I just need to care about the numbers and setting an encoding, letting smart people handle the rest :p
<mitchty> unicode itself as far as what it does is fine, but the asian codepages make me want to cry
<RLa> you must have glyphs in the selected font for them too
<mitchty> monaco all the time
<abstrakt> is there a good/stable postgres adapter/gem by now?
<abstrakt> last I checked there wasn't a good postgres implementation, at least not one for ActiveRecord/Rails
augiedoggie joined #ruby
<burgestrand> Why is the one you looked at bad?
<burgestrand> abstrakt: ^
<abstrakt> burgestrand, actually it's been a few months since I've done rails dev, I've been stuck in the PHP world for a while again
<abstrakt> burgestrand, I don't honestly remember which adapters I looked at last time I looked at ruby+postgres
<abstrakt> burgestrand, do you happen to know the name of a common and well supported postgres gem?
<burgestrand> abstrakt: I’ve been using postgres for about 1.5 years, never had any issues
<abstrakt> that's compatible with rails?
<abstrakt> burgestrand, ok what gem do you use?
<abstrakt> I'm tired of MySQL failing queries and corrupting itself :(
<burgestrand> pg
<abstrakt> burgestrand, ahh, ok that's it? just gem install pg?
<burgestrand> postgresql adapter for ActiveRecord
augiedoggie left #ruby
<becom33> I want get a Result like Get 1,2,3,4,5,6 I'm kinda stuck http://pastebin.com/33K1AM46
<burgestrand> Yup, put it in your Gemfile, adjust the adapter in config/database.yml (if rails) and just run it like usual
<abstrakt> burgestrand, so, this one? http://rubygems.org/gems/pg
<burgestrand> Yep
<abstrakt> k thanks
<shevy> "I've been stuck in the PHP world" comforts abstrakt!
<burgestrand> becom33: every time you assign v, you discard the old value
<shevy> try to break free if you can
j3r0m3__ joined #ruby
<burgestrand> becom33: append to it, v << "#{i},", make sure you define v as "" before the loop though
<abstrakt> shevy, hehe, I'm tryin, trust me :)
<abstrakt> shevy, lol, I get offered rediculous amounts of money to do Magento work and I've been turning down all the offers I get
<burgestrand> Although I’d just write that as [*0...6].join(', ')
<becom33> burgestrand: when I do v << "#{i}," . Im gettin a error undefined local variable or method `v'
<abstrakt> burgestrand, should I put rspec under group :test, or should I put it in the main gemfile area?
<burgestrand> becom33: Yeah that’s why I told you to define v before the loop
<becom33> like v = "" ?
<burgestrand> abstrakt: most likely in the main gemfile area, since you’d want it in production, development *and* test, yes?
<burgestrand> becom33: don’t ask, try :)
<abstrakt> burgestrand, ok cool thanks... again, it's been a while, so I don't remember the entire flow here
<becom33> I did :) worked
<burgestrand> ask if you try and it does not work
<abstrakt> burgestrand, would I really want it on production though?
<burgestrand> abstrakt: don’t worry
thecreators joined #ruby
<burgestrand> abstrakt: I don’t see why not; it’s pretty much what I use in my day-to-day work as well
<abstrakt> sure, ok
<burgestrand> abstrakt: this assumes you run postgres in production, of course
fantazo joined #ruby
<abstrakt> burgestrand, oh um, I'm talking about rspec, not pg
<burgestrand> Oh, sorry :)
<burgestrand> You'll want it in test for using it in test, and possibly in development for using the rake tasks
Sapientza joined #ruby
<abstrakt> burgestrand, ok, so "group :development, :test do..."
<abstrakt> ?
<burgestrand> Yup
nerded joined #ruby
<abstrakt> ok, and there are some console enhancements, I can't remember both of them, there's wirble, and there's one other that's similiar
<abstrakt> does anyone know what I might be talking about :)
<abstrakt> lol, I know this is roughly equivalent to asking people to read my mind, when I can't even read my own mind for me :P
j3r0m3 joined #ruby
<burgestrand> Check out pry
<shevy> hehe
mxweas_ joined #ruby
<burgestrand> You can use it as a replacement for the rails console, and personally I use it as a replacement for iRB :)
<shevy> abstrakt, the most powerful command in pry is "cd"!
<abstrakt> oh, and... is unicorn any good? is it worth using?
<abstrakt> i usually just use plain old passenger
<burgestrand> I don't care much for it, for local development I tend to just use WEBRick or whatever
nanoyak joined #ruby
<shevy> damn names
<shevy> unicorn
<shevy> god
<shevy> I hate those names!
<burgestrand> If I provision my own servers I use passenger because it's easy and what I know, nothing wrong with unicorn though
<abstrakt> hahaha, yeah, some of the gems have rather silly names
<shevy> hmm ... WEBRick has an ugly name
<shevy> why not WeBrIcK
<shevy> passenger
<shevy> that's also a gem?
<burgestrand> i mostly use Heroku nowadays, but it can get a bit expensive
<burgestrand> Yup
<shevy> hmm heroku as a name is ok ... rubinius as a name is nice ...
<burgestrand> (Heroku is a service by the way, heroku.com)
j3r0m3__ joined #ruby
<shevy> I am going to use my next gems - table, chair and wall
<burgestrand> Maglev :p
<shevy> ah I don't like maglev as name...
<shevy> it reminds me too much of those magnetic rails
<burgestrand> ;)
<shevy> it's better than unicorn or passenger though :)
<shevy> passenger... who came up with that ...
<abstrakt> oh, and gem 'factory_girl_rails'... is that still a good idea?
<abstrakt> or is there something better
<shevy> grrrrr
<abstrakt> i see it says there's integration with cucumber, but no mention of rspec
<shevy> don't say that this exists please
<shevy> GRRRR CUCUMBER GRRRR
<burgestrand> I don't really like factory girl, the codebase is huge
<burgestrand> It's silly
<shevy> lol
<shevy> hmm
<shevy> let me check on that..
<abstrakt> burgestrand, aight, any suggestions for an alternative, or just don't even bother with it?
<burgestrand> No, really, look at the repository, fucking crazy
nari_ joined #ruby
looopy joined #ruby
<burgestrand> I think I use Machinist at work
<abstrakt> burgestrand, lol, you think you do? :)
<burgestrand> abstrakt: it's still quite new, but check out turnip if you're looking at cucumber
<burgestrand> abstrakt: I just want to put it in the repository and forget about it :p
<shevy> module FactoryGirlStepHelpers
<shevy> def convert_human_hash_to_attribute_hash(human_hash, associations = [])
<burgestrand> Let’s see…
<Pip> what is factory girl ?
<burgestrand> Yeah, machinist
<shevy> I am not sure
kc_edm left #ruby
<shevy> factory.build_class.first(:conditions => attributes_hash.attributes(FindAttributes))
<shevy> it boggles the mind
Rafalski joined #ruby
<burgestrand> You basically define templates
<burgestrand> So when you want an admin user, you have a template for creating one
j3r0m3 joined #ruby
<Rafalski> hey is there a way to use a .collect to calculate an average where amount > 0?
<shevy> wow
<shevy> look at this:
<shevy> Given /^an? #{human_name} exists$/i do
<burgestrand> It’s useful when testing
<shevy> never seen ruby code too similar to that :)
<shevy> Given /^(\d+) #{human_name.pluralize} exist$/i do |count|
<burgestrand> abstrakt: this one I meant: https://github.com/jnicklas/turnip
DeM0nFiRe|2 joined #ruby
rsampaio joined #ruby
j3r0m3 joined #ruby
radic joined #ruby
<mitchty> burgestrand: alternatively, for fun use the vt100 line drawing chars since i'm just in my terminal https://gist.github.com/1390211
<mitchty> though that won't likely work on windows
<burgestrand> hehe
yaasii joined #ruby
<mitchty> lesson of the day: i couldn't find a gem for vt100 nonsense, maybe i'll make a lame one
tayy joined #ruby
Eaven joined #ruby
erebor joined #ruby
<abstrakt> ok, also, any opinions on Rails 3.1 vs Rails 3.0
<abstrakt> last time I tried to set up a 3.1 project far too many gems were incompatible with rails 3.1
j3r0m3__ joined #ruby
<abstrakt> if a gem is 3.0 compatible is it necessarily 3.1 compatible as well?
<burgestrand> I’d say go with 3.1 if you can
<shevy> vt100?
<abstrakt> ahah... yep I remember this error... http://pastebin.com/aL4ijvkV "gems/execjs-1.2.9/lib/execjs/runtimes.rb:47:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes."
<abstrakt> super annoying
<abstrakt> burgestrand, right, well off the bat, I'm getting errors
<abstrakt> I remember this happening last time I tried 3.1
<burgestrand> Let’s see
<mitchty> shevy: dec vt100 line drawing mode http://real-world-systems.com/docs/ANSIcode.html for more info
teolicy joined #ruby
mxweas_ joined #ruby
<mitchty> shevy: basically the same escape sequences that print out your colors in a shell prompt, on unix systems at least
<burgestrand> abstrakt: generating a fresh 3.1 app just to have a similar setup
j3r0m3 joined #ruby
Amirh joined #ruby
<burgestrand> abstrakt: but really, without checking it out too much, this is because you have coffee-script in the application and it needs to be compiled
<mitchty> shevy: effectively when you shift into that mode lower case a-z become line chars as interpreted through termcap etc...
<burgestrand> abstrakt: add "gem 'therubyracer'" to your gemfile
<abstrakt> burgestrand, ok
<burgestrand> and then do the bundle command again
<abstrakt> any opinions on rubyracer vs node?
Amirh joined #ruby
<Amirh> hello world
<burgestrand> Naw, doing node you install it on your system, therubyracer you have as a gem
<Amirh> is this appropriate to start rails after ruby koans?
<burgestrand> Amirh: sure, why not
<Amirh> burgestrand: :)
<burgestrand> I started with rails only, people say you shouldn't, many of them have themselves :P
<burgestrand> (or, well, learned ruby/rails in parallel, but I wanted to learn ruby too)
<burgestrand> (like… well)
<mitchty> i've used ruby for about 10 years and never bothered with using rails much outside of a few tutorials
j3r0m3__ joined #ruby
<Amirh> burgestrand: the syntax confuses me sometime. I complete 62% of ruby koans. I think I'll be ok after I reach 100%
<mitchty> you're learning ruby through the koans?
misc-- joined #ruby
<Amirh> mitchty: yeah
<misc--> hi all, I am using ruby (1.8) and have a json string that I would like to convert to a hash. Is there a way to convert it so that it's the same order as the json string?
<burgestrand> misc--: ruby 1.8 hashes are not ordered
<mitchty> Amirh: ouch, not how i'd have gone about it tbh, the koans are great, but most of what they teach isn't really necessary for learning
<abstrakt> burgestrand, ok, yeah just adding the ruby racer gem works fine
<burgestrand> abstrakt: sweet :)
Draco_ joined #ruby
<Amirh> mitchty: well I want to taste a bit of the whole package.
<burgestrand> that’s what she said
<burgestrand> … sorry, a bit offensive, could not resist.
<misc--> burgestrand: yeah that's what I thought. So, there is ActiveSupport::OrderedHash but I was wondering if I could somehow make it so that the returned hash (from json decode) can use the OrderedHash instead of a regular Hash ?
<abstrakt> hahaha, I made a "that's what she said" joke the other day at work
<abstrakt> it's mostly women at that office
<abstrakt> I couldn't resist, lol
craigglennie_ joined #ruby
<abstrakt> good thing I'm a contractor, so they can't really "fire" me per se :P
<burgestrand> ;)
<mitchty> Amirh: heh, no worries, just saying its probably more info than you need at first, nothing wrong with it, wish koans were around when I was learning ruby
<burgestrand> misc--: no idea, I’ve never done it, but yes it’s possible I just don’t know if there’s any support for it anywhere
<misc--> burgestrand: ok thanks anyway
<burgestrand> Actually, object properties are unordered in javascript too so I’d be careful with that even if you find a solution
<burgestrand> misc--: *
fixl joined #ruby
<burgestrand> … ^
<burgestrand> Trying out US keyboard layout for a while; sometimes the keymapping in my brain fails.
<abstrakt> I think he said something about "this is gonna be long and hard"
<burgestrand> Sucks for writing Swedish though…
<burgestrand> heh
<abstrakt> in reference to installing some stuff on my workstation
<abstrakt> he = my sysadmin
Araxia_ joined #ruby
beakerman joined #ruby
<SolarisBoy> ooh personal sysadmins sweet
hSATAC joined #ruby
<misc--> burgestrand: mmm yeah, definitely hashes are supposed to be unordered by definition... I could use an array of hashes but I just am not sure how to convert that json in to an array of hashes, because the json library just returns a hash. I would have to make my own json parser I think
wyhaines joined #ruby
<burgestrand> misc--: you could pass along an array of property names if you have control of the JSON generation
paraglade left #ruby
<burgestrand> and then iterate through the hash in that order
Draco_ joined #ruby
<burgestrand> or whatever you do with it after you parse it :)
dhruvasagar joined #ruby
fayimora joined #ruby
tdubellz_ joined #ruby
<misc--> yeah... except the json contains key/vals within keys... so it's more than one level deep
<burgestrand> Oh, that'd be an issue, yeah
<misc--> all I can think of is monkey patch json lib to use OrderedHash instead of Hash :/ that's a task within itself though
rboyd joined #ruby
leku joined #ruby
leku left #ruby
flip_digits joined #ruby
<abstrakt> burgestrand, so will rake db:create be able to create a postgres database as long as I have my username and password correct?
looopy joined #ruby
<burgestrand> abstrakt: I would believe so, yeah, assuming that user can create databases
<abstrakt> k
beilabs_ joined #ruby
<abstrakt> burgestrand, rails new fooproject -d pg?
sythe joined #ruby
cbuxton joined #ruby
<burgestrand> abstrakt: just run it; worst case you'll have to change the gemfile and database.yml :)
<burgestrand> (actually that won't work because it's called postgresql in rails and not pg which you'd have found out by now :p)
becom33 joined #ruby
frogstarr78 joined #ruby
sdwrage left #ruby
travisjeffery joined #ruby
travisjeffery joined #ruby