reinaldob has quit [Remote host closed the connection]
danshultz has joined #ruby
<breakingthings>
havenn: I think you have a problem
fuzai_ has joined #ruby
<fuzai_>
can anyone explain what config.ru is a few words?
pasties has joined #ruby
<mduvall>
rack configuration file
<ruzu>
any js peeps know if i can use !!obj as a shorthand to determine if a variable has likely-valid content (assuming zero isn't considered likely-valid)? it seems like it works in checking vs null/nan/undefined.
ashp has joined #ruby
<ashp>
Hey all, I'm hoping someone can take some hash pity on me. I have this giant http://pastebin.com/ig4mmX3j hash and in the code I select the subhash I need based on the kernel of the machine
<ashp>
In the case of the entry :bsdlike where I have a bunch of aliases I need a way to rewrite that last line in the pastebin to check the aliases and select :bsdlike if it's in there
<havenn>
fuzai_: It is a Rackup file which amongst other things feeds an application to Rackup.
<fuzai_>
So I created a ruby application in a stand alone file and i'm trying to deploy it to open shift. It seems that it runs config.ru the same way I would expect to start an application off the command line. Is it a safe assumption to move my code into config.ru and try to run it from there?
<ashp>
I can't think of a good way to say "hash.keys.each { |k| if k[:aliases] contains kernel then return hash[k] }
Akuma has joined #ruby
ssm2017 has left #ruby ["goodbye..."]
<ashp>
actually I am pretty sure in writing this I just answered my own issue
freeayu has joined #ruby
<Akuma>
Hello, how can I find out if I am at the last element when doing something like string.split("").each do { |i| [.....] }?
UNIXgod has quit [Quit: leaving]
<fuzai_>
Does a config.ru file mean I should assume this is using rails too?
<havenn>
fuzai_: No, Rack. More specifically Rack::Builder.
<havenn>
breakingthings: Yup, nested modules for namespacing.
chrismhough has joined #ruby
<breakingthings>
havenn: Would it be a logical move, then, to have something like so: MyGem::IRC::Connection
Guedes has quit [Ping timeout: 240 seconds]
<breakingthings>
or does that just seem like an unnecessary bump from MyGem::Connection
chrismhough has quit [Read error: Connection reset by peer]
chrismhough_ has joined #ruby
<breakingthings>
(assuming my gem is meant to interact with an IRC server)
mduvall has quit []
louisror has quit [Ping timeout: 252 seconds]
andrewhl has quit [Read error: Connection reset by peer]
<havenn>
fuzai_: So Rack sits between the framework and webserver. Some Rack webservers, like Thin, are based on EventMachine.
chrismhough_ has quit [Client Quit]
andrewhl has joined #ruby
stringoO has joined #ruby
<havenn>
breakingthings: Seem like no need for IRC but I guess an aesthetic choice?
<ashp>
http://pastebin.com/MSbqsAtz <-- my revised copy, it dies with a undefined method `[]' for :sunos:Symbol in the elsif
<breakingthings>
Yeah.
<ashp>
but I guess I'm closer than I was before
<breakingthings>
Alright, thanks hav.
Kn|t3 has joined #ruby
x82_nicole has joined #ruby
huttan_ has quit [Quit: leaving]
<havenn>
fuzai_: Different Rack webservers use various tactics to provide concurrency. A handful of them use EventMachine, Cool::IO, nio4r for evented-io. Others rely on threading or forking. Some mix multiples of the above.
<fuzai_>
So i've wrote this chat / moderation bot that uses a really simple custom api to interface with the service that is based on eventmachine
ewet has joined #ruby
<fuzai_>
i'm tearing apart this config.ru right now to see if i can figure this out
matchaw_ has joined #ruby
<fuzai_>
http://pastie.org/5872798 <--- That is a very scaled down working version of my bot. I start it off the command line like i would run a bash script currently
samphippen has quit [Quit: Computer has gone to sleep.]
<fuzai_>
The very basic demo I see in front of me from open shift i think is rack lobster?
MattRB has quit [Quit: This computer has gone to sleep]
timonv has quit [Read error: Connection reset by peer]
timonv_ has joined #ruby
testie has joined #ruby
<fuzai_>
can i copy over the config.ru with the 2nd file?
aapzak has joined #ruby
huttan has joined #ruby
reset has joined #ruby
iamjarvo has joined #ruby
yshh has joined #ruby
testie has quit [Remote host closed the connection]
capcap has joined #ruby
matchaw___ has joined #ruby
yshh has quit [Read error: No route to host]
yshh_ has joined #ruby
dreinull has quit [Remote host closed the connection]
paul_k has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 255 seconds]
zigomir has quit [Quit: zigomir]
matchaw_ has quit [Ping timeout: 256 seconds]
timonv has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
etcetera has quit []
danshultz has quit [Remote host closed the connection]
punkrawkR^Home has quit [Read error: Connection reset by peer]
stringoO has quit [Quit: stringoO]
stringoO has joined #ruby
whowantstolivefo has left #ruby ["quit"]
vertroa has quit [Quit: WeeChat 0.3.8]
tenmilestereo has quit [Quit: Leaving]
vertroa has joined #ruby
vertroa has quit [Client Quit]
<fuzai_>
has anyone here worked with open shift? Is it possible to spin an application up that doesn't hook into apache?
vertroa has joined #ruby
reset has quit [Quit: Leaving...]
gnarmis has quit [Remote host closed the connection]
MattRB has joined #ruby
vertroa has quit [Client Quit]
mikepack has joined #ruby
vertroa has joined #ruby
vertroa has quit [Client Quit]
vertroa has joined #ruby
timonv_ has joined #ruby
main has joined #ruby
capcap has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 245 seconds]
freakazoid0223 has joined #ruby
MattRB has quit [Quit: This computer has gone to sleep]
jeffreybaird has joined #ruby
ralxz has quit [Quit: Leaving.]
colonolGron has quit [Quit: Lost terminal]
meoblast001 has joined #ruby
MattRB has joined #ruby
mmitchell has quit [Remote host closed the connection]
Dom___ has joined #ruby
m8 has quit [Quit: Sto andando via]
Tashs has joined #ruby
<meoblast001>
i notice on ruby-doc.org, there's a complete lack of documentation for TCPSocket.. i'm not particularly skilled with Ruby. is there any way i can get some kind of documentation in-code like in Python?
<Tashs>
Hey hey
<swarley>
meoblast001, what sort of documentation do you need?
jimeh has joined #ruby
<swarley>
Like, how to read from it and open it?
<meoblast001>
how to read data, write data, of different sizes.. i'd like to know endianness
<swarley>
You want to look at IO
<meoblast001>
why? TCPServer says it returns a TCPSocket
<swarley>
Oh, I apologize, it does not directly extend IO
<meoblast001>
ooh, parent is IPSocket
<swarley>
It just is Io-like
<swarley>
Meaning read/write is standard
<meoblast001>
ah, if i follow the tree of ancestors, i get some good results
etcetera has joined #ruby
* meoblast001
just learned today how sexy Ruby's threading is
<meoblast001>
it reminds me of when i learned threading in Java
mercwithamouth has joined #ruby
bricker has quit [Ping timeout: 252 seconds]
yoshie902a has joined #ruby
Spooner has quit [Remote host closed the connection]
<etcetera>
meoblast001: what makes it sexy?
elico has quit [Ping timeout: 255 seconds]
<meoblast001>
it's quite elegant.. it's not like my experiences with threading like.. POSIX threading in C
<meoblast001>
it actually makes use of the language features to make threading elegant
Spooner has joined #ruby
<etcetera>
meoblast001: is there a post that describes your sentiment appropriately?
<etcetera>
"Why Ruby threading is awesome"
<etcetera>
And by threading you don't mean EventMachine right?
<meoblast001>
heh, not really
Spooner has quit [Client Quit]
<meoblast001>
the stuff with Thread
<etcetera>
meoblast001: that isn't innovative.
<meoblast001>
my point is not that it's innovative
<meoblast001>
but that it's not counter-innovative
<etcetera>
or elegant.
sbear has joined #ruby
xyproto has left #ruby ["WeeChat 0.3.9.2"]
jblack has joined #ruby
`brendan has quit [Read error: Connection reset by peer]
<fuzai_>
Progress("I think")
etcetera has quit []
dmiller has quit [Ping timeout: 245 seconds]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
`brendan has joined #ruby
dmiller has joined #ruby
`brendan has quit [Read error: Connection reset by peer]
ebobby has quit [Quit: Lost terminal]
AndChat| has joined #ruby
Banistergalaxy has quit [Ping timeout: 256 seconds]
heckler has joined #ruby
`brendan has joined #ruby
hackerdude has joined #ruby
renanoronfle has quit [Remote host closed the connection]
`brendan has quit [Read error: Connection reset by peer]
nipar has joined #ruby
emocakes has quit [Quit: emocakes]
`brendan has joined #ruby
<heckler>
i have a ruby web app where I need to generate some zipped json files on the fly, and they need to contain unique serial numbers and auth tokens, which I guess might be UUIDs. the serial numbers I would like to be maybe 12 character alphanumeric. how can I generate these in my script without too much overhead?
<love_color_text>
heckler: SecureRandom.uuid will generate uuids for you
<heckler>
thanks
cakehero has quit [Remote host closed the connection]
<love_color_text>
np
krainboltgreene has joined #ruby
<heckler>
love_color_text, any idea on random serial numbers of some kind?
<heckler>
they need to be human readable. redemption codes...
hackerdude has quit [Ping timeout: 245 seconds]
<love_color_text>
faker comes to mind, but i doubt that's what you want
<love_color_text>
ive never seen a human readable serial number :P
<krainboltgreene>
SecureRandom.uuid
<krainboltgreene>
:)
<heckler>
well, readable enough for someone to type into a web form or dictate to someone else reasonably easily
<heckler>
uuid will work for the auth tokens
<krainboltgreene>
There's a whole range of methods for SecureRandom, check it out.
jjbohn has joined #ruby
<heckler>
ok, so maybe it will do both for me.
<heckler>
thanks guys
<krainboltgreene>
You using this for auth tokens?
<love_color_text>
maybe, or maybe just write an algorithm that will stuff vowels between consonants and there you go human readable!
mercwithamouth has quit [Quit: Lost terminal]
vlad_starkov has joined #ruby
<heckler>
krainboltgreene, i need auth tokens which i thought would be uuid and human readable serial numbers, i was hoping could be maybe 10 or 12 char alphanumeric
<wakoinc>
just use regex. it will be less brittle then xpath - xpath is really best for documents with predictable structure and a small html change could break it
foobar12 has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 240 seconds]
yugui is now known as yugui_zzz
Nisstyre-laptop has quit [Ping timeout: 246 seconds]
cableray has quit [Quit: cableray]
nomenkun has joined #ruby
ryanf has quit [Ping timeout: 256 seconds]
idkazuma has joined #ruby
bricker has joined #ruby
nomenkun_ has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
subbyyy has quit [Quit: none 0.3.9.2]
cableray has joined #ruby
cableray has quit [Client Quit]
braoru has joined #ruby
stayarrr has quit [Quit: Leaving...]
angusiguess has joined #ruby
clocKwize has quit [Quit: clocKwize]
chussenot has joined #ruby
cableray has joined #ruby
jenrzzz has joined #ruby
<wf2f>
how can i find out what my area of interest is?
angusiguess has quit [Ping timeout: 256 seconds]
jgrevich has quit [Remote host closed the connection]
<wakoinc>
thinking helps
<endre>
thinking always help
<endre>
helps
<endre>
use moar thinking
crackfu has joined #ruby
kaichanvong___ is now known as kaichanvong
reuven has joined #ruby
<[rust]>
i find the opposite true
dhruvasagar has joined #ruby
nari has quit [Ping timeout: 256 seconds]
wargasm has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
ryanf has joined #ruby
marr has quit [Ping timeout: 252 seconds]
yshh has joined #ruby
<shevy>
wf2f whatever keeps you going. just start with some todo list, and expand from that point, you'll soon find what you really want (which is often what you need)
banister`sleep has quit [Remote host closed the connection]
<robert_>
hai shevy :D
stayarrr has joined #ruby
<shevy>
hey robert_ whatcha coding
<robert_>
ruby billing interface
samphippen has joined #ruby
nga4 has quit []
yshh has quit [Ping timeout: 244 seconds]
serhart has quit [Quit: Leaving.]
<robert_>
shevy: I'm trying to write a .docx per client that I can turn into a pretty docx
<robert_>
(all dynamically, too.)
io_syl has quit [Quit: Computer has gone to sleep.]
Erfankam has quit [Remote host closed the connection]
osaut has joined #ruby
axilaris has joined #ruby
inverse has quit [Remote host closed the connection]
<shevy>
cool
<shevy>
you will make it into a gem? :D
<shevy>
one day I wanna autogenerate .doc .pdf .docx all from commandline
<axilaris>
hi... i got this error Unable to resolve dependencies: rdoc requires json (~> 1.4)
<axilaris>
how can i checkk json version and install it manually
<shevy>
axilaris it is a gem. try to do "gem install json"
caption has quit [Ping timeout: 256 seconds]
<axilaris>
thanks shevy...
<shevy>
all gem files that are installed like that, are also available locally on your machine
<axilaris>
just cant get my mac to install rails... and kept on complaining of that
<shevy>
Example on my machine when I do "gem install json":
<shevy>
Fetching: json-1.7.6.gem (100%)
<shevy>
Building native extensions. This could take a while...
<shevy>
Successfully installed json-1.7.6
<shevy>
cd /Programs/Ruby/Current/lib/ruby/gems/1.8/cache/
<axilaris>
how to check the version of gem ? is there a specific command for it ?
<shevy>
and in that directory is the json-1.7.6.gem gem
<shevy>
you mean the version of rubygems? gem -v
<shevy>
"gem -v" -> 1.8.24
<axilaris>
json gem ...is that possible ?
<shevy>
well, you can download old versions too if you really must :)
<shevy>
I think it is possible from the commandline too, to specify a specific version
<shevy>
but since I always use the latest gem, I never used that before
<axilaris>
You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.
<axilaris>
crap...i cant even install json
<axilaris>
really strange
ryanf has quit [Ping timeout: 256 seconds]
<axilaris>
whats the common way to install rails ? sudo gem install rails ? kept on complaining on json version dependencies
<shevy>
axilaris dunno, #rubyonrails folks should know more
<axilaris>
im using gem 1.8.25
<axilaris>
ok
<axilaris>
thx
<shevy>
last time I tried to install rails via bundler, it failed. so I gave up on rails.
<axilaris>
:)
<axilaris>
yeah...there is an installer... but i thought i'll just use the recommendation from the system
<axilaris>
still havent been able to resolve this funny error
<shevy>
which one, the json error? just install the gem, that's about it :P
<shevy>
seems as if you use mac
slainer68 has joined #ruby
<shevy>
if you dont have write permission, it possibly can not copy the .gem file to where it should reside
shock_one has quit [Quit: Ex-Chat]
inverse has joined #ruby
bradhe has joined #ruby
<axilaris>
well... thats the funny thing... im using mac... i should have write permission...it just doesnt prompt me a password
<axilaris>
shevy: are u using mac or windows
<shevy>
axilaris linux
slainer68 has quit [Ping timeout: 256 seconds]
f0ster has quit [Ping timeout: 248 seconds]
bradhe has quit [Ping timeout: 252 seconds]
icole has quit [Remote host closed the connection]
timonv_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
ephemerian has joined #ruby
crackfu has quit [Remote host closed the connection]
crackfu has joined #ruby
banister`sleep has joined #ruby
<robert_>
how's your project, shevy?
<Mon_Ouie>
axilaris: Use gem --user-install to instal in your ~/.gem
<Mon_Ouie>
You can put gem: --user-install in your .gemrc for it to do it automatically
<shevy>
robert_ I have plenty of projects. right now I add a small feature to the build tools
<axilaris>
someone was saying my ruby on mac is old
<robert_>
ah.
<axilaris>
i should update update it first
<Mon_Ouie>
That is true too
<axilaris>
whats the command to update ruby ?
crackfu has quit [Ping timeout: 276 seconds]
<robert_>
shevy: any ideas where I would look to write a docx?
<Mon_Ouie>
You need to install it yourself. There are a few systems created to help that (e.g. rvm, rbenv)
<shevy>
robert_ no real idea, perhaps the libreoffice channel? I hope that they will allow one day to have ruby users autogenerate all doc formats
gnarmis has quit [Remote host closed the connection]
timonv has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
otters has quit [Ping timeout: 255 seconds]
ryanf has joined #ruby
dekroning has quit [Ping timeout: 252 seconds]
banister`sleep has quit [Ping timeout: 276 seconds]
Dom_ has joined #ruby
tekacs has quit [Quit: Disappearing... *poof*]
dekroning has joined #ruby
tekacs has joined #ruby
angusiguess has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
Takehiro has joined #ruby
pskosinski has joined #ruby
arya has quit [Ping timeout: 248 seconds]
workmad3 has joined #ruby
banister`sleep has joined #ruby
arya has joined #ruby
ryanf has quit [Ping timeout: 255 seconds]
<wf2f>
i have an ex58-ud3r motherboard and trying to install raid on the white ports (Gsata?) which uses ICH10, im getting no drives found, anyone know whats up?
marr has joined #ruby
mrdtt has quit [Read error: Connection reset by peer]
idkazuma has quit [Remote host closed the connection]
neurone-1337 has joined #ruby
Astral__ has joined #ruby
spider-mario has joined #ruby
<neurone-1337>
Hi, I'm using debian and want to have a working RoR. But I just see that "/usr/bin/ruby1.9.1 -v" outputs "ruby 1.9.3p194". So rake can't work properly because all is installed in "/var/lib/gems/1.9.1". So... Help?!
browndawg has quit [Quit: Leaving.]
samuel02 has quit [Remote host closed the connection]
Astral_ has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
samuel02 has joined #ruby
bradhe has joined #ruby
<poikon>
neurone-1337: ruby 1.9.3 gems are installed under the 1.9.1 folder afaik
<poikon>
the problem should be somewhere else
<poikon>
any more clues? error messages? etc?
Dom_ has quit [Remote host closed the connection]
mityaz has joined #ruby
Dom_ has joined #ruby
<shevy>
debian always messing up things
<shevy>
they change their ruby, they should clean up their mess
samphippen has quit [Quit: Computer has gone to sleep.]
samuel02 has quit [Ping timeout: 276 seconds]
<poikon>
in that case I'd just install rbenv / ruby-build prefixed in /usr/local
<poikon>
and ignore the system bundled ruby
<poikon>
have your ruby versions in /usr/local/opt
<neurone-1337>
poikon: All I did is "rails new someappname; cd someappname; rake db:create" and it dumbs me a trace beginning with "Could not find a JavaScript runtime." But as I understand it the JS runtime is installed as therubyracer which is installed with "sudo gem install therubyracer" ans can be found in "/var/lib/gems/1.9.1/gems/therubyracer-0.11.3"
<poikon>
or something like that
mockra has quit [Remote host closed the connection]
slainer68 has joined #ruby
<shevy>
/var/lib/gems is non standard
<shevy>
debian did that
<neurone-1337>
shevy: Is it just me or debian doesn't like ruby?
Dom_ has quit [Ping timeout: 252 seconds]
<neurone-1337>
shevy: what is the standard location?
<shevy>
neurone-1337 debian does not like ruby. but debian does not like any extra-addon manager. gem is regarded an enemy to the debian ecosystem
<poikon>
that's only an ideological problem
<poikon>
a pain in the ass at most
<neurone-1337>
shevy: which distrib are you using? debian is light...
<shevy>
neurone-1337 the standard location depends on the prefix used. on my system it is: /Programs/Ruby/1.8.7p370/lib/ruby/gems/1.8 right now. if the prefix would be /usr, it would be: /usr/lib/ruby/gems/1.8 respectively /usr/lib/ruby/gems/1.9.1 if you would use ruby version 1.9.x
<neurone-1337>
poikon: debian is somek king of extremist :)
<shevy>
neurone-1337 I don't use any distribution. they all suck. I compile from source always, via ruby scripts
<poikon>
doesn't stop you from managing your own set of binaries somewhere out of apt-get´s reach heh
ryanf has joined #ruby
<poikon>
neurone-1337: btw try adding therubyracer and execjs to your gemfile
charliesome has joined #ruby
<shevy>
neurone-1337 people have had similar problems with debian. either you stick to debian, and find out how they solve it, or you use i.e. rvm or rbenv, which should work: https://rvm.io/
palentine has quit [Quit: palentine]
<neurone-1337>
poikon: still have done this but it crashed at the first step saying he can't found the gem
<shevy>
neurone-1337 Hanmac here uses debian btw and sticks to the debian way :)
Vektur has quit [Ping timeout: 260 seconds]
bradhe has quit [Ping timeout: 252 seconds]
slainer68 has quit [Ping timeout: 256 seconds]
<neurone-1337>
shevy: ok thanks.
<poikon>
neurone-1337: hm... really?
<neurone-1337>
shevy: have you a link to build ruby?
<shevy>
poikon what OS do you use btw?
<poikon>
shevy: ubuntu
<poikon>
and osx
<neurone-1337>
poikon: yep: "Undefined local variable or method `therubyrace' for Gemfile"
<poikon>
neurone-1337: gem 'therubyracer'
<shevy>
9.1"
<shevy>
neurone-1337 hmm not really... problem is on debian, you must uncripple things. ie. install readline-dev, zlib-dev etc... the source tarballs are at: ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p374.tar.bz2 and ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.tar.bz2 - you could download one, extract it, and give it a try, i.e. compile into a test directory like via "./configure --prefix=/opt/ruby/1.
<poikon>
shevy: that is, all apps deployed on ubuntu vms and my laptop is osx
<neurone-1337>
poikon: .... hmm... I hate this!!! But.. well... thanks... it work better :)
louisror has joined #ruby
<neurone-1337>
shevy: thanks, I ll give a look at this. Debian is light but a bit too extremist sometimes
<shevy>
poikon ah so you also are a osx user... do you use machomebrew on mac?
<shevy>
he also mentions the "reason" for /var/lib/gems
postmodern has quit [Ping timeout: 276 seconds]
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
<shevy>
and a better solution than /etc/alternatives would be to simply use appdirs, but debian loves the FHS so they won't abandon it ever
banister_ has joined #ruby
banister`sleep has quit [Read error: Connection reset by peer]
browndawg has joined #ruby
<shevy>
I think the whole design of the FHS came about because hackers are lazy and want to type only few characters
<shevy>
so /usr won... and /etc won ... and /sbin won ...
answer_42 has quit [Remote host closed the connection]
<shevy>
and /home
<shevy>
and /root :D
<Hanmac>
/dev
<shevy>
yeah, I think it's a fairly simple model to use when you work in a shell
answer_42 has joined #ruby
vlad_starkov has joined #ruby
TheFuzzball has quit [Quit: Leaving...]
<neurone-1337>
shevy: appdirs would be so good..
[rust] has quit [Quit: This computer has gone to sleep]
ryanf has quit [Ping timeout: 244 seconds]
icole has joined #ruby
<shevy>
yeah but distributions would kill a big reason for their existance, competition (or rather competitive advantage)
<shevy>
it's a bit strange to see like 50 different distributions based on debian alone though :\
<neurone-1337>
Well, I'm a noob and... my book is a bit old. Could you tell me how to access to a page once i have launched the rails server? In my book they say "127.0.0.1:3000/<controller>/<action>". In Internet I read it is "127.0.0.1:3000/<controller>#<action>"... But anyway it doesn't work. I have a routing error : "No route matches [GET] ...".
eka has joined #ruby
cableray has quit [Quit: cableray]
<neurone-1337>
shevy: Yes but sometimes new things are good too. If you look before and after Gnome(Shell)... It's risky but not so bad.
<shevy>
but I dont like gnome3! :P
icole has quit [Ping timeout: 244 seconds]
<neurone-1337>
shevy: yep but they evolved!
jbw has joined #ruby
<neurone-1337>
shevy, poikon: have you an idea of the default url to access to a controller's action?
mneorr has quit [Remote host closed the connection]
sn0wb1rd has quit [Quit: sn0wb1rd]
<shevy>
no idea, I gave up on rails
<shevy>
sinatra may be easier neurone-1337 :P
atno has quit [Ping timeout: 276 seconds]
m8 has joined #ruby
<neurone-1337>
shevy: please don't break my hope to learn this :p
<shevy>
hehe
<shevy>
there is #rubyonrails too
<shevy>
the folks there are more enthusiastic about rails :D
<shevy>
I remember that years ago I managed to install rails and got the example working with sqlite
ephemerian has quit [Quit: Leaving.]
<Nuck>
Okay, I'm probably gonna sound like an idiot for asking this, but I came from a Node.js background so it's not quite parsing... Why would I have to use Bundler.setup() exactly, instead of just requiring without that?
<neurone-1337>
shevy: you re right! I first though it was a ruby problem. Thank you :)
slainer68 has joined #ruby
timonv_ has joined #ruby
bradhe has joined #ruby
mockra has joined #ruby
timonv has quit [Read error: Connection reset by peer]
Cymew has joined #ruby
mneorr has joined #ruby
blueOxigen has joined #ruby
<Cymew>
Hi. I'm new to ruby and I don't understand the documentation. I want to calculate a md5sum on a file, and have found some indication that there's md5 functions in the stdlib. But, how do I use it? Anyone care to give me an example? I have found this webpage, but can't parse it: http://ruby-doc.org/stdlib-1.8.7/libdoc/digest/rdoc/MD5.html
pyreal has quit [Read error: Connection reset by peer]
<Cymew>
I tried require 'digest' and then digest::MD5.md5("apa")
<Cymew>
, which didn't work
samuel02 has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
<Cymew>
I guess I don't understand the docs...
main has joined #ruby
bluOxigen has quit [Ping timeout: 244 seconds]
<shevy>
how about Digest::MD5.hexdigest(File.read(file))
pyreal has joined #ruby
<shevy>
require 'digest/md5'
skcin7 has quit [Quit: Computer has gone to sleep.]
xybre has quit [Ping timeout: 245 seconds]
<spider-mario>
I’m not even sure the require is required
mockra has quit [Ping timeout: 256 seconds]
samuel02 has quit [Remote host closed the connection]
<shevy>
hehe
<Cymew>
I wasn't sure myself, since I got the impression this is the standard library, and thus maybe the require is not needed.
<shevy>
did you try it
samuel02 has joined #ruby
<Cymew>
Digest::MD5.hexdigest does work. But, how do I find out about hexdigest?
<shevy>
digest::MD5 seems super wrong
<Cymew>
It's not on that page...
<Cymew>
I really don't understand how to read the docs
Anderson has quit [Read error: Connection reset by peer]
TheFuzzball has joined #ruby
<Cymew>
I think I have enough to do some md5 sums now. I guess I will try to learn about modules and namespaces some other time. Pointers welcome, though. Many thanks for the helpful answers!
<shevy>
cool
<shevy>
you worked through awful docu Cymew ;)
<poikon>
how would you suggest that he wrote it then? It looks like he's accomodating for differnt types of digest implementations
aapzak has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
TomyLobo has joined #ruby
<shevy>
poikon dunno, it just reads strangely to my eyes on first sight
<shevy>
module Module; class Class
<shevy>
the worst is the word Eigenclass... Eigen means self in german... so it is like class Selfclass :(
<poikon>
the docs are inconsistent though, it uses Class / Instance indistinctively
<poikon>
sorry, indifferently
<poikon>
not sure i understand what he means in every case...
DrCode has quit [Ping timeout: 276 seconds]
dekroning has joined #ruby
blaxter has joined #ruby
wakoinc_ has joined #ruby
wakoinc_ has quit [Changing host]
wakoinc_ has joined #ruby
<poikon>
normally I do something like md5 = Digest::MD5.new, at some other point i'd do md5.hexdigest "string"
wakoinc has quit [Read error: Connection reset by peer]
<poikon>
i mean, coming back to the original question :-)
wakoinc_ has quit [Client Quit]
Takehiro has quit [Remote host closed the connection]
JumpMast3r has joined #ruby
DrCode has joined #ruby
ryanf has quit [Ping timeout: 246 seconds]
dekroning has quit [Ping timeout: 252 seconds]
grzywacz has quit [Ping timeout: 240 seconds]
<shevy>
yeah that would look ok
guns has quit [Quit: guns]
<shevy>
there is code that can just look so odd sometimes...
<shevy>
class Class; class Class; end; end; x = Class::Class.new # => #<Class::Class:0xb6d3a804>
Targen has quit [Ping timeout: 252 seconds]
osaut has quit [Quit: osaut]
mneorr has quit [Remote host closed the connection]
davidcelis has quit [Ping timeout: 245 seconds]
erichmenge has quit [Ping timeout: 245 seconds]
dcwu has quit [Quit: Leaving.]
scrogson has quit [Ping timeout: 260 seconds]
<poikon>
hehe
mockra has joined #ruby
<Hanmac>
shevy you mean like this?
<Hanmac>
>> class << o = Object.new;class ABC;end;end; p o.singleton_class::ABC
<shevy>
why is it that I dont like your code Hanmac :(
<shevy>
I think ruby is not even class based anymore, and not prototypic either
<shevy>
it is somewhere in between those two
johnsonw has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
mockra has quit [Ping timeout: 255 seconds]
ananthakumaran has quit [Quit: Leaving.]
angusiguess has quit [Ping timeout: 252 seconds]
rezzack1 has joined #ruby
bluOxigen has joined #ruby
<johnsonw>
Hello, I have a question about something in the Well Grounded Rubyist. Page 162 if anyone has the PDF. It says that if you do 'begin; foo; end until true', that foo will always be run once. I can't get my head around that! But he doesn't explain it. Can anyone help?
vlad_starkov has quit [Remote host closed the connection]
<Hanmac>
johnsonw its an foot based until loop ... "until true; foo;end;" is head based
rezzack has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
<johnsonw>
But in 'foo until true', foo isn't run
<johnsonw>
And that's foot-based in the same way
arya has joined #ruby
arietis has joined #ruby
Takehiro has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
arietis has quit [Client Quit]
Takehiro_ has joined #ruby
<Hanmac>
johnsonw no, in this case it its still headbased
blueOxigen has quit [Ping timeout: 252 seconds]
<johnsonw>
Are these just arbitrary semantics I have to learn? Or is there something I'm missing when I look at them to tell the difference?
scrogson has joined #ruby
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
sbear has joined #ruby
malte_ has quit [Remote host closed the connection]
malte_ has joined #ruby
Cymew has quit [Quit: KVIrc KVIrc Equilibrium 4.1.3, revision: 5988, sources date: 20110830, built on: 2011-12-05 12:43:31 UTC http://www.kvirc.net/]
Takehiro has quit [Ping timeout: 245 seconds]
johnsonw has quit [Quit: Page closed]
osaut has joined #ruby
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
yacks has quit [Ping timeout: 240 seconds]
phinfonet has joined #ruby
hamed_r has joined #ruby
ryanf has joined #ruby
<phinfonet>
Hi all
<banister_>
Hanmac: you shoudl have told him no one ever uses it
<banister_>
Hanmac: we barely even need explicit loops in ruby
megha has joined #ruby
<banister_>
but for a ruby noob, he does look like a piece of shit that we dont have proper until loops
<banister_>
i remember thinking that too
<banister_>
but i can count the times i've ever needed do { }until; and it's exactly once :)
arya has quit [Ping timeout: 248 seconds]
banister_ has quit [Read error: Connection reset by peer]
arya has joined #ruby
banister`sleep has joined #ruby
madhatter has quit [Ping timeout: 256 seconds]
arietis has joined #ruby
madhatter has joined #ruby
ryanf has quit [Ping timeout: 276 seconds]
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
heftig has quit [Ping timeout: 245 seconds]
sayan has quit [Read error: Connection reset by peer]
Takehiro_ has quit [Remote host closed the connection]
Xeago has joined #ruby
clooth has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 256 seconds]
clooth has joined #ruby
colonolGron has joined #ruby
yzl has joined #ruby
arya has joined #ruby
ryanf has joined #ruby
sayan has quit [Read error: Connection reset by peer]
sbear has quit [Ping timeout: 276 seconds]
mockra has joined #ruby
arya has quit [Ping timeout: 248 seconds]
browndawg has joined #ruby
miso1337 has joined #ruby
miso1337 has quit [Remote host closed the connection]
Anderson has joined #ruby
mneorr has joined #ruby
mockra has quit [Ping timeout: 244 seconds]
megha has quit [Ping timeout: 255 seconds]
arya has joined #ruby
madhatter has quit [Remote host closed the connection]
tenmilestereo has joined #ruby
elico has joined #ruby
madhatter has joined #ruby
aloshkarev has joined #ruby
mneorr has quit [Ping timeout: 246 seconds]
ryanf has quit [Ping timeout: 245 seconds]
yzl is now known as LU_cifer
LU_cifer is now known as lzy
xemu has joined #ruby
megha has joined #ruby
matchaw has joined #ruby
banister`sleep has quit [Remote host closed the connection]
Spooner has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
vlad_starkov has joined #ruby
az7ar has joined #ruby
Erfankam has joined #ruby
michele_ has joined #ruby
elaptics`away is now known as elaptics
vlad_starkov has quit [Ping timeout: 256 seconds]
timonv_ has joined #ruby
timonv has quit [Read error: Connection reset by peer]
<shevy>
Hanmac yeah... captchas just exist to piss me off. the spammers pay cheap labour to overcome it, so it is of no hindrance to them, as they have income anyway
spire has joined #ruby
Takehiro has joined #ruby
xybre has joined #ruby
xybre has quit [Changing host]
xybre has joined #ruby
arya has quit [Ping timeout: 248 seconds]
timmow has joined #ruby
Takehiro has quit [Remote host closed the connection]
banister`sleep has joined #ruby
arya has joined #ruby
Kuifje has joined #ruby
ryanf has joined #ruby
pyro111 has quit [Quit: Leaving]
aloshkarev has left #ruby [#ruby]
<Xeago>
shevy, recently I've seen forms with 'hidden' fields to overcome spammers
<Xeago>
bots would fill those forms in, for users they are invisible
BizarreCake has joined #ruby
jonathanwallace has joined #ruby
stayarrr has quit [Quit: Leaving...]
<shevy>
interesting
<neurone-1337>
shevy: +1
samphippen has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
Iszak has joined #ruby
<shevy>
omg
<Xeago>
there's a ruby gem for it to transform your normal forms into those kinda forms
<shevy>
instiki has 14 MB size... it used to have 1.1 MB
BizarreCake has quit [Read error: Connection reset by peer]
<shevy>
I am gonna call this the railsification process of ruby :(
samphippen has joined #ruby
<shevy>
1.1M Jan 27 14:51 instiki-0.11.0.tar.xz
<shevy>
10M Jan 27 14:53 instiki-0.19.5.tar.xz
<shevy>
madness!
IrishGringo has joined #ruby
<matti>
?
<matti>
LOL
<shevy>
but the worst part is, it seems to be dead
<shevy>
Instiki 0.19.3 (8/31/2011)
<shevy>
so before it died, it became BLOATED
Kuifje has quit [Read error: Connection reset by peer]
<shevy>
rm instiki-0.19.5.tar.xz
<shevy>
better now, kill all bloat
Kuifje has joined #ruby
ryanf has quit [Ping timeout: 255 seconds]
<Hanmac>
shevy it may inplode from its own weight? :P
HAKEON has joined #ruby
jfl0wers has joined #ruby
<shevy>
Hanmac nah... I just dont like it when software bloats up, right before it becomes inactive
<shevy>
when I repackaged the new instiki, I saw lots of files residing in an "activerecord/" directory pass by
JonnieCa1he has joined #ruby
Vektur has joined #ruby
drago757 has joined #ruby
kernelhcy has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
osaut has quit [Quit: osaut]
timmow has quit [Read error: Connection reset by peer]
kernelhcy has quit [Client Quit]
timmow has joined #ruby
Kuifje has quit [Read error: Connection reset by peer]
pkuyken has joined #ruby
mockra has joined #ruby
jon_wingfield has quit [Read error: Connection reset by peer]
huoxito has joined #ruby
hcy has joined #ruby
Kuifje has joined #ruby
angusiguess has joined #ruby
jon_wingfield has joined #ruby
BizarreCake has joined #ruby
matchaw__ has joined #ruby
timmow has quit [Client Quit]
browndawg has left #ruby [#ruby]
az7ar has quit [Remote host closed the connection]
matchaw has quit [Ping timeout: 256 seconds]
hcy has quit [Client Quit]
browndawg has joined #ruby
Guedes has quit [Ping timeout: 252 seconds]
mockra has quit [Ping timeout: 244 seconds]
Cooler__ has joined #ruby
Cooler_ has quit [Read error: Connection reset by peer]
sbear has joined #ruby
Takehiro has joined #ruby
Cooler__ has quit [Read error: Connection reset by peer]
jon_wingfield has quit [Remote host closed the connection]
Cooler_ has joined #ruby
Cooler_ has quit [Read error: Connection reset by peer]
Takehiro has quit [Remote host closed the connection]
Takehiro has joined #ruby
osaut has joined #ruby
workmad3 has joined #ruby
samphippen has joined #ruby
solidoodlesuppor has joined #ruby
<clooth>
I hate filling in timesheets.
LBRapid has joined #ruby
LBRapid is now known as Guest23335
Guest23335 has quit [Client Quit]
ryanf has joined #ruby
Guedes has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
<pkuyken>
find me someone who does and I'll say you found either a liar or an accountant.
Takehiro has quit [Ping timeout: 255 seconds]
blaxter has quit [Quit: foo]
pkuyken has quit [Quit: pkuyken]
spire has quit [Quit: HydraIRC -> http://www.hydrairc.com <- The professional IRC Client :D]
<kylescottmcgill>
This may sound like a non issue, however what would be faster, Compiled HTML eg ERB/Slim/Haml, or static pages with ajax calls to the server? im setting up a test atm, but i would like to know if anyone had any opions or already knows of some benchmarks for a very small site
<Xeago>
kylescottmcgill: depends on the connection and the payload
slainer68 has quit [Remote host closed the connection]
Neomex has quit [Quit: Neomex]
<Xeago>
the static pages can be cached plus ajax calls can be cached easier
<kylescottmcgill>
Xeago: ah your right i forgot about the ajax being able to be cached
yacks has joined #ruby
nicoulaj has joined #ruby
<Xeago>
compiled html can also be cached
<Xeago>
but differently
<Xeago>
and is less common
louisror has quit [Ping timeout: 276 seconds]
Banistergalaxy has quit [Ping timeout: 256 seconds]
<Xeago>
the static pages approach allows for generation of the static pages using for example markdown
<Xeago>
that way you can make an CRM'ish interface for other people to alter static assets of the site
Banistergalaxy has joined #ruby
pkuyken has joined #ruby
Xeago has quit [Remote host closed the connection]
<DefV>
tbh: compiled HTML, with varnish and ESI blocks
<kylescottmcgill>
my use case, is that i have a 2 page web app, running on Heroku for the time being, with Redis and Sinatra, basically, user posts something small, next page presents it, and thats it.. but i wasnt sure if i compiled the page on Heroku, or do i send via a ajax call
<kylescottmcgill>
markdown would be a unique approach
HAKEON has joined #ruby
Iszak has quit []
<kylescottmcgill>
btw, thanks i have a couple of other things i can now try to cover more ground during testing :)
sleetdro_ is now known as sleetdrop
ryanf has quit [Ping timeout: 246 seconds]
main has quit [Ping timeout: 246 seconds]
andrewhl has joined #ruby
kirun has joined #ruby
arya has quit [Ping timeout: 248 seconds]
Kn|t3 has joined #ruby
ephialtes480 has joined #ruby
shock_one has quit [Remote host closed the connection]
nfk has joined #ruby
rezzack has joined #ruby
chussenot has joined #ruby
jetblack has quit [Quit: leaving]
arya has joined #ruby
vlad_starkov has joined #ruby
lzy has quit [Ping timeout: 252 seconds]
shock_one has joined #ruby
rezzack1 has quit [Ping timeout: 256 seconds]
beaky has joined #ruby
<beaky>
hello
sullenel has joined #ruby
lzy has joined #ruby
megha has quit [Quit: WeeChat 0.4.0]
vlad_starkov has quit [Read error: No route to host]
Xeago has joined #ruby
postmodern has joined #ruby
samphipp_ has joined #ruby
GaDI has joined #ruby
samphippen has quit [Ping timeout: 246 seconds]
samphipp_ is now known as samphippen
workmad3 has quit [Ping timeout: 245 seconds]
Luceo has joined #ruby
serhart has joined #ruby
vlad_starkov has joined #ruby
billy_ran_away has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<AxonetBE>
Sorry, this was my message : I'm wondering what would be the best way to implement a time table like this. https://gist.github.com/4648903 Is it necessary to create 3 columns in a table for every day?
jaequery has quit [Quit: Computer has gone to sleep.]
jeffreybaird has joined #ruby
mityaz has quit [Ping timeout: 256 seconds]
bradhe has quit [Ping timeout: 246 seconds]
ananthakumaran has joined #ruby
anirudh24seven has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby
freeayu has quit [Quit: This computer has gone to sleep]
serhart has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
colonolGron has quit [Ping timeout: 252 seconds]
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Read error: No route to host]
jlwestsr has joined #ruby
h4mz1d has joined #ruby
tvw has joined #ruby
megha has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
jonahR has joined #ruby
angusiguess has quit [Ping timeout: 252 seconds]
jfl0wers has joined #ruby
chussenot has quit [Quit: chussenot]
Kn|t3_ has joined #ruby
ryanf has quit [Ping timeout: 245 seconds]
eka has joined #ruby
eka has quit [Client Quit]
cek has joined #ruby
tommyvyo has joined #ruby
tommyvyo has quit [Changing host]
tommyvyo has joined #ruby
<cek>
hey. what is "senior level education" in regards to usa?
h4mz1d has quit [Ping timeout: 276 seconds]
<cek>
Senior-level Mathematics (Pre-Calculus) - what does this mean?
tvw has left #ruby ["wIRC"]
GaDI_ has joined #ruby
GaDI_ has quit [Client Quit]
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
Kn|t3 has quit [Ping timeout: 256 seconds]
Kn|t3_ is now known as Kn|t3
GaDI has quit [Ping timeout: 252 seconds]
apeiros_ has joined #ruby
vlad_starkov has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
Xeago has joined #ruby
<havenn>
cek: I'm guessing senior in high-school. I guess you could say the high-school pre-calc is like a prep course to take college calculus?
apeiros_ has quit [Ping timeout: 252 seconds]
jonathanwallace has quit [Ping timeout: 255 seconds]
JonnieCa1he has quit [Quit: Lost terminal]
<cek>
no idea, but it looks like so. looking at reqs for UBC admissino
mockra has joined #ruby
zph has joined #ruby
<cek>
thanks, havenn
jrafanie has quit [Quit: jrafanie]
Xeago has quit [Remote host closed the connection]
wmoxam has quit [Remote host closed the connection]
samphippen has quit [Client Quit]
h4mz1d has joined #ruby
blueOxigen has joined #ruby
Anderson has quit [Remote host closed the connection]
pkuyken has quit [Quit: pkuyken]
inokenty has quit [Quit: Leaving.]
yoshie902a has joined #ruby
mockra has quit [Ping timeout: 244 seconds]
noxoc has joined #ruby
jetblack has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
_nitti has quit [Remote host closed the connection]
jeffreybaird has quit [Quit: jeffreybaird]
qdiwry has joined #ruby
<yoshie902a>
does anyone know the difference between HTML tidy and HTML tidyp? the ruby gem uses tidyp, but tidyp is a forked version.
pcarrier has joined #ruby
<whitequark>
i guess tidyp actually compiles on modern compilers.
b1rkh0ff has quit [Ping timeout: 245 seconds]
h4mz1d has quit [Ping timeout: 245 seconds]
quest88 has joined #ruby
b1rkh0ff has joined #ruby
<yoshie902a>
whitequark: I've used tidy through terminal, trying to figure out which is up kept more, I don't want to start using one and for the project to fall away
Strum has left #ruby [#ruby]
allaire has joined #ruby
pkuyken_ has joined #ruby
<allaire>
Hey guys, does the Logger has some kind of caching mechanism when it writes to a file?
Rollabunna has quit [Remote host closed the connection]
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
pkuyken_ has quit [Client Quit]
osaut has joined #ruby
BookPage has quit [Quit: Leaving.]
<yoshie902a>
would it be slower to run a terminal command, using the original tidy and get the response, or just use tidyp?
<yoshie902a>
I'll have to test it, with benchmark, I guess.
<whitequark>
yoshie902a: they're both kinda abandoned afaik
<yoshie902a>
do you know a non-abandoned project?
<whitequark>
yoshie902a: for validating html?
<yoshie902a>
yes
<yoshie902a>
and fix it
ryanf has joined #ruby
<whitequark>
for fixing you can roundtrip it through nokogiri
cha1tanya has quit [Quit: Leaving]
<yoshie902a>
html tidy can actually refactor inline styles to CSS, it's a nice feature. Nokogiri is unfortunately flawed. I have to pre-process using HTML tidy before using nokogiri, otherwise, I get bad parsing
shock_one has quit [Read error: Connection reset by peer]
<yoshie902a>
whitequark: thanks! looks like HTML tidy is still maintained and I should pipe my text using %x{}, but I've never done that. not sure what that means. Do you? I will basically have a string, mystring="some html" and need to pass it through tidy, which would normally have a terminal command of "tidy -c --css-prefix 'cs' raw.html>clean.htm", however in this case, I will be passing many strings and need a string back.
<Spooner>
yoshie902a, That only matters if you are running it from a server. Just running it once will be fine.
<Spooner>
banisterfiend, lo
mercwithamouth has joined #ruby
jrajav has joined #ruby
stayarrr has quit [Quit: Leaving...]
arya has joined #ruby
thams has quit [Client Quit]
seich is now known as Seich
<yoshie902a>
Spooner: i'll be running on a server , I will be running it on a ton of documents that I'm pre-processing and then on strings when I modify them.
colonolGron has joined #ruby
workmad3 has joined #ruby
halogenandtoast has joined #ruby
GIOGIO has joined #ruby
ashp has left #ruby [#ruby]
slainer68 has joined #ruby
bricker_ has joined #ruby
GIOGIO has left #ruby [#ruby]
frowni has joined #ruby
raul782 has quit [Remote host closed the connection]
<breakingthings>
anyway, TCPSocket.new("localhost", "derp") errors out with "nodename nor servname provided or not known"
<breakingthings>
makes sense right
<shevy>
I ended up rewriting my first IRC bot... now it no longer works. I ended up rewriting my first game... now I dont want to continue with it anymore :(
freakazoid0223 has quit [Quit: Leaving]
<breakingthings>
but… TCPSocket.new("localhost", "hello")… errors out with "Connection refused"
<breakingthings>
wat.
<breakingthings>
Just… hello for some reason is turning into a port that can't be accessed.
<breakingthings>
How dat.
zph has joined #ruby
Takehiro has joined #ruby
jduan1981 has joined #ruby
pcarrier has quit []
<shevy>
what
<shevy>
SocketError: getaddrinfo: Servname not supported for ai_socktype
raul782 has quit [Ping timeout: 260 seconds]
Banistergalaxy has quit [Ping timeout: 245 seconds]
atno has joined #ruby
Astral__ has quit [Read error: Connection reset by peer]
Astral__ has joined #ruby
<breakingthings>
wat.
<breakingthings>
Get it together, TCPSocket.
yacks has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
<shevy>
lol
<shevy>
breakingthings you are funny :)
axilaris has quit [Ping timeout: 246 seconds]
joofsh has quit [Remote host closed the connection]
ryanf has joined #ruby
noyb has quit [Quit: Lost terminal]
benlieb has quit [Quit: benlieb]
poikon has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
poikon has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
poikon has quit [Read error: Connection reset by peer]
poikon has joined #ruby
workmad3 has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
poikon has quit [Remote host closed the connection]
Virunga has quit [Remote host closed the connection]
arya has joined #ruby
mrdtt_ has joined #ruby
angusiguess has quit [Ping timeout: 276 seconds]
<Hanmac>
Dann1 in this context you can do an .each {|i| i.gsub!(" ","") }
mrdtt has quit [Ping timeout: 255 seconds]
mrdtt_ is now known as mrdtt
sullenel has joined #ruby
cobragoat has quit [Ping timeout: 245 seconds]
Munchor has joined #ruby
<Munchor>
I have a string "lolol", and I want to replace all "l"s with "s"s. How can I achieve this? I looked for information online and only found a .replace() function but it only takes one argument, which I found quite odd.
zigomir has joined #ruby
matchaw__ has quit [Ping timeout: 245 seconds]
Munchor has left #ruby ["Leaving"]
Nisstyre-laptop has joined #ruby
zigomir_ has joined #ruby
breakingthings has quit []
beaky has quit [Ping timeout: 276 seconds]
matchaw_ has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
<shevy>
well, if you look at "def on", it will surely have a yield
<Dann1>
Okay, hold on
Takehiro has quit [Ping timeout: 255 seconds]
<swarley>
whitequark, yes, I know. And I don't have a real want to do it, but I've been trying to hack my way into it for a while and it seems to be quite hard to get it work
browndawg has quit [Quit: Leaving.]
yoshie902a has quit [Quit: yoshie902a]
halogenandtoast has quit [Quit: halogenandtoast]
shevy has quit [Ping timeout: 246 seconds]
yshh has quit [Ping timeout: 255 seconds]
braoru has quit [Remote host closed the connection]
<Dann1>
Okay, the on method is somewhere around the gem lib
<objectivemo>
I want to understand what line 7 does, it seems like magic but nextval gets updated to start2 + nextval
x82_nicole has quit [Quit: Computer has gone to sleep.]
<banisterfiend>
objectivemo: a,b = c, d
<shock_one>
objectivemo, it's just two variables assignment. The benefit is you don't have to use temp variable.
<banisterfiend>
objectivemo: is teh same as: a = c and b = d
<survili>
hi all, i wrote a little script that processes text files. and for 5000 lines it takes about 40 seconds on my machine, same script in c# takes about 1 second. I was wondering if I did something stupid. the script is very short, please take a look and tell me if it's me or is it ruby, and i have to live with it :) https://gist.github.com/4650129
<objectivemo>
banisterfiend: Thanks! I got confused as I thought it was a, (b=c), d
<objectivemo>
as opposed to it being processed in the way you said
<banisterfiend>
objectivemo: np
solidoodlesuppor has quit [Remote host closed the connection]
<Hanmac>
objectivemo: information: the assignment is taking "at one time" ... so you can do a,b = b, a
phinfonet_ has joined #ruby
<shock_one>
survili, what is inspect? you don't print it and don't assign to anything.
busybox42 has quit [Ping timeout: 248 seconds]
apeiros_ has joined #ruby
<survili>
shock_one, correct it was for debugging.. I will remove and see if it's significantly better! good catch :)
crackfu has quit [Ping timeout: 276 seconds]
gregor3005 has joined #ruby
rippa has joined #ruby
phinfonet has quit [Read error: Connection reset by peer]
<survili>
shock_one, yohoooo :) it's flying now baby! :) thanks a lot!
<TTilus>
survili: good
<shock_one>
survili, I stake on 2 sec.
<TTilus>
survili: you might still want to try File.open + #read one bufferfull (make it big) at a time
<TTilus>
survili: #inspect is s-l-o-w at times, its totally debugging thing :)
<survili>
TTilus, it was for debugging, I somehow removed puts and forgot it there..
<survili>
TTilus, regarding bufferfull isn't readlines doing just that ? reading the whole file at once ?
* Hanmac
feels awsome because he can do Archive.new("xyz.tar.xz") << "*.cpp" and it automatic adds all cpp files from the current dir to an tar.xz archive :D
maletor has quit [Quit: Computer has gone to sleep.]
Hauro has joined #ruby
Hauro has quit [Client Quit]
<shafire>
lol
<shock_one>
emocakes, buy a ruby book, it'll be a good investment.
bradhe has quit [Remote host closed the connection]
geggam has joined #ruby
<emocakes>
shock_one i have the ruby programming language
<emocakes>
and ruby metaprogramming
<emocakes>
or something
<emocakes>
slowly reading them
mduvall has joined #ruby
moos3 has joined #ruby
tenmilestereo has quit [Quit: Leaving]
spinagon has joined #ruby
<shock_one>
emocakes, I love hastebin, thank you.
<emocakes>
nicer than pastebin right?
rippa has quit [Read error: Connection reset by peer]
<shock_one>
I used to used gist.
whowantstolivefo has quit [Quit: quit]
bradhe has joined #ruby
banjara has joined #ruby
mneorr has quit [Remote host closed the connection]
epylinkn has quit [Quit: Leaving.]
mneorr has joined #ruby
dmerrick has joined #ruby
Dann1 has quit [Quit: GODDAMNIT]
clooth has quit [Quit: clooth]
maletor has joined #ruby
Mon_Ouie has quit [Ping timeout: 260 seconds]
joofsh has quit [Ping timeout: 260 seconds]
spinagon has quit [Ping timeout: 240 seconds]
chussenot has joined #ruby
sullenel has quit [Quit: leaving]
moos3 has quit [Quit: Computer has gone to sleep.]
Xeago has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
jimeh has joined #ruby
shafire has left #ruby [#ruby]
t3o has joined #ruby
noxoc has joined #ruby
heyitsdave has joined #ruby
iamjarvo has quit [Quit: Leaving.]
maletor has quit [Quit: Computer has gone to sleep.]
clocKwize has quit [Quit: clocKwize]
jackyalcine has joined #ruby
jackyalcine has quit [Changing host]
jackyalcine has joined #ruby
clocKwize has joined #ruby
`brendan has quit [Ping timeout: 245 seconds]
daniel_- has joined #ruby
<t3o>
Hi I try to use the gd2 gemwith ruby 1.9.3 in ubuntu precise. After installing "gem1.9.3 install gd2" I added 'require "gd"' to a script. But when starting it gives me syntax errors in /home/fnord/.ruby/gems/gems/gd2-1.1.1/lib/gd2.rb:53: warning: else without rescue is useless. why?
w3pm has joined #ruby
beiter has quit [Quit: beiter]
<Spooner>
t3o, That is a warning, not an error.
znake has joined #ruby
<t3o>
Spooner: what aboput the next lines :): /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `require': /home/tjabo/.ruby/gems/gems/gd2-1.1.1/lib/gd2.rb:46: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' (SyntaxError)
Takehiro has joined #ruby
<Spooner>
t3o, Ah, more important. It is not updated for the slight syntax change in 1.9.
<t3o>
Spooner: why did gem install it?
znake has quit [Client Quit]
<Spooner>
t3o, Because 1.8 gem writers didn't anticipate their gems failing in the future. It is quite possible to have cross-version compatible gems, so "gem" doesn't know any better.
<t3o>
Spooner: thanks. So.... as ubuntu has no libgd(2)-ruby for 1.9.x and there's no gem for that version ruby 1.9.x is dead for me.
<t3o>
or.. is there another possibility to create a png image with ruby?
<Spooner>
Plenty. chunkypng or you could save a Gosu Window.
bradhe has quit [Remote host closed the connection]
<swills>
hi all. i have some code which has a "@@lock = Mutex.new"... this caues a warning on ruby 1.9... googling lead me to change it to class_variable_set(:@@lock, Mutex.new), but this breaks on ruby 1.8. (my code needs to work on both.) what's the right solution?
<t3o>
shevy: installation was successful. require gd2-ffij fails with a new error. I will try chunk_ong
<t3o>
chunky_png
joofsh has joined #ruby
mikepack has joined #ruby
<Hanmac>
swills: first: @@lock should not make a warning, show it to us second: drop 1.8
galvao has left #ruby ["Konversation terminated!"]
<swills>
warning: class variable access from toplevel
cobragoat has quit [Ping timeout: 256 seconds]
toekutr has joined #ruby
<swills>
Hanmac: yeah, i know, i wish people would drop 1.8 too, but i can't make 'em...
rmillerx has joined #ruby
Kingy has joined #ruby
chrismhough has quit [Quit: chrismhough]
caption_ has joined #ruby
drago757 has quit [Quit: drago757]
caption has quit [Ping timeout: 276 seconds]
samphippen has joined #ruby
<swills>
Hanmac: the error is "warning: class variable access from toplevel"
<swills>
the warning isn't from the @@lock, it's from using the lock later
lunarjar has joined #ruby
<swills>
that's with 1.9.
lunarjar has quit [Read error: Connection reset by peer]
<swills>
with 1.8, if i use class_variable_set, i get an error about the variable not existing when i use it within the class later
lunarjar has joined #ruby
lunarjar has quit [Read error: Connection reset by peer]
gyre007 has quit [Remote host closed the connection]
yoshie902a has left #ruby [#ruby]
rtkl has joined #ruby
rtkl has left #ruby [#ruby]
wizzlepig has joined #ruby
<wizzlepig>
Hi, testing out irc from my tablet...
<wizzlepig>
Anyone home?
<Spooner>
wizzlepig, Nope.
<GeekOnCoffee>
I'm at my home, yes
halogenandtoast has joined #ruby
<wizzlepig>
Ah! Yay! Works. Spent most oflast night rootingmy phone so i cantether it at work andget onhere.. looks like i also need to get to know this keypad. Thanks
yoshie902a has joined #ruby
jackyalcine has quit [Quit: Quit]
dmiller has joined #ruby
<wizzlepig>
Bye
wizzlepig has quit [Quit: wizzlepig]
<halogenandtoast>
Does anyone happen to know how ruby stores methods (written in ruby) onto the c object? Does is store the ast for the method?
Proshot has joined #ruby
<yoshie902a>
can I pass variables in to %x{}? I tried cmd_txt="tidy -c --css-prefix 'cs' #{file_path_in} > #{file_path_out}"; %x{cmd_text}; but I get "Errno::ENOENT: No such file or directory - cmd_text"
<banisterfiend>
halogenandtoast: bytecode
<halogenandtoast>
banisterfiend: do you happen to know where it gets converted to bytecode?
<banisterfiend>
halogenandtoast: in the source?
<halogenandtoast>
Yes in the source
<banisterfiend>
halogenandtoast: buy the book "ruby under microscope" it explains all that
<halogenandtoast>
I actually bought that book!
<halogenandtoast>
I love it
<banisterfiend>
ell it's all explains there :D
<halogenandtoast>
I'll look for this topic
linux has joined #ruby
colonolGron has quit [Quit: leaving]
sorbo_ has joined #ruby
<halogenandtoast>
That book is by far my favorite ruby book
w|t has quit [Ping timeout: 248 seconds]
danshultz has quit [Remote host closed the connection]
w|t has joined #ruby
w|t has quit [Changing host]
w|t has joined #ruby
<halogenandtoast>
For some reason I thought KRI didn't do byte code and only rbi did that
<halogenandtoast>
but I guess that's wrong
<halogenandtoast>
*rbx
cableray has joined #ruby
Guest20660 has joined #ruby
<Guest20660>
I use rbenv to manage the ruby installations
chussenot has quit [Quit: chussenot]
<Guest20660>
Now I want that rbenv uses a uploaded package instead of downloading the ruby setup from internet
<Guest20660>
can I do this somehowß
<Guest20660>
because rbenv must get the ruby setup from somewhere
<Guest20660>
so how to force the use of a package instead?
answer_42 has quit [Ping timeout: 276 seconds]
chussenot has joined #ruby
mengu has quit [Ping timeout: 256 seconds]
epylinkn has joined #ruby
<havenn>
Guest20660: You want to point rbenv at the system packaged Ruby?
<Guest20660>
havenn: I want to install ruby on a production system. The production system must use the files I uploaded to it before
jjbohn has quit [Quit: Leaving...]
jon_wingfield has joined #ruby
HAKEON has joined #ruby
blacktulip has quit [Remote host closed the connection]
<Guest20660>
havenn: rbenv will download the files by itself - instead it should use a cached or uploaded package instead
<yoshie902a>
nvm, figured it out. needed a hash
x82_nicole has quit [Quit: Computer has gone to sleep.]
<havenn>
Guest20660: I don't know how to do that with rbenv. With chruby you'd just add the location of the Ruby you want to use to $RUBIES in your .rc file, then it is available for selection.
joeycarmello has quit [Remote host closed the connection]
thone_ has joined #ruby
guns has joined #ruby
nomenkun_ has quit [Remote host closed the connection]
maletor has joined #ruby
dmerrick has quit [Quit: dmerrick]
<havenn>
Guest20660: I don't know if rbenv support it, but you could maybe use a symlink in the .rbenv ruby dir?
arya_ has joined #ruby
jaequery has joined #ruby
DatumDrop has quit [Remote host closed the connection]
<halogenandtoast>
banisterfiend: Do you happen to know how 1.8 store method definitions since it didn't use byte code? I'm still reading through ruam, but haven't stumbled across that yet
<halogenandtoast>
*stored
ddilinger has joined #ruby
pkuyken has quit [Quit: pkuyken]
yshh has quit [Ping timeout: 255 seconds]
chrismhough has quit [Quit: chrismhough]
snearch has quit [Quit: Verlassend]
mengu has joined #ruby
freakazoid0223 has joined #ruby
mneorr has quit [Remote host closed the connection]
<Guest20660>
chruby = rbenv?
slyv has joined #ruby
slyv has quit [Max SendQ exceeded]
IrishGringo_ has joined #ruby
Beoran_ has joined #ruby
aeontech has joined #ruby
slyv has joined #ruby
slyv has quit [Max SendQ exceeded]
slyv has joined #ruby
slyv has quit [Max SendQ exceeded]
megha has joined #ruby
mikepack has quit [Remote host closed the connection]
Beoran__ has quit [Ping timeout: 244 seconds]
<havenn>
Guest20660: RVM, chruby, rbenv, rbfu, etc are all different options for Ruby version management.
joeycarmello has joined #ruby
jon_wingfield has quit [Remote host closed the connection]
* Hanmac
used update-alternatives for that ;P
jon_wingfield has joined #ruby
<Spaceghost|cloud>
Hanmac: Sounds like no fun.
joeycarm_ has joined #ruby
joeycarmello has quit [Read error: Connection reset by peer]
redbeard0x0a has quit []
<Hanmac>
my support version is only the recent
ner0x has joined #ruby
jfl0wers has quit [Quit: jfl0wers]
idkazuma has joined #ruby
angusiguess has quit [Ping timeout: 244 seconds]
allaire has quit []
jeffreybaird has joined #ruby
<Spaceghost|cloud>
Hanmac: That's sad. Must have been hell when the latest 1.9.3 patchlevel a week or two ago was segfaulting a lot.
volte_ has quit [Read error: Connection reset by peer]
volte has joined #ruby
jackyalcine has joined #ruby
jackyalcine has quit [Changing host]
jackyalcine has joined #ruby
samuel02 has joined #ruby
[rust] has joined #ruby
f0ster has joined #ruby
nicoulaj has quit [Remote host closed the connection]
swills has quit [Quit: Coyote finally caught me]
TheFuzzball has quit [Read error: No route to host]
<Hanmac>
that happends with rails which i dont use it (and my current ruby version is still a bit below)
andrewhl has quit [Remote host closed the connection]
tomzx_mac has quit [Read error: Operation timed out]
Spooner has quit [Remote host closed the connection]
Spooner has joined #ruby
Seich is now known as seich
k611 has quit [Ping timeout: 252 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
TheFuzzball has joined #ruby
caption has quit [Quit: WeeChat 0.3.7]
caption_ is now known as caption
guns has quit [Ping timeout: 255 seconds]
guns has joined #ruby
beiter has quit [Quit: beiter]
shock_one has quit [Ping timeout: 255 seconds]
w|t has quit [Ping timeout: 260 seconds]
adeponte has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 248 seconds]
quest88 has joined #ruby
bradhe has joined #ruby
reset has joined #ruby
TheFuzzball has quit [Quit: Computer has gone to sleep.]
arya has joined #ruby
epylinkn has quit [Quit: Leaving.]
w|t has joined #ruby
w|t has quit [Changing host]
w|t has joined #ruby
havenn has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
jeffreybaird_ has joined #ruby
alanp has joined #ruby
Kingy has joined #ruby
jeffreybaird_ has quit [Client Quit]
chussenot has quit [Quit: chussenot]
x82_nicole has joined #ruby
banjara has joined #ruby
Virunga has quit [Remote host closed the connection]
jon_wingfield has quit [Remote host closed the connection]
arya has joined #ruby
jon_wingfield has joined #ruby
aeontech has quit [Ping timeout: 252 seconds]
Kn|t3 has quit [Quit: Kn|t3]
jeffreybaird has quit [Ping timeout: 260 seconds]
aeontech has joined #ruby
pyreal has quit [Read error: Connection reset by peer]
kiwnix has joined #ruby
alanp_ has quit [Ping timeout: 245 seconds]
IrishGringo_ has quit [Ping timeout: 256 seconds]
pyreal has joined #ruby
bigmac has joined #ruby
nomenkun has joined #ruby
joeycarm_ has quit [Remote host closed the connection]
maletor has joined #ruby
Guest20660 has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
nari has joined #ruby
yshh has joined #ruby
mercwithamouth has quit [Ping timeout: 276 seconds]
ChampS666 has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
samuel02 has quit [Remote host closed the connection]
raul782_ has joined #ruby
crackfu has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 260 seconds]
palyboy has quit [Ping timeout: 264 seconds]
crackfu has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
palyboy has joined #ruby
m8 has quit [Quit: Sto andando via]
havenn has joined #ruby
u- has quit [Ping timeout: 240 seconds]
[rust] has quit [Read error: Connection reset by peer]
u- has joined #ruby
[rust] has joined #ruby
jackyalcine has quit [Ping timeout: 256 seconds]
tjbiddle has quit [Quit: tjbiddle]
rezzack has quit [Quit: Leaving.]
fuzai has joined #ruby
adkron has joined #ruby
crackfu has quit [Ping timeout: 245 seconds]
sorbo_ has left #ruby [#ruby]
mneorr has joined #ruby
yshh has quit [Ping timeout: 276 seconds]
sorbo_ has joined #ruby
jfl0wers has joined #ruby
joeycarmello has joined #ruby
adkron_ has joined #ruby
<fuzai>
Hi someone thats good with eventmachine, http://pastie.org/5889005 I can make the first Turntabler.run run, and I can make the EM.run, but I can't make them both run at the same time.
<fuzai>
I'm trying to add a backend websocket to control my bot
megha has quit [Ping timeout: 255 seconds]
apeiros_ has quit [Remote host closed the connection]
jon_wingfield has quit [Remote host closed the connection]
jon_wingfield has joined #ruby
adeponte has joined #ruby
angusiguess has joined #ruby
w|t has quit [Quit: No Ping reply in 150 seconds.]
heftig has joined #ruby
w|t has joined #ruby
w|t has quit [Changing host]
w|t has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
EPIK has quit []
<fuzai>
Am I supposed to wrap both of my blocks in periodic timers or something?
raul782_ has quit [Remote host closed the connection]
raul782_ has joined #ruby
Guedes has quit [Ping timeout: 244 seconds]
kirun has quit [Quit: Client exiting]
havenn has quit [Remote host closed the connection]
raul782_ has quit [Ping timeout: 255 seconds]
megha has joined #ruby
cableray has joined #ruby
freezway has quit [Remote host closed the connection]
w|t_ has joined #ruby
nari has quit [Ping timeout: 260 seconds]
moos3 has joined #ruby
w|t has quit [Ping timeout: 252 seconds]
stringoO has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
jlast has joined #ruby
w|t_ has quit [Quit: No Ping reply in 150 seconds.]
toekutr has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
s1n4 has joined #ruby
<s1n4>
hey, I'm looking for a multi-platform mp3 player library, does anyone know one?
stringoO has quit [Quit: stringoO]
<s1n4>
actually, I want to play a mp3 audio file, throgh ruby code, any idea?
<fuzai>
on a command line/
<fuzai>
or does something like wx exist for ruby?
<s1n4>
how about mpg321?
moos3 has quit [Quit: Computer has gone to sleep.]
undersc0re97 has quit [Quit: "The destruction of balance constitutes leaping forward and such destruction is better than balance. Imbalance and headache are good things." - Mao]
<fuzai>
or a play for that matter
<puff>
Evening.
<fuzai>
Hallo
maletor has quit [Quit: Computer has gone to sleep.]
ryanf has quit [Ping timeout: 244 seconds]
adeponte has quit [Remote host closed the connection]
w|t has joined #ruby
w|t has joined #ruby
w|t has quit [Changing host]
mduvall has joined #ruby
joeycarmello has quit [Remote host closed the connection]
zigomir_ has quit [Ping timeout: 276 seconds]
Kuifje has quit [Ping timeout: 276 seconds]
quest88 has quit [Quit: quest88]
banjara has quit [Quit: Leaving.]
ryanf has joined #ruby
guns has quit [Quit: guns]
jon_wingfield has quit [Remote host closed the connection]