<Aeyrix>
And also how often you're flitting between environments.
<havenwood>
;)
<sevenseacat>
this is why upgrades are not always trivial :P
<Aeyrix>
This is why they should be. :(
<sevenseacat>
heh
<Radar>
!popcorn
CloCkWeRX has quit [Ping timeout: 265 seconds]
<sevenseacat>
Aeyrix: your non-programmer is starting to show, just a little.
<Aeyrix>
Yeah this is where we'll deviate.
zamerick_ has quit [Remote host closed the connection]
micmus has quit [Quit: Leaving]
<Radar>
"should be"
* Radar
giggles
* Radar
pats Aeyrix
<Radar>
You'll become old + bitter soon.
<Aeyrix>
wtf are you going on about now
<Aeyrix>
No I won't.
hahuang65 has joined #ruby
<Aeyrix>
I'm not a programmer. :^)
fgo has joined #ruby
mase-chatter has joined #ruby
* sevenseacat
remembers fondly upgrading one app from ruby 1.9 to 2.2, testing it happily everywhere she could, then waiting for devops to push out the change to staging... anywhere.... gave up waiting
<baweaver>
Yeah, you're in OpSec. If you cross to Ops you're worse
braincrash has joined #ruby
<sevenseacat>
I knew a devops guy that refused to install the latest version of anything, anywhere. he 'wanted other people to find the bugs and security holes'
<baweaver>
We just deploy a new box for everything. Problem solved
<baweaver>
sevenseacat: I can appreciate that sentiment to a degree
bin_005 has joined #ruby
<sevenseacat>
so can I, but we were permanently a major version behind on everything
tubulife- has joined #ruby
<baweaver>
It afforded me a lot of laughs at Mavericks upgraders a while back
<sevenseacat>
it was really, really frustrating
<sevenseacat>
and I do mean a *major* version
<baweaver>
sevenseacat: then stay far far away from Java shops
<baweaver>
They're normally 3-4 behind :D
jacobdam has quit [Ping timeout: 255 seconds]
jacobdam_ has joined #ruby
<sevenseacat>
on the other hand, I once knew a CEO that is probably already running el capitan on his work machine
<sevenseacat>
I'd be very very surprised if he isn't
<ruby384>
im doing the guide to installation and im on the Rails section
<baweaver>
ruby384: #RubyOnRails
<ruby384>
says to run this: gem install rails -v 4.2.2 --no-rdoc --no-ri
<ruby384>
but i get this :Could not find a valid gem 'rails' (= 4.2.2) in any repository
swgillespie has joined #ruby
<sevenseacat>
eh? 4.2.1 is the latest
<havenwood>
ruby384: Just run: gem install rails
fgo has quit [Ping timeout: 258 seconds]
<sevenseacat>
Radar: what silly did you do
<Radar>
Oops.
xcesariox has joined #ruby
<Radar>
sorry ruby384, install 4.2.1. I'll fix the guide.
commondream has quit [Remote host closed the connection]
<ruby384>
no worries!
<havenwood>
ruby384: `--no-document` for a quicker install if you don't want rdoc and ri docs
<sevenseacat>
#betatesting
CloCkWeRX has joined #ruby
<Radar>
<3 Jekyll
exceion has joined #ruby
<sevenseacat>
jekyll is indeed the shit.
<Radar>
I'd like to automate that deployment process but it's not too painful right now
tubulife- has quit [Ping timeout: 256 seconds]
<sevenseacat>
it used to be such a pain to set up and get going, but now it's really good.
<Aeyrix>
Wait
<sevenseacat>
you mean, you don't just use github pages like the rest of us?
<Aeyrix>
You're using Jekyll?
<Radar>
sevenseacat: correct I don't use GitHub Pages like the rest of you.
<Aeyrix>
You're not using the blog platform you wrote for your first rails app?
<sevenseacat>
lame-o
<Aeyrix>
Come on m8
<Radar>
sorry bro that thing was old school
CloCkWeRX has quit [Read error: Connection reset by peer]
<havenwood>
ruby384: Why are you running?: gem pristine --all
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
davedev2_ has quit []
<ruby384>
i do that and then i get this :ERROR: While executing gem ... (Errno::EACCES) Permission denied @ rb_sysopen - /Users/FarhanSyed/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/mini_portile-0.6.2/History.txt
astrobunny has quit [Ping timeout: 256 seconds]
<havenwood>
ruby384: So you have rbenv, RVM and chruby installed?
<ruby384>
yes
chrisgeorge has joined #ruby
<bnagy>
haha
<chrisgeorge>
I'm pretty new to Ruby, and I'm having trouble understanding what something like this does: https://gist.github.com/chrisgeo/6bb4ff596d94d021961c what I gather is when I do Bar::new or b.foo = new_db.dup.returns_some_foo is that it will run some_func
<baweaver>
bet you it's a path issue as well
stoogenmeyer__ has joined #ruby
<remendo>
chrisgeorge: What is it that you don't understand?
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood>
ruby384: I haven't been following what you're doing but that sounds complicated. ;) RVM has an `rvm fix-permissions` command to fix user and group permissions.
<chrisgeorge>
remendo: I guess it seems like magic that you're calling a function within an attribute AND that it's automatically run with you assign it a value?
<remendo>
chmod 777 :d
Jandre has quit [Ping timeout: 272 seconds]
<Radar>
ruby384: rm -rf ~/.rvm ~/.rbenv
<Radar>
problem fixed
<Radar>
next question please
baweaver_ has quit [Ping timeout: 245 seconds]
<Aeyrix>
wow rude
<Aeyrix>
Why do so many people do that in this channel?
mark[oz] has joined #ruby
Spami has joined #ruby
<Radar>
With time, you will do it too.
<Aeyrix>
I doubt it.
bkxd has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Radar>
RVm and rbenv are getting in the way. Eliminating them willf ix the problem.
<Aeyrix>
Yes, but "next question please" makes you sound like the idea of helping others bores the shit out of you.
<Aeyrix>
Very discouraging for new users.
<havenwood>
Or questions are exciting and we want more!
<Radar>
^
<remendo>
chrisgeorge: By using = you are calling that method.
<Radar>
What havenwood said
<Radar>
I gorge on questions.
<Aeyrix>
Garbage.
<Radar>
If I found it boring, would you think that I would be here for 8+ years?
<chrisgeorge>
Thanks remendo, I guess I need to get used to the translation in my brain :)
<Aeyrix>
You know I mean it's the way you're wording it.
<Radar>
Aeyrix: Are you attacking the tone of the statement rather than the statement itself?
<Radar>
Logical fallacy much?
<Aeyrix>
I've seen you use !next before as well.
anekos has joined #ruby
<remendo>
chrisgeorge: Another example could be, foo + 1. What you actually do is calling the + method, so it's syntax sugar for foo.+(1).
<Radar>
!next doesn't work in this channel
<Aeyrix>
Which is your bot screaming NEXT!
<Aeyrix>
Works in #ror.
Yiota has joined #ruby
<chrisgeorge>
Ah, good example remendo, thank you
<Radar>
Aeyrix: I don't see newbies complaining about it when I answer their questions correctly.
someword has quit [Quit: Leaving.]
<Aeyrix>
I can certainly see how you trivializing their problems by acting like a Coles cashier would be discouraging.
<Radar>
You are the first person to complain about it in 3 years.
<havenwood>
Aeyrix: The #ruby-community channel is the perfect place to discuss how to make this channels automated messages friendlier and more helpful. The #rubyonrails channel for what happens there.
<havenwood>
channel's
jack_rabbit has quit [Ping timeout: 246 seconds]
<Aeyrix>
havenwood: what are you even talking about
eggoez has quit [Ping timeout: 276 seconds]
<Radar>
Aeyrix: I do it to indicate that I'm ready to answer someone else's question.
willharrison is now known as willharrison-pho
<havenwood>
Aeyrix: The #RubyOnRails channel bot is off-topic here. The best place to discuss it is #RubyOnRails.
willharr_ is now known as willharrison
<Aeyrix>
havenwood: Please stop.
<Radar>
(And yes, I was a Coles cashier in a previous life, but that's not why I do it)
<havenwood>
Aeyrix: You asked what I was talking about. I was trying to answer.
<Aeyrix>
havenwood: Okay, thank you for clarifying. My request stands. Please stop.
<sevenseacat>
once a console operator, always a console operator.
<havenwood>
Aeyrix: If it's about this channel, #ruby-community is the best place to discuss but please don't bring up #RubyOnRails stuff here.
<Aeyrix>
Shhhh.
<havenwood>
Aeyrix: Please be nice.
<Aeyrix>
Is havenwood a bot?
<sevenseacat>
where's mah popcorn
<Aeyrix>
I can't tell.
<sevenseacat>
no.
<remendo>
sevenseacat: Did you finish the book? (Elixir)
<sevenseacat>
remendo: not yet.
chrisgeorge has quit [Remote host closed the connection]
<Aeyrix>
Radar: Okay, so you're saying you can only answer one question at a time?
<Aeyrix>
It still seems rude.
<Radar>
Aeyrix: I have been known to help 5 people at a time.
<remendo>
sevenseacat: Does this seem accurate to you? ""But this power comes at a price. You’re going to have to unlearn a whole lot of what you know about programming. Many of your instincts will be wrong. And this will be frustrating, because you’re going to feel like a total n00b. "
<Aeyrix>
Then when do you scream "next"?
<Aeyrix>
After all five or after each one?
<sevenseacat>
remendo: if you have questions about elixir, #elixir-lang is likely the best place
<Radar>
Aeyrix: Are you willingly going to continue to waste my time or can I go back to work now?
<sevenseacat>
but yes, that's true if you're new to functional programming.
<Radar>
Aeyrix: This discussion is petty and useless and will not change my behaviour.
<Ox0dea>
Arch patches if and when appropriate, so that makes good sense.
LicHacker has quit [Remote host closed the connection]
cubicme has quit [Remote host closed the connection]
arescorpio has quit [Quit: Leaving.]
jenksy has quit [Ping timeout: 276 seconds]
allomov has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
jenksy has joined #ruby
rbowlby has quit [Remote host closed the connection]
nwhirschfeld has quit [Ping timeout: 264 seconds]
sinkensabe has joined #ruby
nwhirschfeld has joined #ruby
casadei has joined #ruby
bosma has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
mdw has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
<starfox_sf>
is there any Gem that attempts to verify the existence of an email by actually connecting to the SMTP server and ask it if the email address is valid?
krz has quit [Ping timeout: 272 seconds]
<starfox_sf>
I'm looking for something more than just verifying that a domain exists
mrsolo has joined #ruby
mcpierce has quit [Ping timeout: 256 seconds]
<Ox0dea>
starfox_sf: That seems to be something of a fool's errand.
<sevenseacat>
sounds like a security hole if its possible
yfeldblum has joined #ruby
hololeap has joined #ruby
astrobunny has joined #ruby
<Ox0dea>
It's certainly possible, but any modern SMTP server is likely to have checks in place to prevent such an approach being viable for very long.
<sevenseacat>
this is usually why people do confirmation emails - to verify that emails are actually valid.
wjimenez5271 has quit [Excess Flood]
hahuang65 has quit [Ping timeout: 244 seconds]
wjimenez5271 has joined #ruby
mcpierce has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
lxsameer has joined #ruby
lxsameer has joined #ruby
<sevenseacat>
if you get a hard bounce, well, then its not. :)
<Ox0dea>
I feel like require should evaluate to the major "namespace" it introduces.
<meshugga>
if i do a bundle install on one host and ship the resulting directory/app to another, is it necessary that it is executed in the same path or are the gems ok with living relative to each other?
<meshugga>
or put differently, do absolute paths play a role in bundle installed gems?
arooni-mobile has quit [Ping timeout: 256 seconds]
oo_ has joined #ruby
finisherr has joined #ruby
lavros has joined #ruby
<starfox_sf>
Ox0dea: can you give me some resource to learn a bit more about $,$! and the like? I have seen people using those but I don't quite understand it yet
<Ox0dea>
starfox_sf: You're asking for information about Ruby's "dollar variables"?
MVPhelp has quit [Remote host closed the connection]
<shevy>
"I need a fleet now?"
<shevy>
lol
<Aeyrix>
No, it’s called rkt now. Totally different.
<Aeyrix>
Lost it.
<baweaver>
That's DevOps, I swear on it
<sevenseacat>
they lost me about three lines in
<shevy>
"Uh, OK. And he wrote that Katy Perry song?"
<shevy>
hahaha
lessless has joined #ruby
<Aeyrix>
"It’s San Francisco. Everyone’s into distributed systems and BDSM."
<Aeyrix>
s/San Francisco/Ruby/
<Aeyrix>
:^)
<baweaver>
Aeyrix: Fly in around August and I can show you the Folsom St Fair
<Aeyrix>
baweaver: If this was last year I'd have been around lel.
<Aeyrix>
Well, I'd have been in ATL, but I could've come up.
<baweaver>
protip: HUGE NSFW
<baweaver>
Folsom St Fair is the huge BDSM parade here, walked in on it once by accident last year
<Aeyrix>
>BDSM parade
<Aeyrix>
'Murica
<baweaver>
More like San Francisco
<baweaver>
Most of the time you just shrug and keep walking
<Aeyrix>
CAVS IN SIX
<Aeyrix>
I know I'm an hour late.
<Aeyrix>
CLE 2 - 1 GSW
<baweaver>
You think I watch sports
<shevy>
hehe
<baweaver>
that's funny
<Aeyrix>
:<
<shevy>
the beaver olympics
<baweaver>
shevy: that's where we give a dam
<shevy>
hahaha
<Aeyrix>
I had something for that.
<Aeyrix>
;_;
sandstrom has joined #ruby
<baweaver>
I'm an amalogous blob of puns and programming knowledge.
axilla has joined #ruby
<baweaver>
Well, bed for me. 'night
krz has quit [Ping timeout: 258 seconds]
baweaver has quit [Remote host closed the connection]
_seanc_ has quit [Quit: _seanc_]
<Aeyrix>
ciao
nahtnam has quit [Quit: Connection closed for inactivity]
mark[oz] has quit []
sandelius has joined #ruby
Guest34113 has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
roolo has joined #ruby
IanVorn has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
platzhirsch has joined #ruby
<flughafen>
oi oi oi
<Guest34113>
Help needed on our new genuinevBulletin forum software (it is not nulled) please visit https://www.criosphinx.net for more information (we're able to install vBulletin 5 Connect
<sevenseacat>
what was the output when you ran `gem install rails -v 4.2.1` ?
ta has quit [Remote host closed the connection]
<irctc241>
it installs fully
<sevenseacat>
thats not what I asked
<sevenseacat>
can you please gist the output
thesheff17 has quit [Ping timeout: 256 seconds]
Zai00 has joined #ruby
kwd has joined #ruby
<irctc241>
what do you mean output? it installs all the necessary things and at the end it says Done installing documentation for thread_safe, tzinfo, i18n, activesupport, rails-deprecated_sanitizer, mini_portile, nokogiri, rails-dom-testing, loofah, rails-html-sanitizer, erubis, builder, actionview, rack, rack-test, actionpack, sprockets, sprockets-rails, bundler, thor, railties, globalid, activejob, mime-types, mail, actionmailer, arel, activem
thesheff17 has joined #ruby
<sevenseacat>
I sense this is going to be a slow process.
<Aeyrix>
Nah.
<Aeyrix>
irctc241:
<Aeyrix>
Run this:
* sevenseacat
shrugs and goes back to work
<Aeyrix>
Wait actually, don't, you've already got it installed. Never mind, it will be a slow process!
<Aeyrix>
I notice 'rails' isn't in the list of things that had documentation installed.
<sevenseacat>
i did ask to see the output, but nooooo.
<Radar>
Seems alright save for the .rvm things leftover in there
<Radar>
I don't know what's going wrong here, sorry.
dhjondoh has joined #ruby
<sevenseacat>
didnt actually load chruby in your .bashrc ?
plashchynski has joined #ruby
<Radar>
oh right it needs to be loaded
fabrice31 has quit [Remote host closed the connection]
<sevenseacat>
it was probably part of your guide.
<irctc241>
is there a way to uninstall completely everything? and start over
<Radar>
It is
<Radar>
"After this has been installed, we'll need to load chruby automatically, which we can do by adding these lines to ~/.bashrc:"
fabrice31 has joined #ruby
<Radar>
irctc241: You're missing that part of my guide ^
<Radar>
Please keep reading from that part that I just quoted
<irctc241>
kk ill read it
j4cknewt has quit [Ping timeout: 265 seconds]
ylla has joined #ruby
<irctc241>
chruby outputs back ruby 2.2.2
<Radar>
\o/
<Radar>
Keep reading the guide and you should be alright now.
pepperbreath has left #ruby [#ruby]
<irctc241>
where shoiuld i put the file that needs to be created?
olistik has quit [Remote host closed the connection]
<Radar>
Which file?
<shevy>
:)
<irctc241>
"Now we need to make that Ruby the default Ruby for our system, which we can do by creating a new file called ~/.ruby-version with this content:"
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
~/ means base home dir of your user account
<Radar>
vim ~/.ruby-version
<shevy>
so if you are on linux and your name is joe, it would be /home/joe/
<irctc241>
so just whatever it is on when i open terminal?
<shevy>
~/ should work always irctc241 just as Radar's example showed
<shevy>
you could use nano rather than vim :P
plashchynski has quit [Client Quit]
hanmac has quit [Ping timeout: 256 seconds]
<irctc241>
im on osx
<Darkwater>
use ed
serivichi has quit [Ping timeout: 272 seconds]
<Darkwater>
nothing will go wrong I swear
polysics has joined #ruby
bosma has quit [Quit: Leaving]
<shevy>
I guess osx uses /Users/name_here/
<irctc241>
i saved it where on OSX the applications folder is, downloads etc
<irctc241>
and when i run 'ruby -v' ruby 2.0.0 comes, not ruby 2.2.2
<shevy>
lots of osx users use ruby
Iskarlar has joined #ruby
<ddv>
somes i'm ashamed of my osx brothers
<ddv>
sometimes*
<shevy>
hehe
<shevy>
I just compile from source on linux; wget ftp://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.xz
<flughafen>
sevenseacat: which video are you on now?
<flughafen>
;)
sandstrom has quit [Quit: My computer has gone to sleep.]
<Radar>
irctc241: run "cat ~/.ruby-version" for me and tell me what that outputs
<irctc241>
no such file or directory
<Radar>
So you didn't create it there.
<Radar>
irctc241: Do you know how to use Vim or Nano?/
<irctc241>
found the issue. i stupidly added the "~/. " in the file name
ayaz has joined #ruby
<sevenseacat>
well the . is part of the filename
<sevenseacat>
and the ~/ is the path
ta has joined #ruby
ayaz is now known as Guest43554
bosma has joined #ruby
Guest43554 has quit [Client Quit]
<shevy>
cool
Zai00 has quit [Quit: Zai00]
<shevy>
so he would have ~/.~/.ruby-version
<irctc241>
doesnt let me save it with a dot. says its reserved for system
chussenot has joined #ruby
<sevenseacat>
sigh
<Radar>
irctc241: Override it.
<irctc241>
how can i do that
<ddv>
irctc241: why are you not installing a ruby version manager?
<shevy>
ddv you should be ashamed indeed ^^^^
<sevenseacat>
ddv: they did
revath has left #ruby [#ruby]
<sevenseacat>
now theyre trying to configure it but instructions are hard.
<ddv>
:) ah
<shevy>
:D
<Radar>
ddv: He is and we're trying to help.
<irctc241>
newbie here sorry guys
<shevy>
you will manage!
plashchynski has joined #ruby
<shevy>
listen to Radar
<irctc241>
okay so how can i override it so i can put a dot in front of the file
<Radar>
irctc241: vim ~/.ruby-version
fgo has joined #ruby
CustosLimen has quit [Read error: Connection timed out]
<shevy>
irctc241 did you try what Radar showed you in your terminal yet
<irctc241>
yeah i typed the file in terminal but how do i save it
<irctc241>
its just stuck on the insert
<ddv>
:wq
<Radar>
escape, then :wq
<ddv>
irctc241: you can use any text editor tho
<shevy>
irctc241 if vim confuses you, use "nano"
dumdedum has joined #ruby
hanmac has joined #ruby
chussenot has quit [Quit: chussenot]
<irctc241>
yeah nano alot easier
fgo has quit [Ping timeout: 264 seconds]
vdamewood has joined #ruby
<irctc241>
when i save it, doesnt show in the dir
<shevy>
yeah
<shevy>
leading . means hidden
<shevy>
you can show hidden files and dirs too
<irctc241>
so i ran cat ~/.ruby-version and i get back ruby-2.2.2
<flughafen>
holy crap, it looks like for the 2nd day in a row the package isn't being delivered! grrrrrrr
gagrio has joined #ruby
plashchynski has quit [Quit: plashchynski]
<shevy>
irctc241, in your home dir try: "ls -l --almost-all", I hope this works on osx
<shevy>
flughafen still trouble in Berlin?
<certainty>
double trouble
<shevy>
airport not build, packages not delivered... time to move to other parts of the world man
<irctc241>
says illegal option
<shevy>
oops
<flughafen>
shevy's jokes are an illegal option
<shevy>
works on linux!
<certainty>
-la will do
<shevy>
lalalala
<flughafen>
ls -lalallala
DEA7TH has joined #ruby
livathinos has joined #ruby
<irctc241>
so i ran ruby -v now and it says ruby 2.2.2
livathinos is now known as livathinos|away
<sevenseacat>
yay, ruby is installed.
dseitz has quit [Quit: g'night]
<shevy>
you are such a motivational cat
GnuYawk has joined #ruby
GnuYawk has quit [Client Quit]
<irctc241>
ill just follow the rest of the guide now
<sevenseacat>
good idea :)
starfox_sf has quit [Ping timeout: 246 seconds]
<shevy>
lol
Spami has quit [Quit: This computer has gone to sleep]
Hounddog has joined #ruby
sandstrom has joined #ruby
browsestoics has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
parduse is now known as Guest41929
ki0 has joined #ruby
pardusf has joined #ruby
Guest41929 has quit [Ping timeout: 265 seconds]
GnuYawk has joined #ruby
GnuYawk has joined #ruby
Soda has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
datanoise has quit [Ping timeout: 264 seconds]
ndrei has joined #ruby
<shevy>
is it common to define to_s in any given class?
aapole has joined #ruby
monsieur1 is now known as monsieurp
monsieurp has quit [Changing host]
monsieurp has joined #ruby
jenrzzz has joined #ruby
<irctc241>
thanks everyone for helping me out.
livathinos|away is now known as livathinos
Xeago has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv has quit [Ping timeout: 246 seconds]
msgodf has joined #ruby
anisha has joined #ruby
astrobunny has quit [Read error: Connection reset by peer]
astrobunny has joined #ruby
MVPhelp has quit [Remote host closed the connection]
mc_fail has quit [Quit: leaving]
bronson has joined #ruby
MVPhelp has joined #ruby
Yiota has joined #ruby
davidhq has joined #ruby
irctc241 has quit [Ping timeout: 246 seconds]
irctc239 has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
commondream has joined #ruby
j4cknewt has joined #ruby
<irctc239>
so i finished the guide. everything seems to run fine. but when i quit terminal. Rails commands dont work, and now it says ruby is version 2.0.0
baweaver has joined #ruby
nilo is now known as niko
Filete has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iml_ has quit [Remote host closed the connection]
charliesome has quit [Quit: zzz]
bog has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
<bog>
hi !
<bog>
could someone help me to understand a ruby concept ?
c0m0 has joined #ruby
<bog>
What is a tLabel ?
cajone has left #ruby [#ruby]
<bog>
I don't really understand what variables like var: means
jamesbrink has joined #ruby
meph has joined #ruby
Scroff has joined #ruby
baweaver has quit [Ping timeout: 276 seconds]
<bog>
I tried to find some information on the web but I have not found any tutorial about that
<bog>
Is there a link with hashtable ?
<apeiros>
bog: can you provide a bit more code?
<ljarvis>
morning
<apeiros>
tLabel itself doesn't tell me anything. I guess that's how the tokenizer calls it…
<apeiros>
moin ljarvis
<bog>
apeiros, what is the "tokenizer" ?
<ljarvis>
bog: what ruby version are you using? `ruby --version`
IanVorn has joined #ruby
<apeiros>
bog: something irrelevant to your question. it's part of how code is usually evaluated. the first step is tokenizing the blob of text.
<bog>
ljarvis, 2.1.6
<ljarvis>
bog: ok, please paste your code on gist.github.com
IanVorn has quit [Max SendQ exceeded]
<ljarvis>
tLabel is used for 1.9 style hash keys in the lexer (I think)
IanVorn has joined #ruby
<ljarvis>
i should really start just calling them hashes and not 1.9 style hases
<ljarvis>
hashes*
<apeiros>
ljarvis: that's what I'd assume too. but I don't want to guess, hence waiting for actual code by bog.
* ljarvis
reminises
<ljarvis>
yep good call
<ljarvis>
reminisces*
IanVorn has quit [Max SendQ exceeded]
<ljarvis>
today is not a good spelling day
<apeiros>
speling?
<ljarvis>
:P
<bog>
I want to learn ruby on rails. Before that, I try to learn ruby
<ljarvis>
bog: again, if you want help we're going to need to see code
ki0 has quit [Remote host closed the connection]
IanVorn has joined #ruby
glcx has quit [Changing host]
glcx has joined #ruby
<bog>
ljarvis, I don't understand this line of code : @article = Article.new(params.require(:article).permit(:title, :text))
IanVorn has quit [Max SendQ exceeded]
chthon has joined #ruby
<bog>
because I don't know what is :var
drzel is now known as zel
tobiasvl has quit [Quit: reboot]
<apeiros>
bog: it's not var
<apeiros>
it's a value
zel is now known as drzel
<apeiros>
like "var" is a literal string, :var is a literal symbol
IanVorn has joined #ruby
<bog>
is that a kind of pointer ?
<apeiros>
no
<apeiros>
it's kind of a number combined with a string
<apeiros>
for the programmer, the string aspect of it is the important part, for the machine it's the number which is important
<bog>
humm.. I don't really understand what is a symbol
<ljarvis>
bog: do you know any other programming languages?
<apeiros>
at this point, you can just think about it as a string (just with a different class than String). in most cases that's how it behaves.
<bog>
ljarvis, I know python, java, c and c++
chthon has quit [Client Quit]
CloCkWeRX1 has joined #ruby
psy_ has joined #ruby
<flughafen>
ah, it makes sense now, i guess dhl along with deutschepost is on strike
chthon has joined #ruby
<Darkwater>
hopefully not in nl
<apeiros>
flughafen: germany seems to be in strike mood… first DB, now Post… what's next? :)
<bog>
when I do var = 42, the value of var is 42, and the value of :var is "var" ?
<Darkwater>
they need to pick up my phone for repairs
<apeiros>
bog: again, it's not :var
tvl has joined #ruby
<apeiros>
var = :value
<apeiros>
var = "value"
<apeiros>
and yes, with `var = :value`, the value of var is :value
<flughafen>
apeiros: ruby developers!
<apeiros>
just like with `var = "value"`, the value of var is "value"
<Darkwater>
:value.to_s == 'value'
IanVorn has quit [Client Quit]
ndrei has joined #ruby
<apeiros>
but repeat with me: symbols are not variables.
IanVorn has joined #ruby
<Darkwater>
'value'.to_sym == :value
tvl is now known as tobiasvl
<bog>
ohh ? Symbols are not variables ?
<apeiros>
you can't assign a value to a symbol. i.e., `:symbol = "value"` is NOT valid. because symbols are not variables, they're values.
<bog>
Symbol are object ?
<apeiros>
yes. as I said from the start :-p
<bog>
*A symbol is an object ?
Zai00 has joined #ruby
kadoppe has quit [Ping timeout: 244 seconds]
CloCkWeRX has quit [Ping timeout: 255 seconds]
<bog>
And what is the semantic of this object ?
bruno- has joined #ruby
<Darkwater>
5, 'five', [ 5, 5 ], :five, true, nil
<Darkwater>
those are all valies
<apeiros>
bog: again, you can treat them like strings at this point
mello has joined #ruby
mello has joined #ruby
<irctc239>
why is it when i quit terminal, and reopen it my ruby version is back to 2.0.0 but when before it said 2.2.2
<irctc239>
i followed Radars guide
<apeiros>
bog: the main difference is that a symbol with the same value will always be an identical object.
<bog>
apeiros, if plain: "value"` is an alternative way to write `:plain => "value"`{, and if plain: is a symbol, so `:plain => "value"` is also a symbol since it is juste a rewriting, no ?
CloCkWeRX has joined #ruby
<apeiros>
bog: I don't follow. :plain is a symbol, yes. we've established that already.
speakingcode has joined #ruby
<ljarvis>
hmm, have we though?
lkba has joined #ruby
banister has joined #ruby
Xeago_ has quit [Remote host closed the connection]
<bog>
apeiros, the expression `{:plain => "value"} ` is a symbol ?
joonty has joined #ruby
CloCkWeRX1 has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
RegulationD has joined #ruby
tubuliferous_ has quit [Ping timeout: 255 seconds]
<shevy>
haha
lkba_ has quit [Ping timeout: 246 seconds]
<shevy>
he does not want to accept it!
<shevy>
bog leading : means symbol
<shevy>
in your hash example, the key you use is a symbol
<shevy>
it is associated with a string object
serivichi has joined #ruby
<shevy>
you can also use the new syntax by the way
<shevy>
{ plain: "value" }
<bog>
apeiros, If want to be sure of what I understand !
codecop_ has quit [Remote host closed the connection]
<shevy>
it looks like some strange A with a tilde
<ljarvis>
it's a snowman..
<shevy>
really?
<bog>
I think symbols can be used a little bit like enum in c++ or java
<shevy>
yes bog!
<apeiros>
bog: to an extent. there's no test for inclusion in the enum.
irctc239 has quit [Quit: Page closed]
AnoHito has joined #ruby
chris-sonar has quit [Quit: Connection closed for inactivity]
attlasbot has quit [Remote host closed the connection]
rubie has quit [Ping timeout: 265 seconds]
<bog>
apeiros, what is a test for inclusion ?
Xeago has quit [Remote host closed the connection]
plashchynski has joined #ruby
<apeiros>
C will complain if you try to use a value which is not part of the enum
hefest has joined #ruby
irctc621 has joined #ruby
<hefest>
Base64.decode64(base64string) returning different values with ruby 1.9.3 and 2.0.0
<irctc621>
so when i add "source /usr/local/share/chruby/chruby.sh & source /usr/local/share/chruby/auto.sh" to ~/.bashrc it does work when i load up terminal
<bog>
apeiros, I understand now, ty !
<ljarvis>
irctc621: great
<apeiros>
hefest: example?
Pathfinder has quit [Remote host closed the connection]
Xeago has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
<ruboto>
apeiros # => invalid base64 (ArgumentError) ...check link for more (https://eval.in/378893)
<apeiros>
heh
stan has joined #ruby
<apeiros>
so unpack("m") is fault tolerant, and recovery changed from 1.9 to 2.2
<apeiros>
m0 is strict and will raise
<apeiros>
yeah, I think upgrading to 2.2 is your best bet.
alex88 has joined #ruby
irctc697 has joined #ruby
pikos has joined #ruby
<irctc697>
i follwed radars guide for chruby and ruby rails, but when i do a rails command i get "-bash: /usr/local/bin/rails: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory"
terlar has quit [Ping timeout: 276 seconds]
<maloik>
is this the very first time using chruby, right after installing? if so, try restarting terminal
hakunin has quit [Remote host closed the connection]
<jhass>
weird, why does it order /usr/local first in your path
<jhass>
anyway, I'd say try sudo gem uninstall rails
pikos has quit []
<irctc697>
when i do that is there supposed to have some output?
<jhass>
sometimes, sometimes not
<jhass>
does /usr/local/bin/rails still exist?
<irctc697>
okay i did it
<irctc697>
yeah it does
Guest41768 has quit [Ping timeout: 272 seconds]
<jhass>
sudo rm it
<irctc697>
whats the full command?
<jhass>
sudo rm /usr/local/bin/rails
<irctc697>
do i do it 3 times? since its there 3 times
multi_io has quit [Ping timeout: 256 seconds]
<jhass>
no
plashchynski has quit [Quit: plashchynski]
bruno- has joined #ruby
<irctc697>
thank you for the help works now
multi_io has joined #ruby
Soda has quit [Remote host closed the connection]
hectortrope has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
rbowlby__ has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
pikos has joined #ruby
lavros_ has joined #ruby
pikos has quit [Client Quit]
pikos has joined #ruby
lavros has quit [Ping timeout: 250 seconds]
bruno- has quit [Ping timeout: 256 seconds]
pikos has quit [Client Quit]
jds has joined #ruby
pikos has joined #ruby
axl_ has quit [Remote host closed the connection]
weemsledeux has joined #ruby
Guest34113 has joined #ruby
pikos has quit [Remote host closed the connection]
pikos has joined #ruby
<Guest34113>
vBulletin vbShout for versions 5.x download the attachment without signning up! http://bit.ly/1FIwtND - More vBulletin products/plugins for any version will be added in due course.
<Guest34113>
vBulletin vbShout for versions 5.x download the attachment without signning up! http://bit.ly/1FIwtND - More vBulletin products/plugins for any version will be added in due course.
Guest34113 has quit []
<irctc697>
i get this when i run "bundle" : -bash: /usr/local/bin/bundle: No such file or directory
astrobunny has quit [Remote host closed the connection]
<bnagy>
Sp4rKy: so build {:bar => { :a => "foo", :name => "bar", :value => "1.2.3.4" }} and then next time when the working has already has :bar << the :value instead of creating a new entry
<bnagy>
*working hash
<Sp4rKy>
bnagy: yep, I'll do it :)
_joes_ has joined #ruby
<apeiros>
Sp4rKy: you should consider :value being always an array
<bnagy>
you could make it shorter by using the block constructor to Hash, but at the risk of making it too clever and annoying to read
pikos has left #ruby ["..."]
<apeiros>
otherwise I bet you'll end up with tons of additional branching logic to deal with "might be an array, might not be an array"
<bnagy>
this is a good point
<bnagy>
but if it's a specified json format or something then maybe can't :<
Zai00 has quit [Client Quit]
<apeiros>
yes. there's tons of braindead specs like that
<apeiros>
I'd love to hit the authors of those with a stick. or maybe a brick…
j4cknewt has quit [Remote host closed the connection]
thelastinuit has joined #ruby
kerunaru has joined #ruby
yfeldblu_ has quit [Ping timeout: 265 seconds]
Musashi007 has joined #ruby
Pupeno has joined #ruby
Pupeno has joined #ruby
e1nh4nd3r has quit [Quit: Leaving.]
charliesome has joined #ruby
CustosLimen has quit [Ping timeout: 258 seconds]
coderhs has quit [Ping timeout: 252 seconds]
kerunaru has quit [Client Quit]
C1V0 has joined #ruby
kerunaru has joined #ruby
pikos has quit [Remote host closed the connection]
ahmetkapikiran has joined #ruby
wprice has quit [Quit: wprice]
Xeago has joined #ruby
mc_fail has joined #ruby
coderhs has joined #ruby
<mc_fail>
hi guys
<mc_fail>
i have ruby broken again, gem fails with error /usr/local/share/ruby/site_ruby/rubygems/core_ext/kernel_require.rb:128:in `require': No such file or directory - /home/plab/.gem/ruby/extensions/x86_64-cygwin/psych-2.0.13/psych.so (LoadError)
<mc_fail>
and it is actually strange, because this file exists
<mc_fail>
-rwx---r-x 1 plab plab 607141 Mar 23 19:42 /home/plab/.gem/ruby/extensions/x86_64-cygwin/psych-2.0.13/psych.so
<mc_fail>
so, what is wrong with ruby again?
claw_ has quit [Quit: claw_]
pikos has joined #ruby
barkerd427 is now known as zz_barkerd427
jenrzzz has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<noethics>
i literally was writing down StyleGraph
<noethics>
then im like w8888
<noethics>
this is a tree
DexterLB has joined #ruby
ndrei has joined #ruby
masmus_id has quit [Quit: Leaving]
<noethics>
there can be duplicate nodes on different branches
<noethics>
but you can access the whole dependency chain by just picking the node then grabbing the whole branch
but3k4 has joined #ruby
mello has quit [Ping timeout: 244 seconds]
AlphaAtom has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
AlphaAtom has quit [Max SendQ exceeded]
Xeago has joined #ruby
AlphaAtom has joined #ruby
krisquigley has quit [Remote host closed the connection]
Musashi007 has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
gaboesquivel has joined #ruby
AlphaAtom has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
AlphaAtom has joined #ruby
jcaho has quit [Read error: Connection reset by peer]
ahmetkapikiran has quit [Quit: ahmetkapikiran]
AlphaAtom has quit [Max SendQ exceeded]
jcaho has joined #ruby
AlphaAtom has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
wpp has joined #ruby
Musashi007 has quit [Client Quit]
wpp has quit [Client Quit]
ndrei has joined #ruby
zack6849 has quit [Remote host closed the connection]
bMalum has joined #ruby
k3asd` has joined #ruby
atomical has joined #ruby
zz_barkerd427 is now known as barkerd427
lxsameer has quit [Quit: Leaving]
Endretoft has joined #ruby
bMalum has quit [Client Quit]
senayar has joined #ruby
Endretoft has left #ruby [#ruby]
walterheck has joined #ruby
ajax0xd9 has joined #ruby
<walterheck>
ola, I have a server that doesn't have internet access and I want to install a gem from my own gem repo. How do I stop gem install from trying to reach http://rubygems.org anyway?
luluapple has joined #ruby
jds has quit [Quit: Connection closed for inactivity]
davedev24_ has quit [Remote host closed the connection]
ferfoster has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 250 seconds]
arup_r has quit [Remote host closed the connection]
Guest19049 has quit [Quit: Lost terminal]
yoongkang has quit [Remote host closed the connection]
pikos has joined #ruby
senayar has quit [Remote host closed the connection]
gianlucadv has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
hoov has joined #ruby
<izzol>
Anyone is using resque-scheduler ?
<maloik>
?anyone
<ruboto>
Just ask your question, if anyone has or can, they will respond.
chinmay_dd has joined #ruby
griffindy has joined #ruby
arup_r has joined #ruby
poguez_ has joined #ruby
dblessing has joined #ruby
<izzol>
I'm trying to understand how to use it in the correct way. The documentation is not really clear for me. I know how resque is working and I did few tests but now I would like to execute tasks from the queue with some options like, execute it every 1 min or something.
<izzol>
So I found rescue-scheduler but it's in default reading the yaml file.
<izzol>
But I don't have any yaml file in my code :P
<maloik>
the resque (or was it sidekiq) readme has a section on that, but basically, use a cron job for that
<maloik>
the whenever gem can help you out
mdz_ has joined #ruby
Oxelist has quit [Ping timeout: 276 seconds]
mrmargolis has joined #ruby
<izzol>
hmm, so some sort of cron gem instead of this resque-scheduler ?
chinmay_dd has quit [Ping timeout: 244 seconds]
polysics has joined #ruby
senayar has joined #ruby
ndrei has quit [Ping timeout: 258 seconds]
jerius has joined #ruby
Guest69973 has quit [Ping timeout: 256 seconds]
yqt has joined #ruby
hinbody has joined #ruby
ndrei has joined #ruby
stoogenmeyer_ has quit [Ping timeout: 256 seconds]
bigkevmcd has joined #ruby
bMalum has quit [Quit: bMalum]
bronson has joined #ruby
prasselpikachu has quit [Ping timeout: 265 seconds]
stoogenmeyer_ has joined #ruby
bMalum has joined #ruby
bMalum has quit [Client Quit]
Biohazard has joined #ruby
coderhs has quit [Ping timeout: 265 seconds]
Biohazard is now known as Guest23257
whomai has quit [Ping timeout: 246 seconds]
Oxelist has joined #ruby
Oxelist has quit [Max SendQ exceeded]
Oxelist has joined #ruby
Oxelist has quit [Max SendQ exceeded]
Miphix has joined #ruby
Oxelist has joined #ruby
kobain has joined #ruby
mary5030 has joined #ruby
allcentury has quit [Ping timeout: 276 seconds]
arup_r has quit [Remote host closed the connection]
Oxelist has quit [Max SendQ exceeded]
Scrofff has joined #ruby
zotherstupidguy has joined #ruby
bronson has quit [Ping timeout: 264 seconds]
Oxelist has joined #ruby
Oxelist has quit [Max SendQ exceeded]
fgo has joined #ruby
Oxelist has joined #ruby
Oxelist has quit [Max SendQ exceeded]
umgrosscol has joined #ruby
Oxelist has joined #ruby
Oxelist has quit [Max SendQ exceeded]
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
commondream has joined #ruby
caseypatrickdris has joined #ruby
Oxelist has joined #ruby
pyo_ has quit []
Oxelist has quit [Max SendQ exceeded]
ndrei has quit [Ping timeout: 255 seconds]
malconis has joined #ruby
balazs has quit [Remote host closed the connection]
pepperbreath1 has joined #ruby
Oxelist has joined #ruby
Oxelist has quit [Max SendQ exceeded]
chinmay_dd has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
Oxelist has joined #ruby
Scroff has quit [Ping timeout: 272 seconds]
Oxelist has quit [Max SendQ exceeded]
Oxelist has joined #ruby
Oxelist has quit [Max SendQ exceeded]
Oxelist has joined #ruby
endash has joined #ruby
decoponio has quit [Quit: Leaving...]
ferr has quit [Ping timeout: 252 seconds]
Oxelist has quit [Max SendQ exceeded]
startupality_ has joined #ruby
tjbiddle has joined #ruby
Oxelist has joined #ruby
Oxelist has quit [Max SendQ exceeded]
commondream has quit [Ping timeout: 276 seconds]
scripore has quit [Quit: This computer has gone to sleep]
Oxelist has joined #ruby
Xiti has joined #ruby
Oxelist has quit [Read error: Connection reset by peer]
Oxelist has joined #ruby
startupality has quit [Ping timeout: 246 seconds]
startupality_ is now known as startupality
Oxelist has quit [Max SendQ exceeded]
krisquigley has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
Oxelist has joined #ruby
fgo has quit [Quit: WeeChat 1.1.1]
allcentury has joined #ruby
Xeago has joined #ruby
mister_solo has joined #ruby
veleno has joined #ruby
xxneolithicxx has joined #ruby
arup_r has joined #ruby
<veleno>
hi. writing tests with the Minitest framework, what is the suggested way to execute a group of tests all togheter (as in a suite of tests) ?
michaeldeol has joined #ruby
symbol has joined #ruby
mello has joined #ruby
mello has joined #ruby
davidhq has joined #ruby
Xeago has quit [Remote host closed the connection]
coderhs has joined #ruby
hanmac1 has joined #ruby
depesz has joined #ruby
<hanmac1>
shevy you may not notice but rwx is growing again!!! i added more code in the samples and the specs ,P
<depesz>
hi. I can't find it easily - what is the ruby way of getting system uid/gid of particular user/group?
<depesz>
I know I can `id -u user`, but it doesn't look clean
<flughafen>
later shevy hanmac1 Radar sevenseacat certainty arup_r Radar apeiros
<adaedra>
that double hl
<arup_r>
flughafen: why Radar twice ? ;)
<jhass>
flughafen: was that mass hl really necessary?
jwaldrip has joined #ruby
<arup_r>
jhass: he loves fun... Its ok
<hanmac1>
arup_r: this airport is SO big, it does need two Radars ,P
<depesz>
yeah. i missed "require etc". now i'm all good.
<chris2>
:)
someword has joined #ruby
symm- has quit [Quit: Leaving...]
axl___ has joined #ruby
jimms has joined #ruby
davedev24_ has joined #ruby
cmisenas has quit [Quit: cmisenas]
freerobby has joined #ruby
symm- has joined #ruby
diegoviola has quit [Read error: No route to host]
charliesome has joined #ruby
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
allomov has quit [Remote host closed the connection]
ndrei has joined #ruby
CustosLimen has quit [Ping timeout: 244 seconds]
ylla has joined #ruby
NeverDie has joined #ruby
balazs has joined #ruby
symbol has quit [Quit: WeeChat 1.1]
symbol has joined #ruby
Oxelist has quit [Ping timeout: 252 seconds]
Oxelist has joined #ruby
Oxelist has quit [Max SendQ exceeded]
scripore has joined #ruby
Oxelist has joined #ruby
Oxelist has quit [Max SendQ exceeded]
diego3 has joined #ruby
diego3 is now known as diegoviola
Oxelist has joined #ruby
gianlucadv has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
benlovell has quit [Ping timeout: 264 seconds]
balazs has quit [Ping timeout: 250 seconds]
duggiefresh has joined #ruby
hmnhf has quit [Quit: Konversation terminated!]
psy_ has quit [Ping timeout: 264 seconds]
barkerd427 is now known as zz_barkerd427
psy_ has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
fusillicode has joined #ruby
CustosLimen has joined #ruby
fusillicode has left #ruby [#ruby]
_ht has quit [Remote host closed the connection]
sevenseacat has quit [Quit: Me dun like you no more.]
banister has joined #ruby
_ht has joined #ruby
micmus has joined #ruby
chinmay_dd has joined #ruby
The_Phoenix has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yoongkang has joined #ruby
terlar has quit [Quit: WeeChat 1.2]
The_Phoenix has quit [Max SendQ exceeded]
edwinvdgraaf has joined #ruby
prasselpikachu has joined #ruby
The_Phoenix has joined #ruby
bruno- has joined #ruby
Xeago has quit [Remote host closed the connection]
orionstein_ is now known as orionstein
kinduff has joined #ruby
_ht has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
chinmay_dd has quit [Remote host closed the connection]
aganov has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
mase-chatter has joined #ruby
RegulationD has joined #ruby
gianlucadv has joined #ruby
adefa has joined #ruby
soosfarm_ has quit [Remote host closed the connection]
dumdedum has quit [Quit: foo]
jhooker has quit [Read error: Connection reset by peer]
shay- has joined #ruby
jhooker has joined #ruby
Palmer11 has quit [Quit: Palmer11]
whippythellama has joined #ruby
Spami has joined #ruby
<shay->
hi, I have a TCPServer listening on a port, and using .accept to get a socket for each connection (without multiple threads), so if a connection is running, another has to wait. Is is possible to raise an exception instead of letting the second connection wait (without multithreading)?
terlar has joined #ruby
adefa has quit [Ping timeout: 256 seconds]
senayar has joined #ruby
arup_r has quit []
ylla has quit [Ping timeout: 256 seconds]
commondream has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
Oxelist_ has joined #ruby
Oxelist_ has quit [Max SendQ exceeded]
zwh has joined #ruby
Oxelist_ has joined #ruby
JDiPierro has joined #ruby
CloCkWeRX1 has joined #ruby
Oxelist_ has quit [Max SendQ exceeded]
zwh has quit [Quit: Ex-Chat]
Oxelist has quit [Read error: Connection reset by peer]
carpet_the_walls has joined #ruby
<carpet_the_walls>
hello
Oxelist has joined #ruby
Oxelist has quit [Max SendQ exceeded]
jpfuentes2 has joined #ruby
plashchynski has quit [Quit: plashchynski]
<carpet_the_walls>
I am looking for duplicates with the following code: results = files.group_by{|file| file}.map{|k,v| [k,v.count] }
justintv90 has joined #ruby
andikr has quit [Remote host closed the connection]
<carpet_the_walls>
I have objects store in my array, and I have provided a == operator
Xeago has joined #ruby
ta has quit [Remote host closed the connection]
Oxelist has joined #ruby
<carpet_the_walls>
however it is not behaving as expected
justintv90 has quit [Max SendQ exceeded]
<hoelzro>
shay-: exception in the client, or server?
Oxelist has quit [Max SendQ exceeded]
nateberkopec has joined #ruby
<apeiros>
carpet_the_walls: you're referring to the objects referenced by `file`?
justintv90 has joined #ruby
<carpet_the_walls>
yes
Oxelist has joined #ruby
<apeiros>
carpet_the_walls: hash keys don't rely on ==
enebo has joined #ruby
Synthead has quit [Quit: Leaving]
<carpet_the_walls>
its a class that holds filename and filesize
Oxelist has quit [Max SendQ exceeded]
<apeiros>
carpet_the_walls: you need #eql? and #hash
justintv90 has quit [Max SendQ exceeded]
Synthead has joined #ruby
Oxelist has joined #ruby
depesz has left #ruby ["WeeChat 1.2-dev"]
CloCkWeRX has quit [Ping timeout: 246 seconds]
Oxelist has quit [Max SendQ exceeded]
justintv90 has joined #ruby
<apeiros>
in that case, you could probably write them as: def hash; [filename, filesize].hash; end; def eql?(other); other.class.equal?(self.class) && other.filesize == filesize && other.filename == filename; end
<shay->
hoelzro: the second connection is waiting until it gets accepted, I think there is not possiblity to refuse the second connection without multithreading
rippa has joined #ruby
CloCkWeRX has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
dejean has quit [Excess Flood]
<hoelzro>
shay-: I think you could
<hoelzro>
but also, why the aversion to threads?
someword has quit [Quit: Leaving.]
dejean has joined #ruby
khebbie has joined #ruby
aapole has quit [Ping timeout: 246 seconds]
benlovell has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
agent_white has quit [Read error: Connection reset by peer]
Miphix has joined #ruby
mary5030 has joined #ruby
krisquigley has joined #ruby
<shay->
hoelzro: right, was just curious is there is an easy way =)
jenrzzz has joined #ruby
caseypatrickdris has joined #ruby
dEPy has joined #ruby
justintv90 has joined #ruby
justintv90 has quit [Max SendQ exceeded]
platosha has joined #ruby
sepp2k has joined #ruby
skade has joined #ruby
fuzzyhorns has joined #ruby
jmignault has joined #ruby
carpet_the_walls has joined #ruby
<hoelzro>
heh, I don't know about easy =)
revath has quit [Ping timeout: 246 seconds]
CustosLimen has quit [Ping timeout: 252 seconds]
jhooker has quit [Quit: Leaving]
<carpet_the_walls>
apeiros, that worked a treat, thanks! I have one more change to make, could I get your help please? I want to output where the filename is the same, but the filesize is different https://gist.github.com/deathwishdave/53562c3d9417893e6cc1
jhooker has joined #ruby
blandflakes has joined #ruby
bluOxigen has joined #ruby
joaomdmoura has joined #ruby
<carpet_the_walls>
apeiros, i tried changinging the == to != in the == operator, but no joy
krisquigley has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
tubuliferous_ has joined #ruby
AhabsBeard has joined #ruby
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
redjack1964 has joined #ruby
casadei has joined #ruby
<apeiros>
carpet_the_walls: group by filename then?
<apeiros>
carpet_the_walls: also note that a == method should never raise
<apeiros>
yours will raise if other does not respond to the two methods you expect
<carpet_the_walls>
ok
leafybasil has joined #ruby
<carpet_the_walls>
if I group_by filename, then that won't enforce filesize has to be different
<apeiros>
no. but it's trivial from there.
<apeiros>
.uniq the resulting arrays -> only differing will remain
shay- has quit [Remote host closed the connection]
jhooker has quit [Read error: Connection reset by peer]
fuzzyhorns has left #ruby ["later nerds"]
jhooker has joined #ruby
segfalt has joined #ruby
AhabsBeard has quit [Ping timeout: 256 seconds]
charliesome has quit [Quit: zzz]
diegoviola has quit [Remote host closed the connection]
jordanm has quit [Remote host closed the connection]
vikaton has joined #ruby
yardenbar has quit [Quit: Leaving]
fusillicode has joined #ruby
fusillicode has left #ruby [#ruby]
dopie has joined #ruby
agent_white has joined #ruby
noname2 has joined #ruby
prasselpikachu has quit [Ping timeout: 265 seconds]
CustosLimen has joined #ruby
skade has quit [Ping timeout: 255 seconds]
allcentury has joined #ruby
yardenbar has joined #ruby
jhooker has quit [Ping timeout: 265 seconds]
Soda has quit [Remote host closed the connection]
tjbiddle has joined #ruby
segfalt has quit [Ping timeout: 252 seconds]
bigkevmcd has joined #ruby
dgutierrez1287 has joined #ruby
gambl0re has joined #ruby
tjbiddle has quit [Remote host closed the connection]
jhooker has joined #ruby
prasselpikachu has joined #ruby
justintv90 has joined #ruby
rushed has quit [Quit: rushed]
tvw has joined #ruby
mrsolo has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
well, Capybara.server = method(:run_ssl_server) would probably even work
<jhass>
but meh
<Papierkorb>
actually that lets me have a few symbols less cluttering the global scope, I think I'll go with a small class then, ty
towski_ has joined #ruby
<bootstrappm>
ljarvis how many monthly active users do you guys have if you don't mind me asking?
giuseppesolinas has joined #ruby
Xiti has quit [Quit: Xiti]
<ljarvis>
bootstrappm: a few hundred thousand iirc
<bootstrappm>
cool thanks
kinduff has quit [Ping timeout: 265 seconds]
iml_ has joined #ruby
slawrence00 has joined #ruby
livathinos has joined #ruby
msgodf has quit [Ping timeout: 255 seconds]
DaniG2k has quit [Quit: leaving]
gsd has quit [Quit: WeeChat 1.2]
livathinos has quit [Client Quit]
JDiPierro has quit [Remote host closed the connection]
Agoldfish has joined #ruby
startupality has quit [Read error: Connection reset by peer]
Xeago has quit [Read error: Connection reset by peer]
ascarter has joined #ruby
strixd has quit [Quit: 500]
CustosLimen has quit [Ping timeout: 258 seconds]
startupality has joined #ruby
iml_ has quit [Ping timeout: 276 seconds]
hoov has joined #ruby
olistik has quit [Remote host closed the connection]
stoogenmeyer_ has joined #ruby
olistik has joined #ruby
<hanmac>
shevy i added specs for stuff like WX::Point.new(x,y) == [x,y] or == OpenStruct.new({x: x, y: y}) for == {x: x ,y: y} will added later
scripore has quit [Quit: This computer has gone to sleep]
joonty has quit [Quit: joonty]
tenderlove has quit [Quit: Leaving...]
jcaho has quit [Read error: Connection reset by peer]
jcaho has joined #ruby
ruv has quit [Ping timeout: 264 seconds]
zz_barkerd427 is now known as barkerd427
Xiti has joined #ruby
yqt has quit [Ping timeout: 252 seconds]
DoubleMalt has joined #ruby
mase-chatter has quit [Quit: Leaving]
<pipework>
hanmac: Ooh comparable!
startupality has quit [Quit: startupality]
walterheck has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
anisha has quit [Quit: Leaving]
<hanmac>
pipework: its not so much using comparable, but more a aggressive way of duck-typing ;P
mrsolo has joined #ruby
<pipework>
hanmac: But you could though!
<pipework>
and that's neat.
nertzy has joined #ruby
stoogenmeyer_ has quit [Ping timeout: 265 seconds]
aapole has quit [Ping timeout: 265 seconds]
jhooker has quit [Ping timeout: 264 seconds]
bricker has joined #ruby
scripore has joined #ruby
jhooker has joined #ruby
alex88 has quit []
bantic has joined #ruby
allcentury has quit [Ping timeout: 256 seconds]
krisquigley has joined #ruby
scripore has quit [Client Quit]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DoubleMalt has quit [Ping timeout: 265 seconds]
rbowlby has joined #ruby
dmolina has quit [Ping timeout: 246 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
war_pigs has joined #ruby
war_pigs has quit [Max SendQ exceeded]
<dfockler>
aggressive ducks
msgodf has joined #ruby
bronson_ has joined #ruby
ascarter has joined #ruby
krisquigley has quit [Ping timeout: 264 seconds]
jpfuente_ has quit [Ping timeout: 276 seconds]
Jackneill has joined #ruby
jpfuentes2 has joined #ruby
decoponio has joined #ruby
someword has joined #ruby
iwaffles has joined #ruby
ascarter has quit [Client Quit]
<adaedra>
\_o<
feoh has joined #ruby
commondream has joined #ruby
<feoh>
Anyone have any suggestions for a good syntax completion mode for Ruby in emacs?
commondream has quit [Remote host closed the connection]
ruv has joined #ruby
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
senayar has quit []
<feoh>
I'd love it if something would add end blocks, and give me the ability to tab complete methods on an object.
towski_ has quit [Ping timeout: 272 seconds]
spider-mario has joined #ruby
commondream has joined #ruby
yqt has joined #ruby
noethics has quit [Ping timeout: 252 seconds]
stan has quit [Ping timeout: 256 seconds]
stoogenmeyer_ has joined #ruby
Parker0 has joined #ruby
revath has joined #ruby
adefa has quit [Quit: leaving]
_seanc_ has quit [Quit: _seanc_]
atm0sphere has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
nertzy has quit [Quit: This computer has gone to sleep]
gambl0re has quit [Ping timeout: 246 seconds]
k3asd` has quit [Ping timeout: 265 seconds]
gambl0re has joined #ruby
michael_mbp has quit [Excess Flood]
revath has left #ruby [#ruby]
the_real_intinig has joined #ruby
drocsid has joined #ruby
chipotle has quit [Quit: cheerio]
darkf has quit [Quit: Leaving]
<atm0sphere>
can anyone shoe me the roadmap hthat how to call c file through ffi ruby?
<atm0sphere>
show
<drocsid>
If I have two hashes, and want to remove the union of the hashes from the other hash, is there a method to do this, or do I need to write a loop to remove each key myself?
segfalt has quit [Quit: segfalt]
ruby-lang459 has joined #ruby
michael_mbp has joined #ruby
<ruby-lang459>
Hi, I know javascript but am teaching myself ruby could someone tell me if this is the proper/best syntax
<havenwood>
ruby-lang459: You're missing and `end` to your if statement
mikecmpbll has quit [Ping timeout: 264 seconds]
Hirzu has quit [Client Quit]
<havenwood>
ruby-lang459: Try it in irb or pry.
<adaedra>
?gistusage
<ruboto>
I don't know anything about gistusage
<adaedra>
?gist_usage
<ruboto>
To properly use gist, please enable syntax highlighting, either by choosing the language manually or by entering a proper filename. If you post multiple things, separate them into multiple files. If you have a Github account, please update your gist with new information instead of posting a new one.
<havenwood>
ruby-lang459: Now just drop the returns, and switch the hard tabs to two-spaces.
finisherr has joined #ruby
<adaedra>
you don't need the return, as value is passed outside the if
<adaedra>
and you don't need as many line returns
the_real_intinig has quit [Remote host closed the connection]
kerunaru has joined #ruby
<havenwood>
ruby-lang459: And if you want a cherry on top, rename the gistfile1.txt to my_method.rb for syntax highlighting and making it easier for others to try it out by cloning your gist.
susmus has quit [Ping timeout: 252 seconds]
intinig has joined #ruby
armyriad has quit [Read error: Connection reset by peer]
apofis has quit [Remote host closed the connection]
<havenwood>
ruby-lang459: Do you know how to use irb?
Spami has quit [Client Quit]
<adaedra>
In French, we have a saying "Never two without three"
<ruby-lang459>
nope
<adaedra>
Seems you broke it here.
<havenwood>
ruby-lang459: From your terminal type: irb
<drocsid>
I can't find a method which given two hashes, removes the intersection of the two hashes. But it should be easy enough to create this method. Acrually I don't even need to check the values, just the keys.
blueOxigen has joined #ruby
<adaedra>
see you all
<havenwood>
adaedra: o/
dionysus69 has joined #ruby
mister_solo has quit [Ping timeout: 272 seconds]
<adaedra>
drocsid: if you have activesupport, Hash#reject and Hash#keys
Spami has joined #ruby
<ruby-lang459>
ok
<havenwood>
ruby-lang459: Try out `5 == 10` and hit return, then `10 == 10` and hit return. What do they return?
<ruby-lang459>
false
intinig has quit [Ping timeout: 256 seconds]
<ruby-lang459>
true
<ruby-lang459>
well that make sense..
<havenwood>
ruby-lang459: With that in mind, what's the point of the if statement in your method?
<ruby-lang459>
to check if x is 10, if not it returns false
<havenwood>
ruby-lang459: The return value from the expression is already your desired return value.
whoami has joined #ruby
whoami is now known as howdoi
<havenwood>
ruby-lang459: So compare your if statement with `5 == 10` to just plain old: 5 == 10
<ruby-lang459>
you're saying the if/else is unnecessary
<havenwood>
aye
thiagoflins has joined #ruby
<havenwood>
ruby-lang459: Indent two spaces inside the method.
bluOxigen has quit [Ping timeout: 276 seconds]
<ruby-lang459>
i gotcha, i was doing it more just to learn how to setup a function/emethod
ascarter has joined #ruby
<havenwood>
ruby-lang459: Roger that.
veleno has quit [Ping timeout: 264 seconds]
<ruby-lang459>
if you were comparing a # regularly on a call, you would seutp a method though, no?
<howdoi>
sad, in ruby we can't typecast a boolean to an int, without extending the default classes
<howdoi>
true.to_int bombs ....hmm
_djbkd has joined #ruby
<bnagy>
wat
<havenwood>
howdoi: What's the context where you want `true` to be an Integer?
<bnagy>
you can't typecast anything to anything
<howdoi>
havenwood :param to db
<dfockler>
howdoi: you can always write your own function
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby
<howdoi>
"1".to_i
<howdoi>
we can do that, but not true.to_i, why?
fedexo has quit [Read error: Connection reset by peer]
<ruby-lang459>
i know html/css/javascript - but not many jobs for that
<bnagy>
because the real truth would SHOCK you!
<bootstrappm>
I think dfockler phrased it pretty well. Semantically, true has no integer representation
<howdoi>
in irb, if I do a true.<tab> why on earth does it show to_i and to_int if it does not work ?
<ruby-lang459>
Ruby and php seem to be most demanded
<howdoi>
bnagy heh heh I liked to face the truth :)
<dfockler>
and in ruby every but nil and false are truthy
<dfockler>
so any other integer would violate that idea
<howdoi>
true.object_id is 20 for me!
<havenwood>
ruby-lang459: Old languages have demand because they need maintaining and everyone is doing new things. Popular languages are in demand because there new things being grown. Obscure languages are in demand because no one knows them.
<bnagy>
yeah not a great idea to rely on that
GGMethos has quit [Ping timeout: 276 seconds]
<finisherr>
Is there an easy way for gemspec to include all files under lib? Just provide a method that searches for each file under the lib directory and returns an array?
<bnagy>
it's fixed per implementation afaik, and trues are immediates, effectively, like small ints
<bnagy>
but that's all interpreter business
<howdoi>
bnagy but why does irb tab complete those method which does not even operator on boolean ?
<bnagy>
nfi
<bnagy>
mine doesn't
<bootstrappm>
corollary: languages where most existing work has been phased out, have full libraries, and everybodys already tried are dead?
<howdoi>
bnagy :(
zotherstupidguy has quit [Quit: WeeChat 1.2]
kenpoint has quit []
<howdoi>
Display all 931 possibilities? (y or n)
rbowlby has quit [Remote host closed the connection]
jhooker has quit [Ping timeout: 265 seconds]
<havenwood>
?pry howdoi
<ruboto>
howdoi, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting ’binding.pry’ directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
<havenwood>
#=> not false. Everything in Ruby (except `false` and `nil`) are true...
rbowlby has joined #ruby
bMalum has joined #ruby
olistik has quit []
<sts>
jhass: Hm. How would I access it then?
<jhass>
sts: do |t|
<jhass>
t is the task object
<howdoi>
hanmac how do I know which are ruby methods and which are compiled ones?
dhialife has joined #ruby
k3asd` has quit [Ping timeout: 255 seconds]
<howdoi>
havenwood, nice
<hanmac>
howdoi: methods from core are mostly compiled ones, ones from stdlib are sometimes compiled too
<howdoi>
yeah, but is there a method or a way to check them in the cli?
<jhass>
howdoi: if you have pry-doc you don't need to care, just ? [].pretty_inspect or whatever
<jhass>
ri
<jhass>
ri String#gsub
<bootstrappm>
if you look in the online ruby documentation the ones that aren't compiled have a Show Source option
<howdoi>
hmm
<jhass>
bootstrappm: what docs do you use? all I do show the C source functions
susmus has joined #ruby
joaomdmoura has joined #ruby
AlphaAtom has joined #ruby
<bootstrappm>
you're right jhass my mistake. I should have said: the ones that are compiled start with rb_ and are clearly in C
AlphaAtom has quit [Max SendQ exceeded]
<bootstrappm>
when you click the Show Source option
<howdoi>
oki
krz has joined #ruby
zipace has joined #ruby
AlphaAtom has joined #ruby
baweaver has quit [Remote host closed the connection]
mdz_ has quit [Remote host closed the connection]
<sts>
jhass: yeah that worked.
<sts>
unfortunately it doesn't seem I can access t.sources from within Capistrano tasks.
krisquigley has joined #ruby
<jhass>
oO
drewo has joined #ruby
ruby-lang459 has quit [Ping timeout: 246 seconds]
AlphaAtom has quit [Client Quit]
cyrus_mc has joined #ruby
<jhass>
t.prerequisites ?
<jhass>
maybe sources was only for rules? I don't remember
<shevy>
hanmac don't forget the examples!
aapole has joined #ruby
ht__ has joined #ruby
maxshelley has joined #ruby
<cyrus_mc>
I ran into a situation where I required an updated ruby on a CentOS 6 box (as it only comes with 1.8.7. Built my own ruby 2.2.2 package. However the base repositories have RPMs for most gems. But they install in the 1.8.7 path. Is there a way to have the new version of ruby reference that path as well for gems, or else I would have to rebuild RPM for all the gems I need.
ki0 has quit [Remote host closed the connection]
maletor has joined #ruby
hahuang65 has quit [Ping timeout: 265 seconds]
ogpastal_ has quit [Remote host closed the connection]
ki0 has joined #ruby
baweaver has joined #ruby
thiagoflins has quit [Read error: Connection reset by peer]
<jhass>
cyrus_mc: 2.2.2 and 1.8 are ABI incompatible, so while yes, it will not work
<jhass>
cyrus_mc: get bundler and use --deployment, don't install gems via RPM
ogpastaling has joined #ruby
<cyrus_mc>
jhass: ok, I will look at bundler
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<drbrain>
they subclass Rake::Application to do special things
mello has joined #ruby
Domon has joined #ruby
<drbrain>
when I build larger tools atop rake I put all the guts in a Plain Ol' Ruby Library
<drbrain>
then call into the library from tasks that are 2–3 lines each
jgt2 has quit [Ping timeout: 245 seconds]
<sts>
drbrain: any examples?
gsd has joined #ruby
<drbrain>
hrm
<sts>
anyways I'm gonna figure it out. I got a small example working now
<sts>
nvm
<drbrain>
ok, I don't think I have anything in public repos
gsd has quit [Client Quit]
jwaldrip_ has joined #ruby
<drbrain>
one way to implement "if task A failed execute task B" is to have A rescue an exception and set a flag, then have B depend upon A and check the flag
blueOxigen has quit []
<drbrain>
if you don't control the source of A you can use invoke, (but ugh)
<jhass>
I still don't see why you need to stuff the failure case into a task at all
arooni-mobile has joined #ruby
joaomdmoura has joined #ruby
<jhass>
it's not like you'll ever call that task
ascarter has joined #ruby
<jhass>
it's there for when you actual task failed, as such it's actually part of that actual task
<jhass>
if you need to deduplicate just apply your regular programming skills, see above
ascarter has quit [Max SendQ exceeded]
axl__ has quit [Ping timeout: 245 seconds]
axl_ has quit [Ping timeout: 245 seconds]
axl___ is now known as axl_
mrsolo has quit [Quit: Leaving]
ascarter has joined #ruby
ascarter has quit [Client Quit]
jwaldrip_ has quit [Ping timeout: 244 seconds]
Xeago has joined #ruby
solars has quit [Ping timeout: 255 seconds]
jwaldrip_ has joined #ruby
mister_solo has joined #ruby
hakunin has joined #ruby
setient has joined #ruby
platzhirsch has left #ruby [#ruby]
sandelius has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
mister_s_ has joined #ruby
moretti has quit [Quit: Leaving...]
mike___1234 has quit [Ping timeout: 245 seconds]
krisquigley has quit [Remote host closed the connection]
umgrosscol has joined #ruby
aaeron has quit [Quit: aaeron]
apt-get_ has joined #ruby
apt-get_ has quit [Max SendQ exceeded]
Yiota has joined #ruby
<sts>
hmm. I send need to send different notifications based upon whether the run was successful or not.
aaeron has joined #ruby
<sts>
So i either need it as argument to one method, or I need two methods..
apt-get_ has joined #ruby
<shevy>
.succes
<shevy>
oops
<shevy>
.success and .failure
<shevy>
\o/
Eiam has joined #ruby
mister_solo has quit [Ping timeout: 252 seconds]
wallerdev_ has joined #ruby
Xeago has quit [Ping timeout: 272 seconds]
* apeiros
doesn't like tasks with code
dionysus69 has quit [Remote host closed the connection]
<apeiros>
I prefer rake task to call into library code
sarkyniin has quit [Ping timeout: 265 seconds]
wallerdev has quit [Ping timeout: 258 seconds]
wallerdev_ is now known as wallerdev
ascarter has joined #ruby
rockymadden has joined #ruby
mike___1234 has joined #ruby
Musashi007 has quit [Quit: Musashi007]
yaw has quit [Ping timeout: 255 seconds]
ascarter has quit [Client Quit]
hahuang65 has joined #ruby
michaeldeol has joined #ruby
slawrence00 has quit [Ping timeout: 276 seconds]
Xeago has joined #ruby
baweaver has joined #ruby
mwlang has joined #ruby
<jhass>
sts: yes, any problem with that?
umgrosscol has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
tubuliferous_ has quit [Read error: Connection reset by peer]
mike___1234 has quit [Ping timeout: 265 seconds]
tubuliferous_ has joined #ruby
nertzy has joined #ruby
<mwlang>
I need a better strategy for accessing values of a hash that can be 5 to 7 levels deep. For example: foo[:case_info][:docket][:defendant][:name][:first_name] I know I can use #fetch as foo.fetch(:case_info, {}).fetch(:docket, {}).fetch(:name, {}).fetch(:first_name, nil), but man, that’s unwieldy.
<dfockler>
mwlang: split them into separate objects?
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<dfockler>
or use something like OpenStruct to access them as members
<mwlang>
dfockler: I was thinking something along those lines…somehow break up and feed into a bunch of Structs or something.
jwaldrip_ has quit [Ping timeout: 276 seconds]
<jhass>
why are you so uncertain about the structure anyway?
<mwlang>
the challenge is, if any section is missing along the way, I want nil back.
<jhass>
why's all of that optional?
jwaldrip_ has joined #ruby
<mwlang>
jhass: legacy system and human error
<mwlang>
jhass: within a gov’t entity.
<mwlang>
jhass: ‘nuff said? :-)
<jhass>
meh
<jhass>
:P
rikai has joined #ruby
<mwlang>
jhass: it’s actually a bunch of SOAP exchanges I’ve turned into Hashes with the nori gem.
<shevy>
dfockler take schroedinger's cat. It maybe dead or it maybe alive. That's the example for a maybe monad
hdev1 has joined #ruby
jenrzzz has joined #ruby
veleno has quit [Quit: veleno]
<dfockler>
I understand how a Maybe works
umgrosscol has joined #ruby
<dfockler>
and Optional
<dfockler>
from Rust
<mwlang>
zekriad: thanks! checking it out now.
Scroff has quit [Ping timeout: 272 seconds]
Xeago has joined #ruby
jwaldrip_ has quit [Ping timeout: 256 seconds]
megaman has joined #ruby
<megaman>
Hi everyone
sepp2k has quit [Quit: Leaving.]
<dfockler>
He's a fighting robot!
leafybas_ has quit []
jwaldrip_ has joined #ruby
mister_s_ has quit [Ping timeout: 252 seconds]
megaman has left #ruby [#ruby]
drewo has quit [Ping timeout: 256 seconds]
<adaedra>
duh
<jhass>
you scared them :(
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bin_005 has joined #ruby
mc_fail has joined #ruby
kinduff has joined #ruby
kinduff has joined #ruby
whippythellama has joined #ruby
wallerdev has quit [Quit: wallerdev]
<apeiros>
dfockler: to me, it also was a very dying robot :(
giuseppesolinas has quit [Quit: This computer has gone to sleep]
drewo has joined #ruby
wallerdev has joined #ruby
Dingus has joined #ruby
zendrix has joined #ruby
joaomdmoura has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
lol
Xiti` has joined #ruby
postmodern has joined #ruby
jwaldrip_ has quit [Ping timeout: 265 seconds]
sdwrage has quit [Quit: This computer has gone to sleep]
ixti has quit [Ping timeout: 252 seconds]
<dfockler>
Did he die a lot?
mc_fail has quit [Ping timeout: 276 seconds]
<miah>
johnny 5 is alive!
Xiti has quit [Ping timeout: 250 seconds]
axsuul has quit [Ping timeout: 258 seconds]
mpistone has joined #ruby
khebbie has joined #ruby
jwaldrip_ has joined #ruby
Eiam_ has joined #ruby
allomov has joined #ruby
giuseppesolinas has joined #ruby
fabrice31 has joined #ruby
<shevy>
ohhhh
<shevy>
this is hilarious to no ends miah
<apeiros>
dfockler: megaman? yes. every other second.
<shevy>
that english line has a punch-line ... "johnny five, is alive"
<apeiros>
the only kind of death it didn't die was getting eaten by a grue…
<dfockler>
haha I don't remember that
mpistone has left #ruby [#ruby]
deric_skibotn has joined #ruby
<shevy>
in german it is "Nummer 5 lebt" which sort of is the translation "number five is alive"; but during that translation, the punchline is completely lost
yaw has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kyrylo>
Hi! Say I have allocated some memory with ALLOC_N(). Later on I have a conditional rb_raise() in my code. If the check doesn't pass I xfree() the allocated memory. My question is should I worry about the allocated memory if the rb_raise() conditional succeeds and I actually raise an exception
<ruboto>
it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
codecop has quit [Remote host closed the connection]
jerius has quit [Quit: /part]
bdnelson has joined #ruby
apofis has quit [Read error: Connection reset by peer]
Ox0dea has quit [Read error: No route to host]
ag4ve_ has quit [Ping timeout: 248 seconds]
apofis has joined #ruby
aphprentice has joined #ruby
juanpaucar has joined #ruby
axsuul has quit [Ping timeout: 272 seconds]
joneshf-laptop has quit [Remote host closed the connection]
gianlucadv has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
mrmargolis has quit [Remote host closed the connection]
apofis_ has joined #ruby
apofis_ has quit [Client Quit]
joneshf-laptop has joined #ruby
apofis_ has joined #ruby
bdnelson has quit [Quit: Computer has gone to sleep.]
cmisenas has joined #ruby
pullphinger has joined #ruby
podman has joined #ruby
apofis has quit [Ping timeout: 264 seconds]
apofis_ is now known as apofis
pullphinger has joined #ruby
jwaldrip_ has quit [Ping timeout: 272 seconds]
aphprentice has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jwaldrip_ has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
Ox0dea has joined #ruby
mdz_ has joined #ruby
<Ox0dea>
kyrylo: Your exception can always be caught, so the decision becomes whether or not you want to leak memory. :P
<Ox0dea>
Also, fast_method_source eats all the syntax errors during parsing, but Ruby's internal errno still gets set to non-zero.
<Ox0dea>
This makes programs using FSM likely to signal failure on exit when they shouldn't.
diegoviola has joined #ruby
drewo has quit [Ping timeout: 276 seconds]
jwaldrip_ has quit [Ping timeout: 255 seconds]
jwaldrip_ has joined #ruby
Ox0dea has quit [Read error: No route to host]
ajax0xd9 has joined #ruby
baweaver has quit [Remote host closed the connection]
<havenwood>
dukedave: Why are you looking at the second ancestor?
<dukedave>
havenwood: it happened to be the second one I'm checking in my app code.
_djbkd has joined #ruby
<havenwood>
dukedave: Ah, I misunderstood your question.
<jhass>
dukedave: what's .method(:is_a?).owner ?
<jhass>
and .source_location ?
<dukedave>
Let me rephrase more generally: Shouldn't `klass.ancestors.all? { |ancestor| klass.is_a? ancestor }` always be true (for all possible values of `klass`) ?
<apeiros>
dukedave: na
<apeiros>
instance vs. class
IanV0rn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
klass is not an instance of its ancestors
<apeiros>
klass.new is
<dukedave>
jhass: `klass.method(:is_a?).owner` is `Kernel`
Ox0dea has joined #ruby
<dukedave>
apeiros: ahhhh
<apeiros>
dukedave: i.e., klass.class here will return Class.
<Ox0dea>
dukedave: klass < ::ProtocolBuffers::Message ought to give you the `true` you're looking for.
<apeiros>
and klass is TransitRealtime::FeedMessage
<apeiros>
given the ancestors response
wallerdev has quit [Quit: wallerdev]
<dukedave>
I've fallen for a variant of the old `===` vs `==` haven't I XD
IanV0rn has joined #ruby
<apeiros>
IMO not. but not sure how broadly you define "variant" here…
<dukedave>
apeiros: you got it
sdwrage has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<fragger5>
vBulletin Plugins/Products for version 3.8x are being added every few minutes if you find one you like, download it, if there isn't refresh the page every few minutes URL for plugins/products -> https://www.criosphinx.net/boards/forumdisplay.php?f=24
fragger5 has quit [Client Quit]
giuseppesolinas has joined #ruby
<mwlang>
jhass: I was originally trying to pass a second option, but the *keys seemed to swallow it.
bin_005 has quit [Ping timeout: 246 seconds]
<jhass>
mwlang: no, to fetch, instead of rescuing
<mwlang>
jhass: ah.
giuseppesolinas has quit [Client Quit]
pikos has quit [Remote host closed the connection]
<apeiros>
Hunter1: I wouldn't take a crappy programmer no matter the degree
Eiam__ has joined #ruby
<Hunter1>
ged == high school diploma for retards
<Hunter1>
it's what i have]
Eiam__ is now known as Eiam
<Hunter1>
and i don't know my options or worth in life
<Hunter1>
i feel like killing myself
<mwlang>
Hunter1: yes, if they prove they gots the goods to code — I’ve hired a few with no formal training, though not many.
<adaedra>
apeiros: interesting. How do you do the difference between a good and a crappy programmer?
Eiam has quit [Changing host]
Eiam has joined #ruby
<apeiros>
adaedra: we interview them
startupality has joined #ruby
bgmarx has joined #ruby
<apeiros>
best question to judge quality so far: bring code you're proud of and explain it in 10-15min (the code, and why you're proud of it)
<Hunter1>
apeiros: what if they improve the code while they're explaining it and say their code sucks
<adaedra>
apeiros: wow. kind of question that could kill me :(
<Hunter1>
like they're realizing how awful it is and are now correcting themselves and saying how it could be imprived
<Hunter1>
improved*
MarkTurner has quit [Ping timeout: 276 seconds]
ht__ has quit [Quit: Konversation terminated!]
<apeiros>
Hunter1: you can't answer such questions in theory.
<apeiros>
there's no recipe about it
<apeiros>
you get a feel of the person, of the code they're able to produce, the reasoning behind, etc.
<Hunter1>
i feel like i would be the type of person that would say how bad my code is
<Hunter1>
and then improve it on the fly
<havenwood>
Hunter1: Improve your code until you're proud of it.
<mwlang>
Hunter1: if they’re improving code as they explain it, then they’re comfortable with continuous code improvements and code review with open, frank feedback.
centrx has joined #ruby
<mwlang>
Hunter1: and that’s generally a good thing.
<apeiros>
Hunter1: but I guess I'd ask questions wrt why you're proud of it, yet say it sucks. also what the reasons are that you're now able to improve your code. and probably why you think it needs improving.
<apeiros>
mwlang: I don't like special casing last args
<apeiros>
i.e. the `keys.pop.call if keys.last.is_a?(Proc)`
<Hunter1>
mwlang: i generally don't have much of an ego... i just have a "yay i can do it" kind of thing and then when it works i ask myself how i can improve it
<havenwood>
Hunter1: Are you learning Ruby?
<Hunter1>
yes
<Hunter1>
i'm learning ruby and objective c
renier has joined #ruby
<Hunter1>
i'll move onto swift because it's better and cleaner
<adaedra>
[objc learn];
<Hunter1>
whoever invented swift knew what they were doing
<havenwood>
Hunter1: Why not start with Swift?
<Hunter1>
havenwood: because objective c makes you allocate memory
<Hunter1>
and you learn how memory works like that
<adaedra>
Mh
<adaedra>
Apples requires ARC now no? It kinds of hides memory allocation?
<adaedra>
Apple
gsd has quit [Quit: WeeChat 1.2]
<Hunter1>
swift is like ruby and you don't know how it's being handled other than that memory is allocated magically
<Hunter1>
i don't like magic
<Hunter1>
not in programming
wallerdev has joined #ruby
<Hunter1>
magic is what hackers are after
krisquigley has joined #ruby
adavia has quit [Ping timeout: 256 seconds]
jaycee has joined #ruby
kobain has joined #ruby
centrx has quit [Ping timeout: 276 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Cyberheb has joined #ruby
bMalum has quit [Quit: bMalum]
<ljarvis>
Hunter1: I'm a fan of learning how memory works, but honestly I wouldn't bother spending too much time on obj-c if you plan on learning Swift
<Hunter1>
i want to make a phone app
<Hunter1>
and then i want to make a website
<Hunter1>
the idea is to start my own company
JDiPierro has quit [Remote host closed the connection]
<ljarvis>
nice one
<Hunter1>
but all i have is a ged and a drive to succedd
<Hunter1>
succeed*
<ljarvis>
well, that's all you need
<Hunter1>
but i don't think i'll go very far because of how badly i screwed up my college career
<Hunter1>
i have a .8 gpa
mdz_ has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<ljarvis>
I don't have a college career and I'm doing pretty well
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_djbkd has quit [Remote host closed the connection]
<ljarvis>
degrees and college. These things are not a prerequisite of success
bronson_ has joined #ruby
<apeiros>
Hunter1: if you get your act together now, nobody will care about your degree.
willharrison has joined #ruby
krisquigley has quit [Ping timeout: 264 seconds]
gianlucadv has quit [Ping timeout: 264 seconds]
_djbkd has joined #ruby
<apeiros>
the part where a bad degree is a real issue is getting through HR screening
<ljarvis>
heh
<Hunter1>
i'm 23 and i'm a complete loser :(
<Hunter1>
i think i ran out of time
jamto11_ has joined #ruby
<ljarvis>
eh, you're not even close to out of time
<drocsid>
Hunter1: lol 23 is young
<havenwood>
what's the average life expectancy these days? 24 or 25?
<ljarvis>
you're still young
mike___1234 has joined #ruby
gsd has joined #ruby
gsd has quit [Client Quit]
<adaedra>
havenwood: it depends. Are you a horse?
<drocsid>
Hunter1: if you make it by your mid 30s you're doing pretty well. Alot of people don't get there shit together until 40s, and some never do.
<havenwood>
adaedra: I am *not* a horse!
<mwlang>
Hunter1: some of the most successful entrepreneurs are self-taught, so you’ll be in good company.
<adaedra>
havenwood: if you're not a horse, clap your hooves!
Shidash has joined #ruby
<drocsid>
sure some freaks are well off in there 20s, and sometimes these people fall down later in life.
* havenwood
signals it's a trap to the other... not-horses.
<adaedra>
:D
sivoais has quit [Remote host closed the connection]
jalcine is now known as mynameisearl
sivoais has joined #ruby
<shevy>
Hunter1 eh don't give up, just shrug it off and continue
Jackneill has quit [Remote host closed the connection]
JDiPierro has quit [Remote host closed the connection]
<apeiros>
heh, "You have excellent written communication skills. You are extremely pedantic about spelling and grammar, but remain an affable human being nonetheless."
solars has quit [Ping timeout: 276 seconds]
omgs has joined #ruby
<omgs>
Hi
<ljarvis>
that's the customer service role
<omgs>
I'm not a ruby coder, but a sysadmin
ascarter has quit [Max SendQ exceeded]
<apeiros>
ljarvis: yes. that sounded like a fit. I like to support customers. that's what I'm doing now.
<apeiros>
*coughs*
<ljarvis>
heh
ascarter has joined #ruby
<omgs>
I've been given a ruby app for host migration, and I'm afraid I have to rebuild it
moretti has joined #ruby
Rickmasta has joined #ruby
symbol has quit [Ping timeout: 265 seconds]
<omgs>
But I don't know the essentials for that, beyond "rake"
<shevy>
ack
<omgs>
Anyone to lend me a hand?
A205B064 has joined #ruby
Scroff has quit [Remote host closed the connection]
spyderman4g63 has quit [Ping timeout: 255 seconds]
<havenwood>
omgs: What kind of app?
<adaedra>
✋
<omgs>
It's a webapp, if that's what you ask
<havenwood>
omgs: Does it have a Gemfile?
serialsito has joined #ruby
zendrix has joined #ruby
<havenwood>
omgs: Show us the code?
Musashi007 has joined #ruby
<omgs>
Yes, I've done a tar file of what I think is the whole app, from the old host
<omgs>
IT's a lot of files and directories
<omgs>
But I can show the app "failing" via web
<havenwood>
omgs: Gemfile, yes or no?
<omgs>
havenwood: yes
<havenwood>
omgs: Contents?
<havenwood>
omgs: Rails?
agent_white has quit [Quit: bag]
marr has joined #ruby
<omgs>
Do you want the first error when running "rake"?
<havenwood>
omgs: Is it a Rails app?
<havenwood>
omgs: Sinatra?
<havenwood>
omgs: Rack?
<havenwood>
omgs: What do you have?
<omgs>
havenwood: I'm not sure
<shevy>
:)
<havenwood>
omgs: Hence me asking.
<shevy>
grep through the source
<havenwood>
omgs: Your Gemfile...
<adaedra>
gist the damn Gemfile
atomical has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
also put up info about the system; ruby -v; gem --version
chipotle has joined #ruby
bgmarx has quit [Remote host closed the connection]
<ruboto>
General advise in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
bgmarx has joined #ruby
<omgs>
Ok, now I'm www-data
freerobby has quit [Quit: Leaving.]
<dfockler>
just pop a little sudo on that command and watch it fly
<omgs>
ruboto: Yeah, I know, I just wanted to chown later
<ruboto>
omgs, I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
k3asd` has joined #ruby
orionstein has joined #ruby
<omgs>
Sorry for pasting more than 3 lines ;(
<ljarvis>
omgss
umgrosscol has quit [Quit: Quit]
<adaedra>
omgs: give us the Gemfile!
<omgs>
You have already activated rake 10.1.0, but your Gemfile requires rake 0.9.2.2. Using bundle exec may solve this.
<omgs>
That's what rake says
moretti has left #ruby ["Leaving..."]
<adaedra>
Prefix your command by bundle exec
DEA7TH has quit [Ping timeout: 265 seconds]
<havenwood>
omgs: Look in your Gemfile and at least tell us if it's a Rails or Sinatra app or what?
davedev24_ has joined #ruby
yqt has quit [Ping timeout: 246 seconds]
<dfockler>
oh man `be` is an alias for `bundle exec` woo~
<omgs>
havenwood: sorry, bear with me since I'm not used to "Sinatra" or some concepts
nateberkopec has quit [Quit: Leaving...]
cmisenas has joined #ruby
<omgs>
gem 'rails', '3.2.6'
<adaedra>
So it's rails
<havenwood>
A Rails 3 app. Okay.
<Hunter1>
does anyone know what the best mood is?
<Hunter1>
mooc*
<havenwood>
?rails omgs
<ruboto>
omgs, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<Hunter1>
os x is correcting words :(
<havenwood>
omgs: Like adaedra said, prefix `bundle exec` to your command or you're not in the context of your bundle.
<Hunter1>
is ruby on rails worth learning?
<omgs>
So, there's nothing do to here anymore?
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra>
Ah, auto-correcting, one of the first thing I disable
<adaedra>
omgs: #RubyOnRails is more suited for rails apps, they will give you more accurate answers normally.
<omgs>
havenwood: I did, it misses one specific version of openssl
gamename has quit [Remote host closed the connection]
<omgs>
libcrypto.so.0.9.8: cannot open shared object file: No such file or directory - /var/www/apps/tcj/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.11/lib/mysql2/mysql2.so
<omgs>
That what "bundle exec rake" throws
gamename has joined #ruby
<adaedra>
'night all
<omgs>
I have "/usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0"
<havenwood>
adaedra: \o
<dfockler>
adaedra: goodnight
<miah>
later
<omgs>
So, I think I need to tell to change the libcrypto version?
sinkensabe has quit [Remote host closed the connection]
<ljarvis>
i'm off, g'night
<havenwood>
ljarvis: \o
michael_mbp has quit [Excess Flood]
ascarter has quit [Max SendQ exceeded]
Dingus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has quit [Remote host closed the connection]
tubulife- has joined #ruby
djdarkbeat has joined #ruby
ascarter has joined #ruby
ascarter has quit [Client Quit]
_ht has quit [Quit: Konversation terminated!]
skade has quit [Quit: Computer has gone to sleep.]
<havenwood>
`Nibble: How'd you install Ruby?
failshell has joined #ruby
michael_mbp has joined #ruby
<`Nibble>
havenwood: rvm
qwertme has joined #ruby
<havenwood>
`Nibble: RVM ships with rubygems-bundler, which automatically prefixes `bundle exec` when there's a Gemfile present... for `bundle`.
iwaffles has joined #ruby
tubulife- has quit [Client Quit]
Narzew has quit [Quit: Leaving]
tubuliferous_ has quit [Ping timeout: 256 seconds]
e1nh4nd3r has joined #ruby
<`Nibble>
havenwood: I see, I'll give a look to the rubygems-bundler code
<havenwood>
`Nibble: So `bundler` likely isn't getting an automagical `bundle exec` prefix, so you're not in the context of your bundle and it can't find stuff.
<`Nibble>
havenwood: tricky
<`Nibble>
let's see :)
micmus has quit [Quit: Leaving]
<havenwood>
`Nibble: Thought it's the install command? I dunno.
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
redjack1964 has quit [Remote host closed the connection]
bin_005_j has quit [Read error: Connection reset by peer]
plashchynski has joined #ruby
iltempo has joined #ruby
fabrice31 has joined #ruby
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
commondream has joined #ruby
iltempo has quit [Client Quit]
swgillespie has joined #ruby
wald0 has joined #ruby
SouL_|_ has joined #ruby
apt-get_ has quit [Quit: Quit]
<omgs>
havenwood: can you still help me?
<havenwood>
omgs: Did you uninstall your odd Ruby and install the Wheezy package?
danzilio has quit [Quit: Baiii!]
dgutierrez1287 has joined #ruby
<omgs>
havenwood: AFAIK, it's the wheezy package
<omgs>
How to check and/or proceed?
<havenwood>
omgs: If it was the updated Wheezy package it'd be linked against the proper OpenSSL, so I don't think it is.
iwaffles has quit [Quit: iwaffles]
nfk has quit [Quit: yawn]
<havenwood>
omgs: Uninstall it and reinstall it? Or investigate the package you have installed further.
fabrice31 has quit [Ping timeout: 276 seconds]
Dingus has joined #ruby
Xeago has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
c355E3B has quit [Quit: Connection closed for inactivity]
iamninja has quit [Read error: Connection reset by peer]
ag4ve_ has joined #ruby
iamninja has joined #ruby
leafybasil has quit [Quit: Changing server]
<omgs>
havenwood: I guess the mysql2 driver is linked with that old version
<havenwood>
omgs: Run?: bundle
j4cknewt has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
plashchynski has quit [Quit: plashchynski]
<havenwood>
omgs: I haven't had a chance to look closely at what you've linked - multitasking at the moment.
cndiv has quit []
<omgs>
I've just run bundle and bundle exec rake, and no change
<havenwood>
omgs: Just open irb and confirm you can?: require 'openssl'
joelataylor has joined #ruby
<omgs>
"true"
<havenwood>
puts OpenSSL::OPENSSL_VERSION
<omgs>
penSSL 1.0.1e 11 Feb 2013
<havenwood>
omgs: ^
kinduff has quit [Ping timeout: 250 seconds]
singalaut has left #ruby ["WeeChat 1.3-dev"]
<havenwood>
omgs: So your Ruby seems fine on first inspection.
<omgs>
OpenSSL 1.0.1e 11 Feb 2013
<omgs>
havenwood: yeah, I think the compiled mysql2 driver has to be recompiled or something
<havenwood>
omgs: bundle exec gem pristine mysql2
<zenspider>
anyone here know rack internals?
joelataylor has quit [Ping timeout: 265 seconds]
<jhass>
?anyone
<ruboto>
Just ask your question, if anyone has or can, they will respond.
<jhass>
sorry :P
pkrnj has joined #ruby
<zenspider>
I got spastorino to start looking in #rack
<jhass>
oh, so I shall pull ?crosspost too? :P
enebo has quit [Quit: enebo]
<omgs>
havenwood: ok, that seems to have solved the problem
<havenwood>
omgs: \o/
<benlieb>
is there a way to rescue exceptions at a class level?
meph has joined #ruby
ta has joined #ruby
<dfockler>
benlieb: what do you mean?
arooni-mobile has quit [Ping timeout: 250 seconds]
Forgetful_Lion has quit [Ping timeout: 265 seconds]
Dingus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<benlieb>
dfockler: for example if any of my methods raise an exception, is there a custom method that I can define that would rescue it?
<Radar>
?crosspost
<ruboto>
Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
idafyaid has quit [Ping timeout: 256 seconds]
<Radar>
jhass: cheers for the #protip
<failshell>
so i have file1 and file2. both share common data. and have pieces that are different. i want to merge those 2 files. i want to keep the shared common data and merge the differences as well. how would you do that?
<dfockler>
Radar: who was that aimed at?
<Radar>
dfockler: it was aimed at benlieb
<dfockler>
ahhh ok
<Radar>
He posted the same question in #rubyonrails
<benlieb>
I have about 20 methods that all basically do a begin / rescue with the same kind of exception
<Radar>
benlieb: show us the code
jenrzzz has joined #ruby
<jhass>
Radar: another one, you can target facts with ?foo nick
<Radar>
You could probably have a single method for wrapping the exception and then call that method in each of the other methods
baweaver has joined #ruby
<Radar>
jhass: seems backwards. I like helpa's name: !<tip>
nateberkopec has joined #ruby
platosha_ has joined #ruby
<jhass>
I guess we could do both
dfinninger has quit [Remote host closed the connection]
<jhass>
I see both styles used equally
_blizzy_ has quit [Read error: Connection timed out]
rockymad_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<volty>
Radar: and how could you, then, distinguish which one failed ?
krisquigley has joined #ruby
_blizzy_ has joined #ruby
<havenwood>
benlieb: One thing, you can drop the `begin` and `end` and just `rescue` from the method.
<volty>
nonsense, both ways
<havenwood>
benlieb: For the methods that begin with `begin` that is.
<zenspider>
benlieb: what you're asking for is a bad design smell
mary5030 has quit [Ping timeout: 256 seconds]
<zenspider>
you could refactor to an error_handler method that yields the body
<benlieb>
Oh, I didn't know that you could leave out the begin. There is a lot of redundancy that does rescue Faraday::Error => error handle_ned_error(error) end
jack_rabbit has joined #ruby
cndiv has joined #ruby
<zenspider>
def handle_errors; yield; rescue Faraday::Error => error; ...; end
cndiv has quit [Changing host]
cndiv has joined #ruby
<zenspider>
then it'd be handle_errors do ... end in each method
<dfockler>
^ I've done this before, and it works
<benlieb>
zenspider: that's an interesting idea...
<zenspider>
of course, if every method in here is doing the same thing, it's still a design smell
<zenspider>
the caller should probably be handling errors
<zenspider>
and it is non-idiomatic in ruby to start methods with get_
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benlieb>
not every method, but it's basically a class that talks to an API, so a lot of the methods can throw a Faraday (http) error
ogpastal_ has joined #ruby
krisquigley has quit [Ping timeout: 252 seconds]
<zenspider>
well... it looks like every one. the ones that don't call methods that do
<zenspider>
"NED.instance." is totally redundant since self is already the singleton
<zenspider>
singleton is ALSO a bad design smell
Forgetful_Lion has joined #ruby
<zenspider>
you really want all API access to bottleneck through a single object/thread?
fragger5 has joined #ruby
<volty>
handling exceptions is one thing, messaging (based) on exceptions is yet another one // as for the http codes it would be better to place all those messages in a hash code => message
dgutierrez1287 has quit [Remote host closed the connection]
<zenspider>
did you install rvm AND use it to build a version of ruby?
<zenspider>
I do agree with Radar. rvm is a pita.
k3asd` has quit [Ping timeout: 265 seconds]
<zenspider>
I use rbenv + ruby-install. chruby is equivalent afaik
monsieur1 has joined #ruby
<Guest12955>
Ah going to bed. Thanks guys
<Guest12955>
exit
endash has quit [Quit: endash]
<Guest12955>
\wc
Guest12955 has left #ruby [#ruby]
<Hunter1>
it's possible to build a new version of ruby? how???
<zenspider>
I never understand that...
<benlieb>
zenspider: Radar: do you have specific design recommendations in this case, given that it is smelly
endash has joined #ruby
<zenspider>
benlieb: for now I'd go with my handle_errors suggestion above
<zenspider>
but later you might want to look at solidifying your design from the caller's side... unless that file is the top-level API
<zenspider>
Hunter1: how did you build your first version of ruby?
<zenspider>
or did it come stock?
monsieurp has quit [Ping timeout: 255 seconds]
monsieur1 is now known as monsieurp
<Hunter1>
zenspider: i downloaded ruby from the ruby website
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider>
like, a binary installer?
<zenspider>
windows I assume?
Yiota has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
<benlieb>
zenspider: what do you mean from the caller's side?
_seanc_ has quit [Quit: _seanc_]
redlegion has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<benlieb>
The system is a rails API that basically sits in front of a more low level java API
<benlieb>
The rails app handles auth and sessions etc, and also makes messaging more "human". Internally we hit the java api ourselves, but we expose only the rails app that other's can hit
<shevy>
Hunter1 you have to provide more information; for instance, what is the exact link you use; what is your operating system etc... you don't provide a lot of information right now
dionysus69 has quit [Quit: dionysus69]
<zenspider>
_something_ calls those methods. it can be responsible for doing the error handling
ged has joined #ruby
rubie has quit [Remote host closed the connection]
chrisja has quit [Quit: leaving]
<volty>
since he doesn't need to know which one failed ....
<shevy>
Hunter1 this one? ftp://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.2.tar.xz
<volty>
I would go with a unique (only one) method passing a hash from which to build the query // for me there are too many methods around (clerk id, clerk lover, clerk's boss etc etc) // a matter of taste, of course
<zenspider>
odd... Hunter1 doesn't seem to want to answer questions that might help us answer his question.
<Aeyrix>
Ignore zenspider.
redlegion has joined #ruby
<shevy>
hmm he does have a slow reaction, perhaps webchat user :D
<shevy>
I have to sleep soon though
<Aeyrix>
Perhaps discouraged by the culture of technical elitism. :^)
<Hunter1>
yes i'm a web chat user lol
<zenspider>
volty: that can get messy tho. either passing through slop or having a ratsnest to validy there is no slop.
<zenspider>
validate. ugh. my fingers are troublesome
<volty>
it's only that your are too fast, @shevy :)
<Hunter1>
shevy: on ruby lang it has a button to download ruby
<Aeyrix>
Hunter1: What operating system are you using? Windows?
glcx has quit [Ping timeout: 255 seconds]
<Diabolik>
is codementor.io the best service for paid pair programming?
<volty>
zenspider: of course, but If I have to lose time and write all those methods, I'd go directly with querying directly or build something more sohpisticated
e1nh4nd3r has quit [Quit: Leaving.]
<Hunter1>
yes windows and i'm also using ubuntu and os x
<zenspider>
volty: *nod*
<Hunter1>
what's the best system to use?
<Aeyrix>
Um.
<Aeyrix>
OS X or Ubuntu.
mrsolo has quit [Quit: Leaving]
Ropeney has joined #ruby
<Aeyrix>
I use OS X personally. Some in here use Ubuntu/Linux.
<Diabolik>
unless someone here wants to help :P
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zenspider>
Diabolik: not sure there is a "best". there are more and more every day tho
<Aeyrix>
For OS X you just run, in the Terminal application, `brew install ruby`.
<Aeyrix>
Then you're done.
swgillespie has joined #ruby
<Diabolik>
i just need a half hour to sort out some problems in my app
<zenspider>
hrm... how much does that service charge? I wonder if I should sign up :)
glcx has joined #ruby
<cyrus_mc>
Trying to use bundler in my RPM spec file. Install path should be /opt/puppet/lib/ruby/gems/2.2.0/ so I specify --path on install as /opt/puppet/lib. But it adds on the relative path ruby/2.2.0/gems. The gems and 2.2.0 are reversed.
bgmarx has quit [Remote host closed the connection]
<Diabolik>
zenspider pm?
<Aeyrix>
Hunter1: Pick your OS and someone can help you install it.
<Aeyrix>
But you can't say "oh I have three of them lol"
rubie has joined #ruby
michaeldeol has quit [Ping timeout: 255 seconds]
freerobby has joined #ruby
AndChat299081 has joined #ruby
nunayerBeezwax has joined #ruby
<zenspider>
Diabolik: sorry. my plate is full atm.
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Diabolik>
np
allcentury has joined #ruby
freerobby has quit [Client Quit]
monsieurp has quit [Changing host]
monsieurp has joined #ruby
Langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vikaton has quit [Quit: Connection closed for inactivity]
qwertme has joined #ruby
<dfockler>
what projects do people look at for good ruby architecture?
Yiota has joined #ruby
<volty>
not quite (in) english :)
moshee has joined #ruby
<volty>
ops, sorry, another chan
bgmarx has joined #ruby
<volty>
there are only good «programming architecture» paradigms // when you master that abstract, the specifics go by themselves
Yiota has quit [Client Quit]
<Radar>
Who can say what it truly means to be "good"?
Musashi007 has joined #ruby
<volty>
or, translated: you are not going to be a good architect just by looking at nice buildings :)
<volty>
s/to be/to become/
<baweaver>
Radar: What causes me not to fly into a blood rage
<Radar>
baweaver: fair :)
<baweaver>
read: Java / Perl
edwinvdgraaf has quit [Ping timeout: 264 seconds]
<zenspider>
baweaver: that's a low bar :P
<Aeyrix>
Perl's great mate.
<weaksauce>
you forgot php baweaver
dionysus69 has joined #ruby
* baweaver
is currently using Java for Spark jobs for some reason
<Aeyrix>
Uh oh.
* baweaver
is remembering why he hates it
<baweaver>
Hackathon and most of the codebase is already Java
<zenspider>
dfockler: it's incredibly subjective. I think xkcd was onto something w/ the "wtf / minute" measurement
<baweaver>
so instead of screwing with getting both of them to play together or rewriting the dang thing...
* baweaver
sighs
<dfockler>
oh haha, I was just looking a Resque, and HAML, and the codebases for those are clear to read through
<volty>
dfockler: write whatever, and refactor it forever — the best way :)
<Radar>
dfockler: Read through the Rails source for some good times
<Radar>
That codebase isn't confusing _at all_
<baweaver>
For varying definitions of the word good
Sheik` has joined #ruby
<zenspider>
Radar: that's mean
<Radar>
zenspider: It is.
startupality has quit [Quit: startupality]
<zenspider>
I know... read minitest's source and then go read rspec's source. :P
<Radar>
hahaha
<baweaver>
zenspider: read rack's source
<baweaver>
how many evals was that?
<volty>
on the architects' wave: you are not going to become a good boxer watching box
aapole has quit [Ping timeout: 255 seconds]
<dfockler>
volty: yeah I need to build more buildings
jhooker has joined #ruby
nunayerBeezwax has quit []
<zenspider>
baweaver: I happen to be right now. :)
<dfockler>
zenspider: throwing down the unit test gauntlet!
<zenspider>
working on converting the tests from bacon to minitest
<volty>
dfockler: or beat more your keyboard :)
<zenspider>
surprisingly easy with minitest-bacon :)
<baweaver>
dfockler: It's more like accidentally destroying the supports for a few buildings and having to play Atlas on production support trying to keep it alive whilst fixing
<baweaver>
For the life of me I don't get why they're evaling to get the version in there though.
<dfockler>
my first big ruby project and we chose to rebuild it from scratch :P
<Radar>
baweaver: source?
<baweaver>
I read through it a few days back and stared at that one for a bit
<baweaver>
just a sec
<zenspider>
oh in lib/rack/builder.rb ? interesting.
deric_skibotn has quit [Ping timeout: 265 seconds]
yfeldblu_ has joined #ruby
<zenspider>
(no comma on line 3)
mrsolo has joined #ruby
<omgs>
zenspider: well, there are two occurrences of that
nunayerBeezwax has quit [Client Quit]
<volty>
omgs: you have a virus inside your server
<zenspider>
then get rid of both
<omgs>
If I remove both commas, then the application fails
_djbkd has quit [Quit: My people need me...]
bdnelson has joined #ruby
<omgs>
I mean, gets in a loop
<zenspider>
there's one comma on line 3
<omgs>
And I have to restart the webserver
<zenspider>
also, that's not a loop
<Diabolik>
zenspider are you sure? :D
bayed has quit [Quit: Connection closed for inactivity]
symm- has quit [Ping timeout: 265 seconds]
giuseppesolinas has quit [Client Quit]
<zenspider>
Diabolik: that I'm busy? yes... I'm doing a horrible job of staying on task tho
<Diabolik>
:|
<Diabolik>
fair
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 265 seconds]
x1337807x has joined #ruby
deric_skibotn has joined #ruby
msnyon has quit [Ping timeout: 258 seconds]
<omgs>
Maybe I have to "resize" Passenger?
<omgs>
Is Passenger on-topic here?
finisherr has quit [Quit: finisherr]
<zenspider>
_I_ think it is ruby-enough
j4cknewt has joined #ruby
<omgs>
I wonder how to put passenger in debug moder for this
GPrime has joined #ruby
<Hunter1>
why do you prefer programming in ruby over other languages?
<zenspider>
omgs: `ruby -cw path/to/file.rb` on your local machine and server should be enough
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
_djbkd has joined #ruby
<volty>
Hunter1: reason 1 - for the same reason you prefer to speak in your mother language
<Hunter1>
my mother language is russian and i prefer to speak english
mistermocha has quit [Remote host closed the connection]
<zenspider>
haha
<zenspider>
volty: showed you
<volty>
Hunter1: you are an exception that, being an exception, confirms that rule (and do not try to troll at me :) )
aphprentice has quit [Remote host closed the connection]
<Hunter1>
i'm trying to understand what makes ruby a good choice in programming
Yzguy has joined #ruby
_seanc_ has quit [Quit: _seanc_]
<dfockler>
I like ruby because it lets you code how you want and the people who use ruby generally don't take themselves too seriously
<shevy>
Hunter1 it fills a similar niche that perl/php/python do
<volty>
so, Hunter1, prove it by answering (fast) in russian why are you asking such a question
bkxd has joined #ruby
<Hunter1>
i don't get what you're trying to get me to prove
dfockler has quit [Remote host closed the connection]
<shevy>
ack ... volty speaks russian too
<Hunter1>
oh
mattcc has quit []
<volty>
pocemu?
<Aeyrix>
Hunter1: Most people pick it up because they enjoy the syntax over other languages.
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<volty>
(hunter1 went on google translate .... , ah ah ah )
chouhoulis has joined #ruby
swgillespie has joined #ruby
<Hunter1>
so the syntax is what makes it nice then?
<Aeyrix>
Yeah.
<Aeyrix>
For me, at least.
<Aeyrix>
I'd venture for most in here.
<Hunter1>
have you tried swift?
pkrnj has quit [Quit: Computer has gone to sleep.]
<volty>
dynamic, no types, no burden of clumsy python like indent-structuring
prereflect has joined #ruby
mary5030 has joined #ruby
commondream has quit [Remote host closed the connection]
<Aeyrix>
I've used Swift.
jhooker has quit [Ping timeout: 276 seconds]
jhooker has joined #ruby
sharpmachine has quit [Remote host closed the connection]
charliesome has joined #ruby
<Hunter1>
do you like swift's syntax over ruby's?
<Aeyrix>
No.
idafyaid has joined #ruby
<omgs>
[App 29834 stderr] /var/lib/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
<volty>
object oriented, with mixing, so you are more free to think about the design, pretty readable
<Aeyrix>
omgs: That's an old version of Ruby, there.
<omgs>
That's the system library, isn't it?
dorei has quit []
<zenspider>
pure OO is what I prefer about ruby. very few languages really are.
<volty>
no small-state-of-the-art haskell like constructs, but impossible-to-read haskell like mess
mrsolo_ has joined #ruby
blackmesa has quit [Quit: WeeChat 1.2]
<omgs>
Aeyrix: I see two versions: 3.2.12 and 4.0.0
<omgs>
I guess that if I just delete (previous tar) the 3.2.12, it could solve the problem?