<ruby[bot]>
stormbytes: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<stormbytes>
hmm oki
nofxxx has joined #ruby
<stormbytes>
as i was saying, simple syntax question. You can see from the short ex. what i'm trying to do
<stormbytes>
testing if i.to_s == p, if yes, then do stuff.. (don't really need the turnery side of it)
stee_3 has joined #ruby
Pumukel has quit [Ping timeout: 246 seconds]
nofxx has quit [Ping timeout: 268 seconds]
nobitanobi has joined #ruby
stee_3__ has quit [Ping timeout: 240 seconds]
uZiel has quit [Ping timeout: 246 seconds]
govg has joined #ruby
uZiel has joined #ruby
chat has joined #ruby
chat is now known as Guest84509
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nobitanobi has quit [Ping timeout: 255 seconds]
bkxd has quit [Ping timeout: 240 seconds]
<zenspider>
stormbytes: looking
<stormbytes>
i'm looking for a shorthand if-statement
<stormbytes>
irb style
rgr has quit [Ping timeout: 245 seconds]
<zenspider>
you're gonna have to pose a question at some point
<stormbytes>
nevermind, i'm asking the wrong question.
<zenspider>
maybe you want: next unless i.to_s == p; puts "hello"
<zenspider>
maybe you want puts "hello" if i.to_s == p
<stormbytes>
i need to use a simple if/else stmt
<zenspider>
I can't tell from your lack of q
<zenspider>
you DEFINITELY want to start using 2 spaces instead of a tab
<stormbytes>
oh?
<stormbytes>
etiquette?
<zenspider>
and you could also pull the puts up so you choose the arg instead
<stormbytes>
not following that last thing
<stormbytes>
pull the puts up?
<zenspider>
q ? puts a : puts b => puts q ? a : b
raatiniemi has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<stormbytes>
ah
<zenspider>
what are you actually trying to do anyways? I haven't seen each_index used in a looong time. Nor should you want/need to to_s the index
raatiniemi has joined #ruby
<stormbytes>
getting an option value from ARGV that should represent an array index
bkxd has joined #ruby
postmodern has quit [Quit: Leaving]
<zenspider>
so to_i the arg and get the value you want?
<zenspider>
O(1)
<stormbytes>
since ARGV returns a string I'm comparing it to array_index.to_s
<stormbytes>
the other way around
<zenspider>
"should represent an array index" -> array[arg.to_i]
<stormbytes>
that presumes you know for sure the input is in fact a valid string representation of an integer value
<stormbytes>
which i don't
<stormbytes>
easier to bring the horse to the water
<zenspider>
and you can use OptionParser to do all of that, including the to_i
<zenspider>
no, it isn't easier. you can, in fact, check that it is a valid string representation of an int. last I checked, computers do that ALL the time
<stormbytes>
getting there... its been my first week back to Ruby after 3+ years of javascript
mattp_ has quit [Read error: Connection reset by peer]
aufi has joined #ruby
<zenspider>
ri OptionParser ... it'll help
<stormbytes>
assuming the array is [0, 1, 2], you'd have to check (1) convert the input to_i and then check to see if its within the range of array elems.
<stormbytes>
the way I do it is array_index.to_s == input ?
<zenspider>
god no
<stormbytes>
i'm listening
<zenspider>
I've already said it above
<stormbytes>
ok
<stormbytes>
i'm not looking for adventures tonight, but thanks for the tip
jgnagy has quit [Remote host closed the connection]
<zenspider>
really not rocket surgery here. get the value as a string, make an int from it, get the value from the array with it
<stormbytes>
way over my head
jgnagy has joined #ruby
<stormbytes>
whats wrong with my way of doing exactly that?
<zenspider>
but somehow enumerating all the indicies, stringifying them, comparing those... not over your head. gotcha.
<stormbytes>
its 1 stmt
DeeJayh_ has joined #ruby
Dimik has quit [Ping timeout: 272 seconds]
<stormbytes>
if i.to_s == p
<stormbytes>
puts ports[i]
<Radar>
?popcorn
<ruby[bot]>
It's popcorn time! 🍿🍿🍿
<ljarvis>
that is not enough popcorn
<stormbytes>
will look at that when i'm rested
statikowsky has joined #ruby
<Radar>
Why convert the index to a string instead of converting p to an integer?
<stormbytes>
because p might be gibberish
<zenspider>
stormbytes: OK. I'm not convinced that you're trolling yet. let's say your array is, for whatever reason, 1 million items long... and let's say that the user does --index 999999
<zenspider>
how many operations does your version do?
<zenspider>
how many operations does my version do?
<Radar>
stormbytes: gibberish? How so? How is p defined?
<zenspider>
Radar: give me a sec
<stormbytes>
Radar p is user input on stdin
<stormbytes>
zenspider trolling?
<Radar>
zenspider: Can't let you have all the fun ;)
<ruby[bot]>
zenspider: # => invalid value for Integer(): "gibberish" (ArgumentError) ...check link for more (https://eval.in/804825)
dionysus69 has joined #ruby
<zenspider>
really really easy to validate ints
<zenspider>
still haven't answered my question ... how many ops for p="999999" ?
<stormbytes>
1. i wasn't familiar with that, and 2. you still haven't pointed out any real advantage over my way of doing it, other than personal preference
<zenspider>
oh fuck you... answer my question. that's the answer to 2
<stormbytes>
zenspider again, thanks for the tip. i'm not up to a long exchange tonight. We can pick this up earlier in the day if you like
<ljarvis>
stormbytes: come on, zenspider has been quite clear about a clear advantage and his latest question is digging into that even more
<stormbytes>
like I said, thanks for the tip
<zenspider>
you can't even think through how many operations your f'd up "algorithm" will take in the simplest thought exercise. "thought" for you, I guess.
<zenspider>
and please tell me you don't code like that in javascript...
<stormbytes>
dude, let it go. nite
<zenspider>
...but you probably do
mattp_ has joined #ruby
jusa has joined #ruby
<zenspider>
huh... I just stumbled upon something interesting/unexpected... if this javascript parser can't parse the file in 2 seconds, it probably can't parse it in 5 minutes... totally changes the way it should do timeouts
<zenspider>
fascinating... now I want to retry this on the harder files to see if that's accurate
<zenspider>
also, ember is like, 250kloc in a single file. :/
<ljarvis>
ugh ember
<zenspider>
well, yeah... I didn't write it. I'm just trying to analyze it. (tho, WHY? why do people check in vendored files and then push them to codeclimate to analyze???)
Mia has quit [Read error: Connection reset by peer]
benjen has quit [Remote host closed the connection]
lacuna has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jusa has quit [Ping timeout: 272 seconds]
<zenspider>
stormbytes: and it is "ternary"... 1) composed of three parts. 2) using three as a base. just fyi
<zenspider>
anyone know what docker means by "Sending build context to Docker daemon <n> MB" ?
<zenspider>
it didn't used to do that and now it does everytime I image
alazred has joined #ruby
alazred has quit [Remote host closed the connection]
<stormbytes>
zenspider I have no idea how many operations. what difference does it make? your code is more efficient? Okay, great. I don't know how to do error handling in Ruby (yet) (eg. try/catch blocks) but since your example seems to raise an exception I presume it would have to be handled in that fashion
<zenspider>
thanks for the tip
<stormbytes>
here's another: jamming the RIGHT key into a lock results in a broken key :)
PorcoRex has quit [Remote host closed the connection]
charliesome has joined #ruby
DeeJayh_ has quit [Ping timeout: 260 seconds]
mark_66 has joined #ruby
apparition has joined #ruby
nofxxxx has joined #ruby
antgel has joined #ruby
biberu has joined #ruby
mikecmpbll has joined #ruby
nofxxx has quit [Ping timeout: 260 seconds]
DoubleMalt has joined #ruby
DeeJayh_ has joined #ruby
benjen has joined #ruby
tvw has quit []
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 255 seconds]
ur5us has joined #ruby
nobitanobi has joined #ruby
djbkd has joined #ruby
Pumukel has joined #ruby
ur5us_ has joined #ruby
djbkd has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 260 seconds]
ur5us_ has quit [Ping timeout: 240 seconds]
Pumukel has quit [Ping timeout: 240 seconds]
<zenspider>
followup... the docker "Sending build context" thing is proportional to the size of the contents of the directory that the Dockerfile is in. either using .dockerignore or removing crap speeds it up
minimalism has quit [Ping timeout: 268 seconds]
govg has quit [Ping timeout: 258 seconds]
nofxxx has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
Sammichmaker has joined #ruby
aufi has quit [Ping timeout: 260 seconds]
statikowsky has quit []
statikowsky has joined #ruby
nofxxxx has quit [Ping timeout: 240 seconds]
statikowsky has quit [Client Quit]
haylon has joined #ruby
statikowsky has joined #ruby
rc48 has joined #ruby
govg has joined #ruby
rc48 has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 255 seconds]
DeeJayh_ has quit [Ping timeout: 268 seconds]
haylon has quit [Ping timeout: 255 seconds]
Beams has joined #ruby
dionysus69 has joined #ruby
mikecmpbll has joined #ruby
patarr has joined #ruby
patarr has quit [Ping timeout: 245 seconds]
nadir has quit [Quit: Connection closed for inactivity]
iMadper has joined #ruby
Guest84509 has quit [Ping timeout: 258 seconds]
unshadow has joined #ruby
unshadow has quit [Client Quit]
minimalism has joined #ruby
chat_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
aufi has joined #ruby
chat_ has quit [Read error: Connection reset by peer]
leitz has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
bkxd has quit [Ping timeout: 240 seconds]
dasher00 has quit [Ping timeout: 246 seconds]
chat_ has joined #ruby
govg has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
lacuna has joined #ruby
bilal80 has joined #ruby
teclator has joined #ruby
dasher00 has joined #ruby
lacuna has quit [Client Quit]
lacuna has joined #ruby
DeeJayh_ has joined #ruby
workmad3 has joined #ruby
govg has joined #ruby
mim1k has joined #ruby
lacuna has quit [Ping timeout: 240 seconds]
Zelest has joined #ruby
Zelest has left #ruby [#ruby]
Pumukel has joined #ruby
armando has quit [Ping timeout: 240 seconds]
<uZiel>
any way to do element wise operations on two arrays? like a + b should result in adding the corresponding elements of a and b
Pumukel has quit [Ping timeout: 246 seconds]
<herwin>
I guess you're looking for a.zip(b)
lxsameer has joined #ruby
dhollin3 has joined #ruby
konsolebox has joined #ruby
dhollinger has quit [Ping timeout: 260 seconds]
DeeJayh_ has quit [Ping timeout: 240 seconds]
zaargy has joined #ruby
zaargy has left #ruby [#ruby]
<ljarvis>
or they mean [1, 2] + [2, 3] #=> [3, 5]
armando has joined #ruby
<ljarvis>
in which case yeah, a.zip(b).map { |a, b| a + b } or do it the long (but probably more efficient) way of looping
chichou has joined #ruby
aufi has quit [Ping timeout: 260 seconds]
aufi has joined #ruby
govg has quit [Ping timeout: 240 seconds]
romank has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
silentoxygen has joined #ruby
bkxd has joined #ruby
teclator has quit [Read error: Connection reset by peer]
jusa has joined #ruby
ur5us has joined #ruby
silentoxygen has quit [Client Quit]
aufi has quit [Ping timeout: 240 seconds]
jusa has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
<Caius>
zip takes a block I think
<Caius>
res = []; [1, 2, 3].zip([4, 5, 6]) { |a, b| res << a + b }; res # => [5, 7, 9]
samuil has joined #ruby
govg has joined #ruby
<Caius>
"If a block is given, it is invoked for each output array, otherwise an array of arrays is returned."
samuil has left #ruby [#ruby]
insane_tesla has joined #ruby
alazred has joined #ruby
alazred has quit [Changing host]
alazred has joined #ruby
alazred has quit [Remote host closed the connection]
hanna has quit [Remote host closed the connection]
volty has joined #ruby
<ljarvis>
ah yeah, i always forget that
dionysus69 has quit [Remote host closed the connection]
anisha_ has joined #ruby
gusrub has joined #ruby
<canton7>
bleh, I don't like side-effects in functional blocks like that
anisha has quit [Ping timeout: 240 seconds]
Pumukel has joined #ruby
anisha_ has quit [Read error: Connection reset by peer]
jameser has quit [Ping timeout: 240 seconds]
anisha_ has joined #ruby
gusrub has quit [Ping timeout: 258 seconds]
aupadhye has quit [Ping timeout: 258 seconds]
Pumukel has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
marr has joined #ruby
aufi has joined #ruby
konsolebox has quit [Quit: Leaving]
bkxd has quit [Ping timeout: 246 seconds]
bkxd has joined #ruby
arup_r has joined #ruby
arup_r has quit []
ltem has quit [Quit: Leaving]
nhhc has joined #ruby
anisha_ has quit [Read error: Connection reset by peer]
anisha_ has joined #ruby
patarr has joined #ruby
ur5us has joined #ruby
ferr has joined #ruby
patarr has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 260 seconds]
hanna has joined #ruby
alazred has joined #ruby
alazred has joined #ruby
alazred has quit [Changing host]
alazred has quit [Remote host closed the connection]
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
chichou has quit [Read error: Connection reset by peer]
yqt has joined #ruby
leitz has quit [Quit: Nappy time]
DeeJayh_ has joined #ruby
chichou has joined #ruby
patarr has joined #ruby
cjhowe has joined #ruby
govg has quit [Ping timeout: 240 seconds]
volty has quit [Ping timeout: 240 seconds]
<apeiros>
canton7: same. I'd even go as far as write that as zip+map: [1, 2, 3].zip([4, 5, 6]).map { |a,b| a+b }
<apeiros>
for what it's worth, it's even shorter
<apeiros>
res = []; [1, 2, 3].zip([4, 5, 6]) { |a, b| res << a + b }
<apeiros>
res = [1, 2, 3].zip([4, 5, 6]).map { |a, b| a + b }
patarr has quit [Ping timeout: 240 seconds]
<canton7>
yeah, I'd do the same
linoge has joined #ruby
<apeiros>
can even do .map(&:sum) now :D
alazred has joined #ruby
alazred has quit [Changing host]
alazred has joined #ruby
gnufied has joined #ruby
alazred has quit [Remote host closed the connection]
im0nde has joined #ruby
linoge has quit [Quit: linoge]
Mang0es has quit [Quit: Leaving]
mim1k has quit [Read error: Connection reset by peer]
aupadhye has joined #ruby
linoge has joined #ruby
roamingdog has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
uZiel has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
<linoge>
So, I've got this collection of objects each of which have a unique identifier. Is there any common idiom to turn that collection into a class that allows dictionary/hash like access?
roamingdog has quit [Ping timeout: 240 seconds]
gnufied has quit [Ping timeout: 272 seconds]
<zenspider>
apeiros: I'm kinda surprised how much slower zip+map is, esp w/ &:sum. odd. I would have thought that knowing the size ahead of time would be an improvement
<apeiros>
I didn't measure, how big is the difference?
<apeiros>
if it's that much slower, I think that also means the method-call overhead came down a lot in the last few versions
<zenspider>
they're all like 1.7x slower
<apeiros>
linoge: Hash[] and Array#to_h are the common ones
<apeiros>
linoge: e.g. your_objs.map { |obj| [obj.key_property, obj] }.to_h
<apeiros>
zenspider: ok, that's indeed a lot.
<apeiros>
zenspider: sad, I think that'll promote (IMO) harder to read code
<zenspider>
linoge: hashes have hash-like access... but you can `def [](key); ...; end` in your class to provide whatever type of access you want
<zenspider>
agreed
<zenspider>
not that people measure much these days :P
<apeiros>
I guess that's the upside of current state of affairs :)
DeeJayh_ has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
* zenspider
goes to bed
muelleme has joined #ruby
linoge has quit [Quit: Leaving]
Fernando-Basso has joined #ruby
apparition has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Burgestrand has joined #ruby
<apeiros>
gn8 zenspider
Sembei has quit [Read error: No route to host]
spk_ has joined #ruby
spk has quit [Ping timeout: 240 seconds]
spk_ is now known as spk
benjen has quit [Remote host closed the connection]
ddffg has joined #ruby
iMadper has quit [Ping timeout: 240 seconds]
jusa has joined #ruby
DeeJayh_ has joined #ruby
insane_tesla has quit [Quit: leaving]
houhoulis has joined #ruby
nobitanobi has quit [Remote host closed the connection]
jusa has quit [Ping timeout: 255 seconds]
rc48 has joined #ruby
nobitanobi has joined #ruby
nobitanobi has quit [Remote host closed the connection]
nobitano_ has joined #ruby
HoierM_ has joined #ruby
bsartek has joined #ruby
alazred has joined #ruby
alazred has quit [Changing host]
alazred has joined #ruby
alazred has quit [Remote host closed the connection]
bkxd has joined #ruby
bsartek has quit [Quit: This computer has gone to sleep]
bsartek has joined #ruby
HoierM_ has quit [Ping timeout: 240 seconds]
gregf_ has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
DeeJayh_ has quit [Ping timeout: 240 seconds]
olivi____ has joined #ruby
romeoh has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pumukel has joined #ruby
ur5us_ has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
mim1k has quit [Read error: Connection reset by peer]
olivi____ has quit [Ping timeout: 260 seconds]
HoierM_ has joined #ruby
brendan- has joined #ruby
oliv_____ has joined #ruby
synthroid has joined #ruby
Pumukel has quit [Ping timeout: 255 seconds]
bmurt has joined #ruby
ur5us_ has quit [Remote host closed the connection]
bmurt has quit [Client Quit]
synthroi_ has joined #ruby
minimalism has quit [Quit: minimalism]
synthroid has quit [Ping timeout: 246 seconds]
gnufied has joined #ruby
haylon has joined #ruby
haylon has quit [Ping timeout: 246 seconds]
oliv_____ has quit [Remote host closed the connection]
romeoh has quit [Remote host closed the connection]
rc48 has quit [Read error: Connection reset by peer]
oliv_____ has joined #ruby
oliv_____ has quit [Remote host closed the connection]
olivi____ has joined #ruby
cyphase has joined #ruby
<cek>
much better, but what about map{} chunk, maybe reduce of some sort
uZiel has quit [Ping timeout: 240 seconds]
<apeiros>
"find me", nice to see that your attitude is still shit cek. I expect you to do better or I'll show you the door.
<cek>
apeiros: who are you?
<cjohnson>
batman
<apeiros>
the guy with the keys to the door.
<cek>
stop bullying people
<apeiros>
!kick cek try again
cek was kicked from #ruby by ruby[bot] [try again]
<cjohnson>
lol
dru` has joined #ruby
<ljarvis>
heh
synthroid has joined #ruby
__Yiota has joined #ruby
volty has quit [Ping timeout: 260 seconds]
__Yiota has quit [Client Quit]
uZiel has joined #ruby
<Yxhuvud>
hsh.transform_values {[]} in ruby 2.4 FWIW.
<cjohnson>
Ok so another question about the method naming, it seems like def bar=(val) ... end actually does do magic
<cjohnson>
it creates a setter for the instance variable bar
<apeiros>
cjohnson: not really, no
bambanx has quit [Quit: Leaving]
<ljarvis>
bar= does not car about any ivars
<apeiros>
the only magic foo= methods have is their return value
<ljarvis>
care*
<apeiros>
>> class X; def foo=(value); return value*2; end; x = X.new; res = x.foo = 2; [res, x.instance_variables]
<ruby[bot]>
apeiros: # => /tmp/execpad-df57528eb2e6/source-df57528eb2e6:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/805264)
synthroi_ has quit [Ping timeout: 240 seconds]
<apeiros>
oh
<apeiros>
>> class X; def foo=(value); return value*2; end; end; x = X.new; res = x.foo = 2; [res, x.instance_variables]
<Jakaria>
need a help..... how can I use relationship of a model in a test class??? I am using factory-girl... when I write this in a test, it shows "null" in the terminal... >> puts user.role.to_json
<apeiros>
cjohnson: ^ as can be seen, no ivar was set, and the return value wasn't 4, it's 2 (always the right-hand side of the "assignment")
<Jakaria>
I am using Rails 5
<ljarvis>
?rails Jakaria
<ruby[bot]>
Jakaria: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
cschneid_ has joined #ruby
<Jakaria>
tnx @ruby[bot]....
<ljarvis>
?cookie
<ruby[bot]>
here's your cookie: 🍪
<cjohnson>
hrm... I will investigate. thanks apeiros and ljarvis
josealobato has joined #ruby
swills has joined #ruby
<Jakaria>
is it a bot???
olivi____ has quit [Remote host closed the connection]
<ljarvis>
Jakaria: yes, it tries to pretend it's not, which is why we tried to make it obvious in the name
olivi____ has joined #ruby
sepp2k has joined #ruby
<apeiros>
it's actually not a bot. I pay somebody to act like one.
<apeiros>
the name is a misdirection and part of the scheme.
<cjohnson>
bleep bop
<apeiros>
their SLA includes a 0.3s respond time on commands
* ljarvis
desparately tries to avoid forcing a > 0.3s response
<apeiros>
:D
cschneid_ has quit [Ping timeout: 240 seconds]
BSAlb has quit [Ping timeout: 268 seconds]
bsartek has quit [Quit: This computer has gone to sleep]
bvcosta has joined #ruby
haylon has quit [Remote host closed the connection]
mim1k has quit [Read error: Connection reset by peer]
BSaboia has joined #ruby
haylon has quit [Remote host closed the connection]
haylon has joined #ruby
BSAlb has joined #ruby
dcluna has joined #ruby
dcluna has quit [Client Quit]
robnester has quit [Ping timeout: 240 seconds]
robnester has joined #ruby
BSaboia has quit [Ping timeout: 240 seconds]
ResidentBiscuit has joined #ruby
fluffypoodle789 has joined #ruby
<fluffypoodle789>
Hi
railswebdev has joined #ruby
<fluffypoodle789>
Hi
rf_cancer has joined #ruby
<apeiros>
hi fluffypoodle789
<fluffypoodle789>
Sup
rf_cancer has left #ruby [#ruby]
olivi____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
g0d355__ has joined #ruby
dcluna has joined #ruby
user12434 has joined #ruby
user12434 has left #ruby [#ruby]
<ljarvis>
uh oh
bheesham has joined #ruby
<fluffypoodle789>
What?
<apeiros>
fluffypoodle789: not related to you ;-)
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
dionysus70 is now known as dionysus69
jrafanie has joined #ruby
oliv_____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
oliv_____ has quit [Remote host closed the connection]
olivi____ has joined #ruby
olivi____ has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 240 seconds]
aupadhye has quit [Ping timeout: 240 seconds]
oliv_____ has joined #ruby
oliv_____ has quit [Remote host closed the connection]
kabuli has joined #ruby
oliv_____ has joined #ruby
thnee has joined #ruby
oliv_____ has quit [Remote host closed the connection]
<thnee>
How is it possible the 'bundle install' installed a gem under /var/lib/gems/2.3.0/gems/ as root:root when I ran the command as my normal user??
dcluna has quit [Quit: ERC (IRC client for Emacs 25.1.50.1)]
<kabuli>
@thnee you did sudo, maybe? :/
oliv_____ has joined #ruby
<thnee>
kabuli: as I said, I ran it as my normal user, not root
nanoz] has joined #ruby
dcluna has joined #ruby
oliv_____ has quit [Remote host closed the connection]
<thnee>
does it like interanlly use sudo or something?
nanoz] has quit [Read error: Connection reset by peer]
<kabuli>
@thnee afaik, it's you who was to either input sudo or sudo with password but am not a pro.
mim1k has joined #ruby
__Yiota has joined #ruby
<kabuli>
I can't get ActiveRecord to accept SQL in order to find records which description contains a given string. May you help me with the error? — CODE, PARAMS and ERROR: https://gist.github.com/anonymous/fc2b129c5bbc753278b430afa3b9f159 PS: when there are no keywords, country and category seem to return zero results. Thx!
<Zarthus>
?rails
<ruby[bot]>
Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<kabuli>
@Zarthus
<kabuli>
@Zarthus I am not using #RubyOnRails, but just ActiveRecord to handle de DB as objects.
<kabuli>
@Zarthus
<Zarthus>
people in RoR probably still are best suited to help you :)
jrafanie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has quit [Read error: Connection reset by peer]
jphase has joined #ruby
workmad3_ has joined #ruby
jrafanie has joined #ruby
mordof has joined #ruby
<mordof>
we're currently running ruby 2.3.1 in production, and having issues with lambdas and arguments with default values, so we're upgrading to 2.3.4. I saw this on the release for 2.3.4 "An API incompatibility has been found for Ruby 2.3.4. It is the accidental removal of the API function rb_thread_fd_close" Can anyone help me understand what this
<mordof>
impacts?
<mordof>
there is a patch for it, but i'm wondering what I should look out for, if anything, since that is mentioned
workmad3 has quit [Ping timeout: 240 seconds]
skweek has quit [Ping timeout: 240 seconds]
yqt has joined #ruby
yehowyada has joined #ruby
duderonomy has quit [Ping timeout: 240 seconds]
<centrx>
mordof: I think that only matters if you're using FFI (accessing the C API directly)
<centrx>
mordof: not regular ruby code
<centrx>
mordof: It could affect some gems though
DoubleMalt has quit [Ping timeout: 260 seconds]
<centrx>
mordof: It couldn't be too disastrous or they would have released a new version already
<centrx>
mordof: another option is upgrade to Ruby 2.4.1
<centrx>
mordof: that's the latest version
<mordof>
centrx: struggling to find a good changelog from ruby 2.3.1 up to ruby 2.4.1 in human terms related to the regular ruby code, not the commit log, lol
<mordof>
the patch versions don't change anything though right? so really i should just be looking for an article that shows what's different between ruby 2.3 and 2.4?
Zarthus has quit [Remote host closed the connection]
Zarthus_ is now known as Zarthus
<centrx>
mordof: Ruby has had few/no breaking changes since like 1.9
<centrx>
just new features and performance improvements mainly
<centrx>
mordof: right 2.3 to 2.4
bathtub_shark has joined #ruby
<mordof>
2.2 had some stuff that completely broke our application (though that may had been a patch fix which resolved those)
<mordof>
so we skipped that version entirely, heh
conta has quit [Ping timeout: 245 seconds]
<mordof>
regardless - i'll check out the differences, thanks :)
Zarthus has quit [Killed (adams.freenode.net (Nickname regained by services))]
bathtub_shark is now known as Zarthus
Zarthus_ has joined #ruby
rippa has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
mikecmpbll has joined #ruby
cam27 has joined #ruby
jphase has quit []
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
bsartek has joined #ruby
roamingdog has joined #ruby
haylon has quit [Remote host closed the connection]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
mim1k has joined #ruby
pb122 has joined #ruby
roamingdog has quit [Remote host closed the connection]
apparition has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
<mordof>
I'm a little nervous about the changes to the Hash, but it looks like it still preserves order (we're depending on that in some places) so i guess we'll just go for it and see how that goes
<mordof>
i like the potential speed increase though
<havenwood>
mordof: There're no breaking changes to Hash like in 1.8 to 1.9. The internal implementation details shouldn't come at any cost to the uer.
<havenwood>
user*
haylon has joined #ruby
bheesham has quit [Quit: leaving]
dasher00 has quit [Ping timeout: 246 seconds]
<havenwood>
mordof: We're happily using 2.4.1 in prod.
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
synthroid has quit [Remote host closed the connection]
jgnagy has quit [Remote host closed the connection]
jgnagy has joined #ruby
<mordof>
havenwood: cool, thanks for the confirm. i thought that's how it looked with the explanation, but was kinda difficult to tell as i'm not terribly familiar with how the doubly linked list implementation preserved/set order of elements either
eightlimbed has joined #ruby
jrafanie has joined #ruby
polishdub has quit [Ping timeout: 255 seconds]
<centrx>
mordof: What broke when you updated to 2.2?
Jakaria has quit [Quit: WeeChat 1.4]
<mordof>
splats in keyed parameters for methods
<mordof>
the new parameter definition style for methods*
<mordof>
it wasn't passing the values into the method properly like 2.1 or 2.3 were
<mordof>
so we just skipped 2.2
bvcosta has quit [Remote host closed the connection]
<mordof>
i don't remember the exact situation, it was a weird edge case for how we were calling something... so it ended up being a *args that came from one method, passing it through to another - both using the new parameter definition....
<mordof>
the final result was that, instead of the method being called with it matching the key: values properly, it tried to pass everything in as the first key'd value... so then it was complaining that the other keys had no values
<mordof>
meanwhile the data being passed in clearly had all the keys satisfied
<centrx>
HMM!MM
<centrx>
anyway, generally Ruby upgrades very smooth
ghormoon has quit [Remote host closed the connection]
<mordof>
at the time, we weren't trying to do a full production upgrade. we were in the process of bumping up from 2.1, and one of our developers was running 2.2... i think a bunch of us were testing out 2.3 on our dev machines but he upgraded a bit earlier before 2.3 was available
<mordof>
so he encountered some oddities, and we just said "whatever, 2.3 is already here and it works.. so ditch 2.2"
dasher00 has joined #ruby
<mordof>
agreed - everythign has been pretty smooth i guess... we usually upgrade rails at the same time, so that's where a lot of the craziness comes from, lol
skweek has joined #ruby
ghormoon has joined #ruby
Burgestrand has quit [Quit: Closing time!]
dasher00 has quit [Client Quit]
hxegon has joined #ruby
ghormoon has quit [Excess Flood]
ghormoon has joined #ruby
jackrandom has joined #ruby
audy has quit [Ping timeout: 240 seconds]
jasondotstar has quit [Ping timeout: 255 seconds]
webnanners has quit [Ping timeout: 260 seconds]
nug has quit [Ping timeout: 260 seconds]
pelegreno___ has joined #ruby
Muz has quit [Ping timeout: 240 seconds]
gr0gg|ex has quit [Ping timeout: 246 seconds]
brent__ has joined #ruby
Muz has joined #ruby
pelegreno__ has quit [Ping timeout: 240 seconds]
gr0gg|ex has joined #ruby
webnanners has joined #ruby
gnarld_ has joined #ruby
jasondotstar has joined #ruby
gusrub has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
romank has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
antgel has quit [Ping timeout: 260 seconds]
romank has joined #ruby
gusrub has quit [Ping timeout: 240 seconds]
govg has joined #ruby
raspado has joined #ruby
roamingdog has joined #ruby
romank has quit [Ping timeout: 260 seconds]
jetWhidbey has joined #ruby
audy has joined #ruby
raspado_ has joined #ruby
roshanavand has joined #ruby
gnarld_ is now known as nug
skweek has joined #ruby
raspado has quit [Ping timeout: 240 seconds]
eightlimbed has quit [Ping timeout: 240 seconds]
raspado_ has quit [Remote host closed the connection]
nobitano_ has quit [Remote host closed the connection]
mark_66 has quit [Remote host closed the connection]
rc48 has quit [Read error: Connection reset by peer]
JBbanks has quit [Max SendQ exceeded]
lagweezle_away is now known as lagweezle
SeepingN has joined #ruby
JBbanks has joined #ruby
jrafanie_ has joined #ruby
<mordof>
whoever told me the update to ruby 2.4 from 2.3 wasn't big lied, lol
JBbanks has quit [Max SendQ exceeded]
jrafanie has quit [Ping timeout: 268 seconds]
<centrx>
what's wrong?
<mordof>
Fixnum deprecated *sighs*
<mordof>
that breaks soo many things
<centrx>
only for C extensions
<mordof>
Fixnum class itself is deprecated in ruby
<mordof>
can't be used anymore
olivi____ has quit [Remote host closed the connection]
<havenwood>
well, there's a deprecation warning - it can be used
oliv_____ has joined #ruby
<havenwood>
it is deprecated
<havenwood>
or will be
<mordof>
hrm.. right.. i may just be panicking/an idiot here... that means it still functions as normal for the time being then right?
JBbanks has joined #ruby
<havenwood>
Fixnum #=> Integer
oliv_____ has quit [Remote host closed the connection]
oliv_____ has joined #ruby
<centrx>
mordof: deprecated just means it will be removed in the future
<apeiros>
mordof: yes, it will still function normally
<havenwood>
mordof: Yeah, it's just giving you a headsup that it is deprecated.
<centrx>
mordof: don't use it for new implementations, and plan to get rid of it, but it will work fine now
<mordof>
k... 0.is_a? Fixnum still evaluates to true
* mordof
sighs a giant sigh of relief
jgpawletko has joined #ruby
govg has quit [Ping timeout: 240 seconds]
<havenwood>
mordof: As you bump to newer versions of gems they should handle it gracefully
oliv_____ has quit [Remote host closed the connection]
synthroid has quit [Remote host closed the connection]
<havenwood>
mordof: In your own code swap "Fixnum" or "Bignum" for "Integer"
* mordof
nods
<apeiros>
global search & replace ain't that hard :-p
oliv_____ has joined #ruby
Renich has joined #ruby
<mordof>
apeiros: gems are the main concern here. i'm not referring to Fixnum anywhere in our code
rc48 has joined #ruby
<mordof>
it triggered some pretty big version bumps on a number of gems that could be pretty volatile
<mordof>
so i panicked
oliv_____ has quit [Remote host closed the connection]
<centrx>
quick, delete all your code
jgpawletko has quit [Client Quit]
oliv_____ has joined #ruby
* mordof
runs rm -Rf * inside his working directory
* mordof
leaves work permanently
<mordof>
lol
<apeiros>
you forgot the backups
<mordof>
oh crap
* mordof
deactivates the aws account
* mordof
deletes source control
oliv_____ has quit [Remote host closed the connection]
govg has joined #ruby
<mordof>
elasticsearch version bump... 1.0.14 -> 5.0.4 ... :/
<mordof>
i'm not sure how i feel about this, lol
oliv_____ has joined #ruby
<apeiros>
haha, maybe they pulled a java? (i.e. 1.5 -> 5.0)
oliv_____ has quit [Remote host closed the connection]
olivi____ has joined #ruby
<mordof>
hey maybe... *checks*
<mordof>
they went from 2 to 5.. so i missed a single major revision
GodFather has quit [Ping timeout: 260 seconds]
olivi____ has quit [Remote host closed the connection]
whathappens has quit [Ping timeout: 240 seconds]
eightlimbed has joined #ruby
<havenwood>
0.0.26 released on Feb 1 then 5.04 released Apr 7 ;-P
<mordof>
lol
<havenwood>
they maintain different versions of the gem to parallel elasticsearch versions
<mordof>
what is this new class 'Warning' about also?
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Remote host closed the connection]
<apeiros>
about unrescuable errors
d^sh has quit [Read error: Connection reset by peer]
<mordof>
to be able to give deprecation warnings and the like i guess?
chouhoulis has joined #ruby
synthroid has joined #ruby
Cohedrin has joined #ruby
* mordof
renames his Warning class
volty has quit [Ping timeout: 260 seconds]
<apeiros>
it's a module. I don't really know what it is about. but it provides a #warn method
<mordof>
in a pry console... it behaves identically to just using puts...
<mordof>
i'm so confused why this is added :/
<apeiros>
I'm quite certain it'll write to stderr, not stdout
<mordof>
ah, so the same as STDERR.puts
<apeiros>
and from the code I know it verifies the string is ascii only
<apeiros>
probably more like $stderr.puts
<apeiros>
don't use the constants
<mordof>
using the constants are bad?
<mordof>
why is that
<apeiros>
it's inconsistent with Kernel behavior. they use the globals.
<apeiros>
i.e. if you do `$stdout = SomeOtherIO`, then `puts "foo"` and `STDOUT.puts "foo"` will behave differently.
<mordof>
i'm guessing because $stderr could be reconfigured to point somewhere else?
<mordof>
right
<mordof>
good point.
<apeiros>
I consider the constants to mostly be backups
<mordof>
so STDERR/STDOUT are the default interfaces, but you can configure to use different ones across the board easily by setting $stderr and $stdout
<mordof>
and *everything* uses those?
<apeiros>
everything from core afaik
<mordof>
sweet
DoubleMalt has joined #ruby
<mordof>
apeiros: thanks :)
DoubleMalt has quit [Read error: Connection reset by peer]
haylon has quit [Remote host closed the connection]
bsartek has quit [Quit: This computer has gone to sleep]
d^sh has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
<apeiros>
dru`: that's interesting. but I'd prefer inline contracts (pre-, postconditions and class invariants). sadly ruby lacks "old".
perniciouscaffei has quit [Ping timeout: 260 seconds]
<apeiros>
proper tests IMO take too much space to be inlined
hanna has quit [Remote host closed the connection]
<dru`>
very good point
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dru`>
hrm, I'm trying to tackle how awful it is that unit tests aren't immediately/easily found for any arbitrary function, but I'm definitely unsure of the testing syntax after writing some examples and seeing how much they explode method lengths
velocity64 has joined #ruby
<apeiros>
uh, proper conventions should help with that
pb122 has quit [Read error: Connection reset by peer]
pb122 has joined #ruby
velocity64 has quit [Remote host closed the connection]
velocity64 has joined #ruby
velocity64 has quit [Remote host closed the connection]
haylon has quit [Remote host closed the connection]
im0nde has joined #ruby
guacamole has quit [Quit: leaving]
haylon has joined #ruby
workmad3 has joined #ruby
Bock has quit [Remote host closed the connection]
<Authenticator>
Has anyone gotten Mutual-TLS working with Typhoeus? I can't figure out what options it wants and I keep getting an ssl_certproblem error when trying to specify the client cert/key/pass.
postmodern has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
ascarter has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<dru`>
If I have a function that takes a block to yield to (e.g. def foo; yield 5; end) and call it with foo { |x| puts x }, is there any way I can get a reference to the block that's being yielded to (|x| { puts x }) from within foo?
xaxisx has joined #ruby
<mordof>
dru`: i *think* def foo(&block); block.call(5); end ends up being the same thing? if yield 5 still works in that, i'm not sure...
<mordof>
i haven't done much of that
<mordof>
and i have no idea what the implications are
<dru`>
ah, you're right
cdg has quit [Ping timeout: 246 seconds]
brent__ has quit [Remote host closed the connection]
CacoS has joined #ruby
<dru`>
I got things mixed up since it'll take a block even if you don't specify one in the params
<dru`>
thanks
<mordof>
you're welcome
centrx has quit [Ping timeout: 246 seconds]
centrx has joined #ruby
bsartek has quit [Quit: This computer has gone to sleep]
_whitelogger has joined #ruby
jackjackdripper1 has joined #ruby
<Authenticator>
Typhoeus issue solved - the keypassword option is :keypasswd (note spelling) and you need to set the sslcerttype to 'p12' (if using a pkcs12 format keystore...)
jackjackdripper1 has quit [Client Quit]
jackjackdripper has quit [Ping timeout: 240 seconds]
jackjackdripper has joined #ruby
ferr has quit [Quit: WeeChat 1.7]
jrafanie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mia has joined #ruby
mim1k has joined #ruby
jobewan has joined #ruby
watersoul has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
watersoul has joined #ruby
haylon has quit [Read error: Connection reset by peer]
Dimik has joined #ruby
loechel has joined #ruby
haylon has joined #ruby
Pumukel has quit [Ping timeout: 240 seconds]
fluffypoodle789 has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 240 seconds]
gnarf has quit [Ping timeout: 240 seconds]
jrafanie has joined #ruby
TinkerTyper_ has quit [Read error: Connection reset by peer]
TinkerTyper has joined #ruby
clamstar has quit [Ping timeout: 255 seconds]
bodie_ has quit [Ping timeout: 240 seconds]
ironcame1 has quit [Ping timeout: 260 seconds]
ironcamel has joined #ruby
bodie_ has joined #ruby
brent__ has joined #ruby
clamstar has joined #ruby
weaksauce has joined #ruby
gnarf has joined #ruby
gothicsouth has joined #ruby
cjhowe has joined #ruby
haylon has quit [Ping timeout: 240 seconds]
haylon has joined #ruby
nug has quit [Ping timeout: 246 seconds]
Kug3lis has joined #ruby
mikecmpbll has joined #ruby
mim1k has joined #ruby
gnarld_ has joined #ruby
quobo has joined #ruby
mim1k has quit [Ping timeout: 268 seconds]
g0d355__ has quit [K-Lined]
dviola has joined #ruby
mtkd has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
bsartek has joined #ruby
dionysus69 has joined #ruby
mim1k has joined #ruby
Azure has quit [Ping timeout: 260 seconds]
mim1k has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
spheric has joined #ruby
Ferdroid has joined #ruby
GodFather has joined #ruby
__Yiota has joined #ruby
Cohedrin has quit [Read error: Connection reset by peer]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ferdroid has left #ruby [#ruby]
<zenspider>
rawr
Cohedrin has joined #ruby
jrafanie has joined #ruby
<baweaver>
alo zenspider
<baweaver>
you ever played with protocol buffers?
<baweaver>
heard they're broken in Ruby, trying to find out why.
ur5us has joined #ruby
Ferdroid has joined #ruby
<zenspider>
I have not. you talking about google's thingy? Mike Moore might have hooks into that now
dru` has quit [Remote host closed the connection]
jusa has quit [Ping timeout: 260 seconds]
spheric has quit [Ping timeout: 240 seconds]
haylon has quit [Ping timeout: 260 seconds]
HoierM_ has quit [Ping timeout: 240 seconds]
haylon has joined #ruby
<stormbytes>
is there a way to handle OptionParser::MissingArgument rather than getting the error output on stderr
Coldblackice_ has joined #ruby
Coldblackice has quit [Ping timeout: 246 seconds]
<zenspider>
stormbytes: `ri OptionParser` and search for "optional"
<stormbytes>
I never got ri to work
<zenspider>
so get ri to work
<stormbytes>
says Nothing known for everything
<zenspider>
ri OptionParser.make_switch is more direct
<havenwood>
stormbytes: how did you install Ruby? we can help you to get ri working.
<stormbytes>
brew install ruby
<zenspider>
`brew options ruby` => --with-doc
Cohedrin has quit [Read error: Connection reset by peer]
<stormbytes>
ah, so.. i just re-install?
<stormbytes>
will that reinstall ruby + docs or just add the docs?
bsartek has quit [Quit: This computer has gone to sleep]
loechel has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raul782 has joined #ruby
ur5us has quit [Remote host closed the connection]
<stormbytes>
havenwood ty
mim1k has joined #ruby
nobitanobi has joined #ruby
Murda has joined #ruby
<stormbytes>
zenspider checked the docs on OptionParser switch, don't see anything on how to handle the output of OptionParser::MissingArgument, which is what i'd like to do
<Murda>
How can I install gem globally?
<havenwood>
Murda: Just plain ole: gem install
<stormbytes>
don't all gems install globally?
<havenwood>
yes
<Murda>
Dont I need sudo privileges?
<stormbytes>
i don't miss NPM
<zenspider>
stormbytes: read my suggestion again
<havenwood>
Murda: That depends on your setup. RubyGems can be configured to install gems for the local user or in a system location.
<zenspider>
Murda: it depends on how your ruby was installed... if IT was installed with sudo, then your gem install will probably need sudo
<elomatreb>
If you want to have executables from gems you need a directory in your PATH
<Murda>
Worked with installing as root
<havenwood>
Murda: You can set GEM_HOME or the `--user-install` flag will install in user's home directory instead of GEM_HOME.
<havenwood>
Option flags can be set per command or globally in the ~/.gemrc file.
Cohedrin has quit [Read error: Connection reset by peer]
nobitanobi has quit [Ping timeout: 255 seconds]
Cohedrin has joined #ruby
biberu has quit []
gnarld_ is now known as nug
jenrzzz has quit [Ping timeout: 240 seconds]
rfoust has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
cdg has joined #ruby
Ashkin has joined #ruby
Ashkin has left #ruby [#ruby]
raul782 has quit [Remote host closed the connection]
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
raul782 has joined #ruby
uZiel has quit [Ping timeout: 272 seconds]
shinnya has joined #ruby
rfoust has quit [Read error: Connection reset by peer]
rfoust has joined #ruby
CacoS has quit [Read error: Connection reset by peer]
patarr_ has joined #ruby
rfoust has quit [Ping timeout: 240 seconds]
patarr has quit [Ping timeout: 268 seconds]
jamesaxl has quit [Quit: WeeChat 1.7.1]
<dionysus69>
is it possible to use selenium webdriver in headless mode?
rfoust has joined #ruby
bsartek has joined #ruby
BSAlb has quit [Quit: Leaving]
mim1k has quit [Ping timeout: 255 seconds]
eightlimbed has joined #ruby
muelleme has quit [Ping timeout: 246 seconds]
raul782 has quit [Remote host closed the connection]
<zenspider>
ok... so a client got a rails app started while developing on windows. The Gemfile.lock has binary dependencies for windows. When I did bundle on osx, it added extra lines for pure ruby deps. Like: bcrypt (3.1.11) & bcrypt (3.1.11-x86-mingw32). Is that the right thing for it to do?
<zenspider>
seems like it'll be a versioning nightmare to me
Renich has quit [Quit: Renich]
rfoust has quit [Ping timeout: 260 seconds]
shinnya has quit [Ping timeout: 255 seconds]
raul782 has joined #ruby
muelleme has joined #ruby
rfoust has joined #ruby
synthroid has quit []
BTRE has quit [Quit: Leaving]
dviola has quit [Quit: WeeChat 1.8]
hndk has joined #ruby
rfoust has quit [Read error: Connection reset by peer]
rfoust has joined #ruby
agent_white has joined #ruby
BTRE has joined #ruby
raul782 has quit [Remote host closed the connection]
nhhc has quit [Remote host closed the connection]
ecuanaso has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
nobitanobi has joined #ruby
mitt3ns has quit [Ping timeout: 246 seconds]
muelleme has quit [Ping timeout: 240 seconds]
nhhc has joined #ruby
nobitanobi has quit [Remote host closed the connection]
volty has joined #ruby
<mordof>
zenspider: you can put those inside operating system checks
hndk has quit [Quit: Leaving]
<mordof>
the gemfile entries at least
patarr_ has quit [Ping timeout: 268 seconds]
tomphp has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
GinoMan has quit [Ping timeout: 255 seconds]
brent__ has quit [Remote host closed the connection]
<zenspider>
mordof: what do you mean? it still seems like I might bump a version but it'll only happen on the pure ruby side and windows will have to bump separately... no?
minimalism has joined #ruby
bsartek has quit [Quit: This computer has gone to sleep]
bsartek has joined #ruby
<havenwood>
tell those windows devs to use the windows subsystem for linux >.>
<elomatreb>
So, Wine? :P
<elomatreb>
Nevermind, it's actually called that oo
<havenwood>
I'll I've done on it is setup a few folk with working Ruby/Rails/Postgres. But it does *just work* for that.
<havenwood>
All*
<zenspider>
havenwood: only one other dev and they're willing to switch to mac to make things smoother... but in the meantime...
ur5us has joined #ruby
<havenwood>
nice
<zenspider>
cool. I'll throw those urls at them and see what sticks
marxarelli is now known as marxarelli|afk
Azure has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
olivi____ has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
roamingdog has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrafanie has joined #ruby
tvw has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
dionysus69 has quit [Ping timeout: 240 seconds]
olivi____ has quit [Ping timeout: 240 seconds]
olivi____ has joined #ruby
eightlimbed has quit [Ping timeout: 240 seconds]
roamingdog has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
gothicsouth has joined #ruby
ecuanaso has joined #ruby
<zenspider>
it DOES seem to update both sides at the same time
kevin has joined #ruby
brent__ has joined #ruby
Murda has quit [Read error: Connection reset by peer]
gregf_ has quit [Ping timeout: 260 seconds]
olivi____ has quit [Ping timeout: 268 seconds]
roshanavand has joined #ruby
hobodave has quit [Ping timeout: 260 seconds]
kevin__ has joined #ruby
eightlimbed has joined #ruby
kevin has quit [Ping timeout: 240 seconds]
kevin__ is now known as Murda
pupsicle has quit [Quit: pupsicle]
HoierM_ has joined #ruby
jusa has joined #ruby
bsartek has quit [Quit: This computer has gone to sleep]
jusa has quit [Ping timeout: 260 seconds]
centrx has quit []
workmad3 has quit [Ping timeout: 258 seconds]
haylon has quit []
bernd27 has quit [Read error: Connection reset by peer]
_moep_ has joined #ruby
nhhc has quit [Remote host closed the connection]
GinoMan has joined #ruby
<_moep_>
hello, I try to use ruby with rbenv, but Im not able to install ruby 2.2.4. imho its searching for YAML. Ruby 2.1.0 is installed, but Im not able to install bundler for 2.1.0 - it asks "there is still a ruby 2.2.4". How can I fix it?
relyks has joined #ruby
bsartek has joined #ruby
jrafanie_ has joined #ruby
<t0d0r>
_moep_: can you paste command that you are trying
jrafanie has quit [Ping timeout: 268 seconds]
Rich_Morin has quit [Ping timeout: 268 seconds]
bvcosta has joined #ruby
<_moep_>
t0d0r: when I try to install it?
jrafanie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raspado has quit [Remote host closed the connection]
j0bk has quit [Changing host]
j0bk has joined #ruby
<t0d0r>
_moep_: yes
<t0d0r>
how did you try to install ruby 2.2.4
<_moep_>
rbenv install 2.2.4
tvw has quit []
<t0d0r>
and it fails with error?
<_moep_>
but it fails with the argument that its missing yaml (but under debian all related yaml stuff is installed). when I choose 2.1.0 it fetchs yaml-0.1.6 from cloudfront
rfoust has quit [Read error: Connection reset by peer]
rfoust has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rich_Morin has quit [Ping timeout: 240 seconds]
patarr has joined #ruby
Pumukel has joined #ruby
olivi____ has joined #ruby
<havenwood>
_moep_: libyaml-dev
tvw has joined #ruby
<_moep_>
havenwood: as I said: its installed
Rich_Morin_ has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
ecuanaso has joined #ruby
herbmillerjr has quit [Ping timeout: 240 seconds]
raul782 has joined #ruby
olivi____ has quit [Ping timeout: 268 seconds]
<havenwood>
_moep_: I'm uncertain what your issue is but the latest Ruby 2.2 is 2.2.7, with multiple bug and security fixes since 2.2.4. It's ABI compatible.
<relyks>
i'm having trouble coming up with a solution to this problem. i have an array with objects. each object has 2 properties. i'm trying to optimize based on a constraint. i want the array to be sorted based on the minimum of the first property and the maximum of the second property. like let's say the array consists of type person. each person has a number of dogs and number of cats. i'm trying to find the person with the least number of cats and m
<relyks>
ost number of dogs. does anyone have an idea of how i could approach this?
<havenwood>
_moep_: Does it fail on 2.2.7?
<_moep_>
havenwood: let my check it
<havenwood>
relyks: How do you determine least cats and most dogs? Dogs minus cats?
postmodern has quit [Remote host closed the connection]
<_moep_>
ok
postmodern has joined #ruby
<_moep_>
havenwood: I want to install it as systemuser and I didnt set a password
rc48 has quit [Read error: Connection reset by peer]
<zenspider>
dogs minus cats is wrong
<_moep_>
and now It asks me for sudo
d^sh has quit [Ping timeout: 240 seconds]
<havenwood>
zenspider: Is it dog-to-cat ratio they're looking for? I didn't get it.
<havenwood>
I think subtracting cats is always wrong.
bathtub_shark has joined #ruby
<zenspider>
relyks: maybe: owners.sort_by { |o| [o.cats, -o.dogs] }... least cats will be first, ties on least cats will be most dogs. doesn't guarantee dogs tho.
d^sh has joined #ruby
tvw has quit []
<relyks>
why is it wrong?
<relyks>
using havenwood's code as an example, i did owners.sort_by { |cats, dogs| cats - dogs }
<relyks>
zenspider: i have no idea how your snippet works :D
jackjackdripper has quit [Quit: Leaving.]
<relyks>
oh wait, i see how it works
<havenwood>
relyks: If you want to sort say first by cats, then if the cat number is the same order secondarily by dogs, you can use an array with [cat, dog] in your block.
<relyks>
yeah that makes sense
<havenwood>
or negative dogs, whatever you want to secondarily sort by
bvcosta has quit []
<_moep_>
how can I skip the sudo part? its a systemuser
t-recx has quit [Quit: t-recx]
Cohedrin has quit [Read error: Connection reset by peer]
<zenspider>
relyks: least cats and most dogs, in that priority order?
eightlimbed has quit [Ping timeout: 246 seconds]
bathtub_shark is now known as Zarth^s
<relyks>
zenspider: yeah
Cohedrin has joined #ruby
<zenspider>
how would you want `owners = [[0, 0], [10, 15], [3, 5]]` to be sorted?
<_moep_>
havenwood: when I want to do know bundle update I get "rbenv: bundle: command not found" and "The `bundle' command exists in these Ruby versions: 2.2.4"
<havenwood>
_moep_: gem install bundler
<havenwood>
_moep_: The Psych that's freaking is from RVM, not Rbenv. You seem to have a borked install.
<_moep_>
thats the same outoput
<havenwood>
How is RVM involved here? Why?
<_moep_>
I dont know.
<havenwood>
_moep_: On Ruby 2.4.1: gem install bundler && bundle
<_moep_>
It was a existing installation but something gone wrong after upgrade of serveral packages
<havenwood>
_moep_: Sanity check `which gem`, `which ruby`, `which bundle` and `gem which bundler`. Are they all rbenv Ruby?
<havenwood>
_moep_: Are you using RVM? If not, uninstall RVM.
<havenwood>
_moep_: rvm implode --force
<havenwood>
Then restart.
<_moep_>
gem same output like below
<havenwood>
After uninstalling RVM or after bundling?
<_moep_>
after gem which bundler
gothicsouth has joined #ruby
snockerton has joined #ruby
<_moep_>
and rvm shouldnt be involved
<_moep_>
but I remember, that I did somthing like gem update
<_moep_>
which ruby: /home/app/.rbenv/shims/ruby
<havenwood>
_moep_: Have you uninstalled RVM yet?
<_moep_>
I never had it installed
<havenwood>
Pick a Ruby version switch (**cough** chruby) and uninstall the others.
<havenwood>
_moep_: Yet it is installed!
ecuanaso has joined #ruby
im0nde_ has joined #ruby
<havenwood>
_moep_: You'll probably have a much better experience with just Rbenv *OR* RVM, but not both.
jenrzzz_ has joined #ruby
<_moep_>
when I search via dpkg for rvm I dont fine something
<_moep_>
and I dont want to use both
jenrzzz has quit [Ping timeout: 260 seconds]
<havenwood>
Did you run?: rvm implode --force
<_moep_>
no - because I dont want to reboot the machine now
mikecmpbll has quit [Quit: inabit. zz.]
<havenwood>
Or you could uninstall it and not reboot. But do uninstall it if you're not using it. It's not good practice to have ruby version managers lying around muddling up your environment.
im0nde has quit [Ping timeout: 240 seconds]
im0nde_ is now known as im0nde
roshanavand has quit [Ping timeout: 240 seconds]
<_moep_>
havenwood: do you know maybe the package name?
<havenwood>
_moep_: It is often installed not via package.
<_moep_>
so how can I install/delete it`
<havenwood>
rvm implode --force
<_moep_>
ok I did
hndk has joined #ruby
Papierkorb has quit [Ping timeout: 240 seconds]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Papierkorb has joined #ruby
arquebus has joined #ruby
josealobato has quit [Ping timeout: 240 seconds]
cdg has quit [Remote host closed the connection]
<_moep_>
havenwood: woah its running :)
<havenwood>
_moep_: hooah
<_moep_>
is it nessecary to run this again: cd ~/redmine && bundle exec gem install unicorn ?
jenrzzz_ has quit [Ping timeout: 240 seconds]
<_moep_>
(after the first install)
eightlimbed has quit [Ping timeout: 240 seconds]
<havenwood>
once it's installed, it's installed
<havenwood>
_moep_: no
GodFather has joined #ruby
<_moep_>
ok
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
<_moep_>
havenwood: hm but now unicorn did after I tried to restart it
roamingdog has quit [Remote host closed the connection]
boombox_ has joined #ruby
roamingdog has joined #ruby
roshanavand has joined #ruby
roamingdog has quit [Remote host closed the connection]
cam27 has quit [Quit: cam27]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
rc48 has joined #ruby
herbmillerjr has joined #ruby
rc48 has quit [Read error: Connection reset by peer]
ahrs has quit [Remote host closed the connection]
jrafanie has joined #ruby
<zenspider>
bundle exec gem install????
<zenspider>
c'mon...
<_moep_>
i did
al2o3-cr has quit [Ping timeout: 240 seconds]
<_moep_>
Removing stale pid
<_moep_>
master failed to start, check stderr log for details
ahrs has joined #ruby
<zenspider>
bundle exec ls
<_moep_>
ls`
<_moep_>
?
<havenwood>
_moep_: You don't need to ever prefix `bundle exec` to a command unless you want it to run with the exact versions of the gems in the Gemfile.lock. (You'll never want that with the `gem` command itself.)
duderonomy has quit [Ping timeout: 272 seconds]
jusa has joined #ruby
<_moep_>
ok so whats the good way to run my unicorn?
Fernando-Basso has quit [Quit: WeeChat 1.8]
relyks has quit [Ping timeout: 240 seconds]
jrafanie has quit [Client Quit]
boombox_ has quit [Remote host closed the connection]
herbmillerjr has quit [Quit: Konversation terminated!]
jusa has quit [Ping timeout: 240 seconds]
<havenwood>
_moep_: unicorn
cfec0b8d has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
<_moep_>
hm I found this:
<_moep_>
The `unicorn' command exists in these Ruby versions:
<_moep_>
2.2.4
<havenwood>
_moep_: You need to install the unicorn gem on the Ruby you want to use it with. What is it you're doing?
<havenwood>
Does it have a Gemfile? Link?
<havenwood>
_moep_: Read the unicorn README.
<_moep_>
ah ok. its installed but same error
<havenwood>
_moep_: The install and usage sections should have the bare minimum for getting it up and running.
<havenwood>
?rbenv _moep_
<ruby[bot]>
_moep_: Missing command under rbenv? Did you try `rbenv rehash`?
<_moep_>
its there but:
<_moep_>
rack not available, functionality reduced
<_moep_>
rack and Rack::Builder must be available for processing config.ru
<havenwood>
_moep_: gem install rack
<havenwood>
_moep_: What is it you're doing? Getting someone else's app to run? Rails?
al2o3-cr has joined #ruby
<_moep_>
havenwood: try to run redmine
bambanx has joined #ruby
bruce_lee has quit [Read error: Connection reset by peer]
pb122 has quit [Read error: Connection reset by peer]