dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Hawkeye_ has quit [Remote host closed the connection]
jonr22 has quit [Ping timeout: 252 seconds]
davidhq has joined #ruby
millerti has joined #ruby
JDiPierro has joined #ruby
ajsdklfjalksdf has quit [Quit: ajsdklfjalksdf]
starless has joined #ruby
Jiyuhen has quit [Remote host closed the connection]
markholmes has joined #ruby
Rayford has joined #ruby
JDiPierro has quit [Ping timeout: 252 seconds]
CpuID has quit [Ping timeout: 264 seconds]
ndrei has quit [Ping timeout: 256 seconds]
xxneolithicxx has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Seich has quit [Ping timeout: 256 seconds]
ndrei has joined #ruby
Stalkr_ has quit [Quit: Leaving...]
Musashi007 has quit [Quit: Musashi007]
waxjar has joined #ruby
paradisaeidae has joined #ruby
izzol has joined #ruby
ghr has joined #ruby
Seich has joined #ruby
a1fa has left #ruby [#ruby]
lys has joined #ruby
kaleido has quit [Ping timeout: 244 seconds]
Jiyuhen has joined #ruby
purple1 has quit [Ping timeout: 256 seconds]
izzol has quit [Ping timeout: 252 seconds]
purple1 has joined #ruby
sevvie has quit [Ping timeout: 265 seconds]
ghr has quit [Ping timeout: 252 seconds]
Xoro has joined #ruby
Xoro has quit [Max SendQ exceeded]
Xoro has joined #ruby
<purple1>
Hello
sevvie has joined #ruby
<purple1>
It looks quiet.
<purple1>
I want to know why ruby is not usually included with linux as is perl or python.
dtordable has quit [Quit: • IRcap • 8.72 •]
juanpablo_ has joined #ruby
<havenwood>
purple1: Ruby does ship with many distros. Perl has been around longer.
<xxneolithicxx>
what core linux system tools/components that you know of are written in ruby compared to the other two?
Zai00 has quit [Ping timeout: 272 seconds]
<purple1>
Ubuntu is mostly python.
<xxneolithicxx>
that and its really a relative question because any distro could bundle it but they dont because its not really a dependency for any core thing in the system and you have to consider OS size and default packages from an installation perspective and media distribution perspective
<xxneolithicxx>
I dont know if ruby is on the default ISOs but those are things that go into deciding whats included by default
<jhass>
purple1: it's because most distros ship some tool that depends on either
<purple1>
The core tools are usually compiled using gcc.
<jhass>
an arch base install doesn't come with python for example
Zai00 has joined #ruby
juanpablo_ has quit [Ping timeout: 245 seconds]
freerobby has quit [Quit: Leaving.]
dfinninger has joined #ruby
felixjet has joined #ruby
hpoydar has joined #ruby
alphaatom has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
baweaver has quit [Remote host closed the connection]
milesmatthias has joined #ruby
Zai00 has quit [Quit: Zai00]
baweaver has joined #ruby
dfinninger has quit [Ping timeout: 252 seconds]
wallerdev has quit [Quit: wallerdev]
milesmatthias has quit [Remote host closed the connection]
hpoydar has quit [Ping timeout: 250 seconds]
milesmatthias has joined #ruby
<Senjai>
Theres usually a build essential
<Senjai>
on every os
<Senjai>
s/os/linux distro
mengu has quit [Ping timeout: 265 seconds]
baweaver has quit [Ping timeout: 256 seconds]
chrishou_ has joined #ruby
chrishough has quit [Read error: Connection reset by peer]
willharrison has joined #ruby
deric_skibotn has joined #ruby
milesmatthias has quit [Ping timeout: 250 seconds]
<weaksauce>
aiguu I just don't follow the logic that "" would be faster. I know the tests say that they are both about the same but '' should in theory do less work
amclain_ has joined #ruby
xcesariox has quit [Client Quit]
<weaksauce>
so I could see the conventional wisdom saying that '' is faster
<weaksauce>
regardless of actual veracity
<aiguu>
that's true from our perspective, but I think internally they make a change from '' to "" somewhere
<weaksauce>
interesting
<BraddPitt>
does anyone know the reasoning behind not being able to use string interpolation with single quote
<aiguu>
plus github style guides go against the '' grain: "Use double-quoted strings. Interpolation and escaped characters will always work without a delimiter change, and ' is a lot more common than " in string literals."
<helpa>
Hi Crazy_Atheist. We in #ruby would really appreciate it if you did not use pastebin during your time with us.
<helpa>
Pastebin is not good because it loads slowly for most, has ads which are distracting and has terrible formatting. Please use Gist (http://gist.github.com) or Pastie (http://pastie.org) instead. Thanks!
Takle has quit [Remote host closed the connection]
Takle has joined #ruby
hardlin3r has joined #ruby
lkba has joined #ruby
<hanmac>
shevy currently i am no coding, currently i play magic with Forge (magic emulator) but recenty i did a commit again for rwx adding a new control that is in wx trunk
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
exadeci has joined #ruby
<apeiros>
magic the gathering?
Takle has quit [Ping timeout: 252 seconds]
astrobunny has joined #ruby
milesmatthias has joined #ruby
riotjone_ has joined #ruby
Hirzu has joined #ruby
astrobunny has quit [Ping timeout: 252 seconds]
milesmat_ has joined #ruby
milesmatthias has quit [Ping timeout: 252 seconds]
cool has quit [Quit: Connection closed for inactivity]
Morkel has joined #ruby
Zai00 has joined #ruby
Hirzu has quit [Ping timeout: 246 seconds]
AlexRussia has quit [Ping timeout: 250 seconds]
riotjone_ has quit [Ping timeout: 264 seconds]
milesmat_ has quit [Ping timeout: 246 seconds]
nonks has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
DerisiveLogic has joined #ruby
bonhoeffer has joined #ruby
Pharaoh2_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Versality has joined #ruby
DerisiveLogic has quit [Ping timeout: 256 seconds]
User458764 has joined #ruby
nfk has joined #ruby
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mark[oz] has joined #ruby
jimms has joined #ruby
SOLDIERz has quit [Quit: Be back later ...]
MatthewsFace has joined #ruby
anaeem1 has joined #ruby
mikecmpbll has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 1.1.1]
Pharaoh2 has joined #ruby
Timgauthier has joined #ruby
relix has joined #ruby
freerobby has joined #ruby
RegulationD has joined #ruby
MatthewsFace has quit [Ping timeout: 246 seconds]
Timgauthier has quit [Read error: Connection reset by peer]
ghostpl_ has quit [Remote host closed the connection]
Hirzu has quit [Ping timeout: 256 seconds]
ghostpl_ has joined #ruby
renier has joined #ruby
rajeshchawla has quit [Ping timeout: 264 seconds]
renier_ has quit [Ping timeout: 245 seconds]
reinaldob has joined #ruby
Crazy_Atheist has quit [Ping timeout: 252 seconds]
RegulationD has quit [Ping timeout: 252 seconds]
bentanweihao has joined #ruby
V_Ve has joined #ruby
hpoydar has joined #ruby
V_Ve has quit [Client Quit]
hanmac has quit [Remote host closed the connection]
<shevy>
arup_r I use it! but there is not much you can do with it is there ... https://rubygems.org/gems/ftp_paradise one day I have to finish the ruby-gnome bindings for a graphical client
reinaldob has quit [Ping timeout: 252 seconds]
ChatStat has joined #ruby
<shevy>
arup_r you can rescue those errors
<shevy>
also try with different ftp hosts, some behave faulty
sankaber has joined #ruby
ChatStat is now known as ChanSert
_maes_ has joined #ruby
reinaldob has joined #ruby
xenokiller has joined #ruby
<ChanSert>
I am ChanServ under dissicues made by: Maryoky
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
sevvie has quit [Ping timeout: 245 seconds]
thumpba has joined #ruby
Crazy_Atheist has joined #ruby
ChanSert has quit [Client Quit]
<jhass>
what was that...
<arup_r>
shevy: what should I do after rescuing it.. what will be the action... ? I even don't know what those number means ?
<shevy>
depends on the error no? :)
hpoydar has quit [Ping timeout: 265 seconds]
<shevy>
I am sure they are written down in some boring ftp protocol
<arup_r>
jhass: someone probably trying to hijack ChanServ
tkuchiki has joined #ruby
<arup_r>
shevy: no idea.. but you are right
<shevy>
arup_r your code is not good, it is linear. it is simple and makes assumptions that will fail or break
<shevy>
you need to include handling errors
<shevy>
it might be best for you to write a wrapper over ruby ftp that you can then use
martinbmadsen has joined #ruby
<shevy>
that's what I did with ftp_paradise, I got annoyed having to use the raw ruby ftp stuff
zotherstupidguy has joined #ruby
<shevy>
I don't rescue all errors... one I do is Net::FTPPermError
<shevy>
another one is Net::FTPConnectionError
<shevy>
Net::ReadTimeout may also happen
<shevy>
hahaha :D
<shevy>
net connection errors kind of stink
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
there are literally like 20 different ways how a script can fail
<apeiros>
only 20?
<shevy>
I wrote a ruby script that runs in a loop, scanning a remote forum for login events
xenokiller has quit [Ping timeout: 272 seconds]
sevvie has joined #ruby
<shevy>
my connection can break down; the remote website can be unavailable even when my connection is up; my filesystem may be corrupted or where my logfiles are stored may also not work. oddest error was a Zlib::Buffer error though
<shevy>
Zlib::BufError
Pharaoh2 has joined #ruby
<zotherstupidguy>
shevy what did u use?
milesmatthias has quit [Ping timeout: 246 seconds]
<apeiros>
should have called that BuffError, for the intersect (BuffEr, Error)
nonks has quit [Ping timeout: 272 seconds]
<jhass>
apeiros: nope, that's no exception. Errno::ESHEVYNOTCONFUSED is it
<shevy>
use? ruby... and open-uri
riotjones has quit [Ping timeout: 255 seconds]
<apeiros>
jhass: hmmm
MatthewsFace has joined #ruby
<zotherstupidguy>
nokogiri?
<apeiros>
jhass: maybe somebody abused exceptions for flow control
<shevy>
nah, I am XML free since a decade
<jhass>
probably
<jhass>
don't we all do that sometimes
martinbmadsen has quit [Ping timeout: 264 seconds]
<zotherstupidguy>
i once did a similar fun project for the german department of higher education, something about listing all their courses using webscraping patterns, as they didnt have an api
hanmac has joined #ruby
<shevy>
how many different errors did you have to handle?
<zotherstupidguy>
actually once i got the patterns right, none.
<zotherstupidguy>
just figure out the paths and DOM, and iterate
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<apeiros>
zotherstupidguy: reliable government pages? did I end up in a parallel universe?
<zotherstupidguy>
i think i had to do a sleep somehwhere in there as the server might think i am attacking it
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zotherstupidguy>
i called it daadde exposed :)
jwinder has joined #ruby
User458764 has joined #ruby
bentanweihao has quit [Remote host closed the connection]
nii236 has joined #ruby
_mak has joined #ruby
bentanweihao has joined #ruby
SHyx0rmZ has quit [Remote host closed the connection]
<_mak>
I'm trying to parse a CSV file, and on the first line I have something like 123,"abc'def". I get the error 'Illegal quoting in line 1. (CSV::MalformedCSVError)'. I tried a lot of things I found online, but somehow I can't figure how to solve this.
<_mak>
I don't want to replace the ' char..
agrinb has joined #ruby
<_mak>
any ideas on what I could try?
robindunbarr has quit [Ping timeout: 250 seconds]
Pharaoh2 has joined #ruby
<zotherstupidguy>
_mak, gist?
<zotherstupidguy>
_mak obviously you want to escape it
brandly has quit [Remote host closed the connection]
Sawbones has quit [Remote host closed the connection]
centrx has joined #ruby
DerisiveLogic has joined #ruby
epistrephein has joined #ruby
Jiyuhen has quit [Read error: Connection reset by peer]
jimms has quit [Remote host closed the connection]
hpoydar has quit [Remote host closed the connection]
waxjar has joined #ruby
mikepack has quit [Remote host closed the connection]
havenwood has joined #ruby
bigmac has joined #ruby
thinkswan has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 264 seconds]
fenzil has quit [Quit: Leaving]
reinaldob has quit [Remote host closed the connection]
fenzil has joined #ruby
juanpablo_ has joined #ruby
n80 has quit [Quit: n80]
juanpablo_ has quit [Ping timeout: 255 seconds]
stef204 has joined #ruby
Guest48326 has quit [Ping timeout: 252 seconds]
Iniesta8 has joined #ruby
xpoqp has joined #ruby
Iniesta8 has quit [Max SendQ exceeded]
jonr22 has joined #ruby
Iniesta8 has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
<Crazy_Atheist>
hmm I want to be able to put a list of file names, but only their name, not their extensions, I know I need to be able to get them, which would be Dir.glob("*.extensioniwanttofind")
nii236 has joined #ruby
RegulationD has joined #ruby
kirun has joined #ruby
_KY_ has joined #ruby
Iniesta8 has quit [Client Quit]
<_KY_>
the ruby interpreter enters level 1 and stops printing results... how do I get out of that?
<arup_r>
so.. why Ruby made such crazy alias then ?
<shevy>
hmm
<arup_r>
.() is alias of .call but not []
elfuego has joined #ruby
<shevy>
when I have like 5000 files in a directory, I think Dir[] is a bit slow; is there a way to use C code to speed that up? "ls" in bash is so much faster than what I can come up with in ruby so far
<arup_r>
shevy: what about ::glob ?
<jhass>
Dir.entries would be closer to ls
ismaelga has joined #ruby
<jhass>
Dir::[] is a glob
kyrylo_ is now known as kyrylo
<arup_r>
oh.. I think they have differences
reinaldob has joined #ruby
<arup_r>
jhass:
<jhass>
and if you need the metadata there's an efficient syscall if you're lucky to have the right filesystem
Takle has quit [Remote host closed the connection]
<arup_r>
what's the syscall ?
<apeiros>
Dir[] is an alias of Dir.glob. the only difference is in syntax - [] methods can't take a block.
<shevy>
I don't think I knew ruby had a require 'shell'
<shevy>
shell(#<Th:0xb7f6199c>): warn: override definition of Shell::Filter#mkdir.
<shevy>
shell(#<Th:0xb7f6199c>): warn: alias Shell#mkdir to Shell::Filter#mkdir_org.
<shevy>
hmm
<shevy>
fatal: No live threads left. Deadlock?
Channel6 has joined #ruby
<shevy>
your code scares me havenwood
<arup_r>
apeiros: with Dir::[] we can't pass flags .. right ?
<arup_r>
but with ::glob we can
<apeiros>
arup_r: try it
zorak8 has quit [Ping timeout: 244 seconds]
<havenwood>
shevy: I want pancakes! (Also unrelated.) But for some fun try: Shell.install_system_commands
<arup_r>
ok.. I was wrong
fuzzyhorns2 has joined #ruby
<apeiros>
oh
<apeiros>
no, you're actually right arup_r
<apeiros>
I was wrong
<apeiros>
Dir[] is not an alias of Dir.glob
<arup_r>
:D
rubytor has joined #ruby
<apeiros>
from the docs: Dir[ string [, string ...] ] -> array - Equivalent to calling Dir.glob([string,...],0).
* arup_r
got confused by one Rubyist
<arup_r>
what's the end `0` ?
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
_64k has quit [Ping timeout: 272 seconds]
<apeiros>
that's your "no flags"
<arup_r>
ok.. yes yes..
<jhass>
arup_r: readdir
<arup_r>
why ?
enebo has quit [Quit: enebo]
bonhoeffer has joined #ruby
mikepack has joined #ruby
bonhoeffer has quit [Client Quit]
<arup_r>
I got it....... :D jhass :
hpoydar has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
<jhass>
it's a funny one
mikepack has quit [Remote host closed the connection]
<jhass>
returns you that dandy struct
<jhass>
of which you can use only one field reliably
mikepack has joined #ruby
<jhass>
and the other fields are populated or not depending on what FS you happen to run
bonhoeffer has joined #ruby
bigmac has quit [Ping timeout: 256 seconds]
epistrephein has joined #ruby
Sawbones has quit [Remote host closed the connection]
DLSteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
mikepack has quit [Ping timeout: 256 seconds]
hpoydar has quit [Ping timeout: 272 seconds]
Sawbones has joined #ruby
bigmac has joined #ruby
juanpablo_ has joined #ruby
thinkswan has joined #ruby
sevenseacat has quit [Remote host closed the connection]
noobda has joined #ruby
brandly has joined #ruby
<noobda>
hey all. So I come from C++. What should I select for my web app? Ruby or Python? Which would come more naturally to me?
brandly has quit [Remote host closed the connection]
sevvie has quit [Ping timeout: 245 seconds]
<jhass>
I think it makes no difference
Jiyuhen has joined #ruby
<jhass>
pick what you find more interesting
Limix has joined #ruby
User458764 has joined #ruby
juanpablo_ has quit [Ping timeout: 256 seconds]
enebo has joined #ruby
stef204 has joined #ruby
icebourg has joined #ruby
<noobda>
jhass: Okay well which has a more thriving community as of now?
chipotle has joined #ruby
<jhass>
python community seems a little bit bigger, though they're kinda divided between python 2 and 3 still
brandly has joined #ruby
<jhass>
ruby community for web stuff seems bigger
<jhass>
a lot more options here from what I can gather
<apeiros>
was just going to say the same
<noobda>
Well I only care about web stuff :)
bonhoeffer has quit [Quit: bonhoeffer]
<noobda>
I hope it's not dying because of Node or something like that?
<apeiros>
"it"? python and ruby? :)
<jhass>
that's just brogrammers trying to be important
<apeiros>
or does in that scenario only ruby die from node?
<jhass>
ruby won't die in the next 10 years
<jhass>
neither will python
<jhass>
and neither will node
<noobda>
I was told that Node mabe the future
<jhass>
or java
<jhass>
or anything
<noobda>
ohhh...
<apeiros>
I think cobol is the future
<noobda>
so development in Ruby is still being done right? Not just legacy maintenance stuff?
<jhass>
past, present, future. Cobol for life
<apeiros>
noobda: ruby is thriving.
<apeiros>
there's a healthy competition of web frameworks
<apeiros>
and rails is still the largest
<apeiros>
if you're after community size, you should go php, though
brandly has quit [Remote host closed the connection]
<apeiros>
(mind you: I do NOT recommend using php - php is cancer)
bonhoeffer has joined #ruby
<noobda>
yeah apeiros so I've been told
<jhass>
I wonder if we or python have outnumbered perl by now though
<apeiros>
I think that's the one thing ruby & python people mostly agree on
<rwz>
is there really a competition?
<rwz>
seems to me ruby web world is basically rails and some sinatra here and there
<rwz>
what other web frameworks being used?
<apeiros>
rwz: there's a good dozen well maintained web frameworks
<rwz>
like?
<noobda>
The thing is I live in a country like India. Where startups are not really encouraged. So I just want to make sure I have something to fall back on, a reliable job in the market, in case my idea burns out.
<jhass>
noobda: maybe learn both, what you will end up is being able to adapt to whatever is necessary in a given situation
bonhoeffer has quit [Read error: Connection reset by peer]
<jhass>
apeiros: they said rails is too much magic. And then came volt
<rwz>
I've been doing ruby rails development for about 7 years now and I almost never encounter anything besides rails/sinatra
<apeiros>
jhass: hehe
<rwz>
which meakes me kind of sad
<apeiros>
jhass: I'm experiencing that myself now. it's difficult to decide between boilerplate and magic
<rwz>
*makes
<nickjj>
i'm a fan of reasonable magic, i don't want to write heaps of boilerplate
<jhass>
apeiros: I just watched their demo video. Which was an entire climax of "wtf is happening there"
<apeiros>
at the moment I veer towards magic. given that anything you don't understand is magic. but I try to keep the code discoverable, so you can quickly understand the magic.
_KY_ has quit [Ping timeout: 246 seconds]
Rephiax has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
rajeshchawla has joined #ruby
leyluj has quit [Quit: Connection closed for inactivity]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rephiax__ has quit [Ping timeout: 264 seconds]
xcombelle has joined #ruby
mahmoudmahfouz has joined #ruby
mahmoudmahfouz has quit [Remote host closed the connection]
ndrei has quit [Remote host closed the connection]
<a5i>
Where is the directory of ruby verions?
starless has joined #ruby
milesmatthias has joined #ruby
<a5i>
versions*
rajeshchawla has quit [Ping timeout: 244 seconds]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
mikepack has joined #ruby
ronin has joined #ruby
<ronin>
im creating a todo list tool, would it be better to have some sort of object to include all sorts of tasks or just make a list construct where to put all the task objects?
<jhass>
a5i: what do you mean?
ndrei has joined #ruby
banister has joined #ruby
<jhass>
ronin: a collection object has the nice benefit of having a good place for operations that act on all items, see composite pattern. Whether your app needs that is on you to decide
sevvie has joined #ruby
reinaldob has quit [Remote host closed the connection]
milesmatthias has quit [Ping timeout: 265 seconds]
<ronin>
jhass, good point
tejasmanohar has joined #ruby
<a5i>
jhass: I need to use a specific ruby version for passenger in nginx
<a5i>
but Idk where exactly the directory for ruby 2.2.0 is
<a5i>
I installed it vuia rvm
<tejasmanohar>
i run `bundle install`. everytime, i restart my shell i lose my "bundle" of gems i guess, like i have to run it every time...
<jhass>
a5i: rvm info
<apeiros>
a5i: passenger tells you the precise path
reinaldob has joined #ruby
<apeiros>
and you should use that path
<tejasmanohar>
is this supposed to happen? on a new mac, not sure if im just not remembering how it worked before or what
<a5i>
apeiros: where?
<a5i>
does it tell
<apeiros>
a5i: when you install it
<tejasmanohar>
btw, ruby is installed via rvm at v2.2.1
<apeiros>
you use something like passenger-install-nginx (installed by the passenger gem) to install passenger in nginx. at the end it tells you the config, including the precise path.
AlexRussia has quit [Ping timeout: 255 seconds]
agrinb has joined #ruby
<a5i>
How can I find out again
<apeiros>
don't know. run the installation again?
ndrei has quit [Remote host closed the connection]
<apeiros>
tejasmanohar: doesn't sound like it should happen, no
mengu has quit [Ping timeout: 250 seconds]
kaspernj has joined #ruby
SouL has joined #ruby
eladmeidar has joined #ruby
<a5i>
apeiros, jhass: Message from application: You've set the `PassengerRuby` (Apache) or `passenger_ruby` (Nginx) option to '/usr/local/rvm/rubies/ruby-2.2.0/bin/ruby'. However, because you are using RVM, this is not allowed: the option must point to an RVM wrapper script, not a raw Ruby binary. This is because RVM is implemented through various environment
<a5i>
variables, which are set through the wrapper script.
<atmosx>
a5i: then either install passenger correctly or don't use it all (which is better IMHO)
<atmosx>
a5i: you run debian?
<a5i>
Yes
MatthewsFace has joined #ruby
<a5i>
and passenger is installed correctly
<atmosx>
a5i: you can use 'thin' server to launch your apps at boot.
iamjarvo has joined #ruby
<atmosx>
well if it doesn't work then something must be wrong right? :-)
<a5i>
I liked Passenger better tbh
<apeiros>
a5i: well, I suggest you replace that whole "Step Five — Install Passenger and Nginx" with passenger-install-nginx-module
<apeiros>
no idea why they recommend the other
<a5i>
sigh :(
<a5i>
will it overwrite what I ahve now?
kobain has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
aiguu has joined #ruby
<a5i>
have *
<havenwood>
apeiros: I guess that's probably to avoid having to rebuild the module every time the gem version is bumped.
iamjarvo has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
<havenwood>
The manual aspect of rebuilding and updating a conf file, at least.
babykosh has joined #ruby
<a5i>
I'm so damn confused now D:
<atmosx>
a5i: deploying and programming are two different things
babykosh has quit [Client Quit]
<atmosx>
you might excell at one of them and be happy abut it
Sawbones has quit [Remote host closed the connection]
basiclaser has quit [Quit: Connection closed for inactivity]
The_Phoenix has joined #ruby
<a5i>
What does that have todo with anything right now?
MatthewsFace has quit [Ping timeout: 252 seconds]
hardlin3r has joined #ruby
icebourg has quit []
bigmac has quit [Ping timeout: 256 seconds]
Sawbones has joined #ruby
jerematic has quit [Remote host closed the connection]
Sawbones has quit [Remote host closed the connection]
jerematic has joined #ruby
jerematic has quit [Remote host closed the connection]
epistrephein has quit []
<a5i>
yeah this isnt going to work if I already have everything set-up
fenzil has quit [Quit: Leaving]
iamjarvo_ has joined #ruby
Sawbones has joined #ruby
dfinninger has joined #ruby
Rephiax has quit []
superspring has quit [Ping timeout: 246 seconds]
iamjarvo has quit [Ping timeout: 256 seconds]
jasabella has joined #ruby
<jasabella>
hi there :) is there a good website or book for people who have some experience with programming who want to get started with RoR?
jottr has joined #ruby
steve-la_ has joined #ruby
nii236 has joined #ruby
superspring has joined #ruby
gregf has joined #ruby
<jhass>
jasabella: #RubyOnRails, rails 4 in action and railstutorial are generally recommended. if you have seen a web framework before, IMO guides.rubyonrails.org will get you up just fine too
nerium has quit [Quit: nerium]
sevvie has quit [Ping timeout: 272 seconds]
martinbmadsen has joined #ruby
sevvie has joined #ruby
<jasabella>
thanks
nii236 has quit [Ping timeout: 272 seconds]
plashchynski has joined #ruby
j_mcnally has joined #ruby
Sawbones has quit [Remote host closed the connection]
Musashi007 has joined #ruby
martinbmadsen has quit [Ping timeout: 246 seconds]
lemur has joined #ruby
zorak8 has joined #ruby
RegulationD has joined #ruby
mjuszczak has joined #ruby
<mjuszczak>
I have this which is working fine: blah = var.split('-').last
<mjuszczak>
but if I wanted to prepend or append addiitonal text to the value of blah, what's the best way to do that? Perhaps I want it to be prefixed by "foo"
bigmac has joined #ruby
<jhass>
you could do "foo#{var.split('-').last}", though I think I'd do two lines
jgabrielygalan has joined #ruby
karmatr0n has joined #ruby
<a5i>
How can I install ruby2.2 on debian ?
<apeiros>
rvm install ruby-2.2.1
RegulationD has quit [Ping timeout: 244 seconds]
<jhass>
pacstrap -D ruby base ruby
<jhass>
j/k
RegulationD has joined #ruby
bigmac has quit [Ping timeout: 245 seconds]
eladmeidar has quit [Read error: Connection reset by peer]
zzing has joined #ruby
<a5i>
Where would the wrapper be for ruby 2.2.1 then?
justin_pdx has quit [Quit: justin_pdx]
palms has joined #ruby
bigmac has joined #ruby
Takle has joined #ruby
<apeiros>
"the wrapper"
<jhass>
find / -name ruby
<apeiros>
there's no "the wrapper". you can generate any amount of wrappers
<apeiros>
also #rvm might be more help for that
RegulationD has quit [Ping timeout: 255 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
a5i wget ftp://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.1.tar.xz; tar xvfJ ruby*xz*; cd *ruby*; ./configure --prefix=/usr; make; make install \o/
<jhass>
shevy: please!
<shevy>
jhass look at your find / -name ruby stuff man!
RegulationD has joined #ruby
<_mak>
why this is false: "a" == ("c" || "b" || "a")
<_mak>
how can I check then if something is equal this or that?
<shevy>
a5i sure
<a5i>
mk
<apeiros>
_mak: compare to both
<apeiros>
a == b || a == c
<jhass>
_mak: something == this || something == that
<apeiros>
you can let a method do this: [b,c].include?(a) e.g.
<shevy>
a5i on my system I use some more options to configure though: --enable-load-relative --enable-pthread --disable-shared --enable-install-doc --with-static-linked-ext
<jhass>
[this, that].include? something # don't do me <= 3 elements
<shevy>
though, --disable-shared is ignored I think
<a5i>
i see
<shevy>
I still want a static ruby though :(
<_mak>
I have a list of 30 items, I want to exclude all items that are not "a" or "b"
<jhass>
_mak: Array#-
<shevy>
that's a lot of items
sinkensabe has quit [Remote host closed the connection]
patrick99e99 has quit [Ping timeout: 252 seconds]
sinkensabe has joined #ruby
<jhass>
er, wait #& no, that uniques
<jhass>
plain .reject then
patrick99e99 has joined #ruby
<_mak>
ok, I'll check it, thanks
<shevy>
yeah sounds like a use case for a .reject filter
<shevy>
sorting peas
sinkensabe has quit [Remote host closed the connection]
<shevy>
take the green ones but not the yellow ones
_64k has joined #ruby
<shevy>
or Matrix I ... take the blue pill... not the red pill
RegulationD has quit [Ping timeout: 256 seconds]
<_mak>
I was trying to use delete_if but it is not working
<_mak>
[1,2,3].delete_if {|v| v != (1 || 2)}
jottr_ has joined #ruby
agrinb has joined #ruby
<apeiros>
_mak: because v != (1 || 2) doesn't work for the same reason as your code above
bigmac has quit [Ping timeout: 264 seconds]
<apeiros>
_mak: tell me, what's the result of (1 || 2)?
<jhass>
_mak: also why do you want that?
<shevy>
>> [1,2,3].delete_if {|v| [1,2].include? v }
<jhass>
kay, stick around, I'm bored, I think I'll gonna refactor it while coming up with something
mostlybadfly has joined #ruby
ftj has joined #ruby
<_mak>
hahah
* _mak
feels shy...
<_mak>
I'm a terrible coder...
<apeiros>
_mak: perfect opportunity to learn something then
<apeiros>
jhass is quite good
<_mak>
indeed :)
bricker has joined #ruby
tier has joined #ruby
<apeiros>
and nobody is gonna scold you for not being the superduper perfect coder.
<ddv>
i'm a genius developer
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ddv>
</sarcasm>
nonks has quit [Ping timeout: 244 seconds]
Rephiax has joined #ruby
Limix has quit [Quit: Limix]
<ftj>
Does .select always return an array? I'm playing around with it, and it looks like, when the matching set consists of only one object, it just returns the object
hpoydar has joined #ruby
<apeiros>
ftj: no
_64k has quit [Ping timeout: 256 seconds]
<apeiros>
as with all methods, it depends on the object you call it on
jottr_ has quit [Quit: WeeChat 1.1.1]
<apeiros>
Array#select and Enumerable#select always return an Array.
<apeiros>
one element selected - still an array returned
patrick99e99 has quit [Ping timeout: 245 seconds]
pandaant has quit [Remote host closed the connection]
SouL_ has joined #ruby
Sawbones has joined #ruby
patrick99e99 has joined #ruby
zorak8 has quit [Read error: Connection reset by peer]
<a5i>
sigh..
zorak8 has joined #ruby
SouL has quit [Ping timeout: 272 seconds]
hpoydar has quit [Ping timeout: 252 seconds]
Zai00 has quit [Quit: Zai00]
SouL has joined #ruby
<jhass>
_mak: why do you drop the first id from the query?
SouL__ has joined #ruby
<_mak>
jhass: where?
SouL_ has quit [Ping timeout: 256 seconds]
wallerdev has joined #ruby
<jhass>
line 54
<jhass>
oh, because we have that one already, gotcha
<jhass>
then the default should be 0, not 1, right?
jerematic has joined #ruby
yfeldblum has joined #ruby
jud has joined #ruby
jud has joined #ruby
christiandsg has joined #ruby
<_mak>
jhass: I missed a refactor, before idsQuery was starting with ',' :/
Limix has joined #ruby
karmatr0n has quit [Remote host closed the connection]
blackmesa has joined #ruby
<_mak>
jhass: sorry, it is still starting with ,
<jhass>
kk, not in my version :D
SOLDIERz has quit [Quit: Be back later ...]
karmatr0n has joined #ruby
<_mak>
jhass: :)
SouL has quit [Ping timeout: 246 seconds]
ftj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dfinninger has quit [Remote host closed the connection]
jgabrielygalan has quit [Ping timeout: 264 seconds]
Sawbones has quit [Remote host closed the connection]
jerematic has quit [Ping timeout: 246 seconds]
kblake has joined #ruby
<mjuszczak>
jhass thanks!
nii236 has joined #ruby
karmatr0n has quit [Ping timeout: 245 seconds]
Sawbones has joined #ruby
nerium has joined #ruby
Apocalypse has quit [Ping timeout: 264 seconds]
noobda has joined #ruby
noobda has left #ruby [#ruby]
sevvie has quit [Ping timeout: 246 seconds]
Apocalypse has joined #ruby
Apocalypse has quit [Changing host]
Apocalypse has joined #ruby
twistedpixels is now known as zz_twistedpixels
jwinder has quit [Remote host closed the connection]
sivsushruth has quit [Ping timeout: 265 seconds]
nii236 has quit [Ping timeout: 272 seconds]
craigp has joined #ruby
<jhass>
_mak: mh, is there a reason you don't just query all stuff you need in the first query but use one query to get the ids you want and then fetch the results for those ids again, just with more details?
<jhass>
instead of just fetching with more details in the first place and filtering just those out you don't want
Alayde has joined #ruby
Alayde has quit [Client Quit]
DerisiveLogic has quit [Ping timeout: 265 seconds]
A205B064 has joined #ruby
<_mak>
jhass: Since the quantity of mobi and epub books are little, I did this way to reduce the traffic of the first request.
mikepack has joined #ruby
<_mak>
jhass: on the first query I'm forced to get 1000 books
SouL has joined #ruby
<_mak>
jhass: on the second I get only the ones I want
sivsushruth has joined #ruby
<jhass>
I have my doubts the overhead of another HTTP request and another DB query on the backend are low enough to justify the few saved bytes in transit, but mkay
Soda has quit [Remote host closed the connection]
Aswebb_ has joined #ruby
yfeldblu_ has joined #ruby
SouL__ has quit [Ping timeout: 264 seconds]
kaiZen has joined #ruby
anaeem1 has joined #ruby
mikepack has quit [Ping timeout: 256 seconds]
milesmatthias has joined #ruby
<_mak>
jhass: yeah, you are probably right... I will remove that
Alayde has joined #ruby
<_mak>
jhass: I just wanted to spare libgen server... but it's probably irrelevant...
<jhass>
yeah, I think you actually cause it more load that way
Guest94221 is now known as ELLIOTTCABLE
zzing has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
ELLIOTTCABLE is now known as Guest92206
sevvie has joined #ruby
Sawbones has quit [Remote host closed the connection]
art-solopov has joined #ruby
swgillespie has joined #ruby
milesmatthias has quit [Ping timeout: 252 seconds]
flip_digits has joined #ruby
Sawbones has joined #ruby
Alina-malina has quit [Ping timeout: 252 seconds]
mjuszczak has quit [Ping timeout: 255 seconds]
flughafe1 is now known as flughafen
agrinb has joined #ruby
Sawbones has quit [Remote host closed the connection]
spider-mario has quit [Quit: No Ping reply in 180 seconds.]
Guest92206 is now known as \ELLIOTTCABLE
Alina-malina has joined #ruby
twilling has joined #ruby
rajeshchawla has joined #ruby
<twilling>
Is it appropriate to use .any? on an array to verify that it’s not empty? I’ve inherited a Ruby 1.9, Rails 3 app and there’s a heavy reliance on use the “any?” method
<twilling>
Good, I didn’t think it was a good idea based on the docs but I wanted human verification
<twilling>
Thank you, apeiros
<apeiros>
in rails, use .present?
<apeiros>
in ruby, !.empty?
agrinb has quit [Ping timeout: 265 seconds]
maximski has joined #ruby
rajeshchawla has quit [Ping timeout: 250 seconds]
Sawbones has joined #ruby
<jhass>
_mak: http://paste.mrzyx.de/pt17gjdtk Disclaimer: I never even saved that to a file, thus never ran it, it's meant to give you some ideas. There's still some opportunity to extract stuff into some methods or even to write a class or two
blizzy has joined #ruby
maximski has quit [Client Quit]
SouL has quit [Ping timeout: 252 seconds]
dtordable has joined #ruby
MatthewsFace has joined #ruby
dtordable has quit [Changing host]
dtordable has joined #ruby
zzing has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
_mak: performance wise, recent sqlite versions allow bulk inserts, so 1) constructing a single query to get the existing IDs in the DB and filtering them out of the result set and 2) constructing a bulk insert for the remaining ones should be much faster. I didn't look up how to do bulk inserts properly (read with bind vars) though, so I left it out
The_Phoenix has quit [Read error: Connection reset by peer]
christiandsg has quit [Remote host closed the connection]
juanpablo_ has joined #ruby
<_mak>
jhass: hey, cool! I'll check it!
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
michael_mbp has quit [Excess Flood]
elfuego has quit [Quit: elfuego]
plashchynski has quit [Quit: plashchynski]
Apocalypse has quit [Ping timeout: 246 seconds]
michael_mbp has joined #ruby
christiandsg has joined #ruby
MatthewsFace has quit [Ping timeout: 244 seconds]
jwinder has joined #ruby
_64k has joined #ruby
SouL_ has joined #ruby
craigp has quit [Remote host closed the connection]
sivsushruth has quit []
juanpablo_ has quit [Ping timeout: 265 seconds]
momomomomo has joined #ruby
<_mak>
jhass: next if book["Language"] == "English", will this skip english books?
wallerdev has quit [Quit: wallerdev]
<jhass>
eh, right, unless too
<jhass>
double negation always confuses me :P
nonks has joined #ruby
craigp has joined #ruby
Apocalypse has joined #ruby
Apocalypse has quit [Changing host]
Apocalypse has joined #ruby
iamjarvo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
christiandsg has quit [Ping timeout: 252 seconds]
stef204 has joined #ruby
<_mak>
jhass: that code looks great!
<_mak>
jhass: I will refactor the second part of this tool according to what you did :)
<_mak>
jhass: thanks a lot!
<jhass>
yw
plashchynski has joined #ruby
Pharaoh2 has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<_mak>
jhass: wow, the performance improvements are impressive code...
SouL has quit [Read error: Connection reset by peer]
j_mcnally has joined #ruby
SouL has joined #ruby
<jhass>
eh, the query should probably use IN (?) instead of = ? or so
<jhass>
as said, just ideas, didn't try anything
hpoydar has quit [Ping timeout: 245 seconds]
Sawbones has quit [Remote host closed the connection]
<waxjar>
_mak: get a list of titles that are in the database with one query instead of a query per title, then download the torrent files concurrently?
craigp has joined #ruby
<_mak>
waxjar: I will try better matches instead of only the exact title
adamski2600 has quit [Ping timeout: 252 seconds]
blackmesa has quit [Ping timeout: 265 seconds]
alec-c4 has joined #ruby
DerisiveLogic has quit [Remote host closed the connection]
<waxjar>
either way, the bottleneck is gonna be the I/O you do while downloading
<jhass>
_mak: for the second script: let CSV open the file, if you do it yourself always use the block form of File.open or helper methods such as File.read
<jhass>
you probbaly noticed that I prefer unless over if not
jerematic has joined #ruby
DerisiveLogic has joined #ruby
SouL has quit [Ping timeout: 252 seconds]
cool has joined #ruby
<jhass>
list the columns you need in the select, even if it's all of them, it makes it easier to correlate the indexes to the columns
Rephiax has quit [Ping timeout: 244 seconds]
SouL has joined #ruby
jottr has joined #ruby
<jhass>
but I think you can also use the field names to access the results instead of indexes
<jhass>
which would be again much clearer
<_mak>
jhass: on the second refactor you did, is this 'relevant_books.each do' missing the || element?
blackmesa has joined #ruby
<jhass>
uh, yes :D
<jhass>
happens if you never run it :P
<_mak>
jhass: :D
<_mak>
jhass: what could I use?
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 36.0/2015022000]]
<_mak>
anything? (since I won't refer to it)
<jhass>
huh? it must be do |book|
jerematic has quit [Ping timeout: 256 seconds]
sevvie has quit [Ping timeout: 252 seconds]
christiandsg has joined #ruby
<_mak>
jhass: yeah... and the 'db.transaction do' also needs the ||?
Sawbones has joined #ruby
<jhass>
no
<jhass>
it yields nothing we're interested in
willharrison has joined #ruby
<_mak>
jhass: I'm missing something... 'bind or column index out of range'
<jhass>
where?
riotjones has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
get rid of the rescue so you know which statement it is
hmsimha has quit [Quit: Leaving]
<jhass>
I just assumed it can take an array, that's probably failing
tvon has quit [Quit: Lost terminal]
drewvanstone has joined #ruby
<_mak>
jhass: where?
SouL_ has joined #ruby
Sawbones has quit [Ping timeout: 246 seconds]
<jhass>
57/58
mjuszczak has joined #ruby
zorak8 has quit [Ping timeout: 256 seconds]
sevvie has joined #ruby
SouL has quit [Ping timeout: 264 seconds]
zorak8 has joined #ruby
SouL has joined #ruby
riotjones has quit [Ping timeout: 246 seconds]
<_mak>
jhass: I can't get the problem :/
<jhass>
yeah it doesn't handle arrays for bind parameters :/
mjuszczak has quit [Client Quit]
mjuszczak has joined #ruby
Morkel has quit [Quit: Morkel]
<jhass>
already_known_books = db.query("SELECT LibgenID FROM Books WHERE LibgenID IN (#{all_books.map {|book| book["ID"].to_i }.join(",")}").map(&:first) so this way (*sigh*)
<jhass>
eh
RegulationD has joined #ruby
<jhass>
already_known_books = db.query("SELECT LibgenID FROM Books WHERE LibgenID IN (#{all_books.map {|book| book["ID"].to_i }.join(",")})").map(&:first) (missed a paren)
SouL_ has quit [Ping timeout: 244 seconds]
<_mak>
jhass: that's cool. :) living and learning
<_mak>
thanks a lot mate!
Hirzu has joined #ruby
GnuYawk has joined #ruby
jamo__ has joined #ruby
wallerdev has joined #ruby
zorak8 has quit [Read error: Connection reset by peer]
swgillespie has joined #ruby
wallerdev has quit [Client Quit]
zorak8 has joined #ruby
kubunto has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
<kubunto>
how similar is ruby on rails to straight ruby
agrinb has joined #ruby
hardlin3r has quit [Ping timeout: 264 seconds]
RegulationD has joined #ruby
reset has joined #ruby
<shevy>
kubunto rails is very domain specific
sankaber has joined #ruby
<shevy>
in ruby itself, nothing stops you from writing code in rails
<centrx>
kubunto, Rails is a framework/library which has a lot of features to do various things
<shevy>
I mean, writing code *as rails does
<centrx>
kubunto, but the language is the same. For additional language-type features in Rails, see ActiveSupport
<shevy>
with those strange generator pattern thingies
<jhass>
kubunto: rails runs on stock ruby interpreters, they don't patch it, they just add a whole bunch of methods to the core classes
<kubunto>
so it is like jquery is to javascript?
Hirzu has quit [Ping timeout: 265 seconds]
<centrx>
ActiveSupport is like jQuery is to JavaScript
sevvie has quit [Ping timeout: 252 seconds]
wallerdev has joined #ruby
<centrx>
kubunto, Learn about the model-view-controller pattern
plashchynski has quit [Quit: plashchynski]
<kubunto>
centrx: i know that like the back of my hand
<shevy>
is your hand's backside hairy
<centrx>
it should be pretty straightforward if you already know Ruby
<jhass>
shevy: you need many iterations due to caches
<jhass>
the first one to run gets a penality
<jhass>
if you don't
patrick99e99 has joined #ruby
<jhass>
kubunto: install ruby-dev if you installed it that way
flughafen_ has joined #ruby
<kubunto>
jhass: i think thats why i was failing to get rails installed
swgillespie has joined #ruby
mloveless has joined #ruby
<jhass>
yes
mloveless has quit [Client Quit]
<jhass>
all that splitting up the "unnecessary" software cripples it and is just set apart from reality
JusticeFries has joined #ruby
<jhass>
one of the reasons I dislike debian
<riceandbeans>
can I benchmark between ruby 1.8 1.9 2.0 and 2.1?
<shevy>
yay!
<bonhoeffer>
hey — i’m trying to take a picture of a webpage at a specfic time — i already get the html via open('http://www.crossfitadaptation.com/').read
<shevy>
riceandbeans if you have these versions
<bonhoeffer>
via 'open-uri' — but i want the pics and a jpeg to email to me
<riceandbeans>
also, how can I iterate through a bunch of 1.8 code and figure out how it will break on 1.9 and fix it without just installing 1.9 and breaking it everywhere
<shevy>
I have only one ruby version these days
<shevy>
what do you mean
<bonhoeffer>
showing that a specific update happends — i’m thinking phantomjs or similar
nonks has joined #ruby
<shevy>
you can install all ruby versions
<riceandbeans>
right, but I have to upgrade on production systems
<riceandbeans>
and not break everything in the process
thinkswan has quit [Quit: ...]
<shevy>
so ask debian how they solve it :D
<centrx>
do it on development system first
<jhass>
bonhoeffer: you'll need to launch a browser and screenshot it, or shell out to a webpage screenshot tool
<shevy>
debian does not allow you to install as many versions as you want to?
flughafen has quit [Ping timeout: 256 seconds]
<bonhoeffer>
jhass: i’m on a vps shell
<jhass>
Xvfb might help, never tried
<Nilium>
Should just use freebsd
<Nilium>
Embrace the bsd
<riceandbeans>
even if I did it on dev, if 1.9 just broke all code, then the entire dev environment would be broken until I fixed it, and I can't just shut off the entire dev environment for everyone
Zai00 has joined #ruby
<shevy>
why not - you still have a working 1.8 just fine
<bonhoeffer>
jhass: for me?
<bonhoeffer>
Xvfb?
<jhass>
yes
<shevy>
jhass I tested with 400.000 iterations
n00by has quit [Quit: Page closed]
<bonhoeffer>
ah — cool — how does that compare with selenium and phantomjs?
kblake has quit [Remote host closed the connection]
<kubunto>
i like
<weaksauce>
you could change the other code to remove that method but if you wanted to do some other checks on things it would be good to have in a method like that
SouL has quit [Read error: Connection reset by peer]
rubytor_ has joined #ruby
enebo has quit [Quit: enebo]
rubytor has quit [Ping timeout: 246 seconds]
rajeshchawla has quit [Ping timeout: 244 seconds]
nonks has quit [Ping timeout: 244 seconds]
enebo has joined #ruby
jimms has quit [Remote host closed the connection]
Nahra has joined #ruby
<kubunto>
weaksauce: tyvm for the pointers
jasabella has joined #ruby
Jackneill has quit [Remote host closed the connection]
enebo has quit [Ping timeout: 252 seconds]
nfk has quit [Quit: yawn]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anaeem1 has quit [Remote host closed the connection]
kblake has joined #ruby
kubunto has left #ruby [#ruby]
anaeem1 has joined #ruby
lxsameer has quit [Quit: Leaving]
it0a has quit [Ping timeout: 250 seconds]
anaeem1 has quit [Ping timeout: 250 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jerematic has joined #ruby
it0a has joined #ruby
sankaber has joined #ruby
towski_ has quit [Remote host closed the connection]
Jiyuhen has quit [Read error: Connection reset by peer]
<apeiros>
shevy: you do remember that there's nothing else than run.time in ruby?
<apeiros>
s/./-/
<shevy>
well I can add stuff live
milesmatthias has joined #ruby
decoponio has joined #ruby
rajeshchawla has quit [Remote host closed the connection]
nii236 has joined #ruby
lemur has joined #ruby
<shevy>
I'd wish there would be a simple way to un-include stuff :(
anaeem1_ has joined #ruby
Jiyuhen has joined #ruby
rajeshchawla has joined #ruby
<apeiros>
yes, me too
maximski has joined #ruby
<apeiros>
more unextend than uninclude, though
<apeiros>
also I wonder whether extend still busts method cache
<shevy>
well
<shevy>
would it be possible to just "include" new modules, which just overload?
nii236 has quit [Ping timeout: 252 seconds]
<shevy>
so like, you could have the "original" copy, then add functionality, then include a variant that is kind of like the original one - the new functionality hmm
martinbmadsen has quit [Ping timeout: 265 seconds]
<apeiros>
you can clone a class
<apeiros>
and include into the clone
<shevy>
hmm
<shevy>
ah, so like the alias-trick when patching Kernel#include where you keep an old reference
<shevy>
keeping a clone is actually a great idea
anaeem1_ has quit [Ping timeout: 265 seconds]
zz_twistedpixels is now known as twistedpixels
patrick99e99 has quit [Ping timeout: 252 seconds]
Notte has quit [Remote host closed the connection]
patrick99e99 has joined #ruby
davedev24_ has joined #ruby
havenwood has joined #ruby
duncannz has quit [Ping timeout: 252 seconds]
sinkensabe has quit [Remote host closed the connection]
adamski2600 has joined #ruby
davedev2_ has quit [Ping timeout: 246 seconds]
DerisiveLogic has quit [Ping timeout: 256 seconds]
sankaber has joined #ruby
sinkensabe has joined #ruby
adamski2600 has quit [Ping timeout: 256 seconds]
_honning__ has joined #ruby
_honning__ has quit [Read error: Connection reset by peer]
civim has joined #ruby
<civim>
Is anyone here? I have a question about the proper syntax for defining a method.
<undeadaedra>
”don’t ask to ask”
<civim>
haha, ok.
<civim>
What does it mean when you define a method and end it with an =.
<civim>
I mean def foo=
<undeadaedra>
that you can call it like an assignment on the object
agrinb has joined #ruby
<civim>
can you explain a little further?
<havenwood>
civim: that's syntactic sugar that allows a special way to call the method. so instead of `foo= this` you can `foo = this`.
patrick99e99 has quit [Ping timeout: 246 seconds]
elfuego has joined #ruby
<havenwood>
civim: it's a special extra thing that allows a natural way of calling setter methods with what you're setting them to.
_honning_ has quit [Ping timeout: 264 seconds]
patrick99e99 has joined #ruby
nonks has joined #ruby
<civim>
so it simultaneously calls the method and sets the value/
<undeadaedra>
no, it just calls the method
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<centrx>
The method defines how the value is set
<undeadaedra>
a.foo = b is the same as a.foo=(b)
<centrx>
Naming the method like that makes it act syntactically like a regular variable assignment
<undeadaedra>
it doesn’t set anything magically, you still have to assign in the method, but it allows for treatment
<flughafen_>
i have a cucumber question, the docs say you can call mutiple steps like ... steps %[ \nstep1\nstep2 ]
<flughafen_>
but it gives me a lexing error.
<flughafen_>
if i do individual steps, it works
<civim>
ah, ok thanks. I'll read more about setter methods.
<centrx>
civim, If you have an instance variable named @foo, you can define public setter and getter methods for it with attr_reader, attr_writer, or attr_accessor
rajeshchawla has quit [Remote host closed the connection]
keen________ has quit [Ping timeout: 246 seconds]
<shevy>
civim not attr_reader but attr_writer :)
InFlight has quit [K-Lined]
<flughafen_>
sup shevy
<shevy>
flughafen_ ready to take off from Berlin?
<flughafen_>
shevy: yes!
<shevy>
flughafen_ YOU CAN'T!!! YOU ARE STILL BEING BUILT!!!!!
ghostpl_ has quit [Remote host closed the connection]
<flughafen_>
shevy: you jerk!
<flughafen_>
shevy: what are you up to
rajeshchawla has joined #ruby
SouL__ has quit [Ping timeout: 246 seconds]
<shevy>
flughafen_ there is another funny story, or perhaps not so funny... not related to planes, but to rails. I mean reallife rails... through Austria too. From Italy to Germany. Recently they started to START to dig the tunnel... in 10 (!) years they are supposed to finish
<shevy>
after like discussing it for 15 more years!
<shevy>
did you know that the italians also have a very fast rail thingy? cheaper than the german ICE or the french TGV too
sevvie has quit [Ping timeout: 246 seconds]
<flughafen_>
i didn't
Sawbones has joined #ruby
<shevy>
then I could drive to berlin in ... hmm...
kobain has joined #ruby
<flughafen_>
shevy: do you know anything about cucumber?
<shevy>
8 hours? less than that?
<a5i>
weaksauce: any luck? :(
<centrx>
please guys this is off-topic, go to #rails
<shevy>
nope no clue, it's web related right? I am .cgi
maletor has joined #ruby
<flughafen_>
it's a BDD tool
maletor has quit [Changing host]
maletor has joined #ruby
kobain has quit [Max SendQ exceeded]
sinkensabe has quit [Remote host closed the connection]
<havenwood>
a5i: So you're running `bundle install` form a different Ruby than you're using with Passenger?
sevvie has joined #ruby
naftilos76 has joined #ruby
aiguu has quit [Ping timeout: 245 seconds]
<a5i>
havenwood: not sure
<a5i>
havenwood: I said maybe thats the problem, as some other similar question was asked with rails but again im not sure
hardlin3r has quit [Ping timeout: 246 seconds]
willharrison has joined #ruby
plashchynski has joined #ruby
Sawbones has quit [Remote host closed the connection]
<weaksauce>
that step says that it's reverting the downgrade a5i
<weaksauce>
apt-get update whatever overwrites your ruby with some older version and then you want to reestablish the link
<havenwood>
a5i: It looks like you've just installed Ruby 2.1.3 and with it installed the bundler gem and bundled. Then you're running Passenger with Ruby 1.9.3.
<a5i>
OH !
<a5i>
havenwood, weaksauce So I should follow the steps and remove the foler and create the symlink?
<havenwood>
a5i: Do you need Ruby 1.9? Where'd it come from? An apt package?
<a5i>
I need ruby 2.x.x.
jack_rabbit has joined #ruby
<havenwood>
a5i: If you don't need more than one version of Ruby don't have more than one.
<havenwood>
a5i: Ruby 1.9 is past end-of-life anyways.
<a5i>
I see
<a5i>
hmm
dtordable has quit [Ping timeout: 256 seconds]
<havenwood>
a5i: Use Ruby 2.1.5 or better yet 2.2.1. ;)
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<a5i>
lemme just get this one to work with 2.1.3
milesmatthias has quit [Remote host closed the connection]
<a5i>
so should I so as that guy said?
<bradland>
a5i: if you can avoid it at all, don't use a ruby version manager on servers
sankaber has joined #ruby
<havenwood>
a5i: I haven't read the tutorial, let me look.
<a5i>
I dont have rvm yet
<bradland>
it adds significant complications to your server deployment
<shevy>
why not? ls has some options and lists stuff
havenwood has quit [Ping timeout: 255 seconds]
<shevy>
sure, it has colours
<bradland>
oh, there we go
AnxiousGarlic has quit [Read error: Connection reset by peer]
<bradland>
sry, colors didn't work on first load
kaleido has joined #ruby
<shevy>
well what confuses me is a behaviour I can not explain in bash
<shevy>
in irb, there is no delay
<shevy>
in bash, there is something like a 0.1 or 0.2 seconds hiccup
SouL_ has joined #ruby
<shevy>
before the current prompt is displayed again
<shevy>
that is so strange...
maximski has quit []
<shevy>
does your prompt appear instantly after you invoke any script file?
riotjones has joined #ruby
<kaleido>
bash is the devil
<bradland>
i'm testing out now
<bradland>
what the heck kind of shebang is this?
<shevy>
gobolinux-appdirs!
nii236 has quit [Ping timeout: 244 seconds]
<shevy>
it's equivalent to /usr/bin/
<a5i>
love when you fix something but another error pops up :))))))))
<bradland>
you using colours ?
SouL__ has quit [Ping timeout: 246 seconds]
<undeadaedra>
shebang should be #!/usr/bin/env ruby
<shevy>
bradland yeah though not right now... this is the beginning of a rewrite though, bash also colourizes stuff; the old code was suddenly behaving oddly and slowly
nipp has quit []
<shevy>
undeadaedra that will only work if you have an env there
<undeadaedra>
env is almost always in /usr/bin
Sawbones has joined #ruby
jottr has joined #ruby
<undeadaedra>
I think I ever encountred one system where it’s not the case
<bradland>
undeadaedra: you forgot to factor in that shevy is running weirdo linux
<undeadaedra>
I understood that
<shevy>
you guys are trapped in the FHS world
<bradland>
shevy: i see what you mean about the little studder at the end
<shevy>
ah?
<flughafen_>
shevy: LINUX RULES
<shevy>
but what is it? is this ruby related or something in general?
<undeadaedra>
But for ”normal” people, above shebang is the one that will work at most places
morenoh150 is now known as morenoh149
crdpink has joined #ruby
<shevy>
ohhhh wait
riotjones has quit [Ping timeout: 250 seconds]
<shevy>
I am so dumb
<shevy>
It was that call to .enable_colours I think
crdpink2 has quit [Ping timeout: 265 seconds]
<shevy>
so that slows things down :(
SouL__ has joined #ruby
naftilos76 has quit [Remote host closed the connection]
<bradland>
same here
<shevy>
ah well... guess I'll have to change more than just one class then...
<bradland>
i also get some rather alarming GC warning when that line is included
<bradland>
the google doc is pretty much a copy/paste of the output from the analyzer
SouL__ has quit [Read error: Connection reset by peer]
milesmatthias has joined #ruby
<bradland>
i love the graph that shows the correlation between mileage and price
agrinb has quit [Ping timeout: 272 seconds]
SouL__ has joined #ruby
Takle has quit [Remote host closed the connection]
<bradland>
i'm thrilled that i managed to get 60 days' worth of data without getting the boot too
<havenn>
a5i: That version ^ has the advantage of automatically detecting and installing deps (so you don't run into missing them and have to rebuild) as well as fetching latest stable and verifying checksums.
gregf has quit [Quit: WeeChat 1.0.1]
<bradland>
2nd the recommendation to use ruby-install to build your ruby and place in /usr/local
SouL_ has quit [Ping timeout: 256 seconds]
emocakes has joined #ruby
milesmatthias has quit [Ping timeout: 256 seconds]
Sawbones has quit [Remote host closed the connection]