baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
crova has quit [Quit: Leaving]
kapil___ has quit [Quit: Connection closed for inactivity]
ansraliant has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
RedNifre has joined #ruby
RedNifre_ has quit [Ping timeout: 272 seconds]
raulp has quit [Quit: raulp]
ascarter has joined #ruby
FrankyCyborg has left #ruby [#ruby]
sameerynho has quit [Ping timeout: 252 seconds]
dviola has quit [Quit: WeeChat 2.2]
tdy1 has joined #ruby
tdy1 is now known as tdy
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
minimal_life has quit [Quit: I am functioning within established parameters.]
RedNifre has quit [Ping timeout: 252 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
ansraliant has quit [Quit: My planet needs me]
daed has quit [Quit: leaving]
ansraliant has joined #ruby
orbyt_ has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dbz has joined #ruby
dbz has quit [Ping timeout: 272 seconds]
raulp has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
ramfjord has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
tdy has quit [Ping timeout: 245 seconds]
ramfjord has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 252 seconds]
ramfjord has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 252 seconds]
jp has joined #ruby
<evdubs_> does ruby include a sorted data structure like a RB-tree, splay tree, skip list, etc?
evdubs_ is now known as evdubs
tdy has joined #ruby
<evdubs> looks like there's https://github.com/nahi/avl_tree
<havenwood> evdubs: There's SortedSet. What are you looking to use a sorted data structure for?
graphene has quit [Remote host closed the connection]
sshock has joined #ruby
graphene has joined #ruby
orbyt_ has joined #ruby
<havenwood> evdubs: Hash is a doubly-circular linked list. It got a nice new implementation in Ruby 2.4: https://blog.heroku.com/ruby-2-4-features-hashes-integers-rounding#hash-changes
GodFather has quit [Ping timeout: 252 seconds]
<sshock> I have a small ruby script with the customary `if __FILE__ == $PROGRAM_NAME`
<sshock> I later converted it into a gem, and specified this script as one of the executables
<sshock> now when installing the gem, that script ends up in my PATH and I can run it easily,
<sshock> but it doesn't do anything, because __FILE__ doesn't match $0 anymore, since it's going through a binstub
<sshock> is there any recommended way to handle this, short of just removing the check?
<havenwood> evdubs: Or use ConcurrentSkipListMap in JRuby ;)
<havenwood> evdubs: Module.new { include_package java.util.concurrent }::ConcurrentSkipListMap.new
<headius> you should just be able to do java.util.concurrent.ConcurrentSkipListMap.new
<headius> include_package is only useful if you need to import *, and then it uses a const_missing hook
<havenwood> headius: Ah, that's much nicer! :)
<havenwood> I was just thinking there was definitely a better way but I couldn't recall.
<havenwood> sshock: What do `__FILE__` and `$0` end up being?
<havenwood> sshock: Are they the same if you File.expand_path both?
braincrash has quit [Quit: bye bye]
cyberRodent has quit [Ping timeout: 246 seconds]
esrse has joined #ruby
braincrash has joined #ruby
cyberRodent has joined #ruby
<sshock> @havenwoo: no, they are actually two completely different files
Francisco has quit [Quit: Francisco]
<sshock> e.g.: ~/.rvm/gems/ruby-2.5.1@projb/bin/myscript
gix has quit [Disconnected by services]
<sshock> vs. ~/.rvm/gems/ruby-2.5.1@projb/bundler/gems/proja-ver/myscript
<sshock> the first one is like a binstub generated by RubyGems that loads the real one
gnufied has quit [Ping timeout: 245 seconds]
hahuang65_ is now known as hahuang65
raulp has quit [Remote host closed the connection]
raulp has joined #ruby
gnufied has joined #ruby
gnufied has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doubledup has joined #ruby
doubledup has quit [Max SendQ exceeded]
doubledup has joined #ruby
kapil___ has joined #ruby
doubledup has quit [Quit: Leaving]
ptx0 has quit [Read error: Connection reset by peer]
ascarter has joined #ruby
za1b1tsu has joined #ruby
millerti has quit [Ping timeout: 246 seconds]
Puffball has joined #ruby
nowhereman_ has joined #ruby
nowhere_man has quit [Read error: Connection reset by peer]
sshock has left #ruby [#ruby]
lxsameer has joined #ruby
ramfjord has joined #ruby
ptx0 has joined #ruby
Sembei has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
lxsameer has quit [Ping timeout: 244 seconds]
Pisuke has quit [Ping timeout: 245 seconds]
MoritaShinobu has joined #ruby
ansraliant has quit [Quit: My planet needs me]
apeiros has quit [Remote host closed the connection]
ansraliant has joined #ruby
reber has joined #ruby
duderonomy has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
sauvin has joined #ruby
apeiros has joined #ruby
<za1b1tsu> I'm trying to do some shell scripting using ruby, but I don't how to elegantly handle options, like -t something
<apeiros> havenwood: concurrent skip list map? what the actual? :D
allan has left #ruby [#ruby]
clemens3 has joined #ruby
<havenwood> apeiros: I kinda wanna come up with a reason to use one now. ¯\_(ツ)_/¯
<apeiros> what's the skip list part in the map? the way the buckets are organized?
<apeiros> also TIL navigable is a word
<apeiros> I just can't imagine a skiplist being better than a tree.
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> za1b1tsu: Or this might give you some other good or bad ideas: https://gist.github.com/havenwood/02123198a79447543a3ea053e7e592fd
<za1b1tsu> havenwood: I was just reading about optionparser, but how did you integrate optionparser in ARGV, I don't get it
<havenwood> za1b1tsu: It just does that when you require it.
<havenwood> za1b1tsu: Or you can use: OptionParser.new do |x|
<havenwood> za1b1tsu: Same result.
Inline has quit [Quit: Leaving]
<za1b1tsu> havenwood: it's very clean like this, thank you
<havenwood> za1b1tsu: you're welcome
snickers has joined #ruby
<evdubs> havenwood, i am looking at currency exposure for cryptocurrency positions - when looking at the exposure, i want the currencies to be sorted so that i can compare to other positions more easily. i can get away with {}.sort.to_h, but it just feels strange not having a sorted map in ruby. i am coming from java where we have built in rb trees and skip lists
<evdubs> basically, any time i want to look at data or present data, i generally want a sorted data structure
clemens3 has quit [Ping timeout: 245 seconds]
<evdubs> or, say i have a list of trades and the trade list grows over time. i could keep the list stored as an array and then call .sort on it every time a new trade is added, or i can just keep it in a sorted data structure
<havenwood> evdubs: For the latter, SortedSet sounds like a fit.
<evdubs> and i suppose the SortedSet of tuples is considered to be a sorted map?
<evdubs> anyway, thanks for pointing out SortedSet
<havenwood> evdubs: np - ps, here's an interesting looking gem: https://github.com/ohjames/rb_lovely
<havenwood> (SortedHash)
<evdubs> also, for the people curious about skip lists, they're useful as concurrent data structures because the locking used to make sure writes don't interfere with reads is much more easily done than with a balancing binary tree
<evdubs> it is true that they will generally occupy more space than a binary tree, but balancing binary trees are notorious for poor performance when many threads are reading from/writing to it
aufi has joined #ruby
<evdubs> that's my understanding of why java provides a ConcurrentSkipListMap and not a ConcurrentTreeMap
<evdubs> i've used the ConcurrentSkipListMap as a data structure to manage an order book (a collection of orders sorted by price) - wouldn't want a hash for that
<evdubs> of course, if your code is running in an interpreter with a global lock, thread contention is not much of a concern (from what i hear)
tristanp has joined #ruby
ramfjord has joined #ruby
tristanp has quit [Ping timeout: 264 seconds]
<apeiros> 08:23 evdubs: and i suppose the SortedSet of tuples is considered to be a sorted map?
<apeiros> not really, since you can't do a key based lookup
<apeiros> evdubs: but interesting re reasoning for ConcurrentSkipListMap vs ConcurrentTreeMap
<apeiros> that does at the very least sound sensible
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
ascarter has joined #ruby
madhatter has quit [Quit: leaving]
yohji has joined #ruby
clemens3 has joined #ruby
<marz_d`ghostman> How do I require everything inside a module? I have module1:module2:Error:error_classes
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ascarter has joined #ruby
madhatter has joined #ruby
mike11 has joined #ruby
ascarter has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jmcgnh has quit [Read error: Connection reset by peer]
jmcgnh has joined #ruby
akem has quit [Remote host closed the connection]
akem has joined #ruby
tdy1 has joined #ruby
lightstalker has quit [Ping timeout: 244 seconds]
tdy has quit [Ping timeout: 260 seconds]
lightstalker has joined #ruby
prestorium has joined #ruby
mikecmpbll has joined #ruby
discopatrick has joined #ruby
lxsameer has joined #ruby
venmx has joined #ruby
prometheus_falli has joined #ruby
<apeiros> marz_d`ghostman: require and modules serve entirely different purposes
<marz_d`ghostman> I have a bunc of custom error classes inside an Error module, and I don't want to require them one by one though
<apeiros> require is "just" a glorified eval. require "path" is mostly eval(File.read(find_file_in_$LOAD_PATH("path")))
<apeiros> you can use glob + __dir__ + require
<apeiros> but honestly, just require them one by one. it's not. that. bad.
<apeiros> after all, you'll usually do `require 'yourgem'`, which in turn handles all requires. so usually you'll only ever write those explicit requires once.
<marz_d`ghostman> apeiros: Also I'm trying to rescue %x error. How do I extract the Errno::ENOENT part when doing SystemCallError => e?
<apeiros> e.class will be Errno::ENOENT
<marz_d`ghostman> apeiros: Also, tried visiting ruby docs, can't seem to find where it is explicitly defined what errors %x would through
t0adst00l has quit [Ping timeout: 256 seconds]
<marz_d`ghostman> I'm pretty sure I just don't know how to navigate through it htough
<apeiros> but you can also always be more specific first: rescue Errno::ENOENT …handle…; rescue SystemCallError …handle…
<apeiros> can't parse that sentence: "where it is explicitly defined what errors %x would through"
<marz_d`ghostman> apeiros: Oh I meant, when passing commands via %x. I want to know what possible errors it would throw so I could rescue it.
<marz_d`ghostman> Or everything listed in Errno.constants?
<apeiros> *raise
<apeiros> throw is something different
<apeiros> sadly ruby is rather lacking in documentation regarding potentially raised exceptions
<marz_d`ghostman> Oh, I see
<apeiros> you'd have to check the code, and the code of every method invoked within, and that recursively
<marz_d`ghostman> I guess I'll have to deal with ENOENT first
<apeiros> but, and this is important: you should not rescue exceptions if you can't handle them anyway.
mike11 has quit [Ping timeout: 250 seconds]
mike11 has joined #ruby
<marz_d`ghostman> apeiros: Yeah, I have a custom log file that I want that exception message to be logged, hence, I'm handling it. :)
tdy1 has quit [Ping timeout: 260 seconds]
amelliaa has joined #ruby
tristanp has joined #ruby
<marz_d`ghostman> I'm getting an error: NameError: undefined local variable or method `messsage' for #<Rise::MirrorManager::Error::CmdError:0x000000000235aa28> Did you mean? message for my custom error class http://termbin.com/1svc http://termbin.com/dydy6
<marz_d`ghostman> I'm not sure what I"m doing wrong though
ansraliant has quit [Quit: My planet needs me]
d^sh has quit [Ping timeout: 252 seconds]
tristanp has quit [Ping timeout: 245 seconds]
d^sh has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
damasceno has joined #ruby
<damasceno> Hello, I'm using nokogiri to retrieve a XML document and read it. I have three elements: id, date, description. I'm able to get all the <description> elements but I want to filter it, I would like to get the ones where the <date> element is TODAY. Is it possible to do that? Thanks
ua has quit [Ping timeout: 246 seconds]
Beams has joined #ruby
<apeiros> marz_d`ghostman: well, for logging, you don't need to know which exception it is
<apeiros> just rescue all, log, then reraise
<apeiros> marz_d`ghostman: `messsage` read the word very very closely :-p
<apeiros> especially the number of characters
<havenwood> damasceno: Could you interpolate the date with XPath or CSS selectors? Or it might take less thought to #select today's. Have an example of the XML and the result you're looking for?
<havenwood> Having fun playing with Steep! https://github.com/soutaro/steep
<damasceno> I'm trying to get the description of these events, but only if the date is TODAY
ua has joined #ruby
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
TheBloke has joined #ruby
amelliaa has quit [Quit: -]
<havenwood> damasceno: require 'open-uri'; require 'nokogiri'; rss = open 'https://status.aws.amazon.com/rss/ec2-eu-west-1.rss', &:read; doc = Nokogiri::XML(rss); items = doc.xpath("//lastBuildDate[contains(text(), '#{Time.now.strftime "%a, %-d %b %Y"}')]/parent::*/description").map(&:text)
<havenwood> #=> ["Amazon Elastic Compute Cloud (Ireland) Service Status"]
Tuor has joined #ruby
<damasceno> thanks havenwood
<havenwood> damasceno: you're welcome
nowhereman_ has quit [Remote host closed the connection]
nowhereman_ has joined #ruby
mehdi-farsi has joined #ruby
<mehdi-farsi> Hi everyone ! I'm new to the channel. My name is Mehdi and I'm a developer from Paris ! Glad to be part of this community.
<havenwood> mehdi-farsi: Welcome!
yohji has quit [Ping timeout: 246 seconds]
yohji has joined #ruby
apeiros has quit []
mehdi-farsi has quit [Quit: Page closed]
damasceno has quit [Quit: Page closed]
TheBloke has quit [Quit: My Mac has gone to sleep.]
TheBloke has joined #ruby
<marz_d`ghostman> Using rspec, how do you test private methods?
<havenwood> marz_d`ghostman: You can always get at private methods with #send, but meh.
<havenwood> marz_d`ghostman: Avoid testing private methods since it's testing implementation instead of behavior.
<marz_d`ghostman> havenwood: Cause I have this method which accepts commands then runs it %x, I'm testing it that it is receiving the correct argument. Also, testing it that it won't raise any error
<marz_d`ghostman> havenwood: Okay, given you have a private method that runs cmd, how do you test it?
<havenwood> marz_d`ghostman: Test the expected behavior via public methods.
<havenwood> marz_d`ghostman: The private method is an implementation detail.
<marz_d`ghostman> Hmmm, seems like I have to restructure my code
<havenwood> "I personally avoid testing private functions because usually you end up testing implementation instead of behaviour and those tests fail as soon as you need to change the code. Instead, I test the expected behaviour via the public functions, breaking them in small, consistent chunks." ~José Valim
AJA4350 has joined #ruby
<marz_d`ghostman> http://termbin.com/c29d
<marz_d`ghostman> havenwood: regarding the pattern pertaining a class with a method self.run { self new().run } . . . everything will be private right?
<havenwood> marz_d`ghostman: You're just exposing ::run, right. ::new is also public.
<havenwood> marz_d`ghostman: I'm falling asleep, but hopefully someone else can help. Or I'd be happy to give suggestions when i wake.
<havenwood> marz_d`ghostman: PS - You can: $?.success?
<havenwood> marz_d`ghostman: Consider Open3.
<marz_d`ghostman> havenwood: given the sample code, I need to test whether the cmd for pre_cmd and post_cmd is executed
<marz_d`ghostman> havenwood: Okay thanks man. Have a good sleep :)
<havenwood> g'night!
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
phenom has joined #ruby
GodFather has joined #ruby
Tuor has quit [Ping timeout: 252 seconds]
lomex has joined #ruby
gregf_ has joined #ruby
apparition has joined #ruby
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aufi has quit [Ping timeout: 252 seconds]
apeiros_ has joined #ruby
RedNifre has joined #ruby
<marz_d`ghostman> Why does having two expects invoke the method twice?
ua_ has joined #ruby
vonfry has joined #ruby
ua has quit [Ping timeout: 240 seconds]
aufi has joined #ruby
Guest15520 has joined #ruby
emerson has quit [Quit: WeeChat 2.2]
Guest15520 is now known as arekushi
nofxx has quit [Ping timeout: 252 seconds]
emerson has joined #ruby
vonfry has quit [Quit: WeeChat 2.2]
TheBloke has quit [Quit: Textual IRC Client: www.textualapp.com]
TheBloke has joined #ruby
fluxAeon has quit [Ping timeout: 252 seconds]
wildermind has joined #ruby
esrse has quit [Ping timeout: 252 seconds]
RedNifre_ has joined #ruby
RedNifre has quit [Ping timeout: 245 seconds]
bmurt has joined #ruby
reber has quit [Ping timeout: 244 seconds]
RedNifre has joined #ruby
reber has joined #ruby
RedNifre_ has quit [Ping timeout: 252 seconds]
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kapil___ has quit [Quit: Connection closed for inactivity]
beefjoe has joined #ruby
apeiros_ has quit [Remote host closed the connection]
<beefjoe> `eval('puts "a"')` returns nil and prints a to the console
<beefjoe> I'm able to capture nil in stdout, but how do I capture the a ?
dviola has joined #ruby
apeiros_ has joined #ruby
gnufied has joined #ruby
apeiros_ has quit [Remote host closed the connection]
mike11 has quit [Read error: Connection reset by peer]
BTRE has quit [Ping timeout: 252 seconds]
<universa1> beefjoe: redirect stdout?
<beefjoe> how
<beefjoe> this is what I'm doing: STDOUT.puts result
<beefjoe> then; OpenStruct.new stdout: stdout.string
<beefjoe> but that is only capturing nil
<beefjoe> universa1
<universa1> beefjoe: don't know from the top of my head, but googling for: ruby redirect stdout should yield some ideas
apeiros_ has joined #ruby
<TvL2386> beefjoe: you want to capture everything going to STDOUT?
<beefjoe> yep
<TvL2386> why?
<TvL2386> just curious here :)
<beefjoe> a user gives in code with eval(code)
<beefjoe> I know, not safe
<beefjoe> and I return what's returned, and in case of puts I also return the console result
vondruch has quit [Ping timeout: 245 seconds]
<TvL2386> I see
BTRE has joined #ruby
<TvL2386> I think the link universa1 is great. It shows how to replace $stdout and $stderr with a StringIO object.
<TvL2386> you can even swap it back after you're done
<beefjoe> that's what I'm already doing, and I'm able to capture the returned result
<beefjoe> except the console's result
<beefjoe> puts "a" returns nil and prints a
Rapture has joined #ruby
<beefjoe> I'm able to capture the nil, but not the printed a
<TvL2386> ohw?
<universa1> beefjoe: could you please paste a full code example?
Rapture has quit [Client Quit]
apeiros_ has quit [Ping timeout: 260 seconds]
<beefjoe> one sec
<beefjoe> universa1 TvL2386 https://hastebin.com/nohewimumo.rb
<beefjoe> so executing: ruby worker.rb 'puts "a"'
<beefjoe> only returns nil
<universa1> beefjoe: so, without eval it works for me... lets see with eval ;)
<beefjoe> everything else works fine like ruby worker.rb 1+1
<beefjoe> hmm
<beefjoe> universa1 interesting
marz_d`ghostman has quit [Quit: Page closed]
<universa1> beefjoe: works for me with eval:
<beefjoe> What changes did you make
<universa1> beefjoe: require 'stringio'
<universa1> code = %Q(puts "42")
<universa1> old_stdout = $stdout
<universa1> new_stdout = StringIO.new
<universa1> $stdout = new_stdout
<universa1> eval code
<universa1> $stderr.puts "stdout: << #{new_stdout.size}"
<universa1> $stderr.puts "stdout: << #{new_stdout.string}"
<universa1> ahh
<universa1> sorry
<beefjoe> oh lol
<universa1> this is what i wanted to copy :(
dviola has quit [Quit: WeeChat 2.2]
<TvL2386> I'm also trying to whip up a working example, but no succes yet :)
<beefjoe> What if you run 1+1 as code ?
<beefjoe> without puts
<TvL2386> that works
<beefjoe> it used to work, but with your version I'm not sure
madhatter has quit [Quit: leaving]
<beefjoe> oh yes it works
<universa1> so, i didn't wrap it in a class ;)
<universa1> but this should be basically what you are trying to do :-)
<beefjoe> yea I have the ready version now
<beefjoe> works fine
<universa1> now back to the things i actually should be looking at ;)
<universa1> beefjoe: cool! :-)
<beefjoe> Thanks a lot 🙏
<TvL2386> lol
<TvL2386> same here :)
<TvL2386> btw, got this far: https://transfer.sh/YQ3fl/test.rb.txt
<TvL2386> not working though
<universa1> TvL2386: did you try oc.stdout.string ?
<TvL2386> universa1: nope :)
<TvL2386> not printing anything
<TvL2386> I was trying to put in `require 'pry'` and adding `binding.pry` at the bottom, but the program just exits
madhatter has joined #ruby
<universa1> TvL2386: it "works", just the resetting does not work for some reason
<universa1> TvL2386: i used your code and did not change stderr, and then printed to stderr... because a simple puts "42" did not print anything as well in the end
<beefjoe> universa1 one more question
<beefjoe> I'm not able to encode the result to json
<beefjoe> I mean the stdout.size
<beefjoe> console = JSON.generate({ :console => stdout.size })
madhatter has quit [Quit: leaving]
madhatter has joined #ruby
<beefjoe> nevermind I don't need to
<beefjoe> <3
<TvL2386> sorry, got interrupted by someone who rang the doorbell... the nerve!
<TvL2386> universa1: yes it seems $stdout is borked in the end :)
vondruch has joined #ruby
P1RATEZ has joined #ruby
xfbs has joined #ruby
apparition has quit [Quit: Bye]
<beefjoe> is there a way to check IF puts was used, or if there's anything in console ?
<beefjoe> maybe I'd check if stdout.size is empty 🤔
snickers has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jcarl43 has joined #ruby
tdy1 has joined #ruby
<TvL2386> beefjoe: in order to detect a method is used, I think you should alias it and redefine it with some logic that logs that it was used.
apeiros_ has joined #ruby
<TvL2386> sounds nasty though
<beefjoe> it is xD
tdy1 has quit [Ping timeout: 245 seconds]
chouhoulis has joined #ruby
jcarl43 has quit [Ping timeout: 240 seconds]
Rapture has joined #ruby
<jhass> for checking whether STDOUT is used at all you can set $stdout to something that logs all calls (BasicObject + method_missing are your friends)
Cthulu201 has quit [Ping timeout: 272 seconds]
arekushi is now known as Guest15520
Guest15520 is now known as arekushi
quazimodo has quit [Ping timeout: 240 seconds]
jcarl43 has joined #ruby
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
alimiracle has joined #ruby
s2013 has joined #ruby
longshi has joined #ruby
longshi has left #ruby [#ruby]
<alimiracle> hi I trying to install fabricio I useing gem install fabricio its installed but I cant use it
jcarl43 has quit [Quit: WeeChat 2.2]
Creatornator has joined #ruby
alimiracle has quit [Quit: Page closed]
beowuff has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dbugger has joined #ruby
beowuff has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
beefjoe has quit [Quit: <3]
<apeiros_> oh, they left
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
beowuff has joined #ruby
oborot has joined #ruby
<oborot> Does anybody have any idea what might cause a record to wrongly return values from the database? E.g., `Model.find(56)` yields different results from what's actually in the database for it's `completed_at` field during runtime.
<oborot> No cachings is enabled.
ellcs has joined #ruby
savolla has joined #ruby
<apeiros_> ?ar oborot
<ruby[bot]> oborot: For activerecord/arel questions, please join #RubyOnRails, since they're maintained as a part of it. Note: you need to be identified with NickServ, see /msg NickServ HELP
Inline has joined #ruby
apeiros_ is now known as apeiros
Inline has quit [Read error: Connection reset by peer]
xfbs has quit [Quit: afk]
Inline has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
savolla has quit [Ping timeout: 244 seconds]
duderonomy has joined #ruby
tdy1 has joined #ruby
kpoman has quit [Ping timeout: 240 seconds]
ellcs has quit [Ping timeout: 260 seconds]
ivanskie has joined #ruby
Creatornator has joined #ruby
desperek has joined #ruby
madhatter has quit [Quit: bbl]
yohji has quit [Remote host closed the connection]
clemens3 has quit [Ping timeout: 240 seconds]
kpoman has joined #ruby
aufi has quit [Ping timeout: 240 seconds]
prestorium has quit [Quit: prestorium]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Sembei has quit [Ping timeout: 252 seconds]
s2013 has joined #ruby
MyMind has joined #ruby
DTZUZO has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
orbyt_ has joined #ruby
akem has quit [Remote host closed the connection]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZO has quit [Ping timeout: 252 seconds]
Beams has quit [Quit: .]
impermanence has quit [Remote host closed the connection]
xfbs has joined #ruby
clemens3 has joined #ruby
c0ncealed3 has quit [Remote host closed the connection]
c0ncealed3 has joined #ruby
nowhereman_ has quit [Ping timeout: 260 seconds]
Creatornator has joined #ruby
<za1b1tsu> Regarding shell scripting what's a good way to get current user?
ascarter has joined #ruby
savolla has joined #ruby
conta1 has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ascarter has quit [Client Quit]
akem has joined #ruby
sameerynho has joined #ruby
RedNifre has quit [Remote host closed the connection]
<apeiros> za1b1tsu: take a look at the Etc stdlib
ascarter has joined #ruby
xfbs_ has joined #ruby
dbz has joined #ruby
<apeiros> e.g. getpwuid and getlogin
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
xfbs has quit [Ping timeout: 244 seconds]
mike11 has joined #ruby
Creatornator has joined #ruby
Rapture has joined #ruby
xfbs_ is now known as xfbs
Creatornator has quit [Client Quit]
hays_ has joined #ruby
k0mpa has joined #ruby
<hays_> is there a way to see from the commandline what executables are associated with a gem
<hays_> given a .gem file
<hays_> or an installed gem
za1b1tsu has quit [Ping timeout: 240 seconds]
jcalla has quit [Quit: Leaving]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
energizer has joined #ruby
<energizer> Hello I'm trying to run `gem install travis -v 1.8.9 --no-rdoc --no-ri` and it says `You don't have write permissions for the /var/lib/gems/2.5.0 directory.` I'm following https://github.com/travis-ci/travis.rb#installation
MoritaShinobu has quit [Quit: Leaving]
<havenwood> hays_: For just those provided by a gem, and not also its deps, you can just find the spec and check the executables.
<havenwood> hays_: For example:
<havenwood> hays_: Gem::Specification.find_by_name('digest-sip_hash', '0.0.5').executables
<havenwood> energizer: sudo gem install travis
tiogrand has joined #ruby
<havenwood> energizer: or: gem install travis --user-install
<energizer> havenwood: i'm gonna guess that's dangerous
impermanence has joined #ruby
<energizer> hmm i can't figure out what rbenv is, --user-install will have to do for now
<energizer> thanks
snickers has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> energizer: chruby + ruby-install is another nice option if you want to install gems locally.
jcalla has joined #ruby
<energizer> ty
energizer has left #ruby ["Leaving"]
duderonomy has joined #ruby
<hays_> havenwood: is there a way to get to this from the command line
<hays_> i guess: echo "Gem::Specification.find_by_name('dcs_utilities').executables.each { |i| puts i }" | ruby
<havenwood> hays_: gem spec dcs_utilities | yq ".executables"
<havenwood> hays_: ruby -e "puts Gem::Specification.find_by_name('dcs_utilities').executables"
<hays_> thx
evdubs has quit [Remote host closed the connection]
<havenwood> hays_: yq is a pip package for querying yaml. it depends on jq. the pure Ruby version is probably nicer.
xfbs has quit [Quit: afk]
evdubs has joined #ruby
<hays_> yeah yq doesnt like that
Creatornator has joined #ruby
<havenwood> hays_: err, that ^ didn't work after a `pip install yq`?
<hays_> brew install yq
<hays_> looks like it wants a command... delete/help/merge/new
graphene has quit [Remote host closed the connection]
phenom has quit [Ping timeout: 244 seconds]
xfbs has joined #ruby
<hays_> looks like its the go implementation
graphene has joined #ruby
<hays_> let me try the python oe
<havenwood> hays_: yup, looks like go and python projects - same name, different api
za1b1tsu has joined #ruby
<hays_> yeah, interesting. well thanks for the tip about yq
<baweaver> yw yq qq?
hays_ has quit [Remote host closed the connection]
<baweaver> ha
<havenwood> hays: for the Go one it'd be: gem spec dcs_utilities | yq r - "executables"
<havenwood> hays: just needs the "r" or "read" and then a "-" or it won't read stdin.
za1b1tsu has quit [Ping timeout: 240 seconds]
conta1 has quit [Quit: conta1]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sauvin has quit [Read error: Connection reset by peer]
xfbs has quit [Ping timeout: 252 seconds]
xfbs_ has joined #ruby
xfbs has joined #ruby
Creatornator has joined #ruby
xfbs_ has quit [Ping timeout: 252 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
savolla has quit [Ping timeout: 245 seconds]
kpoman has quit [Ping timeout: 244 seconds]
dbz has quit [Ping timeout: 245 seconds]
clemens3 has quit [Ping timeout: 252 seconds]
venmx has quit [Ping timeout: 252 seconds]
tiogrand has quit [Ping timeout: 256 seconds]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
akem has quit [Quit: Leaving]
chouhoulis has quit [Remote host closed the connection]
clemens3 has joined #ruby
k0mpa has quit [Remote host closed the connection]
tiogrand has joined #ruby
chouhoulis has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
akem has joined #ruby
s2013 has joined #ruby
yokel has quit [Ping timeout: 246 seconds]
yokel has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
madhatter has joined #ruby
agent_white has joined #ruby
chouhoulis has joined #ruby
discopatrick has quit [Quit: Connection closed for inactivity]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 246 seconds]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZO has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
SeepingN has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
tiogrand has quit [Ping timeout: 256 seconds]
phenom has joined #ruby
chouhoulis has joined #ruby
sgen has joined #ruby
sgen has quit [Max SendQ exceeded]
sgen has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
chouhoulis has quit [Ping timeout: 252 seconds]
xfbs has quit [Quit: afk]
Nicmavr has joined #ruby
chouhoulis has joined #ruby
ustuntas has joined #ruby
Yxhuvud has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 250 seconds]
Pisuke has joined #ruby
MyMind has quit [Ping timeout: 240 seconds]
gregf_ has quit [Ping timeout: 256 seconds]
impermanence has quit [Remote host closed the connection]
dbz has joined #ruby
Yxhuvud has joined #ruby
orbyt_ has joined #ruby
ustuntas has quit [Quit: Leaving]
venmx has joined #ruby
mikecmpbll has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
ascarter has quit [Ping timeout: 240 seconds]
rkoller has joined #ruby
s2013 has joined #ruby
rkoller has quit [Client Quit]
dbz has quit [Ping timeout: 252 seconds]
mike11 has quit [Quit: Leaving.]
reber has quit [Remote host closed the connection]
sgen has quit [Quit: Leaving]
dbz has joined #ruby
Ecco has joined #ruby
<Ecco> Hi there!
<Ecco> I'm browsing some Ruby code and I have a hard time understanding a line
<Ecco> what does "swap" do?
Ecco has left #ruby [#ruby]
desperek has quit [Quit: xoxo]
Fusl__ has joined #ruby
Fusl has quit [Ping timeout: 256 seconds]
tdy1 is now known as tdy
venmx has quit [Ping timeout: 246 seconds]
ascarter has joined #ruby
Fr4n has joined #ruby
wildermind has quit [Quit: Connection closed for inactivity]
bijan_ has joined #ruby
dbz has quit [Remote host closed the connection]
bijan_ has quit [Client Quit]
DTZUZO has quit [Ping timeout: 246 seconds]
ascarter_ has joined #ruby
bmurt has joined #ruby
ascarter has quit [Ping timeout: 252 seconds]
Cthulu201 has joined #ruby
Cthulu201 has quit [Client Quit]
Cthulu201 has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Miron has quit [Quit: bye]
Francisco has joined #ruby
Fr4n has quit [Read error: Connection reset by peer]
jcalla has quit [Ping timeout: 252 seconds]
tdy has quit [Ping timeout: 272 seconds]
graphene has quit [Remote host closed the connection]
Dbugger has quit [Ping timeout: 260 seconds]
graphene has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sameerynho has quit [Ping timeout: 252 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
im0nde has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
im0nde has joined #ruby
wmoxam_ is now known as wmoxam
venmx has joined #ruby
wmoxam has quit [Changing host]
wmoxam has joined #ruby
axsuul has quit [Ping timeout: 252 seconds]
Inline has quit [Quit: Leaving]
clemens3 has quit [Ping timeout: 240 seconds]
Francisco has quit [Ping timeout: 252 seconds]
Creatornator has joined #ruby
axsuul has joined #ruby
wojnar has joined #ruby
tdy has joined #ruby
oborot has quit [Ping timeout: 244 seconds]
quazimodo has joined #ruby
beowuff has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fridtjof has quit [Ping timeout: 252 seconds]
Fridtjof has joined #ruby
graphene has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 252 seconds]
graphene has joined #ruby
quazimodo has joined #ruby
DTZUZO has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Ping timeout: 245 seconds]
ansraliant has joined #ruby
Fr4n has joined #ruby