<ruby[bot]>
Trel: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
BTRE has quit [Quit: Leaving]
<jtdoncas>
well, looking at the minima gem
<jtdoncas>
it doesn't have any ruby files
<jtdoncas>
so it wouldn't be found via gem which
<Trel>
is there any command which WOULD show the path to where its located?
<jtdoncas>
not to my knowledge
<jtdoncas>
what reason do you need it? You could always write your own method
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4350 has quit [Ping timeout: 260 seconds]
<Trel>
I don't know ruby, this started with wanting to look at the files in it, which led to me having to find them manually (and at the time, I had no idea if it was a user install or not)
kossae has quit [Ping timeout: 276 seconds]
AJA4350 has joined #ruby
TaderFit has joined #ruby
<jtdoncas>
ah. yeah it seems like there should be an easy solution to this :/
<havenwood>
Trel: Check your ~/.gemrc and .bundle/config, anything there?
<TaderFit>
the specifique problem is multiple gets
<Trel>
havenwood: none of those exist
<havenwood>
TaderFit: Does it work with `$stdin.gets` or `STDIN.gets`?
<Trel>
and jtdoncas it all started with me wanting to look at the base theme, after finding it by going through the paths manually, I googled if there were commands to look up the location and found the 'which' command, and when it didn't work, I had no clue from there.
<TaderFit>
yes she work
<TaderFit>
but
<TaderFit>
i must enter my chose mutiple time
<havenwood>
Trel: Anything under?: bundle config
bronson has quit [Ping timeout: 265 seconds]
<Trel>
why is bundle involved in this?
<havenwood>
Trel: Could you gist the output of?: gem env
<havenwood>
Trel: Oh, I thought you mentioned it - maybe it was crosstalk
<havenwood>
Or I just got confused
<havenwood>
Trel: Gotcha, just `gem which` and `gem list` discrepancy
<havenwood>
Trel: What version of RubyGems? Latest?
<havenwood>
(2.7.4)
<havenwood>
I've never seen a which/list discrepancy
<Trel>
yeah, I mentioned 'no bundler' earlier, when it was suggested, maybe that's where you saw it, and no, not latest rubygems then, env says 2.5.2.1 (which is what debian gave in my docker image)
<Trel>
havenwood: if you want to test it, the gem that's doing it is 'minima'
<Trel>
(and it's a user install)
<Trel>
(and the user directory IS in $PATH)
<havenwood>
Trel: yeah, I can reproduce
conceivably has quit [Remote host closed the connection]
<Trel>
havenwood: jtdoncas said earlier it may be because the gem doesn't have any rb files? It's only a theme for jekyll
<havenwood>
Trel: It's likely expecting lib/minima.rb due to convention
<Trel>
wonder if I stick an empty one there
<havenwood>
sec, let me confirm
<Trel>
yep
<Trel>
sticking an empty file in lib/minima.rb and which then shows it
<havenwood>
yup
BTRE has joined #ruby
TaderFit has quit []
alfiemax has joined #ruby
<havenwood>
so you'd need to add the file, then add it to the minima.gemspec spec.files
<Trel>
Something to keep in mind if I publish a theme as a gem
TaderFit has joined #ruby
kossae has joined #ruby
TaderFit has quit [Client Quit]
<Trel>
Thanks for the help everyone
alfiemax has quit [Ping timeout: 256 seconds]
hahuang65 has quit [Read error: Connection reset by peer]
kies has quit [Ping timeout: 256 seconds]
gizmore has joined #ruby
eric_hill has joined #ruby
hahuang65 has joined #ruby
<eric_hill>
Can anyone tell me why gem install logstash-core tells me it can't find the gem, but gem search logstash shows it just fine? ETF?
dviola has quit [Quit: WeeChat 2.0.1]
<jtdoncas>
do you see
<jtdoncas>
the (java)
KeyJoo has joined #ruby
gizmore|2 has quit [Ping timeout: 256 seconds]
<jtdoncas>
so you need JRuby
<jtdoncas>
which runs on the JVM
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<eric_hill>
Yes, it does say java after that. So is that a gem install jruby, or is that at the system level?
<jtdoncas>
system level :)
<eric_hill>
Sweet. Installing now. Thanks for the assist.
<jtdoncas>
np! good luck
herbmillerjr has quit [Quit: Konversation terminated!]
<eric_hill>
Groan. jruby installed... same error with gem install.
mtkd has quit [Ping timeout: 256 seconds]
nicesignal has quit [Quit: WeeChat 1.4]
<jtdoncas>
probably because it's defaulting to CRuby
<jtdoncas>
type which ruby
mtkd has joined #ruby
<jtdoncas>
I've never used JRuby... I think you install the gem using: jgem install logstash-core
nicesignal has joined #ruby
pastorin_ has joined #ruby
cdg has joined #ruby
orbyt_ has joined #ruby
justinfaler has joined #ruby
kossae has quit [Ping timeout: 255 seconds]
<eric_hill>
jtdoncas, I owe you a beer.
pastorinni has joined #ruby
cdg has quit [Ping timeout: 255 seconds]
<jtdoncas>
eric_hill: haha, yes you do! glad to help
pastorin_ has quit [Read error: Connection reset by peer]
justinfaler has quit [Ping timeout: 276 seconds]
cdg has joined #ruby
kossae has joined #ruby
bronson has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
troys_ is now known as troys
herbmillerjr has joined #ruby
AJA4350 has quit [Quit: AJA4350]
Toggi3 has quit [Ping timeout: 260 seconds]
vichib has joined #ruby
Kugz has joined #ruby
justinfaler has joined #ruby
<Kugz>
havenwood: just wanted to let you know I figured out how to access all of my JSON data fields, I'm now getting everything ready to save it to my database :D thanks for teaching me about Serialization yesterday :)
RyanMcCoskrie has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
kossae has quit [Ping timeout: 264 seconds]
Rouge_ has quit [Read error: Connection reset by peer]
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
Rouge has joined #ruby
darkhanb has joined #ruby
troys is now known as troys_
ur5us has quit [Remote host closed the connection]
Kugz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
imode has joined #ruby
vichib has quit [Remote host closed the connection]
Kugz has joined #ruby
vichib has joined #ruby
vichib has quit [Max SendQ exceeded]
Toggi3 has joined #ruby
vichib has joined #ruby
vichib has quit [Max SendQ exceeded]
vichib has joined #ruby
ResidentBiscuit has quit []
kies has joined #ruby
jordanm has quit [Remote host closed the connection]
govg has joined #ruby
bronson has joined #ruby
jordanm has joined #ruby
nso95_ has joined #ruby
jordanm has quit [Client Quit]
kossae has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
jordanm has joined #ruby
elphe has joined #ruby
chocoelho has quit [Ping timeout: 256 seconds]
armando has quit [Quit: ZNC 1.7.x-nightly-20171128-66897057 - https://znc.in]
armando has joined #ruby
jameser has joined #ruby
Kugz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Zamyatin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikhael_k33hl has quit [Quit: Page closed]
Kugz has joined #ruby
Zamyatin has joined #ruby
goatish has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<za1b1tsu>
I'm really missing something about doubles, how can I actually do TDD with objects, if I cant test what's going with the services inside objects
Azazator has joined #ruby
<Azazator>
Привет, это здесь можно задать вопросы по ruby и rails?
<heftig>
za1b1tsu: maybe you're supposed to use class_double("SomeService")
<heftig>
za1b1tsu: i wouldn't load the SomeService class if I need to mock it
mtkd has quit [Ping timeout: 255 seconds]
<za1b1tsu>
heftig: does not work, the double does not recieve the messages
jtdoncas has joined #ruby
<heftig>
za1b1tsu: ah, you also need to call as_stubbed_const on the double
<heftig>
so double_test = class_double("SomeService").as_stubbed_const
<Azazator>
english-only chat, right?
<heftig>
yes
mtkd has joined #ruby
<za1b1tsu>
heftig: like this double_test = class_double(SomeService).as_stubbed_const(:transfer_nested_constants => true) ?
<heftig>
za1b1tsu: I guess
<heftig>
za1b1tsu: also I think the SomeService needs to be a string
<za1b1tsu>
heftig: lost hours with this, thank you sir
ldnunes has joined #ruby
<za1b1tsu>
or maddame
jtdoncas has quit [Ping timeout: 276 seconds]
<za1b1tsu>
this is brilliant double_test = class_double("SomeService").as_stubbed_const
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
roshanavand has joined #ruby
conta has joined #ruby
<za1b1tsu>
to receive_message_chain(:new, :call) anyway I can pass an argument to call?
sepp2k has joined #ruby
bronson has joined #ruby
conta has quit [Ping timeout: 256 seconds]
elcontrastador has quit [Ping timeout: 248 seconds]
<chrisseaton>
oshanz: a JIT should really help meta-programming - make it as fast as normal programming
bronson has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
oshanz has quit [Ping timeout: 260 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
k0mpa has quit [Ping timeout: 272 seconds]
n13z has joined #ruby
conta has joined #ruby
Tempesta_ has joined #ruby
KeyJoo has joined #ruby
jtdoncas has joined #ruby
Tempesta_ has quit [Client Quit]
iamarun has quit [Remote host closed the connection]
kossae has quit [Ping timeout: 248 seconds]
Tempesta has quit [Ping timeout: 276 seconds]
tomphp has joined #ruby
yeticry has quit [Quit: leaving]
yeticry has joined #ruby
jtdoncas has quit [Ping timeout: 256 seconds]
bweston92 has joined #ruby
tomphp has quit [Client Quit]
Azazator has quit [Quit: Leaving]
raatiniemi has quit [Ping timeout: 276 seconds]
tvw has joined #ruby
cdg has quit [Remote host closed the connection]
tomphp has joined #ruby
kedare has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso>
Well spectre 1 can partially be addressed if you recompile software with modified compilers...
deathsparton has joined #ruby
kossae has quit [Ping timeout: 255 seconds]
alfiemax has joined #ruby
cdg has joined #ruby
<apeiros>
"modified compilers" + you're compiling
<apeiros>
non-performance-patches on compilers usually only affect compile time in one way ;-)
k0mpa has joined #ruby
fmcgeough has joined #ruby
jeffreylevesque has joined #ruby
randomstrangerb has quit [Ping timeout: 248 seconds]
<chrisseaton>
ShalokShalom: what was before MRI in 1.7 and before then?
randomstrangerb has joined #ruby
jeffreylevesque_ has joined #ruby
<apeiros>
> "ShalokShalom: which failed : )" -- errr, what?
jeffreylevesque has quit [Ping timeout: 248 seconds]
belmoussaoui has quit [Ping timeout: 256 seconds]
InfinityFye has joined #ruby
deathsparton has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 256 seconds]
<apeiros>
ShalokShalom, dminuoso: what dminuoso said still applies. even if it uses the technology from the yarv project since 1.9
<apeiros>
the term MRI is still used to distinguish implementations from JRruby, Rbx etc.
<dminuoso>
apeiros: Curiously I would prefer to join MRI as JRuby.. as in Japanese Ruby. ;-p
<dminuoso>
And when I say join I really mean another word.
<havenwood>
Matz calls it CRuby these days.
<apeiros>
i.e. "ruby" is the language (and the reported RUBY_ENGINE for MRI), and MRI is the "main" implementation of a runtime for ruby.
<apeiros>
havenwood: good to know
spiette has joined #ruby
<apeiros>
havenwood: maybe to avoid confusion between mri vs. mruby?
<apeiros>
and/or to disassociate it from his name?
<dminuoso>
apeiros: Boy.. its still compiling GCC. 60 minutes..
Zamyatin has joined #ruby
<dminuoso>
It probably compiles all targets..
<havenwood>
apeiros: I suspect the latter has something to do with it, but if I recall he mentioned the MRI/YARV distinction when he suggested just CRuby. It was last year, I think around RubyConf time.
deathsparton has joined #ruby
<apeiros>
reminds me that I should schedule my confs for this year
<apeiros>
or conf. since I very likely will only attend one.
<havenwood>
RubyConf in LA this year!
<apeiros>
USA is still on my no-fly countries list
* apeiros
doesn't visit shitholes :-p
<havenwood>
RubyKaigi coming up soon!
<apeiros>
that's in japan?
<havenwood>
May 31
<havenwood>
Yup!
<apeiros>
that actually sounds like it could be fun.
<apeiros>
tracks are in english?
* apeiros
enjoyed tokyo quite a bit
<havenwood>
I think most aren't in English, but they provide translation.
tomphp has joined #ruby
drewmcmillan has quit [Read error: Connection reset by peer]
randomstrangerb has quit [Ping timeout: 256 seconds]
randomstrangerb has joined #ruby
nettie has joined #ruby
Zamyatin has joined #ruby
MaksimPinigin has quit [Quit: My computer went into sleep mode or I turned it off]
icy` has joined #ruby
<nettie>
Hi guys, anyone usin puma as application server here? When I do a ps I'm seeing multiple cluster worker with the same id and different release number within square brackets [201801019293]. Deploy's restart are handled by capistrano monit plug-in and it's indeed sending a SIGTERM to the master pid. Monit is also killing workers that are growing too much in terms of memory usage with a SIGQUIT.
dinfuehr has quit [Ping timeout: 248 seconds]
dinfuehr has joined #ruby
<apeiros>
I don't think that's a release number
yrstrly has joined #ruby
crankharder has joined #ruby
<yrstrly>
Hi if I have two arrays of integers, how can I find the difference between each element in the first and the first element of the second?
<yrstrly>
a1.each{|x| x - a2[0]}
<yrstrly>
this code just returns the a1 array
<apeiros>
yrstrly: you want map, not each
<apeiros>
obj.each always returns obj
<yrstrly>
thanks!
<yrstrly>
is there anyway to extend this so I can do it over each element of the second array
<yrstrly>
so if I had these 2 arrays I'd need to do 4 subtract 16, 10 and 12
<ruby[bot]>
yrstrly: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<apeiros>
though seems like an ^ xy problem to me
<yrstrly>
and then 6 subtract 16 10 and 12
<apeiros>
for that specific problem, indeed nested maps. a1.map { |a1v| a2.map { |a2v| a1v - a2v } }
<yrstrly>
oh sorry I have these two arrays of strings and need to find the largest absolute value between the lengths of each string
<yrstrly>
so I've already got these 2 arrays with the lengths of each string
<apeiros>
what's an absolute value of two strings? o0
<yrstrly>
sorry absolute value of the difference in length
<apeiros>
that sounds more like minmax?
<apeiros>
find the shortest and longest string for each of the two
<apeiros>
compare those two sets
<apeiros>
that's vastly faster than comparing all from a1 with all from a2
bronson has joined #ruby
<yrstrly>
thanks
cdg has quit [Remote host closed the connection]
<apeiros>
i.e. the biggest difference will necessarily be either longest from a1 vs. shortest from a2, or shortest from a1 vs. longest from a2. unless I misunderstand something here.
<yrstrly>
where could I read about nesting blocks like you've done up there?
<apeiros>
I don't think there's specific resources for that
<apeiros>
a block has a return value. the return value of map is an array. an array element can be an array itself. so a nested map results in an array of arrays. that's just building up on basics.
cpruitt has joined #ruby
deathsparton has joined #ruby
mark_66 has quit [Remote host closed the connection]
<apeiros>
shortest1, longest1 = strings1.minmax_by(&:length); # same with strings2, then figure out whether it's shortest1+longest2 or longest1+shortest2
troys has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
<icy`>
this is some projecteuler problem isn
<icy`>
isnt it ;P
NightMonkey has quit [Ping timeout: 265 seconds]
<apeiros>
sounds simpler than what I remember from projecteuler :)
conta has quit [Ping timeout: 255 seconds]
<icy`>
some of that stuff was fun to attempt and optimize in ruby
<apeiros>
it was
<apeiros>
some was just so much easier to bruteforce in C 😇
synthroi_ has quit [Remote host closed the connection]
mtkd has joined #ruby
NightMonkey has joined #ruby
tvw has quit []
n0m4d1c has joined #ruby
belmoussaoui has joined #ruby
synthroid has joined #ruby
chocoelho has joined #ruby
minimalism has joined #ruby
deathsparton has joined #ruby
GremL1N2 has quit [Ping timeout: 255 seconds]
deathsparton has quit [Client Quit]
drewmcmillan has joined #ruby
Zamyatin has quit [Read error: Connection reset by peer]
Zamyatin has joined #ruby
Cavallari has joined #ruby
cdg has joined #ruby
aScottishBoat has quit [Quit: aScottishBoat]
Zamyatin has quit [Read error: Connection reset by peer]
Zamyatin has joined #ruby
alex`` has quit [Ping timeout: 255 seconds]
cdg has quit [Ping timeout: 255 seconds]
drewmcmillan has quit [Ping timeout: 268 seconds]
drewmcmillan has joined #ruby
cschneid_ has joined #ruby
John_Ivan has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
Azure has quit [Read error: Connection reset by peer]
Axy has quit [Read error: Connection reset by peer]
roshanavand has quit [Quit: Leaving.]
Azure has joined #ruby
roshanavand has joined #ruby
jackjackdripper has joined #ruby
tomphp has quit [Client Quit]
dhodgkin has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
aScottishBoat has joined #ruby
dinfuehr has quit [Ping timeout: 255 seconds]
AJA4350 has joined #ruby
dinfuehr has joined #ruby
<Yxhuvud>
That is what makes crystal so awesome for that kind of excersizes - you get amazing performance while having roughly the same level of expressibility as ruby :)
tomphp has joined #ruby
apeiros has quit [Remote host closed the connection]
Zamyatin has quit [Read error: Connection reset by peer]
cschnei__ has joined #ruby
Zamyatin has joined #ruby
tomphp has quit [Client Quit]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has quit [Ping timeout: 256 seconds]
nertzy has quit [Ping timeout: 276 seconds]
rafadc has joined #ruby
hahuang65 has quit [Ping timeout: 276 seconds]
nertzy has joined #ruby
deathsparton has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
yrstrly has quit [Ping timeout: 260 seconds]
marr has joined #ruby
n0m4d1c has quit [Remote host closed the connection]
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rrutkowski_ has joined #ruby
rrutkowski has quit [Ping timeout: 256 seconds]
Inoperable has quit [Remote host closed the connection]
rrutkowski_ has quit [Client Quit]
belmoussaoui has joined #ruby
Mia has quit [Read error: Connection reset by peer]
cdg_ has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cpruitt has quit [Remote host closed the connection]
cpruitt has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rapture has quit [Ping timeout: 256 seconds]
orbyt_ has joined #ruby
guille-moe has quit [Ping timeout: 256 seconds]
chouhoulis has quit [Remote host closed the connection]
eckhardt has joined #ruby
kfpratt has quit []
andikr has quit [Remote host closed the connection]
ramfjord has joined #ruby
cdg has joined #ruby
jackjackdripper has quit [Ping timeout: 256 seconds]
lcarlson has joined #ruby
dionysus69 has joined #ruby
guille-moe has joined #ruby
bweston92 has quit [Quit: Connection closed for inactivity]
<lcarlson>
Is there a library or nice way to convert hashes to objects? OpenStruct is great, but working with nested hashes is tricky. I know you can define methods in a block, but I haven't found too many examples online about how you can pass nested hash data to an openstruct and then create a method that returns a nested object for you
n0m4d1c has joined #ruby
drwtf has quit [Quit: Leaving]
theirisonlyonedu has quit [Quit: Leaving]
Flonk has joined #ruby
<baweaver>
you'd have to make a custom serializer of some sort