<shadoi>
makarius: yeah, it uses InstructionSequence
<shadoi>
reopens it
pashamur_ has quit [Quit: Konversation terminated!]
ZachBeta has quit [Quit: Computer has gone to sleep.]
pashamur_ has joined #ruby
<makarius>
allright, will checkit out, I can imagine this won't work on jRuby
<shadoi>
yeah says MRI/YARV only
emmanuelux has joined #ruby
<shadoi>
uses his ruby-internal gem
<shadoi>
god the classtree method is so awesome.
<makarius>
shadoi: thanks
makarius has quit [Quit: WeeChat 0.3.7]
pashamur_ has quit [Client Quit]
mischief has joined #ruby
pashamur_ has joined #ruby
<mischief>
hey can someone tell me how to add a shell script to a gem and have it not execute as ruby?
<rking>
mischief: Can you clarify a bit?
<mischief>
which part is unclear
<shadoi>
mischief: you want it to execute during gem install as a pre/post-install action or you just want it in the gem?
<mischief>
in the gem
gebe has joined #ruby
pashamur_ has quit [Read error: Connection reset by peer]
<shevy>
a .gem is just a packaged up directory
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
pashamur_ has joined #ruby
<shevy>
what you could do is put it into bin/ subdirectory of the gem like bin/foo.sh
replore_ has joined #ruby
tvw has quit [Ping timeout: 256 seconds]
ryanf has joined #ruby
<shadoi>
mischief: I assume you want it to be executable and in the gem bin path?
<mischief>
shevy: precisely what i have done, except it doesn't have a .sh extension and has a shebang of #!/bin/sh
<shevy>
that should still work fine
<mischief>
i've installed the gem via rvm which creates a ruby wrapper script
<shadoi>
shevy: it creates stub files for executables
<mischief>
that^
<mischief>
how do i make it not do that :(
<shevy>
a stub file?
kenichi has quit [Remote host closed the connection]
<rking>
Oh? Troubles with rvm you say? Can't be. =\
<shevy>
I dont use rvm myself so I wont know, but rvm installs into $HOME directory or?
<rking>
I've gone back and forth between rvm and rbenv enough times to now say rbenv is my favorite by a long shot.
<rking>
rvm2 sounds cool though.
<shevy>
perl6 will run rvm2
<mischief>
i hate rvm and ruby and gems with a passion, but i have to write this for work. but i guess i shouldn't rant about that in #ruby :-)
<shadoi>
mischief: I think I'd probably wrap the script in a ruby bin that just uses %x or system()
<shevy>
mischief, hey. I can see that with rvm. gems to a lesser extent. ruby as a language, nah, it can be beautiful poetry
<mischief>
that sounds like a non-optimal solution
<shadoi>
mischief: ugly but the simplest thing I think.
<shevy>
like everyone plays the violin, but differently. and only my code says that I am Paganini
<shevy>
and everyone else sucks :-)
pashamur_ has quit [Client Quit]
<rking>
shevy: I think it said you're panini.
pashamur__ has joined #ruby
hasrb has quit [Remote host closed the connection]
<shadoi>
mischief: any reason the shell script can't be converted to ruby?
niklasb has quit [Ping timeout: 244 seconds]
kenperkins has quit [Ping timeout: 256 seconds]
pashamur__ has quit [Read error: Connection reset by peer]
Konboi has joined #ruby
<shevy>
if it is in the bin/ subdirectory, it would be installed into /usr/bin traditionally right?
ZachBeta has joined #ruby
pashamur__ has joined #ruby
<rking>
shevy: Well, /usr/local/bin, sure.
<shevy>
so technically, you could write one gem, for every shell script out there
<shadoi>
if it's in the gem bin/ dir, it creates a wrapper script for it in /usr/bin
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<shadoi>
Try: cat `which rake`
<mischief>
shadoi: im using find
<shadoi>
mischief: performance is an issue then?
<mischief>
um no
<mischief>
i'd rather not reinvent any wheels
<mischief>
and the shell script is already written
<mischief>
but fucking rvm writes a ruby wrapper around it
<shadoi>
then Dir.glob will probably work fine, or use the Find module
ZachBeta has quit [Client Quit]
<rking>
mischief: Then make a stfubin/whatever in your gem, then from bin/whatever use __FILE__ + '../stfubin/whatever'
freeayu has joined #ruby
<shadoi>
mischief: or if you REALLY want to do it properly, convert your gem to a system package and you can put whatever the hell you want, wherever the hell you want.
<rking>
Urr, that's approximate, anyway you probably get what I mean.
<shevy>
properly
<mischief>
yea i guess ill just make a ruby wrapper that calls exec. :>
<shevy>
means to not use RVM :-)
<mischief>
well
<mischief>
my company does some fairly fucked up shit in gems
<mischief>
like distributing their Go software ._.'
<mischief>
figured ill continue with the trend
<shevy>
hehehe
<rking>
I like it.
yugui_zzz is now known as yugui
<shevy>
rking, see? gems will soon become a common distribution format
<shadoi>
mischief: lollerskates.
<shevy>
even for non ruby things!
* rking
totally sees.
fayimora has quit [Read error: Connection reset by peer]
<shevy>
rking, lower your portage and surrender
avandenhoven has quit [Quit: avandenhoven]
<shevy>
here come the rubies
liluo has quit [Remote host closed the connection]
fayimora has joined #ruby
* rking
uploads an apt mirror as a .gem
<shevy>
argh please no debian!
<shevy>
I am so happy with you being different rking ... and now you are on that terrible apt train again :(
<samuelkadolph>
And you should be able to do it yourself. Just look at String#gsub or String#tr
<KwikkSilva>
like i said - seemed like a good idea at the time
<KwikkSilva>
however - my threat still stands
<KwikkSilva>
So i leave it up to you
Kn|t3 has quit [Ping timeout: 240 seconds]
Kn|t3_ is now known as Kn|t3
<GeekOnCoffee>
KwikkSilva: samuelkadolph has told you everything you need
<GeekOnCoffee>
and taught me a method I didn't know (tr), cheers!
<KwikkSilva>
hmm this is unfortunate - Kwikksilva was looking to make absolutely no effort on his part
<GeekOnCoffee>
KwikkSilva: that was pretty obvious
<GeekOnCoffee>
<insert analogy about teaching to fish here>
Araxia_ has quit [Quit: Araxia_]
<KwikkSilva>
hey
<KwikkSilva>
at least i'm honest
looopy has joined #ruby
<GeekOnCoffee>
KwikkSilva: if you come up with a solution, I'd be happy to check it for you
<troulouliou_dev>
KwikkSilva, "myemail@gmail.com".gsub("@","-at-").gsub(".com","-period-com").gsub(/$/, " or i pee my pants")
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
shadoi has quit [Quit: Leaving.]
pixelsnbits has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
digitalcakestudi has joined #ruby
tewecske has quit [Quit: Leaving.]
<KwikkSilva>
troulouliou_dev, you have saved me tons of time and a new pair of pants
<KwikkSilva>
i salute you
apeiros_ has quit [Remote host closed the connection]
jeffreybaird has joined #ruby
apeiros_ has joined #ruby
<KwikkSilva>
also i might add - that it works like an effing hum dinger
voodoofish430 has quit [Quit: Leaving.]
<KwikkSilva>
a thousand bj's be bestowed upon you
pashamur__ has quit [Read error: Connection reset by peer]
pashamur__ has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
jeffreybaird has quit [Ping timeout: 256 seconds]
apeiros_ has quit [Ping timeout: 265 seconds]
CheeToS has joined #ruby
indian has quit [Quit: Leaving]
pashamur__ has quit [Read error: Connection reset by peer]
pashamur__ has joined #ruby
alexim has quit [Quit: sleep]
khakimov has joined #ruby
Hanmac1 has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Azure has joined #ruby
Hanmac has quit [Ping timeout: 248 seconds]
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
greyEAX has quit [Read error: Connection reset by peer]
irrationalfab has quit [Remote host closed the connection]
mrdtt has joined #ruby
RoboTamer has left #ruby [#ruby]
ringotwo has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
bradhe has joined #ruby
Kn|t3_ has joined #ruby
adeponte has quit [Read error: Operation timed out]
Kn|t3 has quit [Ping timeout: 240 seconds]
Kn|t3_ is now known as Kn|t3
fserb has quit [Quit: ttyl]
troulouliou_dev has quit [Quit: Leaving]
shevy has quit [Ping timeout: 248 seconds]
irrationalfab has joined #ruby
wallerdev has quit [Quit: wallerdev]
shtirlic has quit [Ping timeout: 256 seconds]
looopy has quit [Remote host closed the connection]
Defusal_ has quit [Ping timeout: 246 seconds]
wagle has quit [Ping timeout: 265 seconds]
fserb has joined #ruby
ilyam has quit [Quit: ilyam]
ken_barber1 has joined #ruby
pashamur__ has quit [Ping timeout: 245 seconds]
fserb has quit [Client Quit]
TorpedoSkyline has joined #ruby
<bradhe>
Erm, I'm missing something--how do you change the binding for a block? I'm trying to mimic ActiveSupport's callbacks...
pu22l3r has joined #ruby
TheFuzzball has joined #ruby
ken_barber has quit [Ping timeout: 252 seconds]
<TorpedoSkyline>
TheFuzzball: STALKER
<TorpedoSkyline>
=P
TorpedoSkyline has quit [Read error: Connection reset by peer]
pixelsnbits has quit [Quit: pixelsnbits]
frishi has joined #ruby
looopy has joined #ruby
shevy has joined #ruby
irrationalfab has quit [Remote host closed the connection]
fserb has joined #ruby
jonathanwallace has joined #ruby
Progster has joined #ruby
BMF has joined #ruby
wagle has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
BMF has left #ruby [#ruby]
Azure is now known as valkyrie^
fserb has quit [Client Quit]
igotnolegs has joined #ruby
robacarp_ has quit [Remote host closed the connection]
mengu has quit [Read error: Connection reset by peer]
Azure has joined #ruby
shadoi has joined #ruby
SimSala has quit [Ping timeout: 240 seconds]
valkyrie^ has quit [Quit: ¦]
jeff_sebring has joined #ruby
wagle has quit [Remote host closed the connection]
cyong has joined #ruby
mockra has quit [Remote host closed the connection]
akem has quit [Ping timeout: 244 seconds]
hasrb has joined #ruby
Markvilla has quit [Quit: Markvilla]
erichmenge has quit [Quit: erichmenge]
mockra has joined #ruby
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
wagle has joined #ruby
akem has joined #ruby
wagle has quit [Ping timeout: 240 seconds]
jeff_sebring has quit [Remote host closed the connection]
fbernier has joined #ruby
jeff_sebring has joined #ruby
wagle has joined #ruby
wagle has quit [Read error: Connection reset by peer]
wagle has joined #ruby
fayimora has quit [Ping timeout: 245 seconds]
i_s has joined #ruby
looopy has quit [Remote host closed the connection]
beneggett has joined #ruby
replore_ has quit [Remote host closed the connection]
stephenjudkins has joined #ruby
Gavilan has joined #ruby
beneggett has quit [Ping timeout: 244 seconds]
fserb has joined #ruby
tomb__ has quit [Quit: Computer has gone to sleep.]
hemanth has quit [Read error: Connection reset by peer]
Guedes0 has quit [Read error: Connection reset by peer]
looopy has joined #ruby
hemanth has joined #ruby
fserb has quit [Client Quit]
jpres has joined #ruby
fserb has joined #ruby
ananthakumaran has joined #ruby
ringotwo has quit [Ping timeout: 246 seconds]
fserb has quit [Client Quit]
bradhe has quit [Remote host closed the connection]
thecreators has joined #ruby
kvirani has joined #ruby
suborbital has quit [Quit: WeeChat 0.3.9-dev]
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
williamcotton has quit [Quit: williamcotton]
cHarNe2 has quit [Ping timeout: 272 seconds]
wilmoore has joined #ruby
looopy has quit [Remote host closed the connection]
umttumt has joined #ruby
williamcotton has joined #ruby
stefanp_ has quit [Ping timeout: 265 seconds]
TheFuzzball has quit [Ping timeout: 244 seconds]
umttumt has left #ruby [#ruby]
beneggett has joined #ruby
robbyoconnor has joined #ruby
chico_chicote has quit [Read error: Operation timed out]
suborbital has joined #ruby
looopy has joined #ruby
seanstickle has quit [Quit: Nihil sub sole novum]
fbernier has quit [Ping timeout: 244 seconds]
tilde`_ has quit [Quit: leaving]
cryptfu has joined #ruby
ilyam has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
sleetdrop has joined #ruby
umttumt has joined #ruby
fserb has joined #ruby
flowerhack has joined #ruby
manizzle has quit [Read error: Connection reset by peer]
jpres has quit [Quit: Page closed]
manizzle has joined #ruby
williamcotton has quit [Quit: williamcotton]
imami|afk is now known as banseljaj
<flowerhack>
hey all, I'm having a bit of a problem with TCPSocket in a small ruby program I'm working on -- is this a good place to ask for help?
fserb has quit [Client Quit]
TheFuzzball has joined #ruby
yoklov has quit [Quit: bye!]
wpaulson has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
<ghanima>
hello all
<ghanima>
question
<ghanima>
I need to generate some configs and and deploy them by capistrano... Just curious is the normal approach is to create an erb template and set your variables in a yaml file
fbernier has joined #ruby
TheHunter_1039 has quit [Quit: TheHunter_1039]
beneggett has quit [Ping timeout: 244 seconds]
Beoran4 has quit [Read error: Operation timed out]
Beoran4 has joined #ruby
theRoUS has joined #ruby
cHarNe2 has joined #ruby
mischief has quit [Ping timeout: 240 seconds]
brianpWins has joined #ruby
slyv has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
Stormbytes has joined #ruby
fbernier has quit [Ping timeout: 256 seconds]
iamjarvo1 has quit [Quit: Leaving.]
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
theRoUS has quit [Quit: Leaving]
theRoUS has joined #ruby
r0bby has joined #ruby
billiamii| has joined #ruby
Stormbytes has quit [Client Quit]
JonnieCache has quit [Read error: Operation timed out]
mattp_ has quit [Read error: Connection reset by peer]
JB___ has quit [Read error: Operation timed out]
cHarNe2 has quit [Ping timeout: 252 seconds]
ken_barber1 has quit [Read error: Operation timed out]
cheater has quit [Read error: Operation timed out]
johnduhart2 has quit [Read error: Operation timed out]
s0ber_ has joined #ruby
williamcotton has joined #ruby
statix_ has joined #ruby
ken_barber has joined #ruby
busybox42 has quit [Ping timeout: 256 seconds]
Progster has quit [Ping timeout: 272 seconds]
hamfz_ has joined #ruby
fmcgeough has quit [Ping timeout: 256 seconds]
h4mz1d has joined #ruby
kevinbond has joined #ruby
queequeg1 has quit [Read error: Operation timed out]
neersight[d] has quit [Read error: Operation timed out]
jwang has quit [Read error: Operation timed out]
queequeg1 has joined #ruby
neersighted has joined #ruby
johnduhart has joined #ruby
busybox42 has joined #ruby
mattp_ has joined #ruby
stat1x has quit [Ping timeout: 256 seconds]
chson_ has joined #ruby
jwang has joined #ruby
Azure has quit [Read error: Operation timed out]
jeff_sebring has quit [Remote host closed the connection]
chson has quit [Ping timeout: 256 seconds]
olrrai has quit [Ping timeout: 256 seconds]
billiamii has quit [Ping timeout: 256 seconds]
MissionCritical has quit [Ping timeout: 256 seconds]
s0ber has quit [Ping timeout: 256 seconds]
fmcgeough has joined #ruby
s0ber_ is now known as s0ber
Azure has joined #ruby
Jb_ has joined #ruby
olrrai has joined #ruby
robbyoconnor has quit [Ping timeout: 256 seconds]
jeff_sebring has joined #ruby
cheater has joined #ruby
theRoUS is now known as RoUS
dsa has joined #ruby
johnduhart has quit [Read error: Operation timed out]
xsdg has quit [Read error: Operation timed out]
xsdg has joined #ruby
johnduhart has joined #ruby
EzeQL has quit [Ping timeout: 272 seconds]
mattp_ has quit [Read error: Operation timed out]
itnomad has quit [Ping timeout: 256 seconds]
mattp_ has joined #ruby
itnomad has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
EzeQL has joined #ruby
daniel_hinojosa has joined #ruby
ipoval has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
stephenjudkins has joined #ruby
<lectrick>
I think I hosed my .gemrc. Can someone send me theirs in a PM?
dsa has quit [Ping timeout: 248 seconds]
<horseman>
lectrick: just google it
<horseman>
it should only have like 1 line in it
<horseman>
lectrick: this: gem: --no-rdoc --no-ri
<lectrick>
mainly I need good sources
<samuelkadolph>
No, it have 2.
<samuelkadolph>
it should have*
<samuelkadolph>
install: --no-rdoc --no-ri
<samuelkadolph>
update: --no-rdoc --no-ri
fbernier has joined #ruby
jeff_sebring has joined #ruby
<lectrick>
why does gems.rubyforge.com need a / after it but gems.github.com does not?
<samuelkadolph>
One of, if not the, largest rails app
<samuelkadolph>
I will never work with php again
stephenjudkins has quit [Quit: stephenjudkins]
<lectrick>
samuelkadolph: it ended up being, rails is a slow bitch to install, my bad. it was just odd because it sat there for like 5 minutes thinking and outputting nothing. bad UI
<samuelkadolph>
lectrick: Sounds like your connection is really slow
MissionCritical has joined #ruby
fbernier has quit [Ping timeout: 244 seconds]
cHarNe2 has joined #ruby
<lectrick>
samuelkadolph: it apparently didn't help that 1) I'm logged into an EC2 instance, 2) I enabled installation of rdocs :)
RoUS is now known as RoUSss
johnduhart has quit [Read error: Operation timed out]
looopy has joined #ruby
mattp_ has quit [Read error: Operation timed out]
mattp_ has joined #ruby
johnduhart has joined #ruby
RoUSss is now known as RoUS
cHarNe2 has quit [Ping timeout: 272 seconds]
azm has quit [Ping timeout: 245 seconds]
simao_ has joined #ruby
vitoravelino is now known as vitoravelino`afk
simao has quit [Ping timeout: 265 seconds]
<bnagy>
hello, world.
ghanima has quit [Quit: Leaving.]
jeer has joined #ruby
kvirani has quit [Remote host closed the connection]
CheeToS has quit [Ping timeout: 244 seconds]
wubino has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
andrewhl has joined #ruby
noyb has joined #ruby
wubino has quit [Client Quit]
kalleth_ has quit [Quit: No Ping reply in 180 seconds.]
pcboy___ has joined #ruby
kalleth_ has joined #ruby
kiela has quit [Ping timeout: 244 seconds]
maahes has joined #ruby
kiela has joined #ruby
wubino has joined #ruby
pcboy_ has quit [Ping timeout: 265 seconds]
Konboi has quit [Remote host closed the connection]
umttumt has quit [Remote host closed the connection]
kevinbond has quit [Quit: kevinbond]
adeponte has joined #ruby
kevinbond has joined #ruby
rippa has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
wpaulson_ has joined #ruby
macgregor_ has quit [Ping timeout: 240 seconds]
remmy444 has joined #ruby
wpaulson has quit [Ping timeout: 244 seconds]
wpaulson_ is now known as wpaulson
hasrb has quit [Remote host closed the connection]
macmartine has quit [Quit: macmartine]
mrdtt has quit [Read error: Connection reset by peer]
mrdtt has joined #ruby
jeff_sebring has joined #ruby
h4mz1d has quit [Ping timeout: 240 seconds]
hamfz_ has quit [Ping timeout: 256 seconds]
pdtpatrick has joined #ruby
macmartine has joined #ruby
cjs226 has joined #ruby
byronb has joined #ruby
joast has quit [Quit: Leaving.]
My_Hearing has joined #ruby
CheeToS has joined #ruby
carlyle has quit [Remote host closed the connection]
jeer has quit []
jeer has joined #ruby
adeponte has quit [Remote host closed the connection]
<Siphonblast2>
I keep getting this syntax error when running my program and I was hoping someone could help me
<Siphonblast2>
it's very rudimentary.
moshee has quit [Ping timeout: 244 seconds]
a_a_g has quit [Ping timeout: 265 seconds]
flowerhack has quit [Remote host closed the connection]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
<Siphonblast2>
I'm getting the interpreter error: "cannot convert fixnum to string"
<bnagy>
uh.. what syntax error?
<Siphonblast2>
sorry
<Siphonblast2>
not a syntax error.
<Siphonblast2>
I misspoke.
a_a_g has joined #ruby
<bnagy>
yeah you're trying to + a fixnum to a string
<Siphonblast2>
oh
<bnagy>
use string interpolation instead - + creates new strings
<bnagy>
"NO NOT SINCE #{year}"
<bnagy>
pyoor: query?
gregorg has quit [Quit: Quitte]
<Siphonblast2>
@bnagy: how exactly do I fit what you just said for my purposes? For example, should I make a variable called year and create a random object with it?
<Siphonblast2>
I'm trying to randomize the year.
<Siphonblast2>
But now I understand the error since you told me what it was; but I'm still not sure how to make a random year (Since I don't know Ruby's syntax, I'm not entirely sure how the # is being used. Is it analogous to $ in Bash?)
<bnagy>
Siphonblast2: use your randres or whatever you called the variable
beneggett has joined #ruby
<bnagy>
or you can just put the random stuff right in the string "NOT SINCE #{ rand(1939..1956) }"
mikepack has joined #ruby
fantazo has quit [Remote host closed the connection]
ChampS666 has joined #ruby
ChampS666 has quit [Client Quit]
<Siphonblast2>
oh, that seems like a better way. Didn't know you could do that. I'm really just wading around randomly here :D
<Siphonblast2>
what is that syntax #{} for? Is that ruby syntax or is that your didactic example formatting?
<Siphonblast2>
I was guessing the latter but I wanted to be sure.
<Siphonblast2>
esp. since # is used for comments usually :D but you never know, might be something I don't know.
bradhe has joined #ruby
negaduck has joined #ruby
bluOxigen has joined #ruby
socomm has quit [Read error: Connection reset by peer]
ephemerian has joined #ruby
daniel_hinojosa has quit [Ping timeout: 256 seconds]
<Hanmac>
Siphonblast2: #{} inside an string is different then # outside, the first is for automatic string building ... like "abc#{@stat}xyz" is similar to "abc" + @stat.to_s + "xyz"
_br_ has quit [Quit: Bye, thanks for all the fish.]
<Siphonblast2>
also, Hanmac, why is it that if I do double quotes like you just did, it properly calculates the random number and converts it as part of the string, whereas if I use single quotes it just converts everything to a string?
igotnolegs has quit [Quit: Computer has gone to sleep.]
<Siphonblast2>
what's the technical difference between the use of a single quotes and double quotes to the ruby interpreter, is what I'm asking.
<Siphonblast2>
*the use of
burgestrand has joined #ruby
perryh is now known as perryh_away
jeer has quit []
blacktulip has joined #ruby
hakunin has quit [Remote host closed the connection]
Fraeon has quit [Ping timeout: 245 seconds]
hakunin has joined #ruby
<seoaqua>
could anyone fix this for me? @how_many ||= @page.search("//span[@class='nums']").map{|nums|nums.first.nil? false: nums.first.content.gsub(/\D/,'').to_i}
socomm has joined #ruby
<Hanmac>
Siphonblast2: single quotes does not interpret anything in the string ... so '\n' are TWO chars while "\n" are one
mikepack has quit [Remote host closed the connection]
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
jeer has joined #ruby
<seoaqua>
oh ,sorry , wait
<Siphonblast2>
Ah okay. Useful to know.
jbinto has quit [Read error: Connection reset by peer]
arturaz has quit [Read error: Connection reset by peer]
prtksxna has quit [Remote host closed the connection]
arturaz has joined #ruby
billiamii has quit [Read error: Connection reset by peer]
DarkPT has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
manuphp has joined #ruby
ctevie has joined #ruby
ctevie has quit [Changing host]
ctevie has joined #ruby
manuphp has left #ruby [#ruby]
wilmoore has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
workmad3 has joined #ruby
bosphorus has joined #ruby
flippingbits has quit [Quit: flippingbits]
flippingbits has joined #ruby
Gm4n has quit [Read error: Operation timed out]
ZeroModu_ has joined #ruby
berserkr has quit [Quit: Leaving.]
mikewintermute has quit [Quit: mikewintermute]
apeiros_ has joined #ruby
ZeroModulus has quit [Ping timeout: 265 seconds]
tatsuya_o has joined #ruby
Ammar01 has joined #ruby
tatsuya_o has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 244 seconds]
qwerxy has joined #ruby
dhruvasagar has joined #ruby
tvw has joined #ruby
gianlucadv has joined #ruby
pk1001100011 has joined #ruby
xkx has quit [Read error: Connection reset by peer]
khakimov has quit [Quit: Computer has gone to sleep.]
nfk has joined #ruby
<polysics>
hello
<polysics>
performance consideration: I need to run some jobs periodically
<workmad3>
polysics: cron
<polysics>
I am using Resque
<polysics>
was thinking if it was better to requeue each job using scheduler, or just use cron and batch them out of the db
<polysics>
cron/resque scheduler
<polysics>
that is, options are: each job requeues itself 1 hour into the future
<polysics>
or every hour, I run the query and queue all jobs
fserb has joined #ruby
<polysics>
second option sounds stabler but more spiky in performance
<polysics>
although there's a set number of workers
<polysics>
job picks an image off HTTP, modifies it and reuploads it, so they are pretty "heavy" jobs
<polysics>
what do you think?
<workmad3>
well, what happens if your queue somehow takes longer than an hour to empty?
hemanth has quit [Remote host closed the connection]
Bosma has quit [Ping timeout: 246 seconds]
roolo has joined #ruby
<polysics>
the goal is to have jobs run every hour, so I probably would add more workers
<polysics>
so you would re-enqueue them? that would not guarantee hourly execution either
<polysics>
the only way to do so is to have enough workers on it
<polysics>
as the fact that the job goes back on the queue in one hour does not guarantee it gets run after 60 minutes, just that it is in the q again
<polysics>
that is what was leading me to think a cron job could probably be the same thing
<workmad3>
how hard a limit is the runs once an hour thing?
<polysics>
ah well, not hard at all
<polysics>
anywhere between 30 and 90 minutes will do, btw
<polysics>
right now a single job takes about 2-3 seconds
<polysics>
on a single workers
<workmad3>
and how many jobs do you have?
<polysics>
so i can process 3k jobs an hour
<polysics>
currently 1500ish
<polysics>
if i batch them out they're usually done by the 30 minute mark
<workmad3>
right, so I'd suggest you just requeue them as they finish and monitor them
zommi has joined #ruby
<polysics>
that would be more reliable, is it?
<polysics>
as opposed to every hour select all and queue all
<workmad3>
it would probably be simpler
<workmad3>
don't know about reliability... again, you'd need monitoring in place to assess that
<polysics>
the only problem with that is tha tResque somehow wants me to reconnect to Redis if I want to use Resque from within another job
<polysics>
I guess that's a pretty harsh performance hit
twinturbo has joined #ruby
A124 has joined #ruby
A124 has left #ruby [#ruby]
<workmad3>
don't try to reason about performance
<workmad3>
get something set up and get it monitored so you're recording performance data
eurek has joined #ruby
<workmad3>
without that data, you simply can't make any reasonable assessment of performance
<workmad3>
hell, are you even running your time tests on a production or production-like machine, or are you running it on your dev machine?
tatsuya_o has joined #ruby
werdnativ has quit [Quit: werdnativ]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
negaduck_ has joined #ruby
negaduck has quit [Ping timeout: 256 seconds]
negaduck_ is now known as negaduck
wubino has joined #ruby
<polysics>
totally dev machine atm :-)
<polysics>
so, let's start with the cron version
<polysics>
as it is easier to set up
<polysics>
when I have data I can optimize
<polysics>
you are totally right
EskiMag has joined #ruby
CheeToS has quit [Ping timeout: 244 seconds]
flype has joined #ruby
<workmad3>
yeah, you don't even know how long the jobs will actually take... it's 2-3s on your dev hardware, but that could change drastically in production
d3vic3 has quit [Ping timeout: 248 seconds]
<polysics>
especially since there's HTTP involved, so latency could be an issue here and not on the servers
<polysics>
Linode's pipes are better than mine :-)
RudyValencia has quit [Quit: My IRC client doesn't advertise in /quit messages.]
<workmad3>
fragrant: sorry, I have tried and failed to teach the absolute basic structure of ruby over IRC too many times now, the only thing I can now do is refer you to books and guides on learning ruby
yannis has quit [Read error: Connection timed out]
<workmad3>
IRC is a great Q/A medium... but this is beyond Q/A now
<fragrant>
But does require work on ruby 1.9.3 ?
vandemar has joined #ruby
eurek has quit [Quit: Computer has gone to sleep.]
<fragrant>
workmad3: I have understood what you were trying to say
<fragrant>
workmad3: class Hola::Translator means, translation.rb file inside another hola directory, right?
rohit has quit [Quit: Leaving]
<Hanmac>
fragrant: on 1.9.3 require is spilted into two functions ... require_relative for internal and require for extrenal ... like "internal.h" and <external.h> in C
liluo has quit [Remote host closed the connection]
<wubino>
is there a way to run a line of ruby from bash prompt?
<fragrant>
wubino: irb
<fragrant>
wubino: man irb
<apeiros_>
if Hola::Translator does not rely on anything defined by Hola, you can also change how you define Hola::Translator to `module Hola; class Translator; …; end; end`
<bnagy>
wubino: ruby -e 'p RUBY_VERSION'
<wubino>
e.g. echo $ruby puts "hello, world"
<apeiros_>
wubino: what bnagy said. if it's more than 1 line you can either use ; instead of newlines, or use `ruby`, enter your code, then hit ctrl-D
<bnagy>
wubino: there are also a couple of funky args for doing parse loops from the command, check the ruby manpage
hemanth has quit [Read error: Connection reset by peer]
<apeiros_>
yeah, mainly -n and -p
jitesh_shetty has joined #ruby
nari has joined #ruby
hemanth has joined #ruby
<bnagy>
ruby -n freaks me out. I mean it's cool, but freaky
<wubino>
thanks
<fragrant>
apeiros_: I can't understand the other way you are saying
Siphonblast has quit [Remote host closed the connection]
Siphonblast has joined #ruby
<apeiros_>
fragrant: https://github.com/apeiros/mygem - you can look at the commits to see what I did. if you now run `ruby -Ilib lib/hola.rb` from within the 'mygem' directory, the script will work
<apeiros_>
fragrant: however, it's not yet where it should be.
<apeiros_>
fragrant: pushed again. it is now `ruby -Ilib bin/hola`
d3c has joined #ruby
<rubynoob>
hello, need help installing gems on ruby help plss
<bnagy>
and surely it should be ; not , ?
<fragrant>
apeiros_: How did you push the commited code there ? You don't have the account/password
geekbri has quit [Remote host closed the connection]
eph3meral has joined #ruby
<eph3meral>
does anyone see anything wrong with this line of code
<eph3meral>
account.items({},{limit:999999999}).each do |item|
<eph3meral>
syntactically speaking anyway
<apeiros_>
fragrant: you'll note that the url is github.com/apeiros, not github.com/fragrant
<apeiros_>
fragrant: I cloned your repository and push to my own now.
<eph3meral>
i'm wondering if this is some minor issue between p125 and p194
<eph3meral>
cuz afaict on github, nothing has modified that particular line in a while
<bnagy>
eph3meral: appears to need a space after :
<apeiros_>
fragrant: btw., don't set the date property in your gemspec.
Targen has joined #ruby
<rubynoob>
someone could tell me if gem installer version have something to do with the version of ruby. I have ruby 1.6.8 and want to install Builder to create XML files and to install Builder I need ruby gems, but when I am trying to install rubygems I am getting a parse error like this: @configuration ||= Gem::ConfigFile.new []
<wubino>
apeiros: thanks, works like a gem!
<rubynoob>
and couldn't find anything on the web. I am new to ruby and I am stuck with this for over one hour...
<fragrant>
apeiros_: What's special about this comment? # encoding: utf-8
<apeiros_>
fragrant: it tells ruby what encoding string literals should use.
<fragrant>
apeiros_: What's wrong setting date in gemspec?
<bnagy>
rubyNoob: you mean 1.8.6 I hope?
<fragrant>
apeiros_: But that is just a comment, isn't it?
<apeiros_>
fragrant: ask drbrain, the maintainer of rubygems. He can answer that question more qualified than I.
<bnagy>
in any case, it's ancient, you probably want to install a proper ruby - what's your OS ?
<apeiros_>
fragrant: it's a magic comment. ruby interprets it. it must be the first comment however.
eurek has joined #ruby
<apeiros_>
fragrant: it also enables you to use unicode-chars in your comments, which is why I find it useful even if I don't have any string literals in my code.
fantazo has joined #ruby
<fragrant>
apeiros_: # encoding: utf-8 , why didn't you add this comment to other files(hola.rb, translator.rb) ?
nazty has quit [Quit: WeeChat 0.3.7]
<rubynoob>
bnagy: it's 1.6.8-8, all applications I am working with are done in this version of ruby and till we migrate to a newer evrsion I have to work with this version
<apeiros_>
fragrant: hu? I did…
<apeiros_>
only one I forgot is the gemspec.
<bnagy>
rubyNoob: ok well try travelling back in time to ask your questions
negaduck has quit [Quit: negaduck]
<bnagy>
I would be amazed if ANYTHING works with that version
<apeiros_>
well, and the Rakefile and the files in the test dir
<rubynoob>
bnagy: I am using Win7 and have a virtual machine running XP
<bnagy>
is this some embedded ruby in some other program?
geekbri has joined #ruby
<apeiros_>
rubyNoob: I feel very sorry for you…
nazty has joined #ruby
<apeiros_>
1.6 is >8y old I think…
<apeiros_>
12y for the first release of 1.6, 9y since 1.8
<apeiros_>
I guess there's people still working on win98 too… :D
<bnagy>
16 bits should be emough for anyone, dammit!
<D4T>
if i have an array like ["1", "a", "b"] how can i join the last two elements to I end up with ["1","ab"] ?
fragrant has quit [Ping timeout: 245 seconds]
<apeiros_>
16bits? are you out of your mind?!?
<rubynoob>
well, I know the version it's antic, but there is nothing I can do about it for the moment. but could I run gems on that version?
<apeiros_>
8!
<apeiros_>
nobody ever needs more!
<bnagy>
rubyNoob: rots of ruck
<apeiros_>
D4T: there's no method to do just that. just write it manually.
<D4T>
apeiros_: ok i'll try :D
<rubynoob>
oh...
<bnagy>
D4T: ary.first(1) << ary.last(2).join
<bnagy>
or a million other ways
<D4T>
bnagy: ty for that
<D4T>
:)
negaduck has joined #ruby
rizzylt has quit [Ping timeout: 256 seconds]
<bnagy>
if you don't know how long it is then ary.first(1) << ary.drop(1).join
negaduck_ has joined #ruby
jeff_sebring has joined #ruby
suborbital has quit [Quit: WeeChat 0.3.9-dev]
pashamur__ has joined #ruby
`brendan has joined #ruby
krusty_ar has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
sepp2k has joined #ruby
Gavilan has left #ruby [#ruby]
negaduck has quit [Ping timeout: 245 seconds]
negaduck_ is now known as negaduck
frishi has quit [Quit: Leaving...]
yugui is now known as yugui_zzz
tomku has quit [Ping timeout: 244 seconds]
twock has quit [Quit: Lost terminal]
simao_ is now known as simao
Targen has quit [Ping timeout: 256 seconds]
eurek has quit [Quit: Computer has gone to sleep.]
<apeiros_>
fragrant: it's your namespace. if you do class Hola::Translator, then Hola must exist already.
<apeiros_>
it doesn't at that point.
<apeiros_>
and yes, reading through that tutorial, I'd say it has some flaws.
<apeiros_>
I'll see whether I can talk to drbrain about it.
<fragrant>
apeiros_: So there is some mistake in that torial doc, right?
RoUS has joined #ruby
<fragrant>
apeiros_: Did drbrain write that?
<apeiros_>
I don't think so, no
<apeiros_>
but he's the main maintainer of rubygems and I trust he's access to that page.
<fragrant>
This, class Hola::Translator , just doesn't make any sense, isn't it?
<apeiros_>
it does. but as said, it requires Hola to exist already.
SimSala has joined #ruby
<apeiros_>
and it doesn't unless you require 'hola/translator' from hola.rb, and in your executable, only require 'hola'. which is brittle and bad code.
<apeiros_>
it should be possible to require a file on its own. a file should require everything it depends upon.
<apeiros_>
pull in the changes from me, update the code as you think it still works, and push that to your repo. I'm quite sure it does not work if you just remove class Hola.
<apeiros_>
ah, well, it does…
<apeiros_>
but your Translator class ends up being in the toplevel namespace
RoUS has quit [Ping timeout: 260 seconds]
<apeiros_>
it only works because within Hola, using Translator can refer to either ::Translator (toplevel) or ::Hola::Translator
<apeiros_>
again, as said, class Hola provides the namespace there.
looopy has joined #ruby
jcromartie has joined #ruby
chson_ has quit [Remote host closed the connection]
<fragrant>
Then if we write something like, class Hola::Translator , that means, Translator is inside Hola class, but how can i require Hola class there at top?
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
<dagobah_>
In my opinion, it doesn't "break" if you juist remove the Object.send(:remove_const, :Foo)
crankycoder has quit [Remote host closed the connection]
<fragrant>
apeiros_: ?^
<shevy>
dagobah_ well that removed the constant
kvirani has quit [Remote host closed the connection]
<shevy>
the behaviour would be wrong if it would not remove it
<apeiros_>
fragrant: I don't know what you're asking for
<apeiros_>
dagobah_: constants are variables, classes are objects
<apeiros_>
all you did was assign a different object to the variable named Foo
wataken44 has quit [Remote host closed the connection]
<apeiros_>
so yes, this is expected behaviour.
<dagobah_>
apeiros_: So just redefining class Foo is not correct?
rorrego has joined #ruby
<shevy>
I dont think the two are the same. the constant was removed in between
<apeiros_>
dagobah_: by redefine, do you mean reopen or replace?
<apeiros_>
you won't get a `const redefined` warning with a plain `class Foo; end; class Foo; end`
<apeiros_>
and that won't create a new class instance either.
<dagobah_>
apeiros_: Yes, what I'm really asking is that the :remove_const doesn't get called magically by ruby behind the scenes does it?
wataken44 has joined #ruby
<apeiros_>
dagobah_: by what?
<apeiros_>
by what should/would it get called?
<dagobah_>
When a new class of the same name is made, I'm not too sure.
<fragrant>
apeiros_: Do/did you run the code in this way? ruby -Ilib bin/hola
<apeiros_>
fragrant: I'd run it that way. the last version works with just `ruby bin/hola` too.
a_a_g1 has quit [Quit: Leaving.]
ringotwo has joined #ruby
<dagobah_>
apeiros_: Oh so reloading a class is different to re-opening a class?
nateberkopec has joined #ruby
<apeiros_>
dagobah_: what do you understand under 'reloading a class'?
<shevy>
ruby classes are always open
explody has quit [Remote host closed the connection]
dv310p3r has joined #ruby
vlad_starkov has joined #ruby
nebiros has joined #ruby
<dagobah_>
I think I lack basic understanding on this one.
<apeiros_>
fragrant: again, if you remove `class Hola` from there, you create a class named Translator, without removing it, it is named Hola::Translator. You do *not* want to define a top-level class Translator. What if I write a gem Olah and have an Olah::Translator, but I don't namespace it either? Then two gems define a class Translator
<apeiros_>
this is why you namespace. namespacing helps to avoid naming conflicts.
vlad_starkov has quit [Remote host closed the connection]
<apeiros_>
all classes in your gem should be put under one common namespace. Hola in your case.
Guest63318 is now known as nebiros
<shevy>
you can use different files dagobah_ like ... file1.rb class Foo; def hi;puts 'hi';end;end and file2.rb: class Foo; def yo;puts 'yo';end;end, and they both will have extended class Foo
<apeiros_>
because Hola::Translator and Olah::Translator can coexist.
nebiros has quit [Changing host]
nebiros has joined #ruby
vlad_starkov has joined #ruby
<apeiros_>
but hola and olah could not coexist if they both define ::Translator. one would redefine the other's Translator class -> crash.
<shevy>
hola que tal, mi perro es un gato
<apeiros_>
dagobah_: in this: x = "foo"; p x.object_id; x = "foo"; p x.object_id
<apeiros_>
dagobah_: do you understand why you get two different object ids?
eurek has quit [Quit: Computer has gone to sleep.]
<fragrant>
apeiros_: It's getting confusing to me, can you please commit your code with namespace or what you are trying to say, i edited my code
RoUS has joined #ruby
<apeiros_>
fragrant: my code *already* uses namespaces
<apeiros_>
that's why `class Hola` is there
rippa has quit [Quit: derp herp]
<fragrant>
That is a class Hola not namespace Hola
<apeiros_>
the class Hola *is* the namespace
<apeiros_>
it *is* the class Hola in Hola::Translator too
<shevy>
haha
<shevy>
fragrant still refuses to accept other people's statement :)
<apeiros_>
fragrant: but if you write `class Hola::Translator` instead of `class Hola; class Translator`, then Hola *must exist* at that point. and it does not. hence you get an error.
macmartine has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
<apeiros_>
`class Foo; end` creates the class Foo and the constant if they don't exist already. but `class Foo::Bar; end` only creates Foo::Bar (the Bar part), it does *not* create Foo. it doesn't because Foo could be either a module or a class.
nateberkopec has joined #ruby
spinst3r has joined #ruby
<workmad3>
apeiros_: having fun? :)
<apeiros_>
workmad3: :-/
vlad_starkov has quit [Remote host closed the connection]
<fragrant>
apeiros_: Ok, then please use this format, class Hola::Translator and make the Hola exist or do what you need to do to write in this format class Hola::Translator
<apeiros_>
oh my
<fragrant>
apeiros_: Please change the code
<apeiros_>
fragrant: I made Hola exist *by not using* class Hola::Translator. it does not work. period.
<shevy>
apeiros_: Please change the code
<spinst3r>
hi there
<shevy>
apeiros_: Please use this format
<workmad3>
apeiros_: make my code work!!!!
spinst3r has quit [Client Quit]
<fragrant>
apeiros_: Ok
<shevy>
apeiros_: Please father my children
jeff_sebring has quit [Read error: Connection reset by peer]
* apeiros_
didn't know shevy was female…
<shevy>
fragrant why don't you give up with class Hola::Translator, it really is awful
krz has quit [Quit: krz]
<fragrant>
apeiros_: So that means, you can't write/use something like this=> "class Hola::Translator" in translator.rb, right?
<shevy>
imagine if everyone would do this
jeff_sebring has joined #ruby
<shevy>
no longer would we see:
<shevy>
class Cat
<shevy>
we would suddenly see
<apeiros_>
fragrant: for the last time: you can. but it needs class Hola to exist beforehand.
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
<apeiros_>
it is why the tutorials first example worked. because they had Hola and Hola::Translator in the same file. and Hola::Translator was defined after Hola.
<shevy>
D4T, "WhatDoYouWant".gsub(/([A-Z]+)([A-Z])/,'\1_\2').gsub(/([a-z])([A-Z])/,'\1 \2').split(' ') # => ["What", "Do", "You", "Want"] <--- you wont need the gsub I suppose, but I am too lazy to make this shorter
Asher has quit [Quit: Leaving.]
pashamur__ has joined #ruby
<fragrant>
apeiros_: One is empty class and other is not empty
<shevy>
hehehe
<apeiros_>
fragrant: yes. they are the same
<shevy>
this is fun :)
<bnagy>
luckily there are only two of them
uris has joined #ruby
<bnagy>
otherwise you would have to say they are the same in every permutation
justsee has joined #ruby
<shevy>
yeah... if there would be three classes, it would be a nightmare for fragrant
<apeiros_>
fragrant: again, the only problem with the line `class Hola::Translator` is that it requires Hola to exist. it means that somewhere before that line, the line `class Hola` must have been run
justsee has quit [Changing host]
justsee has joined #ruby
<shevy>
we should really tell drbrain that examples like class Foo::Bla confuse people more than they help
* shevy
waits for fragrant ...
pashamur__ has quit [Read error: Connection reset by peer]
RoUS has joined #ruby
* shevy
takes some of bnagy's popcorn.
pashamur__ has joined #ruby
<apeiros_>
so the solutions are: a) don't use it, use `class Hola; class Translator` instead, which too defines Hola::Translator, b) require 'hola' on top of the file 'hola/translator' and ensure that hola.rb requires 'hola/translator' *after* the line with `class Hola`
IrishGringo has joined #ruby
<apeiros_>
or c) stick in a `class Hola; end` before `class Hola::Translator`
carlyle has joined #ruby
<apeiros_>
I think b) is horrid and c) is pointless. hence my choice is clearly a).
<apeiros_>
note that all 3 solutions create the very same class Hola::Translator
<apeiros_>
you do not load the code that contains the module Hola. reread what I wrote.
<apeiros_>
15:56 apeiros_: so you first require 'hola' (which loads the code in the file), which makes the module Hola available, and *then* you can include Hola.
<apeiros_>
include does NOT load code.
jeff_sebring has quit [Remote host closed the connection]
<shevy>
bnagy, no it is sad. he is stuck in a loop
jeff_sebring has joined #ruby
<apeiros_>
fragrant: yes, just as you don't need to require Array, Hash, String and all other stuff that is in core. Math part of ruby-core, meaning you never need to require it.
<Hanmac>
fragrant: Math is not required because math is in the core
<apeiros_>
*Math is part of…
<apeiros_>
anything that is not in core must be loaded either by require, load or any kind of eval.
<fragrant>
Which core file of ruby contains that line requre 'math' ?
<apeiros_>
the executable itself.
carloslopes has joined #ruby
bglusman has joined #ruby
<apeiros_>
i.e., you have to look at rubys C source.
macmartine has quit [Quit: macmartine]
<Hanmac>
fragrant: there is no require math
<Hanmac>
apeiros_ if you teach him eval, you must live with the consequences
<apeiros_>
Hanmac: require is eval
<fragrant>
apeiros_: I have looked C code, but i didn't understand that code flow at all., did you understand that C code?
<fragrant>
apeiros_: btw, why is it apeiros_ instead of apeiros? where is apeiros ?
<apeiros_>
fragrant: well enough so far. but C ain't my language and it's not relevant to this problem.
<apeiros_>
apeiros is hiding in shame for still not setting up his irc proxy.
<fragrant>
make the apeiros up and apeiros_ down
PaciFisT has joined #ruby
BSaboia has joined #ruby
vlad_starkov has joined #ruby
hemanth2 has joined #ruby
Progster has quit [Ping timeout: 240 seconds]
<hemanth2>
URI.extract("http://㐇匂.sl.pt")
nelson- has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<hemanth2>
=> ["http://"]
<hemanth2>
what?
looopy has quit [Remote host closed the connection]
<hemanth2>
open('http://☃.net').read() #bomb
<hemanth2>
waht?
<fragrant>
ruby module, class, namespace, include, module are really complex and ambiguous and confusing concept
<fragrant>
include, require *
<apeiros_>
require is about loading code
<apeiros_>
include is about doing something with loaded code
<apeiros_>
and namespaces are no difficult concept. you use it in your everyday life all the time
jeff_sebring has quit [Remote host closed the connection]
<apeiros_>
"Harry did this" - "Which Harry?" - "Harry Potter" - there, namespacing in real life.
jeff_sebring has joined #ruby
<fragrant>
But you ruby people/community are good and supporting, i have learnt lot of basic confusing things today
xaq has joined #ruby
<fragrant>
apeiros_: Thank you for all your replies/answers/support,
SimSala has quit [Ping timeout: 240 seconds]
<fragrant>
It looks ruby people are better than php, but the difference is more people use php than ruby
<fragrant>
Many people are not even familier with ruby
* hemanth2
no one to answer me?
mvangala_home has joined #ruby
xaq has quit [Read error: Connection reset by peer]
xaq has joined #ruby
<fragrant>
They use php because it's easy to write website using php and easy to deploy that ruby, if you go for ruby to make website then you must go for some framework, but that is not the case for php, that's why more people use php
BSaboia__ has joined #ruby
<fragrant>
hemanth2: What's your problem?
qos has joined #ruby
Gm4n has quit [Ping timeout: 265 seconds]
<hemanth2>
fragrant: well, scroll up
<apeiros_>
hemanth2: URI doesn't implement unicode domains yet. and yes, that's a shame.
<fragrant>
Which ruby book do/would you recommend/suggest?
<hemanth2>
apeiros_: bad; :(
<apeiros_>
yes
vlad_starkov has quit [Remote host closed the connection]
* Hanmac
says that you does not need an framework when you want a website ... you could write a website in C
<JonnieCache>
fragrant: "the ruby programming language"
<apeiros_>
hemanth2: I'm looking whether there's something to convert that url to puny-code. that should work.
Gm4n has joined #ruby
<apeiros_>
Hanmac: nonsense. you really should write it in ASM
<apeiros_>
workmad3: there already are websites in C
<apeiros_>
workmad3: what do you think where CGI started?
<workmad3>
apeiros_: perl? </troll>
pzol_ has joined #ruby
<apeiros_>
nope. perl came late to the party.
<workmad3>
:)
jeff_sebring has joined #ruby
<D4T>
workmad3: actually it doesn't help me but yes i was trying to :)
<workmad3>
ok, I meant 'start writing websites in C again' then :)
pzol_ is now known as pzol
<apeiros_>
^^
<apeiros_>
I tried
<apeiros_>
sadly my C sucks
<workmad3>
heh
<apeiros_>
I wanted to write something like a sqlite-to-web server :D
<workmad3>
O.o
<apeiros_>
i.e., it'd take a select and return json
<JonnieCache>
like couch
joshman_ has joined #ruby
<JonnieCache>
but with sql
jeff_sebring has quit [Remote host closed the connection]
<apeiros_>
yes
fragrant has quit [Ping timeout: 245 seconds]
<JonnieCache>
you'll never attract the trendy kids though if you sour it with sql
<apeiros_>
it was mostly for my curiosity. I wanted to know how fast that'd go. but I never finished it. stupid manual memory management :D
<workmad3>
gives me flashbacks to SPARQL
<JonnieCache>
json yes, sql = yo daddys ddl
BSaboia__ has quit [Ping timeout: 265 seconds]
asobrasil has joined #ruby
<apeiros_>
well, sql does have plenty of suck.
jeff_sebring has joined #ruby
<JonnieCache>
its the task that its aiming to fulfil that sucks
<JonnieCache>
sql is actually pretty optimal
<JonnieCache>
data is just hard
<workmad3>
SPARQL endpoints on the web are fun... it's like an open invitation to DoS someone's server :)
<JonnieCache>
(im my experience. im no sql guru)
<apeiros_>
data is hard. yes. I'd argue on SQL being optimal.
<apeiros_>
but I guess it's more because I very much dislike declarative style programming.
<workmad3>
SQL isn't great... but it is well established and pretty widely known
<JonnieCache>
every time i thought i found some blatant flaw with sql at uni, the professor explained how thats actually necessary because of some arcane shit from the 70s
<JonnieCache>
theres such a weight of research behind every design choice in a relational db
<workmad3>
JonnieCache: ah, going into the relational calculus roots of SQL? :)
<apeiros_>
JonnieCache: well, as for the language, the flaw in it is mostly unrelated to the language itself but to implementors not being able to standardize. that'd be one point of suck.
ringotwo has quit [Remote host closed the connection]
<JonnieCache>
indeed. that sucks.
* apeiros_
remembers adding a RAND function to sqlite to reproduce a problem somebody had, just to later learn that it's RANDOM in sqlite…
macmartine has joined #ruby
heftig has quit [Quit: leaving]
vlad_starkov has quit [Remote host closed the connection]
chson has joined #ruby
Asher has joined #ruby
<corenumb>
is this a wrong way to set background color vbox = Qt::VBoxLayout.new self
joast has quit [Read error: Connection reset by peer]
bbttxu has quit [Quit: bbttxu]
BSaboia__ has joined #ruby
nullsign has joined #ruby
bwwrd has joined #ruby
<apeiros_>
am I a major fun killer if I kick kvirani for that statement?
My_Hearing is now known as Mon_Ouie
<bwwrd>
hey folks
<bwwrd>
i'm just trying to figure out how gems work
<kvirani>
lol
<nullsign>
newbie to ruby... wanting to know how i would open a file, and on a line by line basis assign each space delimited string and or int to a variable, so i can parse the ouput with a simple print $var1 $var2, etc.
<shevy>
bwwrd does this project not have documentation explaining how to use it?
<bwwrd>
so how do my rails models have access to it? is rails including gem modules automatically
<bwwrd>
sorry that is actually a railsy question
<shevy>
:D
<apeiros_>
bwwrd: note that the code (while not as horrible as other acts_as_* gems that I've seen) is not role model code (the def self.included(base) part gives that away)
<shevy>
rails is doing lots of things behind the scenes
<rachet>
Is there a way to check it something is already in a starling queue, before adding it?
BSaboia__ has quit [Ping timeout: 244 seconds]
<kvirani>
that will install (aka bundle) the gem into your your app, giving it access to the gem...
jeff_sebring has quit [Remote host closed the connection]
<shevy>
also you should be able to do so directly: "Alternatively, we can set the background-color property directly on the QLineEdit, omitting the selector: nameEdit->setStyleSheet("background-color: yellow");"
<nullsign>
workmad: your ruby arrays, show them to me
<apeiros_>
bwwrd: wycats wrote a blog entry where he transforms idiomatically bad code to some better following ruby idioms.
<shevy>
workmad3: show me your pants
jeff_sebring has joined #ruby
tomask has quit [Quit: Quit]
<nullsign>
i need some sort of looping syntax for each line.
bidigo has left #ruby ["Leaving"]
<bwwrd>
apeiros_ sounds interesting
<shevy>
nullsign what? array.each
<nullsign>
and then for each word on the line (space delimited) i need to assign to a var.
pashamur__ has quit [Read error: Connection reset by peer]
savage- has joined #ruby
pashamur__ has joined #ruby
eurek has joined #ruby
<nilg>
hi, when using Trollop with an option taking multiple tokens (say of type :strings) how do I tell the program I still want some mandatory arguments?
<nilg>
I mean, consider the following command
<corenumb>
shevy, have you used QT in ruby ?
<nilg>
my_prog.rb -o opt1 opt2 mandatory_arg
<nilg>
how to make mandatory_arg not part of the option -o
<shevy>
corenumb only briefly. i settled for ruby-gtk after testing qt
<jlogsdon>
nilg: it wouldn;t be by default. only opt1 would be part of -o. opt2 and mandator_arg would be seperate arguments.
pashamur__ has quit [Client Quit]
aces1up has joined #ruby
<jlogsdon>
you must use quotes to include spaces in an argument/option
<bnagy>
nilg: if -o is the only option then maybe try using :string :multi
pashamur__ has joined #ruby
<corenumb>
but I dont find ruby-gtk graphics quality than qt
<rachet>
Is there a way to check it something is already in a starling queue, before adding it?
<aces1up>
what is an algo / design pattern that determines execution via previous events?
<shevy>
corenumb that may be but I got tired of the awful documentation of ruby qt
<shevy>
and when I mean awful, it means: non existing
vlad_starkov has joined #ruby
<corenumb>
well yea thats true tho :/
dhruvasagar has quit [Ping timeout: 248 seconds]
<nilg>
jlogsdon, bnagy : I'm using :strings (with a s at the end) and it really handles several tokens... but now I don't know how to tell Trollop that I need a mandatory argument...
<shevy>
for some reason I dont understand, most ruby projects really have crap documentation
<bnagy>
nilg: yeah I heard you
<offby1>
s/ruby//
ananthakumaran has joined #ruby
<jlogsdon>
shevy: s/ruby/opensource
<shevy>
:D
<jlogsdon>
its a side-effect of "not getting paid to document". thankfully, ruby code can be pretty good at self-documenting if you take the time to write it well
<jlogsdon>
nilg: if you can't see a way in the code or docs to do it, i'd try removing the mandator argument from ARGV before using Trollop to parse it all
oooPaul has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<bnagy>
nilg: afaik the parser will just eat all your tokens the way you have it. You can pop the last one off the end, you can switch to using :string with multi -o op1 -o op2 mandatory
<bnagy>
you can have another arg after the -o
<nilg>
oh I see, thanks!
<nullsign>
making the leap from years of shell, some perl/python.. to ruby
<jlogsdon>
(i think bnagy's suggestion might be better. it's more unixy to use the flag as many times as you need it)
<nullsign>
trying to do the simplest things with ruby seems daunting at the moment
billiamii has joined #ruby
<jlogsdon>
such as what, nullsign?
<jlogsdon>
puts "Hello World!" is pretty simple xD
<nullsign>
jlogs: heh true
<offby1>
jlogsdon: at the risk of being greatly off-topic ... most opensource hackers aren't paid to code, either; but they do that well enough. And commercial projects often have awful docs too
<oooPaul>
x = 42 is pretty straightforward. ;)
supergiantrobot_ has joined #ruby
<nullsign>
jlogs; but simple things like array = `command` etc
<nullsign>
according to ruby docs, it should work the same.
ipoval has joined #ruby
<jlogsdon>
offby1: true, but OSS developers love to code, not document :)
<jlogsdon>
nullsign: if you want an array it would be `command`.split("\n")
<bnagy>
s/OSS//
<jlogsdon>
otherwise its just a raw string of the STDOUT
<jlogsdon>
bnagy: touche ;)
<nullsign>
for some reason, even a raw string is erroring on me.
dekroning has quit [Ping timeout: 240 seconds]
<jlogsdon>
what error?
<oooPaul>
Man, I've been doing Ruby for like 5 years now and never realized/noticed you could run a shell command with `` alone. :P
<jlogsdon>
haha
<nullsign>
...
<nullsign>
oooPaul: maybe there is hope for me then
<jlogsdon>
Well, `` is pretty limited. It's great if you don't care about STDERR or any signal control
<nullsign>
jlogsdon: 15 years of bash here.. with some php/perl/python at times.
<nullsign>
jlogsdon: i'm one of 'those' people.
<jlogsdon>
damn man
gregorg has joined #ruby
<jlogsdon>
i'm 10 years of PHP with bash sprinkled in :P
hamzzzz has joined #ruby
<offby1>
I'm 37 flavors of pure delight
pzol has joined #ruby
<workmad3>
shevy: right... and the same thing happens with large bash programs... lots of smaller scripts working together ;)
<jlogsdon>
small, single purpse scripts. the unix way!
negaduck has quit [Quit: negaduck]
<jlogsdon>
love it
abionic has quit [Ping timeout: 244 seconds]
<shevy>
bash shells out to use other programs, like awk, sed, grep, via `` repeatedly
<shevy>
so you need to understand these programs too
pashamur__ has quit [Client Quit]
<nullsign>
im determined to learn ruby this year.. so i can play with the cool kids.
<workmad3>
shevy: nothing exists in a vacuum
<workmad3>
shevy: the same is true of ruby
pashamur__ has joined #ruby
<workmad3>
shevy: just in ruby, rather than shelling out to other programs, you call library methods :)
<shevy>
workmad3 I dont need awk or sed in ruby
<jlogsdon>
shevy: you need to understand any languages StdLib to use it. It's the same idea
<shevy>
and I dont have to understand conventions from other programs
<jlogsdon>
all of the defacto unix programs have hte same conventions
<apeiros_>
nullsign: the cool kids moved on to Scala, Erlang and whatever
Ammar01 has quit [Quit: Leaving]
<workmad3>
shevy: I will agree that it probably takes more effort to make an elegant bash script, because it's easier to munge it all together and create an unmaintainable mess of pipes, $s, arcane syntax and environment variables being used as globals and messing things up :)
<shevy>
fragrant, not if old ones pay to keep and retain old things ;)
lkba has joined #ruby
<shevy>
there is still COBOL in use, according to myths
<Mon_Ouie>
AFAIK people are still working on Ruby 2.0 separately from mruby, right?
<jlogsdon>
AFAIK
<shevy>
I've never met someone who can write in COBOL though
<jlogsdon>
shevy: mainframes!
<jlogsdon>
they are all old neckbeards now
<shevy>
they must be 70 years or 80 years old now
<jlogsdon>
living in their dungeons
<shevy>
lol jlogsdon
<jlogsdon>
and making 8 digits xD
albemuth has joined #ruby
<jlogsdon>
(not really)
<shevy>
yeah but
<shevy>
what use is that when they are old
<jlogsdon>
replace limbs/organs with nanotech
<jlogsdon>
live forever~
<shevy>
young and rich. not old and rich. (or old and poor haha)
robert_ has quit [Ping timeout: 244 seconds]
zommi has quit [Read error: Connection reset by peer]
kenperkins has quit [Quit: Computer has gone to sleep.]
<shevy>
jlogsdon bah, a technology for only 1%, the remaining ones can't afford it
<jlogsdon>
how about rich from young to old? :p
<jlogsdon>
haha shevy
xkx has quit [Ping timeout: 244 seconds]
<shevy>
I dunno
<shevy>
being old sucks
<fragrant>
As mattz is gone from cruby, so other people will be gone too from cruby as the first creator understands the core source better than anyone else
<fragrant>
It's not easy to understand the source of something like ruby
<shevy>
fragrant he is not gone
<fragrant>
It's huge scale code
<shevy>
fragrant he works on mruby but he does design decisions for cruby still
koskoz has joined #ruby
<shevy>
look at perl 6, this is the community takeover from larry
<shevy>
and it fails
<fragrant>
It's not easy to understand source code of ruby so it's not easy to maintain/contribute it
axl_ has quit [Ping timeout: 244 seconds]
axl__ is now known as axl_
<shevy>
why
<shevy>
you just need to know C
<shevy>
and understand that lexer thingy
<fragrant>
lexer, parser, interpreter, not easy to understand those huge amount of code
Vendethiel has joined #ruby
BeLucid has joined #ruby
burgestrand has quit [Quit: Leaving.]
<jlogsdon>
no. but ruby has a decent core dev team, and like shevy said matz hasn't fully left. he's around as a consultant and architect for it still
baroquebobcat has joined #ruby
<shevy>
fragrant can you write in C
<fragrant>
shevy: Of course i can
rippa has quit [Ping timeout: 245 seconds]
<fragrant>
shevy: Better than ruby
jeff_sebring has quit [Remote host closed the connection]
DrForr has quit [Quit: leaving]
andrewhl has quit [Remote host closed the connection]
<jlogsdon>
fragrant: be glad this isn't PHP we're talking about. The C code for that is... pretty amazing
jeff_sebring has joined #ruby
<fragrant>
shevy: Why did perl6 fail?
<Mon_Ouie>
YARV was written by ko1 initially
nyuszika7h has quit [Quit: WeeChat 0.3.9-dev]
thone has quit [Ping timeout: 244 seconds]
<jlogsdon>
oh man perl 6
<jlogsdon>
a plethora of reasons?
pdtpatrick has quit [Quit: pdtpatrick]
interopcop has left #ruby [#ruby]
<GeekOnCoffee>
perl6 hasn't failed yet
Targen has joined #ruby
<jlogsdon>
its just taken over a decade
<fragrant>
jlogsdon: perl 6 took over a decade?
hoelzro|away is now known as hoelzro
qwerxy has quit [Ping timeout: 244 seconds]
thone has joined #ruby
<jlogsdon>
i don't pay attention to perl, honestly. i thought p6 still wasn't out
<jlogsdon>
The design process for Perl 6 began in 2000.
<jlogsdon>
still not out
<jlogsdon>
12 years
<nullsign>
this look right? puts "#{line}".split(",")
<zaargy>
the perl 6 interpreter is pretty advnaced
<zaargy>
watch this space i reckon :P
<jlogsdon>
No
<jlogsdon>
nullsign: wait, you want to convert spaces to commas?
<nullsign>
yes.
rippa has joined #ruby
qwerxy has joined #ruby
nyuszika7h has joined #ruby
<jlogsdon>
okay, that would be "puts line.gsub(/ /, ',')"
nyuszika7h has quit [Client Quit]
<jlogsdon>
you don't need "#{line}" if you are just using the variable
<jlogsdon>
only if you want text _around_ the variable.
<jlogsdon>
and you could do `puts "Prefix #{line.gsub(/ /, ',')}"`
<jlogsdon>
#{} runs whatever (well, mostly whatever) ruby code is inside it
nyuszika7h has joined #ruby
alex65 has joined #ruby
<jlogsdon>
(inside a string, that is)
Asher has quit [Quit: Leaving.]
<nullsign>
i dont need text around it, but i do need to put another variable in front of it
<Hanmac>
jlogsdon you could use ' ' instat of / /
<jlogsdon>
if you need another variable in front then `puts #{var1} #{line.gsub(...)}`
<jlogsdon>
Hanmac: sure, but the speed difference would be negligable aand I wanted to show he could use regex's :)
<jlogsdon>
WORDS HOW DO YOU SPELL THEM
gilead has quit [Quit: Leaving]
axl_ has quit [Read error: Connection reset by peer]
<jlogsdon>
negligible*
Aline has joined #ruby
alex65 has left #ruby ["Hai"]
axl_ has joined #ruby
crankycoder has joined #ruby
CrawlBot has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
<nullsign>
gsub rocks
<jlogsdon>
c.
<jlogsdon>
note that _most_ String methods can take a regex
<nullsign>
jlogsdon: hehe, so far everything is great, except when i put a var in front of it, it puts the var but then puts the line on a newline. so it looks like this;
<nullsign>
newvar
<nullsign>
line
<jlogsdon>
let me see your code
<jlogsdon>
(i missed quotes in my example, im awful)
<Aline>
But not support any hardware wrong!!!!!!!!!!!!
bier has quit [Ping timeout: 244 seconds]
<shevy>
CrawlBot what are you doing
<Aline>
Kromo: 15 a grub/insgtall its like it sucks that.
<deryl>
live in hell maybe
<Aline>
Okay escott, thanks.
strnx has quit [Excess Flood]
<shevy>
i wonder how the database of the bot is filled up with
<Aline>
What's the last 3 managed to end.
<otters>
are there not any ops present
<Aline>
What's the same program can anyone here.
<jlogsdon>
shevy: seems like this channel
<Aline>
I think it in the fuck did you want to reassign bathrooms to get "No SUCH file.
<jlogsdon>
it was silent for a while then got switched on
<Aline>
I'm trying to use stored configs with ruby 1.
<jlogsdon>
and i saw text that was in recent conversations
<Aline>
Now nature calls, off to down load -- active_record/connection_adapters/mysql_adapter) -- active_record/connection_adapters/mysql_adapter) -- active_record/connection_adapters/mysql_adapter) -- active_record/connection_adapters/mysql_adapter) -- active_record/connection_adapters/mysql_adapter) -- but ignore.
<shevy>
argh
<Aline>
Well, considering paypa's getting a leader in /usr/share/applications.
<davidcelis>
... wtf
<Aline>
I WAS written in and i won 2000$ worth of the check for debian/ubuntu.
robozahn has joined #ruby
<workmad3>
ah, the joy of technical engrish
<Aline>
Things.
<davidcelis>
Yes, indeed. Things.
<Aline>
Please consult their websites for the *only* department tackling the reception, and WAS reading up all doc i don't like super crack.
<shevy>
lol
<Aline>
Any solutions for the entire patter is not really be a var in the encryption WAS escape.
hemanth3 has joined #ruby
tvw has quit [Remote host closed the connection]
b3nt_pin has joined #ruby
<shevy>
Aline: test
<Aline>
Can always add it WAS 0% productive.
<workmad3>
Aline: go away, or I'll replace you with a simple shell script... assuming you aren't already one
<Aline>
Can always add Pee Cups for women (see !
<shevy>
Aline: test
<Aline>
Escott: in a technical question i change sound theme is only really sure.
<shevy>
Aline: test
<Aline>
This says in the toilet space i facepalmed after the right-click menu?
<shevy>
I asked the #freenode guys
<Aline>
I will require you leave a usb serial guru ?
<Aline>
Shevy: that's apeiros_ spoke with their websites for list.
<shevy>
otters <kunwon1> shevy: kick or ban
<Aline>
As a regex.
<nullsign>
ignore is a wonderful command
<Aline>
Ca is not really be questioning why we just have more.
<fira>
looks like a poorly configured chatterbot
<Aline>
Exploiter: search through for instance, i have more.
<shevy>
<mrmist> hmm, will look into it but we don't haev access on #ruby
<Aline>
What's up as these retards spell it.
Guest25164 is now known as graft
<workmad3>
indeed, lets ignore the spambot :)
<Aline>
At this in #gnewsense), Linux mint.
<fira>
i recall eggdrop's MegaHAL implementation does this by default... the silly thing answers each and every message
<Aline>
Maybe #rubay.
<deryl>
fire or intentionally set wrog for maximum annoyance
<Aline>
Rrd in #linuxmce), CrunchBang (support in /boot thing?
SimSala has quit [Ping timeout: 245 seconds]
<Yarou>
it would be funnier if it weren't a bot
<Aline>
An athiest as women (see my ubuntu.
* apeiros_
reads backlog
<Aline>
My projects, in gnome classic and blockade against Ubuntu?
<Yarou>
rather, a person manually copy-pasting spam
<Aline>
I change sound theme (newly placed in #linuxmce), CrunchBang (support in usr/something/sound) in the whitequark irc logger.
strnx has joined #ruby
<otters>
apeiros_, kill it
<Aline>
I do you want a petition at the basic ubuntu 12.
KindOne has joined #ruby
<fira>
and seeing how nonsense this is, this could very well be megahal
<Aline>
For a bot is still doing wrong?
<fira>
LOL
<Aline>
Bitch, make this point).
<shevy>
Aline: test
<Aline>
Org/2011/02/two-puppet-tricks-combining-arrays-and-local-tests/ uses templates, but the end.
<shevy>
ohhh
<Aline>
So you tell me see appending to be faster than in minors or 'gdebi foo.
<shevy>
apeiros_ is here!
<Aline>
At a company i could do a password.
Aline was kicked from #ruby by apeiros_ [Aline]
MasterIdler has joined #ruby
<shevy>
wheeeee!!!!
ozy_work has joined #ruby
<workmad3>
yay for the kickban!! :D
<jlogsdon>
apeiros_++!
<otters>
not a ban
<workmad3>
aww :(
<workmad3>
kickban!!!
<shevy>
well kick helps too
<tomb_>
so mean workmad3
<shevy>
apeiros : bots = 1 : 0
<fira>
if it's a bot it'll probably rejoin later
<shevy>
bots vs freenode: still 1 : 0
<mrmist>
oh good, saves me doing it.
<shevy>
:-)
<ozy_work>
I am trying to get puppet to work with stored configs, and it keeps telling me I need to install the gem activerecord-mysql-adapter -- but when I run the command gem install activerecord-mysql-adapter, it tells me there is no such gem -- what am I missing?
<shevy>
at least we can focus on on-topic chatter about ruby again
<nullsign>
are gems like perl modules?
<shevy>
nullsign: somewhat, yeah
<nullsign>
woohoo, i guessed right, somewhat.
Alxander-- has joined #ruby
<jlogsdon>
nullsign: gems are like CPAN
<jlogsdon>
(so... yes)
<graft>
CPAN is just a repository for modules
<jlogsdon>
actually, I guess rubygems.org : cpan.org
<jlogsdon>
yeah
<graft>
yeah
<jlogsdon>
i fixed myself :P
Alxander-- has quit [Client Quit]
<shevy>
hmm any feature that CPAN has that gem/rubygems does not offer?
<graft>
should be: you monkey-patched yourself
<workmad3>
rubygems is a package manager, rubygems.org is a repository, a gem is a format for packaging a library
<shevy>
one I heard was that there are no reverse-dependencies lookup for gems yet
<workmad3>
I'd hesitate against calling them a module in ruby, because 'module' is already used in the language
savage- has joined #ruby
<graft>
well, module is what they're called in perl
<lwhalen>
or, is there a different way to specify the port?
fira has left #ruby ["cya round"]
mayankkohaley has quit [Ping timeout: 246 seconds]
<workmad3>
lwhalen: could be that the logger hasn't pulled in openssl, so can't open an ssl connection, could be the library itself can't do SSL, could be that the compiled openssl version doesn't have the certificates you need to establish identity...
Yarou has quit [Quit: Leaving]
<workmad3>
lwhalen: or it could be host and port should be separated... don't know :)
<lwhalen>
well, I tried the latter, to no avail :-)
williamcotton has joined #ruby
looopy has joined #ruby
<workmad3>
lwhalen: there's no extra error status with the 'can't connect'?
<oz>
"can't connect, dots not found"
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
<workmad3>
oz: awesome, I need to find a place to use that error message :D
mvangala_home has quit [Remote host closed the connection]
bricker88 has joined #ruby
<shevy>
lol
pashamur__ has quit [Read error: Connection reset by peer]
<shevy>
"can't connect, out of beer"
pashamur__ has joined #ruby
hadees has joined #ruby
<workmad3>
bzzzt, bzzt, out of cheese error, please restart universe
Araxia_ has joined #ruby
nateberkopec has quit [Quit: Leaving...]
mdw has quit [Remote host closed the connection]
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
graspee has joined #ruby
Foxandxss has joined #ruby
anykey_ has joined #ruby
pashamur__ has quit [Client Quit]
anykey_ is now known as any-key
looopy has quit [Remote host closed the connection]
pashamur__ has joined #ruby
bigoldrock has joined #ruby
Gm4n has joined #ruby
spersaud has joined #ruby
pashamur__ has quit [Read error: Connection reset by peer]
spersaud has left #ruby [#ruby]
polysics has quit [Remote host closed the connection]
pashamur__ has joined #ruby
<Hanmac>
workmad3: *yet another Pretchett fan detected*
<workmad3>
:)
looopy has joined #ruby
<workmad3>
Hanmac: there's a lot of us :P
SeySayux_ has quit [Ping timeout: 244 seconds]
jeff_sebring has quit [Remote host closed the connection]
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
dem0x7 has joined #ruby
apok has joined #ruby
jeff_sebring has joined #ruby
bluOxigen has quit [Ping timeout: 244 seconds]
SeySayux has joined #ruby
koskoz has joined #ruby
binaryplease has joined #ruby
mneorr1 is now known as mneorr
fserb has joined #ruby
binaryplease has quit [Client Quit]
jeff_sebring has quit [Remote host closed the connection]
eywu has joined #ruby
jeff_sebring has joined #ruby
td123 has joined #ruby
Helius has joined #ruby
robozahn_ has joined #ruby
adamkittelson has joined #ruby
khakimov has joined #ruby
robozahn has quit [Ping timeout: 252 seconds]
Asher has quit [Quit: Leaving.]
tewecske has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
Aaton_off is now known as Aaton
FreeAssange has joined #ruby
rorrego has quit [Quit: Ex-Chat]
timonv has quit [Remote host closed the connection]
AxonetBE has quit [Read error: Connection reset by peer]
AxonetBE has joined #ruby
Vainoharhainen has quit [Quit: Leaving...]
<workmad3>
lwhalen: hmm, that looks like your client isn't speaking SSL
<workmad3>
lwhalen: causing the 'broken pipe' error (because the IO stream has gotten borked)
Agis__ has joined #ruby
<Agis__>
Any good open-source projects so I could start reading ruby code?
krz has joined #ruby
<lwhalen>
d'oh
mengu has quit [Quit: Konversation terminated!]
<lwhalen>
how can I check to see if it's just a matter of adding a library, vs. 'massive rewrites of stuff'?
robozahn has joined #ruby
Swiss38974 has joined #ruby
<workmad3>
lwhalen: documentation for the... whatever it is, to see if it says anything about creating an SSL connection to a server?
<lwhalen>
this is the Whitequark IRC logger
ilyam has joined #ruby
<workmad3>
yeah, I've never used it :P
<lwhalen>
there's a distinct lack of documentation :-)
ilyam has quit [Remote host closed the connection]
<workmad3>
:)
<workmad3>
read the code?
* lwhalen
headdesks
<workmad3>
or grep the code for 'ssl'? ;)
<Agis__>
which open-source project would you guys suggest for reading it's code to a ruby beginner?
shadoi has joined #ruby
brianpWins has joined #ruby
<Swiss38974>
hello i m totaly new into ruby and i would like to ask a simple question : is it possible to make rubby dektop application with QT-Editor ? Or with GTK+ library ??
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
koskoz has quit [Ping timeout: 240 seconds]
danryan has left #ruby [#ruby]
d3vic3 has quit [Ping timeout: 248 seconds]
robozahn_ has quit [Ping timeout: 265 seconds]
lxsameer has quit [Max SendQ exceeded]
<graft>
Swiss38974: how much do you want to do?
<graft>
Swiss38974: i have a bunch of scripts that just do some basic interaction with 'kdialog'
udante has joined #ruby
lxsameer has joined #ruby
hemanth3 has quit [Quit: Leaving.]
<oz>
with Gtk, glade can be used w/ ruby IIRW
nanderoo has joined #ruby
<Swiss38974>
well actually my aim is to make some script for user
<Swiss38974>
basicelly i want to do a gui
d3vic3 has joined #ruby
lxsameer has quit [Max SendQ exceeded]
<Swiss38974>
the user will have to fill in a gui form
<Swiss38974>
then he'll get an output
brunosaboia__ has joined #ruby
<Swiss38974>
so i was thinking using a gui that i know such as gtk+ or qt
<oz>
Agis__: there are plenty of projects to read from, pick one on github that you like, with a few followers, and you're set :)
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<Agis__>
oz: i'm searching for something simple
<Swiss38974>
ok thx
<Agis__>
oz: things like rails, and sinatra seems pretty complicated
workmad3 has quit [Ping timeout: 244 seconds]
mrsolo has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
lxsameer has quit [Max SendQ exceeded]
<oz>
I think sinatra's code is actually pretty simple
<shevy>
"Export a Blockly program into JavaScript, Dart, Python or XML."
pashamur__ has quit [Client Quit]
<shevy>
google hates ruby
pashamur__ has joined #ruby
<wmoxam>
Blocky looks stupid
<rippa>
ruby is too cool for them
<graft>
Dart?
neersight[d] is now known as neersighted
tomb_ has quit [Quit: Computer has gone to sleep.]
jeff_sebring has quit [Remote host closed the connection]
MasterIdler has quit [Quit: MasterIdler]
jeff_sebring has joined #ruby
thecreators has joined #ruby
zmoazeni has joined #ruby
zmoazeni has left #ruby [#ruby]
ringotwo has quit [Remote host closed the connection]
pdtpatrick has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
federic has quit [Ping timeout: 244 seconds]
pashamur__ has joined #ruby
kvirani has quit [Remote host closed the connection]
wpaulson has joined #ruby
cheater has quit [Ping timeout: 245 seconds]
Karmaon has quit [Ping timeout: 265 seconds]
<shevy>
graft the language from google which will abolish javascript
eft has joined #ruby
<shevy>
wmoxam dunno. I think the idea behind that is cool
federic has joined #ruby
Juul has quit [Ping timeout: 240 seconds]
the_jeebster has quit [Quit: Leaving.]
<shevy>
there is this other graphical program... where you connect pipes (input and output)... I forgot from what it was... I dont think it was gstreamer, it was something else but I forgot :\
xnm has joined #ruby
<shevy>
but if I remember correctly, you could move around boxes hehe
<rippa>
also yahoo pipes
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
lkba has quit [Quit: Bye]
iocor has joined #ruby
lkba has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
werdnativ has quit [Quit: werdnativ]
apok_ has joined #ruby
d3c has joined #ruby
mohits has joined #ruby
lkba has quit [Client Quit]
iamphi has joined #ruby
lkba has joined #ruby
tvw has joined #ruby
<iamphi>
what permission does ruby get when it is executing via apache cgi ? I am getting a permission denied trying to read a file
apok has quit [Ping timeout: 248 seconds]
apok_ is now known as apok
tatsuya_o has quit [Remote host closed the connection]
the_jeebster has joined #ruby
<iamphi>
i am not using ruby on rail
tvw has quit [Remote host closed the connection]
tvw has joined #ruby
TheFuzzball has joined #ruby
qwerxy has joined #ruby
<shevy>
iamphi, I think by default user nobody
<shevy>
iamphi play a bit with the permissions, and also the /tmp dir
jrist is now known as jrist-afk
ananthakumaran has quit [Quit: Leaving.]
<iamphi>
shevy: ok.
francisfish has joined #ruby
luckyruby has quit [Remote host closed the connection]
zodiak has quit [Read error: Connection reset by peer]
<shevy>
let's say I have a file with 100 methods, but without any module or class namespace. Can it be load and included into some namespace?
remmy444 has joined #ruby
mdw_ has quit [Ping timeout: 246 seconds]
cheater has joined #ruby
<jlogsdon>
shevy: i don't think so... but you could test it quickly in pry.
<jlogsdon>
or irb*
<jlogsdon>
(i default to pry now, heh)
nari__ has quit [Ping timeout: 244 seconds]
<jlogsdon>
i think require/load always applies to the root namespace
<jlogsdon>
(otherwise autoloaders and the like would break D:)
<shevy>
hmm
SimSala has joined #ruby
<shevy>
:(
hadees has quit [Ping timeout: 244 seconds]
DrShoggoth has joined #ruby
Asher has joined #ruby
flip_digits has joined #ruby
voodoofish430 has joined #ruby
ringotwo has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
hadees has joined #ruby
hadees has quit [Remote host closed the connection]
Eldariof-ru has joined #ruby
<lwhalen>
alright, so very close to getting the whitequark IRC logger running
mockra has joined #ruby
<lwhalen>
I've got the logging process connecting to my server
<lwhalen>
but when I try to run the "thin" webserver, it won't listen on a port, it'll only give me a socket
<lwhalen>
even if I specify to listen on a port
<lwhalen>
are the two options mutually exclusive?
davidpk has joined #ruby
<lwhalen>
also, do I have to run the app under thin? Can't I just fire up Passenger via Apache and have it run the app that way?
flagg0204 has quit [Quit: leaving]
robbyoconnor has joined #ruby
<shevy>
I dont know
iamphi_ has joined #ruby
iamphi has quit [Read error: Connection reset by peer]
ObjLn has joined #ruby
ObjLn has left #ruby [#ruby]
jeff_sebring has quit [Remote host closed the connection]
pashamur__ has quit [Read error: Connection reset by peer]
fmcgeough has quit [Read error: Connection timed out]
iocor has joined #ruby
<jlogsdon>
Test.new.bar # => Running bar
celm has joined #ruby
borkman`` is now known as borkman
<jlogsdon>
lwhalen: check the log folder, tail -f whatever file is in there (production.log? development.log? I dunno). then try again
<lwhalen>
oh here we go
<jlogsdon>
look at the error in there
<jlogsdon>
or fix it ^__^
<lwhalen>
restarting it fixed the problem
<jlogsdon>
aha
<lwhalen>
the error was "cannot find method 'nick'
<lwhalen>
which was.. weird
<lwhalen>
ok, now to get this thing running under Apache...
itnomad has joined #ruby
heph has left #ruby [#ruby]
udante has joined #ruby
sonkei has quit [Quit: WeeChat 0.3.8]
<tommylommykins>
hmm
<tommylommykins>
is it possible to get the modules which have been mixed in to an instance of an object?
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
sonkei has joined #ruby
robozahn has quit [Ping timeout: 248 seconds]
<apeiros_>
tommylommykins: obj.singleton_class.ancestors will contain them
jbpros_ has joined #ruby
jbpros_ has quit [Client Quit]
emmanuelux has quit [Remote host closed the connection]
sonkei has quit [Client Quit]
<tommylommykins>
ooh, thanks :D
sonkei has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<apeiros_>
I think using obj.singleton_class.ancestors - obj.class.ancestors, you'll get only the modules that have been directly added to obj
MasterIdler has joined #ruby
kvirani has joined #ruby
sailias has joined #ruby
sonkei has quit [Client Quit]
jeff_sebring has quit [Remote host closed the connection]
ph^ has joined #ruby
sonkei has joined #ruby
A1241 has joined #ruby
A1241 has left #ruby [#ruby]
flak has joined #ruby
flak is now known as Guest57479
crankycoder has joined #ruby
aces1up has quit [Read error: Connection reset by peer]
werdnativ has joined #ruby
iamjarvo has quit [Quit: WeeChat 0.3.7]
emmanuelux has joined #ruby
rippa has quit [Ping timeout: 244 seconds]
luxurymode has quit [Quit: Computer has gone to sleep.]
<ozy_work>
I have a ruby application that keeps inisting I need to install the gem activerecord-mysql-adapter -- even though that gem does not exist. Googling the error makes it sound like the error is a ruby error and not application specific -- so I was wondering if anyone had any advice or comments here....
Guest57479 has quit [Client Quit]
pashamur__ has quit [Read error: Connection reset by peer]
wpaulson has joined #ruby
pashamur__ has joined #ruby
rippa has joined #ruby
fmcgeough has joined #ruby
federic has quit [Ping timeout: 245 seconds]
schovi has quit [Remote host closed the connection]
nightzpy has quit [Read error: Connection reset by peer]
nightzpy has joined #ruby
AxonetBE has joined #ruby
federic has joined #ruby
<csmrfx>
8)
<ozy_work>
o.O
<csmrfx>
hey ozy
xaq has quit [Read error: Connection reset by peer]
<csmrfx>
wat os you on?
carloslopes has joined #ruby
<ozy_work>
rhel5
looopy has quit [Remote host closed the connection]
xaq has joined #ruby
impomatic has joined #ruby
<csmrfx>
I bet that 'gem' is something inside avtive record
Bosma has joined #ruby
<ozy_work>
i'm not a ruby guy, so I am not sure where to go
bosphorus has quit [Remote host closed the connection]
<csmrfx>
or might be sequel
<csmrfx>
guess
bosphorus has joined #ruby
sonkei has joined #ruby
<ozy_work>
wang: yeah, thats one of the pages I ahve hit. I tried mysql2, but the issue remains
codezombie has joined #ruby
<wang>
ozy_work: did you try what the guy said fixed it for him (in the comments of the accepted answer)
mjb2k has joined #ruby
ryanf has joined #ruby
<csmrfx>
ozy_work: can you require that gem or the other
<ozy_work>
i'm not sure I understand
Helius has joined #ruby
<ozy_work>
I changed the dbadapter in the configfor the application, but now I get err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not connect to database: Invalid db adapter mysql2
<wang>
try gem install mysql2
alexim has joined #ruby
<ozy_work>
mysql2 (0.3.11) is already installed
<csmrfx>
ozy you gotta understand ruby gems to get this workin
<ozy_work>
looks like I need to talk with my coworker
stat1x has joined #ruby
MrGando has joined #ruby
<ozy_work>
2.7.14 was supposed to be in the repo I used
<ozy_work>
looks like it is 2.6.12
<ozy_work>
thank you
<ozy_work>
let me fix that quick
<wang>
a-ha
<ozy_work>
i saw that page, and assumed it did not apply
<ozy_work>
until I double checked the version
fmcgeough has quit [Read error: Connection timed out]
Progster has joined #ruby
<wang>
there's a devops_borat tweet in the making there somewhere
Maniacal has joined #ruby
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
vizzord has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
ph^_ has joined #ruby
flype has joined #ruby
<ozy_work>
damn it
<ozy_work>
now a new error
<ozy_work>
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload active_record: uninitialized constant ActiveRecord
<csmrfx>
again
<csmrfx>
install
<csmrfx>
activerecord
<csmrfx>
gem
Karmaon has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
<ozy_work>
[root@henson ~]# gem list | grep active
<ozy_work>
activerecord (2.3.5)
<ozy_work>
activeresource (2.2.2)
<ozy_work>
activesupport (2.3.5, 2.2.2)
<heftig>
now that looks ooold
<csmrfx>
ok, in irb, can has require activerecord || ruby -e "require 'activewhateva'" # or something?
flype has quit [Client Quit]
<ozy_work>
it's the version from the documentation I was using. Trying something newer now
ph^ has quit [Ping timeout: 248 seconds]
chienpo has joined #ruby
fserb has joined #ruby
mockra has quit [Remote host closed the connection]
ravee has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<ravee>
Hello, where can i find date library?
wpaulson has quit [Ping timeout: 252 seconds]
robotmay has joined #ruby
<csmrfx>
ri Date
<ravee>
sorry!
<csmrfx>
sorry why?
<ravee>
i couldn't understand what you said
<csmrfx>
type 'ri Date' in console for date formatting lib docs
wilmoore has joined #ruby
fantazo has quit [Remote host closed the connection]
<ravee>
i needed source code.
pashamur__ has quit [Read error: Connection reset by peer]
jimeh2 has quit [Ping timeout: 244 seconds]
<csmrfx>
also, or ri | grep "Date"
pashamur__ has joined #ruby
pashamur__ has quit [Client Quit]
pdtpatrick_ has joined #ruby
pashamur__ has joined #ruby
Kn|t3 has quit [Quit: Kn|t3]
<csmrfx>
all that code is in your ruby install dir /lib
rizzylt has quit [Ping timeout: 252 seconds]
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
Karmaon has quit [Ping timeout: 246 seconds]
<csmrfx>
for example /usr/lib/ruby/1.9.1/date/format.rb
xastion has joined #ruby
medik has quit [Remote host closed the connection]
pashamur__ has quit [Read error: Connection reset by peer]
pashamur__ has joined #ruby
<sonicpond>
i think i prefer questions when they end with "!"
<sonicpond>
amirite!
<heftig>
no‽
<csmrfx>
Me, I'm just wondering where can i find date?
vlad_starkov has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<heftig>
csmrfx: it's in date.c, built into ruby
<heftig>
er, time.c
pdtpatrick has quit [Ping timeout: 246 seconds]
pdtpatrick_ is now known as pdtpatrick
<ravee>
i got ruby version of date
<heftig>
er, wrong again
<heftig>
ext/date/date_core.c
<csmrfx>
lol, not gonna start dating C-source
<sonicpond>
i took "date" to mean "hoochie momma"...in this case.
* csmrfx
I'm desperate, but not THAT desperate
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
Hanmac has joined #ruby
<csmrfx>
ah well, better make upside down spider now...
<csmrfx>
(web spider)
itnomad has quit [Quit: Leaving]
Karmaon has joined #ruby
fmcgeough has joined #ruby
dsa has joined #ruby
dhruvasagar has joined #ruby
Vainoharhainen has joined #ruby
EzeQL has quit [Ping timeout: 248 seconds]
mucker has joined #ruby
sausage2 has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
<csmrfx>
I'm pretty sure Vainoharhainen is following me
xaq has quit [Read error: Connection reset by peer]
<shevy>
he just wants a kiss
xaq has joined #ruby
the_jeebster1 has joined #ruby
krz has quit [Quit: krz]
the_jeebster has quit [Ping timeout: 245 seconds]
pashamur__ has quit [Client Quit]
qwerxy has quit [Ping timeout: 244 seconds]
pashamur__ has joined #ruby
<csmrfx>
ha, who doesnt
BrokenCog has quit [Read error: Connection reset by peer]
pdtpatrick has quit [Remote host closed the connection]
pdtpatrick has joined #ruby
cek has joined #ruby
<cek>
is file.open(, 'r+') { fh.rewind; fh.truncate(0); fh.write } correct sequence to rewrite file's contents?
wilmoore has quit [Read error: Connection reset by peer]
wilmoore has joined #ruby
udante has quit [Disconnected by services]
udante_ has joined #ruby
banghouse has quit [Read error: Connection reset by peer]
<csmrfx>
so I have an open-uri read-function happenin
avandenhoven has joined #ruby
<csmrfx>
how can I have each run concurrently
mucker has quit [Quit: leaving]
<Vainoharhainen>
csmrfx: o0?
avandenhoven has left #ruby [#ruby]
<csmrfx>
lol
mockra has joined #ruby
BSaboia__ has quit [Read error: Connection reset by peer]
mucker has joined #ruby
Kn|t3 has joined #ruby
<DrShoggoth>
are there any good ruby editors for linux? I'm using gedit which does pretty good but doesn't support highliting def/end blocks
albemuth has quit [Read error: Connection reset by peer]
robotmay has quit [Remote host closed the connection]
pashamur__ has quit [Read error: Connection reset by peer]
ces has joined #ruby
pashamur__ has joined #ruby
olrrai has quit [Ping timeout: 244 seconds]
werdnativ has quit [Ping timeout: 240 seconds]
sepp2k1 has joined #ruby
kevinbond has joined #ruby
sepp2k has quit [Ping timeout: 244 seconds]
<ukd1>
is there a good way to run more than one rack app per config.ru file?
<ekaleido>
why would you want to do that?
<ekaleido>
out of curiousity
sausage2 has left #ruby [#ruby]
albemuth has joined #ruby
TheFuzzball has quit [Quit: Leaving...]
mohits has quit [Ping timeout: 240 seconds]
<ukd1>
ekaleido, I'm testing locally and want to run two different versions of the same api (grape). One is /api/1 the other is /api/2
<Paradox>
shotgun might be able to do it
pashamur__ has quit [Quit: Konversation terminated!]
<ukd1>
Paradox, thanks - I'll google
pashamur__ has joined #ruby
<Paradox>
i like shotgun because it solves a lot of problems
<Paradox>
no need to ^C and restart rackup on a config change
<Paradox>
every request is a new rack
<ukd1>
ah I'm using pow which does that
rtl has joined #ruby
schovi has joined #ruby
<ukd1>
I think I need to put some logic in my config.ru to switch what's running based on url
<ukd1>
uri, even
klj613 has joined #ruby
burgestrand has joined #ruby
TheFuzzball has joined #ruby
roams has quit [Ping timeout: 252 seconds]
rock-n-rolla has joined #ruby
asobrasil has left #ruby [#ruby]
rock-n-rolla has quit [Client Quit]
koskoz has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
jwang has quit [Read error: Connection reset by peer]
eblume has joined #ruby
jwang has joined #ruby
SirRamonGabriel has joined #ruby
rizzylt has joined #ruby
ryanf has quit [Ping timeout: 245 seconds]
<eblume>
Hi. I'm trying to teach myself Rails and Ruby at the same time. I'm getting an error - "undefined method `[]' for nil:NilClass" for the line "user = User.find_by_email(params[:session][:email])". Any ideas? (I can pastebin more context if needed.)
Ducklings has joined #ruby
xaq has quit [Remote host closed the connection]
<eblume>
I'll check out #rubyonrails as well but I was thinking this might be more a ruby error syntax question.
ringotwo has quit [Remote host closed the connection]
<shevy>
eblume as rails is written in ruby, this of course is a ruby syntax error
<eblume>
Yes, I figured. :)
<shevy>
in this example, you are trying to use the method [] an a nil object, an object that is not there
ryanf has joined #ruby
<shevy>
so the first question you should ask is - why is the object in question nil
<eblume>
Which object, though? 'params'?
<shevy>
I think so
<shevy>
well
<shevy>
params is used via two [] actually
<shevy>
could be the second one that is nil
<eblume>
Oh. Hah, no, i totally just saw the error.
<shevy>
in situations like this, in ruby code, you would often do: pp params
<shevy>
it seems to be a hash object
<eblume>
I stupidly copy/pasted that from another area and forgot that this is the controller method that is *creating* the session.
<shevy>
I have absolutely no idea about rails ;)
<eblume>
Sorry. Dumb me. Thanks for the pointers :)
<eblume>
pp params - pp is like "Pretty print"
<eblume>
?
<shevy>
pp is pretty print, yes. the point is, it will nicely print data structures, like hash
<shevy>
you can try in irb quickly
<eblume>
Excellent, that's very useful to me.
<eblume>
Thanks shevy!
xaq has joined #ruby
<eblume>
I'm learning to like ruby - it has a lot of very elegant notions. Some very strange syntax though!
<shevy>
you can see that output only via irb, or if you put this into a .rb file and run it
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
<shevy>
but once you saw it, you will understand, it will arrange the hash nicely in the output
TheFuzzball has quit [Quit: Leaving...]
Synthead has joined #ruby
<shevy>
eblume a lot of the syntax in ruby can be very terse
<shevy>
for instance
<shevy>
[] vs. Array.new
<shevy>
{} vs. Hash.new
looopy has quit [Remote host closed the connection]
<DrShoggoth>
geany is relly nice
<eblume>
Actually coming from a Python background, those make sense to me.
<shevy>
(both are not 100% the same, you can do a bit more with the .new variants... but the others are used more often because they are much shorter)
<eblume>
I'm still learning my way around blocks, though.
<shevy>
blocks are very simple. just keep in mind that every method in ruby can get one optional block
<shevy>
def foo; end
<shevy>
foo
Enekoos has joined #ruby
<shevy>
foo()
<shevy>
foo() {}
Guest20050 is now known as coofamani
<shevy>
is kinda the same way to invoke the method foo
<eblume>
They make sense - I am also conversant in Lisp and there are some very related FP constructs.
Synthead has quit [Max SendQ exceeded]
suborbital has joined #ruby
<shevy>
but blocks are really awesome
<eblume>
Yes they seem to be like a great way to structure certain things
<eblume>
and I like that they are frequently not mandatory
<shevy>
does python have something similar like a block?
<eblume>
Vaguely. They have 'context managers'
<eblume>
with foo():
<shevy>
indeed. the blocks are a bit like a special argument to a method
SimSala has quit [Remote host closed the connection]
<eam>
perl is most similar re: blocks
<shevy>
inside a method, you can check for a given block via this:
<shevy>
yield if block_given?
abionic has joined #ruby
Synthead has joined #ruby
<shevy>
the block_given? asks whether a block was given
<shevy>
and yield just access the block content
the_jeebster1 has quit [Quit: Leaving.]
<eblume>
Very interesting. Thanks!
the_jeebster has joined #ruby
<shevy>
when you understood that, you understood at least 80% of blocks
<eblume>
I also find it really interesting how Rails has really almost defined an entirely different domain-specific language. It all feels very Lispish to me, which I like.
ravee has left #ruby ["Leaving"]
AxonetBE has quit [Quit: Leaving.]
<shevy>
I find this rather sad actually
<shevy>
rails is so big that it overshadows ruby :(
<shevy>
but I see the good side
<shevy>
rails 5.0 will be its own language independent of ruby ;)
joch_n has quit [Quit: Leaving...]
<shevy>
though ruby will me mRuby at that point I guess
pashamur__ has quit [Quit: Konversation terminated!]
<RubyPanther>
mruby has very active since the pre-release
<shevy>
they seem to use perl ... css/makeprop.pl:
<RubyPanther>
It is unlikely that mruby will replace MRI
apok has quit [Quit: apok]
Synthead has joined #ruby
mdw_ has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 246 seconds]
<RubyPanther>
RiteVM was originally intended to replace 1.8 but Matz became convinced that the YARV VM would be better in a lot of ways. But RiteVM is better for embedded systems.
<eam>
shevy: not surprising, apple is a big perl shop
nateberkopec has joined #ruby
tatsuya_o has joined #ruby
pashamur__ has quit [Quit: Konversation terminated!]
pashamur__ has joined #ruby
<shevy>
:(
stockhol1 has quit [Ping timeout: 272 seconds]
<eam>
why the long face? If you like ruby you've got to like perl at least a little
pashamur__ has quit [Client Quit]
<deryl>
not
stockholm has joined #ruby
pashamur__ has joined #ruby
moshee has quit [Ping timeout: 265 seconds]
<eam>
eh, they're incredibly similar
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
abionic has quit [Read error: No route to host]
hynkle has quit [Quit: hynkle]
mayankkohaley has quit [Ping timeout: 245 seconds]
yxhuvud has quit [Ping timeout: 252 seconds]
schovi has quit [Remote host closed the connection]
<eam>
to be honest, there are a few things perl has that I'm waiting for ruby to figure out -- like variable scoping
<shevy>
what is that?
joch_n has joined #ruby
<shevy>
the variable scoping
<eam>
shevy: well for example, how do I determine if I'm referencing a block-local variable, or something from the enclosing scope? In 1.8 I think it's essentially not possible
geekbri has quit [Remote host closed the connection]
<eam>
x=6; 1.times do x = 5 done; puts x # for example
vlad_starkov has quit [Remote host closed the connection]
pashamur__ has quit [Quit: Konversation terminated!]
<eam>
ruby has no way to declare block local variables
pashamur__ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
jeffreybaird has joined #ruby
hemanth has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<eam>
in perl or other languages, ideally you'd say { my $x; .... } # the lexical variable is scoped to the block
fbernier has quit [Ping timeout: 244 seconds]
<eam>
in ruby 1.9 you can kind of do this, eg 1.times do |x| ... end # x is lexically scoped and isolated from a possibly defined x outside the block
<eam>
but that's a corner case and not the general case
nateberkopec has quit [Quit: Leaving...]
<burgestrand>
eam: ruby 1.9 has this thing with semicolon and block variables that make them explicitly local
<eam>
burgestrand: yeah
<eam>
that's what I meant
<eam>
it's a step in the right direction, but it feels forced. I'd prefer explicit scoping and explicit variable definition (because it catches typos too -- use strict; in perl is great)
<eam>
the ruby interpreter has no way to know if foo = 5 is a typo and I meant bar = 5
sixdahs has quit [Quit: Leaving]
internet_user has quit [Remote host closed the connection]
khakimov has joined #ruby
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
<ged>
I think 'use strict' and 'use warnings' are the only things from Perl that I miss.
schovi has joined #ruby
_md has joined #ruby
<offby1>
eam: oh, and: methods aren't proper closures, but lots of other procedure-like things are. I'm still trying to figure that one out.
pashamur__ has quit [Client Quit]
pashamur__ has joined #ruby
niklasb has quit [Ping timeout: 248 seconds]
s0ber_ has joined #ruby
<ged>
offby1: What's your definition of "proper closure"?
akem has quit [Ping timeout: 248 seconds]
pashamur__ has quit [Client Quit]
<offby1>
one that can refer to lexical variables that were in scope when it was defined, but not when it was invokes
<offby1>
invoked
wallerdev has joined #ruby
pashamur__ has joined #ruby
<eam>
ged: I think what I miss most actually is the reference counted gc
s0ber has quit [Ping timeout: 246 seconds]
Morkel has quit [Quit: Morkel]
s0ber_ is now known as s0ber
<eam>
it was *really* nice in Perl to know that an object would destruct at exactly the point it went out of scope
jbpros_ has joined #ruby
<ged>
eam: Wow, really? I don't miss that at all. Trying to keep track of all the mutual references, the half-functional WeakRef implementations?
<offby1>
not many languages make that guarantee
wmoxam has quit [Ping timeout: 248 seconds]
<burgestrand>
Ruby has a broken weakref implementation :(
<eam>
I keep running into crazy things in Ruby where objects sit around and blow up, like File.new.read # leaks descriptors
magoo has quit [Quit: leaving]
jeffreybaird has quit [Quit: jeffreybaird]
<eam>
ged: tracking references never struck me as difficult
uris has quit [Ping timeout: 244 seconds]
<eam>
I'm unconvinced that gc to address cyclic structures is worth the drawbacks (and I include java in that sweeping statement)
<burgestrand>
File instances actually close on GC
the_jeebster has left #ruby [#ruby]
<burgestrand>
Usually you run out of FDs before ruby runs out of memory and GCs them though
Bosma has quit [Ping timeout: 265 seconds]
jimeh2 has joined #ruby
<burgestrand>
(which is why it’s still best practice to explicitly close them when no longer needed)
fserb has quit [Quit: ttyl]
mvangala has quit [Remote host closed the connection]
<offby1>
I think this is true of Racket as well, and Racket is pretty sharp about such things
carloslopes has quit [Read error: Connection reset by peer]
<eam>
burgestrand: yeah but gc isn't guaranteed to run .. ever
<burgestrand>
eam: indeed
looopy has joined #ruby
g0bl1n has quit [Ping timeout: 246 seconds]
<eam>
I find myself inserting ugly workarounds like passing a block for no reason (since it appears that File calls close after the yield, even though it won't gc until far later)
<stephenjudkins>
eam: don't depend on on GC for non-memory resource management
<eam>
stephenjudkins: that's exactly my complaint :)
francisfish has quit [Remote host closed the connection]
koskoz has quit [Ping timeout: 245 seconds]
<stephenjudkins>
for that specific case, you can pass a block to file open: File.open(mode) {|f| ... }
<offby1>
eam: don't you use the "open('filename') {|fh| ... }" idiom? Does that not guarantee it gets closed at the right time?
d-best has joined #ruby
nilg has quit [Read error: Connection reset by peer]
<eam>
yeah that's what I just said -- passing a block for no reason to avoid the gc problem
<stephenjudkins>
eam: it's not a GC problem
<offby1>
oh. I wouldn't describe that as "for no reason"..
<stephenjudkins>
the GC is designed to respond to memory pressure, not file handle pressure or anything else
<offby1>
I've never seen a gc system apart from perl that will close files for you ... and I think perl's GC has some other problem which makes ref-counting unattractive
<eam>
stephenjudkins: right. That's my complaint. I prefer systems with deterministic behavior
joshman_ has quit [Ping timeout: 252 seconds]
<any-key>
that's booooring
<eam>
offby1: every reference counted gc will do it
<offby1>
well, yes
snearch has quit [Quit: Verlassend]
<offby1>
but as I say: I have this vague sense that there's a real problem with ref-counting ... even though I cannot remember what it is.
<offby1>
cycles or something.
<stephenjudkins>
eam: no, every reference counted GC will not do it, unless it forbids cyclic references
Synthead has quit [Read error: Operation timed out]
<stephenjudkins>
any naive ref-counting GC will also have nondeterministic behavior, since dereferencing something can take an arbitrary amount of time
rizzylt has quit [Ping timeout: 245 seconds]
<rking>
I want Math.TAU.
<stephenjudkins>
dealing with JVM GC tweaking, GC pauses can be as severe a problem on production systems as resource leaks
<offby1>
eam: ah, given "I'm unconvinced that gc to address cyclic structures is worth the drawbacks", we're just disagreeing about the comparative costs and benefits. No problem
Ducklings has quit [Read error: Connection reset by peer]
Ducklings has joined #ruby
<stephenjudkins>
eam: i agree that general resource-management schemes are insufficient for many problems
wvms has joined #ruby
<stephenjudkins>
but you are completely wrong to insist that a language's GC handle other non-memory resources in the manner you deem appropriate
jbpros_ has quit [Quit: jbpros_]
<eam>
I didn't insist about anything, putting words in my mouth is rude. I said I prefer and miss the deterministic behavior found in other languages with a refcounted gc
<stephenjudkins>
because the best way to manage file handles is different than mmapped files, which is different than the heap, which is different from DB connections
<eam>
it's a personal preference
pashamur__ has quit [Quit: Konversation terminated!]
<eam>
stephenjudkins: mmaped files use the same descriptors as read/write
<eam>
not that it's particularly relevant
jeffreybaird has joined #ruby
pashamur__ has joined #ruby
billiamii| has joined #ruby
<stephenjudkins>
yes, but a very different kind of pressure
<eam>
the point is that the /object/ decides what to do when destroyed, and ensuring that the destructor is called when it passes from scope is an incredibly handy feature
<eam>
in ruby it is impossible to solve within the object framework as presented
<stephenjudkins>
the OS defines a process's has a file handle limit, but mmapped files instead put pressure on the page cache.
looopy has quit [Remote host closed the connection]
billiamii has quit [Ping timeout: 244 seconds]
cfein__ has joined #ruby
billiamii| has quit [Read error: Connection reset by peer]
nilg has joined #ruby
<stephenjudkins>
eam: yes, it's impossible because the it's impossible for an object to know when it's no longer referenced! unless you have a refcounting GC, which introduces another, completely different set of non-deterministic behavior
<stephenjudkins>
which you said you don't like.
Enekoos has quit [Remote host closed the connection]
pashamur__ has quit [Read error: Connection reset by peer]
pashamur__ has joined #ruby
<stephenjudkins>
or, you could do stuff like C where you manually free up resources. but accessing a something that's been freed is also non-deterministic
<stephenjudkins>
or, "undefined"
nilg has quit [Read error: Connection reset by peer]
looopy has joined #ruby
balki has quit [Read error: Connection reset by peer]
Ducklings has quit [Ping timeout: 244 seconds]
shtirlic has quit [Read error: Connection reset by peer]
celm has quit [Quit: Leaving]
g0bl1n has joined #ruby
shtirlic has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
rizzylt has joined #ruby
jmartin has joined #ruby
balki has joined #ruby
paraseba has joined #ruby
Spooner has joined #ruby
Vendethiel has quit [Ping timeout: 248 seconds]
pashamur__ has quit [Quit: Konversation terminated!]
<stephenjudkins>
also, allowing finalizers on objects effectively doubles the number of GC cycles required to collect them
pashamur__ has joined #ruby
lorandi has quit [Quit: Leaving]
pashamur__ has quit [Remote host closed the connection]
g0bl1n has quit [Ping timeout: 246 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
vizzord has quit [Quit: see you]
hadees has quit [Quit: hadees]
qwerxy has joined #ruby
<Mon_Ouie>
Ruby has a kind of finalizers, but you can't access the actual object from it — you can keep a reference just to the actual resource that needs to be "freed" though
nu7hatch has quit [Ping timeout: 252 seconds]
g0bl1n has joined #ruby
mpereira has quit [Remote host closed the connection]
g0bl1n has quit [Client Quit]
g0bl1n has joined #ruby
dem0x7 has quit [Remote host closed the connection]
paraseba has left #ruby ["WeeChat 0.3.8"]
lwhalen has quit [Quit: Leaving]
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
<mjb2k>
why doesn't Ruby seem to be as popular as other interpreted languages? (Obvious reference: Python)
Synthead has quit [Read error: Operation timed out]
<burgestrand>
mjb2k: source?
<davidcelis>
mjb2k: source?
<burgestrand>
first
<thedonvaughn>
ruby is purty damn popular
<burgestrand>
\o/
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
dhruvasagar has quit [Ping timeout: 244 seconds]
stephenjudkins has joined #ruby
MasterIdler has quit [Ping timeout: 246 seconds]
<mjb2k>
I don't have much in front of me right now, but that is my general view based on framework bindings (GTK) libraries, instructions/tutorials, libraries, etc
<mjb2k>
maybe it's my misconception based on a small set of observances, I hope so
Synthead has joined #ruby
<mjb2k>
most recently, I'm rather irritated that GTK has offical bindings for Javascript, Python, Vala and Perl, but not Ruby
<stephenjudkins>
it uses a a supplemental mark-and-sweep to detect cycles. however, this *does not* work if an object has a finalizer because it's impossible to determine a safe order to run them.
<shevy>
mjb2k vala is a first class citizen for the C-guys in GTK
hasrb has quit [Remote host closed the connection]
<shevy>
mjb2k, perl has the old advantage of being the language that is known by the fossil C hackers
<shevy>
python kinda was the new kid on the block and had better documentation and I guess many other C hackers settled for python rather than ruby
<mjb2k>
I must admit, I only first heard of Vala when I saw it in the language bindings list, but when I took a quick look at it, it does look pretty good
<mjb2k>
yep, that's the page
<shevy>
Vala is really more like the C guys missing features from C++
<shevy>
:D
davidpk has joined #ruby
<shevy>
what makes me sad is that there are javascript bindings (???= for gtk
zaychenok has joined #ruby
<mjb2k>
and that's the biggest one for me, Provide Javascript bindings for GTK, but not Ruby??? how and why does that happen??
dv310p3r has quit [Ping timeout: 246 seconds]
rizzylt has quit [Remote host closed the connection]
<shevy>
no real idea
td123 has joined #ruby
andrewhl has quit [Remote host closed the connection]
<shevy>
it may be that javascript is considered more important than ruby
<shevy>
it may also be that some gtk developers know javascript, and perl or python, but not ruby
qwerxy has quit [Quit: offski]
<shevy>
and another reason may that perhaps ruby makes it too difficult to write and maintain bindings
<ged>
Oh, well, latest release was on 2012-04-08, so...
<mjb2k>
I feel like I need to find out, I think I need to dive into Ruby gems soon
Enekoos has joined #ruby
workmad3 has joined #ruby
_md has quit [Quit: Leaving...]
jbpros_ has joined #ruby
tayy has quit [Remote host closed the connection]
jbpros_ has quit [Client Quit]
TheFuzzball has quit [Quit: Leaving...]
<mjb2k>
the ruby-gnome2 lib is perfectly usable, but the documentation is lacking or just plain missing in a lot of areas and it is behind in the supported GTK versions
blacktulip has quit [Remote host closed the connection]
<mjb2k>
it really only provides basics and there is no sign of GTK3 support anytime soon
digitalcakestudi has joined #ruby
davidcelis has quit [Quit: K-Lined]
<mjb2k>
a lot of what I've done with ruby-gnome2 I actually found how to do by looking at plain GTK docs of python-gtk docs and figuring it out from there
davidcelis has joined #ruby
<mjb2k>
(plain *OR python-gtk)
ken_barber has quit [Remote host closed the connection]
DMKE has quit [Ping timeout: 244 seconds]
c0rn_ has quit [Quit: Computer has gone to sleep.]
<shevy>
yeah but what is even more sad is
PaciFisT has quit [Quit: Leaving.]
<shevy>
that ruby-gtk is one of the better GUIs in ruby
PaciFisT has joined #ruby
Synthead has quit [Read error: Connection reset by peer]
PaciFisT has quit [Client Quit]
<mjb2k>
I agree, that's why I ended up using it
<shevy>
:)
<shevy>
I think one huge problem with ruby gtk is that there is now only one developer left
<mjb2k>
I am curious to see if it's possible for Ruby to play well with Java's Swing though, even though everytime I think of Swing I throw up in my mouth a little
<eam>
stephenjudkins: hm yes I'm aware -- you're talking about something very different
looopy has quit [Remote host closed the connection]
<eam>
I'm not sure why you mention "accessing deallocated memory" for example
<eam>
object destruction is not the same thing as malloc/free
mikepack has quit [Read error: Connection reset by peer]
<stephenjudkins>
no, we're not talking about different things
<shevy>
kou authored 25 days ago
<shevy>
mjb2k, kinda half-deadish :(
<stephenjudkins>
you're asking for the language runtime to run a finalizer when an object has no live references pointing to it
<stephenjudkins>
and claimed that this is "deterministic" behavior
khakimov has quit [Quit: Computer has gone to sleep.]
<stephenjudkins>
i pointed out, correctly, that there are zero mainstream languages that support cyclic references that offer deterministic running of finalizers
mikepack has joined #ruby
iamphi_ has quit [Quit: iamphi_]
<eam>
you're arguing a corner case of two objects in a cycle and saying the ordering between those two objects is not deterministic. That's not conflicting with my statements
iamphi has joined #ruby
looopy has joined #ruby
<stephenjudkins>
"deterministic" doesn't mean "usually does this" it means "always does this"
bluenemo has joined #ruby
looopy has quit [Remote host closed the connection]
<stephenjudkins>
and i'm pointing out that, because of implementation difficulties, in Python, any object with both cyclic references and a finalizer will never get collected
<stephenjudkins>
in Java, finalizers impose a serious performance penalty
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
Vendethiel has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
Progster has joined #ruby
<mjb2k>
Java 7, new GC!
zaychenok has quit [Client Quit]
caaakeeey has joined #ruby
zaychenok has joined #ruby
wangr has quit [Ping timeout: 265 seconds]
Siphonblast has joined #ruby
pierrot_ has joined #ruby
<mjb2k>
"Whole-heap operations, such as global marking, are performed concurrently with the application threads" Java7u4
pierrot_ has quit [Client Quit]
<stephenjudkins>
mjb2k: the G1 GC is a big step forward and reduces pauses
<caaakeeey>
can anyone point me to libraries that can act as an arbitrary number of clients on an irc network?
<mjb2k>
sorry to digres, but I'm alittle excited about that, maybe we'll get that in production in about another year
DMKE has joined #ruby
<stephenjudkins>
however, compaction is still stop-the-world
<stephenjudkins>
afaik only Azul has a truly pauseless GC
<workmad3>
shevy: yeah, I agree... metaprogramming which forces you to think 'what the hell is going on here?' is wrong
<shevy>
nope sorry... I actually meant ...
<Spooner>
LISP people love the endless paretheses...
<shevy>
shellwords
<shevy>
array = Shellwords.shellwords(string)
rasbonics has quit [Quit: rasbonics]
<shevy>
hmm lemme find an example...
<Spooner>
OR should I say (L(I(S(P (people (love (the (endless (paretheses)))))))...
<shevy>
string = 'My dog ate my math homework and my cat'"
<workmad3>
shevy: however, a tiny sprinkle of a tiny bit of metaprogramming (e.g. a 3 line method_missing that gives you a fluent API) is ok to me... no extra thinking :)
<shevy>
I once wrote a whole class that delegated non-existing methods to another class, via method_missing
ph^ has joined #ruby
Ttech is now known as tTECH
<shevy>
I think I also used .send somewhere else in that project
<workmad3>
shevy: ah, a thin proxy... yeah, I've used them at times
<shevy>
those were the old days
<shevy>
where I was wild and dangerous and clever
<workmad3>
heh
tTECH is now known as Ttech
<Crooky>
Hi. Why should I learn ruby instad of PHP for webdev?
<shevy>
now I am tame, docile and dumb
<workmad3>
or at least... thought you were clever :P
<mjb2k>
it's stuff like method_missing that makes me shed a little tear when I switch back over to Java
<shevy>
yeah workmad3 it is always relative. there are people out there who are a million times cleverer :)
davidcelis has quit [Quit: K-Lined.]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
<shevy>
Crooky because there is nothing PHP can do better than ruby
eblume has quit [Quit: Page closed]
khakimov has quit [Quit: Computer has gone to sleep.]
pygospa has quit [Ping timeout: 244 seconds]
<mjb2k>
ruby better supports languages other than english
<workmad3>
Crooky: simple... PHP is a horrible mess that claims to be a language but is in reality the vomit of a strange mewling creature, while ruby is rainbows and kittens and unicorns packaged up into something that can make computers do your bidding
<shevy>
you need to provide something that gives you what PHP leverages though
<shevy>
like, an equivalent framework
<mjb2k>
PHP is very easy to learn... oh wait so is Ruby
<shevy>
I think PHP is easier
<apeiros_>
shevy: look into rack server pages
<workmad3>
mjb2k: PHP is easy to learn for the wrong reasons
<mjb2k>
PHP has great webframeworks available ... oh crap, again so does Ruby
qwerxy has joined #ruby
<apeiros_>
php isn't any easier to learn than ruby. that's bollocks.
<workmad3>
it's syntax is practically non-existant and it consists almost entirely of global function names
<mjb2k>
PHP is equally good at web as it is CLI scripts .. oh damit! so is Ruby
<workmad3>
while ruby is easy to learn because it just flows from the ends of your fingers naturally
<Crooky>
I only need a tool to implement different crazy webprojects.
pygospa has joined #ruby
<shevy>
ohhhh apeiros_ didn't you once wrote your own web framework too? in php as well?
ph^ has quit [Ping timeout: 265 seconds]
<mjb2k>
Ruby is in it's current state mostly because it was designed to be that way, PHP is in it's current state because people keep trying to bolt stuff on the sides without removing the old crap dragging on the ground
<shevy>
mjb2k I found PHP ok for web stuff, for CLI scripts, I felt it was awful
<workmad3>
mjb2k: heh :) I like the backhanded insult to PHP in your last statement :)
<mischief>
hey
<workmad3>
mjb2k: 'equally good for web and CLI scripts' :)
<shevy>
PHP is design "worse is better" approach. creative chaos
<mischief>
workmad3: how to do so with a variable length array such as ARGV :-)
<workmad3>
mischief: I told you that about 2 minutes ago ;)
* apeiros_
sometimes loses hope about mankind
kvirani has quit [Remote host closed the connection]
SirRamonGabriel has quit [Remote host closed the connection]
<shevy>
<workmad3> mischief: just do 'exec "echo", *ARGV'
<horseman>
apeiros_: what's your honest opinion about woman-kind
<apeiros_>
I don't think it's any different from my opinion about mankind
<mischief>
apeiros_: i ask stupid things just to bug you.
<apeiros_>
mischief: I think it's not just you. it's a conspiracy!
<shevy>
does your script work now mischief!!!
<mischief>
thanks workmad3, shevy, Spooner :-)
<mischief>
shevy: i don't know yet, i have to plug in the real program and try
<shevy>
!!!!!!!!!!
DrForr has quit [Ping timeout: 245 seconds]
<mischief>
i have to... commit to github
<Crooky>
I was thinking about web scripting and performance. But I get the sense that I'm fiddling with non-issues here. I'm not facebook. But from a developing perspective, as someone who wants to try multiple crazy web-projects.. what is a good choise? What makes quick and easay dev? Gives the most functionality of the least code, for example. And let's say that I want to use SHA1 to protect the...
<mischief>
wait for jenkins to build the gem
<Crooky>
...users.. and that I use image rendering, and maybe some gzipping for various reasons
<mischief>
install the gem on our server
<mischief>
and hope it doesn't break everything
td123 has quit [Quit: WeeChat 0.3.8]
<shevy>
Crooky, PHP
<mischief>
lua of course
<mischief>
:-)
<shevy>
well he asks for the golden spoon that feeds him
<shevy>
perhaps rails has all that, I dont know
TorpedoSkyline has joined #ruby
<shevy>
then again, I think actions should be small and modular, and not hidden away into frameworks
<Crooky>
shevy: why php? .. let's assume that learning any language isn't an issue
axolx has joined #ruby
wmoxam has joined #ruby
<shevy>
Crooky because you ask for functionality that may require work
<shevy>
php uses imagemagick for image rendering or?
<shevy>
and comes with gzip integrated and lots of other things
<shevy>
so given your criteria, it would match best, no?
<Crooky>
right
<axolx>
im stuck with a gem issue and was wondering if anyone here had insight about it. basically rake is not finding a gem that's clearly there otherwise: http://d.pr/n/qbmw
<mjb2k>
most functionality with least hand typed code, Ruby on Rails
<shevy>
as for "most functionality of the least code"
<shevy>
I think it depends on how much code your frameworks already wrote for you
<shevy>
in ruby, you can express yourself with less characters than in php
bglusman has quit [Remote host closed the connection]
bglusman has joined #ruby
xaq has quit [Remote host closed the connection]
zizzyx has quit [Disconnected by services]
<shevy>
axolx perhaps rake must require rubygems first
zizzyx has joined #ruby
<Vendethiel>
Crooky: you know
<shevy>
you could try to add that line to rake
<Vendethiel>
servers are cheap, developers are not ;-).
minijupe has joined #ruby
<workmad3>
axolx: rails project... it uses bundler... add the gem to your Gemfile
<zizzyx>
when creating job classes for resque, where should i store these files?
<zizzyx>
or should i add the classes to some existing file
<mjb2k>
one rails command can give you a functional model, view and controller I don't know of any PHP framework that provides that
<workmad3>
axolx: and re-run bundle install
<Vendethiel>
plus even if php has infinite scability, you can add servers as much as you want
khakimov has joined #ruby
<workmad3>
rails can scale, php can scale, java can scale, and also rails can't scale, php can't scale and java can't scale
<daed>
^
<daed>
this is correct
<daed>
on all counts
qwerxy has quit [Quit: offski]
<axolx>
workmad3: thx
<workmad3>
Crooky: you should use intercal for your web projects
<workmad3>
Crooky: ooh, actually, scratch that... you should write emacs extensions in lisp to turn emacs into a fully functioning HTTP server and then more lisp for your web apps served through emacs!
zaychenok has quit [Quit: Konversation terminated!]
hakunin has quit [Remote host closed the connection]
<mjb2k>
now there is the most functionality for the least code, you don't ahve to write any code at all!!
hakunin has joined #ruby
crankycoder has quit [Remote host closed the connection]
<shevy>
mjb2k very true
<shevy>
the best code is the one never written
cbuxton has quit [Quit: Leaving.]
<shevy>
unfortunately it also does not bring you very far :(
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
Guedes has quit [Read error: Connection reset by peer]
zaychenok has quit [Read error: Connection reset by peer]
graspee has quit [Ping timeout: 244 seconds]
zaychenok has joined #ruby
tatsuya__ has quit [Remote host closed the connection]
akem has quit [Ping timeout: 245 seconds]
<Crooky>
shevy: there are infinitely many coes that never has been written :/. Which one are you reffering to?
graspee has joined #ruby
<shevy>
you mean code that was never written??
<shevy>
every code that was never written!
whuffor has quit [Ping timeout: 252 seconds]
pting has joined #ruby
zaychenok has quit [Client Quit]
mjb2k has quit [Quit: Leaving]
zaychenok has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
Criztian has quit [Remote host closed the connection]
oooPaul has quit [Quit: Ciao for now!]
<Crooky>
why ruby instead of perl?
Vert has quit [Remote host closed the connection]
<horseman>
Crooky: no reason, u should just use perl
<horseman>
Crooky: /j #perl
davidcelis has quit [Quit: K-Lined.]
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
liluo has joined #ruby
<shevy>
Crooky because perl gives no compelling advantage over ruby but achieves the same with much more line noise
<shevy>
and it is not an OOP language
d3vic3 has quit [Ping timeout: 244 seconds]
<Crooky>
how's the support of ruby on webservers? And is the resource bottleneck the same as for PHP?
<shevy>
ruby works fine on apache .cgi
robozahn has quit [Ping timeout: 248 seconds]
klj613 has quit [Ping timeout: 246 seconds]
<shevy>
as for "bottleneck", if you are a speed junkie you must stick to PHP
<shevy>
I dont know why you wanna leave PHP
<shevy>
stick to it. you'll be a rich man at age 50
d3vic3 has joined #ruby
<wmoxam>
Crooky: the resource bottleneck tends to be RAM
<shevy>
and pixies
<wmoxam>
shevy: I wouldn't say that php is fater either :p
<wmoxam>
*faster
explody has quit [Remote host closed the connection]
<shevy>
I dunno really
<shevy>
speed never was a reason why I use or did not use a language
<shevy>
but apaprently Crooky wants a ferrari
<wmoxam>
shevy: if you compare Rails to a custom php app, then yeah, php is 'faster'
<shevy>
wmoxam, yeah. Crooky drives in his PHP ferrari
centipedefarmer has quit [Quit: This computer has gone to sleep]
<wmoxam>
shevy: wtf dude
<Crooky>
No, I just want to save on the nature's resources by not wasting CPU-cykles for nothing.
whuffor has joined #ruby
<workmad3>
they're never wasted for nothing
<wmoxam>
Crooky: not for nothing. It's called a tradeoff for a reason ;)
<shevy>
man
robotmay has joined #ruby
<workmad3>
however, major marketing kudos... trying to give an environmental reason to pick a language...
<shevy>
nature's resources
<wmoxam>
Crooky: and if the comparison is to php, then it's debatable if there are even extra CPU cycles involved
fantazo has joined #ruby
<shevy>
Crooky, you must give up on computers
<shevy>
become a hippie, a hermit
<shevy>
or an ermine
<wmoxam>
Crooky: in fact the opposite is likely true in most cases
davidcelis has quit [Ping timeout: 244 seconds]
<shevy>
and using PHP in order to protect nature
<shevy>
now that is!!!!!!
TheFuzzball has joined #ruby
<shevy>
Crooky, my ecological footprint with ruby is lower than your ecological footprint with PHP
<shevy>
TAKE THAT
<wmoxam>
shevy: Fortran is the most green language around
<Crooky>
but, but.. I want to =(
<shevy>
I've never met a real person use fortran
<shevy>
it's a myth
<shevy>
I've met two who use FORTH though
<shevy>
but they are creepy
<shevy>
and they do things I did not understand at all
<wmoxam>
shevy: I haven't either though I've heard that IBM still has some
carloslopes has quit [Quit: Leaving]
<Crooky>
what advantages has PHP really? Except that it's easy to learn?
<horseman>
Crooky: learn to google
eblume has joined #ruby
<horseman>
Crooky: you're asking some of the dumbest questions ever to grace #ruby u're really scraping the bottom of the barrel
sixdahs has joined #ruby
xiaotian has joined #ruby
<Paradox>
ooh drama
* Paradox
reads scrollback
<shevy>
Crooky it is simple to write webthingies
<shevy>
Crooky after 2 years in PHP I was fed up with it and switched to ruby
<shevy>
I can't tell you why you should use PHP because I think PHP is a steaming pile of shit. it however als works in its niche, so its ecological shit at least
<Paradox>
Crooky, basically, the only advantage PHP has is it works fucking everywhere, and is simple as shit to write
<Paradox>
in 95% of the cases, php will just run
<brianpWins>
Posted this in ROR so if your in both rooms I don't mean to spam. I've got some ASP.NET code for hashing a PW and am trying to replicate it in Ruby so we don't have to get everyone to reset their passwords. If anyone knows and c/c#/java/asp and wants to take a peek: http://pastie.org/private/rlywdlqg9xjeka6qd2jmuw
<Paradox>
since most php installs are on top of apache, you don't have to deal with a controller system, as apache just uses the file-system for the controller
<Paradox>
thats really the only reason to use php
<Paradox>
its good for simple stupid shit, but not much else
<shevy>
hehehe
<xargoon>
PHP is a template language, and a really bad one at that task too
<stephenjudkins>
brianpWins: do you realize you are using an HMAC in asp.net, and straight SHA1 in Ruby?
tomb_ has joined #ruby
<Paradox>
xargoon, its a template language that puts logic into the templates
<Paradox>
DONT USE SHA1 FOR PASSWORDS FFS
<stephenjudkins>
brianpWins: also... you're HMACing your passwords against themselves? that doesn't make any sense
<Paradox>
use Bcrypt
<brianpWins>
stephenjudkins: I don't. I don't know asp so I can understand if theirs issues here
<Paradox>
if you use sha1 they only have to wait around 10µs
<Paradox>
per attempt
<Paradox>
so, in the time it takes to run one test on a bcrypt hash
ephemerian has quit [Quit: Leaving.]
<Paradox>
they can test 10000000 sha1s
explody has joined #ruby
<brianpWins>
stephenjudkins: thanks. I just thought it was a library naming thing. I didn't realize the were actually different. I'll read up and try again
<workmad3>
sha1 is too efficient
<stephenjudkins>
brianpWins: also, listen to Paradox.
williamcotton has quit [Quit: williamcotton]
Vendethiel has quit [Quit: je ne suis plus là, tqvu]
mohits has quit [Read error: Connection reset by peer]
<stephenjudkins>
if you are stuck with a bunch of SHA1 passwords, it's possible to add bcrypt on top of that to get added security
<brianpWins>
Yeah I'm very aware of those differences unforunitly we're being told they want the old p/w's so we're downgrading from the current bcrypt solution to satisfy them.
<stephenjudkins>
....
<stephenjudkins>
who is doing the telling?
<mischief>
shoot them
<mischief>
and shoot any witnesses
<brianpWins>
heh
<stephenjudkins>
i know this kind of person
<stephenjudkins>
they will put *your* head on the chopping block when the password DB is stolen
<Crooky>
oh, so if you want to make a page in ruby.. you actually make a whole perl script that prints out the webpage?
<stephenjudkins>
first recommendation: tell them to fuck off and quit your job
shikamaru has quit [Ping timeout: 265 seconds]
shtirlic has quit [Read error: Connection reset by peer]
<shevy>
Crooky I write a page in ruby. ruby prints out the webpage.
<mischief>
NO WAI
<brianpWins>
stephenjudkins: I understand where your coming from but it's a decent job and theres lots of plus sides compared to this downside
<Paradox>
brianpWins, link them to news stories about last.fm, linkedin, and all the others in this latest hackfest
<shevy>
I think Crooky is a bot
shtirlic has joined #ruby
<Paradox>
and if they dont, then give a talk at defcon
<Paradox>
lol
kenichi has quit [Remote host closed the connection]
<stephenjudkins>
second recommendation: explain the deficiencies of using SHA1 passwords in writing, on the record, and have them confirm they take responsibility for possible security breaches
<RBV>
Security auditors...ugh
<Paradox>
here's a perfect example in terms executives can understand
<Paradox>
in 1 second
<Paradox>
they can only run 10 bcrypt hash attempts
<Paradox>
or
<Paradox>
100,000,000 sha1 attempts
<Paradox>
it usually doesn't take 100,000,000 attempts to break a password
<shevy>
if people would not have secrets, they would not need encryption
<brianpWins>
lol
zaychenok has quit [Quit: Konversation terminated!]
Aaton is now known as Aaton_off
perryh is now known as perryh_away
<deryl>
YOur stuff is weak doing it the way you want. If I do it the way you want, there is an EXTREMELY high probability that you will end up on CNN like the Department of Defense did because you had your password db cracked and stolen. Or like the country's credit card companies are right now, Or like Sony did with their playstation network. Is this the kind of PR nightmare you want for the company later because you didn't listen to me NOW?
<Paradox>
if thats too complex, let me make a graph
zaychenok has joined #ruby
<shevy>
oh noes
<shevy>
deryl woke up
<shevy>
:)
<deryl>
:)
<shevy>
wrote more in one sentence than Paradox did the last hour ... :P
<RBV>
If you are letting them have 10000000 chances who cares what you're using
<brianpWins>
heh
<stephenjudkins>
Paradox: the issue is, what do you do if you have a giant user DB with salted SHA1-based passwords already there?
fbernier has joined #ruby
<deryl>
if that doesn't scare the bejeebus out of them.. then you really DO need to quit and find a different job, cause they'll find a way later to make it YOUR ass that takes the blame for THEIR stupdity
<Paradox>
stephenjudkins, migrate them to bcrypt
<shevy>
10000000 chances!
<Paradox>
its not that hard
<stephenjudkins>
Paradox: ok, do you try to crack them yourself? or do you add bcrypt on top of SHA1?
<Paradox>
and probably takes as long as any other db operation such as a vacuum
zaychenok has quit [Read error: Connection reset by peer]