Georg3 has quit [Quit: Computer has gone to sleep.]
fabrice31 has joined #ruby
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ecksit has joined #ruby
beneggett has joined #ruby
frellnet has quit [Ping timeout: 256 seconds]
frellnet has joined #ruby
dawkirst has joined #ruby
fabrice31 has quit [Ping timeout: 256 seconds]
Reg_ has joined #ruby
vdmgolub has quit [Ping timeout: 256 seconds]
<Reg_>
are there any good Ruby learning videos. i am just planning on learning Ruby to perform automation in Cloud.
sdouglas has joined #ruby
frellnet has quit [Ping timeout: 245 seconds]
Guest79018 has quit [Remote host closed the connection]
dawkirst has quit [Ping timeout: 264 seconds]
frellnet has joined #ruby
<Wolland>
whats Cloud
reebs has joined #ruby
emergion has joined #ruby
sdouglas has quit [Ping timeout: 264 seconds]
little_fu has joined #ruby
larissa has quit [Quit: Leaving]
bruno- has joined #ruby
little_fu has quit [Client Quit]
frellnet has quit [Ping timeout: 240 seconds]
frellnet has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
memph1s has joined #ruby
alem0lars has joined #ruby
vadzimt has joined #ruby
nszceta has quit [Ping timeout: 240 seconds]
opus has joined #ruby
bruno- has quit [Ping timeout: 245 seconds]
frellnet has quit [Ping timeout: 240 seconds]
nszceta_ has joined #ruby
<arup_r>
I am writing file system monitoring program using fssm gem. On any event, I want to trigger system notification...Is there any gem ? or any idea about the approach ?
frellnet has joined #ruby
dingus_khan has quit [Remote host closed the connection]
<Reg_>
Wolland: basically its for cloud automation. There is a software called CHEF whcih uses Ruby. Therefore, planning on learning Ruby since CHEF is Ruby based.
kaihara has quit [Ping timeout: 240 seconds]
<agent_white>
arup_r: I currently have it monitoring a directory of mine, so anytime I create a new script and place it in that directory, it automagically changes the permissions on it... that's one of many things you could do, of course.
<Wolland>
pretty neat
frellnet has quit [Ping timeout: 245 seconds]
<agent_white>
Reg_: Follow the Chef guides. They suggest running a VM to test it out, you should do that.
<arup_r>
agent_white: I am using FSS gem as it has hooks, create/update/delete
frellnet has joined #ruby
ecksit has quit [Quit: Laters.]
<agent_white>
arup_r: So does inotify?
nateberkopec has joined #ruby
namxam has quit [Ping timeout: 255 seconds]
<arup_r>
using hooks I am invoking other .rb files
<agent_white>
Again, you can do the same with inotify.
<agent_white>
Why not just use FSS?
kaihara has joined #ruby
anaeem1 has joined #ruby
<arup_r>
and at the same time.. I am also planning to create a system notification when any of the hook will run
<Reg_>
agent_white: thanks. i am new to Chef. So i dont really need to be an expert in Ruby i suppose to learn Chef?
<arup_r>
agent_white: I am not getting using FSS what way I can trigger notifications so
<agent_white>
Reg_: Nope, not really. It's a good starting point. I began learning Ruby because I had to learn Puppet (system config/deployment system akin to Chef).
<arup_r>
Let me check inotify
<agent_white>
arup_r: You want to trigger notifications? Or listen for notifications?
<arup_r>
trigger for now
relix has joined #ruby
amacou has quit [Remote host closed the connection]
<Reg_>
agent_white: Ive recently learnt basic Puppet too. I found Ruby very fascinating during that process. any good sources recommended for learning Ruby. Videos, books etc?
<professor_soap>
Hello people. I have just bought a new mbp and I can't install nokogiri on it. Trying to do a 'bundle install' on some old rails projects and they fail when trying to install nokogiri -v '1.5.11'
<professor_soap>
Have been trying to install for a couple of days now, probably read every f*ing article on the whole web about it, every blog post and every guide I could find.
febuiles_ has quit [Remote host closed the connection]
febuiles has joined #ruby
<Wolland>
what's the error
<professor_soap>
It says "libxml2 is missing."
<Wolland>
i am guessing it's failing to compile native extensions?
<Wolland>
oh
<professor_soap>
yep
<Wolland>
install brew, then install libxml
<professor_soap>
well first it says it fails compile native extensions.
<professor_soap>
I already have homebrew
apeiros_ has joined #ruby
<professor_soap>
and libxml installed
<professor_soap>
lymlinked too.
<wasamasa>
hmm
apeiros has quit [Ping timeout: 250 seconds]
alem0lars has joined #ruby
<wasamasa>
there is some option for bundle install to use the installed libxml
<professor_soap>
I have followed the official guide lines on nokogiri.org
<Wolland>
i am assuming you have xcode and command tools installed?
<wasamasa>
the exact syntax can be seen when trying to use it
<professor_soap>
yeah yeah, -- with....<insert path to libxml>
<wasamasa>
Wolland: well, he wouldn't have managed getting brew working otherwise, right :P
<professor_soap>
Wolland: yes it's installed
toretore has joined #ruby
<professor_soap>
but if I check 'gem list nokogiri'
<professor_soap>
I have 1.6.2.1, 1.6.2 installed
Georg3 has quit [Ping timeout: 245 seconds]
<professor_soap>
but cant install 1.5.11
mr-foobar has quit [Read error: Connection reset by peer]
mr-foobar has joined #ruby
<wasamasa>
hmm, I wonder what libxml 1.5.11 requires
hmsimha has quit [Ping timeout: 245 seconds]
ylluminarious has joined #ruby
<professor_soap>
during the "gem install nokogiri -v '1.5.11'", it checks for some files...
<professor_soap>
like checking for libxml/parser.h... yes
alexju has quit [Remote host closed the connection]
<professor_soap>
then there are two "no"
<professor_soap>
checking for iconv_open() in iconv.h... no
<professor_soap>
checking for xmlParseDoc() in -lxml2... no
mijicd has quit [Remote host closed the connection]
amacou has joined #ruby
<Wolland>
all these ... bundle config build.nokogiri --use-system-libraries
<Wolland>
etc
klaut has joined #ruby
frellnet has quit [Ping timeout: 255 seconds]
<professor_soap>
yeah tried that.
frellnet has joined #ruby
<Wolland>
wonder if it's a path issue, if libxml2 is installed, it just can't find it
<Wolland>
but I guess you tried manually specifying path to xml2?
dc has quit [Remote host closed the connection]
<Hanmac1>
good that i dont have MacOS anymore so i dont have that problems ;P
yfeldblum has quit [Ping timeout: 255 seconds]
<Wolland>
i have these once in a blue moon, once things are working though, they just work :)
namxam_ has joined #ruby
<Wolland>
unlike other OSs
eka has joined #ruby
claymore has joined #ruby
frellnet has quit [Ping timeout: 264 seconds]
<Wolland>
professor_soap: what version of xml2 do you have?
dingus_khan has joined #ruby
crudson has joined #ruby
frellnet has joined #ruby
namxam has quit [Ping timeout: 245 seconds]
cleopatra has quit [Ping timeout: 250 seconds]
apeiros_ has quit [Read error: Connection reset by peer]
dawkirst has joined #ruby
<professor_soap>
Wolland: libxml2: stable 2.9.1 (bottled), HEAD
<Wolland>
i installed it and I don't even have libxml2 from brew ... weird
britneywright has joined #ruby
claymore has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
dingus_khan has quit [Ping timeout: 245 seconds]
frellnet has quit [Ping timeout: 240 seconds]
Georg3 has joined #ruby
frellnet has joined #ruby
<wasamasa>
Wolland: well, nokogiri by default compiles its own libxml2
<Wolland>
i see
<wasamasa>
so not that surprising
<wasamasa>
it does that since it can lead to problems if it's supplied a too recent one
claymore has joined #ruby
<Wolland>
professor_soap: can you try this "export CC=gcc" just for kicks
<Wolland>
and then try installing using gem ...
dawkirst has quit [Ping timeout: 240 seconds]
bmurt has quit []
Georg3 has quit [Ping timeout: 240 seconds]
shredding has quit [Quit: shredding]
<jhass>
wasamasa: didn't they just start that with 1.6 or so?
apeiros has quit [Remote host closed the connection]
frellnet has quit [Ping timeout: 240 seconds]
frellnet has joined #ruby
GriffinHeart has joined #ruby
apeiros has joined #ruby
lolmaus has joined #ruby
<professor_soap>
Wolland: that didn't do it either.
<Wolland>
maybe it's time to restart your mbp :)
bruno- has joined #ruby
dc has joined #ruby
<Wolland>
do other gems install just fine? like mysql2 etc
<professor_soap>
Right... or throw it out the window, I can't tell what's more rational anymore x)
<Wolland>
anything with native extensions
<professor_soap>
yep no problems there, just with nokogiri
bmurt has joined #ruby
<Wolland>
and it's brand brand new?
frellnet has quit [Ping timeout: 255 seconds]
<professor_soap>
I had problems with other versions before, the two I have installed now, but some of the tricks from stackoverflow/blogs/guides etc eventually helped, but not with this one.
<professor_soap>
yep
GriffinHeart has quit [Ping timeout: 256 seconds]
<Wolland>
did you restore from old one or starting from scratch?
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<professor_soap>
I havent installed rbenv or rvm or ruby my self I just went with default things.
frellnet has joined #ruby
<professor_soap>
from scratch
<professor_soap>
OS X 10.9.3
<Wolland>
same as mine
<Wolland>
I wonder if rvm sets some additional paths or something
<Wolland>
or ENV
banisterfiend has joined #ruby
<professor_soap>
did you install rvm/rbenv?
<Wolland>
i have rvm
AlSquire has joined #ruby
<Wolland>
but i just tried installing your version of nokogiri and it just worked ;(
<professor_soap>
well it should have anything to do with it, right?
frellnet has quit [Ping timeout: 240 seconds]
<Wolland>
gem install nokogiri -v '1.5.11'
<Wolland>
Fetching: nokogiri-1.5.11.gem (100%)
<Wolland>
Building native extensions. This could take a while...
<Wolland>
Successfully installed nokogiri-1.5.11
<Wolland>
1 gem installed
<Wolland>
2.1.2, 1.9.3, both worked
nateberkopec has joined #ruby
timonv_ has joined #ruby
frellnet has joined #ruby
banister has joined #ruby
funktor_ has quit [Remote host closed the connection]
<professor_soap>
i will try installing rvm and 2.1.2 and see if it helps
funktor has joined #ruby
drager_ has quit [Changing host]
drager_ has joined #ruby
drager_ is now known as drager
yfeldblum has joined #ruby
vincent has joined #ruby
vincent is now known as Guest72388
arya_ has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
frellnet has quit [Ping timeout: 240 seconds]
frellnet has joined #ruby
bmurt has quit []
yfeldblum has quit [Ping timeout: 245 seconds]
Georg3 has joined #ruby
<professor_soap>
Wolland: That actually worked o.O But now it halted when installing inconv
<Wolland>
well ... at least you are on the next step ;)
<Wolland>
that stackoverflow had a lot of steps for that one
frellnet has quit [Ping timeout: 245 seconds]
frellnet has joined #ruby
Georg3 has quit [Ping timeout: 264 seconds]
alem0lars has joined #ruby
<Wolland>
i guess you can install it using brew as well
Guest72388 has quit [Remote host closed the connection]
frellnet has quit [Ping timeout: 255 seconds]
<Wolland>
"brew install libiconv" and "brew link libiconv"
<Wolland>
per some comments
frellnet has joined #ruby
freggles has joined #ruby
nateberkopec has joined #ruby
<Wolland>
bunch of people saying xcode-select --install
<Wolland>
fixed it
frellnet has quit [Ping timeout: 264 seconds]
frellnet has joined #ruby
toastynerd has joined #ruby
shredding has joined #ruby
<Wolland>
you can also try and let rvm figure out missing deps
<Wolland>
rvm autolibs rvm_pkg
chipotle has joined #ruby
r_rios has joined #ruby
<cajone>
Guys for someone trying to do/learn TDD with no experience or writing test cases, in a non Rails project, could you give me some suggestions where to start?
febuiles_ has joined #ruby
<jhass>
hm, picking a testing framework?
<Wolland>
professor_soap: also do check mkmf.log it has more info there than error message it shows
<cajone>
jhass: yes
toastynerd has quit [Ping timeout: 240 seconds]
frellnet has quit [Ping timeout: 240 seconds]
<jhass>
so start with that, most popular are minitest and rspec
frellnet has joined #ruby
amystephen has joined #ruby
<cajone>
jhass: is one got a shorter learning curve than the other?
<jhass>
I don't think so
<jhass>
rspec certainly has more features, but for the baseline it shouldn't give much
febuiles has quit [Ping timeout: 250 seconds]
funktor has quit [Remote host closed the connection]
<jhass>
= for what you need on a daily basis
<cajone>
jhass: just trying to get off the ground without getting lost in the mechanics, do you have any pointers that you could recommend ie docs/tuts/youtube stuff?
carraroj has joined #ruby
<jhass>
I mostly learned TDD by working on an existing codebase, so I'm not a good reference for that
frellnet has quit [Ping timeout: 264 seconds]
frellnet has joined #ruby
<cajone>
jhass: ok thanks for you comments, I will 'rake' around ;) to see what I can find
cleopatra has joined #ruby
xenomorph is now known as {xenomorph}
frellnet has quit [Ping timeout: 264 seconds]
frellnet has joined #ruby
<Wolland>
professor_soap: good luck, i am passing out here
{xenomorph} is now known as xenomorph
Wolland has quit [Remote host closed the connection]
awkwords has joined #ruby
frellnet has quit [Ping timeout: 245 seconds]
dingus_khan has joined #ruby
frellnet has joined #ruby
kaspergrubbe has joined #ruby
ndrei has joined #ruby
<professor_soap>
Wolland: thx, see u later
jshultz has joined #ruby
dingus_khan has quit [Ping timeout: 240 seconds]
professor_soap has quit []
frellnet has quit [Ping timeout: 240 seconds]
frellnet has joined #ruby
bruno- has joined #ruby
frellnet_ has joined #ruby
awkwords has quit [Ping timeout: 250 seconds]
xenomorph is now known as {xenomorph}
awkwords has joined #ruby
shredding has quit [Quit: shredding]
frellnet has quit [Ping timeout: 245 seconds]
frellnet_ has quit [Remote host closed the connection]
<gypsydave5>
Anyone spare five minutes to enlighten me?
<jhass>
ask for a solution, not a person with it
frellnet has joined #ruby
<gypsydave5>
I'm reading a guide to Ruby and it's suggested that method(:method_name)
<gypsydave5>
but looking at the docs it says it returns a method object
<jhass>
the guide is wrong
bruno- has quit [Ping timeout: 250 seconds]
<jhass>
or outdated maybe, I don't know the history of that
<gypsydave5>
Yeah, I'm hoping for outdated - it's the RubyTheHardWay book someone recommended
{xenomorph} is now known as xenomorph
<jhass>
note that there's Method#to_proc and that that is called in a method call with foo(&method(:something)) which may the source for that confusion
<jhass>
several things a Rubyist wouldn't write in the first few lines of code I read
<jhass>
and neither do his nomenclature fit (this is just a variable is actually a constant, ruby has only methods, no pure functions, etc.)
<gypsydave5>
Cool - thanks for saying that jhass - a lot of what I was reading wasn't really gelling with what I'd read/done
frellnet_ has quit [Ping timeout: 250 seconds]
<gypsydave5>
hence my poking around the docs a lot too
frellnet has joined #ruby
<jhass>
and I don't like his analogies at all, but that might be taste
carraroj has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 245 seconds]
bogeyd6 has joined #ruby
<jhass>
I don't see method used in the online version though
<gypsydave5>
Me neither - I'm figuring he might've dumped it
xenomorph is now known as {xenomorph}
<jhass>
so, once you got your first own script feel free to ask for a review here so we get a bit idiomatic Ruby into you ;)
<gypsydave5>
I only paid hi $3 for the priviledge of reading it as a pdf though so I'm not going to moan :)
fabrice31 has quit [Ping timeout: 264 seconds]
<gypsydave5>
Thanks jass - I'll see how I do this evening
<jhass>
sure, it teaches the base principles of programming I guess, which is the real goal behind that series as far as I got it
frellnet has quit [Ping timeout: 245 seconds]
frellnet has joined #ruby
mark06 is now known as mark06_away
alexju has quit [Remote host closed the connection]
frellnet has quit [Ping timeout: 240 seconds]
frellnet has joined #ruby
{xenomorph} is now known as xenomorph
heftig has quit [Ping timeout: 250 seconds]
xenomorph is now known as {xenomorph}
heftig has joined #ruby
<dangerousdave>
I am running a ruby application in a AWS instance. I launch the application from a bash script. The Ruby application runs in an infinite loop. My AWS instance returns a timeout, and dhows a red health status, i suspect because my application is in a loop. Any ideas on how to resolve this please?
frellnet has quit [Ping timeout: 240 seconds]
frellnet has joined #ruby
<pontiki>
dangerousdave: are you saying it only does this on AWS? it doesn't do it on a dev/test or vagrant box?
<dangerousdave>
pontiki, well i cant create the AWS eco system in development, specifically the health monitoring system.
<dangerousdave>
pontiki, the application works fine on AWS, it just repots a bad state of health
<dangerousdave>
reports*
coffeina has joined #ruby
xjiujiu has joined #ruby
frellnet has quit [Ping timeout: 250 seconds]
toastynerd has joined #ruby
frellnet has joined #ruby
<pontiki>
your application is working, but it's in a loop?
alem0lars has quit [Quit: alem0lars]
<dangerousdave>
pontiki, correct
<dangerousdave>
it's supposed to be in a loop
<pontiki>
then why do you think that's a problem?
toastynerd has quit [Ping timeout: 240 seconds]
frellnet has quit [Ping timeout: 245 seconds]
frellnet has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
TheKruex has joined #ruby
<dangerousdave>
pontiki, the application is supposed to run continuosly in a loop, that is the intention. AWS should not be reporting it as being in an unhealthy state.
mehlah has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
e4xit has quit [Quit: Right I'm out!]
<wasamasa>
hmm
<wasamasa>
perhaps it expects it forking
frellnet has quit [Ping timeout: 245 seconds]
relix has quit [Remote host closed the connection]
<wasamasa>
by default znc reads in your config file, then "forks to background"
<pontiki>
daemonizes itself
<wasamasa>
the original process you've started exits
<wasamasa>
so you can use the shell you've started it in for other things
<wasamasa>
while a copy of the process runs in the background
<pontiki>
are you using opswords, dangerousdave ?
timonv_ has quit [Remote host closed the connection]
<pontiki>
sorry
<pontiki>
opsworks*
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
timonv_ has joined #ruby
xjiujiu has joined #ruby
frellnet has quit [Ping timeout: 245 seconds]
rtdp has quit [Ping timeout: 245 seconds]
frellnet has joined #ruby
chemic has joined #ruby
Perceptes has joined #ruby
<chemic>
hey.. what’s up with #rubyonrails channel? it’s under password or?
<wasamasa>
register an account at nickserv
<wasamasa>
identify with nickserv
GriffinHeart has joined #ruby
<chemic>
thx
<dangerousdave>
pontiki, no, elastic beanstalk
<wasamasa>
join freenode channels like #RubyOnRails, #archlinux, ...
timonv_ has quit [Ping timeout: 260 seconds]
ndrei has quit [Ping timeout: 240 seconds]
<dangerousdave>
wasamasa, that sounds like a great idea, would this be in the bash script? or the ruby app?
<wasamasa>
dangerousdave: well, uh, actually the ruby servers supports forking
frellnet has quit [Ping timeout: 260 seconds]
<wasamasa>
dangerousdave: depending on what you use to supervise processes you need to know what behaviour they expect
<dangerousdave>
wasamasa, hmmmmm, i don't use anything
apeiros_ has joined #ruby
<wasamasa>
dangerousdave: for example systemd marks forking processes as "failed" for me, but shows a return code of 0 for their child processes which means forking successfully happened
frellnet has joined #ruby
elaptics is now known as elaptics`away
<wasamasa>
dangerousdave: and tracks the non-daemonizing ones as expected
tot has joined #ruby
<wasamasa>
dangerousdave: well, at your place it's this aws thing doing the tracking, no?
<wasamasa>
and whether it's a problem at all or just a warning
<dangerousdave>
wasamasa, however it runs my ruby app, not delayed job
apeiros has quit [Ping timeout: 245 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
frellnet has quit [Ping timeout: 240 seconds]
dawkirst has joined #ruby
frellnet has joined #ruby
rapha has left #ruby ["bye!"]
lukec has joined #ruby
mehlah has quit [Quit: Leaving...]
agjacome_ has joined #ruby
olivier_bK has quit [Ping timeout: 256 seconds]
dc has quit [Remote host closed the connection]
diegoviola has joined #ruby
frellnet has quit [Ping timeout: 250 seconds]
agjacome has quit [Ping timeout: 250 seconds]
dawkirst has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
frellnet has joined #ruby
vincent_ has joined #ruby
dc has joined #ruby
vincent_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
pu22l3r has joined #ruby
linojon has joined #ruby
ndrei has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
frellnet has quit [Ping timeout: 250 seconds]
frellnet has joined #ruby
dc has quit [Remote host closed the connection]
bruno- has joined #ruby
jottr_ has quit [Ping timeout: 256 seconds]
agjacome_ has quit [Quit: leaving]
dc has joined #ruby
pu22l3r has quit [Ping timeout: 255 seconds]
chipotle has quit [Quit: cya]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
frellnet has quit [Ping timeout: 240 seconds]
frellnet has joined #ruby
_maes_ has joined #ruby
<diegoviola>
sorry to be off-topic, but there's this guy who instead of asking me if i'm interested, is insisting me that i look into his project in a very desperate way, and i think his project is in PHP, and i have zero interest in looking at it, how do i tell him politely that i'm not interested?
<apeiros_>
"fuck you, I'm not interested"
<diegoviola>
thanks
<apeiros_>
ok, I may not be the best reference for polite indication of disinterest :)
apeiros_ is now known as apeiros
<Perceptes>
or a white lie, say you'd like to help but are too busy at the moment
<apeiros>
diegoviola: anyway, more seriously - just tell him "I'm not interested". that's fine. and if he insists, he basically allows you to brush him off.
<jhass>
^ not interested and filter rule that deletes further mails from him
frellnet has quit [Ping timeout: 240 seconds]
<jhass>
(if they come)
kaspergrubbe has quit [Remote host closed the connection]
<gzl>
jhass: that's funny, what's that from?
frellnet has joined #ruby
<apeiros>
1. reply "I'm not interested", 2. "I politely told you I'm not interested. I'm still not interested. Please don't make me resort to impolitely tell you to gtfo.", 3. "GTFO". 4. blacklist
<jhass>
gzl: dunno, just something that passed by in my SN
<gzl>
ok
<shevy>
heyyyyy all
<shevy>
apeiros has a blacklist!
<apeiros>
that'd be about my escalation ladder. depends a bit on how well you know the guy
<shevy>
let's trigger it!!!
<apeiros>
shevy: of course. you've made it onto it thrice over ;-)
<Perceptes>
vifino: I think you want `bot.nick` rather than `IRC.nick`
<vifino>
I tried that too, doesnt work either :/
<Perceptes>
undefined method error?
<vifino>
Yes
<Perceptes>
oh, you need an accessor method
<vifino>
ircbot.rb:33:in `run': undefined method `nick' for #<IRC:0x007fcdd39b2028> (NoMethodError)
<vifino>
This ^
<vifino>
A what?
<Perceptes>
add this to the body of the IRC class definition: `attr_reader :nick`
<Perceptes>
you've assigned a value to the instance variable `@nick`, but that's not the same thing as calling `bot.nick` from outside the class
<vifino>
Bottom or top?
<Perceptes>
`bot.nick` looks for a method named nick
<Perceptes>
doesn't matter, generally they go at the top though
<vifino>
okay
<Perceptes>
`attr_reader :nick` is the canonical way to define a reader method that returns the value of the instance variable with the same name
chris123456789 has quit [Ping timeout: 240 seconds]
<vifino>
\o/
<vifino>
It works!
<vifino>
:D
<Perceptes>
:}
<vifino>
Thanks Perceptes!
<Perceptes>
you're welcome
bruno- has quit [Ping timeout: 240 seconds]
<vifino>
It connects! :D
<Perceptes>
aww yeee
<vifino>
ikr?
<unshadow>
I'm having some issues when wroking with SOAP (using savon gem), I got a C# code that shows what to do but becuse its in C# I cant seems to get it to work :/
<vifino>
My first project in ruby, that runs standalone, I only wrote some scripts for my irc client before
Shidash has joined #ruby
darkxploit has joined #ruby
xjiujiu has joined #ruby
namxam has joined #ruby
stytown has joined #ruby
bruno- has joined #ruby
mike32 has quit [Quit: Leaving]
stytown has quit [Client Quit]
darkxploit has quit [Max SendQ exceeded]
lkba has quit [Read error: Connection reset by peer]
bluenemo has quit [Ping timeout: 250 seconds]
awkwords has quit [Ping timeout: 245 seconds]
darkxploit has joined #ruby
SilkFox has quit [Ping timeout: 250 seconds]
mr-foobar has quit [Ping timeout: 245 seconds]
<vifino>
How can I match a string for ":End of /MOTD command."
<vifino>
?
<jhass>
s.include? ":End of /MOTD command."
<vifino>
ohok
<vifino>
damn, you guys are helpful!
jagadish has quit [Remote host closed the connection]
lkba has joined #ruby
<jhass>
btw. I take it you're doing that as exercise and are aware of frameworks such as cinchrb
<banister>
apeiros i really like it, cleans up controllers to just do simple shit, all the complicated stuff happens in the service objects (and they take callbacks, so the controller doesnt even have to query the service object)
mary5030 has joined #ruby
Hobogrammer has joined #ruby
<arup_r>
Yeah,, It is fixed now...
kireevco has quit [Ping timeout: 245 seconds]
<arup_r>
second problem also resolved...
<arup_r>
But the code looks some odd.
<apeiros>
banister: looks nice
<banister>
apeiros thx
<apeiros>
I guess the only part I don't like is that it's not explicit about those blocks being mutually exclusive
cesare has joined #ruby
<banister>
apeiros well ajax is the same with its success: and error: callbacks no?
<apeiros>
I rarely ever consider JS to be role model code :D
frankle has quit [Quit: Connection closed for inactivity]
lw has joined #ruby
lw has quit [Max SendQ exceeded]
AskSteve has quit [Ping timeout: 264 seconds]
<arup_r>
apeiros: Updated.
<apeiros>
arup_r: sorry, was distracted. does that code actually run? because I don't think it can work
lw has joined #ruby
<arup_r>
Yes.. It is not failing now..
<apeiros>
arup_r: think about it - on what object do you want to want to call `update`?
<apeiros>
arup_r: and the other thing to think about: where is the *local* variable `fsm` visible?
<arup_r>
fsm object..
<apeiros>
fsm is an instance of what?
stytown has quit [Quit: stytown]
<apeiros>
come on, that should be a 1s answer ;-)
ph8 has quit [Changing host]
ph8 has joined #ruby
<arup_r>
Yes..Got your point.
bruno- has joined #ruby
<arup_r>
I was on the *fsm* flow..
<arup_r>
;)
<apeiros>
o0
Lewix has quit [Remote host closed the connection]
sdouglas has joined #ruby
<arup_r>
aspeiros: Now working... But only I am thinking is it good as per OOP principal...? I need you like expert reviews..
<arup_r>
updated too
mr-foobar has joined #ruby
Envek has quit [Ping timeout: 264 seconds]
arya_ has quit [Quit: sayonara^_^]
monsieurp has quit [Changing host]
monsieurp has joined #ruby
<apeiros>
arup_r: why do you pass in self? you already have that available in the method
Aryasam has joined #ruby
<arup_r>
If I don't pass self, it is throwing errror
<apeiros>
again, think about it:
<arup_r>
because those hook methods are called on my object.
<apeiros>
you call update_event on your FileSystemMonitor instance. your FileSystemMonitor instance stores the FSSM::Monitor.new instance on which you want to call update
<jhass>
apeiros: I guess the block is instance_eval'd
<apeiros>
jhass: yes, which is why he has to fsm.create_event. that part is ok.
<apeiros>
jhass: but fsm.create_event(self) is pointless. he has access to the value `self` represents there in the create_event method.
bluenemo has quit [Ping timeout: 250 seconds]
<arup_r>
If I don't pass self, then second comment error will be called..
<jhass>
oh, gotcha
<apeiros>
arup_r: I don't tell you to just remove the (self) part. I tell you to substitute it with something your object already knows about.
Envek has joined #ruby
<arup_r>
apeiros: oh... pain on my brain :(
sixxy has quit [Remote host closed the connection]
<apeiros>
arup_r: you have @monitor in your FileSystemMonitor instance. self within that path block is that value also stored in @monitor
<apeiros>
you have access to that in your update_event instance method
<apeiros>
no need to additionally pass it around. that's just redundant
<arup_r>
Ohh!! It seems I should start eating grasses now...
<jhass>
that does use_block(context, block) context.instance_eval(&block) end effectively
<jhass>
so it's FSSM::Path not FSSM::Monitor
Hobogrammer has quit [Read error: Connection reset by peer]
codezomb has joined #ruby
<apeiros>
jhass: oh dear. indeed.
<apeiros>
arup_r: ok. you have to pass in self. misinterpretation on my part.
Notte has quit [Remote host closed the connection]
<arup_r>
Can I write the method `configure_path` much better way ? There those `self`s are needed indeed. But not reading well. How can I clean the code...?
Envek has quit [Ping timeout: 250 seconds]
orionstein_away is now known as orionstein
Azure has quit [Quit: My MBP went to sleep.]
GriffinHeart has joined #ruby
rubytor has joined #ruby
alexju has quit [Remote host closed the connection]
namxam has quit [Remote host closed the connection]
Envek has joined #ruby
GriffinHeart has quit [Ping timeout: 255 seconds]
kireevco has joined #ruby
nszceta has quit []
Envek has quit [Client Quit]
zorak has joined #ruby
sdouglas has quit [Remote host closed the connection]
benzrf|offline is now known as benzrf
centrx has quit [Quit: Mead error: Connection reset by beer]
k0m has joined #ruby
Hobogrammer has joined #ruby
Hobogrammer has quit [Read error: Connection reset by peer]
Azure has joined #ruby
<shevy>
what
<shevy>
the
<shevy>
fuck
Hobogrammer has joined #ruby
DivineEntity has quit [Ping timeout: 240 seconds]
<shevy>
fsm = self
<shevy>
fsm.create_event(self)
<shevy>
what are you doing man
Envek has joined #ruby
<arup_r>
shevy: I know that method is looking too ugly... :(
carraroj has joined #ruby
<arup_r>
Thus asking.. how can I improve it ?
<vifino>
I want to split the string "test 1 2 3" to "test" and "1 2 3", how can I do this?
yfeldblum has joined #ruby
wallerdev has joined #ruby
<shevy>
I have never before in my life seen, basically this
<mordof>
essentially the process so far has been to create it in a normal word doc, then view the source and recreate the generation of that same document in code
<mordof>
well
<mordof>
shevy: that's far from my main task
<mordof>
but it's one of them
michael_lee has quit [Quit: Ex-Chat]
lw has quit [Quit: s]
SilkFox has joined #ruby
workmad3 has joined #ruby
<rkazak_>
hi all.
<mordof>
the main thing at work is a dashboard to provide tools and information about a myriad of things... so whatever ends up being needed at the time gets made
<vifino>
How can I catch errors from eval?
<mordof>
and some of that involves generating reports
<shevy>
well how much bigger do you wanna take it mordof
<shevy>
I don't think ruby will be used for core GUI components
<mordof>
shevy: i'm just wondering for interesting side projects
<shevy>
nor for computer intensive games
<mordof>
not something like what i do at work, lol
<shevy>
I started todo files
<shevy>
since then I have never run out of things to do
<mordof>
shevy: meh, maybe i'll stick with games in the browser with js/canvas
<shevy>
here is one todo list: "Consider adding asciitable again, for the help section."
<shevy>
so here I wonder how to best, and most easily, make asciitable helpers, for commandline stuff
<shevy>
but only as simple as possible
lw has joined #ruby
{xenomorph} is now known as xenomorph
\q has quit [Ping timeout: 240 seconds]
<mordof>
shevy: almost done with my pacman implementation in canvas :)
teleporter has quit [Read error: Connection reset by peer]
teleporter has joined #ruby
freerobby has joined #ruby
yfeldblum has joined #ruby
SilkFox has quit [Ping timeout: 250 seconds]
sheperson has quit [Quit: sheperson]
Gonzih has quit [Ping timeout: 264 seconds]
<shevy>
canvas?
<shevy>
javascript?
workmad3 has quit [Ping timeout: 240 seconds]
benzrf is now known as benzrf|offline
<mordof>
yes.
<mordof>
it's what i know best
<shevy>
:(
tectonic has quit []
<shevy>
javascript is killing ruby
<drizz>
javascript is killing a lot of languages actually
<rkazak_>
shevy: you got to use the right thing for the job in hand...
fabrice31 has joined #ruby
<drizz>
rkazak_: that's assuming javascript is the right thing for anything
<mordof>
lol, the js hate in here is funny
<rkazak_>
maybe we should be trying to make ruby more browser firendly ( not sure if it is or not.. :) )
hfp has quit [Ping timeout: 240 seconds]
<mordof>
if ruby had decent GUI libs for the OS - wouldn't that make it a decent language for desktop applications?
yfeldblum has quit [Ping timeout: 255 seconds]
hfp has joined #ruby
<shevy>
rkazak_ is php the right thing for the job
<rkazak_>
mordof: You have a project!
<mordof>
lol...
<mordof>
crap
<shevy>
mordof has no time for anything
<shevy>
he is no longer cool
<mordof>
xD
<mordof>
shevy: once i'm done my classes i'll have time to work on a project
<shevy>
<mordof> and planning a wedding
<shevy>
mordof> oh and preparing to move, lol
<rkazak_>
shevy: php is that still being used ? 9.9
ramfjord has quit [Ping timeout: 245 seconds]
<shevy>
rkazak_ they are working on php 6
<mordof>
shevy: pssh they've been saying that for like 5 years, lol
<shevy>
mordof but one core maintainer said that lately on reddit!
<rkazak_>
sounds like perl6...
<mordof>
shevy: they already ported many of php 6's features over to php 5
<mordof>
meh.. i've never really enjoyed PHP, even though i know the language fairly well
<rkazak_>
anyway I think we need a polyglot channel on freenode…. then we can discuss any language!!!
<shevy>
php is more popular than ruby
<mordof>
rkazak_: the flame wars would be rampant
<mordof>
lol
fabrice31 has quit [Ping timeout: 240 seconds]
<rkazak_>
Hmm, I see people moving from php to js...
<mordof>
shevy: did you see that i sent you a link?
<mordof>
rkazak_: ... using node?
<arup_r>
I hate
agjacome has joined #ruby
<shevy>
mordof yeah it's a nice javascript game
NoticeIsOnYou has joined #ruby
<rkazak_>
mordof: we would have ruy rules…. be nice -
<shevy>
it is not a game in ruby though
<mordof>
shevy: runs well on mobile phones too, heh
<rkazak_>
ruy=ruby
<shevy>
ruy rules
<shevy>
the creator of ruby
Solnse has joined #ruby
<shevy>
perhaps you even meant Roy
<shevy>
Roy "matz" rules, creator of ruby
<shevy>
I am sorry, it is the heat; it kills me ...
<shevy>
normally you would assume that it gets colder when it is dark outside, but no :(
kireevco has quit [Quit: Leaving.]
<rkazak_>
Hehe.. He’s in the Bay area giving a talk on 30th but I am on a plane then :(
hfp has quit [Ping timeout: 256 seconds]
<mordof>
speaking of php.. time to install wordpress
<vifino>
shevy: can you give me a small hash example thingie?
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
GlenK: you only do half of the median definition, it differs whether you have an odd or an even number of elements in your dataset
<vifino>
Because I dont think cinch's way is much better
DivineEntity has quit [Ping timeout: 245 seconds]
<jhass>
GlenK: also I'd cache the sorting or even do a.sort! (if you'll never reuse that method)
<GlenK>
jhass: nah, it should work. should give you the same index for both when it's an odd number of elements. And different indicies when it's even.
bradleyprice has quit [Remote host closed the connection]
hfp has quit [Ping timeout: 245 seconds]
<shevy>
vifino it's just as hash man
bradleyprice has joined #ruby
<shevy>
vifino hash = {}
<vifino>
q_q
fabrice31 has joined #ruby
<vifino>
I thought that would be an array
<shevy>
array goes via []
* vifino
is confused
<shevy>
array = []
yfeldblum has quit [Ping timeout: 250 seconds]
<shevy>
hash = {}
hfp has joined #ruby
<shevy>
string = ''
<shevy>
come on vifino
<shevy>
you have been writing an irc bot
<vifino>
Whats the difference between array and hash?
<shevy>
how could you have written it without an array or hash
<shevy>
array keys are simpler
<vifino>
I used arrays yo
<shevy>
0,1,2,3,4
<GlenK>
jhass: noted on the a.sort! though. thanks for having a look.
<shevy>
hash keys use whatever
<vifino>
shevy: So, hashes are kinda like lua's tables?
<vifino>
cool, cool.
<shevy>
how should I know lua
<vifino>
xD
<shevy>
I have ruby, why would I use lua
<shevy>
or mruby
<shevy>
it will destroy lua
<vifino>
>_<
<shevy>
(in 30 years)
<vifino>
I obey lua, the only reason why i learn ruby now is because of fork and Process.detach
cesare has joined #ruby
<vifino>
because thats awsum
jottr_ has quit [Ping timeout: 240 seconds]
<JohnnyDiamond08>
So would you say it'd be better to throw functions into an Array and execute them sequentially or in a queue?
agjacome_ has quit [Ping timeout: 256 seconds]
bradleyprice has quit [Ping timeout: 245 seconds]
fabrice31 has quit [Ping timeout: 240 seconds]
dapz has joined #ruby
mr_snowf1ake has joined #ruby
<jhass>
a Queue is mostly an array in ruby, it's just synchronized
<vifino>
shevy: Can I put functions in variables?
<shevy>
vifino not sure what you mean; you can however use .send to send any message to an object
rkazak_ has quit [Quit: Sleep.....ing....]
<jhass>
vifino: no, Ruby has no functions, only methods, so they have to have a receiver. However you can store Proc objects
<JohnnyDiamond08>
(I'm pretty new to ruby) To my understanding the biggest difference with arrays in queues is that queues are "thread safe"
<jhass>
shevy: so much less hacky! wow!
<jhass>
JohnnyDiamond08: exactly
<JohnnyDiamond08>
++ thank you jhas
<vifino>
jhass: Okay, so can I store methods in a var?
mary5030 has quit [Remote host closed the connection]
<vifino>
or is that imposible?
<shevy>
vifino did I not show you an example
<shevy>
you can even bind a method
cesare has quit [Ping timeout: 264 seconds]
<vifino>
Im too confused for this
<shevy>
bar(method(:foo))
<shevy>
well
<jhass>
vifino: no, you could obtain Method objects that represent your methods and store those, but as said usually you'd store the names as Symbol and pass them to #public_send or you'd store Proc objects and #call them
<shevy>
if you are so confused
mary5030 has joined #ruby
<shevy>
perhaps you do not even need this functionality yet?
<shevy>
why not stay simple man
<vifino>
.-.
<shevy>
simple is so pretty
<vifino>
Ima fool around with hashes and eval >:D
rkazak has joined #ruby
<jhass>
:(
sixxy has quit [Remote host closed the connection]
<vifino>
everything else is too much for me xD
<jhass>
:(
cesare has joined #ruby
<vifino>
oh oh, and fork and process.detach!
<vifino>
Much of that!
<vifino>
#swaggyswaggyswagmachine
Lewix has joined #ruby
Lewix has quit [Remote host closed the connection]
<rkazak>
shevy: he means blocks…
<shevy>
who means blocks?
banjara has joined #ruby
<vifino>
inb4 minecraft xD
<rkazak>
vifino
decoponio has quit [Quit: Leaving...]
<vifino>
What are blocks?
dbasch has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
shredding has joined #ruby
Hanmac has joined #ruby
<jhass>
vifino: you've done something like array.each do |element| ?
dbasch has joined #ruby
<vifino>
nope, not used that, but I know kinda how it works
<jhass>
the do |element| end (or its alternative syntax {|element| }) is a block
<czaks>
btw.
Morkel has quit [Quit: Morkel]
shredding has quit [Client Quit]
<czaks>
why Method and Proc do not have a common class?
<jhass>
because they're pretty distinct things
Hanmac1 has quit [Ping timeout: 260 seconds]
<czaks>
but they have something in common, i believe most methods would be common for both things
<banister>
the distinction between methods and procs and blocks in ruby is darn annoying
<banister>
at least lambdas and blocks
cashnguns has joined #ruby
<jhass>
they may have a similar interface, yet they _represent_ pretty distinct things
<czaks>
i see, well, this may be the same argument against TrueClass and FalseClass not having a common ancestor
SilkFox has joined #ruby
larsam has joined #ruby
sixxy has joined #ruby
<jhass>
that would I mostly account to historic reasons though
<banister>
czaks it would be a pretty empty superclass
<banister>
czaks i can't think of any behaviour true/false share in common
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
hfp has quit [Ping timeout: 264 seconds]
dapz has joined #ruby
hfp has joined #ruby
<arup_r1>
It is working now.. How can I remove those empty blank lines as seen in the output ?
<czaks>
banister: well, this is true, since both are very simple constructs, yet still, ruby has open classes, so a programmer would leverage the similarities
Cache_Money has joined #ruby
<jhass>
arup_r1: HTML doesn't care and so should you
<banister>
czaks how, for example?
SilkFox has quit [Ping timeout: 260 seconds]
<arup_r1>
Oh.. I thought, I could..
<jhass>
vifino: yes, you can call a method by its name with #public_send
<czaks>
banister: well, i'm not sure about boolean, i had implemented a method for Method called arity_range
<arup_r1>
from doco --- <> omit newline for lines starting with <% and ending in %> what does it mean then ?
<banister>
czaks we're talking about a hypothetical boolean type ;)
<vifino>
jhass: but that does call the method on "123"
<jhass>
sure
<vifino>
Can I call "h", with arguments?
<czaks>
for my very simple project it is no problem, but if I wanted to generalize it somewhat, I would need to do another one for Proc class
<czaks>
banister: yes, I made a comparison between TrueClass and FalseClass not having common ancestor like Proc and Method
<jhass>
vifino: h is the implicit version of self.h, every method call has an receiver. And you can pass arguments just as additional arguments to #public_send
JoshGlzBrk has joined #ruby
dangerou_ has joined #ruby
<jhass>
vifino: so if you want to call self.h dynamically, you call public_send on self, self.public_send(:h, 'foo'), or in the implicit form: public_send(:h, 'foo')
<vifino>
so i would do 'self.public_send("h",arg1,arg2)'
heftig has quit [Read error: Connection reset by peer]
<vifino>
":h" is a symbol, right?
<banister>
czaks and the answer was that there's no use in doing that. You've yet to give an example :)
rkazak has quit [Quit: Sleep.....ing....]
<jhass>
vifino: yes
heftig has joined #ruby
<jhass>
vifino: public_send takes strings too though
m3_del has joined #ruby
<vifino>
jhass: oh, ok, thanks! :D
<vifino>
wow, you guys are definitly awesome
<jhass>
vifino: btw I hope you don't really have a method called h...
<vifino>
ofc not
<vifino>
I lable my things :P
<vifino>
atleast when i need them
<jhass>
good
<czaks>
banister: i could do a `case` construct, where I could catch both true and false by using a hypothetical Boolean construct
<vifino>
if I wanna disregard them, i call them "_"
<vifino>
:P
<czaks>
yet I could use TrueClass, FalseClass
dangerousdave has quit [Ping timeout: 256 seconds]
dingus_khan has joined #ruby
<jhass>
vifino: ruby has utf-8 support, so how about non-breaking-space? :P
<czaks>
method overloading for those wouldn't make too much sense actually
davedev24_ has quit [Read error: Connection reset by peer]
davedev24_ has joined #ruby
milky has joined #ruby
linojon has quit [Quit: linojon]
m3_del has quit [Ping timeout: 240 seconds]
larsam has quit [Read error: Connection reset by peer]
<banister>
czaks testing for bool is easy: !!x == x
havenwood has joined #ruby
<czaks>
banister: how so in case?
<jhass>
is when true, false really that hard to type...
<vifino>
When i do 'ret=self.public_send(@commands[func],args,nick,chan)' it errors ( catched ): 'private method `say' called for main:Object'
<vifino>
Whats wrong there?
<banister>
czaks first of all, why the heck would i ever want to switch on something being boolean? usually the true and false paths are very different so you'd have case true; case false, so your argument is straw man.
<jhass>
vifino: for calling private methods you need #send instead of #public_send
<banister>
czaks secondly, if that's really the only reason you can think of for a boolean superclass, then it doesn't seem worth it
<jhass>
vifino: and as said, you don't need the self., it's implicit, that was just for the explanation
<vifino>
ok
<czaks>
banister: well, i don't see a big problem there actually
<czaks>
a bigger problem is that Method class and a Proc class
<czaks>
don't have anything in common, despite a common interface
banjara has quit [Quit: Leaving.]
<vifino>
oh my god!
<vifino>
It works! D:
<czaks>
i mainly asked about those two and just compared the situation to the boolean things
<banister>
czaks i find the block/method/lambda thing a pain too, but i think it's mainly a syntactical thing that would resolve it, not an issue of OO superclasses
<vifino>
First day coding ruby, felt like being a procoder
<vifino>
x
danijoo has quit [Read error: Connection reset by peer]
<vifino>
xD*
<jhass>
I only ever used Method to call the original when overriding a method with define_method, if I want to pass code around I use Proc and blocks
<vifino>
Everything in this channel, and what the channel is all about is epic.
danijoo has joined #ruby
<shevy>
here be the smart people vifino
<vifino>
Yea
<shevy>
vifino do you know luarocks?
dbasch has quit [Read error: Connection reset by peer]
<vifino>
Yes
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
<vifino>
ruby has a same thing, i think
<vifino>
gem?
<shevy>
vifino the guy who wrote it also wrote htop and started gobolinux (but abandoned it once he finished university)
kireevco has joined #ruby
<vifino>
o_o
<banister>
shevy was he a close fren of yours?
<shevy>
gem should be similar to luarocks
kireevco has quit [Client Quit]
<czaks>
banister: well, fortunately, I can use extend, to make a common module having those methods
<vifino>
htop is very useful
<vifino>
luarocks too
kireevco has joined #ruby
<arup_r1>
shevy: How many hours you work ?
kireevco has quit [Client Quit]
GriffinHeart has joined #ruby
<banister>
czaks yeah, same diff
<shevy>
arup_r1 not much right now, it varies; 3-7 hours a day
<jhass>
czaks: note that using extend during program runtime (after program boot) can severely decrease performance
<shevy>
but 1 hour lunch break may (or may not be included)
<shevy>
arup_r1 with the current heatwave I don't feel like sitting for hours
<vifino>
also, begin and rescue is very neat, _much_ easier to use than pcall from lua
<shevy>
it is finally cooling down ... 27.8°C ...
<shevy>
how do you use pcall
<czaks>
jhass: you mean, extending classes after they have been defined?
<jhass>
shevy: your IRC client is still not sending UTF-8 :(
<shevy>
I am UTF-8 free
<jhass>
czaks: no I mean repeatedly doing that, for example after instantiation
<vifino>
shevy: Dont you know that, or are you just asking why I find it *bad*
<vifino>
?
<shevy>
vifino nope, I do not know lua. I read through one tutorial once years ago, that was it
<vifino>
oh, ok
<shevy>
the comments annoyed me the most
<shevy>
I need my #
<czaks>
jhass: i see, well, nice to know
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has quit [Remote host closed the connection]
<shevy>
I forgot what it was in lua ... -- ?
<vifino>
pcall calls a func, and returns true on success, and false,err on error
<vifino>
but it only works for one func at a time
<shevy>
huh
claymore has quit [Quit: Leaving]
<vifino>
where as begin and rescue works for code blocks
<jhass>
and on a , has to follow a space, but that's just my pedant-ism
opus has joined #ruby
cleopatra has joined #ruby
<vifino>
jhass: I dont understand 56/57
<vifino>
( Your correction )
<jhass>
oh, and return "msg","#{$~[1]}","#{$~[4]}","#{$~[5]}" -> "msg" match[1], match[4], match[5]
<jhass>
vifino: .match returns the MatchData object you currently access through $~, so you can assign and use it
cesare has quit [Ping timeout: 264 seconds]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alem0lars has quit [Quit: Going AFK...]
alem0lars has joined #ruby
stytown has joined #ruby
EvanR_ has joined #ruby
SlvrDragn has joined #ruby
Hanmac has joined #ruby
sdouglas has quit [Remote host closed the connection]
SlvrDragn has quit [Client Quit]
havenwood has joined #ruby
<vifino>
jhass: Doesnt seem to work
<vifino>
:/
nick0042 has joined #ruby
Hanmac1 has quit [Ping timeout: 245 seconds]
<vifino>
ircbot.rb:58:in `msgtype': undefined local variable or method `match' for #<IRC:0x007fd4a9aae4b8> (NameError)
<vifino>
jhass: ^
<jhass>
you do have the if match = msg.match... in the line before that?
<vifino>
yes
<vifino>
err
bruno- has quit [Ping timeout: 256 seconds]
<vifino>
no
DivineEntity has joined #ruby
<vifino>
now i get it
EvanR_ has quit [Ping timeout: 245 seconds]
bruno- has joined #ruby
Arkaniad has joined #ruby
Arkaniad|Laptop has joined #ruby
rick0042 has joined #ruby
stytown has quit [Quit: stytown]
<vifino>
Also, any good way to make a sandbox?
enebo has quit [Quit: enebo]
<jhass>
I'd investigate ruby independent stuff
<vifino>
Like that everyone will be able to run ruby code, without me having to worry about someone exploiting things
<jhass>
systemd's new container stuff looks interesting, though maybe not up to the job yet
SilkFox has joined #ruby
Arkaniad|Laptop has quit [Max SendQ exceeded]
<JohnnyDiamond08>
Question, I have to make an array span multiple ruby files. So when I create a new object from the class is the following syntax correct so that each file implementing the array object is adding to it rather than creating another array?
<JohnnyDiamond08>
@@ arry = Array.new()
Arkaniad has quit [Read error: Connection reset by peer]
Arkaniad|Laptop has joined #ruby
<jhass>
vifino: I think there exists some stuff that whitelists the allowed syscalls, though I didn't investigate the tools yet
<vifino>
I also heard the term "taint"
<vifino>
and $SAFE
<vifino>
or something like that
stytown has joined #ruby
nick0042 has quit [Ping timeout: 255 seconds]
duncannz has joined #ruby
duncan_ has joined #ruby
Lewix has quit [Remote host closed the connection]
SCHAAP137 has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
Arkaniad|Laptop has quit [Max SendQ exceeded]
Arkaniad|Laptop has joined #ruby
SilkFox has quit [Ping timeout: 240 seconds]
blasius has joined #ruby
dbasch has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
<apeiros>
JohnnyDiamond08: by "span multiple files" you mean "I need access to it from other files"?
alem0lars has quit [Quit: Going AFK...]
banjara has joined #ruby
claw__ has quit [Ping timeout: 250 seconds]
Takle has quit [Ping timeout: 245 seconds]
amystephen has quit [Ping timeout: 245 seconds]
teleporter has quit [Quit: Leaving]
jottr_ has joined #ruby
DivineEntity has quit [Ping timeout: 264 seconds]
lw has quit [Quit: s]
kireevco has joined #ruby
rick0042 has left #ruby ["(Byrd IRC Client // haxed.net)"]
bluenemo has quit [Quit: Verlassend]
kireevco2 has joined #ruby
kireevco1 has quit [Ping timeout: 245 seconds]
<JohnnyDiamond08>
Woops sorry just figured it out
<jhass>
vifino: ignore those for now. btw. here's the thing converted to my style (disregarding the architecture :P) http://paste.mrzyx.de/pcb6c1595/
<JohnnyDiamond08>
Adding '@@' to class variables allows the value to span multiple instances of itself
Cache_Money has quit [Quit: Cache_Money]
fold has quit [Ping timeout: 250 seconds]
Reg_ has joined #ruby
<vifino>
jhass: Actually, everything you said, i did, atleast most of it :)
<jhass>
vifino: I did a few more adjustments
JohnnyDiamond08 has quit [Remote host closed the connection]
<vifino>
Yea
<vifino>
I see those
<jhass>
the leaving of the parens in method definitions is actually uncommon
<vifino>
My version has to have many forks, because swag
<vifino>
xD
claw__ has joined #ruby
<jhass>
actually add @commands = {}
<jhass>
yeah, that's the architecture bit I wouldn't do ;)
britneywright has joined #ruby
<vifino>
I probably shouldnt do that many, but idc xD
kireevco has quit [Ping timeout: 256 seconds]
bmurt has quit []
amystephen has joined #ruby
pu22l3r has joined #ruby
lw has joined #ruby
opus has quit []
alem0lars has joined #ruby
<vifino>
Ima go off now, cya someday ^.^
alem0lars has quit [Client Quit]
vifino has quit [Quit: Ze Cat now leaves...]
kireevco has joined #ruby
Nahra has joined #ruby
kireevco2 has quit [Read error: Connection reset by peer]
pu22l3r has quit [Ping timeout: 245 seconds]
bmurt has joined #ruby
bmurt has quit [Client Quit]
fabrice31 has joined #ruby
arup_r1 has left #ruby [#ruby]
mijicd has joined #ruby
kireevco1 has joined #ruby
havenwood has joined #ruby
lxsameer has joined #ruby
havenwood has quit [Remote host closed the connection]
rkazak_ has joined #ruby
fabrice31 has quit [Ping timeout: 264 seconds]
kireevco has quit [Ping timeout: 240 seconds]
stytown has quit [Quit: stytown]
amargherio has quit [Remote host closed the connection]
SilkFox has joined #ruby
maletor has joined #ruby
dbasch has quit [Quit: dbasch]
atmosx_ has joined #ruby
atmosx_ has quit [Client Quit]
maletor has quit [Ping timeout: 245 seconds]
riotjones has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
bradleyprice has joined #ruby
riotjones has joined #ruby
djapo has joined #ruby
<djapo>
can ruby packages be installed in containers sort of like in python packages can be installed in virtualenv?
<djapo>
if so how?
<jenskarlsen>
two options
sdouglas has joined #ruby
<jenskarlsen>
rbenv
agjacome has joined #ruby
<jenskarlsen>
rvm
Fire-Dragon-DoL has quit [Quit: Leaving.]
NoticeIsOnYou has quit [Ping timeout: 245 seconds]
<yxhuvud>
djapo: yes. But really, why bother when you have bundler?
<jenskarlsen>
Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed.
<djapo>
are they installed globally?
<yxhuvud>
they can be, or not.
stytown has joined #ruby
<yxhuvud>
doesn't really matter since it makes certain the correct version is used
sdouglas has quit [Ping timeout: 250 seconds]
<djapo>
hmmm, i remember reading something about gems being installed into a directory and those packages would be used when the shell was cd into it but i don't remember what it was called?
bmurt has joined #ruby
<yxhuvud>
bundle can vendor gems as well, yes
<jenskarlsen>
djapo: what are you actually trying to accomplish?
banjara has quit [Quit: Leaving.]
bmurt has quit [Client Quit]
<djapo>
im trying to isolate packages from each other for diffrent projects, while avoiding sudo for root installs
luckyruby has joined #ruby
<jenskarlsen>
alright, so you have a few options
<jenskarlsen>
why don’t you read up on the 3 that were given
jhass is now known as jhass|off
<jenskarlsen>
it won’t take long, and it will be a lot easier for you to identify which fits your workflow best
<jenskarlsen>
easier than for us to
bradleyprice has quit [Remote host closed the connection]
<jenskarlsen>
guess essentially
zB0hs has joined #ruby
<jenskarlsen>
rbenv, rvm and bundler
bradleyprice has joined #ruby
<djapo>
the thing is that i remember somthing being like this being natively suported but i will read up on them
<jenskarlsen>
probably bundler as yxhuvud said
freerobby has quit [Quit: Leaving.]
<jenskarlsen>
i use rbenv to choose the ruby version locally for a directory, and then bundler for packages
tekku has joined #ruby
<djapo>
can it be done with one tool?
tekk has quit [Ping timeout: 256 seconds]
<jenskarlsen>
well
<jenskarlsen>
do you care about using different versions of ruby?
<jenskarlsen>
probably not.
<jenskarlsen>
you just cared about package versions
<jenskarlsen>
so just go use bundler
bradleyprice has quit [Ping timeout: 250 seconds]
<djapo>
ok, but with the package does not support that version :/
<jenskarlsen>
im not sure what you mean by that.
<havenwood>
djapo: If you just want one Ruby just install to /usr/local and don't use a version switcher
zB0hs has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jenskarlsen>
then install bundler
<djapo>
i meant 'what if the package does not support that version?', alright about to hit the docs
<havenwood>
djapo: if you want to switch between Rubies, then chruby, rbenv or RVM
<havenwood>
djapo: i prefer chruby, the simplest
x1337807x has joined #ruby
<djapo>
thanks :)
Shajisbda has joined #ruby
<Shajisbda>
##etc Msg from ##etc Maxism is evil? It is dangerous and if u do it u die! I will prey 4 u (pray that U quit Marxism). ##etc is Libertarian
Shajisbda has quit [Killed (idoru (Spam is off topic on freenode.))]
<lagweezle>
tha' fook?
nateberkopec has joined #ruby
m3_del has joined #ruby
nateberkopec has quit [Client Quit]
mayday_jay has joined #ruby
angorabedsock has quit [Quit: Connection closed for inactivity]
RandyT has quit [Ping timeout: 240 seconds]
cashnguns has quit [Ping timeout: 250 seconds]
GriffinHeart has joined #ruby
Neomex has quit [Quit: Leaving]
m3_del has quit [Ping timeout: 264 seconds]
Reg_ has left #ruby ["(Byrd IRC Client // haxed.net)"]
luisjose has joined #ruby
GriffinHeart has quit [Ping timeout: 260 seconds]
havenwood has quit [Remote host closed the connection]
awkwords has left #ruby [#ruby]
cmarques has joined #ruby
mostlybadfly has joined #ruby
lw has joined #ruby
Takle has joined #ruby
ra4king has quit [Quit: Leaving]
tus has joined #ruby
Takle has quit [Ping timeout: 240 seconds]
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
cmarques has quit []
cesare has joined #ruby
havenwood has joined #ruby
dangerou_ has quit [Ping timeout: 245 seconds]
<ericwood>
so apparently doing IO in this is a great way to crash your computer? loop do; # IO goes here; sleep 0.1; end
cmarques has joined #ruby
<ericwood>
I literally could not kill the ruby processes, had to reboot
<ericwood>
that was stupid.
chrishough has quit [Quit: chrishough]
jottr_ has quit [Ping timeout: 250 seconds]
<Moonlightning>
ericwood: was it in uninterruptible sleep?
<ericwood>
so here's my question: would using IO.select be a better choice to block instead?
<ericwood>
Moonlightning: no clue
<Moonlightning>
Check it next time
gypsydave5 has joined #ruby
cmarques_ has joined #ruby
<ericwood>
yeah.
<Moonlightning>
Depends mostly on the device IO's being done on and the mechanisms used for interfacing with it…some (especially NFS-type things) are more prone to locking up than others
<ericwood>
looking for a better way to write above code, though, trying to poll a sensor over the serial port
<ericwood>
yeah this was using rubyserial to a roomba :\
dawkirst has joined #ruby
<ericwood>
select just seemed like overkill, but apparently my sleep thing was idiotic
RandyT has joined #ruby
kireevco has joined #ruby
gypsydave5 has quit [Client Quit]
cmarques has quit [Ping timeout: 250 seconds]
cmarques_ is now known as cmarques
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chrishough has joined #ruby
phoo1234567 has quit [Quit: Leaving]
Biohazard has quit [Remote host closed the connection]
dawkirst has quit [Ping timeout: 250 seconds]
ra4king has joined #ruby
postmodern has joined #ruby
kireevco1 has quit [Ping timeout: 240 seconds]
nopolitica has joined #ruby
anaeem1 has quit [Remote host closed the connection]
vote539 has joined #ruby
spastorino has joined #ruby
vote539 has quit [Client Quit]
lethjakman has joined #ruby
nateberkopec has joined #ruby
claw__ has quit [Remote host closed the connection]
claw___ has joined #ruby
SouL has quit [Ping timeout: 245 seconds]
spider-mario has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 240 seconds]
dc has quit [Remote host closed the connection]
kireevco has quit [Ping timeout: 256 seconds]
SouL has joined #ruby
dc has joined #ruby
hmsimha has quit [Ping timeout: 264 seconds]
linojon has joined #ruby
lxsameer has quit [Quit: Leaving]
NoticeIsOnYou has joined #ruby
codeitagile has joined #ruby
codeitagile has quit [Quit: Leaving.]
nateberkopec has quit [Ping timeout: 240 seconds]
codeitagile has joined #ruby
snath has joined #ruby
lw has quit [Quit: s]
claw___ has quit [Remote host closed the connection]
claw___ has joined #ruby
dc has quit [Remote host closed the connection]
NoticeIsOnYou has quit [Ping timeout: 250 seconds]
lethjakman has quit [Ping timeout: 240 seconds]
kireevco has joined #ruby
claw has joined #ruby
cobakobodob has quit [Ping timeout: 240 seconds]
CodeLicker has quit [Quit: Nettalk6 - www.ntalk.de]
claw___ has quit [Ping timeout: 264 seconds]
kaspergrubbe has joined #ruby
zenojis has quit [Ping timeout: 240 seconds]
SilkFox has quit [Ping timeout: 256 seconds]
lw has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nateberkopec has joined #ruby
CodeLicker has joined #ruby
dc has joined #ruby
zenojis has joined #ruby
eval-in__ has quit [Remote host closed the connection]
nateberkopec has quit [Ping timeout: 240 seconds]
cmarques has quit [Ping timeout: 255 seconds]
stytown has quit [Quit: stytown]
nateberkopec has joined #ruby
cesare has quit [Ping timeout: 240 seconds]
m3_del has joined #ruby
cesare has joined #ruby
mr_snowf1ake has quit [Quit: Leaving]
stytown has joined #ruby
fold has joined #ruby
Cort3z_ has joined #ruby
m3_del has quit [Ping timeout: 240 seconds]
cesare has quit [Ping timeout: 240 seconds]
jonathan_alban has joined #ruby
r_rios has quit [Ping timeout: 260 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
lw has quit [Quit: s]
nateberkopec has quit [Ping timeout: 240 seconds]
roolo has quit [Quit: Leaving...]
larsam has joined #ruby
nateberkopec has joined #ruby
sixxy has quit [Remote host closed the connection]
AlSquire has joined #ruby
larsam has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
nobodyzzz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]