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
<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 ?
<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
<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
<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
<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.
<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
<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?
<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)"
<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
<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
<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
<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
<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?
<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>
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.
<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?
<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?
<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?
<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)