khakimov has quit [Quit: Computer has gone to sleep.]
banghouse is now known as banghouseAFK
<rking>
I don't see where in the heck ruby_bcrypt() is supposed to come from. It's not in the 1.9.1 ruby.h (or child includes), so it's an implicit declaration on that line 27, then it fails to link for lack of reference.
williamcotton_ has joined #ruby
apok has quit [Ping timeout: 255 seconds]
<rking>
Darnit. No point in trying the Github Issue route. The ones there are old and non-replied-to.
shiki has quit [Remote host closed the connection]
shiki has joined #ruby
CaptainJet has quit []
<rking>
I seriously don't know how the ext/mri stuff would ever compile.
nari has joined #ruby
awarner has quit [Remote host closed the connection]
monokrome has joined #ruby
TheHairyWoodsman has left #ruby [#ruby]
monokrome has quit [Excess Flood]
mxweas has joined #ruby
subbyyy has quit [Quit: Leaving.]
CaptainJet has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
ringotwo has joined #ruby
<rking>
I'm having one of those moments where I'd really like for this obstacle to not be here, so I could move on and continue my actual work, and finish the day.
kylemcgill has joined #ruby
TorpedoSkyline has joined #ruby
ilyam has joined #ruby
ilyam has quit [Remote host closed the connection]
CaptainJet has quit [Read error: Connection reset by peer]
SegFault1X|work2 has joined #ruby
jxf has quit [Read error: Connection reset by peer]
CaptainJet has joined #ruby
Monofu has joined #ruby
jmeeuwen_ has joined #ruby
TorpedoSkyline has quit [Read error: Connection reset by peer]
foolovely has joined #ruby
zeen` has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
Eiam has quit [Ping timeout: 264 seconds]
marknyc has quit [Ping timeout: 264 seconds]
Paradox has quit [Ping timeout: 264 seconds]
nzfish has quit [Ping timeout: 264 seconds]
{^_^} has quit [Ping timeout: 264 seconds]
JStoker has quit [Ping timeout: 244 seconds]
zeromodulus has quit [Read error: Connection reset by peer]
AlbireoX has quit [Read error: Connection reset by peer]
BrokenCog has quit [Ping timeout: 264 seconds]
locriani has quit [Ping timeout: 264 seconds]
fermion has quit [Ping timeout: 264 seconds]
AlbireoX`Laptop has quit [Ping timeout: 264 seconds]
mattp_ has quit [Ping timeout: 264 seconds]
yellow5 has quit [Ping timeout: 264 seconds]
ozzloy has quit [Ping timeout: 264 seconds]
mattp_ has joined #ruby
crodas has quit [Read error: Connection reset by peer]
jeedey has quit [Quit: No Ping reply in 180 seconds.]
Bofu2U has quit [Read error: Connection reset by peer]
chriskk has joined #ruby
AlbireoX__ has joined #ruby
sits has joined #ruby
schwap_ has joined #ruby
trollface has joined #ruby
johnernaut has quit [Ping timeout: 248 seconds]
johnjohnson is now known as johnernaut
zeen has quit [Ping timeout: 264 seconds]
deryl has quit [Ping timeout: 264 seconds]
chson has quit [Ping timeout: 264 seconds]
[Neurotic] has quit [Ping timeout: 264 seconds]
jerm1080 has quit [Ping timeout: 264 seconds]
RudyValencia has quit [Ping timeout: 264 seconds]
lusory has quit [Ping timeout: 264 seconds]
neersighted has quit [Ping timeout: 264 seconds]
yosafbridge has quit [Ping timeout: 264 seconds]
nuba has quit [Ping timeout: 264 seconds]
deryldoucette is now known as deryl
RudyValencia has joined #ruby
Bofu2U has joined #ruby
drmegahe1tz has joined #ruby
jerm1080 has joined #ruby
Rudy- has quit [Read error: Connection reset by peer]
[Neurotic] has joined #ruby
ForSpareParts|lo has quit [Ping timeout: 264 seconds]
yosafbridge has joined #ruby
RudyValencia- has quit [Read error: Connection reset by peer]
Maher4Ever has quit [Read error: Connection reset by peer]
gregorg has quit [Read error: Connection reset by peer]
user__ has quit [Ping timeout: 248 seconds]
jmeeuwen has quit [Write error: Broken pipe]
ozzloy_ has joined #ruby
schwap has quit [Ping timeout: 248 seconds]
oddmunds has quit [Ping timeout: 248 seconds]
faulkner has quit [Ping timeout: 248 seconds]
oddmunds has joined #ruby
mtfk has quit [Ping timeout: 248 seconds]
drmegahertz has quit [Ping timeout: 248 seconds]
mtfk has joined #ruby
faulkner- has joined #ruby
BrokenCog has joined #ruby
lusory has joined #ruby
luckman212 has quit [Ping timeout: 253 seconds]
Beoran__ has quit [Ping timeout: 253 seconds]
Cork has quit [Ping timeout: 253 seconds]
eko has quit [Ping timeout: 253 seconds]
jeedey has joined #ruby
jmeeuwen_ is now known as jmeeuwen
Viper has joined #ruby
Maher4Ever has joined #ruby
nuba has joined #ruby
wvms has quit [Ping timeout: 264 seconds]
niklasb has quit [Ping timeout: 264 seconds]
SegFaultAX|work2 has quit [Ping timeout: 264 seconds]
Viper is now known as Guest19743
yellow5 has joined #ruby
Beoran__ has joined #ruby
Cork has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
locriani_ has quit [Ping timeout: 240 seconds]
nerdy has joined #ruby
monokrome has joined #ruby
fermion has joined #ruby
monokrome has quit [Excess Flood]
abra has quit [Ping timeout: 276 seconds]
daniel_hinojosa has quit [Read error: Connection reset by peer]
tfitts has quit [Ping timeout: 255 seconds]
foolover has quit [Ping timeout: 255 seconds]
AlbireoX`Mac has quit [Ping timeout: 248 seconds]
<rking>
So, commenting out that bcrypt_wrapper() function entirely gets it to compile and run tests. Oookaaay.
seanstickle has quit [Quit: Nihil sub sole novum]
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
banisterfiend` has quit [Ping timeout: 240 seconds]
mikeric has joined #ruby
subbyyy has joined #ruby
fermion has quit [Client Quit]
<rking>
Random comment: It's interesting to me how you can run `ruby -rasdasdf` and it won't fail until it gets at least 1 line of input. I usually do ruby -rwhatever -e 1 but sometimes I forget the -e 1. I wonder what the boot sequence is that causes it to be like that.
aef has quit [Remote host closed the connection]
manizzle has quit [Ping timeout: 260 seconds]
manizzle_ has quit [Ping timeout: 260 seconds]
nwest has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
kylemcgi_ has joined #ruby
kylemcgill has quit [Read error: Connection reset by peer]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
AlbireoX__ is now known as AlbireoX
apok has joined #ruby
krusty_ar_ has quit [Read error: Connection reset by peer]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
chriskk has quit [Quit: chriskk]
krusty_ar has joined #ruby
chriskk has joined #ruby
heftig has joined #ruby
dbe has quit [Remote host closed the connection]
JStoker has joined #ruby
areil has joined #ruby
wilmoore has quit [Remote host closed the connection]
shadoi has joined #ruby
nilg has quit [Read error: Connection reset by peer]
TandemAdam has quit [Quit: Leaving]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
VegetableSpoon has joined #ruby
ciopte7 has quit [Quit: ciopte7]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
xscc has joined #ruby
Araxia has quit [Quit: Araxia]
xscc has quit [Client Quit]
shadoi has quit [Ping timeout: 252 seconds]
monokrome has joined #ruby
monokrome has quit [Excess Flood]
radic has quit [Ping timeout: 240 seconds]
rockets has joined #ruby
<rockets>
I've got a silly question - I'm trying to pick up ruby (as my first ever programming language), and I'm having trouble understanding why 100 - 25 * 3 % 4 = 97. I do understand what modulus is, but shouldn't it be 25*3 = 75, then 100-75=25, then remainder of 25/4 which is 1?
<rockets>
What am I missing
artOfWar has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
<jrajav>
Modulus has a higher precedence than subtraction
<jrajav>
So 75 % 4 is performed first
dbe has joined #ruby
<jrajav>
As it so happens, that is 3
artOfWar has joined #ruby
<rockets>
Ahhhh ok. I specifically looked up modulus order of operations and found information saying it was after all the PEMDAS stuff. So I guess i got bad information.
bosphorus has quit [Remote host closed the connection]
<xaxxon>
if I'm in irb and I say require 'asdf', it loads asdf. when I'm in a standalone program running from /usr/bin/ruby, if I require 'asdf', it says no such file
napolean_blownap has joined #ruby
<xaxxon>
how do I get the same library loaded from within a normal program as I do from irb
<xaxxon>
?
<cirwim>
require './asdf'
<cirwim>
(possibly..)
<cirwim>
that should be required in irb too though It hought
<xaxxon>
I did "sudo gem install aws-sdk"
<xaxxon>
then I can do it frmo irb.. just not my program
<cirwim>
ok
<xaxxon>
I'll try the ./ ... but that doesn't seem right
napolean_blownap has left #ruby [#ruby]
<xaxxon>
nah, same problem
c0rn_ has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby
monokrome has joined #ruby
monokrome has quit [Excess Flood]
tomb_ has joined #ruby
heftig has joined #ruby
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
g_rotbart has quit [Remote host closed the connection]
cpruitt has quit [Quit: cpruitt]
Draco_ has joined #ruby
<verbad>
xaxxon: try require 'rubygems' first
hamfz_ has joined #ruby
mockra has quit [Remote host closed the connection]
_justin has joined #ruby
williamcotton_ has joined #ruby
williamcotton has quit [Ping timeout: 260 seconds]
williamcotton_ is now known as williamcotton
mikepack has joined #ruby
mockra has joined #ruby
uris has quit [Quit: leaving]
sdwrage has quit [Quit: geekli.st/programmer]
<iamjarvo>
so i have this method that calls other methods. lets call the method that calls other methods the parent. so i have two smaller methods called immediate_match and reverse_match. in the parent method reverse_match is only suppose to happen if immediate returns nil. this was the only way i could think of. I am sure there is a better way. any hints? http://pastie.org/private/gcubdlzavc22hstssb9fzw
mahmoudimus has quit [Quit: Computer has gone to sleep.]
strnx has joined #ruby
<rdegges>
Heya, this is probably a retarded question--but I'm totally a noob with Ruby here. I'm trying to install this ruby package on ubuntu 12.04: https://github.com/mmcgrana/petrify I basically do aptitude -y install ruby-bundler; cd into the repo; then run bundle install, but all I get is errors.
heftig has quit [Ping timeout: 246 seconds]
tonini has joined #ruby
<rdegges>
Are there any ubuntu users here who could give me a hand if I give some more detailed info?
<rdegges>
I have absolutely no luck getting ruby software running =/
<rdegges>
Taranis: didn't check that out yet, will check it out now
<rdegges>
I'm hesitatnt to do any rbenv stuff or whatever, because I've got no idea what it is, and I'd just kinda like to get things working as simply as possible.
<rdegges>
Unless that is the simplest way.
<bnagy>
it's just a tool to help you install a decent version of ruby
JohnBat26 has joined #ruby
<bnagy>
if you only ever want to use one systemwide ruby you could just use ruby-build, but tbh there's not much difference in complexity
<rdegges>
bnagy: alright, I'll check out rbenv then
<tagrudev>
I am using 12.04 and i dont have any problems
banisterfiend has quit [Ping timeout: 248 seconds]
<cirwim>
dunno why they're adding an entire new method for that though
<ryanf>
whaaa
<ryanf>
yeah
<ryanf>
that seems like an awful lot of code
sebicas has joined #ruby
subbyyy has quit [Quit: Leaving.]
<ryanf>
I guess it might be more efficient than using #encode
rdegges has left #ruby [#ruby]
<cirwim>
heh, I'd kind of prefer routines like that to be optimized for lack of bugs over speed :)
codespectator has quit [Quit: Computer has gone to sleep.]
cirwim has quit [Quit: Leaving.]
arkiver has quit [Quit: Leaving]
subbyyy has joined #ruby
subbyyy has quit [Client Quit]
chichou has joined #ruby
hoelzro|away is now known as hoelzro
InFlightMovie has joined #ruby
CaptainJet has quit [Disconnected by services]
Solnse has joined #ruby
InFlightMovie is now known as CaptainJet
crates has quit [Remote host closed the connection]
Hanmac has joined #ruby
m4rtijn has joined #ruby
<m4rtijn>
hi
crates has joined #ruby
Aaton is now known as Aaton_off
adac has joined #ruby
codespectator has joined #ruby
crates has quit [Max SendQ exceeded]
igotnolegs has quit [Quit: Computer has gone to sleep.]
subbyyy has joined #ruby
<m4rtijn>
we have a php website and will switch "soon" to ruby / rails - .. now we would like to implement a messaging system in ruby so we can reuse it soon.. i have not much to start.. anyone here who could send me on the right tracks?
crates has joined #ruby
<bnagy>
what kind of messaging?
crates has quit [Max SendQ exceeded]
<bnagy>
I like zeromq, but that has been forked, there are also good libs for amqp
<m4rtijn>
I'd like for php to send some request "somewhere" and get a html or json back
banghouse is now known as banghouseAFK
<m4rtijn>
bnagy, like.. email but for the users only
crates has joined #ruby
<m4rtijn>
and restricted to our site..
<m4rtijn>
something like skype
<bnagy>
ok, that sounds like something you'd need to build on top of a basic messaging platform
<hoelzro>
m4rtijn: what about XMPP?
<m4rtijn>
the messaging is not the problem..
<bnagy>
but you might want to look in over at #rubyonrails as well
<m4rtijn>
we build it from scratch
<m4rtijn>
i more concerned about the communication between php and ruby
crates has quit [Max SendQ exceeded]
<m4rtijn>
dont know if I should use some druby instance..
<bnagy>
you can pass by queue, in which case I like beanstalkd and there's resque or however it's spelled
<bnagy>
otherwise like I said, 0mq, crossroads IO, AMQP
xaxxon has quit [Quit: Leaving]
Bosma has quit [Ping timeout: 260 seconds]
<bnagy>
I doubt you can use druby from php
<bnagy>
you need Ruby's Marshal
crates has joined #ruby
subbyyy has quit [Quit: Leaving.]
<m4rtijn>
okay, let me google all that info :) thanks a lot bnagy
arturas has joined #ruby
<bnagy>
I would definitely ask the rails guys as well, if I were you
<m4rtijn>
will do
<bnagy>
there might be something already done / easier for webstuff
tomask has quit [Quit: Quit]
Criztian has joined #ruby
TPFC-SYSTEM has joined #ruby
jimeh has joined #ruby
mucker has joined #ruby
mahmoudimus has joined #ruby
thomas is now known as PuTTY
passbe has quit [Quit: WeeChat 0.3.7]
me has joined #ruby
rbtest has joined #ruby
me is now known as Guest74057
justsee is now known as justsee|away
savage- has joined #ruby
justsee|away is now known as justsee
PuTTY is now known as thomas
andrewhl has quit [Remote host closed the connection]
stillnzfish has quit [Quit: last word.]
ryanf has quit [Quit: leaving]
savage- has quit [Client Quit]
etehtsea has joined #ruby
cloud|office has joined #ruby
Rochefort has joined #ruby
pskosinski has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
hoelzro has quit [Ping timeout: 248 seconds]
Eldariof-ru has joined #ruby
Rochefortes has joined #ruby
pskosinski has joined #ruby
yy is now known as yyy
mneorr has joined #ruby
_justin has quit [Ping timeout: 264 seconds]
rbtest has left #ruby [#ruby]
baphled has joined #ruby
Rochefort has quit [Ping timeout: 240 seconds]
twinturbo has quit [Quit: twinturbo]
mneorr has quit [Client Quit]
dhruvasagar has quit [Ping timeout: 248 seconds]
mneorr has joined #ruby
nyuszika7h has joined #ruby
Criztian_ has joined #ruby
dhruvasagar has joined #ruby
Criztian has quit [Ping timeout: 248 seconds]
CaptainJet has quit []
BiHi has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
bluOxigen has joined #ruby
<m4rtijn>
bnagy, good tip about asking in #ror - theres a api only fork of rails for this purpose
Jackneill has quit [Read error: Connection reset by peer]
Draco___ has quit [Remote host closed the connection]
heftig has joined #ruby
bosphorus has quit [Remote host closed the connection]
yonggu has quit [Remote host closed the connection]
yonggu has joined #ruby
ingsoc has joined #ruby
Jackneill_ has joined #ruby
werdnativ has quit [Quit: werdnativ]
workmad3 has joined #ruby
a_a_g has quit [Quit: Leaving.]
a_a_g has joined #ruby
justsee|away is now known as justsee
zz_drupin is now known as drupin
monkegjinni has joined #ruby
shiki has joined #ruby
BRMatt has quit [Ping timeout: 248 seconds]
BRMatt has joined #ruby
locrian__ is now known as locriani
locriani has quit [Changing host]
locriani has joined #ruby
ingsoc has left #ruby [#ruby]
arturas_ has joined #ruby
juha_ has joined #ruby
yyy has quit [Quit: leaving]
Criztian has joined #ruby
federic has joined #ruby
brg has joined #ruby
<brg>
hi anybody know how to get ipaddress of local machine in ruby in windows
<hoelzro>
brg: the IP of the machine itself, or the external IP?
jesly__ has joined #ruby
<brg>
hoelzro: machine itself.
<brg>
require 'socket'
<brg>
ip = IPSocket.getaddress(Socket.gethostname)
<hoelzro>
there's probably a win32 module or something like that out there
<brg>
above code is working in 'MAC'
<brg>
ok thnks will check abt that
<bnagy>
uh machines can have more than one IP address
sits has quit [Remote host closed the connection]
<hoelzro>
brg: bnagy brings up a good point; what do you need the IP address for?
federic has quit [Ping timeout: 252 seconds]
exkdpa has joined #ruby
omryy has quit [Read error: Connection reset by peer]
heftig has quit [Ping timeout: 246 seconds]
ephemerian has joined #ruby
baphled has quit [Ping timeout: 248 seconds]
baphled has joined #ruby
<brg>
my machine ip address within a LAN
<bnagy>
your code above works for me on win7 / jruby, though
<bnagy>
brg: yeah I mean machines can have more than one of those
<bnagy>
I would probably just parse `ipconfig`
<brg>
it works for me too but getting 'Link-local IPv6 Address' address instead of 'IPv4 Address'
<bnagy>
failing that, WMI
dhruvasagar has quit [Ping timeout: 248 seconds]
Vert has joined #ruby
<brg>
bnagy: ifconfig doesn't work in windows
<bnagy>
did I say ifconfig?
<brg>
oh!! my mistake
<brg>
:)
dhruvasagar has joined #ruby
<brg>
but quite complex to parse ipconfig i guess
<bnagy>
shouldn't be
exkdpa has quit [Read error: Connection reset by peer]
<bnagy>
try `ipconfig`[/IPv4 Address.*: (.*)$/,1]
<brg>
ok trying this method then.
heftig has joined #ruby
federic has joined #ruby
MasterIdler has quit [Ping timeout: 264 seconds]
<brg>
getting syntax error near '(' while firing above in gitbash
tiripamwe has joined #ruby
<bnagy>
*shrug* works for me
<bnagy>
I don't run ruby from gitbash though
<brg>
in gitbash!!! ?
<brg>
or in irb?
mengu has joined #ruby
<bnagy>
in irb
<brg>
oh! it works.
<brg>
cool
<brg>
thnks bnagy
<bnagy>
np
yxhuvud has joined #ruby
swistak35 has quit [Ping timeout: 245 seconds]
Guerrero has joined #ruby
tiripamwe has quit [Ping timeout: 248 seconds]
<withnale>
Anyone here have experience with commander and gli?
baphled has quit [Read error: Connection reset by peer]
<withnale>
do either of them support subcommands ootb?
tonini has quit [Remote host closed the connection]
zodiac1111 has quit [Ping timeout: 248 seconds]
baphled has joined #ruby
Jackneill_ has quit [Quit: Jackneill_]
<banisterfiend`>
withnale: slop does
<banisterfiend`>
withnale: i think slop is the most popular one too, ime
nari has quit [Ping timeout: 245 seconds]
swistak35 has joined #ruby
<withnale>
wow. so many options (sic)
Axsuul has quit [Ping timeout: 248 seconds]
flype has joined #ruby
zz_chrismcg is now known as chrismcg
tiripamwe has joined #ruby
lkba has joined #ruby
Markvilla has quit [Ping timeout: 264 seconds]
Markvilla has joined #ruby
omry has joined #ruby
n1x has quit [Quit: "bbiaw"]
tvw has joined #ruby
WirIrrenUmher has joined #ruby
<Spooner>
withnale : so does cli
Speed has joined #ruby
<Spooner>
withnale Oops, I meant cri :/
br4ndon has joined #ruby
<banisterfiend`>
Spooner: do you use cri?
<Spooner>
banisterfiend` I do, but that was before slop supported subcommands, I think. The choice depends on what sort of API you like really.
mneorr1 has joined #ruby
Rochefortes has quit [Remote host closed the connection]
mneorr1 has quit [Client Quit]
<banisterfiend`>
Spooner: do u like cri
mneorr1 has joined #ruby
mneorr1 has quit [Client Quit]
<Spooner>
I haven't used any alternative to any extent. I used slop where I just wanted simple commands and liked it, so I might well use that in future for simple and complex CLI apps.
mneorr has quit [Ping timeout: 256 seconds]
<banisterfiend`>
Spooner: do u prefer it to slop
ramblex has joined #ruby
<Spooner>
I don't know, since I haven't used slop for subcommands, but I think when I peeked slop was cleaner.
fermion_ has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
ZachBeta has joined #ruby
fermion_ is now known as fermion
etehtsea has quit [Ping timeout: 248 seconds]
baphled has quit [Ping timeout: 248 seconds]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
br4ndon has joined #ruby
baphled has joined #ruby
justsee is now known as justsee|away
jesly__ has quit [Ping timeout: 245 seconds]
_br_ has quit [Excess Flood]
justsee|away is now known as justsee
lobak_ has quit [Ping timeout: 248 seconds]
nikeita has joined #ruby
_br_ has joined #ruby
Shrink has quit [Read error: Connection reset by peer]
_br_ has quit [Excess Flood]
lobak has joined #ruby
Foxandxss has joined #ruby
punkrawkR has joined #ruby
_br_ has joined #ruby
wpaulson has joined #ruby
dangerousdave has joined #ruby
Jackneill_ has joined #ruby
Tomasso has joined #ruby
jjang has quit [Ping timeout: 248 seconds]
jesly__ has joined #ruby
wpaulson_ has joined #ruby
akem has quit [Quit: Forget progress by proxy. Land on your own moon.]
wpaulson_ has quit [Client Quit]
akem has joined #ruby
wpaulson has quit [Ping timeout: 264 seconds]
cek has joined #ruby
ramblex has quit [Quit: ramblex]
<cek>
any mail distribution solution on ruby? with unsubscribe possibility per category, etc?
<shevy>
hmm dont think so... perhaps with some rails related app
areil_ has quit [Remote host closed the connection]
zodiac1111 has joined #ruby
baphled has quit [Read error: Connection reset by peer]
codespectator has quit [Read error: Operation timed out]
VegetableSpoon has quit [Remote host closed the connection]
<_axx>
Hey guys, i've read much about JRuby lately, is it possible to use JRuby equal to any other ruby implementation? Like nginx + unicorn and jruby for example?
zodiac1111 has quit [Ping timeout: 248 seconds]
yakko_slp is now known as yakko
davidpk has quit [Quit: Computer has gone to sleep.]
<Hanmac>
_axx jRuby cant use MRI's c-gems
<cek>
jruby is enterprise ready though
codespectator has joined #ruby
justinmcp has joined #ruby
_bart has joined #ruby
Stalkr_ has joined #ruby
zodiac1111 has joined #ruby
mwyrobek has joined #ruby
baphled has joined #ruby
davidpk has joined #ruby
mucker has joined #ruby
BiHi has quit [Quit: Computer has gone to sleep]
<_axx>
Do i need to compile my ruby code to use it with jruby or anything? I have very little to no experience with java. :/
WirIrrenUmher has quit [Ping timeout: 245 seconds]
Criztian has quit [Remote host closed the connection]
arietis has joined #ruby
berkes has joined #ruby
monkegjinni has quit [Remote host closed the connection]
cek has quit [Quit: жопа диридай диридиридай]
nikeita has quit [Quit: sleep]
nilg has quit [Remote host closed the connection]
cloud|office has quit [Read error: Connection reset by peer]
baphled has quit [Ping timeout: 264 seconds]
<JonnieCache>
_axx: if its pure ruby in theory it should just work. if its "normal" code then it probably will
ananthakumaran has quit [Ping timeout: 245 seconds]
ananthakumaran has joined #ruby
cantonic has quit [Ping timeout: 248 seconds]
DefV has quit [Ping timeout: 272 seconds]
<_axx>
I don't really get how i can use something like celluloid in an jruby app? FYI: i want to build an http crawler that calls (multi-threaded) ~1500 Urls and proccesses the result afterwards.
pskosinski has quit [Ping timeout: 245 seconds]
<JonnieCache>
ah you want jruby because of the absense of the GIL?
uris has joined #ruby
<JonnieCache>
regardless of that, if you look at the travis CI data for celluloid you will see that it works on jruby
cousine has quit [Read error: Connection reset by peer]
akem has quit [Quit: Forget progress by proxy. Land on your own moon.]
br4ndon has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<JonnieCache>
if its only 1500 urls then plugging in a whole actors framework seems like overkill
<JonnieCache>
i guess it depends how often you need to do it
<Bofu2U>
+1 for what JonnieCache said, I use em-http all day and it's as stable as a rock. Just make sure you don't forget :redirects if you need it. :)
Bofu2U has quit [Read error: Connection reset by peer]
uris has quit [Read error: Connection reset by peer]
Bofu2U has joined #ruby
<_axx>
i'm using em-http right now, but i want to split this across different machines. i have a server and many clients (on other servers) in my network. i want to start tasks on the master server, run tasks on the client and get back the result sto my master server. But i'm not quite sure where to start. :)
<JonnieCache>
if you need to distribute it then that does sound like a job for actors
<_axx>
yeah, i'm looking into celluloid's DCell right now
<_axx>
Bofu2U: JonnieCache: i really like em-http, but i need to split all the request across different IP adresses (monitoring of webservices from different countries)
<Bofu2U>
binding or proxies?
willb has quit [Ping timeout: 244 seconds]
chrismcg is now known as zz_chrismcg
akem has quit [Ping timeout: 255 seconds]
<Bofu2U>
I'm assuming proxies as you said different countries
<_axx>
hm, i think the problem is, that i need to perform different tasks on every client. So i have 1 url, but i need to perform different tasks against it, not only an http request.
<_axx>
so i think em-http proxies aren't the selution for my problem :S
<Bofu2U>
but it all stems from the fetch, right?
<Bofu2U>
Or can you process the other things without the fetch?
<_axx>
yes, i do network level tests AND http requests on the same url
<Bofu2U>
I got ya.
<_axx>
but i don't want to do everything on my master (to get the country split)
<Bofu2U>
right. so you have actual boxes in the other countries then
<_axx>
so i perform 5 tasks, from 10 different countries for example
strife25 has joined #ruby
<_axx>
yes
nikeita has joined #ruby
<Bofu2U>
are you running them as just proxy endpoints or actual processors?
<_axx>
not sure right now. i'm searching for the best solution
<_axx>
right now it's running only on one master server, without clients
<Bofu2U>
got ya
<_axx>
but i need to split that work, from the master to clients
<Bofu2U>
well, when it comes to that:
<Bofu2U>
if you do "the processing" on the master server, and use the country-specifics as just proxies you can use a $30/month VPS instead of a $80+ instance or whatever, depending on the severity of your processing. If it's just packet level tests & HTTP there won't be much difference to be honest
`brendan has joined #ruby
SeySayux has joined #ruby
geekbri has joined #ruby
<Bofu2U>
It's all up to you to be honest, about whatever you're comfortable with
<_axx>
yeah, i think i'll go with the celluloid/dcell model
<JonnieCache>
that celluloid thing does look like a good choice though
<JonnieCache>
]just from a very bried look at it
<_axx>
i like the idea of having a MQ between my master/cleints
<Bofu2U>
Personally if I was doing something like that, I'd throw them on a Rabbit queue but that's just ... where I call "home"
<canton7>
the gemfile relies on git. while plenty of people do this, I don't like it personally.yeah the base_uri looks odd like that.
<Bofu2U>
ahh ok, thanks for clarification
<DefV>
just looked it up too
<Bofu2U>
I was going to say "touche"
<DefV>
biggest issue I have is he's requiring me to instantiate the class, but having more then 1 instances won't work because he's calling the basic auth on the Client class
<Bofu2U>
yea
abra has joined #ruby
<DefV>
so r1 = Referly.new('a', 'b'); r2 = Referly.new('b', 'c') r1 is now using r2's credentials
alphabitcity has joined #ruby
Markvilla has joined #ruby
<DefV>
aha
<alphabitcity>
Bofu2U: sorry, my internet died..did you say anything after I dropped?
<DefV>
alphabitcity:
<DefV>
14:56 :: DefV:: biggest issue I have is he's requiring me to instantiate the class, but having more then 1 instances won't work because he's calling the basic auth on the Client class
<DefV>
14:57 :: DefV:: so r1 = Referly.new('a', 'b'); r2 = Referly.new('b', 'c') r1 is now using r2's credentials
williamcotton_ has joined #ruby
monkegjinni has joined #ruby
abra has quit [Remote host closed the connection]
Scorchin has left #ruby [#ruby]
abra has joined #ruby
abra has quit [Remote host closed the connection]
<alphabitcity>
DefV: isn't it creating a new instance of the client class though?
Mon_Ouie has quit [Read error: Connection reset by peer]
abra has joined #ruby
<DefV>
nope
flype has joined #ruby
<canton7>
'self.class.basic_auth key, secret'
brg has left #ruby [#ruby]
<alphabitcity>
DefV: lib/referly.rb Referly::Client.new(key, secret) .. shouldn't that create a new instance of the client class each time you call Referly.new?
<DefV>
which handles on the same Referly::Client class the 2 times
<alphabitcity>
ah I see
<DefV>
so allthough r1.object_id != r2.object_id
<DefV>
r1.class.object_id == r1.class.object_id
<DefV>
and that's where you're doing the auth and calling the requests on
<alphabitcity>
right, great catch..thank you.
TheShadowFog has joined #ruby
kpshek has joined #ruby
lorandi has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
TheHypnotist-- has quit [Quit: Leaving]
sepp2k1 has joined #ruby
linoj has joined #ruby
alphabitcity1 has joined #ruby
sepp2k has quit [Ping timeout: 264 seconds]
alphabitcity1 has quit [Client Quit]
alphabitcity has quit [Ping timeout: 248 seconds]
alphabitcity has joined #ruby
<alphabitcity>
sorry, internet died again..did anyone say anything? :/
nikeita has quit [Quit: sleep]
<Bofu2U>
"he needs to get better internet"
<Bofu2U>
:)
iamjarvo has joined #ruby
abra has quit [Quit: Leaving]
abra has joined #ruby
<JonnieCache>
or just start using irc in a shell
<alphabitcity>
;) .. just checked logs, don't think my last Q went through. was wondering if you have any thoughts on the proxy class pattern that I used? i haven't seen many gems that do something similar
<shevy>
JonnieCache hmm with what client?
chson_ has quit [Remote host closed the connection]
<JonnieCache>
irssi
<hoelzro>
irssi += 1
jrist-afk is now known as jrist
hunglin has quit [Quit: Leaving.]
noyb has quit [Quit: Leaving.]
ramblex has quit [Quit: ramblex]
<masak>
yeah, irssi.
tatsuya__ has joined #ruby
ramblex has joined #ruby
JarJar has left #ruby ["Leaving"]
ramblex has quit [Client Quit]
monkegjinni has quit [Remote host closed the connection]
abra has quit [Client Quit]
robbyoconnor has joined #ruby
abra has joined #ruby
asobrasil has joined #ruby
tatsuya_o has quit [Read error: Connection reset by peer]
<shevy>
perl :(
tatsuya_o has joined #ruby
<ccooke>
We need an irssi-but-ruby ;-)
hynkle has joined #ruby
alexduller has joined #ruby
alexduller is now known as ramblex
<hoelzro>
ccooke: what do you mean?
<ccooke>
Something very similar to irssi, but with ruby scripting.
<ccooke>
because it would be pleasant.
<shevy>
the only thing that scares me here is the ncurses stuff
<hoelzro>
ccooke: why not add it to irssi?
<ccooke>
and by need, I mean "idly want at this moment"
<ccooke>
hoelzro: entirely doable
tommyvyo has joined #ruby
<hoelzro>
exactly =)
<ccooke>
hoelzro: and I won't, for the same reason I wouldn't replace irssi at all: I'm too lazy :-)
<shevy>
yeah
<ccooke>
(also I have promised myself I wouldn't write any more irc clients)
<shevy>
too much work
justinmcp has quit [Remote host closed the connection]
<hoelzro>
I don't know; I think you could pretty much port the Perl layer to Ruby
tatsuya__ has quit [Ping timeout: 264 seconds]
davidpk has quit [Quit: Computer has gone to sleep.]
<ccooke>
That would be the Korn shell. POSIX standard
WirIrrenUmher has quit [Quit: Leaving.]
<ccooke>
the thing that bash stole most of its new features from up to about... what, 2003, 2004? when it started stealing more from zsh and inventing its own :-)
Solnse has quit [Ping timeout: 244 seconds]
gtuckerkellogg has joined #ruby
<kalleth>
ccooke: i started in coding through writing mIRCScript
dv310p3r has joined #ruby
<shevy>
bash is quite ok actually. I like that it is simple
<shevy>
but shell scripts STINK
nari has joined #ruby
<kalleth>
you realise shell scripts drive pretty much the entire hosting and open source dev community
<kalleth>
right? :p
nopolitica has joined #ruby
<shevy>
for some fossil coders perhaps
<kalleth>
our daily build+deploy process is a set of cronjobs that trigger several different shell scripts
<shevy>
for myself, I use ruby
<kalleth>
no reason why not
<kalleth>
but even so
<kalleth>
'do it manually, type history, copy to script, enhance'
a_a_g has quit [Quit: Leaving.]
<kalleth>
is pretty cool, workflow-wise
<kalleth>
:)
<ccooke>
shevy: shell scripts are wonderful. If you're solving the right problems
wvms has joined #ruby
<ccooke>
shevy: (actually, Ruby reminds me a lot of the nicer features of shell)
<shevy>
better than ruby how? ;P
JustinCampbell has quit [Remote host closed the connection]
<kalleth>
it's not "better"
<kalleth>
its just "different"
<shevy>
ok
JustinCampbell has joined #ruby
<ccooke>
shevy: if what you've working with is external binaries or discrete files and directories, then shell is better than ruby.
<shevy>
shell scripts are about 1000 worse than a ruby script
<kalleth>
i've never met an awesome programmer who talked about one language as "better" than another
<kalleth>
apart from PHP
<kalleth>
everyone hates on PHP
<kalleth>
that's fine and acceptble
<shevy>
how so? x = `avinfo *.avi` works in ruby too
<kalleth>
you match the languaeg to the requirements
nopolitica has quit [Client Quit]
<shevy>
that is like saying all languages are equal
<ccooke>
kalleth: different languages are better for different things
<kalleth>
precisely, ccooke
jxf has quit [Ping timeout: 248 seconds]
<ccooke>
kalleth: "better" does come in to it, but only when the problemspace is known.
<kalleth>
no language is empirically better than another, is what I was saying
<kalleth>
again, with the exception of PHP :p
<shevy>
ok so php is better than ruby on the www
<kalleth>
..
<ccooke>
If what you need to do is start *this* binary if *that* file exists, then shell is the most pleasant way to do it.
<kalleth>
get out
<kalleth>
php is never better than anything at anything
<shevy>
:)
<ccooke>
kalleth: yes it is.
<kalleth>
write it in haskell for all i car
<kalleth>
e
<shevy>
well
<shevy>
php still leads compared to ruby on TIOBE
<X-Jester>
php with perl regex is better than a static html page?
<kalleth>
ccooke: making developers jump off tall buildings?
<X-Jester>
:P
<ccooke>
kalleth: It's *much* better for honeypots...
bbttxu has joined #ruby
<kalleth>
lmao
Petit_Dejeuner has joined #ruby
<shevy>
static html pages are a bit limited
<kalleth>
no
<kalleth>
they're not
<kalleth>
you serve a static HTML page, a static JS file
tchebb has joined #ruby
<kalleth>
which sets up your view/interface
<kalleth>
and connects to your REST API
<kalleth>
boom
<X-Jester>
by static html page, i sort of implied no data connectivity whatsoever
workmad3 has quit [Read error: Operation timed out]
<shevy>
I like the idea behind wikis
<Petit_Dejeuner>
I wouldn't assume a static html page includes a JS file...
<kalleth>
meh
<kalleth>
include the source for an AMD Loader in the <head>
niklasb has quit [Ping timeout: 264 seconds]
<Petit_Dejeuner>
Any good libraries besides Rails? (not neccesarily web)
<kalleth>
Petit_Dejeuner: for what
hynkle has quit [Ping timeout: 264 seconds]
<Petit_Dejeuner>
I'm not sure, I really just need something to play with, maybe something like Python's twisted?
<kalleth>
Petit_Dejeuner: sinatra is pretty cool
<JonnieCache>
the equivalent of twistd is eventmachine
<kalleth>
also, yeah
<kalleth>
EM
<Petit_Dejeuner>
I'll check them out, thanks.
<kalleth>
daemon-kit i like (write a ruby process ontop of EM)
<ccooke>
is eventmachine as bad as I've heard? Not used it myself
<JonnieCache>
sinatra is like flask
<JonnieCache>
(or rather the other way round i think)
<kalleth>
ccooke: *shrug*, i never use raw EM, i use stuff layered ontop like D-K
<kalleth>
or bayeux
<kalleth>
*faye
<ccooke>
*nod*
<ccooke>
I should take a look at more of these
<JonnieCache>
EM is fine it most circumstances but it apparently does have some weird aspects which frustrate people
<Petit_Dejeuner>
So I can generate html pages with sinatra and flask?
hynkle has joined #ruby
<Petit_Dejeuner>
I just need a template?
<JonnieCache>
but like kalleth said if you use libs on top of it then you can avoid that
<shevy>
guys, question
<shevy>
if ! @foo
<shevy>
vs
<shevy>
if not @foo
<shevy>
what is better
<ij>
not
<masak>
"better"? :)
<ij>
Because it's verbose.
<ij>
And yeah, "better" is subjective.
<masak>
they're functionally equivalent. one is shorter, the other is an English word.
<Petit_Dejeuner>
'!' is easier for me to read, because the not and if blur together...
<shevy>
yeah
<masak>
in other cases, they might have different precedence. that's why there's two of them, really.
<masak>
but in this case, it doesn't matter.
<masak>
be consistent :)
<Petit_Dejeuner>
unless @foo
<shevy>
ok so we have ... one is in favour of "!" the other in favour of "not", and the third one has no preference
* masak
.oO( @foo or ... ) :P
<X-Jester>
NO, conditioner is better, i make the hair shiny and smooove
<shevy>
I need more opinions!
joshman_ has joined #ruby
<JonnieCache>
they have different presedence!
<shevy>
hmm true
<masak>
shevy: be brilliant. be creative. listen to suggestions but be your own thing.
<JonnieCache>
dont get bitten by that shit!
tzvi|work has joined #ruby
<JonnieCache>
i know its tempting to put "not" and "and" in your code but understand what it does first
<JonnieCache>
or the resultant bugs will drive you insane
<masak>
full ACK
<Petit_Dejeuner>
Why not 'if not not not'? It's obvious what it does, and the 'if' and 'not' don't blur together.
<shevy>
well ok see
<Petit_Dejeuner>
I think it's an elegant soloution
<X-Jester>
shevy: shell scripts are easy for general purpose system administration tasks and tasks where the binaries in use were written to run by shell scripts. i've actually got a custom system deployment tool using chef that's 90% ruby, 10% bash for this reason
<shevy>
for a while I have used both "if !" and "if not" and "unless". and it's not making me happy to use all of this
<X-Jester>
shevy: unless that was not the opinion you were asking for, in which case i'm an idiot.
<shevy>
and so far, I am unhappiest with "if not", for some reason
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<shevy>
especially when I also use "if !" in other .rb scripts...
<X-Jester>
shevy: to that end, i'm an if ! kinda guy.
<shevy>
hehe ok
<Petit_Dejeuner>
shevy, does 'object' have a not method?
<Hanmac>
information the "!" is a method and it can be overriten :P
<shevy>
Petit_Dejeuner, object?
<Petit_Dejeuner>
base object
<Petit_Dejeuner>
Hanmac is right, myObj.!
<X-Jester>
shevy: although from my perl days, i might have happily thrown an unless in my ruby code.
<shevy>
aha
bluenemo_ has quit [Quit: Verlassend]
<hoelzro>
I thought not/! could not be overridden
<hoelzro>
I thought just != could not
twinturbo has quit [Quit: twinturbo]
<shevy>
how do you define "!" as method then ?
<hoelzro>
s/not/be
<Petit_Dejeuner>
'myObj.! = myFunc'?
<Hanmac>
like you define -abc as method
<Hanmac>
!@ and -@
<shevy>
X-Jester, well, unless is ok. I can avoid the "!" in this case... but the "if !" vs "if not" drives me crazy
robbyoconnor has quit [Read error: Connection reset by peer]
<X-Jester>
yeah, i don't care for 'if not' myself
bluenemo has quit [Read error: Connection reset by peer]
<X-Jester>
i've used not_if sometimes when chef code provides it
<shevy>
you can define -abc as a method?
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
workmad3 has joined #ruby
stopbit has joined #ruby
<Hanmac>
i mean the - before the abc
bluenemo has quit [Remote host closed the connection]
<shevy>
aha
Morkel has quit [Quit: Morkel]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
chichou_ has joined #ruby
chichou has quit [Ping timeout: 252 seconds]
<Hanmac>
"-1.2" is interpreted as a number while "- 1.2" is a method call
futurecode has joined #ruby
<Petit_Dejeuner>
I have a problem. I have a desire to understand languages in full before I consider myself 'good' at them. So languages like Perl and Ruby don't appeal to me because they're complex in such a way that it's difficult to understand them. They have all these quirks like the precedence of 'not' and '!'. Should I just code things and look up quirks when I run into a problem, is that how Ruby and Perl are usually approached?
<JonnieCache>
use only the bits you understand
<Bofu2U>
what he said
<workmad3>
Petit_Dejeuner: all languages have syntax quirks
<JonnieCache>
most people never use "and" "not" etc
<Petit_Dejeuner>
workmad3, some are rather simpler
<workmad3>
Petit_Dejeuner: unless it's a language without syntax
<Petit_Dejeuner>
((((lisp)lisp)))
jesly__ has joined #ruby
<workmad3>
Petit_Dejeuner: and in fairness, if all you consider it takes to be 'good' with a language is mastering syntax... that's really just the first stage
<shevy>
Petit_Dejeuner yeah, it takes a long time to really be good in any complex language
<JonnieCache>
technically lisp is *only* syntax isnt it? :)
<shevy>
I'd love to see a language, simpler than ruby, but more elegant, and with more new ideas too
<workmad3>
JonnieCache: lisp is really easy syntax too :)
<shevy>
s/more elegant / as elegant
<Petit_Dejeuner>
workmad3, alright, maybe I mispoke, I consider myself good when I've made things I consider non-trivial in the language, I'm not an 'expert', but I'm 'good'
awarner has joined #ruby
<workmad3>
Petit_Dejeuner: right... and in that case, you don't need to know the ins and outs of every syntax quirk
* Hanmac
thinks that ruby can be elegant too ... if it wants
<JonnieCache>
shevy: go is the thing i want to learn next, but i never seem to have the time. too many hobbies...
<shevy>
hehe
twinturbo has joined #ruby
<JonnieCache>
it doesnt have any new ideas, but thats kinda the point
<shevy>
my next language will be nimrod... as soon as it has more useful docs
crankycoder has joined #ruby
carlyle has joined #ruby
<workmad3>
shevy: yeah... it's almost tempting to take a subset of ruby that drops a bit of the optional syntax that is less used but causes quirky behaviour :)
<shevy>
I used to dislike the ruby documentation, but in 2012 the ruby documentation is not so bad. and significantly better than nimrod. python documentation is also fine, I like the "online book style"
<Petit_Dejeuner>
When I first started with Python I didn't know about __init__.py, self, list comps, op overloading... I couldn't read other peoples code, so I just sat down and read two o'reillys books. It helped. It's just a pain to learn Ruby and feel like I'm not sure about things. It's like I'm doing internet tutorials for C++ all over again.
<workmad3>
shevy: I'd be interested to know what you class as new ideas though... there haven't really been new ideas in a programming language for years :)
twinturbo has quit [Client Quit]
futurecode has quit [Ping timeout: 248 seconds]
<shevy>
workmad3, yeah. I wonder though, if this comes because ruby tries to be creative and encourage more than one way to think about something. I'd like something like a mix of ruby and python
<DefV>
for my reference, what do you consider 'quirks' in ruby workmad3
<shevy>
I actually found python code easier to understand at a first glance
<shevy>
I hate the __bla__ names though and I hate explicit self
<workmad3>
DefV: something like 'some_method {foo: "bar"}'
<DefV>
k :-)
<Petit_Dejeuner>
shevy, I hate __ too, but at least it makes it easy to recognize certain code
<DefV>
how would you prevent that
<workmad3>
DefV: and yeah, 'self.whatever = "foobar" ' if you want to use a setter method
futurecode has joined #ruby
<Petit_Dejeuner>
shevy, "hehe"?
<shevy>
Petit_Dejeuner the part about "It's like I'm doing internet tutorials for C++ all over again."
<workmad3>
DefV: I'm not sure... maybe if blocks and hashes didn't share a syntax token, although that would be a fairly large scale change
<shevy>
I read some of these myself
shiki has quit [Remote host closed the connection]
<workmad3>
DefV: and there's obviously a limited number of tokens...
<shevy>
blocks are awesome
nu7hatch has joined #ruby
<Petit_Dejeuner>
JonnieCache, I have the book, maybe I'll give it another try. It just feels overwhelming. Eh, you guys are right. I'll just hack a bunch of stuff together. I'll make Larry Wall and Matz proud.
<shevy>
Enumerators are too
<JonnieCache>
yeah tbh just hack stuff
wangr_ has joined #ruby
<shevy>
class vs. module distinction I don't like myself
<shevy>
@@class_vars are useless
peregrine81 has joined #ruby
<workmad3>
shevy: yeah, could easily drop class vars... not sure about dropping the class/module distinction... that would potentially introduce multiple inheritance issues
<shevy>
ok but that is not the only thing
<Petit_Dejeuner>
Eh, all my class variables in Python are used for singletons... Because that's the only design pattern I can get to work.
<shevy>
I saw apeiros use class Foo; class Bar. I asked why not module Foo; class Bar. and he said, class Foo toplevel gives him more options (Foo.new)
<shevy>
and this is how I always feel myself when using modules... I feel limited! :(
<Hanmac>
shevy: class Fixnum def -@ self end end; 1 + - 2 #=> 3
<Petit_Dejeuner>
JonnieCache, imagine writing a parser for that.
<JonnieCache>
id rather not
<workmad3>
shevy: sometimes limits are just what you need :P
<shevy>
hehe
<shevy>
I dunno
<shevy>
I gave up on PHP man
<Petit_Dejeuner>
JonnieCache, fine, image a lexical parser
<Petit_Dejeuner>
imagien*
<Petit_Dejeuner>
...
wangr__ has joined #ruby
<shevy>
monkeys could design a better language than the PHP devs
alekst has quit [Ping timeout: 248 seconds]
<workmad3>
shevy: I tend to take a more semantic view tbh... I'll use a class when I want something more concrete, and I'll use a module when I want something more 'interfacy'
<shevy>
ok but
<JonnieCache>
lol i can imagine a lexical parser its not rocket science. id just rather not imagine what itd be like to actually have to write one for that diagram
wangr has quit [Read error: Operation timed out]
<JonnieCache>
i like an easy life
<shevy>
workmad3, do you subclass a lot?
<JonnieCache>
;)
<workmad3>
shevy: not a hard and fast rule... and I also use modules for namespacing
twinturbo has joined #ruby
<workmad3>
shevy: no
<shevy>
see!
<workmad3>
shevy: composition > inheritance
<shevy>
this is where I all think, things don't fit into one another perfectly well
<shevy>
one million different styles of ruby code
<shevy>
perhaps matz' secret plan is to allow all those styles so noone can find a better language
wangr has joined #ruby
<workmad3>
shevy: I think most OO languages make inheritance far too easy for the strongest and most rigid association between two things :)
<apeiros>
shevy: na, it's not about "more options"
<apeiros>
it's that my namespace itself was a class too
<workmad3>
shevy: but in the end... there is no single right answer... there is no one true way
<apeiros>
I use a module whenever my namespace does not need to be a clas
<apeiros>
*class
<apeiros>
or when I want to be able to include it
<JonnieCache>
iirc it is deliberate that ruby allows a million styles
<shevy>
hehe always such a tradeoff
<shevy>
if I could just include classes like I could with modules...
<JonnieCache>
its a counterpoint to pythons "one way to do any given thing"
<workmad3>
JonnieCache: it inherits the 'there is no one true way' ethos from perl :)
<JonnieCache>
exactly
zodiac1111 has joined #ruby
wangr___ has joined #ruby
<Petit_Dejeuner>
I just love having symbols.
ananthakumaran has quit [Quit: Leaving.]
<workmad3>
shevy: what if you could just inherit modules like you can classes!
wangr_ has quit [Ping timeout: 245 seconds]
<shevy>
workmad3, well alright... I inherit very rarely myself actually
<Petit_Dejeuner>
What if there was a language where files were classes.
<workmad3>
shevy: :)
<JonnieCache>
workmad3: what would be the point of that? you can already compose them
<workmad3>
JonnieCache: exactly :P
<shevy>
Petit_Dejeuner isn't that with Eiffel the case?
justsee has quit [Quit: Leaving...]
<workmad3>
JonnieCache: I was making a point from absurtity
<Petit_Dejeuner>
shevy, I was thinking Java *wink* *wink* *nudge* *nudge*
<JonnieCache>
ah ok i wasnt following that part of the conv properly :)
tommyvyo has joined #ruby
<workmad3>
Petit_Dejeuner: what about anonymous inner classes in java?
<JonnieCache>
LOL
<workmad3>
Petit_Dejeuner: or non-public classes? it's not one-class per file then :P
<JonnieCache>
id forgotten about those
wangr__ has quit [Ping timeout: 252 seconds]
<johnernaut>
what about javascript where everything is everything and things that dont work, work
<johnernaut>
seems legit
<JonnieCache>
i kinda respect javascript for just being balls-out crazy though
<Petit_Dejeuner>
workmad3, eh fine, my pet language (which will be done in 2032) is setup so that each file is a class, the namespace is the entire directory
<workmad3>
johnernaut: I saw a great bit of JS the other day
<johnernaut>
When I see large amounts of javascript my head implodes
<Petit_Dejeuner>
JonnieCache, I hate it for it. Freaking truthy and falsey values...
<Petit_Dejeuner>
Prototypes are cool though
<workmad3>
johnernaut: it was an 'error steamroller'... it would get your JS working no matter what... by waiting for an execution, crawling the backtrace, removing the offending line and re-evalling :D
<workmad3>
johnernaut: and it would do this until the code ran without exceptions...
<JonnieCache>
Petit_Dejeuner: yeah the implicit casting is perhaps the worst bit
<workmad3>
s/execution/exception
apacala has joined #ruby
<johnernaut>
wow
<Petit_Dejeuner>
I. Hate. Type. Coercion.
<JonnieCache>
workmad3: i saw that. hilarious.
chson has joined #ruby
<workmad3>
JonnieCache: what's wrong with the implicit casting? I mean, {} + {} makes sense
ThaDick has joined #ruby
wangr has quit [Ping timeout: 245 seconds]
<JonnieCache>
its fine in general. javascript takes it too far
<JonnieCache>
like php
baphled has quit [Read error: Connection reset by peer]
<Petit_Dejeuner>
workmad3, "3" + 3
<JonnieCache>
ruby gets it just right imo
baphled has joined #ruby
wangr has joined #ruby
<workmad3>
Petit_Dejeuner: {} + {} is better :)
dhruvasagar has quit [Ping timeout: 264 seconds]
<workmad3>
Petit_Dejeuner: JS says it as it is... {} + {} is NaN
<shevy>
I dont like javascript
<Petit_Dejeuner>
workmad3, well, that is true, {} + {} is not NaN
<shevy>
what I wonder is, why is it called a prototypic OOP language, but it uses function() everywhere?
<workmad3>
Petit_Dejeuner: and don't forget... 0 + {} vs {} + 0 :)
wangr_ has joined #ruby
<workmad3>
shevy: because everything is an object and objects use protype inheritance
wangr___ has quit [Ping timeout: 252 seconds]
<Petit_Dejeuner>
shevy, I thought that was the style of class and instance creation?
<workmad3>
*prototype
<workmad3>
Petit_Dejeuner: there are no classes in JS... just objects
<shevy>
are function objects in JS?
<Petit_Dejeuner>
workmad3, functions that create objects are like templates
<hoelzro>
shevy: yes
<Petit_Dejeuner>
shevy, yes
<workmad3>
shevy: yes
<hoelzro>
haha
<Petit_Dejeuner>
lol
<shevy>
hmm ok then it makes sense
jrist is now known as jrist-afk
<hoelzro>
prototypes, as a concept, are pretty cool and quite powerful
<workmad3>
^^
<JonnieCache>
thats why everyone likes it. js would not be flavour of the months if it didnt have first class functions
<hoelzro>
and they avoid all those metaclass shenanigans
<hoelzro>
1st class functions are also nice
<workmad3>
as long as you remember that this.method is not the same as this.method() :)
<JonnieCache>
i HATE that
<DefV>
same
<Petit_Dejeuner>
map(lambda x : x * x, range(10)) <-- VALID PYTHON, TAKE IT GUIDO
chussenot has joined #ruby
<workmad3>
(and annoyingly, this is also true in coffeescript, where you can do this.method arg1, but not this.method)
<DefV>
workmad3: there's no way around that, sadly
<shevy>
I think guido lost the way with python3
<workmad3>
DefV: there would be... you can introduce a new syntax token to grab the function
<Petit_Dejeuner>
Python Lambdas disgust me, and the worst thing? People defend them! "If we added side effects to lambdas they wouldn't be pure."
<Petit_Dejeuner>
Like I care
<hoelzro>
workmad3: Perl 6 does &method
<workmad3>
DefV: they're already requiring a parse step, and changing JS syntax...
<hoelzro>
I think it's $object.&method to grab the method object
wangr has quit [Ping timeout: 252 seconds]
<workmad3>
hoelzro: yeah, that could would... obj.&method to get the method, obj.method to call it
<hoelzro>
whereas $object.method calls it
kvirani has quit [Remote host closed the connection]
baphled has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
baphled has joined #ruby
<shevy>
JS syntax is changed?
<workmad3>
hoelzro: although I guess it could run into trouble down the line... e.g. how do you handle 'variable = obj.&method; variable'
<workmad3>
shevy: coffeescript is a language that compiles into javascript
<shevy>
ah coffeescript
cakehero has joined #ruby
sailias has joined #ruby
jimeh has quit [Quit: bye]
fearoffish has joined #ruby
mockra has joined #ruby
tommyvyo has joined #ruby
bwlang_ has joined #ruby
bwlang_ has quit [Client Quit]
<hoelzro>
workmad3: variable.()
<workmad3>
hoelzro: hmm, interesting :)
<workmad3>
hoelzro: I sense a new coffeescript variant brewing :)
internet_user has joined #ruby
<aces23up>
what is the best way to compare two files for differences? like git does?
MissionCritical has quit [Ping timeout: 260 seconds]
<DefV>
but eh.. most definitions are doon by: obj.stuff = function () {}
<DefV>
basically obj.stuff is a variable
<jrajav>
aces23up: man diff
zommi has quit [Remote host closed the connection]
<workmad3>
DefV: in JS, yes
<aces23up>
jrajav what about a ruby library?
sapht has quit [Quit: leaving]
<workmad3>
DefV: that doesn't mean CS has to follow the same conventions... but yes, I see your point that it has wide ramifications and would probably require a CS compiler that was more type aware
twinturbo has quit [Quit: twinturbo]
mockra has quit [Remote host closed the connection]
kevinbond has joined #ruby
mikepack has joined #ruby
djdb has quit [Remote host closed the connection]
snearch has quit [Quit: Verlassend]
alphabitcity has quit [Quit: Leaving.]
wangr_ has quit [Ping timeout: 248 seconds]
ackz has joined #ruby
nari has quit [Ping timeout: 255 seconds]
hunglin has joined #ruby
greasegum has joined #ruby
Avishek12 has joined #ruby
Solnse2 has quit [Ping timeout: 240 seconds]
jimeh has joined #ruby
wangr has joined #ruby
nateberkopec has joined #ruby
DrShoggoth has joined #ruby
pdelgallego has joined #ruby
blazes816 has joined #ruby
<Avishek12>
hey everyone!
wangr_ has joined #ruby
MissionCritical has joined #ruby
hunglin has quit [Quit: Leaving.]
Avishek12 has quit []
wangr has quit [Ping timeout: 248 seconds]
pdelgallego has quit [Read error: Connection reset by peer]
pdelgallego has joined #ruby
jrist-afk is now known as jrist
mikepack has quit [Remote host closed the connection]
bigkm has quit [Quit: Computer has gone to sleep.]
nateberkopec has quit [Quit: Leaving...]
adeponte has joined #ruby
cousine_ has quit [Ping timeout: 264 seconds]
gift has quit [Ping timeout: 276 seconds]
norm has joined #ruby
kvirani has quit [Ping timeout: 244 seconds]
lupine_85 has joined #ruby
cousine_ has joined #ruby
hoelzro is now known as hoelzro|away
deryl has joined #ruby
oscardelben has quit [Quit: oscardelben]
cousine has quit [Ping timeout: 264 seconds]
mengu has quit [Quit: Konversation terminated!]
Criztian has joined #ruby
kenichi has joined #ruby
chussenot_ has joined #ruby
nateberkopec has joined #ruby
chussenot has quit [Ping timeout: 252 seconds]
chussenot_ is now known as chussenot
Draco_ has joined #ruby
iamjarvo has joined #ruby
atmosx has joined #ruby
bigkm has joined #ruby
wangr_ has quit [Read error: Operation timed out]
wangr has joined #ruby
DukeDave has joined #ruby
hoelzro|away has quit [Ping timeout: 272 seconds]
cloud|windoze has joined #ruby
<Stava>
Where do I find documentation on ARGV? I can only seem to find documentation on ARGF.
ttilley_off is now known as ttilley
wilmoore has quit [Remote host closed the connection]
<Stava>
Actually what I want to do is to read an optional argument "--path=...", and then delete it so that I may use ARGF.read
<apeiros_>
Stava: there isn't all that much to say about ARGV
bglusman has joined #ruby
<apeiros_>
it's a plain array, containing all arguments passed to the script
iamjarvo has quit [Quit: Computer has gone to sleep.]
aganov has quit [Quit: aganov]
hoelzro|away has joined #ruby
_0riginaI has quit [Ping timeout: 245 seconds]
carlyle has quit [Ping timeout: 252 seconds]
wvms has quit [Quit: wvms]
Nies has joined #ruby
<canton7>
Stava, maybe look at things like OptionParser, trollop, etc?
<Stava>
canton7: I'm reading on OptionsParser now, thanks
Eldariof-ru has quit [Ping timeout: 248 seconds]
<canton7>
there are people who like it, and people who say it's unwieldly and prefer something like trollop. I'd advise looking at both
billiamii has joined #ruby
vlad_starkov has joined #ruby
ph^ has quit [Remote host closed the connection]
<xclite_>
I found OptionParser unwieldy, myself, though it's really nice once you get it working
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
_0riginaI has joined #ruby
Jackneill has quit [Quit: Jackneill]
cantbecool has joined #ruby
vitoravelino is now known as vitoravelino`afk
<Petit_Dejeuner>
Is Ruby 1.8 depreciated or is it like the Python2.7 vs Python3 thing?
ewag_ has quit [Read error: No route to host]
<xclite_>
1.8 is still pretty common
lupine_85 has quit [Changing host]
lupine_85 has joined #ruby
cantbecool has quit [Client Quit]
<canton7>
but reaching end-of-life real soon now?
<blazes816>
Petit_Dejeuner: use 1.9. it's not like Python2 vs 3. 1.8 is still in use, but being phased out.
<xclite_>
1.9 is better by far
<Petit_Dejeuner>
Alright, 1.9 it is
<blazes816>
i don't know i'd say it's "deprecated"
<xclite_>
basically there's no reason to use 1.8
<xclite_>
if you can get to 1.9
<Petit_Dejeuner>
But 1.9 isn't backwards compatable in all cases
<Petit_Dejeuner>
?
<blazes816>
no, it isn't
wrapids has quit [Read error: Connection reset by peer]
<lectrick>
How do I "puts `some shell command`" and see the output as it actually occurs instead of after it's done?
<apeiros_>
Petit_Dejeuner: deprecated
<blazes816>
wait, nevermind, I think I misunderstood you
wilmoore has joined #ruby
<apeiros_>
Petit_Dejeuner: 1.9.3 is the ruby version recommended for production
<lectrick>
Petit_Dejeuner: Use 1.9. Don't even question.
<Petit_Dejeuner>
apacala, I can't spell, aparantly.
<Petit_Dejeuner>
Okay, 1.9 it is.
Morkel has joined #ruby
zommi has joined #ruby
WirIrrenUmher has left #ruby [#ruby]
jgrevich has joined #ruby
TorpedoSkyline has joined #ruby
<shevy>
long live 1.8
vitoravelino`afk is now known as vitoravelino
<TorpedoSkyline>
lol why?
<shevy>
no Encoding shit in it
<TorpedoSkyline>
…you mean automatically detect encoding?
nooodl has quit [Ping timeout: 252 seconds]
<Petit_Dejeuner>
I don't see why encoding is so important. Wouldn't it be easy just to use unicode and call it a day?
<shevy>
no, the need to make modifications to otherwise perfectly well working .rb files, that used to work in 1.8 but now no longer do, unless the magic comment is added after the sbehang line of the .rb file in question
<shevy>
Petit_Dejeuner, what if you dont use unicode
<Petit_Dejeuner>
shevy, you're screwed, but that's how standards go
<shevy>
yeah, I suppose if you use unicode, you are better off
<blazes816>
unless you're racist
<Petit_Dejeuner>
Then it's time for ANSI.
<shevy>
hmm racist?
davidpk has joined #ruby
<shevy>
ANSI is cool but too simple
<apeiros_>
shevy: if you want the same behavior as in 1.8, then just treat everything as binary.
<blazes816>
shevy: at work we joke that anything not using unicode is racist
<Petit_Dejeuner>
That's the point, we don't want to support those foreigners with their accents, ANSI STRONG.
<apeiros_>
I believe you mean ascii
adeponte has quit [Remote host closed the connection]
<shevy>
yeah apeiros_ most of my .rb files have "# Encoding: ASCII-8BIT"
<Petit_Dejeuner>
apeiros_, that I do, I feel dumb
nopolitica has joined #ruby
<shevy>
I do think I can remember that there are still problems though, in libraries of other people, or something like that
adac has quit [Ping timeout: 264 seconds]
lorandi has quit [Quit: Leaving]
benson has joined #ruby
nateberkopec has quit [Quit: Leaving...]
Dal3k has left #ruby [#ruby]
mahmoudimus has joined #ruby
baphled has quit [Ping timeout: 245 seconds]
greasegum has quit [Ping timeout: 248 seconds]
otters has quit [Ping timeout: 245 seconds]
otters has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
nadirvardar has joined #ruby
bbttxu has quit [Quit: bbttxu]
verbad has quit [Quit: verbad]
nari has quit [Ping timeout: 248 seconds]
badkins has joined #ruby
Guest69990 has joined #ruby
kvirani has joined #ruby
apok has quit [Quit: apok]
<badkins>
Is anyone aware of a serious performance degradation with 1.9.3-p194 ? I upgraded from 1.9.3-p125 and a 44 second task took 153 seconds. I had to revert back to p125 to get acceptable performance.
<badkins>
Google didn't reveal much re: regressions
<apeiros_>
since ruby definitively did not get 250% slower overall
wallerdev has quit [Quit: wallerdev]
Stalkr_ has quit [Quit: Leaving...]
<badkins>
apeiros_: that may be. I'm a little burned out after spending 8 hours identifying the problem, and p125 is working fine for me. I have trouble believing this issue is isolated to me. I was just curious if others had experienced slowdowns.
<blazes816>
Petit_Dejeuner: who says that? it's perfect!
weasels has quit [Client Quit]
otters has joined #ruby
<Petit_Dejeuner>
blazes816, everyone who uses pyth- oh
<blazes816>
Petit_Dejeuner: but seriously, it's on par with python's at least. and there's much mroe variety.
jhunter has quit [Ping timeout: 264 seconds]
<badkins>
apeiros_: this task involves creating a 11MB XML (plist specifically) string
<apeiros_>
badkins: well, once you isolated the specific part where p194 is so much slower, it'll be easier to find people who experience the same
<badkins>
so I'm guessing string related garbage collection or resizing
<blazes816>
Petit_Dejeuner: depending on what you're doing, look into jruby or rubinious in addition to MRI (the main interpreter)
<Petit_Dejeuner>
blazes816, well, it's not like I'd ever make something that would slow down because of something besides poor coding on my part
<apeiros_>
if you have a reproducable case, I (and others) can also try to see whether it's the same for them
<blazes816>
haha
SegFaultAX has joined #ruby
jhunter has joined #ruby
<badkins>
apeiros_: unfortunately, it's a very complicated piece of a large Rails app. If the next Ruby release exhibits the same behavior, I'll dig further to avoid being stuck on p125 forever
cakehero has quit [Quit: Leaving...]
<Petit_Dejeuner>
Is the standard Ruby implementation boot strapped?
samuel02 has joined #ruby
<Petit_Dejeuner>
I don't see how rubinous could be useful otherwise.
moon11 has left #ruby [#ruby]
<shevy>
I think rubinius is quite dead now
bradhe has quit [Remote host closed the connection]
<blazes816>
really? i'm not in that scene but thought it was still kickin
<badkins>
apeiros_: one clue is that it seemed to be very costly to simply refer to a serialized attribute which uses YAML to deserialize. There have been YAML issues in the past - many bugfixes, etc.
<shevy>
evans quit this year
<blazes816>
that sucks
<blazes816>
Petit_Dejeuner: MRI is written in C
<Petit_Dejeuner>
blazes816, seams odd that a C++ implementation would be faster, but what do I know
<shevy>
well they use a VM don't they?
<shevy>
jruby is very fast too, once started :D
<shevy>
but one must have java...
<blazes816>
MRI uses YARV, yeah
<blazes816>
jruby is a beart to startup but you can't stop that thing once it's going with kill -9
<blazes816>
without*
indstry has joined #ruby
pdelgallego has quit [Ping timeout: 255 seconds]
Stalkr_ has joined #ruby
ephemerian has quit [Quit: Leaving.]
<Petit_Dejeuner>
It would be cool if the parrot VM got a bunch of attention, open source, powerful, I bet we could get it to support tail recursion
cakehero has joined #ruby
pdelgallego has joined #ruby
<blazes816>
Petit_Dejeuner: I used to try and contribute, but they couldn't get they're house in order
<blazes816>
which is a surprise from the writers for Perl6
<Petit_Dejeuner>
haha, sarcasm
<Petit_Dejeuner>
To me I see Ruby as a replacement for Perl.
<blazes816>
that's sad
<blazes816>
there's room in my heart for both
khakimov has joined #ruby
<blazes816>
and room in the closet for perl
<Petit_Dejeuner>
heh
j| has joined #ruby
<Tasser>
I don't code any perl but I'm currently wearing a "SwissArmy::Chainsaw" T-Shirt :-)
<Petit_Dejeuner>
Tasser, Larry Wall would be proud.
Jackneill has joined #ruby
<shevy>
perl6 really kinda killed itself by not being able to push forward
<Petit_Dejeuner>
Feature creep, wasn't it?
<shevy>
now perl5 is the more active variant, which is kinda odd
Jackneill is now known as Guest4802
<sernin>
It was more than that. It was essentially a lack of direction entirely.
<Petit_Dejeuner>
Time to make perl7.
<shevy>
yeah
<shevy>
they missed the mojo of larry :)
shadoi has quit [Quit: Leaving.]
strife25 has joined #ruby
carloslopes has joined #ruby
<shevy>
if matz would be gone, ruby would not be ruby anymore
<Petit_Dejeuner>
If _why woul dbe gone, ruby would not- oh wait
<Petit_Dejeuner>
Where is he anyway?
<shevy>
_why projects yes
<shevy>
but ruby as a whole, has not changed *that* much without _why
cbuxton has joined #ruby
<shevy>
it's mostly... hmm... shoes... the _why cats ... hpricot I think... yaml a bit too? not sure what else...
<shevy>
dunno where he is
<Petit_Dejeuner>
Anyone going to do something for whyday?
i0n has joined #ruby
codespectator has quit [Ping timeout: 252 seconds]
the_jeebster has joined #ruby
<carloslopes>
no one knows where is he :/
<Stava>
After running OptionParser, can I call the method for a certain switch? I've pasted my code here http://pastie.org/private/gjzgawnpaqnmoa26ir7tw to illustrate on line 27. Also since this is my first piece of ruby code I would appreciate any input on code quality/correctness
prometheus has joined #ruby
ericcoleman has joined #ruby
<shevy>
I dont like optionparser much
alexim has quit [Quit: sleep]
monkegjinni has joined #ruby
<shevy>
whenever I use it, I think "wtf, how do I do this... why do I not parse ARGV on my own instead..."
nooodl has joined #ruby
kevinbond has quit [Read error: Connection reset by peer]
<shevy>
and things like end.parse! I really really hate
kevinbond has joined #ruby
lxsameer has joined #ruby
<xclite_>
many style guides are against end.parse
<xclite_>
and the like
<xclite_>
i tend to agree
<shevy>
Stava the way I go about doing this, usually is like so:
<shevy>
(1) I write a class that does the things I have to solve
<shevy>
(2) I then call the components I need of that class (on an instance usually)
talmuth has quit [Ping timeout: 248 seconds]
<shevy>
most of the time it goes like:
<shevy>
def initialize(i = ARGV)
<atmosx>
yes it's not as clear as it looks at first
werdnativ has joined #ruby
<shevy>
set_i(i)
<shevy>
and inside set_i, @i = i.dup # or some shit like that
wedgeV has joined #ruby
weasels has joined #ruby
adeponte has joined #ruby
<atmosx>
Stava: I just create a $banner and throw a 'puts' there, although it's not very 'DRY' works
<Stava>
comming from a perl/php background i find this syntax confusing!
<atmosx>
$banner = "__FILE___ $version - Name Surname" etc
codespectator has joined #ruby
kvirani has quit [Remote host closed the connection]
<Stava>
atmosx: Is __FILE__ a "magic" constant for the current file? I was looking for something like that!
<atmosx>
Stava: You should visit a psychiatrist, judging from your last statement.
devgiant has joined #ruby
monkegjinni has quit [Read error: No route to host]
<atmosx>
Stava: yes
monkegjinni has joined #ruby
otters has quit [Ping timeout: 255 seconds]
<atmosx>
It's the same in Python, another very 'sane' language, I'm not sure about perl and php though. I don't like encrypted code.
arkiver has quit [Quit: Leaving]
cirwim has joined #ruby
wallerdev has joined #ruby
fflush has joined #ruby
iamjarvo has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<fflush>
bonjour
weasels has quit [Ping timeout: 245 seconds]
<shevy>
Stava, I find OptionParser confusing
<j|>
yea, for all the learning disabilities I feel with Ruby (still a ruby n00b), I'd agree and say its head and shoulders above Perl at least. (I don't have much PHP experience.)
<shevy>
Stava, when you run a class, like class Usage, I often do this:
<shevy>
Usage.new if __FILE__ == $PROGRAM_NAME
eywu has joined #ruby
<blazes816>
now THAT is some Python-esque code
<atmosx>
shevy: do you use any app like Runkeeper to track physical exercise?
<shevy>
hmm no
<atmosx>
ah k
* atmosx
is gonna try running 10k
<shevy>
but the days of my martial arts days are over, I dont make that much physical exercise anymore :(
<shevy>
*times
<atmosx>
y so?
<shevy>
I feel too old
<atmosx>
how old r u?
codespectator has quit [Ping timeout: 264 seconds]
carlyle has joined #ruby
<atmosx>
if you're 93 I'll agree
apok has joined #ruby
<atmosx>
although you could try walking a distance every now and then
<atmosx>
:-P
delinquentme has joined #ruby
<shevy>
hmm well perhaps it depends on the type of sport
<delinquentme>
whats the python-esque way to evaluate a var inside a string in ruby? something like: puts "ops %s %s" % ( busted[i-1], busted[i+1] )
codespectator has joined #ruby
<delinquentme>
puts "ops %s" % var << works
<delinquentme>
but how about for multiple vars
<shevy>
but otherwise, I kinda feel that sports is a young folks thing (age 12-24)
<headius>
no idea how complete or functional it is
hadees has joined #ruby
<Hanmac>
its for java not for ruby
<shevy>
"ogre4j is a project that enables the use of the OGRE (Object-Oriented Graphics Rendering Engine) libraries in Java applications."
<workmad3>
j|: phuby already has the pronunciation 'poo-by'
<shevy>
Hanmac, there you go!
<workmad3>
j|: and that's a php-ruby runtime :)
<shevy>
hmm
<shevy>
you can call ruby scripts from .php scripts?
Stava has quit [Remote host closed the connection]
<workmad3>
shevy: yeah, I believe it lets that interop happen
<workmad3>
shevy: it runs the php scripts on a ruby runtime :)
<j|>
workmad3: damn.
<shevy>
now that would be something... 5% php code... 95% ruby code
TPFC-SYSTEM has joined #ruby
michael2572 has joined #ruby
<headius>
there's very little you "can't" do with JRuby
<workmad3>
shevy: there's a whole phuby on phails stack :)
<juha_>
hey, i'm new to ruby and i'm trying to do a simple rss reader, but i fail to print item titles. here's my code, could someone push me to the right direction: https://gist.github.com/eefae83993da275b141c
carlyle has quit [Remote host closed the connection]
<j|>
on a slightly related note, I saw a flyer for a show with band who chose to name themselves "Endangered Feces"
<shevy>
I dont like that name... phuby... phails... the latter sounds like fails
<workmad3>
shevy: yup, that's the exact pronunciation ;)
hadees has quit [*.net *.split]
prometheus has quit [*.net *.split]
i0n has quit [*.net *.split]
cakehero has quit [*.net *.split]
davidpk has quit [*.net *.split]
TorpedoSkyline has quit [*.net *.split]
ken_barber has quit [*.net *.split]
blazes816 has quit [*.net *.split]
axl_ has quit [*.net *.split]
uris has quit [*.net *.split]
peregrine81 has quit [*.net *.split]
apacala has quit [*.net *.split]
LBRapid has quit [*.net *.split]
Petit_Dejeuner has quit [*.net *.split]
kpshek has quit [*.net *.split]
Markvilla has quit [*.net *.split]
jrajav has quit [*.net *.split]
SeySayux has quit [*.net *.split]
mfridh has quit [*.net *.split]
arietis has quit [*.net *.split]
Hanmac has quit [*.net *.split]
banisterfiend` has quit [*.net *.split]
Cork has quit [*.net *.split]
drmegahertz has quit [*.net *.split]
Paradox has quit [*.net *.split]
locriani has quit [*.net *.split]
[eko] has quit [*.net *.split]
johnernaut has quit [*.net *.split]
balki has quit [*.net *.split]
sspiff has quit [*.net *.split]
asuka_ has quit [*.net *.split]
Doc_X has quit [*.net *.split]
devdazed has quit [*.net *.split]
wataken44 has quit [*.net *.split]
IrishGringo has quit [*.net *.split]
kennyvb has quit [*.net *.split]
classix has quit [*.net *.split]
ForSpareParts has quit [*.net *.split]
thomas has quit [*.net *.split]
ged has quit [*.net *.split]
kyle__ has quit [*.net *.split]
musl has quit [*.net *.split]
jmcphers has quit [*.net *.split]
danheberden has quit [*.net *.split]
ij has quit [*.net *.split]
nahhh has quit [*.net *.split]
<workmad3>
poo-bee on fails
bluenemo has quit [Remote host closed the connection]
IrishGringo_ has joined #ruby
banghouseAFK is now known as banghouse
ringotwo has joined #ruby
bullicon has quit [Quit: Computer has gone to sleep.]
jesly__ has quit [Ping timeout: 264 seconds]
apacala has joined #ruby
Petit_Dejeuner has joined #ruby
<shevy>
j| ok, now I know what I will bring to their show, should I ever want to listen to that band live
[eko] has joined #ruby
<j|>
shevy: XD
<JustinCampbell>
juha_: are you getting method missing or something else?
<JustinCampbell>
try item.inspect
mrsolo has quit [Quit: This computer has gone to sleep]
ken_barber has joined #ruby
<JustinCampbell>
to see what it spits out
johnernaut has joined #ruby
<delinquentme>
if i == '*' || i == '/' || i == '-' || i == '+' << more susinct way of doing this?
<shevy>
"It's not really appropriate for the core language."
<shevy>
:(
<shevy>
now I understand why ruby will never replace php
<Tasser>
shevy, what's invalid?
<shevy>
Tasser, that tag!
<blazes816>
<img alt="bar>"/>
<shevy>
now we know why strict htmlset was no success
<shevy>
or XHTML for that matter
<heftig>
blazes816: shouldn't that use >?
<blazes816>
heftig: it SHOULD
<blazes816>
that doesn't it will
LoneElf has joined #ruby
<blazes816>
but it will break that regex
<LoneElf>
Is anybody here particularly familiar with rake? I'm wondering how to change the compiler that it is using?
apok has quit [Remote host closed the connection]
apok has joined #ruby
ryanf has joined #ruby
Niamkik has quit [Remote host closed the connection]
reuf has joined #ruby
fbernier has quit [Ping timeout: 264 seconds]
<Tasser>
LoneElf, rake compiles? O.o
<chrisbolton>
Okay I've got a query where I'm trying to search for all users that have a nil value for deleted_at. At the moment it's returning an empty array. Any thoughts?? results = User.all("first_and_last: #{i}* AND deleted_at: nil", :type => :fulltext).to_a
<LoneElf>
Tasser: it uses a compiler… It calls a compiler, i should say.
reuf_ has joined #ruby
tchebb has quit [Ping timeout: 264 seconds]
c0rn_ has joined #ruby
reuf has quit [Read error: Connection reset by peer]
reuf_ has quit [Read error: Connection reset by peer]
<juha_>
is there a way to inspect/debug an array or object to see what they contain?
reuf has joined #ruby
<juha_>
array.inspect?
<ryanf>
chrisbolton: that looks like a question for #rubyonrails
<ryanf>
wtf kind of db are you using where that's a valid query though?
_0riginaI has quit [Ping timeout: 252 seconds]
<ryanf>
or is that not the real code you ran
chichou_ has quit [Remote host closed the connection]
<fflush>
please dont ask users to goa nother channel
ForSpareParts has joined #ruby
erichmenge has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
chichou has joined #ruby
<AlbireoX>
fflush: why not?
<chrisbolton>
The deleted_at portion doesn't seem to be working but the initial portion does.
<fflush>
it's a valid ruby question
<shevy>
juha_ require 'pp'; pp your_object
tiripamwe has joined #ruby
<chrisbolton>
It's MySQL
<fflush>
he is free to ignore him if he doesnt want to help
<shevy>
juha_, the pp stands for "pretty print"
<shevy>
I think perl has the same name
bbttxu has joined #ruby
ringotwo has quit [Remote host closed the connection]
chichou_ has joined #ruby
ringotwo has joined #ruby
_0riginaI has joined #ruby
kaen has quit [Ping timeout: 260 seconds]
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
tchebb has joined #ruby
chichou has quit [Ping timeout: 248 seconds]
srid has joined #ruby
<srid>
anyone here use intellij rubymine? can their IDEA license be used for rubymine as well, or does one have to buy a separate license for it?
adamkittelson has joined #ruby
<lectrick>
juha_: you have to puts "#{item.title}" not "${item.title"
niklasb has joined #ruby
<lectrick>
juha_: also your f.read might need to be f.readlines. not 100% sure. depends on whether Parser.parse expects an array or a newline-delimited string
berserkr has joined #ruby
ph^ has quit [Remote host closed the connection]
<ryanf>
fflush: it is completely standard to recommend people ask rails questions in the rails room
<ryanf>
if only because they're more likely to get useful help
<ryanf>
I usually also answer the question if I know the answer, but in this case I don't
<lectrick>
you can just be signed into both channels like I am
<juha_>
shevy: ok, i'll test that
davidpk has quit [Quit: Computer has gone to sleep.]
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
jesly__ has joined #ruby
<lectrick>
chrisbolton: First of all, use User.where, not User.all. It will lazily evaluate. So User.where(first_and_last: name_variable, deleted_at: nil)
<fflush>
as long as we stay at the recomendation level is fine
<lectrick>
chrisbolton: I can help you in #rubyonrails but I have a meeting now.
locriani_ has joined #ruby
cloud|windoze has quit [Quit: Leaving.]
k_89 has joined #ruby
<chrisbolton>
Thanks guys. I'll pitch my question to the rails room, but if anyone in here could help I'd appreciate it.
darren_ has joined #ruby
bradhe_ has joined #ruby
locriani_ has quit [Client Quit]
<fflush>
chrisbolton: please feel free to ask it on any ruby related channel
<juha_>
shevy: heheh not a good idea to run pp item inside a loop :D
<shevy>
hehe
<shevy>
at least you get output
<chrisbolton>
Thanks fflush
<shevy>
imagine you dont get any output at all
<juha_>
shevy: yeah! thanks
<shevy>
I feel like that right now
bgupta has quit [Quit: bgupta]
<shevy>
I run .cgi scripts and the error is not displayed on the page
<shevy>
I hate that
locriani has quit [Ping timeout: 255 seconds]
<delinquentme>
remove a + - * or /
<delinquentme>
from a string and store it into a var
fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
bradhe has quit [Ping timeout: 252 seconds]
hubub_ has joined #ruby
<nooodl>
pastebin.com. ew.
fbernier has joined #ruby
hubub has quit [Ping timeout: 252 seconds]
hubub_ is now known as hubub
hubub has quit [Read error: Connection reset by peer]
hubub has joined #ruby
jimeh has quit [Ping timeout: 264 seconds]
<Mon_Ouie>
shevy: Printing the error on the web page may be a security leak
<Mon_Ouie>
e.g. NoMethodError 'secure_hash' for "a_password":String
brianpWins has joined #ruby
fbernier has quit [Read error: Operation timed out]
_0riginaI has quit [Ping timeout: 240 seconds]
zemanel has joined #ruby
Eldariof-ru has joined #ruby
Draco___ has quit [Ping timeout: 264 seconds]
artOfWar has joined #ruby
baphled has joined #ruby
Draco_ has joined #ruby
ph^ has joined #ruby
mathie has quit [Quit: Sleeping...]
Axsuul has joined #ruby
monkegjinni has quit [Remote host closed the connection]
br4ndon has joined #ruby
br4ndon has quit [Client Quit]
br4ndon has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
mathie has joined #ruby
verto|off is now known as verto
deryl has quit [Quit: deryl]
danielvdotcom has joined #ruby
linux_probe has left #ruby [#ruby]
danielvdotcom has quit [Read error: Connection reset by peer]
jborica has joined #ruby
danielvdotcom has joined #ruby
fbernier has joined #ruby
nateberkopec has joined #ruby
steggy has joined #ruby
dhruvasagar has joined #ruby
voodoofish430 has joined #ruby
<steggy>
Stupid question time: I don't appear to be able to require 'rdoc/ri/reader'. What do I need to do to get such working?
ramblex has joined #ruby
jhchabran has quit [Remote host closed the connection]
Michael has joined #ruby
Michael is now known as Guest11054
<Mon_Ouie>
Maybe you need the gem version of RDoc, which is usually slightly newer than the stdlib one, to do that
<Mon_Ouie>
You can install rdoc like any gem, and just explicitly activate it before using it (gem "rdoc", possible with a version specification)
jhchabran has joined #ruby
<steggy>
Mon_Ouie: just grabbed the latest version, and it doesn't appear to have it. I have rdoc/ri, so now im thinking it might just have been removed in more recent versions(i need it for a old version of some software)
TheShadowFog has joined #ruby
meskyanichi has quit [Ping timeout: 265 seconds]
banghouse is now known as banghouseAFK
cantonic has quit [Ping timeout: 248 seconds]
qko has quit [Read error: Connection reset by peer]
michael2572 has quit [Ping timeout: 264 seconds]
qko has joined #ruby
kenichi has quit [Remote host closed the connection]
theRoUS has quit [Remote host closed the connection]
lkba has joined #ruby
chimkan_ has joined #ruby
_0riginaI has joined #ruby
danielvdotcom has quit [Read error: Connection reset by peer]
danielvdotcom has joined #ruby
yxhuvud has quit []
codespectator has quit [Ping timeout: 264 seconds]
alphabitcity has joined #ruby
codespectator has joined #ruby
<Mon_Ouie>
Well, you can ask gem to install an old version — you just need to know which one you want
S1kx has joined #ruby
S1kx has joined #ruby
S1kx has quit [Changing host]
jjbohn is now known as jjbohn|afk
jrajav has joined #ruby
locriani has joined #ruby
obryan has quit [Quit: Konversation terminated!]
danielvdotcom has quit [Read error: Connection reset by peer]
zommi has quit [Remote host closed the connection]
Draco_ has quit [Ping timeout: 240 seconds]
fantazo has quit [Remote host closed the connection]
jgrevich has joined #ruby
nopolitica has quit [Quit: Leaving.]
pdtpatrick has joined #ruby
cousine has joined #ruby
davidpk has joined #ruby
Markvilla has quit [Quit: Markvilla]
Markvilla has joined #ruby
Markvilla has quit [Client Quit]
khakimov has quit [Quit: Computer has gone to sleep.]
kvirani has joined #ruby
yxhuvud has joined #ruby
dv310p3r has quit [Ping timeout: 248 seconds]
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
SQLStud has joined #ruby
kevinbond has left #ruby [#ruby]
nopolitica has joined #ruby
LBRapid has quit [Quit: Farewell.]
chichou_ has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby
fermion has quit [Quit: P]
chichou has joined #ruby
kaen has joined #ruby
macmartine has joined #ruby
cousine has quit [Remote host closed the connection]
Morkel has quit [Quit: Morkel]
danielvdotcom has joined #ruby
Morkel has joined #ruby
chichou has quit [Ping timeout: 252 seconds]
Criztian has quit [Remote host closed the connection]
Criztian has joined #ruby
abra has quit [Ping timeout: 276 seconds]
bullicon has joined #ruby
canweriotnow has joined #ruby
pdtpatrick has quit [Quit: pdtpatrick]
cmyers has joined #ruby
khakimov has joined #ruby
ph^_ has joined #ruby
wangr_ has joined #ruby
alphabitcity has quit [Quit: Leaving.]
danielvdotcom has quit [Read error: Connection reset by peer]
<cmyers>
So... I am trying to learn how to create ruby gems which depend upon other gems and include libraries as well as commands in bin/... - Examples and tutorials I have found so far are overly simplistic parroting cargo cult magic. Any pointers for a good reference to use?
Axsuul has quit [Read error: Connection reset by peer]
danielvdotcom has joined #ruby
<banisterfiend`>
cmyers: it's pretty simple
ph^__ has joined #ruby
khakimov has quit [Client Quit]
Axsuul has joined #ruby
<banisterfiend`>
so rather than overly simplistic, maybe you're just realizing it is very simple :)
Criztian has quit [Ping timeout: 248 seconds]
jarred has joined #ruby
ph^ has quit [Ping timeout: 264 seconds]
<cmyers>
banisterfiend`: there is a gemspec file...and a Gemfile...and the "bundler" command, and "gem build"... how do these interact?
<cmyers>
It seems my Gemfile has my dependencies but my gemspec specifies everything else about my gem
<banisterfiend`>
cmyers: if all you're doing is building a gem then Gemfile/bundler are irrelevant
<cmyers>
and I have to install bundler gem first and run `bundle install` which somehow fetches my dependencies...
<cmyers>
but then, do my gems also know they need those modules when they are later installed?
<devdazed>
hi all, whats the cleanest way to split a word into something like this: "foobar" => [ "f", "fo", "foo", "foob", "fooba", "foobar" ]
<banisterfiend`>
cmyers: bundler is for when u're running your app and u want the correct dependencies to load, it's not relevant to the creation of the gem itself
<devdazed>
i looked into permutations but it does quite do what i need
danielvdotcom has quit [Read error: Connection reset by peer]
wangr has quit [Ping timeout: 252 seconds]
danielvdotcom has joined #ruby
<cmyers>
banisterfiend`: ah, but I do need bundler to test my gem code before building, if I don't want to have to insteall it each time I change somethign?
<cmyers>
so that is just a "dev environment" thing?
dv310p3r has joined #ruby
ph^_ has quit [Ping timeout: 240 seconds]
<cmyers>
I use rvm and roughly understand how it works
<cmyers>
so bundler lets me shove my deps into my rvm "gemset", I think...
arturas_ has quit [Remote host closed the connection]
jjbohn|afk is now known as jjbohn
<cmyers>
banisterfiend`: ah, so you can specify your dependencies in your gemspec
<banisterfiend`>
cmyers: yeah
<cmyers>
that makes sense, that is where I expected them to be, but all the examples I found lacked that
jgarvey has joined #ruby
jesly__ has quit [Ping timeout: 255 seconds]
<cmyers>
so Gemfile is completely irrelevant unless you are using bundler?
<banisterfiend`>
cmyers: Yeah
danielvdotcom has quit [Read error: Connection reset by peer]
<cmyers>
kinda weird that there are these two separate ways to specify dependencies
<cmyers>
and they look different enough that you need to maintain both if you want both =(
mrsolo has quit [Quit: This computer has gone to sleep]
<banisterfiend`>
cmyers: Gemfile specifies what dependencies your app uses
<cmyers>
this info is helping a lot though, thanks =D
<banisterfiend`>
cmyers: gemspec specifies what dependencies your gem uses
<banisterfiend`>
cmyers: yeah it is a bit weird, hopefully they'll merge bundler/rubygems in the future, in some way..
<cmyers>
are development dependencies assumed to imply runtime dependency also, or do you have to list things in both places?
<cmyers>
I suppose maybe hte docs for Gem::Specification talk about it...
<banisterfiend`>
cmyers: no, development dependencies are things like debuggers, and test frameworks, etc
<cmyers>
ah, cool
<banisterfiend`>
cmyers: development dependencies are not usually required for the 'real' app
<banisterfiend`>
just during the development phase
timonv has joined #ruby
<cmyers>
so "dependency" is like compile time, runtime is runtime only, and development means "build tool" like test deps, code generators, rdoc, etc.
<banisterfiend`>
cmyers: yep
<banisterfiend`>
cmyers: u mean "development" though :)
<banisterfiend`>
(not "dependency" :))
snearch has joined #ruby
imami|afk is now known as banseljaj
<cmyers>
I see in the example you linked add_runtime_dependency, add_development_dependency, and add_dependency
<cmyers>
oh, that is in an if Gem::Version, did the API just change in different versions of Gem?
<banisterfiend`>
cmyers: well, that example is a bit weird cos it's a generated gemspec
mrsolo has joined #ruby
<devdazed>
so far what i got is this: s.split('').inject([]){|m ,v| m << "#{m[-1]}#{v}" }
<banisterfiend`>
cmyers: so it's just being ultra conservative in supporting both old and new gemspec apis
minijupe has joined #ruby
<devdazed>
but im not sure if there is a better way
<cmyers>
ah, cool, I see now
<banisterfiend`>
cmyers: exactly
prometheus has quit [Read error: Connection reset by peer]
<cmyers>
seems like if your app is in a gem, then the gem's dependencies must be a superset of your app's dependencies, so bundler could be a gem command like "install this gem's depednencies into my environment now". I think things will be way more clear once they are merged together
<cmyers>
but I see why that doesn't happen overnight
davidcelis has joined #ruby
mrsolo has quit [Read error: Connection reset by peer]
abra has joined #ruby
<cmyers>
Hopefully I have the requisite vocabulary to figure out what I need now =D
hadees has quit [Read error: Connection reset by peer]
dg73 has joined #ruby
hadees has joined #ruby
nanderoo has quit [Quit: Leaving.]
arkiver has quit [Quit: Leaving]
fflush has joined #ruby
banisterfiend` has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
ckrailo has quit [Ping timeout: 276 seconds]
zoidfarb has joined #ruby
<shevy>
I wanna be violent today
ckrailo has joined #ruby
zrail has left #ruby [#ruby]
<zoidfarb>
I'm new to ruby and I'm trying to build an XML document using REXML. Does anyone know how to create a CData node as a child of another node?
tiripamwe has quit [Ping timeout: 255 seconds]
bullicon has quit [Quit: Computer has gone to sleep.]
<cmyers>
in my script, I require 'rubygems' followed by 'jira-ruby'. `gem list --local` lists jira-ruby. When I run my script, I get LoadError: no such file to load -- jira-ruby. How do I figure out wtf is going on?
<sernin>
and other places, most notoriously sendmail.cf
alexim has joined #ruby
<Axsuul>
Any suggestions on giving someone a ruby script to run who doesn't have Ruby installed on their system? So I have them install Ruby, and then tell them to `gem install bundler`, then `bundle`.. is there an easier way?
tiripamwe has joined #ruby
timonv has quit [Remote host closed the connection]
liluo has quit [Read error: Connection reset by peer]
<jrajav>
Axsuul: Can you not just.. send them the script? >_>
manizzle has quit [Read error: Connection reset by peer]
<CannedCo_>
anyone?
workmad3 has joined #ruby
jrist is now known as jrist-afk
ken_barber has quit [Remote host closed the connection]
chimkan_ has joined #ruby
ken_barber has joined #ruby
linoj has quit [Ping timeout: 252 seconds]
xorgnak has quit [Remote host closed the connection]
SphericalCow has quit [Quit: Leaving]
nwest has quit [Quit: Computer has gone to sleep.]
mikepack_ has joined #ruby
mikekelly has quit [Ping timeout: 250 seconds]
xorgnak has joined #ruby
bbttxu has quit [Quit: bbttxu]
kenichi has quit [Remote host closed the connection]
xorgnak has quit [Remote host closed the connection]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
xorgnak has joined #ruby
<CannedCo_>
healp!
cantonic has joined #ruby
<Spooner>
chiel : No, we haven't had analogue for a year or so. Just need a digibox if you have an analogue TV.
apok_ has joined #ruby
yoklov has quit [Quit: computer sleeping]
ken_barber has quit [Ping timeout: 246 seconds]
liluo has quit [Read error: Connection reset by peer]
<chiel>
Spooner: ah, i see. :)
<chiel>
Spooner: where do i buy one of those? :p
xorgnak has quit [Remote host closed the connection]
<Spooner>
Are you sure it is analogue? Any TV made in, at least, the last 5 years will be digital (and certainly any TFT should be).
thone has quit [Ping timeout: 260 seconds]
apok has quit [Ping timeout: 255 seconds]
<chiel>
Spooner: it's a pretty old tv, and when I do the "auto" setup, it doesn't seem to pick up on anything
apok_ is now known as apok
pdelgallego has quit [Read error: Connection reset by peer]
_pdelgallego has joined #ruby
<Spooner>
You can buy them anywhere they sell TVs. e.g. Comet, Currys, Argos, etc. ~£15
<chiel>
ah alright
<chiel>
not too bad then
liluo has joined #ruby
<blazes816>
no too bad?! that's like $100
joshman_ has quit [Ping timeout: 240 seconds]
<Spooner>
$500 canadian :P
nikeita has joined #ruby
<shevy>
canadians are cheap aren't they?
<shevy>
is there even a single canadian using ruby at all???
tommyvyo has joined #ruby
Maher4Ever has joined #ruby
<chiel>
the resolution on my tv is only like 1280x800 or some shit. :D
<chiel>
i want to buy a new tv, but I am pretty broke atm.
xorgnak has joined #ruby
<Maher4Ever>
Hey everyone, how can I specify that my extention should only be installed on Windows in my gem spec? I tried using Gem::Platform::Win32 but it seems to not work anymore!
<Spooner>
Maher4Ever : I use rake-compiler. Makes it a lot simpler.
yonggu has quit [Quit: yonggu]
thone has joined #ruby
mikekelly has joined #ruby
<Spooner>
Oops, but you don't mean a binary gem for Windows. Sorry.
xorgnak has quit [Remote host closed the connection]
<Maher4Ever>
Spooner: I do too, but only for development. I want to release my gem now, but I only want it to be installed on windows
manizzle has joined #ruby
<workmad3>
Maher4Ever: I think you can release something like a mingw variant of the gem
xorgnak has joined #ruby
kah_ has joined #ruby
ttilley is now known as ttilley_off
<kah_>
I have a question about instance variables
xorgnak has quit [Remote host closed the connection]
<Maher4Ever>
workmad3: The problem is that I tried to install it on linux to see what will happen, and sure enough it crashed during compilation... I don't want my user to see that horibble crash, so I though rubygems might offer a way to specify the platform of the gem
SuperrMann has quit [Quit: Bye all :)]
<workmad3>
Maher4Ever: hah, is that all you're worried about? :)
xorgnak has joined #ruby
<kah_>
How can it be that the same instance variable may be defined in the different controller methods?
<workmad3>
Maher4Ever: you should see some of the compile errors I've both a) gotten and b) helped debug helping out here and in #rubyonrails ;)
<shevy>
sounds rails question
<shevy>
an instance variable is specific to a class
<shevy>
class Foo; def initialize; @bla = 'some value'
<workmad3>
shevy: well... technically, an instance variable is specific to an object ;)
<Maher4Ever>
workmad3: Lol, yeah... It will be used on Guard and most of the users are designers :P
_pdelgallego has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
<workmad3>
Maher4Ever: are any of the users likely to be non-windows users?
joshman_ has joined #ruby
pdelgallego has joined #ruby
jborica has joined #ruby
<kah_>
shevy: right! so how can it be defined in all of these methods, why doesn't the program get confusted
<workmad3>
kah_: because your program is super smart!!!
<Maher4Ever>
workmad3: Yeah, but for thouse users we use another gem which is platform specific. My gem will hopefully be part of SASS (which is mostly used by designers AFAIK).
<kah_>
workmad3: so say @user is defined in update and new... is it because they are different instances?
<shevy>
kah_, it is available in all of your class. it is like a data variable, for your class
sbeckeriv has joined #ruby
<workmad3>
Maher4Ever: yeah... that's not a correct assumption
<shevy>
if you do: def update; @user = 'foo', then this is available for you kah_
<workmad3>
Maher4Ever: sass is part of the default bundle of gems for rails... a large proportion of rails devs are familiar with sass :)
<kah_>
shevy: right... so I guess I should be in the Ruby on Rails forum...
<shevy>
kah_, it is a variable
<shevy>
foo = 'bla' # foo is a local variable
<shevy>
@foo = 'bla' # foo is an instance variable
Markvilla has joined #ruby
<kah_>
shevy: yes, I just don't get why each method which corresponds to a view in Rails would be redefined.. I'm assuming its because the instance is changing
<workmad3>
kah_: each request creates a different controller instance... you'd get more info in #rubyonrails though :)
jfarmer has joined #ruby
<shevy>
I dont even know what a view is
chimkan___ has joined #ruby
<kah_>
workmad3: yeah, ok that confirms my assumption
<workmad3>
(I'm able to give more info... but shevy would shout and cry if I filled his screen with rails trivia :) )
<kah_>
workmad3: thanks
<kah_>
it's cool thanks guys, that clears it up
<Spooner>
Maher4Ever : Just checked one of my binary gems iwhich uses: s.platform = "x86-mingw32" in the gemspec
<shevy>
workmad3, hmm. not if the rails guy write an awesome ruby tutorial :)
<shevy>
*rails guys
chimkan___ has quit [Client Quit]
<Maher4Ever>
Spooner: I'll try that, thanks :)
<erichmenge>
Is pluginaweek/state_machine what all the cool kids are using for state machine functionality?
monkegjinni has quit [Remote host closed the connection]
<workmad3>
Maher4Ever: I think that's the platform specific variant I mentioned btw :)
chson has quit [Remote host closed the connection]
<workmad3>
erichmenge: I'm a traditionalist... I use AASM :)
<workmad3>
erichmenge: I'm willing to accept I'm not a cool kid though
chimkan_ has quit [Read error: Operation timed out]
<erichmenge>
workmad3: I see. I'll take a look at that one too.
<kah_>
workmad3: last question... or confirmation of assumptions.. a local variable is not defined in the controller and called in the view because the local variable is special to method
williamcotton_ has quit [Quit: williamcotton_]
kevinbond has joined #ruby
_bart has joined #ruby
<workmad3>
kah_: terminology is a bit wrong, but essentially yes
<workmad3>
kah_: the term is 'scoped to the method'
<shevy>
man, rails guys really must learn a lot of strange things
<shevy>
controller... view...
<kah_>
shevy: haha, shevy.. that horse you ride is high!!!
<kah_>
=)
justsee has joined #ruby
<shevy>
kah_, the local variable, defined in a method, is only available in that method
<kah_>
thanks for the help guys
<shevy>
def foo; bla = 'test'; end
<workmad3>
shevy: it's called an MVC framework for a reason :P
cjlicata has quit [Remote host closed the connection]
<kah_>
right.. but the method is often linked to aview
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
<shevy>
one day I have to learn rails
<kah_>
or "scoped to the method"
<workmad3>
kah_: it's not 'linked' to a view
<kah_>
haha it's pretty cool
<shevy>
kah_, but it is still a ruby method right?
<shevy>
they probably call a method on some object somewhere
<arietis>
i need some reference about working with binary files
<workmad3>
kah_: a controller action will either render a view (implicitly or explicitly with a render call) or redirect
<arietis>
any suggestions?
<arietis>
i'm new to ruby
sbeckeriv has quit [Ping timeout: 245 seconds]
jfarmer has quit [Quit: jfarmer]
<shevy>
working with binary files...
mikekelly has quit [Ping timeout: 250 seconds]
<shevy>
IO has some binary mode I think
<workmad3>
kah_: and the view rendering is done with a separate object, but with some shared context (namely, the instance variables of the controller are copied)
<shevy>
then there is #unpack and #pack on Array which is often used
bosphorus has quit [Remote host closed the connection]
<shevy>
and bnagy here has this bindata module or something like that
peregrine81 has quit [Quit: Goodbye.]
dju has joined #ruby
<Spooner>
You only need binary mode on Windows, which messes up newlines for you otherwise.
ken_barber has joined #ruby
<workmad3>
kah_: there isn't really anything magic going on (well, apart from the ivar copying, and even that isn't really magic once you know about the instance_variables and get_instance_variable methods)
<Spooner>
shevy : You mean Array#pack and String#unpack
caveat- has joined #ruby
ken_barber has quit [Remote host closed the connection]
mikekelly has joined #ruby
jimeh has quit [Ping timeout: 276 seconds]
<workmad3>
kah_: but yes, as shevy rightly assumed, a controller action is still just a normal ruby method... local variables are scoped to the method, same as with any other ruby method
ken_barber has joined #ruby
<mrsolo>
is there a short cut syntax/way to wrap proc around a method?
balki has quit [Read error: Operation timed out]
<shevy>
Spooner aha
<Spooner>
arietis : But those are only good for small work. If the file is large or you need to do it fast, you probably want one of the binary data diddling gems.
<shevy>
always thought they are on the same class
ken_barber1 has joined #ruby
<shevy>
diddling
<shevy>
I like that word
<Spooner>
Wouldnt' really do anything useful if they were on the same class :)
<workmad3>
kah_: rails becomes a lot less magical when you just think 'its not doing anything abnormal with ruby syntax' btw :)
<arietis>
i'm targeting 1.8.7 version
liluo_ has joined #ruby
<workmad3>
kah_: some of it might be questionable design... but it's certainly not altering basic ruby in any way :)
liluo has quit [Ping timeout: 276 seconds]
krusty_ar has quit [Remote host closed the connection]
<shevy>
I am sad... <canvas> tag in HTML5, they show you how to fill it ... using javascript. Why can't I use ruby instead :(
<workmad3>
shevy: because unfortunately, browsers don't run ruby
<mrsolo>
spooner: oh nice..
<shevy>
workmad3 yeah
dhruvasagar has quit [Ping timeout: 245 seconds]
<workmad3>
shevy: and ruby isn't really a good fit, stylewise, for browsers
brianpWins has quit [Quit: brianpWins]
Goles has quit [Quit: Computer has gone to sleep.]
<shevy>
well I could live with a simplified ruby
<workmad3>
shevy: it's the async callbacks that are the problem
<workmad3>
shevy: the amount that are used in JS look bad in that... they look horrendous in ruby
<shevy>
ctx.fillStyle="#FF0000";
ken_barber has quit [Read error: Operation timed out]
mikekelly has quit [Ping timeout: 250 seconds]
monkegjinni has joined #ruby
hunglin has quit [Ping timeout: 264 seconds]
<workmad3>
shevy: you could always write a small library that will run a ruby program to generate JS for a canvas tag ;)
hadees has quit [Quit: hadees]
PaciFisT has quit [Quit: Leaving.]
jimeh has joined #ruby
ryanallenbobcat has joined #ruby
minijupe has joined #ruby
<Spooner>
Or use Coffeescript, which is somewhere inbetween horrible and less horrible.
<shevy>
hmmm
<shevy>
yeah
<shevy>
I think I'll do either of these two. I really cant stand writing javascript anymore :(
<Progster>
if the return value of my function is an array of arrays of 2 values (e.g. [['Mark', 'Smith'],['James', 'Bond']], can I do something like: for [fname, lname] in names do...
<workmad3>
yeah, that's true... CS is sort of like a nod to ruby syntax, but with a JS slant :)
<Progster>
in other words, how can I do tuple decomposition with arrays?
<shevy>
tuple what
<workmad3>
does need that extra compilation set though
<Progster>
I know I could use hashes here, but asking about arrays
<shevy>
so you have an array in an array
<Spooner>
Progster: : array.each do |fname, lname| ... end
<workmad3>
Progster: please phrase your question in ruby terms, not python terms
<shevy>
ah, he just wants to output both in every iteration
<workmad3>
Progster: and if Spooner's solution doesn't work, you might need to do ary.each do |(fname, lname)|
<Progster>
hmmm
<shevy>
what's the () there
<shevy>
is that lisp
<Progster>
can i do for (fname, lname) in array ?
<workmad3>
shevy: array destructuring
<Spooner>
workmad3 I've never needed to do that, though that is more explicit.
kevinbond has quit [Quit: kevinbond]
<workmad3>
Spooner: I've needed to at times, but normally when the array isn't the only param to the block
<Spooner>
Oh yes, true: array.each_with_index do |(fname, lname), i|
<workmad3>
Spooner: e.g. ary.inject(0) do |val, (fname, lname)|
<shevy>
what is that () there!!!
<shevy>
I never saw that before
<_bart>
alright, a bit of a nostalgic question, I got a fully automatic onkyo record player here (for vinyls), how do I start it? :s (I'm of the new MP3 generation)
<workmad3>
shevy: I already said... it's array destructuring
mikekelly has joined #ruby
<shevy>
I read you before too!
bigdc1 has quit []
DrShoggoth has quit [Quit: Leaving]
<shevy>
I see the words but the meaning does not hit my brain :)
<workmad3>
shevy: well... what more do you want... it destructures an array in an argument list
<shevy>
is that new in 1.9.x ?
<Spooner>
Yeah, it allows you to pre-extract an array that would otherwise get mapped into a single variable.
<werdnativ>
How come `def +` is ok, but `def +=` is syntax error?
yoklov has joined #ruby
<shevy>
werdnativ, could be because = is special
<workmad3>
werdnativ: because += isn't a method, it's syntax sugar
ixti has quit [Quit: So Long, and Thanks for All the Fish!]
<werdnativ>
so no way to override it?
<workmad3>
werdnativ: the runtime sees 'a += b' and interprets it as 'a = a + b'
<Mon_Ouie>
You override it by overriding +
<workmad3>
werdnativ: it'll hit an overridden +
<Mon_Ouie>
Or defining it, really
tewecske has quit [Quit: Leaving.]
<Spooner>
shevy: We both gave examples where it is needed. In my direct answer to Progster, it was optional, since if you pass in a single array, it automatically expands it if more than one var is in the || thingie (getting technical)..
<werdnativ>
hmm, but it has different semantics for object identity?
<workmad3>
Spooner: the block parameter list+ :)
<workmad3>
werdnativ: then you're doing something ruby doesn't support
<Progster>
why do hidden fields not repopulate if you press "back" in a browser?
minijupe has quit [Quit: minijupe]
<shevy>
hmmm
<Spooner>
werdnativ : If you want something which is sort of meaning the same as += operator in C, then use <<, since that is a real method and can be overridden, whereas a+=b will always be mapped to a = a + b.
nwest has joined #ruby
<werdnativ>
darn. ok, thanks.
nwest has quit [Client Quit]
<Spooner>
werdnativ : to a = a.+(b) to be more clear
<workmad3>
werdnativ: obj.method += b will map to obj.method=(obj.method.+(b)) btw
<workmad3>
werdnativ: i.e. it'll hit both an overridden + method and a setter method :)
kah_ has quit [Quit: Page closed]
<workmad3>
werdnativ: overriding += itself though would be problematic, because you'd be (potentially) messing with basic variable assignment semantics... which is one of the few things that remains inviolate in ruby :)
ryanallenbobcat has quit [Quit: ryanallenbobcat]
yoklov has quit [Quit: computer sleeping]
berserkr has quit [Read error: Connection reset by peer]
liluo_ has quit [Read error: Operation timed out]
Criztian has quit [Ping timeout: 255 seconds]
<werdnativ>
so if I override obj#+ and do: obj += b then it calls obj = obj + b with my own + method… I get that. But in my method I return a new object instead of updating self… I guess there's no way around that but it seems like ruby does stuff that seems to work that way all over the place.
Maher4Ever has quit [Quit: Ik ga weg]
<workmad3>
werdnativ: how so+
<workmad3>
?
joshman_ has quit [Read error: Operation timed out]
qb has quit [Ping timeout: 245 seconds]
<werdnativ>
workmad3: they must just be simpler objects without state & identity, so it works transparently.
<Spooner>
werdnativ : That is why we generally use << for "in place addition", for example s = "frog"; s << "s"
<werdnativ>
i.e. doesn't matter if they return a new object
<workmad3>
werdnativ: things that respond to + should really follow immutable value object semantics, yes
<werdnativ>
it's a yagni thing anyway… I'm just fooling around now.
pdelgallego has quit [Quit: pdelgallego]
<werdnativ>
but learning!
tatsuya_o has quit [Remote host closed the connection]
pdelgallego has joined #ruby
dv310p3r has quit [Ping timeout: 264 seconds]
<zoidfarb>
I'm trying to use the roo gem (http://roo.rubyforge.org/) to read a .xlsx file. It looks like the constructor takes a string of a file name, but I've got a tempfile from an HTTP POST file upload. Is there a way to process it directly? Or do I have to save that file somewhere and then give the filename string to roo?
bglusman has quit [Remote host closed the connection]
liluo has joined #ruby
ken_barber1 has quit [Remote host closed the connection]
xorgnak has quit [Remote host closed the connection]
ken_barber has quit [Remote host closed the connection]
xorgnak has joined #ruby
cwang has joined #ruby
s1n4 has joined #ruby
ken_barber has joined #ruby
alek_b has quit [Ping timeout: 260 seconds]
nari has joined #ruby
<Spooner>
Right, so it isn't a Tempfile in the sense I am thinking? If the library only allows you to pass filenames, then create a Tempfile and save your "tmpfile" data to it (you can #read from it, so just read that and save it). The library should ideally accept a stream, in which case you could pass it a StringIO or the "tmpfile" more directly, but presumably doesn't.
xorgnak has quit [Remote host closed the connection]
liluo_ has joined #ruby
jarred has quit [Read error: Connection reset by peer]
jborica has quit [Read error: Operation timed out]
ramblex has quit [Ping timeout: 240 seconds]
kstephens has quit [Ping timeout: 265 seconds]
kstephens has joined #ruby
Simon3 has joined #ruby
mwilson_ has quit [Excess Flood]
chrisbolton has quit [Quit: chrisbolton]
mwilson_ has joined #ruby
Simon has quit [Read error: Connection reset by peer]
jimeh has quit [Ping timeout: 244 seconds]
tommyvyo has joined #ruby
liluo has quit [Read error: Connection reset by peer]
<CannedCo_>
is there any way to yardoc a *args where one of the args is a options hash
benson has quit [Remote host closed the connection]
liluo has joined #ruby
kaen has quit [Read error: Connection reset by peer]
kaen has joined #ruby
MasterIdler_ is now known as MasterIdler
<CannedCo_>
i guess what i want is to define an @option for all @overloads
<CannedCo_>
define a @param for all overloads which is a hash of options
<CannedCo_>
rather
headius has joined #ruby
wpaulson has joined #ruby
wpaulson_ has joined #ruby
<CannedCo_>
anyone around?
wpaulson has quit [Read error: Connection reset by peer]
wpaulson_ is now known as wpaulson
Simon3 has quit [Ping timeout: 255 seconds]
Guest90886 is now known as thomas
<epochwolf>
CannedCo_: doesn't seem like it does it
hunglin has joined #ruby
virunga has quit [Quit: Sto andando via]
nikeita has quit [Quit: sleep]
<cpruitt>
I've admittedly never had to deal with utf-8 strings with ruby and I'm a little confused about how to work with them. I'm just starting to tinker with a new project involving music and am not sure how to output a "sharp" symbol. e.g. : http://en.wikipedia.org/wiki/Sharp_(music)
hunglin has quit [Read error: Connection reset by peer]
hunglin1 has joined #ruby
<cpruitt>
puts ♯ gives me the invalid multibyte error. Can anyone point me to the right topic for a google search?
artOfWar has quit [Remote host closed the connection]
<xorgnak>
yo.
<burgestrand>
cpruitt: what multibyte error?
<cpruitt>
invalid multibyte char (US-ASCII)
<burgestrand>
cpruitt: do you save your file as UTF-8, and have the magic encoding comment at the top of your file? :)
S1kx has quit [Read error: Connection reset by peer]
<cpruitt>
burgestrand: no, I haven't but that's part of my question. If I do it that way and package this as a gem will that have implications for the scripts using the gem.
Berglund has joined #ruby
<cpruitt>
Or should gems just not mess with UTF-8 if they want to be safe. I don't quite understand how ruby treats all that.
<burgestrand>
cpruitt: ruby essentially allows you to mix and match different encodings, but you must be explicit in which one you use.
kaen has quit [Read error: Connection reset by peer]