pac1 has quit [Quit: I got it one line of code at a time]
pac1 has joined #ruby
nga4 has quit [Ping timeout: 240 seconds]
nga4 has joined #ruby
kkh has quit [Read error: Connection reset by peer]
ephemerian has quit [Quit: Leaving.]
codelitt has joined #ruby
<Ohga1>
hello #ruby. Which command line option parser should I use if I want "git style" sub-commands for which I can write the code for separate from the "root" argument parsing in the most simple way
eykosiou_ has quit [Remote host closed the connection]
<Xeago>
phelps: that comes down to the same, except I do it in place, that constructs a new array
pepper_chico has quit [Quit: Computer has gone to sleep.]
tmiller has quit [Remote host closed the connection]
<Xeago>
well, thats cool!
<Xeago>
did not know that at all xD
jdunck has joined #ruby
<havenwood>
Should be same as `sort_by { SecureRandom.random_number }`.
<phelps>
I only knew it because I recently read the doc
codelitt has quit [Ping timeout: 264 seconds]
drumsrgr8forn8 has joined #ruby
vickaita has joined #ruby
codelitt has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
danneu has quit [Quit: WeeChat 0.3.8]
pepper_chico has joined #ruby
atno has joined #ruby
danneu has joined #ruby
kofno has quit [Remote host closed the connection]
<havenwood>
I guess `shuffle random: x` is nicer than `sort_by { x }`
pepper_chico has quit [Client Quit]
<phelps>
prob. just as good, but reads nicer in context to what its doing
aedorn has joined #ruby
<phelps>
and I can say what algo I use for shuffling if people care
jdunck has quit [Ping timeout: 276 seconds]
<passbe>
i need a simple data storage model for a quick ruby script to keep track of items im scraping from a webpage, would like somthing like active_record but im storing only one model, any pitches?
<havenwood>
passbe: You want a DB or marshal and store to file?
codelitt has quit [Ping timeout: 240 seconds]
<havenwood>
passbe: DB: Redis (Ohm gem)
jaywastaken has joined #ruby
<havenwood>
passbe: File: PStore
codelitt has joined #ruby
tjbiddle has joined #ruby
<mouse-_>
yaml, new/save/restore
adkron has joined #ruby
kofno has joined #ruby
Zai00 has quit [Quit: Zai00]
<passbe>
thanks guys, will look into those, probably would prefer something that uses an sqlite file
<passbe>
rather not a service
<havenwood>
passbe: Could use the bindi gem, (which uses Ohm) for uber-simple access to Redis: bindi[:stuff] = 'amg stuff'
<havenwood>
passbe: PStore uses Ruby's Marshal to serialize and store to disk transactionally.
yshh_ has quit [Remote host closed the connection]
<passbe>
cool
<havenwood>
passbe: Bindi saves to Redis in key value store.
<passbe>
yes but i need to run Redis as a service
<passbe>
looking at pstore now
<havenwood>
passbe: gotcha
<aedorn>
There's also YAML::Store
dsferreira has quit [Quit: This computer has gone to sleep]
<passbe>
didn't think of yaml
sepp2k has quit [Read error: Connection reset by peer]
newUser1234 has quit [Remote host closed the connection]
<havenwood>
passbe: Yeah, like aedorn said if you want it human readable ^
<havenwood>
passbe: Marshal (PStore) is faster, but not human readable.
* mouse-_
uses yaml for the simple quick projects - hash, array, string, numbers, symbols
<mouse-_>
thats all you need
<mouse-_>
(sometimes)
jamesfung14 has quit [Quit: Leaving]
slapt has joined #ruby
codelitt has quit [Ping timeout: 264 seconds]
justsee has quit [Ping timeout: 245 seconds]
jdunck has joined #ruby
<passbe>
yer, im scraping real estate ads off a website just so i can keep track of them (their emailing system is shocking)
toekutr has quit [Remote host closed the connection]
samphippen has quit [Quit: Computer has gone to sleep.]
slainer68 has quit [Remote host closed the connection]
jonahR has joined #ruby
bigoldrock has quit [Ping timeout: 264 seconds]
thams has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
miskander has joined #ruby
linnea_1 has joined #ruby
linnea_1 has quit [Remote host closed the connection]
codelitt has quit [Ping timeout: 245 seconds]
linnea_1 has joined #ruby
linnea_1 has quit [Remote host closed the connection]
mmitchell has joined #ruby
elux has joined #ruby
linnea_1 has joined #ruby
kofno has quit [Remote host closed the connection]
tjbiddle has joined #ruby
linnea_1 has quit [Remote host closed the connection]
vickaita has quit [Ping timeout: 240 seconds]
QKO has joined #ruby
youdontmeanmuch has joined #ruby
<youdontmeanmuch>
whats a good way to create a 1-100 array?
<havenwood>
youdontmeanmuch: [*1..100]
mmitchell has quit [Ping timeout: 252 seconds]
<havenwood>
youdontmeanmuch: Or: 1.upto(100).to_a
<youdontmeanmuch>
what is the *?
miskander has quit [Quit: miskander]
<havenwood>
youdontmeanmuch: A splat. ^ There it means 'explode'.
linnea_ has quit [Remote host closed the connection]
<youdontmeanmuch>
interesting, i'll look into that. thanks very much
<havenwood>
youdontmeanmuch: Splat like that is a fairly common idiom to explode a range into an array.
Vert has quit [Ping timeout: 252 seconds]
kofno has joined #ruby
dmoctezuma is now known as dmoctezuma|away
cam` has joined #ruby
SeanTAllen has joined #ruby
danneu1 has left #ruby [#ruby]
danneu has joined #ruby
eykosioux has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
aaronmcadam has quit [Ping timeout: 272 seconds]
predator117 has joined #ruby
linnea_ has joined #ruby
Aiur has joined #ruby
eykosioux has quit [Ping timeout: 245 seconds]
drumsrgr8forn8 has quit [Ping timeout: 272 seconds]
kofno has quit [Remote host closed the connection]
predator217 has quit [Ping timeout: 264 seconds]
jdunck has quit [Ping timeout: 245 seconds]
freeayu has joined #ruby
Xeago has quit [Remote host closed the connection]
freeayu__ has quit [Ping timeout: 245 seconds]
kofno has joined #ruby
linnea_ has quit [Remote host closed the connection]
sambao21 has joined #ruby
jdunck has joined #ruby
<felixjet>
ey guys, i couldnt install passenger in gentoo/nginx because it required ruby 1.8
<felixjet>
but i removed the dependance and it compiled without problems
Asher has quit [Ping timeout: 260 seconds]
<felixjet>
will i have any problems because of that manual fix?
<felixjet>
with ruby 1.9 ?
<felixjet>
what do u think?
yshh has joined #ruby
<havenwood>
felixjet: You mean Passenger required Ruby 1.9?
<felixjet>
required 1.8
<felixjet>
but i had installed 1.9 and i didnt want to install 1.8 too
<havenwood>
felixjet: What version of Passenger?
<felixjet>
so i removed the requeriment in the gentoo ebuild
<Inside>
So guys.. what's a good & simple ruby IDE for windows? I really like PyScripter, but it's for python, duh.. anything similar?
jonahR has quit [Quit: jonahR]
<havenwood>
felixjet: Forget 1.8, deprecated.
<felixjet>
how i see the passenger version?
whowantstolivefo has quit [Ping timeout: 255 seconds]
<havenwood>
felixjet: passenger -v
<felixjet>
anyway, passenger files are installed here >>> /usr/lib64/ruby/1.9.1/x86_64-linux/passenger_native_support.so
miskander has joined #ruby
<felixjet>
so if its ruby/1.9.1 i dont know why it ask me for ruby 1.8 package...
<felixjet>
i dont have passenger binary :/
<felixjet>
only this passenger-memory-stats passenger-status
linnea_ has joined #ruby
<havenwood>
felixjet: Passenger absolutely supports Ruby 1.9. What is your version?: passenger -v
<felixjet>
maybe is not required as i have installed it as a nginx module?
<felixjet>
no passenger binary..
<havenwood>
oh
aedorn has quit [Quit: Leaving]
<havenwood>
felixjet: gem install passenger
<felixjet>
but it will install the apache module
<felixjet>
dont?
bradleyprice has quit [Remote host closed the connection]
<havenwood>
felixjet: You are using Nginx?
<felixjet>
yes
<havenwood>
felixjet: So download the gem `gem install passenger` then re-install the Nginx module `passenger-install-nginx-module` and follow its instructions to update your conf.
<havenwood>
felixjet: Rack web servers include: Passenger, Unicorn, Rainbows!, Thin, Puma, Webrick and others.
<seoaqua>
how to remove ruby on mac?
<havenwood>
seoaqua: Ruby comes on your mac. It isn't meant to be removed.
<havenwood>
seoaqua: Don't do that! :p
<felixjet>
so.. i have rack, nginx and passenger. how i do to access mydomain.com and get a "hello world" ? do i use index.rb in the docroot? or how i do it?
twoism has quit [Remote host closed the connection]
<seoaqua>
havenwood, i need to install it by brew, do i need to remove it at first?
miskander has quit [Client Quit]
<havenwood>
felixjet: Sinatra is a good way. You create a file called app.rb, and in it put: get '/' do; hello world; end
<havenwood>
felixjet: then serve it up via rack to passenger, voila.
mrsolo has quit [Quit: Leaving]
<havenwood>
seoaqua: Nope.
<havenwood>
seoaqua: Leave the system install alone.
<felixjet>
but isnt sinatra a framework ?
<havenwood>
felixjet: No. It sits on the framework side of Rack, but is a simplistic DSL to make interfacing with Rack easier.
Stilo has joined #ruby
<felixjet>
and is there any way to do it without extra gems/apps ?
<havenwood>
felixjet: You can make a rackup file, to serve up straight to rack.
<havenwood>
felixjet: But Sinatra is probably closer to what you're looking for.
<felixjet>
i dont get this... looks too complicated
<felixjet>
i mean, if i have ruby and nginx
|christian| has quit [Quit: Leaving]
<felixjet>
why i need extra software like passenger, rack, sinatra...
<felixjet>
i never used a single pear package in php
<bean>
sure you could have a TCP server to implement and HTTP server
<felixjet>
and prefer not to do it
<felixjet>
i like to reinvent the wheel
<bean>
lol
<havenwood>
felixjet: The PHP way is cgi. It is a bunch of messy code that points all get requests at folders. Ruby has a more modular system, based on Rack. It is lovely, try it.
newUser1234 has quit [Remote host closed the connection]
<felixjet>
so passenger is not able to server http requests tu ruby?
vickaita has joined #ruby
<havenwood>
felixjet: Really, look at the example 'app' on Sinatra's website: http://www.sinatrarb.com
jamesfung14 has joined #ruby
<felixjet>
havenwood: i did it already xd
wedgeV has quit [Read error: Connection reset by peer]
<havenwood>
felixjet: Passenger is a Rack web server.
generalissimo has quit [Remote host closed the connection]
<felixjet>
and looks like a framework!
wedgeV has joined #ruby
<felixjet>
so... what is rack then?
<havenwood>
felixjet: the whole app is 3 lines.
<felixjet>
nvm
<felixjet>
lets say...
<felixjet>
rack is like spawn-fcgi ?
<havenwood>
felixjet: How is that a framework? There is one file, three lines.
<havenwood>
felixjet: You can technically setup ruby with cgi, to work as i think you imagine. But Rubyists don't, preferring to route get requests with `get '/my_stuff'` rather than creating a folder and putting the file there.
angusiguess has joined #ruby
<bean>
yeah that'd be disgusting
<felixjet>
well i trought i could do it as in PHP
<bean>
no
<felixjet>
redirect anything to /
danneu has quit [Quit: Leaving.]
<havenwood>
felixjet: I promise, without too much effort you can create a Sinatra app that routes get requests to your view elegantly and you can do your view/ folders and files just as you'd like.
<felixjet>
and the files sort the url to redirect it to the proper controller
sambao21 has quit [Quit: Computer has gone to sleep.]
c0rn has quit [Quit: Computer has gone to sleep.]
<bean>
step 1) stop comparing ruby to php
Weazy_ has quit [Remote host closed the connection]
kuzushi has quit [Ping timeout: 248 seconds]
<felixjet>
just trying to understand it
<felixjet>
as i understand php
Weazy has joined #ruby
<felixjet>
its better to me if i compare it
<bean>
lol
bradhe has quit [Remote host closed the connection]
<felixjet>
so, rack is like spawn-fcgi por example?
<bean>
so, sinatra isn't really a framework, it is just a DSL for describing routes, and what to do with said routes, i'd say
<havenwood>
felixjet: Sinatra has a really nice convention for where to put your views. Your views are equivalent to how you arrange php files in folders.
<felixjet>
is that a good concept comparision?
jamesfung14 has quit [Client Quit]
Nisstyre-laptop has joined #ruby
<bean>
Rack provides a minimal interface between webservers supporting Ruby and Ruby frameworks.
<felixjet>
so what is passenger then? xD
<havenwood>
felixjet: Rack is like a http-request-to-ruby converter. A Rack web server (like passenger) connects Rack to the interwebs.
tmiller has quit [Ping timeout: 245 seconds]
<havenwood>
felixjet: And a Rack framework makes it easy to send stuff to Rack, giving you pre-determined places to put everything (like Rails) or a DSL (like Sinatra).
<bean>
most people in #ruby would likely prefer sinatra to rails
miskander has joined #ruby
hbpoison_ has joined #ruby
<havenwood>
bean: agreed!
<felixjet>
what DLS stands for?
Voodoofish430 has quit [Quit: Leaving.]
<bean>
DSL
<bean>
Domain Specific Language
<felixjet>
i see
nari has quit [Ping timeout: 252 seconds]
dhruvasagar has joined #ruby
<havenwood>
felixjet: Basically, it uses Ruby's flexibility to make it so "get" tells a GET request where to go, "put" a PUT request, etc.
kuzushi has joined #ruby
nga4 has joined #ruby
hbpoison has quit [Ping timeout: 255 seconds]
<felixjet>
so rack connects passenger to ruby, and lets say passenger connects nginx to the interweb
<felixjet>
thats what ive understand xD
<havenwood>
felixjet: So `get '/' { 'hello world' }` will return the text 'hello world' when you hit the root level url.
<felixjet>
and sinatra makes it easy to manage the urls and stuff
<felixjet>
like a framework but without libraries
<havenwood>
felixjet: yup
<felixjet>
like pagination and stuff
<havenwood>
felixjet: Passenger uses Nginx as a reverse proxy.
<havenwood>
felixjet: So Passenger is actually forking and spawning threads and is a web server. Just uses Nginx to quickly serve flat files and load balance.
<havenwood>
felixjet: If you removed Nginx you could have Passenger serve up to port 80 instead (don't).
Soliah has quit [Quit: Soliah]
sambao21 has joined #ruby
<havenwood>
Nginx is great at load balancing.
<havenwood>
And slow clients.
<felixjet>
so lets say nginx is not required
<bean>
we use nginx for all of our production stuff at work
<bean>
love it
<felixjet>
yea i do too
<havenwood>
felixjet: Yeah, it isn't required.
joofsh has joined #ruby
tommyvyo has joined #ruby
<felixjet>
it makes sense then
<bean>
you can make passenger run on port 80, it'd have to be run as root though
<bean>
or at least started as root
<havenwood>
felixjet: A common practice is to load balance with Apache or Nginx, but some Ruby web servers can load balance themselves (e.g., Rainbows::EventMachine).
etcetera has quit []
<havenwood>
felixjet: It gives a ton of flexibility, so you can choose the best web server for what you're doing.
<felixjet>
like.... mongle?
<felixjet>
or whatever is called xD
<felixjet>
mongrel
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
<felixjet>
but ive read that is too old now
<bean>
mongrel often sits behind apache / nginx
headius has quit [Quit: headius]
<bean>
Mongrel is old now, yes, but was very popular. First web server used by twitter.
palaenkar has joined #ruby
<bean>
Written by Zed Shaw
<palaenkar>
hey
<bean>
hello, palaenkar
brettstark has joined #ruby
<palaenkar>
just making sure this thing worked
joofsh has quit [Remote host closed the connection]
<felixjet>
since its not like im gonna write a webserver... lets use sinatra xd
<brettstark>
testing
<palaenkar>
a buddy is setting this up for me
<felixjet>
thanks so much havenwood / bean
fschuindt has quit [Quit: Computer has gone to sleep.]
<havenwood>
felixjet: Modern Ruby webservers other than Passenger that you might use in production are: thin, unicorn, puma, and net-http-server.
<Rudd-XXX>
I have a server where I want to deploy a sinatra app, and that requires me to install a number of gems. what is the official mechanism that allows me to do that without compiling gems on the servers themselves?
bradleyprice has joined #ruby
<bean>
Rudd-XXX, look at bundler
<Rudd-XXX>
bean I did
<Rudd-XXX>
what does bundler give me?
<bean>
a reproduceable install
<Rudd-XXX>
I won't ever run bundle install on my servers, so it's a no go
<Rudd-XXX>
what else?
<bean>
why wont you run bundle install?
<Rudd-XXX>
because that requires me to install a number of things on the server, including but not limited to a c compiler
<Rudd-XXX>
and I won't do that
<havenwood>
Rudd-XXX: You shouldn't run `bundle install` on your server. Try `bundle --deployment` to vendor your gems.
<Rudd-XXX>
havenwood, more info please?
<bean>
$ bundle install --path vendor/bundle
<bean>
would also put them into vendor/bundle
codelitt has joined #ruby
<bean>
why would bundle install need a c compiler? the gem you're using needs to be compiled?
<Rudd-XXX>
bean yes.
aed has quit [Quit: aed]
<Rudd-XXX>
and how would my sinatra app know how to require from the vendor/bundle there?
<havenwood>
Rudd-XXX: Each app has a Gemfile. The ./ it refers to is the app dir.
carlyle has joined #ruby
<bean>
Start your application servers as usual, and your application will use your bundled environment with the exact same gems you use in development.
<bean>
note it says application
<havenwood>
Rudd-XXX: If you use the --deployment flag they are vendored in the app dir.
eykosioux has quit [Ping timeout: 245 seconds]
<Rudd-XXX>
OK, guys, I would rather avoid storing a huge bundle per build per app.
<Rudd-XXX>
that will quickly balloon to gigabytes
drumsrgr8forn8 has joined #ruby
<havenwood>
Rudd-XXX: So you want to install gems system-wide?
<havenwood>
Rudd-XXX: Do all your apps use the same gems?
<Rudd-XXX>
not all, but most, and I may be able to standardize on a set of gems
<Rudd-XXX>
i would prefer to install gems as debian packages, to be fair
<Rudd-XXX>
I can't use chgems because it won't be compatible with passenger phusion
<bean>
anything ruby, as .debs is a bad idea
<havenwood>
Rudd-XXX: It should be compatible with Passenger. What would the problem be?
<Rudd-XXX>
bean i disagree.
<Rudd-XXX>
havenwood, there is no way to set per-app environment in passenger phusion 3
slash_nick has joined #ruby
rickmasta has joined #ruby
<havenwood>
Rudd-XXX: ahh
codelitt has quit [Ping timeout: 264 seconds]
<Rudd-XXX>
i guess I will just have to deal with the fact that our choices have forced me into having a single bundle
<bean>
Rudd-XXX, the reason I say that is because you dont get good versions
<Firespore>
Question
<Rudd-XXX>
i donno how I will tell developers that they have to ditch their gemfiles
<Rudd-XXX>
bean it is my job to ensure the "good versions" part, don't worry about that
<havenwood>
Rudd-XXX: Hrm. You don't want a single bundle but you don't want multiple bundles?
codelitt has joined #ruby
<Firespore>
gem files
<Firespore>
i dont know what they are
<Firespore>
at all
<Rudd-XXX>
havenwood, I would prefer if each app had its own bundle, but I don't want to store megabytes of files each build.
hbpoison has joined #ruby
<havenwood>
Rudd-XXX: Do you have megabytes of gems? Most are relatively tiny.
brettstark has quit [Remote host closed the connection]
<Rudd-XXX>
havenwood, 25 gems here total about a couple MB
<havenwood>
Firespore: A Gemfile is a list of gem dependencies for an app that can be installed automatically by running bundler.
<havenwood>
Rudd-XXX: Yikes.
<Firespore>
so
<Firespore>
Double clicking a gem file would install an app contained within the bundle?
ttt has joined #ruby
<Rudd-XXX>
also they must be built with a c compiler, some. that automatically rules out macs in my fist iteration. damn.
hbpoison_ has quit [Read error: Connection reset by peer]
<bean>
Firespore, no.
<Firespore>
hm
<Rudd-XXX>
Firespore, no. gemfiles are textfiles.
<havenwood>
Firespore: The file is literally named "Gemfile" and you run `bundler` to install.
seoaqua has quit [Quit: 离开]
<havenwood>
s/bundler/bundle
<bean>
Rudd-XXX, not so, if they're in the bundler cache they fcan be preinstalled
<bean>
err precompiled
<Firespore>
Hm.
markisonfire has left #ruby [#ruby]
nonotza has joined #ruby
nga4 has quit [Ping timeout: 248 seconds]
<havenwood>
Rudd-XXX: I'd say use bundler and vendor your gems on a per-app or shared-between-apps basis as needed.
rcsheets has quit [Ping timeout: 255 seconds]
rwz has quit [Ping timeout: 255 seconds]
<Rudd-XXX>
ok, so assume this ideal situation: I have N projects but *all* of them share a Gemfile from a separate project
<havenwood>
Rudd-XXX: Two apps can use the same vendor dir.
marcdel has quit []
<Rudd-XXX>
havenwood, how do I vendor at build time? and how do I install the vendored bundle at install time?
carlyle has quit [Ping timeout: 245 seconds]
<Firespore>
Now a gem is a sort of plugin/dependency for a rb file or something?
<Firespore>
I have never ever used gem files ever
TheDeadSerious_ has quit [Ping timeout: 255 seconds]
Guest85414 has quit [Ping timeout: 255 seconds]
<felixjet>
its like a package
<felixjet>
not like, it is xd
<felixjet>
like plugins yea
codelitt has quit [Ping timeout: 256 seconds]
<bean>
felixjet, more like libraries, but yeah
<Firespore>
So if I had a example.gem on my desktop, I "cd desktop", run the command "ruby example.gem" in terminal, what would exactly happen
<Firespore>
Oh so it's like a library
<bean>
Firespore, nothing
<felixjet>
nothing
<Firespore>
i see
<Firespore>
disregard that question
<felixjet>
for example you can do gem install json
<felixjet>
and use json in ur .rb file
codelitt has joined #ruby
<felixjet>
to parse json variables
<Firespore>
Really?
<felixjet>
using ruby example.rb
a_a_g has quit [Quit: Leaving.]
<felixjet>
yes
dhruvasagar has quit [Read error: Connection reset by peer]
<havenwood>
Rudd-XXX: Bundle on your development machine to build your Gemfile.lock, then in staging bundle again with deployment flag, and then vendor the compiled gems into the vender directory in production.
<Firespore>
so i just installed ruby-bundler, does that give the functionality to install gem libraries/files buy just typing "gem install blahblahblah"?
daniel_- has joined #ruby
<felixjet>
no, thats ruy-gems
<Rudd-XXX>
where is the vendor directory in production?
<felixjet>
ruby-gems
palaenkar has quit [Quit: Leaving]
<havenwood>
Firespore: gem install bundler
noobie has joined #ruby
jerius has quit []
<bean>
Rudd-XXX, i'd imagine in ./ of the app
mercy____ has joined #ruby
<havenwood>
Firespore: ^ installs the bundler gem with RubyGems
carlyle has joined #ruby
<havenwood>
Firespore: check out `man gem`
<Firespore>
I am using ubuntu 12.04
<Firespore>
so i just installed this ..package..through ubuntu software center
<Firespore>
Labeled "ruby-bundler"
emmanuelux has quit [Remote host closed the connection]
alvaro_o has quit [Quit: Ex-Chat]
<bean>
Firespore, thats a bad idea.
<Firespore>
eh?
<havenwood>
Firespore: I'm suspicious. >.> What do you get for?: bundle -v
<Firespore>
should i remove it
toekutr has joined #ruby
<havenwood>
Firespore: Prolly.
<Firespore>
I thought that's....what you were talking about
<bean>
tell use what bundle -v tells you though
tjbiddle has joined #ruby
<bean>
im interested
<havenwood>
Firespore: Preferred install method is `gem install bundler`.
<Firespore>
Bundler version 1.3.4
<havenwood>
Firespore: Who knows what package manager version is. Okay, that is latest. :O
<Firespore>
well i'll just remove it via ubuntu software center
<Firespore>
then install it again using gem install bundler..
codelitt has quit [Ping timeout: 248 seconds]
huoxito has quit [Quit: Leaving]
pasties has quit [Ping timeout: 256 seconds]
<bean>
yeah, imo its best to have the gem
Myconix has joined #ruby
codelitt has joined #ruby
mfridh has quit [Ping timeout: 256 seconds]
<Firespore>
Bundler version 1.3.4
<Firespore>
Okay i'm good
aed has joined #ruby
statarb3 has quit [Ping timeout: 260 seconds]
daniel_- has quit [Ping timeout: 240 seconds]
pepper_chico has quit [Quit: Computer has gone to sleep.]
<Firespore>
So do any of you have any experience with rbot?
icole has quit [Remote host closed the connection]
* bean
uses cinch
danman has joined #ruby
<Firespore>
or cinch
pasties has joined #ruby
pepper_chico has joined #ruby
pepper_chico has quit [Max SendQ exceeded]
<bean>
cinch is nice
codelitt has quit [Ping timeout: 245 seconds]
<bean>
had trouble getting it to detect people being away status though
<bean>
even though the constant for it exists and gets returned on a /whois
miskander has quit [Quit: miskander]
tjbiddle has quit [Quit: tjbiddle]
pepper_chico has joined #ruby
<Firespore>
I would not know where to start with that
codelitt has joined #ruby
<Firespore>
how to make the bot /whois and then take a specific line from it and spew it out in a channel
freeayu__ has joined #ruby
zero7 has quit [Ping timeout: 256 seconds]
pepper_chico has quit [Client Quit]
<Firespore>
As you can probably tell, I'm relatively new to this
<bean>
you may want to learn ruby before you go trying to write IRC bots
<Firespore>
I already wrote one
<mootpointer>
I have some experience with Rbot.
<mootpointer>
It was a long time ago, though.
<Firespore>
buuuut...all it does is just idle, no joining channels
jaywastaken has quit [Remote host closed the connection]
youdontmeanmuch has quit [Ping timeout: 252 seconds]
<bean>
lol then you didnt write shit
<mootpointer>
That's probably less than useful.
<Firespore>
55 lines
<bean>
... lol
<bean>
what did it do then
<bean>
if it wasn't in a channel
<Firespore>
well there was a function to join a channel
<Firespore>
but it didn't work
<dominikh>
that's not called writing an IRC bot…
hbpoison has quit [Read error: Connection reset by peer]
<Firespore>
It just sits, does nothing, and ping/pongs a server
<mootpointer>
Fun times.
<bean>
so not an irc bot
<Firespore>
It's a bot
<Firespore>
that does shit
hbpoison has joined #ruby
<bean>
like what
<Firespore>
shit
alanp has quit [Ping timeout: 245 seconds]
<Firespore>
nothing
<Firespore>
zip
<Firespore>
0
bradhe has joined #ruby
<mootpointer>
Ah.
<bean>
then its the equivilent of not being a bot
<Firespore>
...then what it is
freeayu has quit [Ping timeout: 276 seconds]
<Firespore>
is it*
codelitt has quit [Ping timeout: 264 seconds]
<Firespore>
a ruby script that opens a connection to an irc server and sits there
<bean>
yep
<Firespore>
what should i call that
<mootpointer>
Anyhow, what was your original question?
<bean>
a pile of shit is what i'd call it :P
ArchBeOS has joined #ruby
ArchBeOS has quit [Changing host]
ArchBeOS has joined #ruby
<mootpointer>
bean: Oh come on, be nice.
<Firespore>
ARSTPACTAISAST? (first letter of each word in that sentence)
codelitt has joined #ruby
<mootpointer>
Firespore: What are you aiming to do?
nari has joined #ruby
<felixjet>
havenwood: is unicorn a gem?
<mootpointer>
Once upon a time, I could chat over IRC using telnet.
<mootpointer>
Those were heady days.
<Firespore>
an irc bot...
<bean>
that does what
<Firespore>
With functions such ass resolving dns hosts to ips
<Firespore>
as*
<bean>
okay, that wouldn't be difficult
<Firespore>
Checking whether a website is up/down
<mootpointer>
Right.
* bean
might write one like that tomorrow
chimkan has quit [Quit: chimkan]
<Firespore>
Managing a botnet
<Firespore>
nothing huge
<mootpointer>
Oh good.
<bean>
lol
<Firespore>
!ddos 127.0.0.1 etc.
<Firespore>
LOLJK
<mootpointer>
LULZ
<Firespore>
I already have one for that written in C++
<mootpointer>
rbot used to be pretty reasonable to build that kind of stuff on top of.
<mootpointer>
I quite like hubot, but that's coffeescript/js.
doja has joined #ruby
<Firespore>
What I used to use is supybot...and well considering that I like ruby's setup much better...here i am...looking for guidance
<bean>
hubot is great
<dominikh>
Don't use Cinch.
<Firespore>
I have an mirc bot which i wrote all the commands I would like to transliterate into ruby
<mootpointer>
I've used supybot too.
<bean>
dominikh, why not
<mootpointer>
Wrote a reasonably popular plugin back in the day.
<Firespore>
I am FUCKING sick of mirc
<dominikh>
bean: for one because it's not like supybot, second because I don't want him to end up asking me questions about it :)
<mootpointer>
Firespore: I don't know how active rbot and similar are, but they used to be good.
codelitt has quit [Ping timeout: 248 seconds]
<Firespore>
I do wonder
<bean>
dominikh, theres an irc channel for cinch ;)
<dominikh>
bean: yes, that's exactly what I meant ;)
alanp has joined #ruby
carlyle has quit [Remote host closed the connection]
ArchBeOS has quit [Remote host closed the connection]
<mootpointer>
cinch would pretty much do the job ;)
<Firespore>
mootpointer, would you have any experience in opening sockets in ruby, ie on port 80...reading things from a website...spewing stuff out in a channel
codelitt has joined #ruby
<Firespore>
such as fmylife.com
<mootpointer>
Firespore: Why bother? Other people have climbed that mountain for you.
<mootpointer>
Use rbot or cinch or hubot.
<dominikh>
bean: as in, check my host
<bean>
Firespore, there are many gems that will do that scraping for you
<Firespore>
So you're telling me everything I'm asking about where to start..on coding...is already codeed
<Firespore>
coded*
<bean>
ah, hello dominikh
<bean>
:po
<bean>
:P*
crackfu has joined #ruby
<Firespore>
If so, today isn't such a bad day.
Hanmac2 has joined #ruby
zeade has joined #ruby
<mootpointer>
Firespore: Well, not your specific implementations, but the framework you need to only code some specific stuff… Yes.
<Firespore>
I wouldn't have any idea where to start with it
<Firespore>
As I said, my failbot is an example of my newness to this language
<bean>
Firespore, you used rbot for your fail bot?
<Firespore>
Incorrect
<bean>
then what'd you use
<Firespore>
I just wrote 55 lines approximately of just...
<Firespore>
shit
<Firespore>
in an .rb file
<bean>
ah, opening a socket yourself?
<Firespore>
Yup
zeade1 has joined #ruby
Hanmac1 has quit [Ping timeout: 256 seconds]
<Spooner>
Firespore, Mechanize is pretty easy to use. If you have to run Javascript then watir & headless do a nice job.
dhruvasagar has joined #ruby
<bean>
Cinch is pretty simple, has worked pretty well for me for at least one bot :). I ahve a bot that emails people messages if they have |away in their nick (with approrpiate username set in their /whois)
codelitt has quit [Ping timeout: 256 seconds]
<Firespore>
I would mention another function I would like my bot to do
<Firespore>
But feds itc
<bean>
?
codelitt has joined #ruby
cisco1 has quit [Quit: Leaving.]
philipd has joined #ruby
<bean>
paranoid?
zeade has quit [Ping timeout: 245 seconds]
<Firespore>
Oh fuck it. I would like to transliterate this function that just decrypts ip hashes and logs them to a text file and then encrypts and/or obfuscates I'm hopefully going to use a AES256 key
kornnflake is now known as kornnflake_zzz
<Firespore>
So i can see who lurks in my channels on some irc network
<Firespore>
Obviously not this one
<Firespore>
since the ips are clearly shown
<Firespore>
* dhruvasagar (~dhruvasag@122.167.76.99) <--- example
mercwithamouth has joined #ruby
<bean>
a lot of networks obfuscate ips
jonahR has joined #ruby
<dhruvasagar>
Firespore: hmm
<bean>
unsure why you'd hash ips
<Firespore>
Obfuscate them
<Firespore>
But some use a key
<Firespore>
and when there's a key
<Firespore>
You can take that key, and rub it all over the hash/obfuscated text and it magically becomes an IP
<Firespore>
If you get me
ffranz has quit [Quit: Leaving]
<dominikh>
you might want to look up the meanings of both hashing and obfuscation
* bnagy
gets popcorn
<bean>
I'm not gonna lie, you're sounding like a script kiddie, Firespore
codelitt has quit [Ping timeout: 272 seconds]
codelitt has joined #ruby
vickaita has quit [Ping timeout: 256 seconds]
<Firespore>
hm
<havenwood>
felixjet: Yup, its a gem! Rainbows! is another gem that is a relative of Unicorn as well.
<Firespore>
bean, forget that. I would like to relay ips to a specific channel
<Firespore>
as in
* Firespore
joined #channel (17.0.0.120.032)
* bean
does not like the idea of tracking people.
<dominikh>
you've got to be shitting me :D
<Firespore>
Bot:#logchannel Firespore(IP: blah) joined
<felixjet>
havenwood: worth use unicorn?
<ner0x>
(1..10).to_a.sample is a good way to generate a random number eh?
<felixjet>
im reading good things about it, but too memory consumer
markalanevans has quit [Ping timeout: 246 seconds]
<bean>
other than "it only works on some ruby versions"
rismoney has quit [Read error: Connection reset by peer]
<k776>
I'm compiling p392 now, will let you know
breakingthings has joined #ruby
<havenwood>
k776: 2.0.0-p0!
<havenwood>
:O
* bean
bets it works in 2.0.0 as well
Banistergalaxy has joined #ruby
* havenwood
bets it works in 2.1.0
icole has joined #ruby
<bean>
lol
<k776>
I'll try both then :P
<havenwood>
k776: Some nice wins in 2.0.0, and stable release. :)
* bean
is a fan of lazy enumerator
<bean>
s
<bean>
:p
<havenwood>
bean: Agreed! #lazy ftw!
<bean>
might be a bit slower, but hey it lets me do stuff without a fake INFINITY var
codelitt has quit [Ping timeout: 245 seconds]
Asher2 has joined #ruby
subbyyy has joined #ruby
<k776>
Not fixed in 1.9.3p392. Compiling 2.0.0 now
codelitt has joined #ruby
crackfu has joined #ruby
<havenwood>
bean: Actually, was curious if this use of Enumerable#lazy is actually sufficient to prevent entire file from being loaded into memory? https://gist.github.com/havenwood/5174569
<k776>
Hmm, 2.0.0 failed to compile on Mac :-( Looks like the build on openssl ran into an issue
Asher has quit [Ping timeout: 240 seconds]
<havenwood>
k776: Do you use Homebrew?
<k776>
havenwood: Yes, I do
Ontolog has quit [Remote host closed the connection]
<havenwood>
k776: It prolly needs to be configured with: --with-openssl-dir=`brew --prefix openssl`
Ohga1 has quit [Read error: Connection reset by peer]
codelitt has joined #ruby
kofno has joined #ruby
araujo has quit [Quit: Leaving]
Tabrenus has joined #ruby
slyv has quit [Quit: Computer has gone to sleep.]
Tabrenus has quit [Read error: Connection reset by peer]
Nisstyre-laptop has quit [Ping timeout: 264 seconds]
mercwithamouth has quit [Ping timeout: 272 seconds]
akhet has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
greenarrow has quit [Ping timeout: 246 seconds]
ryanf_ has joined #ruby
ryanf_ has left #ruby [#ruby]
greenarrow has joined #ruby
codelitt has quit [Ping timeout: 245 seconds]
nmeum has quit [Ping timeout: 240 seconds]
<headius>
havenwood: JRuby hasn't implemented all encoding options yet, and Rubinius…dunno, but I think they're missing quite a bit more
codelitt has joined #ruby
<havenwood>
headius: aha!
<headius>
but not working at all in MRI could certainly still be a bug
ebobby has quit [Quit: Lost terminal]
pkrnj has joined #ruby
kofno has quit [Ping timeout: 245 seconds]
decoponio has joined #ruby
luckyruby has joined #ruby
FullTiltProspect has quit [Quit: FullTiltProspect]
codelitt has quit [Ping timeout: 264 seconds]
rwz has joined #ruby
<bean>
k776, did you see that, could certainly be a bug.
TheDeadSerious_ has joined #ruby
Guest85414 has joined #ruby
codelitt has joined #ruby
* bean
doesn't know how one goes about reporting an MRI bug
chrishough has joined #ruby
codelitt has quit [Client Quit]
bradleyprice has quit [Remote host closed the connection]
s1n4 has joined #ruby
dhruvasagar has quit [Ping timeout: 245 seconds]
sayan has quit [Read error: Connection reset by peer]
hasimo-t has joined #ruby
gyre007 has joined #ruby
dhruvasagar has joined #ruby
a_a_g has quit [Quit: Leaving.]
gyre007 has quit [Ping timeout: 256 seconds]
Nisstyre-laptop has joined #ruby
xcv_ has joined #ruby
xcv has quit [Read error: Connection reset by peer]
Opettaja has quit [Quit: WeeChat 0.4.0]
io_syl has joined #ruby
zero7 has joined #ruby
wargasm has quit [Ping timeout: 256 seconds]
Voting has quit [Ping timeout: 252 seconds]
hash has quit [Disconnected by services]
hash has joined #ruby
justsee has joined #ruby
SCommette has quit [Quit: SCommette]
hash has quit [Disconnected by services]
jonahR has joined #ruby
hash has joined #ruby
jonahR has quit [Read error: Connection reset by peer]
hash has quit [Disconnected by services]
hash has joined #ruby
hash has quit [Disconnected by services]
hash has joined #ruby
hash has quit [Disconnected by services]
headius has quit [Quit: headius]
aed has quit [Read error: Connection reset by peer]
divout has joined #ruby
t_hash has joined #ruby
Dreamer3 has quit [Quit: Leaving...]
headius has joined #ruby
cyong has joined #ruby
yacks has joined #ruby
verysoftoiletppr has joined #ruby
chiel has quit [Ping timeout: 256 seconds]
kofno has joined #ruby
angusiguess has quit [Ping timeout: 264 seconds]
tomzx_mac has quit [Ping timeout: 252 seconds]
hemanth_ is now known as hemanth
fredwu is now known as fredwu|afk
kofno has quit [Ping timeout: 248 seconds]
<shevy>
what do you guys use in your prompt, when you use a shell?
<shevy>
I tend to use the current working dir only
<shevy>
now I am thinking of using nothing as prompt
<shevy>
reason why this is relevant to ruby is because I am wondering in general what my ruby scripts should display back to me
Guest26787 has joined #ruby
<shevy>
(when I use a shell)
Guest26787 has left #ruby [#ruby]
chiel has joined #ruby
rezzack has quit [Quit: Leaving.]
<havenwood>
shevy: I have it give me an abbreviated pwd, so I know where I am, and then an emoji to let me know git status (mushroom for dirty and sunflower for clean). :P
<shevy>
abbreviated as in, if it is too long, it would be made shorted?
pygmael has joined #ruby
<shevy>
*shorter
<shevy>
hmmm
<shevy>
I have no idea what an emoji is but it sounds like an image
<havenwood>
Yeah, little pictures.
brhelwig has joined #ruby
<shevy>
I dont think bash in xterm can show a picture :(
<havenwood>
shevy: Actually, I should do that (shorten overly long file paths) but right now i just do ~.
<havenwood>
mercy____ has quit [Quit: mercy____]
fredwu|afk is now known as fredwu
<havenwood>
shevy: Yeah, no. I'm not seeing emoji in xterm.
<shevy>
hehe oh man
<havenwood>
shevy: My computer's name is actually emoji. As is the network.
<shevy>
enter linux - programming stuck in the 1970s
<havenwood>
shevy: Emoji may come to linux soon. Now that google and apple submitted utc spec for emoji.
uris has quit [Quit: Leaving]
<shevy>
cool!
tealmage has quit [Remote host closed the connection]
s1n4 has quit [Quit: leaving]
Artheist has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
<havenwood>
shevy: PS: This is my prompt (took the basic look from oh-my-zsh simple theme, but don't use oh-my-zsh): http://imgur.com/mtG9RqI
<shevy>
hahaha that is cute
tommyvyo has quit [Quit:]
<shevy>
well, that looks significantly better than mine, mine is just boring green display of the current working directory
<shevy>
no wait, teal is the colour I use for directories
arya_ has quit [Ping timeout: 248 seconds]
<Firespore>
i've been reading rubymonk.com
SCommette has joined #ruby
<Firespore>
it's asking me questions
<Firespore>
it's like it expects me to know them already
<Firespore>
Well i can't get these questions right
<Firespore>
i have to click show solution
<Firespore>
i'm like...well why didn't you tell me that's what i use for that
<bean>
hmm, well do the answers make sense after you click that?
<Firespore>
Yes they do
<bean>
alright, then maybe you need to think harder before clicking show answer.
<Firespore>
because it tells me what should be there
<Firespore>
What kind of question is, "Do the obvious."
<Firespore>
lol
<bean>
okay, what lesson are you on
DrCode has joined #ruby
<shevy>
well it depends
<shevy>
what is the problem description
angusiguess has joined #ruby
<shevy>
if it tells you your input is [1,2,3] and you should make output [1,3,2] then this would be obvious
casheew has quit [Read error: Connection reset by peer]
<Firespore>
Sometimes we will be required to know the index of a particular character or a sub-string in a given String and conveniently Ruby provides a method on String that does exactly that. Try and find out the index of 'R' in the string below:
mahmoudimus has quit [Quit: Computer has gone to sleep.]
apeiros_ has joined #ruby
artofraw has joined #ruby
ryanf has left #ruby [#ruby]
s1n4 has joined #ruby
s1n4 has quit [Client Quit]
huttan has quit [Read error: Connection reset by peer]
bean is now known as bean|sleep
emergion has quit [Quit: Computer has gone to sleep.]
emergion has joined #ruby
freeayu has joined #ruby
etcetera has joined #ruby
drale2k has quit [Quit: Leaving...]
nmeum has joined #ruby
artofraw has quit [Remote host closed the connection]
Voting has joined #ruby
freerobby has quit [Quit: Leaving.]
angusiguess has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran1 has joined #ruby
rippa has joined #ruby
pygmael has joined #ruby
robustus has quit [Ping timeout: 248 seconds]
<hemanth>
shevy, adblock plugin :)?
angusiguess has quit [Ping timeout: 246 seconds]
robustus has joined #ruby
ryanf has joined #ruby
ryanf has left #ruby [#ruby]
brhelwig has quit [Ping timeout: 272 seconds]
ananthakumaran has quit [Ping timeout: 252 seconds]
BizarreCake has joined #ruby
<shevy>
hmm that could work against it?
brianpWins has quit [Quit: brianpWins]
browndawg has joined #ruby
cyong has quit [Quit: Leaving.]
browndawg has left #ruby [#ruby]
maes has joined #ruby
xcv_ has quit [Remote host closed the connection]
xcv has joined #ruby
pen has joined #ruby
feedbackloop has quit [Ping timeout: 245 seconds]
fredwu is now known as fredwu|afk
fredwu|afk is now known as fredwu
Opettaja has joined #ruby
carraroj has joined #ruby
_br_ has quit [Ping timeout: 245 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
fphilipe has joined #ruby
jmeeuwen has joined #ruby
setient has quit [Read error: Operation timed out]
sambio has quit []
hbpoison has joined #ruby
artm_ has joined #ruby
jgrevich has quit [Quit: jgrevich]
_br_ has joined #ruby
youdontmeanmuch has joined #ruby
PanPan has joined #ruby
bnagy has quit [Remote host closed the connection]
etcetera has quit []
chat has joined #ruby
bnagy has joined #ruby
ozgura has quit [Remote host closed the connection]
etcetera has joined #ruby
setient has joined #ruby
<shevy>
sooo
<shevy>
time to start a huge ruby colour project!
<Firespore>
>smoke weed
<shevy>
how do I search all gems for tag keywords "colo" ... as alias to color and colour
feedbackloop has joined #ruby
<Firespore>
>your ruby code should work
louism2__ has joined #ruby
<louism2__>
hello world
<Firespore>
^ first ruby script?
<Firespore>
print "Hello world!"
<louism2__>
just making sure I could submit
<Firespore>
lol
<Firespore>
If the channel is not +m then you should be able to
<shevy>
hell louism2__
<shevy>
oops
<shevy>
hello louism2__
<shevy>
welcome to world
<Firespore>
this is hitler's germany
<shevy>
and welcome to ruby!
<Firespore>
obviously
<Firespore>
SIEG HEIL
<louism2__>
the warmest reception to a channel I think I have ever had
<Firespore>
You probably like that don't know
<louism2__>
I feel special
<Firespore>
you*
<shevy>
Firespore man you like war, go use PYTHON
<Firespore>
LOL
<shevy>
it has a real DICTATOR still
<Firespore>
I used to
<shevy>
you MUST use
<shevy>
foo.bla()
<shevy>
ruby is the poet
<Firespore>
i like ruby better
<shevy>
you can use foo.bla or foo.bla()
<Firespore>
i like ruby better
<Firespore>
I LIKE RUBY BETTER THAN PYTHON
<shevy>
Firespore it all comes down to who is cooler
<shevy>
guido vs. matz
<Firespore>
RUBY > PYTHON NO EXCEPTIONS
<shevy>
matz always smiles when he does a presentation
<shevy>
his english sucks, but he smiles
<Hanmac>
shevy: matz has a better beard :P
<Fraeon>
I like Befunge better than Ruby
<shevy>
hmm no I think guido has the better beard
<Firespore>
bill gaes would be awesome if he made ruby
<Firespore>
more awesome than he already is
_br_ has quit [Ping timeout: 245 seconds]
<shevy>
god man
<shevy>
he gave us windows
<Firespore>
same for Linus Torvalds
<louism2__>
If I have exception handling in two methods, say 'foo' calls 'bar', and an exception occurs in 'bar' how does that bubble up? I am assuming that the exception handling in 'bar' is the only one that gets run? Is that the case?
<shevy>
do you think bill would create something that would be useful for the people and not for him?
<Firespore>
what if ruby was native to linux
<Firespore>
came pre installed with every distro
<Firespore>
EVERY DISTRO
<Firespore>
And everything was coded in ruby and not java
<shevy>
louism2__ hmm
* Firespore
licks lips
<shevy>
louism2__ there is caller() you can always do
<Firespore>
That is a near perfect world there
<shevy>
def foo; pp caller; end
Myconix has quit [Read error: Connection reset by peer]
<Firespore>
def perfect_world = "ruby everywhere"
bambanx has joined #ruby
<bnagy>
louism2__: it won't really bubble
<bnagy>
unless you re-raise it
<bambanx>
hi
<Firespore>
bambanx, hi
<bnagy>
it will just get rescued by the first rescue or not at all
apeiros_ has quit [Remote host closed the connection]
<louism2__>
thanks for the input everyone
<bnagy>
louism2__: def foo; bar; rescue "foo"; end vs def foo; bar; end def bar; #something; rescue "bar"; end
hogeo has quit [Ping timeout: 245 seconds]
<bambanx>
guys i am using this Dir.entries("testdir") why the firsts element of my array are . .. .jpg ?
hogeo has joined #ruby
<bambanx>
any way for avoid them?
<bnagy>
bambanx: . and .. are directory entries.
<Firespore>
How to avoid displaying .jpg files?
<louism2__>
what about caller(), what does that do for me?
<Firespore>
Is that what you are asking?
<bnagy>
you can do something like next if File.directory? dirent
<bambanx>
i need only the files of my dirr
<bambanx>
dir
kevingriffin has joined #ruby
<bambanx>
a list
coderhs has joined #ruby
<Firespore>
Dir.entries("/directory/file")
<Firespore>
amirite
<coderhs>
hi there, can you suggest on how to make ruby treat a string with a ';' for example "hello;world" as a single string
<Hanmac>
like ? Dir["testdir/*"]
<shevy>
louism2__ you can always find the stack trace that way
<Firespore>
^
<bnagy>
coderhs: it does
_br_ has joined #ruby
<Firespore>
I would suggest removing the semicolon for ruby to treat that as a string
<bnagy>
coderhs: in other words whatever your problem is, that's not it, try a bit more detail
fredwu has quit [Quit: Compiling...]
<Firespore>
Seems like the most simple solution.
<shevy>
Firespore dont use Dir.entries it is ugly
<shevy>
use Dir['/directory/file/*']
fredwu has joined #ruby
<shevy>
oops
fredwu has quit [Client Quit]
<shevy>
Dir['/directory/file']
<shevy>
there
<shevy>
hmmm
<shevy>
or rather
<shevy>
Dir['/directory/file*']
<shevy>
:P
<shevy>
pick one!
<shevy>
all but Dir.entries
<coderhs>
bnagy: I am trying to make a url clickable, but when i do regex operation on the string it treats this string as if it was two separate words
<bnagy>
shevy: that will still give you directory entries though
mockra has joined #ruby
<shevy>
:(
<bnagy>
coderhs: yeah, that's what you get for using regex :)
<bnagy>
probably your issue is that ';' isn't in the \w set
shock_one has quit [Ping timeout: 246 seconds]
<bnagy>
imho using regex for pretty much anything involved with urls is a one-way ticket to Failville
dhruvasagar has quit [Ping timeout: 246 seconds]
<bnagy>
shevy: it doesn't give you . and .. though, so I guess that's a start. I also love the Dir[] syntax :)
security has quit [Ping timeout: 246 seconds]
DrCode has quit [Remote host closed the connection]
<bambanx>
is a little thing my problem automating my code is working cool , just this a little detail about . .. , i was dont understand the explanation u give me a few minutes ago . sorry for that
<Nom->
It suggests you can just do "ruby app.rb -s Puma" or update the configuration to always use Puma
<felixjet>
but that wont use a daemon
<felixjet>
is just like a basic cli command
<Nom->
You can just wrap that command up inside an init script to turn it into a daemon if you want to
browndawg has quit [Ping timeout: 245 seconds]
spacemud has joined #ruby
Al_ has quit [Quit: Al_]
hasimo-t has quit [Remote host closed the connection]
hbpoison has quit [Ping timeout: 245 seconds]
hasimo-t has joined #ruby
pseudonymous has joined #ruby
<felixjet>
whats the structure for a ruby app?
<felixjet>
this looks so hard and confusing, im almost quitting, sigh.
hasimo-t_ has joined #ruby
<felixjet>
its so hard to just place a damn file somewhere and start coding a website?
hasimo-t has quit [Read error: Connection reset by peer]
<felixjet>
its like i need to place 400 files, and also create files for servers!
mulinux has joined #ruby
<felixjet>
whenever i try to find something appears the fuking "gem" or "rails" word in google
<felixjet>
damnit!
<Nom->
Yeah, finding something Ruby related that isn't rails related can be difficult... Rails IS Ruby in a lot of (uneducated) peoples' minds.
ananthakumaran1 has quit [Quit: Leaving.]
<felixjet>
its not difficult, its fustrating...
<Nom->
What background are you coming from? It might help if I connect a few dots for you to understand the terms?
ananthakumaran has joined #ruby
<felixjet>
php
<felixjet>
where i simply put a index.php and i can start coding
<Nom->
Ok, so basically 'gem is like pear... allows you to manage external code modules'
chrishough has quit [Quit: chrishough]
<felixjet>
yea i know that
<Nom->
Yeah, Ruby is very different from PHP in that regard
<felixjet>
but i dont know how to place a "index" file and get it working in http
<Nom->
The short answer is, you don't in Ruby
jbueza has quit [Quit: Leaving.]
<felixjet>
how you create a website then? :/
<v2px>
eh
<Nom->
Simple answer, you use a framework such as Rails, Sinatra or others to create an application
<felixjet>
well im using sinatra but still lost
<v2px>
the webserver talks directly to the application
snearch has quit [Read error: Connection reset by peer]
razibog has joined #ruby
xbob has joined #ruby
artm_ has joined #ruby
<felixjet>
where i do place the files? inside /htdocs ? outside?
<Nom->
Yep, so the architecture is very different from how PHP works
<felixjet>
where i can find the structure and files needed?
<Nom->
You need to basically forget a lot of what you did with PHP
<Nom->
If you ever used Code Igniter or CakePHP, then you're on a slightly better grounding for working in the ruby app world
<felixjet>
i didnt
<felixjet>
i just hated zend with all my heart and soul
<felixjet>
zend framework*
<Nom->
Yep, so the workflow is going to be pretty different... I'm going to give you a getting started video for Rails... it's not Sinatra, but it'll step you through the basics on how Rails development works
<felixjet>
railsforzombies ?
<Nom->
Sinatra works in much the same way... it's an MVC framework, but a lot of the details are different
<Nom->
Well, as far as my basic knowledge of Sinatra goes, you just write a .rb file and then start the server using ruby myapp.rb
HecAtic has quit [Quit: Àá¼ö]
<Nom->
It will fire up on a specific port and start listening for requests
<felixjet>
but. im also using puma
<felixjet>
yes, looks like i need 400 things to create a website, sigh.
<Nom->
Yeah, so if you want to use Puma as the web server, you'll have to do what I said earlier... ruby myapp.rb -s Puma
<felixjet>
kk
<felixjet>
anyway i dont understand how u need a framework
<felixjet>
with no chance to avoid it
<felixjet>
i never used symphony or cakephp
<felixjet>
and still made websites
rdark has joined #ruby
<Firespore>
Does anyone know how to run cinch
<Firespore>
on linux
<Nom->
Because that's how PHP worked
cantonic has joined #ruby
<Firespore>
the cinch irc framework
<felixjet>
Nom-: just a question i wont find elsewhere please
ferdev has joined #ruby
<felixjet>
does the files have to be inside htdocs
<Nom->
Nope
<felixjet>
or people place them outside
<Hanmac>
ping shevy
<Firespore>
shevy
<Firespore>
shevy, can you aid me in setting up cinch? the irc bot?
<Nom->
A typical deployment for most Ruby apps would probably involve apache/nginx serving static content and just proxying requests to your Sinatra/Rails/whatever app
<Nom->
Code doesn't need to be accessible by the web server
samphippen has joined #ruby
<felixjet>
like this?
<felixjet>
upstream app {
<felixjet>
server unix:///appdir/tmp/puma/socket;
<felixjet>
}
asuka has quit [Read error: Connection reset by peer]
ferdev has quit [Read error: Connection reset by peer]
mahmoudimus has joined #ruby
<Firespore>
Can no one help me?
<Firespore>
._.
ferdev has joined #ruby
<Nom->
Firespore: Wrong channel for that question I think
<Firespore>
..no?
<Firespore>
It's a ruby irc bot..
<Nom->
felixjet: Yes...
<felixjet>
lets try..
<Nom->
Firespore: That doesn't necessarily mean anyone in this channel has any knowledge of it :)
<Firespore>
bean does
<Firespore>
apparently
<Firespore>
But I don't know if he/she is here still.
<Nom->
And I get the feeling that I'm the only one around :)
<Firespore>
finding the file to actually set up a simple config process
<Firespore>
such as ruby install.rb
<Nom->
No, never used it... the limit of my IRC use these days is a persistent irssi session running on a EC2 instance :)
<Firespore>
hm
<Firespore>
Well I suppose I wouldn't need to do that since i just
<Firespore>
gem install cinch
<dominikh>
it's a gem. if you don't know how to install gems, learn how to. It's even more ridiculous because the readme has a section called Installation…
sayan has quit [Read error: Connection reset by peer]
<Firespore>
Yeah.
<Firespore>
I read it.
<Firespore>
It's installed.
<Firespore>
But I figured it wasn't.
<Firespore>
Because I don't see where to configure it, what files to play with
<Hanmac>
Firespore: whats your ruby version? do you use some kind of rvm?
<Firespore>
or what file I actually use to run the bot
<dominikh>
you could continue reading the readme…
mootpointer has quit [Quit: Computer has gone to sleep.]
<Firespore>
i am actually looking at the readme right now dominikh
<lewis_>
can someone explain to me why it's no [3,3,3,1,1]
lewis has quit [Ping timeout: 245 seconds]
rickmasta has joined #ruby
mfridh has joined #ruby
grzywacz has joined #ruby
<bnagy>
I think you want map
vlad_starkov has joined #ruby
<bnagy>
so, you've sorted the original array. Sort will never change the elements in that array, just their order
<bnagy>
make sense?
[diecast] has quit [Ping timeout: 252 seconds]
jhowarth has quit [Ping timeout: 252 seconds]
<bnagy>
if you want to transform the array you use (typically) map
[diecast] has joined #ruby
aaronmcadam has joined #ruby
cmarques has quit [Ping timeout: 252 seconds]
jhowarth has joined #ruby
<lewis_>
bnagy: i know, I don't understand the output still
Guedes has quit [Read error: Operation timed out]
lewis_ is now known as lewix
lewix has quit [Changing host]
lewix has joined #ruby
<bnagy>
well you've sorted it by freq
<bnagy>
all the elements that are 1 have a freq of 3
<bnagy>
so they will end up to the right because sort is low -> high
<lewix>
exactky
gyre007 has joined #ruby
<bnagy>
try arr.map {|t| freq[t]} and compare
<lewix>
oh stupid me I thought I was sorting the hash key directly
<lewix>
sorry
atno has quit [Ping timeout: 252 seconds]
floyd has joined #ruby
Zai00 has joined #ruby
Rix has joined #ruby
youdontmeanmuch has quit [Read error: Connection reset by peer]
rickmasta has quit [Quit: Leaving...]
chrishough has quit [Quit: chrishough]
sandGorgon has joined #ruby
<dEPY>
any1 using redis in ruby?
nfk has joined #ruby
tish has quit [Read error: Connection reset by peer]
<bnagy>
if you've a question, just ask
<bnagy>
unless that's it, in which case, I have done, yeah
tish has joined #ruby
buscon has joined #ruby
ozgura has joined #ruby
adambeynon has joined #ruby
aef has joined #ruby
tish1 has joined #ruby
pen has quit [Remote host closed the connection]
tish has quit [Ping timeout: 240 seconds]
samuel02 has joined #ruby
<lewix>
what does 1_000_000 mean
susrivas` has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<bnagy>
it's just sugar
<bnagy>
the dashes do nothing, they're just readability
<lewix>
its more like acid
<lewix>
seems like it's slower than the original too
thibauts_ has joined #ruby
alanp_ has joined #ruby
weeb1e_ has joined #ruby
<bnagy>
oh yeah? Interesting. You got benchmark data?
<bnagy>
I mean it makes sense that it should be slightly slower at some point, but you'd think it would get optimised out by the parser
Fenne_ has joined #ruby
<lewix>
>> puts Benchmark.measure {"a"*1000000}
<lewix>
0.000000 0.000000 0.000000 ( 0.001554)
vlad_starkov has quit [Read error: Connection reset by peer]
flam__ has joined #ruby
<lewix>
>> puts Benchmark.measure {"a"*1_000_000}
<lewix>
0.000000 0.000000 0.000000 ( 0.002050)
bradhe has quit [Read error: Connection reset by peer]
imami|afk has quit [Ping timeout: 255 seconds]
yashshah has quit [Read error: Connection reset by peer]
rdark has quit [Ping timeout: 255 seconds]
wookiehangover has quit [Ping timeout: 255 seconds]
thibauts has quit [Ping timeout: 255 seconds]
Fenne has quit [Ping timeout: 255 seconds]
davetherat has quit [Ping timeout: 260 seconds]
Sp4rKy has quit [Ping timeout: 260 seconds]
DefV has quit [Ping timeout: 260 seconds]
BombStrike has quit [Read error: Connection reset by peer]
spacemud has quit [Ping timeout: 255 seconds]
solidoodlesuppor has quit [Ping timeout: 255 seconds]
CrazyDog_ has quit [Ping timeout: 255 seconds]
Politoed has quit [Ping timeout: 255 seconds]
jmccune has quit [Ping timeout: 255 seconds]
fire has quit [Ping timeout: 260 seconds]
alanp has quit [Ping timeout: 260 seconds]
threesome has quit [Ping timeout: 260 seconds]
RORgasm has quit [Ping timeout: 260 seconds]
kandinski has quit [Ping timeout: 260 seconds]
u- has quit [Ping timeout: 260 seconds]
Sou|cutter has quit [Ping timeout: 260 seconds]
weeb1e has quit [Ping timeout: 260 seconds]
fearoffish has quit [Ping timeout: 260 seconds]
matti has quit [Ping timeout: 260 seconds]
casheew has quit [Ping timeout: 255 seconds]
jphpsf has quit [Ping timeout: 255 seconds]
TTilus has quit [Ping timeout: 255 seconds]
tr4656 has quit [Ping timeout: 255 seconds]
rakm has quit [Ping timeout: 260 seconds]
xybre has quit [Ping timeout: 260 seconds]
grn has quit [Ping timeout: 260 seconds]
moeSizlak has quit [Ping timeout: 260 seconds]
SDr has quit [Ping timeout: 255 seconds]
ping-pong has quit [Ping timeout: 255 seconds]
crodas has quit [Ping timeout: 255 seconds]
<dEPY>
bnagy: my question is would you use redis ORM and why, or why not?
<Boohbah>
use it for what?
NightCreature has joined #ruby
banseljaj has joined #ruby
tish1 has quit [Quit: Leaving.]
sedeki has joined #ruby
fumduq has quit [Read error: Connection reset by peer]
Demux has quit [Ping timeout: 260 seconds]
flam_ has quit [Ping timeout: 260 seconds]
eka has joined #ruby
ping-pong has joined #ruby
jmccune_ has joined #ruby
<sedeki>
would you call ruby a "functional programming language"?
jmccune_ is now known as jmccune
jmccune has quit [Changing host]
jmccune has joined #ruby
matti has joined #ruby
matti has joined #ruby
matti has quit [Changing host]
tr4656 has joined #ruby
<Boohbah>
sedeki: it has some functional parts
kandinski has joined #ruby
CrazyDog has joined #ruby
nmeum has quit [Ping timeout: 255 seconds]
grn has joined #ruby
rickmasta has joined #ruby
fearoffish has joined #ruby
u- has joined #ruby
casheew has joined #ruby
Soulcutter has joined #ruby
Soulcutter has quit [Changing host]
Soulcutter has joined #ruby
DefV has joined #ruby
Politoed has joined #ruby
rakm has joined #ruby
mahlon has quit [Ping timeout: 260 seconds]
<sedeki>
Boohbah i've heard people call ruby a "functional programming language" and it seems the reason they call it that is simply because it supports lambdas and filter
moos3 has quit [Quit: Computer has gone to sleep.]
Mon_Ouie has joined #ruby
<bnagy>
lewix: well benching a single statement doesn't say much, especially with like a 500 picosecond difference
casheew has quit [Read error: Connection reset by peer]
moos3 has joined #ruby
<bnagy>
cause that's just your parser hit converting 000_000 to 000000
<lewix>
bnagy: what does it refer to (real) (user) and (system) exactly
<bnagy>
you'd need to bench it being used in a loop or somesuch
<bnagy>
lewix: same as ps
casheew has joined #ruby
<lewix>
ps?
kuzushi has joined #ruby
<bnagy>
time in userland, time in kernel land and wall-clock time
kofno has joined #ruby
verysoftoiletppr has joined #ruby
statarb3 has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
davetherat has joined #ruby
techlife has joined #ruby
Guedes0 is now known as Guedes
Guedes has quit [Changing host]
Guedes has joined #ruby
<lewix>
whats wall clock time
solars has joined #ruby
<apeiros_>
that's the time of the clock at the wall
<lewix>
real?
<lewix>
im not sure how they time it when they say time in userland....
<solars>
hey, is log4r still up to date? I need a logging lib that allows logging to graylog2, currently I'm using the 'logging' gem, since I remember log4r being outdated at some point..
* Gadgetoid
just wrote a shoddy assembly compiler in Ruby
F1skr has joined #ruby
chendo_ has quit [Ping timeout: 256 seconds]
newUser1234 has joined #ruby
adkron has joined #ruby
chendo_ has joined #ruby
jgarvey has joined #ruby
miskander has joined #ruby
Scudelletti has quit [Ping timeout: 245 seconds]
tubbo has joined #ruby
huoxito has joined #ruby
mikurubeam has quit [Quit: +1 (Good). -1 (Evil). i (WTF?).]
yashshah_ has quit [Read error: Connection reset by peer]
Goles has quit [Quit: Out.]
trend has quit [Ping timeout: 246 seconds]
Goles has joined #ruby
rdark has quit [Ping timeout: 264 seconds]
yashshah_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
rdark has joined #ruby
deadalus has quit [Changing host]
deadalus has joined #ruby
deadalus is now known as psychouroborors
s1n4 has quit [Quit: leaving]
psychouroborors is now known as psychouroboros
psychouroboros is now known as deadalus
eykosioux has quit [Read error: Connection timed out]
eykosioux has joined #ruby
vlad_starkov has joined #ruby
drale2k has quit [Quit: Leaving...]
anonymuse has joined #ruby
anonymuse has quit [Excess Flood]
bashdy has quit []
anonymuse has joined #ruby
Spooner_ has joined #ruby
newUser1234 has quit [Remote host closed the connection]
jjbohn has quit [Quit: Leaving...]
drumsrgr8forn8 has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
kpshek has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
halfie has joined #ruby
hbpoison has quit [Ping timeout: 245 seconds]
vy has joined #ruby
<vy>
I am a Ruby noob trying to write a couple of Ruby lines for a Ruby-based static site generator. Could anybody help me to figure out the problem in this simple code snippet: http://codepad.org/yrpN6jAu
grenzr has joined #ruby
mootpointer has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
girija_ has quit [Ping timeout: 245 seconds]
hbpoison has joined #ruby
<MrZYX>
vy: you're opening a block with { and try to close it with end
<MrZYX>
decide on { } or do end
<grenzr>
hey guys - with Test::Unit::TestCase - is it possible to ensure the number of tests executed in a method is a certain number? I wanted to test callbacks in EventMachine, and want to ensure no tests are missed
<grenzr>
nodejs nodeunit has expect(4) for example for this purpose
shevy has quit [Ping timeout: 240 seconds]
pencilcheck has quit []
pen has joined #ruby
<vy>
MrZYX: Oh! That's my paste mistake, here is the correct code: http://codepad.org/pY8vyUS3 It still does not work.
linoge has joined #ruby
<MrZYX>
ruby has no incrementor, use += 1
<vy>
MrZYX: Thanks so much.
carraroj has joined #ruby
mikecmpbll has joined #ruby
heftig has quit [Ping timeout: 245 seconds]
heftig has joined #ruby
eykosioux has quit [Read error: Connection timed out]
wobblini has quit [Ping timeout: 245 seconds]
eykosioux has joined #ruby
<MrZYX>
vy: you can also write foo[:bar] = initial if foo[:bar].nil? as foo[:bar] ||= initial. Another trick is to do Hash.new(0), where 0 would be the default value for uninitalized keys
freeayu has joined #ruby
<vy>
MrZYX: Checked. Thanks.
freezey has joined #ruby
bean|sleep is now known as bean
joofsh has quit [Remote host closed the connection]
sambao21 has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
<Hanmac>
vy: information: there is a minmax method with is better than calling min and max extra
pkordel has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
joshman_ has joined #ruby
philipd has joined #ruby
philipd has quit [Max SendQ exceeded]
dhruvasagar has joined #ruby
v0n has quit [Quit: WeeChat 0.4.0]
adambeynon has joined #ruby
v0n has joined #ruby
freeayu has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 245 seconds]
tcstar has joined #ruby
phantasm66 has joined #ruby
phantasm66 has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
axhlf has joined #ruby
eightbitraptor has joined #ruby
banister`sleep has quit [Remote host closed the connection]
Goles has joined #ruby
jrajav has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
hogeo has quit [Read error: Connection reset by peer]
fschuindt has joined #ruby
hogeo has joined #ruby
Neomex has joined #ruby
pi3r has quit [Ping timeout: 245 seconds]
vagmi has quit [Quit: vagmi]
as-cii has joined #ruby
sandGorgon has quit [Ping timeout: 256 seconds]
Neomex has quit [Client Quit]
noobie has joined #ruby
interactionjaxsn has joined #ruby
eykosioux has quit [Read error: Connection timed out]
SuperMeo has joined #ruby
newUser1234 has joined #ruby
eykosioux has joined #ruby
justsee has quit [Quit: Leaving...]
SuperMeo has quit [Killed (idoru (Spam is off topic on freenode.))]
joofsh has quit [Remote host closed the connection]
himsin has joined #ruby
jbynum has joined #ruby
techlife has quit [Ping timeout: 246 seconds]
techlife has joined #ruby
endzyme has joined #ruby
pi3r has joined #ruby
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
_nitti has joined #ruby
mikurubeam has joined #ruby
SCommette has joined #ruby
rwilcox has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
joofsh has joined #ruby
<noobie>
Hi! Can anybody help me with this? Trywing to clik on a button: end.click_button(button = '[Login1$btnLogar]'). The request seems to work but the result of my script shows: /usr/lib/ruby/1.8/mechanize/form.rb:153:in `proc_query': undefined method `query_value' for "[Login1$btnLogar]":String (NoMethodError)
vlad_starkov has joined #ruby
bean__ has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
hogeo has quit [Remote host closed the connection]
kaen has joined #ruby
<Spooner_>
noobie, You are just providing the button as a string, not a button object. Try browser.button(:id => "[Login1$btnLogar]").click instead (and stop using Ruby 1.8 :D).
kirun has joined #ruby
arya has joined #ruby
ner0x has joined #ruby
Giorgio has quit [Read error: Connection reset by peer]
<Spooner_>
noobie, Sorry, that should be #button_with, not #button
skattyadz has joined #ruby
<noobie>
Thanks! Spooner I'll try that.
<Spooner_>
noobie, agent.click_button(:id => '[Login1$btnLogar]') might work too, but try and you shall find something that works ;)
yshh has joined #ruby
<noobie>
Thanks Spooner!
kornnflake is now known as kornnflake_zzz
arya has quit [Client Quit]
banister`sleep has joined #ruby
ffranz has joined #ruby
arya has joined #ruby
jasond has joined #ruby
uris has joined #ruby
codecop has quit [Quit: Išeinu]
a_a_g has joined #ruby
cmarques has joined #ruby
yacks has quit [Quit: Leaving]
adac has joined #ruby
<adac>
which XML parser would you guys suggest?
jlast has joined #ruby
jlast has quit [Remote host closed the connection]
<hoelzro>
nokogiri is pretty good
<Spooner_>
adac, nokogiri only :)
drumsrgr8forn8 has joined #ruby
jlast has joined #ruby
<adac>
:) thank you hoelzro and Spooner_ :)
ananthakumaran has quit [Quit: Leaving.]
nomenkun has joined #ruby
freerobby has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
Morkel has quit [Quit: Morkel]
banister_ has joined #ruby
gyre007 has quit [Ping timeout: 245 seconds]
<msch>
is anyone using DRb in production? i'm looking for a really quick/dirty IPC method. DRb seems to fit the bill.
baba has joined #ruby
arya has quit [Ping timeout: 248 seconds]
eykosioux has quit [Read error: Connection timed out]
fire has quit [Ping timeout: 264 seconds]
<Hanmac>
what is IPC?
<msch>
inter process communication
<apeiros_>
Inter Process Communication
eykosioux has joined #ruby
banister`sleep has quit [Ping timeout: 240 seconds]
generalissimo has joined #ruby
r0f0 has joined #ruby
pitzips has joined #ruby
ndboost has joined #ruby
jonahR has joined #ruby
arya has joined #ruby
Sicp has joined #ruby
ner0x has quit [Remote host closed the connection]
xpen has joined #ruby
lupinstien has joined #ruby
miskander has joined #ruby
miskander has quit [Client Quit]
thams has quit [Quit: thams]
F1skr has quit [Quit: WeeChat 0.4.0]
mmitchell has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
dhruvasagar has joined #ruby
ferdev has quit [Ping timeout: 252 seconds]
jjbohn has joined #ruby
hbpoison has joined #ruby
xbob has quit [Quit: Leaving]
mando has joined #ruby
beiter has quit [Quit: beiter]
mmitchell has quit [Remote host closed the connection]
mmitchell has joined #ruby
girija_ has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
ndboost has quit [Remote host closed the connection]
ner0x has joined #ruby
Stilo has joined #ruby
kaen has quit [Ping timeout: 258 seconds]
dfried has joined #ruby
yshh has quit [Read error: Connection reset by peer]
a_a_g has quit [Quit: Leaving.]
pavilionXP has quit [Remote host closed the connection]
yshh has joined #ruby
gyre007 has joined #ruby
ferdev has joined #ruby
banister_ is now known as banisterfiend
banisterfiend has quit []
banisterfiend has joined #ruby
__Big0__ has joined #ruby
yacks has joined #ruby
mercy____ has joined #ruby
<banisterfiend>
if anyone wants access to screencasts and courses on codeschool, here is a 2 day pass, download to your hearts content: http://go.codeschool.com/quEk7w :)
hbpoison has quit [Ping timeout: 260 seconds]
fteem has joined #ruby
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
hbpoison has joined #ruby
mikurubeam has joined #ruby
tvw has joined #ruby
mikurubeam is now known as Guest40274
<fteem>
hey, anyone with savon.rb experience? got a question...
<apeiros_>
adac: think about it, if the inspect didn't have quotes, you'd be quite confused at what you're looking
predator117 has joined #ruby
<apeiros_>
especially if the string contained , and ]
BadLarry has quit [Quit: quitting]
<shevy>
khonk bean - I installed RedCloth 4.2.9 with ruby 1.8.x - the ruby version is not the problem, debian and ubuntu simply suck, and khonk's environment is either missing something or has another incompatibilitiy
* bean
is a debian / ubuntu fan, but I don't often run ruby stuff on it
kapowaz has joined #ruby
<starburst>
you need to have C build tools
<starburst>
like build-essential
<starburst>
to install the RedCloth gem
swingha has joined #ruby
<shevy>
khonk since debian/ubuntu are responsible for your operating system, it would be their responsibility to find out why you cant compile RedCloth natively. it gives you some log messages, have a look at that, something in your environment should be wrong when you try to compile redcloth natively
<adac>
apeiros_, thank you for the examples, I must think about it!
<shevy>
khonk there you go, take starburst's advice
<starburst>
it seems like you're blaming ubuntu/debian for your lack of knowledge
_serial_ has joined #ruby
ephemerian has left #ruby [#ruby]
bradhe_ has quit [Remote host closed the connection]
BadLarry has joined #ruby
<shevy>
I?
_serial_ has quit [Read error: Connection reset by peer]
noxoc has left #ruby [#ruby]
vlad_starkov has quit [Remote host closed the connection]
Hanmac has joined #ruby
popori has joined #ruby
solars has left #ruby ["WeeChat 0.3.7"]
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
Morkel has joined #ruby
_serial_ has joined #ruby
tjbiddle has joined #ruby
cheez0r_ is now known as cheez0r
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
timonv has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
endzyme has joined #ruby
carloslopes has joined #ruby
<shevy>
where does this project advice you to use bundler?
Beoran__ has joined #ruby
<Hanmac>
shevy its like compling something with "--enable-snake-oil" enabled :P
Wigflip_ has joined #ruby
<shevy>
the link is funny "For project progress and stories"
<starburst>
it's using rails 2.3
<shevy>
I click it, but it tells me I must login first before I can read
<starburst>
gem 'rails', '2.3.5'
fschuindt has quit [Quit: Computer has gone to sleep.]
a_a_g has quit [Client Quit]
jlast_ has joined #ruby
a_a_g has joined #ruby
Mon_Ouie has joined #ruby
fteem has quit [Quit: Leaving]
jlast has quit [Read error: Operation timed out]
whitedawg has joined #ruby
freerobby has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
tvw has joined #ruby
Beoran_ has quit [Ping timeout: 258 seconds]
jjbohn has quit [Quit: Leaving...]
tjbiddle has quit [Quit: tjbiddle]
jlast_ has quit [Read error: Operation timed out]
rickmasta has quit [Quit: Leaving...]
jbynum has quit [Read error: Operation timed out]
arturaz has quit [Ping timeout: 252 seconds]
sonda has quit [Remote host closed the connection]
pepper_chico has quit [Quit: Computer has gone to sleep.]
sambao21 has joined #ruby
a_a_g has quit [Quit: Leaving.]
hagzag has joined #ruby
elaptics`away is now known as elaptics
<hagzag>
hi
<gf3>
rubby
codenapper has joined #ruby
<khonk>
ok, the problem is whit versio of RedCloth
<gf3>
WAT
<khonk>
i solve bundle config build.RedCloth --with-cflags=-w
<gf3>
People still use RedCloth?
<khonk>
sorry i for old project...
<gf3>
khonk: Awww :(
cam` has joined #ruby
<khonk>
i get this error: An error occurred while installing sqlite3 (1.3.3), and Bundler cannot continue.
whitedawg has quit [Quit: Leaving.]
eykosioux has quit [Read error: Connection timed out]
tealmage has joined #ruby
eykosioux has joined #ruby
<khonk>
how to solve it?
brhelwig has joined #ruby
dawkirst has joined #ruby
mafolz has joined #ruby
kornnflake_zzz is now known as kornnflake
xpen has joined #ruby
chussenot has quit [Quit: chussenot]
xcv has joined #ruby
sailias has quit [Ping timeout: 240 seconds]
<Hanmac>
khonk what kind of error?
peterhellberg has quit [Remote host closed the connection]
endzyme has quit [Remote host closed the connection]
markalanevans has quit [Quit: markalanevans]
sebastianb has joined #ruby
blaxter has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
endzyme has joined #ruby
rickmasta has joined #ruby
kaen has quit [Quit: Leaving]
jlast has joined #ruby
thams has joined #ruby
<khonk>
An error occurred while installing sqlite3 (1.3.3), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.3.3'` succeeds before bundling.
pcarrier_ has quit []
backjlack has quit [Remote host closed the connection]
<MrZYX>
shevy: actually khonk skipped the real error message and that's just bundlers generic "something went wrong" that comes after it
<MrZYX>
khonk: I bet you're missing the dev headers for sqlite
<khonk>
yes how to install headers.. :/
<MrZYX>
but that's just guessing, as said the real error is before that message
<Hanmac>
shevy its not "crippeld" its parted into usefull subsections ... for sample when you install the dev package you may not need the -doc package, or you want the lib and the -doc package but not the -dev package
artofraw has joined #ruby
<khonk>
when i try to run ruby install.rb
<MrZYX>
khonk: that highly depends on the distribution you use
jekotia has joined #ruby
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<Hanmac>
khonk i said "when you install sqlite pick the dev package" ... there should be some kind of libsqlite3-dev or sqlite3-dev or something like that
<khonk>
ok
ozgura has joined #ruby
pen has quit [Ping timeout: 272 seconds]
kornnflake is now known as kornnflake_zzz
bigoldrock has joined #ruby
apeiros_ has quit [Remote host closed the connection]
akashj87 has joined #ruby
himsin has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 252 seconds]
hse-hoens has joined #ruby
beiter has quit [Quit: beiter]
rickmasta has joined #ruby
thecreators has joined #ruby
adamholt has quit [Read error: Operation timed out]
palyboy has quit [Read error: Operation timed out]
mfridh has quit [Read error: Connection reset by peer]
palyboy has joined #ruby
<khonk>
yes its works! libsqlite3-dev
<khonk>
it*
arya has quit [Ping timeout: 248 seconds]
mikurubeam has joined #ruby
<khonk>
Your bundle is complete! It was installed into ./vendor Post-install message from sqlite3-ruby:
heftig has joined #ruby
thecreators has quit [Remote host closed the connection]
mfridh has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
sambio has quit [Read error: Connection reset by peer]
sambio_ has joined #ruby
binaryplease has joined #ruby
adamholt has joined #ruby
chrishough has quit [Quit: chrishough]
* Hanmac
knows its ubuntu :P
greenarrow has quit [Read error: Operation timed out]
hoens has quit [Ping timeout: 256 seconds]
daniel_hinojosa has joined #ruby
jetaggart has quit [Remote host closed the connection]
Al_ has quit [Ping timeout: 252 seconds]
greenarrow has joined #ruby
sandGorgon has quit [Ping timeout: 240 seconds]
Al_ has joined #ruby
arya has joined #ruby
sailias has quit [Ping timeout: 260 seconds]
carlyle has joined #ruby
Dwarf has quit [*.net *.split]
eliasp has quit [*.net *.split]
LBRapid has quit [*.net *.split]
lele has quit [*.net *.split]
Hien has quit [*.net *.split]
swistak35 has quit [*.net *.split]
lupine has quit [*.net *.split]
ohcibi has quit [*.net *.split]
sonne has quit [*.net *.split]
nuba has quit [*.net *.split]
trent1 has quit [*.net *.split]
ereslibre has quit [*.net *.split]
tils has quit [*.net *.split]
tils has joined #ruby
nuba has joined #ruby
lele has joined #ruby
LBRapid has joined #ruby
swistak35 has joined #ruby
sandGorgon has joined #ruby
trent1 has joined #ruby
RORgasm_ is now known as RORgasm
tjbiddle has joined #ruby
a_a_g has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy>
Hanmac there is no easy way to define "I want to install everything from a given package foo", so yes, you must know the name before you can uncripple it. it is crippled because if you do not uncripple it, you lack necessary files from the package. if you compile a program via GNU Autoconfigure into a directory/location via --prefix, you get the full 100% of the installation, without having to do anything fu
<shevy>
rther (provided that the compilation/installation works without error)
Asher has joined #ruby
adac has quit [Quit: Leaving]
Hien has joined #ruby
eAlchemi_ has joined #ruby
<shevy>
there is libreadline5 and libreadline5-dev and libreadline6 and libreadline6-dev. there is no specific version associated with that alone
dhruvasagar has joined #ruby
<shevy>
could be readline-5.1 or readline-5.2
Quebert has joined #ruby
rdark has quit [Ping timeout: 256 seconds]
stef_204 has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
<shevy>
when I install from source, I could install readline-5.2 and readline-6.2. If I installed into a versioned standalone directory, I can decide to remove the include/ directory there (which would be -dev)
soot has joined #ruby
_serial_ has quit [Quit: Ex-Chat]
soot has left #ruby [#ruby]
lupinstien has joined #ruby
<starburst>
using rvm would completely solve your problems
<starburst>
just saying
<shevy>
whose problems?
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
axl_ has joined #ruby
pavilionXP has joined #ruby
Jrz has joined #ruby
<shevy>
curious how you quiet down :>
<Hanmac>
readline5 and readline6 have different licenses ... thats why ... (ruby before 1.9.3 are not alowed to build against readline6 because of licensce)
shirokuro11 has joined #ruby
banisterfiend has joined #ruby
lupine has joined #ruby
Virunga has quit [Remote host closed the connection]
eAlchemi_ has quit [Ping timeout: 248 seconds]
khonk has quit [Ping timeout: 245 seconds]
sonne has joined #ruby
tish has joined #ruby
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
rippa has joined #ruby
<Hanmac>
there was some kind of problem when you want to compile your ruby against readline and openssl (i mean yeah you can do it but it was not legal :P)
tealmage has quit [Remote host closed the connection]
psyprus has quit [Changing host]
psyprus has joined #ruby
Xeago has joined #ruby
freerobby has quit [Quit: Leaving.]
jdolitsky has joined #ruby
gaahrdner has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
jlast has joined #ruby
sambao21 has joined #ruby
xbob has joined #ruby
tish has quit [Ping timeout: 245 seconds]
failshell has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
mahmoudimus has joined #ruby
pi3r has quit [Quit: Leaving]
mikurubeam has joined #ruby
eykosioux has quit [Read error: Connection timed out]
Morkel has quit [Quit: Morkel]
eykosioux has joined #ruby
backjlack has joined #ruby
Virunga has joined #ruby
DrShoggoth has joined #ruby
eAlchemist has joined #ruby
brhelwig has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 256 seconds]
rdark has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
locriani has joined #ruby
DrShoggoth has quit [Max SendQ exceeded]
sailias has joined #ruby
mikurubeam has quit [Client Quit]
shirokuro11 has quit [Remote host closed the connection]
Artheist has joined #ruby
chussenot has joined #ruby
tommyvyo_ has joined #ruby
workmad3 has joined #ruby
nomenkun has quit [Remote host closed the connection]
etcetera has quit []
tommyvyo has quit [Read error: Connection reset by peer]
tommyvyo_ is now known as tommyvyo
rupee has joined #ruby
sambao21 has joined #ruby
Virunga has quit [Remote host closed the connection]
as-cii has quit [Quit: Leaving]
kornnflake is now known as kornnflake_zzz
razibog has joined #ruby
moted has quit [Remote host closed the connection]
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
rippa has joined #ruby
apeiros_ has joined #ruby
etcetera has joined #ruby
moted has joined #ruby
twoism has joined #ruby
mpfundstein has quit [Remote host closed the connection]
sepp2k1 has joined #ruby
pseudonymous has quit [Ping timeout: 252 seconds]
sepp2k has quit [Ping timeout: 245 seconds]
gorozco1 has joined #ruby
lewix_ has joined #ruby
mattbl has joined #ruby
girija_ has quit [Read error: Connection reset by peer]
gorozco1 is now known as patux
rdark has quit [Ping timeout: 240 seconds]
xcv has quit [Remote host closed the connection]
jpcamara has quit [Quit: jpcamara]
xcv has joined #ruby
xpen_ has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
yashshah has joined #ruby
mklappstuhl has quit [Ping timeout: 264 seconds]
S1kx has quit [Ping timeout: 264 seconds]
rdark has joined #ruby
girija has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
<shevy>
today I shall finish my ultra super huge colour module in ruby
drumsrgr1 has joined #ruby
c0rn has joined #ruby
mockra has joined #ruby
<JonnieCache>
colour module?
jjbohn has joined #ruby
<JonnieCache>
firstly, i didnt think you were .uk
<JonnieCache>
and secondly wtf is a colour module
<shevy>
yeah, kinda, or more a project to integrate them all
<shevy>
we had to learn UK english in school :(
jonahR has quit [Ping timeout: 260 seconds]
bluehavana has joined #ruby
notbrent has joined #ruby
<shevy>
JonnieCache, that is a good question. right now I use about 3 different small projects for colour related stuff. mostly, ansi colour output on the console, but also html colour codes + R,G,B values
<Hanmac>
we learned both UK and US english ... i dont prefer one, but some of UK works are looks like hidden france
silasdavis has joined #ruby
steeve1 has joined #ruby
drumsrgr8forn8 has quit [Ping timeout: 240 seconds]
zmike123 has quit [Client Quit]
a_a_g has quit [Quit: Leaving.]
Vainoharhainen has quit [Quit: Leaving...]
<JonnieCache>
Hanmac: thats pretty much correct. uk english has lots of french words, often alongside the older anglo-saxon ones
jjbohn has quit [Client Quit]
* Hanmac
is from saxony :P
Ontolog has joined #ruby
<shevy>
thing is the US english is kinda ubiquitous
dr_bob has left #ruby [#ruby]
<shevy>
UK english is cooler all around, but mass usage kinda beats excellence here
_nitti_ has joined #ruby
Vainoharhainen has joined #ruby
<JonnieCache>
i mostly use color now
cool has joined #ruby
<JonnieCache>
its just easier
jonahR has joined #ruby
skattyadz has quit [Quit: skattyadz]
tomku has joined #ruby
<shevy>
you mean for all 'ou' words? armour vs. armor ?
<JonnieCache>
no just color specifically
<JonnieCache>
because of css :)
<Hanmac>
for sample i dont like the "colour" word ... i mean why does it need an "u" inside? in some years or more does it change to "coluor" and then to "coluur" and then to "culuur" and then "u" has killed all "o"s and the last ones are living in reservats?
<shevy>
yeah, that is another good thing about the US english, it is often much simpler. for example in music
skattyadz has joined #ruby
<shevy>
the US call it a "half note", and the UK calls it a "minim"
ExxKA has quit [Quit: This computer has gone to sleep]
Stilo has joined #ruby
chussenot has quit [Quit: chussenot]
pepper_chico has quit [Quit: Computer has gone to sleep.]
vlad_sta_ has joined #ruby
pygmael has joined #ruby
woolite64 has joined #ruby
ozgura has quit [Remote host closed the connection]
tish has joined #ruby
aaronmcadam has quit [Quit: Leaving...]
forrest has joined #ruby
KellyLSB has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
jdunck has joined #ruby
sambio_ has quit [Ping timeout: 256 seconds]
BigFatFatty has joined #ruby
jpcamara has quit [Ping timeout: 245 seconds]
alvaro_o has joined #ruby
mrsolo has joined #ruby
jpcamara has joined #ruby
girija has quit [Ping timeout: 264 seconds]
graft has quit [Ping timeout: 264 seconds]
scudelletti__ has joined #ruby
mercwithamouth has joined #ruby
jdunck has quit [Ping timeout: 245 seconds]
pygmael has quit [Ping timeout: 264 seconds]
QKO has quit [Changing host]
QKO has joined #ruby
jjbohn has quit [Quit: Leaving...]
nari has quit [Ping timeout: 264 seconds]
danman has joined #ruby
slainer68 has quit [Remote host closed the connection]
jpcamara_ has joined #ruby
Scudelletti has quit [Quit: Leaving]
pandawarrior has joined #ruby
phantasm66 has joined #ruby
phantasm66 has joined #ruby
jpcamara has quit [Ping timeout: 276 seconds]
kirun_ has joined #ruby
<pandawarrior>
using rspec to test a class that has a dependency on another class injected at initialization
jrajav has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
pepper_chico has joined #ruby
danneu has joined #ruby
<pandawarrior>
in rspec how can i test this without testing the object i'm dependent upon?
jdunck has joined #ruby
<Spooner_>
pandawarrior, Make a pure mock object?
sk87 has joined #ruby
<pandawarrior>
i used a double and a mock
shock_one has joined #ruby
hybris has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<pandawarrior>
but when i say the dependent object should return something
<pandawarrior>
the tests pass even if i put in something the real object could never return
sambao21 has quit [Quit: Computer has gone to sleep.]
mercwithamouth has quit [Ping timeout: 252 seconds]
<pandawarrior>
i guess my question is, what am i testing?
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
jeremyb_ has joined #ruby
<pandawarrior>
the relationship(dependency) or the return value?
xcv has quit [Read error: Connection reset by peer]
xcv_ has joined #ruby
kirun has quit [Ping timeout: 256 seconds]
fermion has joined #ruby
norm has quit [Quit: norm]
<jeremyb_>
i want to be able to accept either string or an array of strings as input. what's the best way to magically ensure that bare strings are wrapped in an Array?
Al_ has quit [Quit: Al_]
<jeremyb_>
seems what i was doing in 1.8.x no longer works in 1.9.1
<Spooner_>
jeremyb_, Why use 1.9.1? It was pretty crappy.
<halfie>
is the pragmatic ruby book suitable enough for beginners? I want to get up to speed pretty quickly.
<halfie>
(1 week or so)
SiliconDon has joined #ruby
<jeremyb_>
Spooner_: that's apparently what wheezy has
<jeremyb_>
Spooner_: anyway, it's just futureproofing for an eventual upgrade. i assume this system is staying on 1.8.7 for some time
sk87 has quit [Ping timeout: 260 seconds]
<lewix_>
do you know a good ressource to learn design patterns and algorithm in ruby
<Spooner_>
jeremyb_, Yeah and 1.8.7 is about to reach end of life.
interactionjaxsn has quit [Remote host closed the connection]
lewix_ is now known as lewix
lewix has quit [Changing host]
lewix has joined #ruby
brhelwig has quit [Ping timeout: 258 seconds]
<Spooner_>
halfie, That is fine. You can get the old edition as a free PDF if you want to see how it pitches the info.
KellyLSB has quit [Ping timeout: 255 seconds]
sambao21 has joined #ruby
<jeremyb_>
Spooner_: this is an ubuntu precise system. (fwiw, this is for puppet). i doubt that anyone's going to install a custom package. they're just going to keep using the system ruby
<halfie>
Spooner_, I went with the beta version of fourth edition since I am running Ruby 2.0
io_syl has joined #ruby
<Spooner_>
jeremyb_, package managers often say 1.9.1 when they mean 1.9.x - 1.9.1 is the compatibility version, not necessarily the actual version.
silasdavis has quit [Quit: Leaving]
skattyadz has quit [Quit: skattyadz]
maxmanders has quit [Quit: Computer has gone to sleep.]
speakingcode-wor has joined #ruby
<Spooner_>
Still much better just using RVM/rbenv to install so you get access to whatever you need.
<halfie>
Ruby code scares me (first encounters). I did not have similar problem with Python :)
<halfie>
Spooner_, using rvm here, installed 2.0 from there.
<jeremyb_>
Spooner_: Installed: 1.9.3.194-8.1
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
<Spooner_>
jeremyb_, That is fine. Not quite 100% up to date, but I'm sure it is fine.
TMM has quit [Quit: Bye]
jlast has joined #ruby
interactionjaxsn has joined #ruby
Al_ has joined #ruby
graft has quit [Quit: Lost terminal]
<Spooner_>
halfie a lot of people rate The Well-grounded Rubyist, though I haven't seen it.
<halfie>
I have had good experience (in general) with pragmatic series of books. Will check that one out too.
Al_ has quit [Client Quit]
<Spooner_>
I learned with the second edition pickaxe book. Thought it was great, but that was a long time ago now!
pepper_chico has quit [Quit: Computer has gone to sleep.]
<speakingcode-wor>
i've got the pickaxe book and the well grounded rubyist here at work
skattyadz has joined #ruby
<speakingcode-wor>
both are pretty good
cmarques has joined #ruby
QKO has quit [Ping timeout: 256 seconds]
skattyadz has quit [Client Quit]
haxrbyte_ has quit [Read error: Connection reset by peer]
<bigmac>
any one ever use packetfu lib?
sandGorgon has quit [Read error: Connection reset by peer]
jlast has quit [Ping timeout: 260 seconds]
QKO has joined #ruby
KellyLSB has joined #ruby
whitedawg has joined #ruby
sandGorgon has joined #ruby
<samuel02>
does anyone know of a gem that will help me validate an ics file?
Virunga is now known as LennyLinux
slapt has quit [Ping timeout: 276 seconds]
_nitti has joined #ruby
cupakromer has left #ruby [#ruby]
skattyadz has joined #ruby
Morkel has joined #ruby
tealmage has quit [Remote host closed the connection]
jlast has joined #ruby
jlast has quit [Remote host closed the connection]
Zai00 has quit [Ping timeout: 256 seconds]
jlast has joined #ruby
eykosioux has quit [Remote host closed the connection]
skattyadz has quit [Client Quit]
toekutr has joined #ruby
<halfie>
bigmac, I have used it once but I mostly did copy-paste job then.
<bigmac>
i am at the moment... looks like you have to build the packet and then inject... maybe i question is about this irc protocol... can i inject a packet on a Already established connection?
jbueza has joined #ruby
<shevy>
lewix not really, most of these seemed quite complicated to me
cearls has joined #ruby
Coolhand has quit [Remote host closed the connection]
<strtok>
bigmac: not really
<shevy>
wobblini you always pick up a new nick, then explain this with other people ... :P
arturaz has joined #ruby
<shevy>
I am the real dblack!
<wobblini>
shevy: heh
<bigmac>
you would have to guess a sequence number? or something?
<halfie>
bigmac, no it is hard to do so. maybe you can do MiTM attacks with ettercap (not very hard)
<wobblini>
shevy: it's an ongoing identity crisis
<lewix>
shevy: most computer science student know it...have you never been asked data structures and algorithms in interviews
SiliconDon has quit [Client Quit]
carloslopes has quit [Remote host closed the connection]
mattbl has joined #ruby
<halfie>
there must be an easier way to do what you are doing, some IRC library / bot in written in ruby?
arturaz has quit [Client Quit]
jdripper has quit [Quit: Leaving.]
kirun_ has quit [Quit: Client exiting]
bitcrave has joined #ruby
SiliconDon has joined #ruby
<shevy>
lewix ah, I am not a programmer, it's more a hobby still, I came from biology/genetics/chemistry
sayan has quit [Read error: Connection reset by peer]
<bigmac>
well i didnt want to write a client, but maybe learn what it takes to inject
SiliconDon has quit [Remote host closed the connection]
sk87 has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
SiliconDon has joined #ruby
<shevy>
lewix what I want to do one day is to program via biological cells
SiliconDon has quit [Remote host closed the connection]
faulkner has joined #ruby
SiliconDon has joined #ruby
xcv_ has quit [Remote host closed the connection]
subr00t has left #ruby [#ruby]
xcv has joined #ruby
<lewix>
shevy: you should look into java
tent4051 has joined #ruby
altivec has quit [Quit: Computer has gone to sleep.]
<lewix>
any computer science guy here ? I need a design pattern algorithm book for interviews
_nitti has quit [Ping timeout: 256 seconds]
jpcamara has joined #ruby
<tent4051>
why is rvm always forgetting that bundler is installed? what am i doing wrong? 'gem install bundler' is successful, then running 'bundle install' on my project, it says its not installed!
xardas has joined #ruby
<tent4051>
(the end of my $PATH is $HOME/.rvm/bin)
molok_ has joined #ruby
hbpoison has quit [Ping timeout: 240 seconds]
jpcamara_ has quit [Read error: Connection reset by peer]
jonathanwallace has quit [Ping timeout: 260 seconds]
<tent4051>
gem bundler is not installed, but even `which bundle` spits out the path to the binary!
jpcamara_ has joined #ruby
_nitti has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
codecop has joined #ruby
jonathanwallace has joined #ruby
CamonZ has joined #ruby
sk87 has quit [Read error: Connection reset by peer]
<Hanmac>
thats why i do neither use rvm nor bundler :P
jpcamara has quit [Ping timeout: 264 seconds]
sk87 has joined #ruby
<tent4051>
i'm asking for help getting it working
vlad_starkov has joined #ruby
<tent4051>
at first they both seemed to have their strengths but there must be something simple i am missing
<tent4051>
/usr/bin/env: ruby: No such file or directory
<shevy>
hehehe
skattyadz has quit [Ping timeout: 256 seconds]
<shevy>
that could be a bogus error though
freerobby has quit [Quit: Leaving.]
<tent4051>
i'm glad it tells me which script is causing that, and i'm especially glad that running just $ env ruby works just fine. oh its not bogus. its a real error.
<shevy>
if other .rb scripts of you can find ruby with that shebang
noobie has quit [Quit: [EOF]]
wobblini has quit [Ping timeout: 260 seconds]
<shevy>
so all your scripts with that shebang dont work?
sayan has joined #ruby
Zai00 has quit [Quit: Zai00]
BizarreCake has joined #ruby
<tent4051>
no, a script that uses that works just fine
<shevy>
then it can not be a real error because "env" found the ruby binary
jonahR has joined #ruby
<shevy>
perhaps a -w flag is used somewhere
<tent4051>
what's that do
m8 has joined #ruby
tspike has quit [Ping timeout: 245 seconds]
<shevy>
-w should enable all sorts of warning
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
<shevy>
but via env it does not always work easily
<Hanmac>
PS: you should NOT run gems with -d flag ... it could be totaly "bogus" :D
nomenkun has joined #ruby
arya has quit [Ping timeout: 248 seconds]
tmiller has left #ruby [#ruby]
<shevy>
sometimes when you compile via GNU autoconfigure, it tells you that "gtk is not working properly", but when you then look at config.log it may tell you that "xrender is not working". other programs using gtk would just work fine, and the real error would be related to xrender, and not gtk
workmad3 has quit [Ping timeout: 252 seconds]
Liquid-- has joined #ruby
colonolGron has joined #ruby
insulator has joined #ruby
<tent4051>
is bundle supposed to be a bash script? wtf?
ehlu has left #ruby [#ruby]
Raboo has joined #ruby
picca3 has joined #ruby
<shevy>
:D
insulator has quit [Remote host closed the connection]
<shevy>
I dont even think "env" should exist at all
rdark has quit [Quit: leaving]
mark_locklear has quit [Quit: Leaving]
<tent4051>
ruby is just so great. i spend 1 hour trying to fix a problem, then 2, then 3. get me a gun.
chrishough has quit [Ping timeout: 255 seconds]
<tent4051>
``rm -rf ~/.rvm''
<breakingthings>
tent4051 ur doin it rong
<shevy>
your problem for using rvm and bundler tent4051
timmow has quit [Ping timeout: 252 seconds]
chrishough has joined #ruby
<tent4051>
yeah i'll figure out a better way then
picca3 has quit [Client Quit]
ryanf has joined #ruby
ferdev has quit [Quit: ferdev]
<shevy>
rvm should not have existed, and the little that bundler solves should be integrated into gems
<breakingthings>
bundlers nice tho
<breakingthings>
rvm is just crap
<shevy>
hehe
freerobby has joined #ruby
<tent4051>
what's so wrong with rvm?
<shevy>
breakingthings what about combining the two, mandatory? :)
RushingFitness has joined #ruby
<breakingthings>
shevy: combining the two sounds like pain
<shevy>
ruby 2.1 to require rvm+bundler as part of its standard library
<breakingthings>
rip ruby 2.1
<shevy>
hehehe
<shevy>
well
axhlf has quit [Remote host closed the connection]
RushingFitness has quit [Client Quit]
<shevy>
perhaps it could be improved, when it becomes the official standard
<shevy>
like how gem is now auto-required, in 1.8.x you still must do require 'rubygems' manually
<atmosx>
shevy!!!!
freerobby has quit [Client Quit]
<shevy>
hey atmosx, still busy with exams?
<atmosx>
I have biochem on Friday
freerobby has joined #ruby
<shevy>
cool!
<atmosx>
it's a busy period.
whitedawg has quit [Quit: Leaving.]
<shevy>
you have to memorize various cellular metabolic pathways for that?
<atmosx>
Hahaha I didn't study a lot and I'm turnking mad... like I study all day long :-P univ/library
angusigu1ss has joined #ruby
<shevy>
an idiotic professor said "you must know 10 pathways in detail to achieve 50% of the points"
hbpoison has joined #ruby
<atmosx>
no thank god she only needs krebs cycle
<shevy>
ok good that would be one cycle
<atmosx>
and some minor like urine production and glycolysis etc.
seejohnr1n has joined #ruby
LennyLinux has quit [Remote host closed the connection]
<shevy>
"describe the uric acid pathway", I hate that one
seejohnrun has quit [Ping timeout: 252 seconds]
angusiguess has quit [Disconnected by services]
<atmosx>
hmmm yeah, well it would be simpler than that.
angusigu1ss is now known as angusiguess
<shevy>
ah, so you have to know that one too ;)
Coolhand has joined #ruby
<atmosx>
She's quite nice and she has a very particular way of examination. I might just make sure I pass the written part now and go for oral exam next time
tymat has joined #ruby
<shevy>
oh
<atmosx>
we'll see. I have also a phytochem little quiz the same day... butthat's easier.
SiliconDon has joined #ruby
<shevy>
you have to do both written + oral?
<atmosx>
yeah
<shevy>
we were luckier, only written
sambao21 has quit [Quit: Computer has gone to sleep.]
tspike has joined #ruby
<atmosx>
the written part is huge, from theory like Hb/Mb description/Bohr effect and so on to ... put the compounds in any sort of reaction...
<atmosx>
most are phosphorylations really, from what I've seen.
<tent4051>
are you sure i don't have to pay $35 a year first? :p
<shevy>
wget links would be: wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2 or wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.tar.bz2
buibex has joined #ruby
<shevy>
I think ruby.org was registered many years ago :(
<shevy>
tent4051, we also have a #ruby and a #ruby-lang channel here :(
<shevy>
but #ruby-lang is set +m or something like that
<shevy>
some people there don't visit #ruby, and vice versa
<shevy>
and apeiros_ kills cross-posters :D
Xeago has quit [Remote host closed the connection]
vinici has joined #ruby
thams has joined #ruby
vinici has left #ruby [#ruby]
slainer68 has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
<aedorn>
Really do need to combine the Ruby channels somehow... it's still the only fragmented part of the community
__Big0__ has quit [Remote host closed the connection]
Hanmac has joined #ruby
<tent4051>
is it true that ruby programmers actually make good money? are any of you in that category?
aaronmcadam has joined #ruby
__Big0__ has joined #ruby
<Rudd-XXX>
hi
Eldariof-ru has joined #ruby
<aedorn>
tent4051: You can make good money doing programming in any language, just depends on what you're doing with it
<shevy>
aedorn I would agree on that, but #ruby-lang is quite nazi ... quicker bans, moderation and registration in order to talk/chat ...
<shevy>
tent4051 probably easier for web-related stuff
<Rudd-XXX>
how do I tell bundle to package my gems in vendor/cache but actually include the C extensions?
<shevy>
tent4051, see? ^^^ bundle related problems never stop here ;)
<Rudd-XXX>
it seems retarded to me that bundle package won't package the .so files
<Spooner_>
tent4051, Rails programmers are supposed to make a lot and since they are in short supply, you don't have to be any good ;)
<Rudd-XXX>
the whole point of why I'm using bundle package is to avoid compilation in the production machins
<shevy>
haha Spooner_ that is so mean
<tent4051>
yet seemingly so true
yashshah has quit [Read error: Connection reset by peer]
sambio has joined #ruby
yashshah has joined #ruby
<shevy>
a month ago I found out by chance that my university uses ruby on rails for the students-interna page... if I want to take an exam, I have to use ruby on rails as an end user, that was kinda cool
<shevy>
(for registration)
nateberkopec has joined #ruby
<Rudd-XXX>
so, again, how do I get "bundle package" to actually package my C extension gems, like eventmachine?
<tent4051>
i remember back in my days when we had to trudge uphill for 6 miles in the snow to deliver a ream of fortran punchcards to the mainframe... kids nowadays don't have a clue how to program
eldariof has quit [Ping timeout: 264 seconds]
joofsh has quit [Remote host closed the connection]
r0f0 has quit [Quit: Leaving]
chrishough has quit [Quit: chrishough]
<shevy>
tent4051 no kidding? through snow???
ebobby has joined #ruby
<shevy>
try to get kids today to do physical exercise at all
SiliconDon has quit [Remote host closed the connection]
BizarreCake has quit [Ping timeout: 252 seconds]
SiliconDon has joined #ruby
<Hanmac>
Rudd-XXX it may not a good idea to make "precompiled" gems ... some C-Ext gems are for a reason not precompiled because they fit in the system where they are installed
<Phibs>
I did gem install fastthread, but it did not compile the native extension, is this normal or does it only occur on certain ruby versions? (This is 1.9.3)
osgux has joined #ruby
<Rudd-XXX>
hanmac: the system where they will be installed doesn't have a C compiler. That is a deliberate choice.
mercwithamouth has joined #ruby
tay1 has joined #ruby
<osgux>
gi
KevinSjoberg has joined #ruby
<osgux>
hi
<shevy>
Phibs depends on the error. in many situations, you may lack .h files (dev package), or there may be another problem with your environment/compiler
<osgux>
i have project with rails version 2.3.5
<Rudd-XXX>
hanmac: the people who designed this system of distributing software clearly didn't see beyond hacking on their local laptops.
<osgux>
i try to run sudo rails s
<Phibs>
shevy: no error, it is just not building it
<Rudd-XXX>
is there ANY tool in the ruby world that would allow me to actually bundle C extensions in gems?
<Rudd-XXX>
doesnt have to be bundler
buibex has quit [Remote host closed the connection]
<shevy>
Fetching: fastthread-1.0.7.gem (100%)
<shevy>
Building native extensions. This could take a while...
<shevy>
Successfully installed fastthread-1.0.7
<Hanmac>
a system without a C compiler is like a fish without water :P
<shevy>
Phibs you get output like that though? ^^^
<shevy>
Hanmac says the one who uses Ubuntu, which by default wants you to get build essentials :P
luckyruby has quit [Remote host closed the connection]
<Rudd-XXX>
hanmac you need to spend a little more time on the operations side of the equation, where builds are formally separate from deploys.
kkh has joined #ruby
luckyruby has joined #ruby
<Rudd-XXX>
I need to know if there is a way to do this, because I need to tell my developers whether they may continue with ruby or to port to python, where this is not a problem
chrishough has joined #ruby
<shevy>
Rudd-XXX I am not sure it is possible... I also can not remember any gem that would do it... either it's all .rb files and text files, or one usually compiles natively
Morkel_ has joined #ruby
<shevy>
let's provoke
<shevy>
it's not possible in ruby
<shevy>
use python
<shevy>
:)
popori has quit [Quit: Leaving]
carloslopes has joined #ruby
Catbuntu has joined #ruby
Liquid-- has quit [Quit: Computer has gone to sleep.]
bluOxigen has joined #ruby
Aiur has quit [Quit: Computer has gone to sleep.]
andikr has quit [Read error: Connection reset by peer]
<Rudd-XXX>
shevy, lol, but it's true.
<shevy>
ok they still sleep ... need more
<shevy>
Rudd-XXX says ruby sucks!!!
<shevy>
Rudd-XXX, yeah, it may actually be true... I am still thinking if I know of binary distributions of any gem...
<shevy>
Hanmac here has C++ projects + ruby, so he should actually know
<Hanmac>
Rudd-XXX i have a new gem for wxWidgets ... the old wxRuby PRECOMPILED does not work with system wx because it was build against an feature that the system wx does not have ... NOW THINK ABOUT THAT
<shevy>
Hanmac well how about a simpler example
Morkel has quit [Ping timeout: 252 seconds]
Morkel_ is now known as Morkel
<shevy>
like a 1000 lines of code .c file
Davey_ has joined #ruby
<shevy>
Rudd-XXX, can't you just put it into bin/ directory or ext/ of your gem project?
<Hanmac>
while my wx gem does check your wx configuation and only builds that what you have on your system
seejohnr1n has quit [Ping timeout: 252 seconds]
ramblex has quit [Remote host closed the connection]
realDAB has joined #ruby
sayan has quit [Quit: Leaving]
sayan has joined #ruby
brianpWins has quit [Quit: brianpWins]
jimeh has quit [Quit: Computer has gone to sleep.]
s1n4 has quit [Quit: leaving]
skattyadz has quit [Ping timeout: 260 seconds]
<bricker>
Who wants to play ruby golf - I need a succinct way to make sure that a string begins and ends with a forward-slash, and add them if not
allsystemsarego has quit [Quit: Leaving]
<Rudd-XXX>
hanmac i know about configure and make. the production system does not have development software installed, and it won't. don't argue with me about that, unless you're prepared to argue with the operations team on my behalf.
<Rudd-XXX>
shevy, the problem is that the .gem files in vendor/cache don't actually have ext/*.so content
<postmodern>
tent4051, if your on Fedora, they patched rubygems to allow installing into ~/.gem/ by default
Phibs has left #ruby [#ruby]
cearls has joined #ruby
__Big0__ has quit [Remote host closed the connection]
lewix has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
sambao21 has joined #ruby
francisfish has quit [Remote host closed the connection]
hadees has quit [Quit: hadees]
brianpWins has joined #ruby
<havenwood>
Phibs: RVM, chruby and rbenv each fill a niche. Both rbfu and ruby-version self-deprecated in favor of chruby so there aren't all that many options. RVM, chruby, rbenv, or ry.
<havenwood>
shims... psh!!! :P
JonnieCache has joined #ruby
seejohnrun has joined #ruby
<shevy>
Phibs left :(
statarb3 has quit [Ping timeout: 245 seconds]
<shevy>
now it stands in the room that ruby has so many versions
<havenwood>
shevy: Just realized that when my tab completion hit a wall. >.>
<shevy>
but one can avoid using rvm rbenv etc.. etc.. and ruby still works perfectly fine
<havenwood>
shevy: Plenty of languages would love the problem of too many high quality implementations...
<postmodern>
shevy, correct, however rubygems doesn't support --user-install by default
<shevy>
yeah that one is confusing
<postmodern>
shevy, and ~/.gem/$ruby/$version/bin has to be added to $PATH
<shevy>
don't they want to add that?
<shevy>
I mean the rubygems devs
<postmodern>
shevy, apparently it was buggy at first, so they disabled it
<shevy>
hehehe
interactionjaxsn has quit [Remote host closed the connection]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
interactionjaxsn has joined #ruby
dfried has quit [Quit: dfried]
dfried has joined #ruby
geekbri has quit [Remote host closed the connection]
theRoUS has quit [Ping timeout: 255 seconds]
ferdev has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
aquaman has joined #ruby
SiliconDon has quit [Remote host closed the connection]
<Sicp>
I see get undefined local variable terminals when trying to access it from the method
<Sicp>
WAT
<breakingthings>
is what makes them public
dsabanin has joined #ruby
<breakingthings>
Hanmac: oh god don't blow his mind I'm just trying to get it across as simply as possible
sambao21 has quit [Quit: Computer has gone to sleep.]
dsabanin has quit [Client Quit]
<realDAB>
breakingthings: attr_* has no implications for class variables, though
<breakingthings>
realDAB: truth
ozgura has joined #ruby
mikurubeam has joined #ruby
<breakingthings>
which i can only assume is why he came to that conclusion, seeing that he could access @@variable but not @variable which didn't have an attr_
<breakingthings>
so yeah
<breakingthings>
makes sense.
<Sicp>
no, I am unable to access either
<breakingthings>
oh. ok.
<breakingthings>
well, post code.
<breakingthings>
gist dat ish
<Hanmac>
Sicp: each class is an instance of the class Class ... each module is an instance of the class Module ... Class interits from Module and Module inherits from Object, so that means each class and each module are instances and so objects too :P
aLeSD has quit [Remote host closed the connection]
<Sicp>
but my problem is not with the concept, it's with the symbols that prefix what I want to declare
<Sicp>
I want to declare it in such a way that it belongs to the class solely, and is accessible solely from the class, without the need for setters (of course)
<Sicp>
outside of that class, it would have to have a set/get and etc.
<realDAB>
Sicp: what breakingthings said (post some code)
<breakingthings>
!help
<breakingthings>
…whatever it is
<Sicp>
not yet
<Sicp>
I feel that that's the giving up part :P
<Sicp>
sorry
<realDAB>
Sicp: it's the getting help part
<Hanmac>
Sicp the secret is that you can use instance variables on class too so that they only are setted for one class and not for the children
<breakingthings>
if by "giving up" you mean us, then yes.
jarsen has joined #ruby
<breakingthings>
code ain't a spelling bee.
<Sicp>
true
sambao21 has joined #ruby
blaxter has quit [Ping timeout: 246 seconds]
nomenkun has quit [Remote host closed the connection]
<apeiros_>
easier than ['(',')','a','b','+','*',',']
<Sicp>
so that I can know when to quit, havenwood
<apeiros_>
Sicp: `loop do … break if reaction == :quit` - my CS prof would call that "a badly formulated exit condition"
Neomex has joined #ruby
Neomex has quit [Client Quit]
<apeiros_>
`reaction = :not_quit; until reaction == :quit …`
mikurubeam has joined #ruby
Neomex has joined #ruby
<havenwood>
Sicp: Nicer to not use explicit return unless necessary, there you can just do `:quit` and it will be functionally the same.
<apeiros_>
alternatively `begin … end until reaction == :quit` - then you don't even have to initialize it with a non-exiting value
<Hanmac>
info about parse: you shoule remove the " " at def parse .... "def parse (input)" => "def parse(input)" or "def parse input" ... otherwise it can bite you in your back
pavilionXP has quit [Read error: Connection reset by peer]
<Hanmac>
hm ok it is not sooo bad at the def, but on other places it is
lancepantz_ is now known as lancepantz
bordicon has quit [Read error: Connection reset by peer]
<DaniG2k>
if anyone is willing to help I'll step you through where the error is
<DaniG2k>
it's long, I realize -_-
s1n4 has joined #ruby
sambao21 has joined #ruby
ebobby has joined #ruby
tenmilestereo has joined #ruby
<Spooner_>
DaniG2k, You could take advantage of inheritance to not keep repeating the same methods ;)
whowantstolivef1 has joined #ruby
osgux has quit [Quit: Page closed]
hiroyuki has joined #ruby
<Sicp>
what's the character for space?
<Spooner_>
DaniG2k, But still, that is a lot of code to throw at us. Can you narrow it down to a bit less?
<Sicp>
\s
jon_w has joined #ruby
<Hanmac>
sicp thats an regex character class ... that means that is more than one char
<DaniG2k>
Spooner_: its an exercise. the exercise is to use double dispatches, which is a more pure form of OOP than doing a bunch of if elsif else cases
TooTubular has joined #ruby
<DaniG2k>
Spooner_: yeah I can narrow it down. If you load it into an irb, I'll show you where the problem is and explain what it is that I cannot figure out
<Spooner_>
Just point me at the lines in question and actually...ask a question.
<DaniG2k>
ok
<DaniG2k>
if I run something like i = Intersect.new(LineSegment.new(-1.0,-2.0,3.0,4.0), LineSegment.new(3.0,4.0,-1.0,-2.0))
<UberNerdGirl>
and his chapter on Ruby self-awareness and existentialism is fascinating
<UberNerdGirl>
Firespore: who cares about my gender
sailias has quit [Read error: Operation timed out]
<Firespore>
Ah, so you are a female
zeade has quit [Quit: Leaving.]
<UberNerdGirl>
why?
<Firespore>
Female on the internet say "Who cares about my gender?".
<Firespore>
Carry on.
<breakingthings>
I have both parts.
<havenwood>
UberNerdGirl: Woah, definitely need to read it. That sounds fascinating.
zeade has joined #ruby
freezey has quit [Remote host closed the connection]
<Firespore>
So can anyone help me with this cinch bot framework?
<UberNerdGirl>
Firespore: relax. girls exist. take a chill pill
<UberNerdGirl>
Firespore: one day, you may meet them also. Have faith.
mattbl has joined #ruby
<Firespore>
Girls don't exist on the internet. Girls are men, and children are FBI agents.
<Spooner_>
UberNerdGirl, You need to check your chat log more often. He's long gone ;)
* UberNerdGirl
is heartbroken
* UberNerdGirl
weeps forlornly
freerobby has joined #ruby
axl_ has joined #ruby
* Firespore
slaps UberNerdGirl
<Firespore>
Get it together
<UberNerdGirl>
Spooner_: wish there is a way you can send me an SMS to my google voice
arturaz has joined #ruby
<UberNerdGirl>
Firespore: really, take a chill pill or xanax. Or else I m going to sic banisterfiend on you
<UberNerdGirl>
he's got my back
<lectrick>
When I call "Float(5)", where is that Float method defined?
<Firespore>
???
<aedorn>
mmm xannax ...
<UberNerdGirl>
anyway, how do people here like to express Infinity?
<aedorn>
It's like 6 shots, and 4 beers in a small pill
<Spooner_>
Float::INFINITY has done it for us since 1.9
jgarvey has quit [Quit: Leaving]
hoens has joined #ruby
<lectrick>
UberNerdGirl: I have something I do in projects like this: Infinity = 1.0/0
<havenwood>
+1 Float::INFINITY
<Firespore>
lectrick, it's usually defined somewhere higher up in the lines of the code. If it isn't, define it but being that you are calling a "float" method it should already be pre-defined to my understanding
<UberNerdGirl>
why do I feel 1.0/0 is more preferable?
<UberNerdGirl>
why do I feel it is… slightly more… pulchritudinous ?
<lectrick>
UberNerdGirl: Because you are like me and like readable concise English and simple math. :)
<Spooner_>
We needed to manually do 1.0 / 0.0 in 1.8 because no-one thought it was important to play with infinity. Now we are grown up ;)
<lectrick>
If you want to you can namespace it with Float::Infinity = 1.0/0
<havenwood>
UberNerdGirl: I'm torn, but just a little. 1.0/0 is short and sweet, but since I found out there was a Float::INFINITY that is what I use now.
ArchBeOS has quit [Remote host closed the connection]
<lectrick>
but I hardly think a global "Infinity" constant is going to clash with something else
<lectrick>
Spooner_: UberNerdGirl: The sexy thing is you can do... whatever you please. :)
<UberNerdGirl>
the notion of dividing anything by 0 is a dark, forbidden land of Nil and Nod and netherthoughts.
<breakingthings>
doesn't 1.0/0 not actually equal infinity
<havenwood>
∞ = 1.0/0
<havenwood>
done.
swingha has quit [Quit: WeeChat 0.4.0]
<lectrick>
lol FINITY
emergion has quit [Client Quit]
scudelletti__ has quit [Remote host closed the connection]
<havenwood>
<breakingthings>
so 1.0/0 is… unsexy
<lectrick>
damn you, irb console. it won't take ∞
hse-hoens has joined #ruby
<banisterfiend>
UberNerdGirl: in the beginning was the scream, who begat love, who begat man, who begat G-d, who begat nothing, never never never, trembling featherless elbows in the nests filth
<`p>
<lectrick>
unsexy? what is sexier than division by zero? that's supposed to be impossible, and yet that makes it entirely probable
<breakingthings>
lectrick: but it's not really
<UberNerdGirl>
lectrick: i concur
<breakingthings>
ruby is shielding back the breaking timespace
<lectrick>
I like making ruby work
<banisterfiend>
UberNerdGirl: ted hughes :)
<breakingthings>
every time someone performs 1.0/0, a planet is demoted to a dwarf planet
<breakingthings>
Do you hate pluto?
geggam_wk has quit [Ping timeout: 252 seconds]
<lectrick>
LOL
<UberNerdGirl>
i think if i were to transcend pitiable bounds of physics, I would choose my death - dividing by zero, literally, and I vanish into the ether
geggam_wk has joined #ruby
* Hanmac
liked pluto as a planet :(
<UberNerdGirl>
banisterfiend: i wrote my English PhD admissions paper on Ted Hughes
<gchristensen>
apeiros_: I suppose my ignorance is showing :) I was suspecting it wouldbe possible to direct it at a custom gem server.
kpshek has quit []
<havenwood>
banisterfiend: Delicious poem, but couldn't resist the urge to DRY it up a bit. :P puts %w[Blood Eye Fear Wing Bone Granite Violet Guitar Sweat Adam Mary God Nothing Never].map { |begotten| "Who begat #{begotten}" }
<UberNerdGirl>
havenwood: oh you are so delightful!
gchristensen has left #ruby ["WeeChat 0.4.0"]
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
markalanevans has joined #ruby
<tay1>
how do i add an element to an array of hash in a loop?
<tay1>
im just trying to learn nokogiri so i wanted to parse a simple site (craigslist about page) and get a list of cities and the url
<Firespore>
tay1, nokogiri should be fine
<tay1>
i figured it should be simple enough. i can parse it individually but not all of them at once
|stef_204| has joined #ruby
<UberNerdGirl>
havenwood: %w[Blood Eye Fear Wing Bone Granite Violet Guitar Sweat Adam Mary God Nothing Never].map { |begotten| "Who begat #{begotten}" }.join(",") + ("never " * 3)
|stef_204| has quit [Read error: Connection reset by peer]
<UberNerdGirl>
oops, mine is really messy and ghastly!
<UberNerdGirl>
sorry!
mikurubeam has quit [Read error: Connection reset by peer]
<Hanmac>
tay1 cities should be an Array not a Hash, or did you plan something with the hash?
<Spooner_>
Oh no, #ruby becomes the home of the beat poets!
<Firespore>
UberNerdGirl, it isn't messy really.
danneu has quit [Quit: WeeChat 0.3.8]
<Firespore>
You should see my first perl scripts
<tay1>
well i figured each city has an url so shouldnt that be in a hash?
gabot has left #ruby [#ruby]
<Firespore>
Those are messy
wmoxam has quit [Ping timeout: 245 seconds]
<tay1>
im still new to ruby so im trying to understand that as well.
<Firespore>
tay1, Yeah
<Firespore>
tay1, If it's in the url, it's also in the hash
<tay1>
so i figured best would be to have an array of hash right?
<Firespore>
i'd say that's a good idea
<havenwood>
UberNerdGirl: I'm a he (if you meant me?). My parents named me Shannon, but they didn't know it is usually a girl's name. >.>
<tay1>
yeah so thats waht i tried to do cause on irb i tried doing it manually
<UberNerdGirl>
OMG!
<UberNerdGirl>
All this time I thought you were a she!
<havenwood>
Never really got too much grief for Shannon. Actually dated a Shannon in high school.
<tay1>
like if i did cities[1] = { :name => "New York" :url => "newyork.craigslist.com" }
<tay1>
it works
* UberNerdGirl
feels very sheepish!
<Spooner_>
tay1, Well, you should use li_doc.each_with_index do |link, i| rather than manually playing with i and citires should be an Array (it contains hashes, it isn't a Hash itself).
<breakingthings>
havenwood: it's a male name as well.
<havenwood>
UberNerdGirl: Haha! Didn't realize that until you called me she!
<UberNerdGirl>
haha!
<UberNerdGirl>
hahahaha!
dmonjo has joined #ruby
<UberNerdGirl>
well i identify as girl or boy (seriously) depending on my mood
<dmonjo>
helo
<dmonjo>
is there a libshout library in ruby?
<havenwood>
UberNerdGirl: I identify as an algorithm!
<banisterfiend>
UberNerdGirl: weird looking boy
maxmanders has quit [Ping timeout: 252 seconds]
stef_204 has quit [Ping timeout: 255 seconds]
huoxito has joined #ruby
DaniG2k has left #ruby [#ruby]
<UberNerdGirl>
havenwood: if i were an algorithm, trust me:
<tay1>
i changed it a bit
Rudd-XXX has joined #ruby
<UberNerdGirl>
I WOULD BE THE A-STAR ALGORITHM!!!!!!!!!!!!!!!!!!!!
<UberNerdGirl>
:D
<UberNerdGirl>
:D :D :D :D :D
icole has quit [Remote host closed the connection]
zcreative has joined #ruby
s0ber has quit [Read error: Connection reset by peer]
kpshek has joined #ruby
<tay1>
but not sure how to add to the array
jbueza has quit [Quit: Leaving.]
samuel02 has quit [Remote host closed the connection]
spider-mario has quit [Remote host closed the connection]
<swarley>
I would be a naive fibbonacci implementation
<tay1>
check the updated gist
<Spooner_>
tay1, It is a hash, not an array. Should do cities = [] and then cities << { ... } in the loop.
<Spooner_>
tay1, You didn't read what I suggested.
s0ber has joined #ruby
dmonjo has left #ruby ["Leaving"]
<tay1>
yeah i did it as an array
<tay1>
check the updated gist
<UberNerdGirl>
swarley: what is the naive fibo?
<Spooner_>
each_with_index will give you: |link, i|
maxmanders has joined #ruby
<Spooner_>
So you don't need to declare or increment i outside.
BadDesign has quit [Read error: Connection reset by peer]
<tay1>
oh sorry i took out the increment
<tay1>
forgot to update that part
<swarley>
a very inefficient algorithm
<Hanmac>
havenwood: so you dated a girl that has the same name as you?, image how funy it would be if you marry she, so that both of you have same first and same surename :PP
<Spooner_>
tay1, We usually use [] and {} rather than Array.new or Hash.new unless we need to pass parameters to it.
<UberNerdGirl>
HHAHAHHAHAHAHAAH
yashshah has quit [Read error: Connection reset by peer]
<swarley>
implementation*
<Sicp>
I can simply treat an array like a stack; push/pop
carlyle has quit [Remote host closed the connection]
etcetera has quit []
<UberNerdGirl>
Hanmac: that is so funny!
<swarley>
Hash.new and Array.new are actually slower
<UberNerdGirl>
Hanmac: their names would be repetitive, when we should adhere to DRY!
<havenwood>
Hanmac: Hehe, yeah they actually called us the Shani (pronounced shan-eye)...
authenticity25 has quit [Quit: authenticity25]
<tay1>
ohok
<UberNerdGirl>
Shannon ____ * 2
<tay1>
can you check the gist , i pasted the output
<tay1>
is that how the correct out put should be but i dont see the index
<havenwood>
And then of course we'd have to name any kids Shannon as well...
<Spooner_>
tay1, You are still declaring i manually. Also, not using |link, i| as I suggested.
<havenwood>
And pets. :P
<tay1>
oh im not using i
<tay1>
ill take thato ut
<Spooner_>
Oh, that is true now. Silly me.
nga4 has quit []
<tay1>
should i do cities[i] or cities <<
swounding60 has joined #ruby
<Spooner_>
cities <<
<tay1>
i assume either should work
<tay1>
okay thats waht im using
<tay1>
can you check the output i pasted?
jbueza has joined #ruby
<Spooner_>
cities[i] would work, but it is easier just to use a stack.
etcetera has joined #ruby
<Hanmac>
UberNerdGirl & havenwood: i think the state would not be amused if two persons with the same name would life in the same house :P
<tay1>
that looks correct right?
brhelwig has joined #ruby
<UberNerdGirl>
Hanmac and, if one were very angry at the other, one could simply steal the other's credit card!!!
<Hanmac>
UberNerdGirl: did you read the books of Terry Pratchett? there was a Fammily of Buttlers and Servants for evil Scientists or other like Vampires and Werewolfs, and all called Igor to avoid confusion :P
<tay1>
cool. thanks
endzyme has quit [Remote host closed the connection]
<Spooner_>
tay1, Note that #{} automatically does to_s for you.
<apeiros_>
Spooner_: cities.each {|c| puts c } -> puts cities
<tay1>
ohok
* Firespore
licks UberNerdGirl
<Firespore>
Your ruby skills are admirable
cearls has quit [Remote host closed the connection]
<apeiros_>
Spooner_: also take_while :)
wolcanus has joined #ruby
<UberNerdGirl>
eugh
<UberNerdGirl>
that is so sick
<Spooner_>
apeiros_, Well, OK, you could do that, but I'm guessing that a real implementation would want to format the output.
* UberNerdGirl
vomits vile on Firespore , watching his skin sizzle and fall to the ground, revealing flesh and bone
<apeiros_>
Spooner_: hm?
<Firespore>
vile
<apeiros_>
UberNerdGirl: please behave. Firespore, you too.
<UberNerdGirl>
s/vile/bile
freerobby has quit [Quit: Leaving.]
<apeiros_>
Spooner_: take_while, then map
yashshah has joined #ruby
<Spooner_>
apeiros_, And take_while doesn't work, since tay1 wants everything up to and including a certain city. If the break was before the push, take_while would work fine.
<apeiros_>
ah, that's a problem (the including part)
picca has joined #ruby
<UberNerdGirl>
no way
<UberNerdGirl>
I am exonerated
etcetera has quit []
Tricon has quit [Ping timeout: 260 seconds]
<Spooner_>
apeiros_, I mean that a more sensible output might be cities.each {|c| puts "name: #{c[:name]} url: #{c[:url]}" } so it makes sense to move that way rather than use the most optimised code that doesn't easily allow that change.
endzyme has joined #ruby
<UberNerdGirl>
Spooner_: it's called 25_blahblahblah...
<UberNerdGirl>
sorry, that was spposed to be a PM
<apeiros_>
Spooner_: well, if you're after sensible, then it should be classes :)
<apeiros_>
and then mapping and printing are separate anyway
jacobjuul has joined #ruby
<Spooner_>
apeiros_, Yeah and that is what we should be suggesting to someone who doesn't know the differences between Hashes and Arrays :P
* apeiros_
wonders whether node_a..node_b would work with nokogiri nodes…
Firespore has quit [Changing host]
Firespore has joined #ruby
<apeiros_>
Spooner_: yupp. hammer-time!
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
pen has joined #ruby
jacobjuul has left #ruby [#ruby]
Goles has quit [Quit: Computer has gone to sleep.]
<Hanmac>
apeiros_ ... depends ... i think it may be this freaky flipflop stuff
etcetera has joined #ruby
ffranz has quit [Quit: Leaving]
carraroj has quit [Quit: Konversation terminated!]
<apeiros_>
Hanmac: no, I mean ranges
arturaz has quit [Ping timeout: 252 seconds]
<apeiros_>
i.e. so you could iterate "from node until node"
davetherat has quit [Remote host closed the connection]
razibog has quit [Ping timeout: 264 seconds]
<Spooner_>
apeiros_, You can Range up anything with #succ, I think, but a node is not necessarily knowing its successor within the structure it is in.
davetherat has joined #ruby
picca has quit [Client Quit]
<apeiros_>
Spooner_: siblings
pencilcheck has quit [Ping timeout: 258 seconds]
brandon|work has quit [Ping timeout: 240 seconds]
<apeiros_>
question is whether a) Node has succ at all, and b) if it has, whether it's siblings or depth-first traverse
<Spooner_>
For example, if you get all the links, then that is different to all the links who match /\Afrog_/
<Spooner_>
Thus, it doesn't, as such, have a successor, since it can exist in different collections/result sets.
artofraw has quit [Remote host closed the connection]
Giorgio has joined #ruby
workmad3 has joined #ruby
Tricon has joined #ruby
<apeiros_>
Spooner_: you get that part wrong
forrest has quit [Quit: Leaving]
tommyvyo has quit [Quit:]
seich- has quit [Quit: See you guys later]
<apeiros_>
I don't know all rules which Range requires by heart, but even assuming it required that begin and end can meet through .succ (and I think it doesn't, but I'm fuzzy on the details), that'd still be easy enough to test
<apeiros_>
aha, Range would be another candidate for improved docs…
<Spooner_>
Oh my, a random check and Array..Array is valid!
<banisterfiend>
apeiros_: have you ever had to use custom ranges for your own objects
trend has quit [Ping timeout: 245 seconds]
jonahR has quit [Quit: jonahR]
eykosioux has joined #ruby
<banisterfiend>
ever wanted to*
Firespore has quit [Quit: a PENIS of unexpected length was received]
maligree has joined #ruby
<apeiros_>
Spooner_: I think it needs .succ and <=>
v0n has quit [Quit: WeeChat 0.4.0]
<apeiros_>
seems to be more though
<apeiros_>
now it complains about respond_to? :)
hadees has quit [Quit: hadees]
<Spooner_>
apeiros_, Fair enough. The problem is not so much its interface as whether or not it has fixed position, since you are often cherry-picking the tags.
brandon|work has joined #ruby
<apeiros_>
with (a..b), it first checks for to_str
<apeiros_>
Spooner_: as said, easy enough to test
<apeiros_>
html (after dom is repared) and xml are well defined with regards to that
<Spooner_>
I'm sure it is easy enough to implement if the node should know its position.
Bosox20051 has quit [Quit: Leaving]
mootpointer has joined #ruby
<apeiros_>
errr, it definitively should
<apeiros_>
no dom manipulation otherwise :-p
<apeiros_>
and it I know that in nokogiri does
generalissimo has quit [Remote host closed the connection]
jpcamara_ has quit [Quit: jpcamara_]
etcetera has quit [Ping timeout: 264 seconds]
jjbohn has joined #ruby
<Spooner_>
Yes, but its place in the dom (or even if it is in the dom) can change, which makes ranges floppy.
<Eiam>
guys, help, I'm being pulled back into Python world! ;)
<Eiam>
we are going to deploy some Plone thing
<apeiros_>
Spooner_: ever tried to manipulate a hash during iteration?
<apeiros_>
Spooner_: you're drawing up solved problems
<apeiros_>
Eiam: have fun
<Spooner_>
OK, fair enough.
<apeiros_>
hehe, Array#inspect fails if it contains BasicObject instances
etcetera has joined #ruby
icole has joined #ruby
mmitchell has quit [Ping timeout: 258 seconds]
thams has joined #ruby
hmarr has quit []
wyhaines has joined #ruby
colonolGron has quit [Quit: leaving]
geggam_wk has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
sambio has quit [Remote host closed the connection]
sambio has joined #ruby
wyhaines has quit [Remote host closed the connection]
grenzr has quit [Quit: grenzr]
yshh has quit [Read error: Connection reset by peer]
<Hanmac>
apeiros_ what did you think about the error message: "undef leaked to the Ruby space" ? :D i found it in the ruby code :P
<apeiros_>
Hanmac: for Qundef?
<banisterfiend>
Hanmac: wow how did you get that error?
<apeiros_>
interesting guard
<Hanmac>
yeah :P
yshh has joined #ruby
<Hanmac>
banisterfiend i didnt get it, i only find it
<apeiros_>
probably sensible. but my C sucks :)
cantonic has quit [Quit: cantonic]
dash_ has joined #ruby
gyre007 has quit [Ping timeout: 272 seconds]
jjbohn has quit [Ping timeout: 245 seconds]
lancepantz is now known as lancepantz_
mfridh has quit [Read error: Operation timed out]
codecop has quit [Remote host closed the connection]
<Hanmac>
what i also like is :"method `%s' called on unexpected %s object" :D
huoxito has quit [Ping timeout: 258 seconds]
seich- has joined #ruby
<sam113101>
>> b['b']
<eval-in>
sam113101 => /tmp/execpad-476c76f6a88d/source-476c76f6a88d:2:in `<main>': undefined local variable or method `b' for main:Object (NameError) (http://eval.in/13098)
failshell has quit [Remote host closed the connection]
tealmage has quit [Remote host closed the connection]
alanp_ has joined #ruby
anonymuse has quit [Quit: Leaving...]
Davey_ has joined #ruby
vlad_starkov has joined #ruby
<Sicp>
so I've got my input.each_char do |single_char|
thams has joined #ruby
Inside has joined #ruby
osgux has joined #ruby
<osgux>
Hi!
<Sicp>
it's reading the input String, char by char and it does it from end to beginning
<osgux>
again..
<Sicp>
I want it to read the String, char by char by from right to left
<osgux>
i have this problem with rake
<osgux>
ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task'
<Sicp>
I mean left to right, sorry
Sep1 has joined #ruby
alanp has quit [Ping timeout: 264 seconds]
tommyvyo has quit [Quit:]
<Sep1>
hi guys, can I ask you for a little help? I have a string like this: " $199.00 " and I would get 199.00. I am trying to find a regexp that would remove from string everything except numbers and "." … any tip how to make this regexp? Thank you
vlad_starkov has quit [Ping timeout: 245 seconds]
tealmage has joined #ruby
<aedorn>
Sep1: delete('^[0-9.]') ... you don't need regex for that.
ZachBeta has quit [Quit: Computer has gone to sleep.]
piotr_ has quit [Ping timeout: 245 seconds]
mootpointer has quit [Quit: Exit, pursued by a bear.]
<Sep1>
thank you!
dustint has quit [Quit: Leaving]
baroquebobcat has quit [Quit: baroquebobcat]
nfk has quit [Quit: yawn]
ZachBeta has joined #ruby
tcstar has quit [Remote host closed the connection]
angusiguess has joined #ruby
someone has joined #ruby
jdunck has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
someone is now known as Guest60916
rupee has quit [Ping timeout: 240 seconds]
jdunck has joined #ruby
AllStruck has quit [Ping timeout: 252 seconds]
adkron has joined #ruby
alanp_ is now known as alanp
jpcamara has quit [Quit: jpcamara]
AllStruck has joined #ruby
UberNerdGirl has quit [Quit: UberNerdGirl]
Hanmac has quit [Ping timeout: 252 seconds]
zeade has quit [Quit: Leaving.]
eliasp has quit [Quit: No Ping reply in 180 seconds.]
maletor has quit [Ping timeout: 252 seconds]
eliasp has joined #ruby
realDAB has joined #ruby
yashshah has quit [Read error: Connection reset by peer]
ArchBeOS has quit [Quit: Leaving]
yashshah has joined #ruby
maletor has joined #ruby
osgux has quit [Quit: Page closed]
Sicp has quit [Quit: Leaving]
UberNerdGirl has joined #ruby
jcsims has joined #ruby
jcsims has quit [Client Quit]
tmiller has joined #ruby
chrishough has quit [Quit: chrishough]
hasimo-t has quit [Remote host closed the connection]
slainer68 has quit [Remote host closed the connection]
Guest60916 is now known as [rupee]
hadees has quit [Quit: hadees]
hasimo-t has joined #ruby
Spooner_ has quit [Remote host closed the connection]
<MrZYX>
yes, on ruby2.0 it could be keyword arguments, depending on the method definition
<UberNerdGirl>
Ahoy, Spooner the saucy slattern!
<Eiam>
I belive its 1.9.3 only
<Eiam>
so why doesn't he have to say "certificate": "/path"
<MrZYX>
that would actually be invalid syntax in ruby
<Eiam>
sublime text doesn't like that syntax because it thinks there is a symbol
tish has quit [Quit: Leaving.]
<MrZYX>
foo: "bar" is another way to write :foo => "bar"
jjbohn has joined #ruby
<MrZYX>
there is a symbol
aaronmcadam has quit [Ping timeout: 260 seconds]
SecretAg1nt is now known as SecretAgent
<Eiam>
MrZYX: oh please tell me you are kidding
<Eiam>
foo: is still a symbol?
<MrZYX>
yes
<Eiam>
god damnit ruby
<Eiam>
stop being so damn open and just pick a convention and stick with it
Faris has joined #ruby
<shevy>
hehe
xardas has quit [Ping timeout: 260 seconds]
<shevy>
Eiam foo: came later
<shevy>
internally it is still :foo
youdontmeanmuch has quit [Read error: Connection reset by peer]
<shevy>
I recommend to everyone to never use foo:
* UberNerdGirl
drove her shevy to the levy but the levy was dry.
<MrZYX>
gonna be a hard time on 2.0 shevy
Tricon has joined #ruby
<Eiam>
so he could have written that as method({ :certificate => "path"}), or method( certificate: "path") or method("certificate" => "path") or method({"certificate"=>"path"}) ?
rwilcox has quit []
Giorgio has quit [Remote host closed the connection]
<MrZYX>
:certificate => "path" and "certificate" => "path" is not the same
<breakingthings>
not that I know the particular method you are looking at but… what Zyx said
jamesfung14 has joined #ruby
dEPY has quit []
<breakingthings>
:cert => "path" is eq to cert: "path"
chipotle_ has joined #ruby
<breakingthings>
thassit.
<Eiam>
right but because its the last entry in the method