<Majora320>
In general, should you use a gem for a small purely executable project?
alfiemax has quit [Ping timeout: 240 seconds]
vircung has quit [Quit: Nothing to do here]
elphe has joined #ruby
vircung has joined #ruby
k0mpa has quit [Remote host closed the connection]
<al2o3-cr>
sure, why not.
ironcamel has quit [Quit: leaving]
chocoelho has joined #ruby
chocoelho has quit [Client Quit]
milardovich has quit [Read error: Connection reset by peer]
milardov_ has joined #ruby
vichib has joined #ruby
hays has joined #ruby
Musashi007 has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
ironcamel has joined #ruby
jobewan has quit [Ping timeout: 268 seconds]
k0mpa has joined #ruby
cagomez has quit [Remote host closed the connection]
cdg has quit [Remote host closed the connection]
cagomez has joined #ruby
<hays>
can anyone help me understand why deriving from builtins like Array is a bad idea
<RickHull>
hays: you mean inheritance vs composition?
<RickHull>
inheritance is a fine tool -- it's not a bad idea
<hays>
yes
<RickHull>
but it can be misapplied
<RickHull>
composition tends to be more flexible
<hays>
yeah i can see thta
<RickHull>
where there is pushback against inheritance -- it's typically because inheritance can be overused -- it seems like the object oriented way to do things.
<RickHull>
some problems are that: not every relationship that we are modeling matches inheritance
MrSparkle has quit [Ping timeout: 240 seconds]
cagomez has quit [Ping timeout: 248 seconds]
<RickHull>
problems around multiple inheritance. is my table a child of furniture? or carpentry?
<hays>
in one case i wanted something that behaved exactly like an array, except had some wrappers around some methods
<RickHull>
also, the law of demeter is very hard to satisfy
<RickHull>
er, hm, maybe i'm not thinking of law of demeter
milardov_ has quit [Remote host closed the connection]
<RickHull>
hays: that sounds fine -- i'd think it would be like 10 minutes of coding
alfiemax has joined #ruby
<RickHull>
got an example?
<hays>
not on this machine
<hays>
but one sec
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
<hays>
https://bpaste.net/show/0e2bf2506c03 . in here those lines like srv.holding_registers. they are defined as Arrays and I am making them something inherited from array so I can capture calls to [] and []=
<hays>
basically a thread/fiber gets spawned and then it just passes through to Array
<RickHull>
yeah, so your other paste showed you doing some output and then calling super
jameser has joined #ruby
<hays>
yep
<RickHull>
as long as you are faithful to the original method signature, that should be fine
alfiemax has quit [Ping timeout: 252 seconds]
<RickHull>
it doesn't make it a good idea, but it's reasonable
Asher has joined #ruby
Asher has quit [Client Quit]
<hays>
is there a good place to look that up? the docs provide the information a bit differently
<RickHull>
generally: `def [](*args); do_stuff_with(args); super(*args); end
<hays>
yeah and []= is (*args,val) i think
<hays>
but im guessing
<RickHull>
no, *args means all the args
<hays>
hmm so i guess if it doesnt take a block that would always work?
shinnya has joined #ruby
<RickHull>
i'm a bit fuzzy, but maybe `def [](*args, &blk)`
<RickHull>
and you can call super(*args, &blk)
ResidentBiscuit has joined #ruby
<hays>
if its not a good idea, im curious what is a better idea, or why its a bad idea
<RickHull>
if what is a good idea?
workmad3 has joined #ruby
<RickHull>
as I said before, a wrapper class that inherits from the thing is totally reasonable
pastorinni has quit [Remote host closed the connection]
<RickHull>
it doesn't make it a good idea, nor a bad idea
<RickHull>
it depends on what you want to do with it, and if you can make the wrapper class be faithful to the original
<hays>
hmm ok
MrSparkle has joined #ruby
<RickHull>
aha, now I remember what I was thinking of. Liskov substitution principle
nadir has quit [Quit: Connection closed for inactivity]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZU has quit [Quit: WeeChat 1.9]
ta_ has quit [Ping timeout: 252 seconds]
gix- has joined #ruby
gix has quit [Disconnected by services]
safetypin has joined #ruby
neo95 has quit [Quit: Leaving]
kies has joined #ruby
DTZUZU has joined #ruby
ta_ has joined #ruby
troys_ is now known as troys
monodoh has quit [Quit: monodoh]
troys is now known as troys_
safetypin has quit [Quit: ZZZzzz…]
troys_ is now known as troys
zautomata has joined #ruby
zautomata4 has quit [Ping timeout: 248 seconds]
zautomata1 has joined #ruby
jamiejackson has quit [Ping timeout: 264 seconds]
minimalism has quit [Quit: minimalism]
zautomata has quit [Ping timeout: 260 seconds]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
enterprisey has joined #ruby
workmad3 has joined #ruby
axsuul has quit [Ping timeout: 248 seconds]
workmad3 has quit [Ping timeout: 272 seconds]
cagomez has joined #ruby
kies has quit [Ping timeout: 265 seconds]
zautomata1 has quit [Ping timeout: 252 seconds]
zautomata3 has joined #ruby
cagomez has quit []
cagomez has joined #ruby
alfiemax has joined #ruby
Puffball_ has joined #ruby
Puffball has quit [Ping timeout: 248 seconds]
zautomata has joined #ruby
zautomata3 has quit [Ping timeout: 248 seconds]
kies has joined #ruby
zautomata1 has joined #ruby
zautomata2 has joined #ruby
zautomata has quit [Ping timeout: 268 seconds]
zautomata1 has quit [Ping timeout: 256 seconds]
ta_ has quit [Ping timeout: 256 seconds]
xco has quit [Quit: xco]
ta_ has joined #ruby
suresh has joined #ruby
nofxx has quit [Remote host closed the connection]
aupadhye has joined #ruby
alfiemax has quit [Ping timeout: 252 seconds]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
anisha has joined #ruby
<apeiros>
Radar: yeah, <<~ is quite new. and I guess in rails there was (is) .strip_heredoc
suresh has left #ruby [#ruby]
<apeiros>
though iirc .strip_heredoc orients itself on the first indent, while <<~ cares about the least/smallest indent
meesles has joined #ruby
<apeiros>
ah no, short test shows .strip_heredoc also uses least indent
cagomez has quit [Ping timeout: 240 seconds]
gauravgoyal has joined #ruby
aupadhye is now known as aupadhye|brb
zautomata3 has joined #ruby
iamarun has joined #ruby
zautomata2 has quit [Ping timeout: 252 seconds]
anisha has quit [Ping timeout: 252 seconds]
aupadhye|brb is now known as aupadhye
apeiros has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
apeiros has joined #ruby
apeiros has quit [Ping timeout: 260 seconds]
anisha has joined #ruby
KeyJoo has joined #ruby
cdg has joined #ruby
ta_ has quit [Ping timeout: 240 seconds]
reber has joined #ruby
troys is now known as troys_
cdg has quit [Ping timeout: 265 seconds]
DmitryBochkarev has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tvw has joined #ruby
ta_ has joined #ruby
naprimer has quit [Ping timeout: 265 seconds]
Ishido has joined #ruby
naprimer has joined #ruby
meesles has quit [Ping timeout: 248 seconds]
zautomata4 has joined #ruby
zautomata3 has quit [Ping timeout: 248 seconds]
sammi` has quit [Quit: leaving]
sammi` has joined #ruby
alfiemax has joined #ruby
rippa has joined #ruby
swat2 has quit [Ping timeout: 248 seconds]
tvw has quit []
tvw has joined #ruby
troys_ is now known as troys
nofxx has joined #ruby
workmad3 has joined #ruby
swat2 has joined #ruby
k0mpa has quit [Remote host closed the connection]
\0 has joined #ruby
apeiros has joined #ruby
ta_ has quit [Ping timeout: 256 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
gauravgoyal has quit [Read error: Connection reset by peer]
tvw has quit []
tvw has joined #ruby
sundhell_away is now known as sundhell
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
Puffball_ has quit [Remote host closed the connection]
\0 has left #ruby [#ruby]
ta_ has joined #ruby
darkhanb has joined #ruby
tvw has quit [Remote host closed the connection]
jaequery has joined #ruby
conta has joined #ruby
ShekharReddy has joined #ruby
jaequery has quit [Client Quit]
bkxd has joined #ruby
jaequery has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
DTZUZU has quit [Ping timeout: 248 seconds]
alfiemax has quit [Remote host closed the connection]
DTZUZU has joined #ruby
zautomata has joined #ruby
alfiemax has joined #ruby
troys has quit [Quit: Bye]
Musashi007 has joined #ruby
zautomata4 has quit [Ping timeout: 268 seconds]
andikr has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Musashi007 has quit [Client Quit]
jaequery has joined #ruby
zautomata has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 264 seconds]
stealth[] has joined #ruby
bkxd has joined #ruby
tvw has joined #ruby
oleo has quit [Quit: Leaving]
tvw has quit [Client Quit]
tvw has joined #ruby
zautomata has joined #ruby
gizmore has joined #ruby
gizmore|2 has quit [Ping timeout: 252 seconds]
zautomata has quit [Ping timeout: 248 seconds]
mikhael_k33hl has joined #ruby
coderxin has joined #ruby
<mikhael_k33hl>
If you require a gem on one of your files that is required by another file, will the gem be propagated on that file?
<mikhael_k33hl>
So I can just have one file that requires all gem, and have the all other files require that one file?
TomyWork has joined #ruby
<mozzarella>
why would you do that
<mikhael_k33hl>
mozzarella: uhhhm, cause I'm planning to use celluloid and I have a worker and workergoup classes, so I was wondering if I alreayd require celluloid on WorkerGroup and that workerGroup requires the worker class, will the gems be propagated?
<mikhael_k33hl>
Or will I need to require 'celluloid' on both of them?
<mk[]>
it probably wouldn't hurt to require in every file it's used
<mk[]>
require is idempotent
<mikhael_k33hl>
mk[]: Oh I see . . . might as well do that then
Puffball has joined #ruby
<apeiros>
mikhael_k33hl: yes, if you require a file which requires a file which requires a file, all 3 files will be loaded
<apeiros>
and it's sensible to require everything you depend on in a file
<apeiros>
if that feels repetitive, have a "hub" require. e.g. foo.rb requires 20 things, foo/xy.rb foo/xz.rb etc. then just require 'foo' (and hence delegate all requries)
<apeiros>
*requires
<mikhael_k33hl>
apeiros: the latter seems to be more organized IMHO
<mk[]>
that's what bundler does, right?
<apeiros>
the former is more declarative
<apeiros>
mk[]: that's entirely unrelated to bundler
<apeiros>
bundler cares about the presence of gems and isolating them from system env. it doesn't care about individual file requires.
<mk[]>
you can make a gem with bundler
<apeiros>
you don't say :)
<apeiros>
it's still unrelated
<mk[]>
semantics
<apeiros>
if you say so
tvw has quit []
adac has joined #ruby
<mk[]>
I meant bundler has a scheme for handling file requires for a new gem
Musashi007 has joined #ruby
ana_ has joined #ruby
<mk[]>
saying "it's unrelated" is just pedantic and boring
<mk[]>
there are always connections in a bigger context
<apeiros>
no, bundler does not have a scheme for handling file requires for a new gem.
<apeiros>
that's simply wrong.
<apeiros>
yes, it allows you to generate a gem skeleton for new gems. no, it does not contain any require scheme.
<mk[]>
I guess it's not unique to bundler
<mk[]>
but still related to it
d2dchat has joined #ruby
<d2dchat>
I'm having the hardest time adding a file to a rubygem
<d2dchat>
it's called thread.rb, which I don't think should be a problem
<apeiros>
mk[]: I don't care enough to continue this conversation
<apeiros>
d2dchat: it's a problem because ruby has that already.
<d2dchat>
apeiros, I know that but, I'm not entirely sure that is the issue
<apeiros>
d2dchat: pro tip: namespace your gems. don't have stuff in the toplevel.
<apeiros>
d2dchat: ok, looks sane. is your problem related to line 6 in thread.rb?
<d2dchat>
I do a require './lib/streak'
jamesaxl has joined #ruby
JaccoP has joined #ruby
<d2dchat>
apeiros, updating with error, hold on
<apeiros>
you don't have to include 'lib' in the require. lib should be in $LOAD_PATHS, so require 'streak/thread' (or require 'streak') should do it
<d2dchat>
apeiros, error added
claudiuinberlin has joined #ruby
<apeiros>
d2dchat: is this when you're working on the gem? as in, the gem is not yet installed?
Musashi007 has quit [Quit: Musashi007]
<apeiros>
irb -Ilib -rstreak
<apeiros>
-I is uppercase i, not lowercase L
<apeiros>
it adds lib to $LOAD_PATH
<d2dchat>
apeiros, OI that did it
<d2dchat>
apeiros, gracias haha
<apeiros>
yw
<apeiros>
when the gem is installed, rubygems will handle the adding of lib to $LOAD_PATH
coderxin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
i.e. if you do `require 'streak'`, rubygems will search for gems with a matching file in their lib dir, activate the gem, and as part of that activation, add its lib dir to $LOAD_PATH
<d2dchat>
apeiros, right. I was trying to contribute back to this gem and wanted to do a little bit of probing
<d2dchat>
the specs on this gem are mocking out the request, so I didn't trust it
<d2dchat>
and it's a good thing I didn't just commit this, because I'm getting an error
<d2dchat>
need better specs!!
<d2dchat>
:)
<mk[]>
I really like how modules work in Erlang in terms of reloading, Ruby seems to only have it on the framework level
zautomata has joined #ruby
<d2dchat>
mk[], erlang is also ugly :)
<apeiros>
d2dchat: :) have fun!
<mk[]>
d2dchat: the syntax?
<d2dchat>
apeiros, thx! :)
dionysus69 has joined #ruby
<d2dchat>
it's been a minute since I've contribute to Ruby so
<d2dchat>
I have to get my bearings ;)
<mk[]>
also, no "green" threads for Ruby, right?
ur5us has joined #ruby
<d2dchat>
mk[], huh? Green threads have been around forever
<havenwood>
mk[]: Ruby 1.8 had green threads. Ruby 1.9 got system threads and fibers, which you have to schedule yourself.
<mk[]>
oh nice, I haven't looked at that for a while
<havenwood>
mk[]: There's a nice proposal in Ruby 3 for Thribers, which are lightweight green threads that can be system scheduled across multiple cores.
Musashi007 has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
<TheBrayn>
We don't need no education
|ifei5good has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
|ifei5g00d has quit [Ping timeout: 248 seconds]
shinnya has joined #ruby
TomyWork has quit [Remote host closed the connection]
sightes has joined #ruby
rabajaj has quit [Quit: Leaving]
synthroi_ has joined #ruby
zautomata has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
synthroid has quit [Ping timeout: 268 seconds]
oleo2 has quit [Ping timeout: 240 seconds]
anisha has quit [Ping timeout: 272 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anisha has joined #ruby
<hays>
dminuoso: i assumed he meant to change/control under what conditions an object evaluates to true/false
Musashi007 has quit [Quit: Musashi007]
supergeek has quit [Quit: Goodbye cruel world...]
anisha has quit [Ping timeout: 264 seconds]
anisha has joined #ruby
byte512 has quit [Ping timeout: 268 seconds]
infernix has quit [Ping timeout: 265 seconds]
polishdub has joined #ruby
anisha has quit [Ping timeout: 268 seconds]
gizmore has joined #ruby
cschneid_ has quit [Remote host closed the connection]
nofxx_ has quit [Quit: Leaving]
nofxx has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
infernix has joined #ruby
gizmore|4 has quit [Ping timeout: 256 seconds]
mudstart has joined #ruby
anisha has joined #ruby
tsglove has quit [Quit: Leaving]
mikecmpbll has quit [Ping timeout: 264 seconds]
vtx has quit [Quit: vtx]
infernix has quit [Ping timeout: 252 seconds]
anisha has quit [Ping timeout: 265 seconds]
anisha has joined #ruby
ana_ has quit [Quit: Leaving]
cschneid_ has joined #ruby
anisha has quit [Ping timeout: 272 seconds]
sightes has quit [Ping timeout: 252 seconds]
TomyLobo has joined #ruby
shinnya has quit [Ping timeout: 272 seconds]
anisha has joined #ruby
infernix has joined #ruby
anisha has quit [Ping timeout: 240 seconds]
vtx has joined #ruby
anisha has joined #ruby
mtkd has quit [Read error: Connection reset by peer]
^mtkd has joined #ruby
anisha has quit [Ping timeout: 265 seconds]
dn` has joined #ruby
anisha has joined #ruby
synthroi_ has quit [Remote host closed the connection]
bweston92 has quit [Quit: Connection closed for inactivity]
oleo has joined #ruby
CrazyEddy has joined #ruby
dinfuehr has quit [Ping timeout: 252 seconds]
dinfuehr has joined #ruby
dionysus69 has joined #ruby
dopie has joined #ruby
<dopie>
hey guyys im using the google drive ruby gem and trying to upload an image to to a folder... I keep on getting a TypeError and im not sure why as I followed the api docs
alfiemax has quit [Remote host closed the connection]
anisha has joined #ruby
<dopie>
got it working woohoo
dopie has quit [Quit: leaving]
apeiros_ has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
anisha has quit [Ping timeout: 252 seconds]
^mtkd has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
amatas has quit [Quit: amatas]
vichib has joined #ruby
bmurt has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Client Quit]
anisha has joined #ruby
ShekharReddy has quit [Quit: Connection closed for inactivity]
JaccoP has quit [Ping timeout: 260 seconds]
JaccoP has joined #ruby
mudstart has quit [Remote host closed the connection]
anisha has quit [Ping timeout: 264 seconds]
Dreamer3 has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
selim has quit [Ping timeout: 264 seconds]
anisha has joined #ruby
graft has quit [Ping timeout: 268 seconds]
cagomez has joined #ruby
selim has joined #ruby
graft_ has joined #ruby
workmad3_ has quit [Ping timeout: 256 seconds]
chocoelho has joined #ruby
Cavallari has joined #ruby
anisha has quit [Ping timeout: 248 seconds]
vtx has quit [Quit: vtx]
JaccoP has quit [Quit: Leaving]
balo has quit [Ping timeout: 272 seconds]
KeyJoo has quit [Ping timeout: 272 seconds]
anisha has joined #ruby
jaruga has quit [Quit: jaruga]
sanscoeur has joined #ruby
balo has joined #ruby
Musashi007 has joined #ruby
alfiemax has quit [Remote host closed the connection]
raynold has joined #ruby
conta2 has joined #ruby
claudiuinberlin has joined #ruby
alfiemax has joined #ruby
Musashi007 has quit [Quit: Musashi007]
pastorinni has joined #ruby
alfiemax has quit [Remote host closed the connection]
KeyJoo has joined #ruby
DTZUZO has quit [Quit: WeeChat 2.0]
Axy has joined #ruby
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
darkhanb has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
Mia has quit [Ping timeout: 240 seconds]
Ishido has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
Axy has quit [Ping timeout: 240 seconds]
vtx has joined #ruby
vondruch has quit [Ping timeout: 248 seconds]
hfp_work has quit [Ping timeout: 256 seconds]
jamesaxl has quit [Ping timeout: 264 seconds]
hfp_work has joined #ruby
mistergibson_ has joined #ruby
jamesaxl has joined #ruby
mistergibson has quit [Ping timeout: 272 seconds]
vtx has quit [Ping timeout: 265 seconds]
lxsameer has quit [Quit: WeeChat 1.9.1]
mistergibson__ has joined #ruby
mistergibson_ has quit [Ping timeout: 240 seconds]
mistergibson__ has quit [Read error: Connection reset by peer]
mistergibson__ has joined #ruby
conta2 has quit [Quit: conta2]
synthroi_ has joined #ruby
vtx has joined #ruby
synthroid has quit [Ping timeout: 248 seconds]
heliumk has joined #ruby
alfiemax has joined #ruby
heliumk has quit [Client Quit]
goepsilongo has quit [Ping timeout: 252 seconds]
<sylario>
I have a ruby syntax question :
<sylario>
super do |user|
heliumk has joined #ruby
<sylario>
I have this in a method of a class with inheritance
<sylario>
where does the value passed to the block come from?
TinkerTyper has quit [Read error: Connection reset by peer]
nickjj has quit [Read error: Connection reset by peer]
TinkerTyper has joined #ruby
anisha has quit [Ping timeout: 252 seconds]
nogic has joined #ruby
heliumk has quit [Quit: heliumk]
heliumk has joined #ruby
vtx has quit [Ping timeout: 248 seconds]
mtkd has quit [Ping timeout: 256 seconds]
<gizmore>
hi sylario
<sylario>
hi
<gizmore>
the method probably takes a block as parameter
<gizmore>
super does not allow different args
mtkd has joined #ruby
<gizmore>
i am not into ruby lately
<sylario>
It's devise stuff. I am not on this part of the auth, but I'll look into the context, even if it's pretty tricky
<gizmore>
i know rails and devise a bit
<gizmore>
your question is more ruvy related tho
<sylario>
I need to understand devise exactly because I am adding auth token for an ember front app on the second user model and also, the app still serve good old HTML
<gizmore>
devise is a huge incompetent stash of bad code
<sylario>
so every tutorial for token auth is relevant, but i need to make adjutments for my specifric case
<gizmore>
devise is a huge incompetent stash of bad code
<sylario>
:/
<gizmore>
seriously
<gizmore>
why would you store activations in the user table
<gizmore>
user table is the final real users
<gizmore>
not the activations
<gizmore>
devise => sucks
<gizmore>
noobware
<sylario>
José valim is a noob?
<gizmore>
yes
<gizmore>
in terms of working path / user process
<gizmore>
howto
apeiros_ has joined #ruby
<gizmore>
wb
milardovich has joined #ruby
<gizmore>
sylario: you enter your nick and its ultimatively taken
<gizmore>
that was devise of the art back in 201?
<sylario>
What do you mean?
<gizmore>
you choose a mail / nick
<gizmore>
and then its taken
<gizmore>
you can resend token yeah
milardovich has quit [Client Quit]
<gizmore>
but if someone else comes up with the same nick.... bad luck
<gizmore>
taken
<gizmore>
it's kinda DoS
<gizmore>
also bad process / register signup process
<gizmore>
bad bad flow
<gizmore>
devise sucks
jaequery has joined #ruby
apeiros_ has quit [Ping timeout: 248 seconds]
aScottishBoat has joined #ruby
nofxx_ has quit [Ping timeout: 240 seconds]
nofxx has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
conta1 has joined #ruby
c0ncealed has quit [Remote host closed the connection]
<TomyLobo>
oh, that's a commonly used library that does that? explains a ton of pages where that happened
mistergibson__ has quit [Quit: Leaving]
ahrs has quit [Remote host closed the connection]
ahrs has joined #ruby
TamePikachu has quit [Ping timeout: 264 seconds]
alfiemax has quit [Remote host closed the connection]
KeyJoo has quit [Ping timeout: 260 seconds]
monodoh has joined #ruby
monodoh has left #ruby [#ruby]
mensvaga has left #ruby [#ruby]
ammar has joined #ruby
Riddell has quit [Ping timeout: 248 seconds]
Riddell has joined #ruby
apeiros_ has joined #ruby
KeyJoo has joined #ruby
heliumk has quit [Quit: heliumk]
Klumben has quit [Ping timeout: 255 seconds]
zautomata has joined #ruby
Klumben has joined #ruby
cschneid_ has quit [Remote host closed the connection]
DTZUZU has quit [Quit: WeeChat 1.9]
DTZUZU has joined #ruby
d2dchat has quit [Ping timeout: 248 seconds]
aScottishBoat has quit [Ping timeout: 256 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vtx has joined #ruby
dviola has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
cschneid_ has joined #ruby
neo95 has joined #ruby
cschneid_ has quit [Ping timeout: 240 seconds]
Cavallari has quit [Quit: Cavallari]
Cavallari has joined #ruby
Cavallari has quit [Client Quit]
garyserj has joined #ruby
banisterfiend has joined #ruby
mtkd has quit [Ping timeout: 252 seconds]
mtkd has joined #ruby
chocoelho1 has joined #ruby
<garyserj>
How can I install a gem so that only my application can use it so it's not globally installed?
chocoelho has quit [Ping timeout: 272 seconds]
chocoelho1 is now known as chocoelho
alfiemax has joined #ruby
amatas has joined #ruby
<apeiros_>
garyserj: that's what you'd use bundler for
amatas has quit [Quit: amatas]
vyorkin has quit [Quit: WeeChat 1.9.1]
bkxd has joined #ruby
amatas has joined #ruby
<al2o3-cr>
apeiros_: can you also use gemsets?
apeiros_ is now known as apeiros
<apeiros>
sure. though bundler is being merged into rubygems, so I'd rather go with bundler
elijah has joined #ruby
<al2o3-cr>
i wasn't sure, so i thought i'd ask :)
elijah is now known as Guest19031
safetypin has joined #ruby
<al2o3-cr>
that's in 2.5 release then i imagine.
<apeiros>
not sure how far they are
<apeiros>
2.3 and 2.4's rubygems can already process the gemfile iirc
<al2o3-cr>
ah, ok.
Guest19031 has left #ruby [#ruby]
zautomata1 has joined #ruby
nofxx_ has joined #ruby
AgentVenom has joined #ruby
zautomata has quit [Ping timeout: 265 seconds]
<garyserj>
but if in my gem file I do e.g. source 'https://rubygems.org'\n gem 'banner' then I do bundle install. Then I do cd .. then I do gem list, then I see the banner gem installed. So it's not just local to my application.
nofxx has quit [Ping timeout: 268 seconds]
zautomata2 has joined #ruby
zautomata1 has quit [Ping timeout: 256 seconds]
<apeiros>
garyserj: `bundle install -h`, look for --path
<apeiros>
and yes, standard modus operandi is to install to system location. usually that makes the most sense.
nadir has joined #ruby
mikecmpbll has joined #ruby
skweek has joined #ruby
zautomata3 has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit [Remote host closed the connection]
zautomata2 has quit [Ping timeout: 272 seconds]
apeiros has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
apeiros_ is now known as apeiros
jobewan has quit [Ping timeout: 252 seconds]
jeffreylevesque has joined #ruby
KeyJoo has quit [Ping timeout: 256 seconds]
jeffreylevesque_ has quit [Ping timeout: 252 seconds]
koalabear has joined #ruby
jeffreylevesque has quit [Ping timeout: 264 seconds]
safetypin has quit [Quit: ZZZzzz…]
duderonomy has joined #ruby
yqt has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cadillac_ has quit [Read error: Connection reset by peer]
zautomata4 has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
nofxx_ has quit [Remote host closed the connection]
stealth[] has quit [Read error: Connection reset by peer]
zautomata3 has quit [Ping timeout: 252 seconds]
conta1 has quit [Quit: conta1]
yqt has quit [Ping timeout: 240 seconds]
nofxx has joined #ruby
zautomata4 has quit [Ping timeout: 240 seconds]
dachinat has joined #ruby
cadillac_ has joined #ruby
<dachinat>
Hello. Is there any variable with which I get get result of condition? I.e.: 5 - 1 > 0 ? $_value_of_5-1 : false
cagomez has joined #ruby
N64N64 has left #ruby ["WeeChat 1.4"]
<dminuoso>
Maybe in #perl
<dachinat>
i see
polishdub has quit [Quit: leaving]
pelegreno has quit [Read error: Connection reset by peer]
pelegreno has joined #ruby
<al2o3-cr>
see how does pry does it
cagomez has quit [Ping timeout: 248 seconds]
<al2o3-cr>
5 - 1 > 0 ? _ : false
nofxx has quit [Read error: Connection reset by peer]
nofxx has joined #ruby
synthroi_ has quit []
raldu has joined #ruby
cagomez has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
halt- has joined #ruby
phate408 has quit [Ping timeout: 265 seconds]
jeffreylevesque has joined #ruby
koalabear has quit [Ping timeout: 260 seconds]
Ishido has quit [Remote host closed the connection]
nofxx has quit [Ping timeout: 248 seconds]
jamesaxl has quit [Quit: WeeChat 1.9.1]
<apeiros>
dachinat: how about assigning it to a variable?
nofxx has joined #ruby
Ishido has joined #ruby
Dimik has joined #ruby
<dachinat>
thanks assigning to variable is ok
yokel has joined #ruby
raldu has quit [Quit: leaving]
k0mpa has quit [Ping timeout: 272 seconds]
<garyserj>
in rails, I have , in application_controller.rb, def hello\n render html: "hello"\n end. What kind of statement is that? I notice I can't do puts render html: "abc". I'm wondering what syntactically that render line is and its colon?
<dminuoso>
garyserj: its a method that does imperative magical stuff.
<dminuoso>
garyserj: its basically short for: render({ :html => "hello" })
<garyserj>
ah ok, thanks
<apeiros>
garyserj: `foo bar: "baz"` is short for `foo(bar: "baz")` is short for `foo({bar: "baz"})` is short for `foo({:bar => "baz"})`
<dminuoso>
that
<garyserj>
yeah, thanks
<garyserj>
and what class is render from?
<apeiros>
also as of ruby 2.dunnoanymore, foo(bar: "baz") can also be syntax for passing a keyword arg
<Neptu>
hej I have a problem i do not undestand why i need to convert this projectName = config['projectName'] and use projectName instead of using something like #{config...}
<Neptu>
is very strange
<Neptu>
but im new on ruby so maybe is something i do not understand