<VeryBewitching>
1) If it's giving you a success result, but it's bouncing, then I don't think it has to do with authentication. Google clearly responded that what you did was OK. I would make the assumption that it has to do with the message and it's formatting.
<VeryBewitching>
2) That's weird.
hadees has quit [Client Quit]
<VeryBewitching>
Do you control the account it's sending to?
tubuliferous_ has quit [Ping timeout: 265 seconds]
_djbkd has joined #ruby
uber has quit [Ping timeout: 260 seconds]
jgt has quit [Ping timeout: 260 seconds]
<chopin>
VeryBewitching: Yes, it's to another account of mine
Encapsulation has quit [Quit: Leaving]
<VeryBewitching>
So it's both is never received, and you get a bounce, but the API says 'OK' I would assume the message maybe missing something.
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
PaulCapestany has joined #ruby
inteq has joined #ruby
<chopin>
VeryBewitching: That's what I was thinking... That it wasn't picking up the recipient. I just can't figure out how to check the request that it's sending
benjito_ has joined #ruby
<dravine>
any of you people work in Perl at all?
<dravine>
or want too?
<eam>
dravine: sure
<VeryBewitching>
Well if it's failing now and the API is giving you a 200 response, that's curious.
<dravine>
www.pragprog.com has Modern Perl fourth edition in ebook format for free
<VeryBewitching>
chopin: ^
willharrison has joined #ruby
<dravine>
also, wrong channel, but still a cool deal :D
<chopin>
VeryBewitching: Yeah, driving me crazy.
<rehat>
trying to create a ruby script to automate something we do a lot in git. What is the benefit of using a gem like Rugged over calling STDOUT backtick commands?
hooper has quit [Quit: Leaving.]
hadees has joined #ruby
houhoulis has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has joined #ruby
benjito_ has quit [Ping timeout: 264 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
_djbkd has quit [Remote host closed the connection]
bmurt has joined #ruby
_djbkd has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
<VeryBewitching>
chopin: Does Google have development logs about API use?
<VeryBewitching>
chopin: I'd be curious to see what's actually going on.
<chopin>
VeryBewitching: I just checked on that and it doesn't seem to be active. Just keeps showing me the "Read about Logs" pop up
BTRE has quit [Ping timeout: 256 seconds]
hadees has quit [Quit: hadees]
<jhass>
rehat: git doesn't need to be installed or the scripts PATH
<jhass>
*or in the
nateberkopec has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
tenderlove has joined #ruby
jessemcgilallen has quit [Ping timeout: 240 seconds]
<rehat>
jhass: ok thanks
jpfuentes2 has quit [Ping timeout: 272 seconds]
chopin has quit [Remote host closed the connection]
maletor has joined #ruby
mistermocha has quit [Remote host closed the connection]
workmad3 has joined #ruby
riotjones has joined #ruby
uber has joined #ruby
martin290 has joined #ruby
ebbflowgo has joined #ruby
<martin290>
hey everyone
ebbflowgo has left #ruby [#ruby]
<ja>
hi martin290
<martin290>
how are ya?
<ja>
i'm great thanks. you?
<martin290>
doing well, thanks!
Ox0dea has joined #ruby
BTRE has joined #ruby
<ja>
cool!
<martin290>
ja, you like ruby, huh?
<ja>
do you like ruby? ʘ‿ʘ
<ja>
haha
<ja>
yes.
<martin290>
lol
<martin290>
i actually haven't used it...
<ja>
really?
<martin290>
been trying to learn c#.net MVC
<martin290>
kind of have a headache lol
<martin290>
i know php a bit though
<ja>
yeeeah, I can imagine, although I've never tried it
eminencehc has joined #ruby
<martin290>
trying to look for a "good" server side languag
<ja>
C# looks good, though, I'd say
<ja>
Ruby should be a good bet for "good"
<martin290>
yeah, it's an awesome language to program in
<martin290>
web stuff just kills me though
<ja>
Yeah, me too
<martin290>
ruby is only for web, right??
<ja>
It's the worst, but it pays my bills so I try not to complain
<ja>
No way! You're thinking of Ruby on Rails, maybe
<martin290>
ahhhh
<ja>
the web framework
<ja>
Ruby is general purpose
<havenwood>
martin290: nope
riotjones has quit [Ping timeout: 244 seconds]
<martin290>
is Ruby like python?
<ja>
pretty much, yeah, depending on how you define "like"
<Ox0dea>
havenwood: Thoughts on the "safe navigation" operator having made it into Ruby?
<martin290>
like as in... dynamically typed
<ja>
only better if you ask me ^_^ foo.bar.baz reads a lot better than baz(bar(foo))
<ja>
yes
workmad3 has quit [Ping timeout: 250 seconds]
<martin290>
so you can create applications with ruby??
<martin290>
like... desktop apps?
<ja>
it's possible if you use some GUI toolkit
GriffinHeart has joined #ruby
<martin290>
ah
diegoaguilar has quit [Ping timeout: 272 seconds]
<ja>
but I don't know if I'd recommend it
<martin290>
so do you do web stuff, usually?
<ja>
yeah
<ja>
and command-line scripts
<martin290>
ah ok
<martin290>
it's the "statelessness" of the web that totally kills
_djbkd has quit [Remote host closed the connection]
<martin290>
kills me*
<martin290>
refresh the page.. poof.. form data goes away
<ja>
hm, yeah, that can be a bit weird if you're used to "stateness"
Darryl___ has quit [Quit: Connection closed for inactivity]
tenderlove has quit [Read error: Connection reset by peer]
tubuliferous_ has quit [Ping timeout: 260 seconds]
Eiam_ has joined #ruby
Jameser has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
moeabdol has quit [Read error: Connection reset by peer]
RegulationD has joined #ruby
nettoweb has joined #ruby
s2013 has joined #ruby
rbowlby has joined #ruby
towski_ has joined #ruby
rbowlby has quit [Remote host closed the connection]
tenderlove has joined #ruby
towski_ has quit [Remote host closed the connection]
Seventoes has joined #ruby
Seventoes has left #ruby [#ruby]
moeabdol has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
Sam_Gerber has quit [Quit: Leaving]
SamGerber has quit [Quit: Leaving]
tjbiddle has joined #ruby
baweaver has joined #ruby
ReK2 has quit [Quit: Konversation terminated!]
nettoweb has quit [Ping timeout: 255 seconds]
tvon has joined #ruby
NeverDie has joined #ruby
levifig_ has joined #ruby
bmn has quit [Ping timeout: 272 seconds]
Trieste has quit [Ping timeout: 264 seconds]
gener1c has joined #ruby
greedo has quit [Ping timeout: 240 seconds]
sankaber has joined #ruby
greedo has joined #ruby
bmn has joined #ruby
NeverDie has quit [Max SendQ exceeded]
towski_ has joined #ruby
Soda has joined #ruby
Trieste has joined #ruby
towski_ has quit [Remote host closed the connection]
NeverDie has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
gener1c_ has quit [Ping timeout: 260 seconds]
braincrash has quit [Quit: bye bye]
dfinninger has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tubuliferous_ has joined #ruby
tvon has quit [Quit: leaving]
zenguy_pc has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
konrath has quit [Quit: Leaving]
kyle__ has joined #ruby
tenderlove has joined #ruby
tenderlove has joined #ruby
braincrash has joined #ruby
allcentury has quit [Ping timeout: 250 seconds]
rgb-one has quit [Ping timeout: 244 seconds]
devoldmx has joined #ruby
<rehat>
new to ruby is there a better way to programmatically increment a line of text like "pod 'Alamofire', '~> 2.0.0'" to "pod 'Alamofire', '~> 2.0.1'" ? This is what I have so far lol https://gist.github.com/rehat/4cd713023853a72ca4ab
baweaver has quit [Remote host closed the connection]
<Ox0dea>
Do you think nobu would be cross if I pointed out that `::?` should probably work also?
Gnomethrower has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mark2 has joined #ruby
Hounddog has quit [Ping timeout: 240 seconds]
<apeiros>
I would hope nobu would say that :: should not be used for method invocation anymore.
tjbiddle has quit [Ping timeout: 272 seconds]
but3k4 has joined #ruby
<adaedra>
So a.?b.c would not call c if b return nil, but directly return nil?
<apeiros>
but cool, do I read this correctly that we will have .? soon?
Gnomethrower has joined #ruby
joonty has joined #ruby
<apeiros>
a.?[](key).?[](key) will be ugly, but well, still less ugly than && chains
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
Hounddog has joined #ruby
<Ox0dea>
adaedra: No, you have to explicitly chain it.
<adaedra>
So a.?b.?c
<Ox0dea>
Right.
<adaedra>
And it's not calling b if a is nil
<adaedra>
Ok, I see it
<adaedra>
Neat.
tkuchiki has quit [Remote host closed the connection]
<Ox0dea>
It doesn't even evaluate the arguments in that case.
davedev24 has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
davedev24 has quit [Remote host closed the connection]
<adaedra>
So we can have a.?b?
davedev24 has joined #ruby
<Ox0dea>
Oui.
dikaio has quit [Quit: ........]
howdoicomputer has joined #ruby
<Ox0dea>
(I'm trying to break it. :P)
jxs_ has quit [Remote host closed the connection]
<adaedra>
I didn't expect any less from you.
roshanavand has quit [Remote host closed the connection]
<Ox0dea>
I'm sure if nobu wanted he could've defined the new DOTQ token in terms of dot_or_colon, so maybe the lack of ::? isn't an oversight after all.
Jameser` has quit [Ping timeout: 268 seconds]
tenderlove has joined #ruby
tkuchiki has joined #ruby
rbowlby has joined #ruby
gustav_ has quit [Remote host closed the connection]
<Ox0dea>
I like the part where subtracting from 90 and 180 is giving her hell.
<norc>
Is there a better way to stop a consumer in this producer/consumer pattern than this? http://pastie.org/10499409
<norc>
(Aside from Queue#close which might appear in 2.3)
<Xeago>
apeiros: assuming length of 1 and using trigonometric functions is difficult to do without a calculator, which is the setting for these exercises
teclator has quit [Quit: Lost terminal]
<chris2>
you can do it in the head
<chris2>
i think?
tenderlove has quit [Read error: Connection reset by peer]
<Xeago>
I've my equations to solve it as such, it doesn't help me explain to her how to solve it without one
<apeiros>
Xeago: a couple of values are well known, and I'd bet for the angle in question it's one of those
<adaedra>
Psst, now that we have ruby questions, it may be a good time to move it to oddtopic, people
<adaedra>
err, offtopic
Eternal has left #ruby [#ruby]
<Xeago>
chris2: then I'd get an answer represented in cos(∆)*n
<Xeago>
adaedra: sure, will do!
<TheBrayn>
Xeago: what's the length of EB?
<Ox0dea>
?ot TheBrayn
<ruboto>
TheBrayn, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
<TheBrayn>
kk
lee-jon has joined #ruby
roshanavand has quit [Remote host closed the connection]
<shevy>
what is EB
<norc>
shevy. Look - I wrote code!
<adaedra>
norc: I suppose you want to be able to wait on an empty queue so Queue#empty? would be out of question
<shevy>
norc in C?
<norc>
shevy: :(
<norc>
adaedra: Yeah.
moeabdol has quit [Read error: Connection reset by peer]
<norc>
adaedra: The producers access "sluggish" resources on a network, so it is possible that at times the consumer might empty the queue fast enough.
tenderlove has joined #ruby
moeabdol has joined #ruby
Pupeno has joined #ruby
Jackneill_ has joined #ruby
<adaedra>
norc: unrelated to you issue, but while(true) => loop do
<adaedra>
your*
chipotle has quit [Quit: cheerio]
roshanavand has joined #ruby
<norc>
adaedra: Oh neat thanks.
twe4ked has joined #ruby
<adaedra>
And I think you want ==, not ===
<TheBrayn>
Xeago: query
<adaedra>
leave === to which
<norc>
adaedra: Ah that was a mispaste from the wrong buffer. Im instantiating the Stop class. But either way yeah
Jackneill has quit [Ping timeout: 252 seconds]
lee-jon has quit [Quit: lee-jon]
<adaedra>
Otherwise, you can also have a variable that your process sets to true at the end and check for this variable in your loop, maybe as a class attribute somewhere.
GriffinHeart has quit [Remote host closed the connection]
dionysus69 has quit [Read error: Connection reset by peer]
naftilos76 has joined #ruby
<adaedra>
Why?
GriffinHeart has joined #ruby
Xeago has joined #ruby
<Ox0dea>
To be fair, I don't actually know how he feels about it.
twe4ked has quit [Read error: Connection reset by peer]
<Ox0dea>
But the issue got directly assigned to him the day I proposed it, and it's just kinda languished since. :<
tenderlove has joined #ruby
twe4ked has joined #ruby
TPBallbag has joined #ruby
<Ox0dea>
strs.all?(/foo/) looks so "Ruby", does it not?
joonty has joined #ruby
Xeago has quit [Remote host closed the connection]
sameerynho has joined #ruby
arup_r has quit [Quit: Leaving]
rodfersou has joined #ruby
joonty has quit [Ping timeout: 252 seconds]
howdoicomputer has quit [Ping timeout: 264 seconds]
emilkarl has quit [Quit: emilkarl]
<shevy>
ewwww
<shevy>
this must be rejected!
<shevy>
actually, what is .all? doing?
<shevy>
ah
<shevy>
if all elements have the pattern match
<Ox0dea>
#all? and #any? are very handy.
<Ox0dea>
#one? and #none?, not so much.
<Ox0dea>
But having to open an explicit block for them is eww.
<shevy>
hmmm
blueOxigen has quit [Ping timeout: 250 seconds]
<shevy>
you are using enumerators in a different way there right?
rbowlby has quit [Remote host closed the connection]
<Ox0dea>
Hm?
<shevy>
the .all?(/foo/)
moeabdol has quit [Read error: Connection reset by peer]
<shevy>
that would be new right?
<Ox0dea>
Yes.
<shevy>
now I can understand the opposition in ruby-core :-)
<Ox0dea>
As it stands, we have to say `strs.all? { |s| /foo/ === s }`.
moeabdol has joined #ruby
<shevy>
yeah
<Ox0dea>
Syntactic noise, an arbitrary name, and just general unpleasantness.
<shevy>
ruby core sorta became sleepier from what I could see when matz went to invest time into mruby
<Ox0dea>
shevy: What opposition?
<shevy>
to new syntax variants!
<shevy>
like the .all?(/foo/) without block
<Ox0dea>
It's not new syntax, though.
<Ox0dea>
It's just properly leveraging case equality.
psycho_one has joined #ruby
vigintas has quit [Quit: vigintas]
Igorshp has joined #ruby
psycho_one has quit [Client Quit]
kraljev11 has quit [Ping timeout: 240 seconds]
psycho_one has joined #ruby
tenderlove has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
ushbkk has quit [Remote host closed the connection]
tenderlove has joined #ruby
joonty has joined #ruby
andykingking has joined #ruby
krz has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
TPBallbag has quit [Remote host closed the connection]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
darthdeus has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
subscope has joined #ruby
<darthdeus>
hey guys, when trying to bundle my repo, I'm getting the following: https://gist.github.com/darthdeus/1cf71d8af57a582741d7 ... which is weird because my ruby install is using rbenv (confirmed that `which ruby` and `which gem` both point to the rbenv shims)
<darthdeus>
and `rbenv versions` shows 2.2.3 instead of the system one as well
<darthdeus>
(I'm on arch linux)
spider-mario has joined #ruby
<shevy>
the same distribution that jhass uses \o/ now he only has to wake up ...
joonty has quit [Quit: joonty]
<jhass>
well, I don't use rbenv
hmsimha has quit [Ping timeout: 265 seconds]
<darthdeus>
hehe
vigintas has joined #ruby
<jhass>
which bundle ?
<darthdeus>
bundler version 1.10.6
<darthdeus>
it's a fairly clear install of everything
<jhass>
nah, `which bundle`
CanTonic has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ajb is now known as ajb-
<darthdeus>
hmm, that points to $HOME/.gem/ruby/2.2.0/bin/bundle
<darthdeus>
I guess that's the issue :D
krz has joined #ruby
<jhass>
yeah
nfk|laptop has quit [Quit: yawn]
<jhass>
gem install bundler
<darthdeus>
thanks, now stuff works :)
<jhass>
perhaps after a echo "gem: --no-user-instal" > ~/.gemrc
<shevy>
typo!
<jhass>
ah, then nvm
<darthdeus>
I actually did a user install on purpose before, because I didn't want to use rbenv for simple things
<darthdeus>
but I guess I forgot to update my path :\
<workmad3>
ljarvis: yeah, that's pretty much my reaction too
hanmac has quit [Ping timeout: 246 seconds]
<shevy>
u.?profile.?thumbnails.?large could be extended into u.?profile?.?thumbnails?.?large?
<shevy>
and then it would be unfair to prefer only ? so we would also need u.!profile!.!thumbnails!.!large!
tenderlove has quit [Read error: Connection reset by peer]
<Ox0dea>
> would be unfair
<adaedra>
wat
<workmad3>
shevy: haha
<jhass>
workmad3: ljarvis so who wants to PR to bbatsov and disallow it everywhere? :P
<Ox0dea>
That'd be a laugh.
<workmad3>
shevy: unless someone is writing pretty bad code, `u.?profile?.?thumbnails` would error (because TrueClass and FalseClass don't support a `thumbnails` method)
moeabdol has joined #ruby
codecop has quit [Remote host closed the connection]
trampi has quit [Remote host closed the connection]
<adaedra>
ibouvousaime: more seriously, it seems that's the thing you use to execute the script that adds the last return at the end. How do you run it?
joonty has joined #ruby
<ibouvousaime>
hehe its on codeacademy
tkuchiki has quit [Remote host closed the connection]
<adaedra>
So it's totally possible that it prints the last result.
TPBallbag has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 256 seconds]
trampi has joined #ruby
<Ox0dea>
ibouvousaime: The Codecademy REPL is showing you the value of the last expression (as REPLs are wont to do).
<Ox0dea>
In this case, that's the return value of `words.each`, which is `words`.
<ibouvousaime>
ohh yeah it worked there wanted to add a space after the "letters"
<Ox0dea>
Codecademy is the MyMathLab of programming, apparently.
stamina has joined #ruby
allcentury has joined #ruby
<jhass>
Ox0dea: haha, reminds me of some system we had to use at university
hanmac has joined #ruby
dmolina has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<adaedra>
Ox0dea: ahah
dmolina has quit [Client Quit]
purplexed^ has joined #ruby
linocisco has joined #ruby
<linocisco>
khon ni chi wa
robbyoconnor has quit [Ping timeout: 265 seconds]
sdothum has joined #ruby
Tuxist has joined #ruby
Tuxist has quit [Remote host closed the connection]
mbeasley has left #ruby ["WeeChat 0.4.2"]
tenderlove has quit [Read error: Connection reset by peer]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
<ibouvousaime>
Ox0dea, thats so frustrating xD
<Ox0dea>
ibouvousaime: It builds character.
tenderlove has joined #ruby
ericjphillips has joined #ruby
<Ox0dea>
> For all its power, the computer is a harsh taskmaster. Its programs must be correct, and what we wish to say must be said accurately in every detail.
<Ox0dea>
Welcome to the Thunderdome.
marr has quit [Ping timeout: 260 seconds]
prestorium has joined #ruby
dmolina has joined #ruby
<linocisco>
is somebody using ruby with digium asterisk framework for mobile payment solution?
blackmesa has quit [Ping timeout: 252 seconds]
dmolina has quit [Client Quit]
<shevy>
workmad3 ah right, I forgot that it would call methods on true or false
weihan has quit [Ping timeout: 260 seconds]
nhhagen has joined #ruby
mollusk_ has joined #ruby
Coldblackice has quit [Ping timeout: 250 seconds]
beauby has joined #ruby
<mollusk_>
is it possible to do variable functions in ruby like in php?
<purplexed^>
did you try asking google ? :)
<mollusk_>
purplexed^, google keeps giving me unrelated results
<shevy>
ibouvousaime I usually give an argument to .split because I can't remember the default, but you should be able to omit it
tenderlove has joined #ruby
<adaedra>
[docs intensifies]
<mollusk_>
adaedra, same difference though
symbol_ has joined #ruby
<ibouvousaime>
ohh okay thanks
<adaedra>
mollusk_: that was for style
JJM has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
you can send(pkgMgr)
kalusn has quit [Remote host closed the connection]
<mollusk_>
adaedra, not sure how that would be what I want
<Ox0dea>
...
<adaedra>
You want to call a method which name is store into pkgMgr, right?
<adaedra>
is stored*
<joncol>
Hi, I'm having some difficulties with RSpec: how can I verify that a callback (a Proc) is invoked? I pass the callback to the invoker by using `obj.register_listener(listener.method(:callback_name))`. My callback is actually invoked, but I don't know how to make RSpec verify this. Doing `expect(listener).to receive(:callback_name)` doesn't work (I guess since the proc is not called via the `listener` object,
<joncol>
but directly using `Proc#call`. Can anyone help?
<shevy>
"I have functions already made: apt-get()"
<adaedra>
`expect(callback).to be_called`, iirc
SOLDIERz has joined #ruby
atzorvas has quit [Quit: leaving]
<shevy>
are you sure you have a method called apt-get made mollusk_
<adaedra>
Ah, didn't catch that :D
<adaedra>
Mh, I have `.to receive(:call)` in my code
gustav_ has quit [Remote host closed the connection]
<mollusk_>
shevy, it's in another file, also, functions are called methods in ruby right?
<adaedra>
yes
<adaedra>
methods are defined with def
<mollusk_>
I get caught up with the syntax and terminology in ruby a lot
<mollusk_>
vs other languages
<adaedra>
A method is a function bound to an object.
<Ox0dea>
>> "foo \s\t\n bar \s\t\n baz".split # ibouvousaime
<joncol>
adaedra: I've tried `.to receive(:call)` but that doesn't work, since the method is not called via the object.
symbol has joined #ruby
<adaedra>
ah, it worked in my case
symbol_ has quit [Read error: Connection reset by peer]
<joncol>
adaedra: Did you call the method using normal obj.call(...) syntax?
kalusn has joined #ruby
Igorshp has joined #ruby
gustav_ has joined #ruby
<adaedra>
yes
jgpawletko has joined #ruby
<mollusk_>
adaedra, send("#pkgMgr") worked, but looking at it, I can't understand what I am reading, which is why I wasn't sure if it would help me. Is it just looking for a method named 'pacman()' and then calling it?
<mollusk_>
#{pkgMgr}
<adaedra>
`send(pkgMgr)` was sufficient.
<adaedra>
also, like ljarvis said, public_send
<adaedra>
(my bad)
<Ox0dea>
joncol: You'll need to attach the expectation to the Proc itself; do you know how to get hold of it?
<adaedra>
So yes, it tries to call a method named "pacman" on the current object (here main) and run it
chop1n has joined #ruby
dionysus69 has joined #ruby
<Ox0dea>
adaedra: That's not quite right.
<mollusk_>
adaedra, public_send, is like like local vs global variables?
<Ox0dea>
The default visibility of a method is contextual.
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby
<mollusk_>
adaedra, not well at all
<Ox0dea>
mollusk_: What made you decide to ditch PHP?
<mollusk_>
Ox0dea, never used php, it just came up in google
bruno- has quit [Ping timeout: 268 seconds]
<mollusk_>
I did a lot of bash scripting, some lua and a tiny bit of python before ruby
<mollusk_>
I wanted a python without whitespace
<adaedra>
mollusk_: don't try to do a parallel with PHP. They are not the same languages and do not work the same way.
<Ox0dea>
s/PHP/Bash/, now that we know.
<adaedra>
That too.
cantaberry has joined #ruby
<mollusk_>
adaedra, I figured that, but I thought php wouldn't be the only one to have variable functions
<mollusk_>
it seems to be the only one
nemo_ has quit [Remote host closed the connection]
<adaedra>
What you described above is not really variable functions though.
<adaedra>
It's a cheap trick.
<mollusk_>
well, syntax wise
<Ox0dea>
mollusk_: Is that the important part?
<adaedra>
And once again, I don't remember how it is called.
synthroid has joined #ruby
Rollabunna has quit [Read error: Connection reset by peer]
<Ox0dea>
Dynamic dispatch.
<mollusk_>
Ox0dea, pretty much, I get confused with ruby because there are ruby ways of doing things
<shevy>
ruby is php on elegant steroids
Rollabunna has joined #ruby
<adaedra>
That's not the term I'm looking for, Ox0dea. I'm talking about having functions in variables directly.
<shevy>
there are simple ways in ruby
<shevy>
eval!
<Ox0dea>
adaedra: First-class citizenship?
<adaedra>
Ox0dea: danke schön.
<mollusk_>
var.each |i| vs for i, seems pretty straight forward but if I say it for the first time I would go....what the heck?
tenderlove has quit [Ping timeout: 246 seconds]
<zwdr>
Ruby is infinitely more fun than PHP
<mollusk_>
saw*
<adaedra>
mollusk_: you can't save a method itself in a variable in Ruby. However, you can get Method object which you can call, through method, you can have Proc objects for anonymous functions, or you can use (public_)send if you just have the name.
<shevy>
.each is the object-centric variant, think of an inventory like a backpack, then you shuffle through its content via .each
micw has joined #ruby
<micw>
hi
<mollusk_>
adaedra, so I can't do: myvar = methodName() ?
<Ox0dea>
No, that'll invoke the method.
<adaedra>
No, but you can myvar = method(:methodName)
dmolina has joined #ruby
gustav_ has joined #ruby
<adaedra>
ri:Object#method will create a Method object that you can call, which will forward to the real method.
<mollusk_>
I was afraid I would have to use something like sed
<mollusk_>
eww
jas02 has quit [Quit: jas02]
<mollusk_>
Ox0dea, there is a problem though, since pacman doesn't have a hyphen like apt-get does, the ruby script crashes when pkgMgr is set to pacman.
<caliostro>
GameOverException stop the main thread
<caliostro>
why?
nemo_ has joined #ruby
Igorshp has quit [Remote host closed the connection]
rwilcox_ has quit [Quit: WeeChat 1.2-dev]
RegulationD has joined #ruby
dmolina has quit [Quit: Leaving.]
rwilcox has joined #ruby
bruno- has joined #ruby
TPBallbag has joined #ruby
JDiPierro has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
vifino has quit [Ping timeout: 246 seconds]
t_mmyv has joined #ruby
sankaber has joined #ruby
t_mmyv has quit [Client Quit]
sankaber has quit [Remote host closed the connection]
pathrocle has quit [Ping timeout: 240 seconds]
ajafo has quit [Ping timeout: 246 seconds]
Pupeno has quit [Remote host closed the connection]
imperator has joined #ruby
ajafo has joined #ruby
sankaber has joined #ruby
Pupeno has joined #ruby
Igorshp has joined #ruby
<sonOfRa>
When I add a gem via git to my bundle, and it contains native extensions, does it build the whole thing on bundle install or do I need to do additional things (arguments?) for that?
vifino has joined #ruby
e1senhorn has joined #ruby
auzty has quit [Quit: Leaving]
vondruch has quit [Quit: Ex-Chat]
Guest50 has joined #ruby
TPBallbag has quit []
gyre007 has left #ruby [#ruby]
wldcordeiro has joined #ruby
e1senhorn has quit [Client Quit]
rbennacer has quit [Remote host closed the connection]
e1senhorn has joined #ruby
<sonOfRa>
looks like the .so is present. nevermind :)
araujo_ has quit [Quit: Leaving]
dravine has quit [Quit: dravine]
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
mnzaki has quit [Quit: *fade*]
mnzaki has joined #ruby
TheTime has joined #ruby
dionysus69 has joined #ruby
TheTime has quit [K-Lined]
aryaching has joined #ruby
chouhoul_ has joined #ruby
chouhoulis has quit [Read error: Connection reset by peer]
davedev2_ has joined #ruby
levifig_ has quit []
syath has joined #ruby
`tim` has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
joncol has joined #ruby
justbleed has joined #ruby
`tim` has quit [Disconnected by services]
justbleed is now known as `tim`
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dravine has joined #ruby
<caliostro>
i am realy sure how abort_on_exception works
<joncol>
When using RSpec and doing `expect(obj).to receive(:fun_name)` it seems RSpec overwrites my `fun_name` method with an empty mock. Must I use `.and_call_original` to get it to work with my defined method?
<caliostro>
an unhandled exception kill the main thread too
Rollabunna has quit [Read error: Connection reset by peer]
Rollabunna has joined #ruby
jgt1 has joined #ruby
atzorvas has joined #ruby
<mollusk_>
so I got everything working correctly and made a git repo
<mollusk_>
just supports, void linux, arch linux and debian based systems. Run this script and it should pick up your package manager
<adaedra>
õ_o
<mollusk_>
it's just a wrapper :)
<adaedra>
That code style is really strange.
<mollusk_>
meh
EmeraldExplorer has quit [Quit: Connection closed for inactivity]
<mollusk_>
I didn't want to use case either but I also don't feel like learning a gem right now
<mollusk_>
or ption parser
<mollusk_>
optionparser*
cwong_on_irc has quit [Quit: Leaving.]
<mollusk_>
a friend of mine was working on this with me. We figure out that ruby has the shift command.
sepp2k has joined #ruby
dionysus69 has quit [Quit: dionysus69]
<adaedra>
Urgh globals
dionysus69 has joined #ruby
benjito has joined #ruby
atzorvas has quit [Quit: leaving]
TomyWork has quit [Ping timeout: 260 seconds]
<mollusk_>
adaedra, yeah I should fix that
mnzaki has quit [Quit: *fade*]
charliesome has joined #ruby
<adaedra>
imo, it would be better if you did modules representing your package manager, with constants inside these modules defining what you do with your globals. Then, in your main code, find the right module and call the constants on it.
Igorshp has quit [Remote host closed the connection]
pdoherty has joined #ruby
teclator has quit [Ping timeout: 250 seconds]
<mollusk_>
adaedra, that is wayyy beyond my level right now which is why I hacked this together.
<mollusk_>
right now I am just happy that it works
Igorshp has joined #ruby
<adaedra>
that's an enhancement proposition, for you to consider, if you want to push things further.
idefine has joined #ruby
wldcordeiro has quit [Quit: WeeChat 1.3]
wldcordeiro has joined #ruby
benjito has quit [Ping timeout: 260 seconds]
sdwrage has joined #ruby
`tim` has quit [Ping timeout: 260 seconds]
gustav_ has quit [Remote host closed the connection]
Igorshp has quit [Remote host closed the connection]
<Ox0dea>
All it knows how to do is print "main".
dhjondoh has quit [Quit: dhjondoh]
<adaedra>
It knows who it is, it's already something.
<Ox0dea>
>> '2deep4me'.gsub(/d\/, &:next)
<ruboto>
Ox0dea # => /tmp/execpad-080d38c449a7/source-080d38c449a7:2: unterminated regexp meets end of file ...check link for more (https://eval.in/455518)
<Ox0dea>
adaedra: It's not outside the realm of possibility.
symbol has joined #ruby
synthroid has quit []
araujo has quit [Client Quit]
stardiviner has joined #ruby
lkba has joined #ruby
<mollusk_>
I think people would find use in zymp3 but so far I don't think anyone besides me has used it
<Ox0dea>
mp{d,v} = <3
<mollusk_>
I always have trouble with mpd
<adaedra>
instead of if [ -f /usr/bin/xxx ] to check of a binary, it would be better to use which and check for the return value. This way, it works for people who have these binaries at other places, i.e. /usr/local/bin/xxx
<zwdr>
I use the same setup on my desktop at home, and it works OK
<sl33k>
zwdr: you have a windows at home? ewww
<ibouvousaime>
I got another question, when you got a method with rev=false and you want to call that method, do you just need toput true as argument or rev=true as argument?
<sl33k>
i only use windows at work. cos work and zero choice
<sl33k>
:(
<zwdr>
sl33k: I like to play video games :s
jobewan has joined #ruby
<sl33k>
zwdr: well...
<jhass>
ibouvousaime: the former, foo(rev=true) is the same as rev=true; foo(rev)
<zwdr>
I mostly dev on my laptop tho, with proper linux
<jhass>
ibouvousaime: that is you just assign a local
<ibouvousaime>
here is the method def alphabetize (arr, rev=false)
<adaedra>
sl33k: if the windows setup is not for you, you can try to setup a Linux VM.
hfp_work has quit [Remote host closed the connection]
<ibouvousaime>
so it should be alphabetize (something, true) if I wanted to call it ?
<jhass>
ibouvousaime: without the spaces before the ( in both cases, but yes
p0wn3d has joined #ruby
segfalt has joined #ruby
marr has quit [Ping timeout: 264 seconds]
dravine_ has joined #ruby
<sl33k>
adaedra: i dont want a full VM (bad experience with those) want something lighter
<sl33k>
adaedra: not sure if docket plays in that space?
<jhass>
sl33k: boot from a thumb drive? :P
<adaedra>
docker?
<adaedra>
It would need a vm under windows, afaik
<sl33k>
how about cygwin ?
but3k4 has quit [Read error: Connection reset by peer]
<adaedra>
meh
<nickjj>
sl33k, docker will run in a light weight VM on windows
but3k4 has joined #ruby
<nickjj>
it's just abstracted from you with docker-machine
<darix>
it is not a VM
balazs has quit [Ping timeout: 265 seconds]
<sl33k>
nickjj: ruby -v gives me ruby 2.2 on my windows
dravine has quit [Ping timeout: 256 seconds]
dravine_ is now known as dravine
<sl33k>
think i might be good
<sl33k>
so to launch the interpeter? ruby command doesnt do it on cygwin
jobewan has quit [Ping timeout: 255 seconds]
<jhass>
you mean the repl? irb
<sl33k>
typing python gives me the repl though
<havenwood>
?pry sl33k
<ruboto>
sl33k, 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` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
<nickjj>
darix, sure it is
hfp_work has joined #ruby
Igorshp has quit [Remote host closed the connection]
<sl33k>
bleh. would just use the first link...
<sl33k>
download and install a full setup
<sl33k>
thanks guys
sunya7a has joined #ruby
<jhass>
?guys sl33k
<ruboto>
sl33k, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<sl33k>
thanks folks
<sl33k>
ruboto: seen
<jhass>
?justabot
<ruboto>
I'm just a bot. You don't need to address me.
<havenwood>
ruboto: good mornin'
<jhass>
troll
<sl33k>
jhass: i didnt see your mention. would have guessed
<havenwood>
Probably a good idea to go ahead and get on the good side of our future robotic overlords.
polishdub has joined #ruby
<havenwood>
Likely lead by ruboto.
<jhass>
yeah yeah, you promised that so many times now
<tubbo>
sl33k: it's part of why rails is a lot better now than it used to be :P
jaxxstorm has joined #ruby
<sl33k>
tubbo: i dont follow
<tubbo>
even though most people would disagree with me, rails is a lot more stable and people hear "no" a lot more than they hear "yes" when they ask if it can do something. that's a good thing. it means rails has a place in the world.
rmrrn has joined #ruby
rmrrn has quit [Changing host]
rmrrn has joined #ruby
jwang has joined #ruby
ghr has joined #ruby
Guest7778 has joined #ruby
amitchellbullard has joined #ruby
<tubbo>
rails is *really* good at building full stack web applications that serve HTML. it's also pretty damn good at building API-only web applications that serve JSON.
ghr has quit [Client Quit]
sunya7a has joined #ruby
twodayslate_ is now known as twodayslate
Davey has quit [Max SendQ exceeded]
jobewan has quit [Ping timeout: 244 seconds]
romero has quit [Remote host closed the connection]
Davey has joined #ruby
Davey has quit [Changing host]
Davey has joined #ruby
<sl33k>
tubbo: hmm...have you used other web stacks? I have. So it would be interesting learning and comparing notes
<centrx>
It's also excellent at getting you from railroad station A to railroad station B
towler has quit [Quit: WeeChat 0.3.8]
bluntman has joined #ruby
<sl33k>
tubbo: i'm also learning rails cos most of my younger friends prefer it and I cant do projects opensource with them in Java :'(
Guest85414______ has joined #ruby
<tubbo>
sl33k: yes, i've built stuff with python and php using various web frameworks.
<tubbo>
as well as ruby
duoi has joined #ruby
<tubbo>
sl33k: haha, why not? are they too cool for java or something?
<tubbo>
you can really stick it to them by using jruby
Klumben has joined #ruby
<sl33k>
tubbo: they are silly i guess.
<sl33k>
tubbo: but seriously though the wind has blown albeit strongly. ruby and rails cant be ignored
Igorshp has joined #ruby
Bugboy1028 has joined #ruby
<sl33k>
so many fun projects within my community in ruby/rails. moved to Sheffield recently. NO Java User group. But I found a ruby one; shrub
<tubbo>
sl33k: definitely. if you have a bunch of java/CS experience i would suggest maybe just jumping right in? :()
<tubbo>
:)*
towler has joined #ruby
kies^ has quit [Ping timeout: 265 seconds]
Asher has joined #ruby
xxneolithicxx has joined #ruby
ghr has joined #ruby
joncol has quit [Quit: leaving]
<tubbo>
like, start the hartl rails tutorial and see how lost you get...if you need to get some references on ruby...but you'd probably be right at home building classes/modules/et. al.
xxneolithicxx has quit [Max SendQ exceeded]
segmond has joined #ruby
caliostro has quit [Quit: Exit-Chat]
<tubbo>
typically java devs who get started with ruby make "too many classes" :)
rfv_ is now known as rfv
skmp has joined #ruby
<tubbo>
because they don't realize how much ruby actually provides for them (since java didn't)
TDJACR_ has joined #ruby
catbusters has joined #ruby
Igorshp has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
<sl33k>
and ruby guys just use too many gems
sfr^ has joined #ruby
Kamilion has quit [Ping timeout: 255 seconds]
<tubbo>
hah, well...that's kind-of the big win of ruby right?
skade has joined #ruby
<havenwood>
sl33k: no trolling.
ELCALOR_ is now known as ELCALOR
<tubbo>
too many gems in my Gemfile (too many gems)
<sl33k>
tubbo: i just implement an apache camel solution at work. i wonder what the ruby solution would be.
Igorshp has joined #ruby
<tubbo>
sl33k: is that a new cigarette or something?
<sl33k>
so matured enterprise languages would always have their place
SCHAAP137 has quit [Remote host closed the connection]
Cache_Money has joined #ruby
Ankhers_ is now known as Ankhers
<Ox0dea>
imperator: In many jurisdictions, gravedigging isn't technically illegal unless one subsequently exhumes a body, so I think you should be good.
A124 has quit [Ping timeout: 268 seconds]
nemo__ has joined #ruby
<imperator>
lol
bb010g has joined #ruby
rehat has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Guest56372 is now known as beagles
nemo__ has quit [Remote host closed the connection]
Jardayn has joined #ruby
tkuchiki has joined #ruby
step1step2 has quit [Ping timeout: 244 seconds]
baroquebobcat has joined #ruby
<imperator>
so it hasn't seen an update in 2 years...
romero has joined #ruby
A124 has joined #ruby
romero is now known as Guest53110
nemo_ has quit [Ping timeout: 252 seconds]
baroquebobcat has quit [Read error: Connection reset by peer]
cwong_on_irc has joined #ruby
ceej has joined #ruby
baroquebobcat has joined #ruby
moss has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
lsmola_ has quit [Ping timeout: 246 seconds]
RobertBirnie has joined #ruby
<ceej>
morning. I'm trying to improve my ruby code. I came up with a way to recursively turn a flat keyed hash into a nested one. What would be a better more efficient way to do it? https://gist.github.com/800e0cdeea2e361dae25
HoloIRCUser has joined #ruby
Guest53110 has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
johnhamelink has joined #ruby
A124 has quit [Quit: '']
kraljev11 has joined #ruby
A124 has joined #ruby
jpfuentes2 has joined #ruby
slawrence00 has joined #ruby
Silex has joined #ruby
Igorshp has joined #ruby
absolutejam has joined #ruby
<shevy>
you make a simple hash more complicated than it was before?
herbst has quit [Remote host closed the connection]
kaleido has quit [Client Quit]
<daxroc>
Evening
ldnunes has quit [Quit: Leaving]
<gregf__>
shevy: the flat was originally too complex ;)
<gregf__>
oops: hash i meant
<daxroc>
Anyone know an issue with net:http where it would truncate get requests 16384 chars in length but others of larger would succeed doesn't seem to be any rhyme or reason.
16WAAK2ZI has joined #ruby
Senjai has joined #ruby
symm- has joined #ruby
romero_ has joined #ruby
kraljev11 has quit [Ping timeout: 240 seconds]
<Ox0dea>
ceej: I trust this is just for fun?
<daxroc>
*plain curl requests doesn't seem to truncate the body
<adaedra>
daxroc: you mean that get requests longer than 16384 chars pass?
<Ox0dea>
daxroc: Are you on a really old machine?
rwilcox_ has joined #ruby
tpendragon_ has joined #ruby
j416 has joined #ruby
<daxroc>
adaedra: no the truncated all seem to be that length
<adaedra>
there may be a limit in the HTTP request length.
<daxroc>
Ox0dea: no modern vms
absolutejam has quit [Ping timeout: 260 seconds]
<daxroc>
adaedra: other requests return larger body contents
<adaedra>
body != address
bitfox has quit [Read error: Connection reset by peer]
nanoz has joined #ruby
ldnunes has joined #ruby
<ceej>
shevy: I'm just wanting it to be a nested hash. Ox0dea: yes
<Ox0dea>
daxroc: Well, that it's a power of 2 is obviously pertinent; I thought perhaps your `sizeof(long)` was really small or something.
<Ox0dea>
ceej: Do you know about autovivification?
wprice has quit [Ping timeout: 268 seconds]
wprice has joined #ruby
<ceej>
Ox0dea: like using #tap on a hash?
Fredrich010 has joined #ruby
rwilcox has quit [Ping timeout: 265 seconds]
<Ox0dea>
ceej: No, not at all.
absolutejam has joined #ruby
<Ox0dea>
"Autovivify" means "to spring into existence" in this case.
<adaedra>
Wise Ox0dea
johnny56 has joined #ruby
jenrzzz has joined #ruby
<Ankhers>
How can I create a function within a class that does not require the use of dot syntax? e.g., my_func(hash) instead of instance.my_func(hash)
<ceej>
Ox0dea: ok... just reading up on it
<Ox0dea>
ceej: The Ruby example on Wikipedia leaves something to be desired.
adempus has joined #ruby
idefine has quit [Remote host closed the connection]
synthroid has quit [Remote host closed the connection]
<Ox0dea>
Ankhers: Could you clarify?
<daxroc>
Ox0dea: ? Not following
nemo_ has joined #ruby
`based_pdev` has joined #ruby
<Ox0dea>
daxroc: Ignore me on this one; I was almost certainly barking in the wrong forest.
<Ankhers>
http://lpaste.net/143619 (I realize this should be some kind of class hierarchy, but this is what I have to deal with at the moment.)
rservan__ has joined #ruby
devoldmx_ has quit [Remote host closed the connection]
amclain has joined #ruby
nanoz has quit [Ping timeout: 272 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
JDiPierro has quit [Remote host closed the connection]
jbw has quit [Quit: ┌∩┐(◣_◢)┌∩┐]
towski_ has joined #ruby
dionysus69 has joined #ruby
ericjphillips has quit [Quit: Leaving.]
<Ox0dea>
Ankhers: And which dots are you wanting to remove?
ericjphillips has joined #ruby
rservant has quit [Ping timeout: 272 seconds]
jxs_ has quit [Remote host closed the connection]
<Ankhers>
Ox0dea: I'm getting complaints that it can't find the different build_my_class_* functions. I assumed it was because they are instance methods, which would require me to already have an instance of MyClass?
<Ox0dea>
>> auto = Hash.new { |h, k| h[k] = Hash.new &h.default_proc }; auto[1][2][3] = 4; auto # ceej
<mehwork>
workmad3: woops, you're right. I thought i called it in the repl, but hadn't
<Ox0dea>
It's unlikely to be of any significant relevance at this stage of your learning, but Object is not "the currently open class" at program start.
SylarRuby has joined #ruby
<Ox0dea>
Scope and constant/method resolution are different things.
dionysus69 has quit [Remote host closed the connection]
dmitch has quit [Client Quit]
<Ox0dea>
I half-expected that to work.
dionysus69 has joined #ruby
Guest50 has joined #ruby
XV has joined #ruby
<mr_r>
Ox0dea: They're different objects. Main is an instance of Object. They can't have the same ids.
segfalt has quit [Quit: segfalt]
<Ox0dea>
mr_r: If we were "inside Object" at program start, `TOPLEVEL_BINDING.receiver` would be Object.
mwlang has joined #ruby
Guest50 has quit [Client Quit]
<mr_r>
Ox0dea: We must be inside Object since all method definitions at the top level become private instance methods of Object.
naztharune has joined #ruby
<XV>
Anyone know of any gems that work with assembly or of a way to combine assembly with ruby? I know how in C, but I haven't found anything conclusive yet.
araujo has quit [Read error: Connection reset by peer]
<maasha>
Do anyone know if there is a Ruby gem for parsing text files and generate C++ code ala flex/bison?
SylarRuby has quit []
<Ox0dea>
maasha: SWIG goes the other way. :<
<maasha>
I need a C++ code generator - and for some stupid reason such are written in C or C++
Xeago has quit [Remote host closed the connection]
<maasha>
when makes it difficult and error prone at all levels.
<mr_r>
Ox0dea: You're defining a singleton method for main there not for Object. Obviously Object is not going to respond to foo.
tubuliferous_ has quit [Ping timeout: 250 seconds]
<maasha>
*which
<Ox0dea>
mr_r: But where did I specify `main`?
<mr_r>
Ox0dea: singleton_class is the singleton class for main.
Alayde has joined #ruby
<Ox0dea>
mr_r: #singleton_class is a method that gives you the receiver's singleton class.
<mr_r>
Ox0dea: Yes. And the receiver in this case is self. Aka, main.
<Ox0dea>
Bingo!
gustav__ has joined #ruby
<Ox0dea>
Thus, we are inside `main`, and not Object, at program start.
<Ox0dea>
mr_r: If we were in Object at program start, it would've responded to `foo` just fine back there.
<mr_r>
There are two different implicit contexts. We are inside `main` in the sense that all implicit method invocations are executed on main. But all method definitions are defined inside Object, as private instance methods.
bonhoeffer has joined #ruby
pdoherty has joined #ruby
<Ox0dea>
mr_r: It is only my intent to disabuse you of the misconception that there is an implicit `class Object; ...; end` wrapped around your program.
eminencehc has joined #ruby
<mr_r>
If it wasn't then how are methods being defined in the Object class?
<Ox0dea>
That's an implementation detail.
mikecmpbll has quit [Ping timeout: 244 seconds]
<Ox0dea>
It could just as well have been `main` at the top of the resolution trees, but that would be kind of silly.
XV has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
<mr_r>
Ox0dea: And how would you explain constant lookups then? Is there a special case in the context of the top level?
<Ox0dea>
mr_r: I'm not sure how you mean.
synthroid has joined #ruby
acke has joined #ruby
tomaz_b has quit [Ping timeout: 252 seconds]
<mr_r>
Ox0dea: Constants get looked up in the lexically enclosing scope first, then ancestors.
RobertBirnie has joined #ruby
<Ox0dea>
Without explicit use of the scope resolution operator, yes.
Soda has joined #ruby
<Ox0dea>
I trust you know that everything on which you can call a method or look up a constant descends from Object?
<jhass>
Ox0dea: mr_r we're neither inside main nor inside Object. class changes self and the definee to the same thing. At the toplevel self is main, the definee is Object, thus the toplevel is not equivalent to class Object; ...; end; nor class << main; ...; end
JJM has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mr_r>
Ox0dea: Yes, and we don't use the scope resolution operator at the top level. So the lexically enclosing scope must be Object since all top level constants are defined there.
<Ox0dea>
jhass: "Definee" is new for me.
<jhass>
Ox0dea: it's where def places methods
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mr_r>
Ox0dea: The default definee is where instance methods get defined.
tvw has quit [Read error: Connection reset by peer]
arthurix has joined #ruby
araujo has joined #ruby
<mr_r>
jhass: What about inside a module itself, say M? Module.nesting inside a module is the module itself and a module does not have any superclasses, cause it isnt a class. It just looks in Object?
OS-18137 has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
freerobby has quit [Quit: Leaving.]
<jhass>
.nesting is orthogonal to inheritance
<jhass>
another thing you shouldn't mix up
mikecmpbll has joined #ruby
dfinninger has quit [Remote host closed the connection]
<jhass>
and no, the above applies, it first looks into M and then in Object
freerobby has joined #ruby
steffkes has joined #ruby
Pupeno has quit [Read error: Connection reset by peer]
<steffkes>
hey there
Pupeno has joined #ruby
<jhass>
>> FOO = 1; BAR = 1; module M; FOO = 2; end; [module M; FOO; end, module M; BAR; end]
<ceej>
Ox0dea: wow, that is a lot better using those methods....
<Ox0dea>
Yay, Ruby!
lkba has joined #ruby
<ceej>
thank you, I'm going to use these methods a lot more now :)
nemo__ has quit [Remote host closed the connection]
yardenbar has joined #ruby
arthurix_ has joined #ruby
weemsledeux has joined #ruby
<ceej>
Ox0dea: what would you recommend as some good online reading to better learn to use these methods day to day?
<shevy>
I just found rand($.) in old code
<Ox0dea>
shevy: That's dastardly.
JDiPierro has joined #ruby
<Ox0dea>
ceej: The only two "fancy" methods there are Hash#default_proc (which is scarcely so useful as it was here), and #reduce, which is covered in just about every corner of the Web. :P
CooloutAC has left #ruby ["Selakem Shalom, PEACE"]
<TomyWork>
jhass looks like it does. thanks for the suggestion
<Ox0dea>
Really, try not to see it as "magic"; it's all simple building blocks combined to form convenient abstractions.
<pipework>
Ox0dea: What are you talking about, willis? I love using default_proc
vigintas has quit [Ping timeout: 260 seconds]
<Ox0dea>
pipework: Self-referentially, though?
arthurix has quit [Ping timeout: 264 seconds]
hakunin has joined #ruby
vigintas has joined #ruby
benjito has joined #ruby
<TomyWork>
i'm making a project and the only pre-requirement i want is rvm. How do I go about doing that, preferably without telling the user to run a mile of shellcode?
<TomyWork>
prerequisite*
agent_white has joined #ruby
<shevy>
Ox0dea I also just had a funny other error... when you set an environment variable called CSRC, pointing to a directory, compiling exiv2 from source will fail
<TomyWork>
a project with gems and such and they should be fetched when the project is first run
rservan__ has quit [Quit: Leaving...]
iamvery_ has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<shevy>
TomyWork have you not just described what bundler is doing?
<TomyWork>
bundler manages ruby versions too?
<shevy>
you can probably specify some mandatory ruby version
<shevy>
I am sure you don't want to control the ruby version that your user has
kidoz has joined #ruby
<shevy>
"We will now install ruby 1.8.7"
Igorshp has quit [Remote host closed the connection]
<jxl180>
well, does having a .ruby-version file with rvm force a user to have that specific version of ruby, or just a comparable version?
rbennacer has joined #ruby
<pipework>
TomyWork: Look into packaging your app up with traveling ruby.
<ceej>
Ox0dea: I see how to use #default_proc here http://ruby-doc.org/core-1.9.3/Hash.html#method-i-default_proc-3D, in your pastie though I can't figure out how it's being set... is it just automatically set and recursively calls the Hash.new you defined on ret?
nemo_ has joined #ruby
<pipework>
Unless you really want them to have to install a development toolchain.
benjito has quit [Ping timeout: 265 seconds]
dionysus69 has joined #ruby
decoponyo has quit [Quit: Leaving...]
<Ox0dea>
ceej: That's right; ret's default_proc specifies that non-existent keys should map to a Hash with ret's default_proc which specifies that...
<steffkes>
i'm curious, did a bit of research but i'm still not entirely satisfied with the answers - what you guys & girls use for a json api which is going to be written in ruby? having worked mainly with php in the past, i'm seeing different frameworks like sanatra that look rather small but already things like templating and stuff. on the other hand grape, which seems to be more a one-man show over the years ;)
<TomyWork>
shevy well ideally i would like to make sure they're using the ruby version i developed against
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
The_Phoenix has quit [Ping timeout: 265 seconds]
Fredrich010 has quit [Remote host closed the connection]
Pupp3tm4st3r has quit [Remote host closed the connection]
<shevy>
yeah, that is why you'd have to specify a version. In normal gems, via .gemspec, this is done via an entry such as: s.required_ruby_version = '>= 2.2.3', I am sure bundler has similar ways, see what jxl180 wrote
<TomyWork>
oh well... rvm 2.2 do bundle exec ./myscript.rb isnt so bad after all
mistermocha has quit [Remote host closed the connection]
Xiti has quit [Quit: Xiti]
jxl180 has quit [Remote host closed the connection]
Xiti has joined #ruby
mistermocha has joined #ruby
ekleog has quit [Ping timeout: 250 seconds]
doublemalt_ has quit [Remote host closed the connection]
Pumukel has quit [Ping timeout: 272 seconds]
DoubleMalt has joined #ruby
rwilcox has quit [Ping timeout: 272 seconds]
tpendragon_ is now known as tpendragon
eminencehc has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
based_pdev_ has joined #ruby
ddv has quit [Ping timeout: 250 seconds]
ekleog has joined #ruby
eminencehc has joined #ruby
Caseh has joined #ruby
<Caseh>
Please, I'm looking for a channel for Ruby on Rails
<pipework>
Caseh: We have those! #ruby, and #rubyonrails
<pipework>
For the latter, you may need to read the topic and follow instructions to be heard.
<Caseh>
Thanks!
ddv has joined #ruby
InternetFriend has joined #ruby
bojanuana has quit [Ping timeout: 244 seconds]
maasha has quit [Quit: Page closed]
DoubleMalt has quit [Remote host closed the connection]
<Ox0dea>
Damn. I meant to give this to XV who asked about doing Assembly in Ruby: https://eval.in/455629
bricker has joined #ruby
`tim` has joined #ruby
dfinninger has joined #ruby
<Ox0dea>
I've gotta skedaddle; somebody kindly hand it off to them if they return.
segfalt has joined #ruby
<steffkes>
hm, i guess my question was a bit too generic and we need more specific ones that can be answered with y/n? ;>
<jhass>
steffkes: well, JSON API is kind of generic, those can get quite complex or stay really simple
pocketprotector- has joined #ruby
symbol has joined #ruby
<Ox0dea>
steffkes: In any case, this question almost always boils down to choosing the HTTP library which most tickles your fancy.
<shevy>
tickling his fancy!
jxl180 has joined #ruby
solars has quit [Ping timeout: 256 seconds]
<Ox0dea>
Got shellacked whizbangs, you say?
kies^ has joined #ruby
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blaxter has quit [Quit: foo]
<steffkes>
jhass: i'd like to keep it simple for now ;) getting to know the screwdriver first - if it gets more fancy, and i know what part of the library/framework i quite like or don't like .. it's easier to decide where to go next
symbol has quit [Ping timeout: 265 seconds]
<jhass>
well, it was meant as a "tell us what you actually want to do"
rwilcox has joined #ruby
Ox0dea has quit [Quit: WeeChat 1.4-dev]
blackjid has quit [Max SendQ exceeded]
mwlang has quit [Quit: mwlang]
<jhass>
and then we can tell what tool we would choose for that job
The_Phoenix has joined #ruby
blackjid has joined #ruby
<TomyWork>
gem_make.out
<shevy>
php
<TomyWork>
nice file name
<jhass>
shevy: I can +b shevy!*@*$#php if you wish
<steffkes>
jhass: sure :) one endpoint that expects a given json structure (version information) and a few endpoints (max five) to retrieve that information again. we're talking about systems that report their versions and a UI that will retrieve it afterwards. for now, nothing fancy for authorization & stuff - JWT might be used later on.
<shevy>
TomyWork fun fact, I am having strainge appearances of gmon.out files
<pipework>
Insert joke about banning everyone from that channel being in everyone's best interests.
tigarcia has joined #ruby
<steffkes>
nothing fancy as in "probably a static api key" maybe even just one, not one per account or something like that.
<jhass>
steffkes: okay, lightweight sounds good for that, sinatra is the most popular on the pretty lightweight side (good learning resources), sequel should get you along for the DB interface
devoldmx has joined #ruby
<steffkes>
just want to play around with it. i'd know what i'd do in a language like php - but before i use something random in ruby, i though i'd come here first to ask for advice (:
eminencehc has quit [Remote host closed the connection]
willardg has joined #ruby
dmitch has joined #ruby
<shevy>
yeah... things ought to be simple
<pipework>
steffkes: Depending on how many endpoints and the complexity, you might just use rack.
eikood has joined #ruby
<steffkes>
jhass: kk, was wondering because sinatra already brings all the template stuff with it
<pipework>
But sinatra is a nice DSL though.
devoldmx_ has joined #ruby
Pupp3tm4st3r has joined #ruby
<jhass>
steffkes: that should impose any overhead if you don't call into it
<jhass>
*should not, sigh
<pipework>
Negligible overhead at load time, but probably nothing even noticeable after.
chopin has quit [Remote host closed the connection]
eminencehc has joined #ruby
<steffkes>
if one is already concerned with runtime-overhead for a (just said) "simple thing" .. not sure :D i thought that it might influence the way it's used. so that you have to _disable_ it if you don't want to have it, something like that :)
<steffkes>
just not using it .. sound's good to me
<jhass>
sinatra works by returning a string from your handler basically
SCHAAP137 has quit [Quit: Leaving]
<jhass>
the templatiing integration simply provides helpers to return a rendered template there
codecop has joined #ruby
devoldmx has quit [Ping timeout: 255 seconds]
<steffkes>
got it. will give it a try. has been a few hours since my last ruby project
<steffkes>
ty jhass, pipework
<pipework>
steffkes: A few hours? That's like years in software time, which is like decades in real time.
<pipework>
Godspeed, steffkes.
baweaver has joined #ruby
<steffkes>
that should have been years, obviously :D
<jhass>
mh, software time, real time, what kind of time is the hours then?
<TomyWork>
is there anything that automatically pulls in dependencies like cmake or libs via apt-get and such??
<TomyWork>
-?
<steffkes>
a few hours ago was clojure-time .. still a bit puzzled by that
<TomyWork>
gem dependencies*
baweaver has quit [Remote host closed the connection]
chthon has quit [Ping timeout: 244 seconds]
solars has joined #ruby
nanoz] has quit [Ping timeout: 260 seconds]
<shevy>
TomyWork not really, normally; gem is primarily a dependency-manager for gems written in ruby, or for gem-addons (e. g. written in C, and then you can compile the ruby bindings to that C code)
<steffkes>
doh, someone just mentioned grape - any thoughts on that? propably even compared to sinatra?
<shevy>
it's usually the responsibility of the user to get the required components, such as nokogiri requires some .h files which are often in the devel-package on a linux distribution
<steffkes>
well, i just give it a try in one of them :)
leafybas_ has joined #ruby
tigarcia has quit []
tigarcia has joined #ruby
yeticry has joined #ruby
giuseppesolinas has quit [Quit: Leaving]
bryanray has joined #ruby
barhum2013 has joined #ruby
barhum2013 has left #ruby [#ruby]
tigarcia has quit [Client Quit]
tigarcia has joined #ruby
nemo__ has joined #ruby
leafybasil has quit [Ping timeout: 240 seconds]
nemo_ has quit [Ping timeout: 265 seconds]
KensoDev has quit []
leafybas_ has quit [Ping timeout: 268 seconds]
ramfjord has joined #ruby
benjito_ has joined #ruby
dfockler has quit [Ping timeout: 244 seconds]
nemo__ has quit [Remote host closed the connection]
VeryBewitching has quit [Quit: Konversation terminated!]
mistermocha has quit [Remote host closed the connection]
polishdub_ has joined #ruby
polishdub has quit [Ping timeout: 240 seconds]
choke has joined #ruby
arup_r has joined #ruby
SenpaiSilver has quit [Read error: Connection reset by peer]
SenpaiSilver has joined #ruby
baweaver has joined #ruby
JJM has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
darkf has quit [Quit: Leaving]
segfalt has quit [Quit: segfalt]
Synthead has joined #ruby
Fredrich010 has joined #ruby
howdoicomputer has joined #ruby
ryotarai has joined #ruby
ledestin has quit [Max SendQ exceeded]
cpruitt has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pupp3tm4st3r has quit [Remote host closed the connection]
choke has joined #ruby
The_Phoenix has quit [Ping timeout: 268 seconds]
loc22 has joined #ruby
eminencehc has quit [Remote host closed the connection]
barhum2013 has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
ItSANgo has quit [Quit: Leaving...]
agent_white has quit [Quit: brb]
Ainieco has joined #ruby
<Ainieco>
hello
<havenwood>
Ainieco: hi
eminencehc has joined #ruby
kadoppe has quit [Ping timeout: 255 seconds]
VeryBewitching has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ainieco>
what the point of Mutex#try_lock if it doesn't locks if it's possible? i'd like to lock only if it's possible immediatley otherwise don't lock at all
baweaver has quit [Remote host closed the connection]
<shevy>
the good thing about ruby is that I don't have to use crappy syntax
<TomyWork>
ja thanks, but for some reason that makes the local function unable to access its enclosing scope
<TomyWork>
shevy what's a better syntax?
stannard has quit [Ping timeout: 240 seconds]
<shevy>
the currently existing one for instance!
acke has quit [Ping timeout: 240 seconds]
<TomyWork>
what's that?
MrJoshua has joined #ruby
jgt1 has joined #ruby
<TomyWork>
u && u.profile && u.profile.thumbnails && u.profiles.thumbnails.large?
<shevy>
yes!
<shevy>
now I don't write code like this myself
<shevy>
but it's better than
<adaedra>
that's not really neat
<shevy>
if u.try!(:profile).try!(:thumbnails).try!(:large)
<shevy>
why does he propose the ! there?
<TomyWork>
shevy i thought this safe navigation operator did away with that
<TomyWork>
u.?profile.?thumbnails.?large
Fredrich010 has quit [Remote host closed the connection]
<shevy>
ack
<shevy>
that's even worse!
<adaedra>
no
`tim` has joined #ruby
dnomyar has joined #ruby
MrJoshua has quit [Client Quit]
stamina has joined #ruby
<dnomyar>
l
<TomyWork>
shevy so you disagree with the general notion of having a safe navigation operator and not just the specific syntax?
dnomyar has left #ruby [#ruby]
<jhass>
shevyOS doesn't need safe navigation
<shevy>
I disagree with ?method
dnomyar has joined #ruby
<TomyWork>
it's not really ?method
<TomyWork>
it's .?
<adaedra>
It's .?
<adaedra>
.?ninja'd
<shevy>
the . is part of the method name?
<adaedra>
no, it's part of the syntax
<adaedra>
it's .? in place of .
dnomyar has quit [Quit: leaving]
<shevy>
that is absolutely terrible
<ibouvousaime>
What are the best ressouces that have helped you guys personnally with ruby and ruby on rails? (Im doing my own reseach too, im just new to it thats why im asking )
codecop has quit [Remote host closed the connection]
<adaedra>
shevy: why?
<TomyWork>
a.?b is roughly the same as a && a.b
<shevy>
adaedra because we generally use . for methods
<adaedra>
and?
<shevy>
what and?
macowie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adaedra>
I don't see the problem, so I thought there was a follow up
jgt1 has quit [Ping timeout: 260 seconds]
<TomyWork>
shevy so .? is "check if left hand side isnt nil/false and then whatever . does"
<shevy>
that is the problem
<adaedra>
it's a specialized case of method call
dfockler has joined #ruby
asad_ has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
<asad_>
Hi. I want to install the latest version of ruby on ubuntu. How do I go about doing that?
<ceej>
jhass: so when building up a hash use strings still
blackjid has quit [Max SendQ exceeded]
blackjid has joined #ruby
<adaedra>
ceej: it doesn't really care, as long as the keys are hashable.
<jhass>
ceej: it's not wrong to use dynamic symbols with 2.2 but it'll still feel odd to most rubyists
prestorium has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
Fredrich010 has quit [Remote host closed the connection]
<atmosx>
jhass: it adds 1 I want ... yes
<atmosx>
2
<atmosx>
TomyWork: ty
Fredrich010 has joined #ruby
<jhass>
especially since most of the time if you have dynamic keys chances are good your keys are actually data
sharkman has joined #ruby
psy_ has quit [Read error: No route to host]
mwlang has joined #ruby
<ceej>
so in ruby 2.2 doing this isn't bad ret = Hash.new { |h, k| h[:"#{key}"] = Hash.new &h.default_proc } but most rubyists will be used to it just being strings?
<jhass>
and symbols shouldn't be used for data you'll process
based_pdev_ has quit [Ping timeout: 268 seconds]
idefine_ has quit [Remote host closed the connection]
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
ceej: it's not a bug. Whether it makes sense depends on the larger context
<Ankhers>
How does Ruby's Enumerator::Lazy work? If I `map` over the data inside it, does it just evaluate the thunks and still hold onto that memory even if the enum or value inside the enum is not used later?
<jhass>
ceej: most of the time it doesn't IME
tercenya has quit []
<Ankhers>
Basically, does GC clean it up in a realtively decent time frame.
p0wn3d has quit [Ping timeout: 272 seconds]
psy_ has joined #ruby
Greg__ has joined #ruby
<TomyWork>
ja did you get the code?
<Ankhers>
Or does it wait until the entire enum has been read before the GC can clean it up?
Fredrich010 has quit [Remote host closed the connection]
acke has joined #ruby
psy_ has quit [Max SendQ exceeded]
<ceej>
jhass: I get it... thank you
psy_ has joined #ruby
devoldmx has quit [Ping timeout: 272 seconds]
arthurix_ has joined #ruby
Alayde has joined #ruby
dmitch has joined #ruby
diegoviola has quit [Ping timeout: 265 seconds]
_djbkd has quit [Remote host closed the connection]
mordocai has quit [Remote host closed the connection]
dnomyar has joined #ruby
dnomyar has left #ruby [#ruby]
<TomyWork>
from a function, can i access variables in enclosing scopes somehow?
dopie has joined #ruby
dnomyar has joined #ruby
<jhass>
"function"?
<havenwood>
TomyWork: Do you know about instance variables?
Soda has quit [Remote host closed the connection]
<TomyWork>
jhass def at file scope
<havenwood>
TomyWork: methods
<jhass>
that's a method
<jhass>
and no
arthurix has quit [Ping timeout: 272 seconds]
<TomyWork>
ok, i'll make a class then :)
nfk|laptop has quit [Read error: Connection reset by peer]
kirun has joined #ruby
<jhass>
well, could access instance vars defined at the toplevel too, but it would be odd
<havenwood>
just clicked for me that's what was being asked
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang65 has quit [Ping timeout: 268 seconds]
tercenya has joined #ruby
diego1 has joined #ruby
diego1 is now known as diegoviola
<TomyWork>
pythonisms are being asked :)
trautwei_ has joined #ruby
segfalt has quit [Remote host closed the connection]
al2o3-cr has quit [Ping timeout: 256 seconds]
nfk|laptop has joined #ruby
idefine has joined #ruby
Fredrich010 has joined #ruby
dnomyar has left #ruby [#ruby]
rodfersou has quit [Quit: leaving]
lifeonmars has quit [Quit: Page closed]
<imperator>
class instance variable?
freerobby has joined #ruby
<TomyWork>
or luaisms
trautwein has quit [Ping timeout: 272 seconds]
dnomyar has joined #ruby
<TomyWork>
i was looking for the equivalent of a lua upvalue
eminencehc has quit [Remote host closed the connection]
<TomyWork>
since that isn't there, i'll go for proper OO instead :)
dnomyar has quit [Quit: leaving]
Salve has quit [Ping timeout: 246 seconds]
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 265 seconds]
ldnunes has quit [Quit: Leaving]
Channel6 has quit [Ping timeout: 250 seconds]
dmitch has joined #ruby
trautwein has joined #ruby
bonhoeffer has joined #ruby
trautwei_ has quit [Ping timeout: 252 seconds]
<TomyWork>
so now i've got a ruby script that prints all the reachable commits in a git repo
devoldm__ has joined #ruby
devoldmx_ has quit [Ping timeout: 264 seconds]
spuk has joined #ruby
<TomyWork>
enough for today, i'm going home
<TomyWork>
bye and thanks for the help
_djbkd has joined #ruby
jessemcgilallen has joined #ruby
ramfjord_ has joined #ruby
Sigma01 is now known as Sigma00
devoldm__ has quit [Remote host closed the connection]
relix has joined #ruby
tw1sted has quit [Remote host closed the connection]
<drocsid>
anybody pretty familiar with using the rye module with sudo to upload files to a remote server?
Coldblackice has joined #ruby
ngscheur1 has quit [Ping timeout: 272 seconds]
acke has quit [Remote host closed the connection]
rehat has quit [Remote host closed the connection]
acke has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
mustmodify has joined #ruby
gains has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
<mustmodify>
I realize there are some rails-isms here, but at heart it's a Ruby question. I want to know if you folks think this is an effective place to use tap, or whether I should do it the alternate way proposed, or some third option, possibly involving an instance method? https://gist.github.com/mustmodify/0d379d54f525a0a6fdae
blackmesa has quit [Ping timeout: 253 seconds]
symbol has quit [Ping timeout: 240 seconds]
mustmodify has left #ruby [#ruby]
spuk has quit [Ping timeout: 260 seconds]
<baweaver>
It's a User concern
<baweaver>
also, find_by
jackjackdripper has quit [Quit: Leaving.]
<baweaver>
and why are you using a variable manager_id instead of a symbol?
diegoviola has quit [Quit: WeeChat 1.3]
<baweaver>
anyways, definitely a Rails question
<baweaver>
look into #RubyOnRails
wharr has quit [Read error: Connection reset by peer]
`based_pdev` has quit [Read error: Connection reset by peer]
`based_pdev` has joined #ruby
wharr has joined #ruby
jackjackdripper has joined #ruby
InternetFriend has quit [Read error: Connection reset by peer]
<arup_r>
atmosx: Hi
<arup_r>
you there ?
leafybasil has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
mary5030 has quit [Remote host closed the connection]
EdwardIII has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
dnomyar has joined #ruby
yqt has joined #ruby
y0da has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arthurix has joined #ruby
dnomyar has left #ruby [#ruby]
al2o3-cr has joined #ruby
ReK2 has joined #ruby
ReK2 has joined #ruby
atomical_ has joined #ruby
jgt1 has joined #ruby
dnomyar has joined #ruby
dnomyar has left #ruby [#ruby]
atomical_ has quit [Client Quit]
EdwardIII has joined #ruby
benjito_ has quit [Ping timeout: 260 seconds]
robbyoconnor has joined #ruby
bonhoeffer has quit [Quit: bonhoeffer]
atomical has quit [Ping timeout: 255 seconds]
arthurix_ has quit [Ping timeout: 252 seconds]
mary5030 has quit [Ping timeout: 268 seconds]
jgt1 has quit [Ping timeout: 255 seconds]
Jackneill has quit [Ping timeout: 250 seconds]
bonhoeffer has joined #ruby
<atmosx>
arup_r: yes
bruno-_ has quit [Ping timeout: 255 seconds]
<atmosx>
hm, if I have hash = {name: 'john', age: 21} ... I can check hash[:name].empty? but how do I check if the hash[:age] entry is filled?
<atmosx>
with true/false?
<adaedra>
depends what you mean by 'filled'
<adaedra>
if the key don't exist when not filled, just hash.key?(:age)
<adaedra>
otherwise, you'll have to look at the value you have when 'not filled' (i.e. nil)
anisha has quit [Ping timeout: 252 seconds]
rails090 has quit [Ping timeout: 246 seconds]
bonhoeffer has quit [Read error: Connection reset by peer]
mengu has joined #ruby
zenguy_pc has quit [Read error: No route to host]
bonhoeffer has joined #ruby
<adaedra>
(Also, if your name key disappears or its value is nil when "not filled", your method will fail.)
diegoviola has joined #ruby
FernandoBasso has joined #ruby
wldcordeiro has joined #ruby
baweaver has quit [Remote host closed the connection]
Taha_The_Hacker has quit [Quit: Page closed]
`tim` has joined #ruby
benjito has joined #ruby
Greg__ has left #ruby [#ruby]
alcipir has joined #ruby
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
polishdub_ has joined #ruby
diegoviola has quit [Changing host]
diegoviola has joined #ruby
<atmosx>
adaedra: ty
pietr0 has joined #ruby
dmitch has joined #ruby
polishdub has quit [Ping timeout: 246 seconds]
ItSANgo has joined #ruby
bkxd has joined #ruby
benjito has quit [Ping timeout: 250 seconds]
JDiPierro has quit [Remote host closed the connection]
MrSamuel has quit [Quit: Leaving]
leafybasil has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
bMalum has quit [Quit: bMalum]
pontiki has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
bl00d has joined #ruby
blackmesa has joined #ruby
trautwein has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bl00d has quit [Client Quit]
polishdub_ has quit [Quit: Leaving]
karapetyan has quit [Remote host closed the connection]
umgrosscol has quit [Quit: End of Line]
zenguy_pc has joined #ruby
Fredrich010 has quit [Remote host closed the connection]
TheHodge has quit [Quit: Connection closed for inactivity]
polishdub has joined #ruby
steffkes has quit [Ping timeout: 250 seconds]
leafybasil has joined #ruby
rwilcox has quit [Ping timeout: 260 seconds]
KensoDev has joined #ruby
rbennacer has quit [Remote host closed the connection]
Ainieco has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
Fredrich010 has joined #ruby
symbol has joined #ruby
Pupeno has joined #ruby
deric_skibotn has quit [Quit: ChatZilla 0.9.92-rdmsoft [XULRunner 35.0.1/20150122214805]]
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jessemcgilallen has joined #ruby
tuxero has joined #ruby
ajb has quit [Max SendQ exceeded]
tvw has joined #ruby
kidoz has quit [Ping timeout: 246 seconds]
ajb has joined #ruby
Fredrich010 has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 268 seconds]
sepp2k has quit [Quit: Leaving.]
ajb has quit [Changing host]
ajb has joined #ruby
Pupeno has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.3]
pathrocle has quit []
choke has joined #ruby
steffkes has joined #ruby
steffkes has joined #ruby
kies^ has joined #ruby
acke_ has joined #ruby
aryaching has joined #ruby
acke_ has quit [Remote host closed the connection]
Fredrich010 has joined #ruby
maletor has joined #ruby
opensource_ninja has quit [Quit: opensource_ninja]
opensource_ninja has joined #ruby
Pupeno has joined #ruby
acke has quit [Ping timeout: 246 seconds]
jgpawletko has quit [Quit: jgpawletko]
bruno- has joined #ruby
dfinninger has quit [Remote host closed the connection]
robbyoconnor has quit [Quit: Konversation terminated!]
steffkes has quit [Ping timeout: 260 seconds]
tigarcia has quit [Remote host closed the connection]
SHyx0rmZ has quit [Remote host closed the connection]
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
ebbflowgo has quit [Client Quit]
<cooperlebrun>
rubuto aside, trying to take a hash and get an array of keys that had nil values
robbyoconnor has joined #ruby
<cooperlebrun>
also, whats a good pastebin alternative that isn't gist? I find gist a bit cumbersome when I don't necessarily want to link to my github
mois3x has quit [Ping timeout: 244 seconds]
_djbkd has joined #ruby
_djbkd has quit [Read error: Connection reset by peer]
<weaksauce>
i just use gist in a private window
<havenwood>
cooperlebrun: You can do an anonymous gist.
<weaksauce>
makes it anon
ibouvousaime has joined #ruby
_djbkd has joined #ruby
mois3x has joined #ruby
devoldmx_ has joined #ruby
<weaksauce>
cooperlebrun inject puts the result of the last thing in the block inside acc