havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.2, 2.3.5 & 2.2.8: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
nowhere_man has joined #ruby
enterprisey has quit [Ping timeout: 276 seconds]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper1 has joined #ruby
cagomez has joined #ruby
banisterfiend has quit [Ping timeout: 264 seconds]
jackjackdripper has quit [Ping timeout: 255 seconds]
kishmesh has joined #ruby
<kishmesh> hi. i'm trying to use forwardable module which works fine. however, when I try to forward "sort" to an array, and I call sort on my instance with a block, I get forwardable.rb:229:in `sort': wrong number of arguments (given 1, expected 0) (ArgumentError)
<kishmesh> what is the problem?
mikecmpbll has quit [Quit: inabit. zz.]
enterprisey has joined #ruby
sanscoeur has quit [Remote host closed the connection]
sanscoeur has joined #ruby
sanscoeur has quit [Remote host closed the connection]
sanscoeur has joined #ruby
sanscoeur has quit [Remote host closed the connection]
marxarelli|afk is now known as marxarelli
mim1k has joined #ruby
sanscoeur has joined #ruby
knight33 has joined #ruby
sanscoeur has quit [Remote host closed the connection]
sanscoeur has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
oetjenj has joined #ruby
cognoscente_ has quit [Ping timeout: 260 seconds]
mim1k has quit [Ping timeout: 264 seconds]
ramfjord has quit [Ping timeout: 272 seconds]
guille-moe has quit [Ping timeout: 248 seconds]
oetjenj_ has joined #ruby
ramfjord has joined #ruby
elphe has joined #ruby
oetjenj has quit [Ping timeout: 272 seconds]
enterprisey has quit [Ping timeout: 256 seconds]
oetjenj has joined #ruby
oetjenj__ has joined #ruby
mtkd has quit [Ping timeout: 264 seconds]
mikeiniowa has joined #ruby
<zenspider> kishmesh: how can anyone answer that with that little info?
oetjenj_ has quit [Ping timeout: 272 seconds]
mtkd has joined #ruby
<kishmesh> zenspider: i'm sorry my fault. sorry for the noise. obviously I need some sleep.
N64N64 has joined #ruby
<zenspider> ?answers
<ruby[bot]> How to ask the right questions to get you the right answer: https://www.mikeash.com/getting_answers.html
<zenspider> I'd start by providing a gist of what you tried
oetjenj has quit [Ping timeout: 272 seconds]
charliesome has joined #ruby
uZiel has joined #ruby
<kishmesh> zenspider: please ignore my question. next time I will try to do better. again sorry for the noise.
Technodrome has joined #ruby
Dimik has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
allcentury has joined #ruby
charliesome has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 264 seconds]
allcentury has quit [Ping timeout: 240 seconds]
<baweaver> kishmesh: calm down, he's just telling you how to ask questions
cdg has joined #ruby
<baweaver> >>class A;extend Forwardable;def_delegators :@a,:size,:sort;def initialize(*a) @a=a end; end; a = A.new(1,2,3); [a.size, a.sort, a.sort { |v| v }]
<ruby[bot]> baweaver: # => uninitialized constant A::Forwardable (NameError) ...check link for more (https://eval.in/918042)
<baweaver> well something like that
pastorinni has joined #ruby
d_kam has quit [Quit: Lingo: www.lingoirc.com]
ogres has joined #ruby
<baweaver> >> class Ary;extend Forwardable;def_delegators :@a,:size,:sort;def initialize(*a) @a=a end; end; a = Ary.new(1,2,3); {size: a.size, sort: a.sort, sort_block: a.sort { |v| v }}
<ruby[bot]> baweaver: # => uninitialized constant Ary::Forwardable (NameError) ...check link for more (https://eval.in/918046)
<baweaver> ah. Well that's just downright silly.
cdg_ has quit [Ping timeout: 248 seconds]
<baweaver> >> require 'forwardable'; class Ary;extend Forwardable;def_delegators :@a,:size,:sort;def initialize(*a) @a=a end; end; a = Ary.new(1,2,3); {size: a.size, sort: a.sort, sort_block: a.sort { |v| v }}
<ruby[bot]> baweaver: # => {:size=>3, :sort=>[1, 2, 3], :sort_block=>[3, 2, 1]} (https://eval.in/918049)
<funkytwig> kishmesh, a gist (https://gist.github.com/) is a way of sharing code with people (call it something like info.rb and it will give you nice colour formatting). Basically copy the code to it and when you create it it makes a link).
<baweaver> there we go
<baweaver> Though really you probably want to just use SimpleDelegator
<baweaver> &ri SimpleDelegator
ResidentBiscuit has joined #ruby
cdg has quit [Ping timeout: 248 seconds]
enterprisey has joined #ruby
marr has quit [Ping timeout: 276 seconds]
chocoelho has joined #ruby
kishmesh has quit [Quit: WeeChat 1.6]
jackjackdripper has joined #ruby
vee__ has quit [Ping timeout: 248 seconds]
chocoelho has quit [Ping timeout: 272 seconds]
jackjackdripper1 has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
John____ has quit [Read error: Connection reset by peer]
ResidentBiscuit has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Ping timeout: 255 seconds]
shinnya has joined #ruby
enterprisey has quit [Ping timeout: 240 seconds]
oetjenj__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oetjenj has joined #ruby
alfiemax has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
bmurt has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
vee__ has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
crova has quit [Remote host closed the connection]
enterprisey has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
PresidentBiscuit has joined #ruby
pilne has joined #ruby
Technodrome has joined #ruby
funkytwig has quit [Ping timeout: 256 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
cagomez has quit [Remote host closed the connection]
Barrt has quit [Ping timeout: 240 seconds]
lele has quit [Ping timeout: 250 seconds]
uZiel has quit [Ping timeout: 248 seconds]
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
pastorinni has quit [Remote host closed the connection]
lele has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
cdg has joined #ruby
cagmez__ has quit [Read error: Connection reset by peer]
nogic has quit [Ping timeout: 260 seconds]
cdg has quit [Ping timeout: 250 seconds]
shinnya has quit [Ping timeout: 272 seconds]
Dimik has joined #ruby
jottr_ has joined #ruby
alfiemax has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
oetjenj has joined #ruby
sagax has quit [Remote host closed the connection]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
knight33 has joined #ruby
Gnubie_ has quit [Ping timeout: 246 seconds]
maum has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 260 seconds]
nhs has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 256 seconds]
oetjenj has quit [Ping timeout: 264 seconds]
shtirlic has quit [Quit: ZNC - http://znc.in]
shtirlic has joined #ruby
ledestin has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elphe has quit [Quit: leaving]
gizmore|2 has joined #ruby
gizmore has quit [Ping timeout: 260 seconds]
mtkd has quit [Ping timeout: 272 seconds]
mtkd has joined #ruby
drowze has quit [Ping timeout: 260 seconds]
PresidentBiscuit has quit []
andrewir1 has quit [Ping timeout: 248 seconds]
s3nd1v0g1us has quit [Quit: tempusfugit]
d^sh has quit [Ping timeout: 240 seconds]
nankyoku_ has joined #ruby
d^sh has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
nankyokusei has quit [Ping timeout: 268 seconds]
cvander has joined #ruby
fclausen has joined #ruby
pastorinni has joined #ruby
cadillac_ has joined #ruby
cognoscente has joined #ruby
sammi`_ has quit [Quit: Lost terminal]
guardianx has joined #ruby
guardianx has quit [Client Quit]
mtkd has quit [Ping timeout: 256 seconds]
cognoscente has quit [Ping timeout: 248 seconds]
sammi` has joined #ruby
alfiemax has quit [Remote host closed the connection]
<zenspider> anyone have time to do a code review on a minitest patch?
cajone has quit [Ping timeout: 255 seconds]
jenrzzz_ has joined #ruby
funburn has joined #ruby
rrutkowski has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
DmitryBochkarev has joined #ruby
funburn has quit [Client Quit]
funburn has joined #ruby
jenrzzz_ has quit [Ping timeout: 264 seconds]
uZiel has joined #ruby
alfiemax has joined #ruby
cajone has joined #ruby
<havenwood> zenspider: I will have in 20 min if you'd still like then.
funburn has quit [Quit: funburn]
jtdoncas has quit [Read error: Connection reset by peer]
d_kam has joined #ruby
funburn has joined #ruby
funburn has quit [Client Quit]
funburn has joined #ruby
funburn has quit [Client Quit]
funburn has joined #ruby
funburn has quit [Remote host closed the connection]
QualityAddict has joined #ruby
rrutkowski has quit [Quit: rrutkowski]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
cdg has joined #ruby
lacour has quit [Quit: Leaving]
cajone has quit [Ping timeout: 272 seconds]
<havenwood> zenspider: which patch?
cdg has quit [Ping timeout: 255 seconds]
vikaton has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
cajone has joined #ruby
DTZUZU has quit [Quit: WeeChat 1.9]
<havenwood> For the most recent commit on master the only comment I'd have is that `@time = Minitest.clock_time - t0` might be worth considering since that bit is time-sensitive and setting the instance variable is faster than the method call.
d_kam has quit [Quit: Be back later ...]
prutheus has joined #ruby
lytol_ has quit [Remote host closed the connection]
uZiel has quit [Remote host closed the connection]
d_kam has joined #ruby
uZiel has joined #ruby
sandroqz has joined #ruby
pilne has quit [Quit: Quitting!]
AJA4350 has quit [Quit: AJA4350]
sandroqz has quit [Client Quit]
d_kam has quit [Ping timeout: 240 seconds]
sandroqz has joined #ruby
<prutheus> Hello. I am using a bittrex api wrapper for ruby, where I can do a client get request to the api with parameters (see https://github.com/mwerner/bittrex/blob/master/lib/bittrex/client.rb). I want to call /account/getorderhistory (see here https://bittrex.com/home/api). So after i setted up my client with secret and key, i do c.get('account/getorderhistory') this works
sandroqz has quit [Client Quit]
<prutheus> but now, i also wanna pass the optional paramter market, so i do c.get('account/getorderhistory', {market: 'BTC-ETH'})
<prutheus> but now, i just get returned a nil, why? what am i doing wrong?
cognoscente has joined #ruby
mim1k has joined #ruby
cognoscente has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 264 seconds]
cvander has quit [Quit: Textual IRC Client: www.textualapp.com]
RougeT430 has quit [Ping timeout: 240 seconds]
gix has joined #ruby
jamesaxl has joined #ruby
gix- has quit [Ping timeout: 260 seconds]
<prutheus> anyone an idea? maybe? please ...
dviola has quit [Quit: WeeChat 2.0]
<prutheus> for getticker it works
<prutheus> c.get('public/getticker', {market:'USDT-BTC'})
BTRE has quit [Read error: Connection reset by peer]
BTRE has joined #ruby
marxarelli is now known as marxarelli|afk
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
<mozzarella> prutheus: what does the server send?
<prutheus> I dont know, I jsut get nil ... how can I see the resonse without manipulating the gem?
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
sylario has quit [Quit: Connection closed for inactivity]
konsolebox has joined #ruby
DTZUZU has joined #ruby
<prutheus> mozzarella: ?
goepsilongo has joined #ruby
exhiled has joined #ruby
DTZUZU has quit [Client Quit]
orbyt_ has joined #ruby
kryptoz has joined #ruby
alfiemax has quit [Remote host closed the connection]
<mozzarella> prutheus: you could use a packet sniffer
<kryptoz> Hi, I have a colleague who told me "Use a map, which will perform better for equality lookups." for "_xx_list.member?(somename)".. I thought both iterate over the list and one cannot be better than the other..
<kryptoz> btw, new to ruby, hence the doubt!
prutheus has quit [Quit: Page closed]
nofxx__ has joined #ruby
<kryptoz> should I use map or the Array.member? is good?
nofxx_ has quit [Ping timeout: 248 seconds]
milardovich has quit [Remote host closed the connection]
<mozzarella> kryptoz: how would you use map?
cognoscente has joined #ruby
<kryptoz> that was my confusion as well. i thought it two ways, one convert the array to a hash "hash = arr.map {|x| [x,true]}.to_h" and then check using has_key?
mim1k has joined #ruby
<kryptoz> or "arr.map { |x| true if x == 'name' }.any?"
<kryptoz> either way it looks complicated than arr.member?
DmitryBochkarev has joined #ruby
oetjenj has joined #ruby
<apeiros> mozzarella: your collegue means Hash (aka hashmap)
<apeiros> whoops
<apeiros> kryptoz: ^
<kryptoz> @apeiros so the first method works?
<apeiros> and no, a hash does not need to iterate its entries to find a key. which it's why hash.include?(key) is much faster than array.include?(value)
cognoscente has quit [Ping timeout: 248 seconds]
<apeiros> yes. once you've built your hash, it'll be quite a bit faster.
<kryptoz> that explains..!
<kryptoz> thank you so much @apeiros
<apeiros> assuming you mean `hash = arr.map {|x| [x,true]}.to_h` by "first method"
mim1k has quit [Ping timeout: 256 seconds]
<kryptoz> that was what I meant !
<kryptoz> thank you!
<apeiros> you can also use set: `set = arr.to_set; set.include?(x)`
moei has quit [Quit: Leaving...]
<apeiros> it internally does exactly what your code does
ur5us_ has quit [Remote host closed the connection]
<kryptoz> great! thank you so much for helping me with the doubt! :)
pastorinni has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rhebz916 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZU has joined #ruby
aupadhye has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Technodrome has joined #ruby
char_var[buffer] has quit [Ping timeout: 240 seconds]
iamarun has joined #ruby
d_kam has joined #ruby
spectrum has joined #ruby
d_kam has quit [Ping timeout: 264 seconds]
oetjenj has quit [Ping timeout: 255 seconds]
oetjenj has joined #ruby
Ouchy has quit [Ping timeout: 246 seconds]
anisha has joined #ruby
Guest25716 is now known as waveprop
waveprop has quit [Changing host]
waveprop has joined #ruby
d_kam has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
anisha has quit [Ping timeout: 256 seconds]
apeiros has quit [Remote host closed the connection]
anisha has joined #ruby
cognoscente has joined #ruby
reber has joined #ruby
djbkd_ has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
uZiel has joined #ruby
cognoscente has quit [Ping timeout: 264 seconds]
konsolebox has quit [Ping timeout: 264 seconds]
konsolebox has joined #ruby
uZiel has quit [Remote host closed the connection]
uZiel has joined #ruby
rrutkowski has joined #ruby
mjolnird has joined #ruby
rrutkowski has left #ruby [#ruby]
rrutkowski has joined #ruby
oetjenj has quit [Ping timeout: 272 seconds]
kryptoz has quit [Remote host closed the connection]
reber has quit [Remote host closed the connection]
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iamarun has quit [Remote host closed the connection]
reber has joined #ruby
reber has quit [Remote host closed the connection]
DTZUZO has joined #ruby
Dimik has joined #ruby
reber has joined #ruby
rabajaj has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
char_var[buffer] has joined #ruby
nfsnobody has quit [Ping timeout: 248 seconds]
nfsnobody has joined #ruby
enterprisey has quit [Ping timeout: 240 seconds]
LocaMocha has joined #ruby
char_var[buffer] has quit [Remote host closed the connection]
char_var[buffer] has joined #ruby
fclausen_ has joined #ruby
fclausen has quit [Ping timeout: 248 seconds]
aufi has joined #ruby
jnyw has joined #ruby
fclausen_ has quit [Ping timeout: 248 seconds]
kies has joined #ruby
LocaMocha has quit [Ping timeout: 240 seconds]
oleo has quit [Quit: Leaving]
enterprisey has joined #ruby
joast has quit [Ping timeout: 268 seconds]
alex`` has joined #ruby
alex`` has quit [Client Quit]
LocaMocha has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shady0wl_ has joined #ruby
alex`` has joined #ruby
char_var[buffer] has quit [Ping timeout: 264 seconds]
dionysus69 has joined #ruby
cadillac_ has quit [Ping timeout: 248 seconds]
roshanavand has joined #ruby
rrutkowski has quit [Quit: rrutkowski]
LocaMocha has quit [Ping timeout: 264 seconds]
rrutkowski has joined #ruby
cognoscente has joined #ruby
csk157_1 has quit [Ping timeout: 246 seconds]
chmurifree is now known as chmuri
cadillac_ has joined #ruby
ur5us has joined #ruby
cognoscente has quit [Ping timeout: 272 seconds]
andikr has joined #ruby
LocaMocha has joined #ruby
djbkd_ has quit [Remote host closed the connection]
djbkd has joined #ruby
ur5us has quit [Ping timeout: 248 seconds]
despai has joined #ruby
ur5us has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
DTZUZO has quit [Ping timeout: 248 seconds]
kryptoz has joined #ruby
LocaMocha has quit [Ping timeout: 272 seconds]
djbkd has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
enterprisey has quit [Remote host closed the connection]
despai has quit [Quit: ...]
LocaMocha has joined #ruby
anisha has quit [Ping timeout: 256 seconds]
bkxd has joined #ruby
anisha has joined #ruby
zesadf324as has quit [Ping timeout: 248 seconds]
bkxd_ has joined #ruby
cdg has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
dreamthese has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 264 seconds]
dreamthese has joined #ruby
cdg has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
plexigras has joined #ruby
jackjackdripper has joined #ruby
JaccoP has joined #ruby
agent_white has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
PaulePan1er is now known as PaulePanter
InfinityFye has joined #ruby
conta has joined #ruby
InfinityFye has left #ruby [#ruby]
Mon_Ouie has joined #ruby
lytol_ has joined #ruby
TomyWork has joined #ruby
ur5us has quit [Remote host closed the connection]
cognoscente has joined #ruby
ur5us has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
larcara has joined #ruby
cognoscente has quit [Ping timeout: 248 seconds]
agent_white has quit [Ping timeout: 248 seconds]
mark_66 has joined #ruby
pwnd_nsfw` has quit [Read error: Connection reset by peer]
howdoi has joined #ruby
bkxd_ has quit [Ping timeout: 264 seconds]
ogres has quit [Quit: Connection closed for inactivity]
bkxd has joined #ruby
LoRez has quit [Ping timeout: 246 seconds]
pwnd_nsfw has joined #ruby
alex`` has quit [Quit: WeeChat 1.9.1]
agent_white has joined #ruby
Beams has joined #ruby
Sparda has joined #ruby
<Sparda> Hello
<Sparda> Please let me know if anyone is online. I would like some help.
anisha has quit [Ping timeout: 240 seconds]
Beams has quit [Quit: .]
anisha has joined #ruby
claudiuinberlin has joined #ruby
biberu has joined #ruby
<Sparda> Hello anyone online yet?
RougeT430 has joined #ruby
RevanOne has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
Sparda has quit [Quit: Page closed]
guille-moe has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
mtkd has joined #ruby
<mozzarella> I am
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Client Quit]
funkytwig has joined #ruby
Defenestrate has joined #ruby
Defenestrate has quit [Changing host]
Defenestrate has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
Dimik has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has joined #ruby
jnollette has quit [Remote host closed the connection]
RickHull has quit [Ping timeout: 260 seconds]
jnollette has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
Puppet___ has quit [Read error: Connection reset by peer]
cognoscente has joined #ruby
Burgestrand has joined #ruby
bkxd has joined #ruby
qba73 has joined #ruby
<TheBrayn> lol
cognoscente has quit [Ping timeout: 256 seconds]
qba73 has quit [Client Quit]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
xco has joined #ruby
<xco> hi. are these two methods equivalent? https://gist.github.com/xcobar/fb0511731aaf3e4a4b5cc83f3dcb3ab8
alfiemax has joined #ruby
hfp_work has quit [Ping timeout: 240 seconds]
ana_ has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
<Burgestrand> no, exit conditions are different
<Burgestrand> xco %
lele has quit [Ping timeout: 272 seconds]
lele has joined #ruby
hfp_work has joined #ruby
<xco> Burgestrand: thanks. how about generate_token1 vs generate_token3? https://gist.github.com/xcobar/fb0511731aaf3e4a4b5cc83f3dcb3ab8
Puppet_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
qba73 has joined #ruby
RougeT430 has quit [Ping timeout: 268 seconds]
JaccoP has quit [Ping timeout: 264 seconds]
moei has joined #ruby
jottr_ has quit [Quit: WeeChat 1.9.1]
qba73 has quit [Remote host closed the connection]
konsolebox has quit [Ping timeout: 256 seconds]
qba73 has joined #ruby
rhyselsmore has joined #ruby
JaccoP has joined #ruby
mochiyoda has joined #ruby
mochiyoda_ has quit [Read error: Connection reset by peer]
alfiemax has quit []
konsolebox has joined #ruby
alfiemax has joined #ruby
rhyselsmore has quit [Ping timeout: 256 seconds]
xcesariox has joined #ruby
guille-moe has quit [Remote host closed the connection]
guille-moe has joined #ruby
mim1k has joined #ruby
agent_white has quit [Quit: leaving]
camilasan has quit [Read error: Connection reset by peer]
JaccoP has quit [Ping timeout: 264 seconds]
bkxd_ has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
jaruga has joined #ruby
camilasan has joined #ruby
bkxd has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
bkxd_ has quit [Ping timeout: 256 seconds]
Cavallari has joined #ruby
Musashi007 has joined #ruby
<xco> hi. how can i rewrite this to use “break or next” instead of “return”? https://gist.github.com/xcobar/fb0511731aaf3e4a4b5cc83f3dcb3ab8
<dminuoso> xco: Your question does not make much sense.
<dminuoso> xco: `next` is basically `return` for blocks, and `break` is `return` for loops.
<xco> dminuoso: i asked because i’m using rubocop and it’s warning me with this suggestion “Non-local exit from iterator, without return value. next, break, Array#find, Array#any?, etc. is preferred.”
<dminuoso> xco: Can you please gist the code with the context?
<dminuoso> xco: Is this possibly inside a block?
sepp2k has joined #ruby
<xco> one sec i’ll show you
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> xco: Ah yes. The problem is `return` does not what you think it does.
<dminuoso> 11:13 dminuoso | xco: `next` is basically `return` for blocks, and `break` is `return` for loops.
<dminuoso> xco: Let's consider a block an anonymous function, equivalent to a proc{} ok?
<xco> ok
<dminuoso> xco: Inside a proc the keyword `return` does not return from the `proc` for super annoying reasons.
<dminuoso> What is `return` to a method or a lambda, is `next` to a block
<dminuoso> `return` will do this: it will stop execution and return from the current *method* that is being evaluated.
<dminuoso> Which is some test runner method from your test framework.
qba73 has quit [Remote host closed the connection]
<dminuoso> xco: So just use `next` or use a lambda.
qba73 has joined #ruby
xcesariox has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cognoscente has joined #ruby
exchgr has quit [Ping timeout: 246 seconds]
<xco> so i can just replace “return” with “next” in this case?
Technodrome has joined #ruby
<dminuoso> xco: If your intend is to skip the rest of the test, yes.
<dminuoso> xco: though I think what you are doing is ill-conceived.
<dminuoso> xco: https://gist.github.com/xcobar/fb0511731aaf3e4a4b5cc83f3dcb3ab8#file-rb-rb-L14-L19 this region of code does not clearly test behavior
<dminuoso> It admits that for any `i` there is two (possibly random!) behehaviors.
<xco> dminuoso: thank you. i’m making changes
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby
cognoscente has quit [Ping timeout: 248 seconds]
funkytwig has quit [Ping timeout: 264 seconds]
exchgr has joined #ruby
<dminuoso> xco: Also the `return` is unnecessary because there's no further code anyway. So there's that as well.
<xco> dminuoso: makes sense :)
qba73 has quit [Ping timeout: 248 seconds]
<dminuoso> xco: Also I dont think you know what that region is testing.
Serpent7776 has joined #ruby
<dminuoso> xco: Effectively the code region is testing that assert_response does what its supposed to.
<xco> i know that
bruce_lee has joined #ruby
bruce_lee has joined #ruby
<xco> dminuoso: i change it to this
<xco> if it makes sense :)
<xco> now that you asked if i know what it’s testing
<dminuoso> xco: Still. Are you trying to test minitest or your (just a guess) rack middleware?
jaruga has quit [Ping timeout: 264 seconds]
<dminuoso> You still admit random behavior.
<dminuoso> What if this never produces the rack status code too_many_requests ?
<xco> now you got me thinking
cognoscente has joined #ruby
bonhoeffer has joined #ruby
<bonhoeffer> how do folks like to install ruby on windows?
ldnunes has joined #ruby
<bonhoeffer> i generally like to build from source on mac
<dminuoso> bonhoeffer: RubyInstaller is probably the defacto standard.
Defenestrate has quit [Quit: This computer has gone to sleep]
<bonhoeffer> dminuoso, thanks
howdoi has quit [Quit: Connection closed for inactivity]
cognoscente has quit [Ping timeout: 248 seconds]
guille-moe has quit [Ping timeout: 272 seconds]
<bonhoeffer> what is msys2?
<bonhoeffer> i chose the system update
<bonhoeffer> whole linux build environment?
marr has joined #ruby
guille-moe has joined #ruby
bkxd_ has joined #ruby
Beams has joined #ruby
bkxd_ has quit [Read error: Connection reset by peer]
bkxd has quit [Ping timeout: 272 seconds]
kryptoz has quit [Remote host closed the connection]
bonhoeffer has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
bonhoeffer has joined #ruby
Riddell has quit [Ping timeout: 248 seconds]
Lyubo1 has quit [Ping timeout: 248 seconds]
<bonhoeffer> msys2 recommended on windows?
jenrzzz has quit [Ping timeout: 248 seconds]
Riddell has joined #ruby
drowze has joined #ruby
Exagone313 has quit [Quit: see ya!]
Lyubo1 has joined #ruby
Exagone313 has joined #ruby
bkxd_ has joined #ruby
qba73 has joined #ruby
bkxd has quit [Ping timeout: 248 seconds]
funburn has joined #ruby
JJonah has quit [Quit: Connection closed for inactivity]
Puppet_ has quit [Quit: Leaving]
konsolebox has quit [Ping timeout: 264 seconds]
mtkd has quit [Ping timeout: 248 seconds]
ur5us has quit [Remote host closed the connection]
mtkd has joined #ruby
DTZUZO has joined #ruby
konsolebox has joined #ruby
ur5us has joined #ruby
drowze has quit [Ping timeout: 248 seconds]
xavrix has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ur5us has quit [Ping timeout: 264 seconds]
mikecmpbll has joined #ruby
Beams_ has joined #ruby
karapetyan has joined #ruby
Beams has quit [Ping timeout: 256 seconds]
konsolebox has quit [Ping timeout: 268 seconds]
<bonhoeffer> so with rubyinstaller -- how do you manage packages on windows?
tlaxkit has joined #ruby
<sonOfRa> Step 1: Get a Linux VM. Step 2: Install ruby. Step 3: there is no step 3
<bonhoeffer> ha -- true enough
<bonhoeffer> do you use vmware on windows for that?
<sonOfRa> everything on windows is just so ugh
<sonOfRa> No I just run linux
<sonOfRa> Windows gets booted for play, not for work
konsolebox has joined #ruby
spectrum has quit [Read error: Connection reset by peer]
rrutkowski has quit [Ping timeout: 264 seconds]
<dminuoso> bonhoeffer: I do.
<dminuoso> bonhoeffer: I got some mint VMs for developing.
<dminuoso> From what I hear, Ruby on Windows is mostly fine though.
<bonhoeffer> ok, thanks
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<bonhoeffer> maybe -- but installing devkit is difficult for me
<bonhoeffer> looks like it doesn't work with rubyinstaller 2.4 or newer
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
qba73 has quit [Ping timeout: 256 seconds]
milardovich has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
qba73 has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
char_var[buffer] has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
<bonhoeffer> yeah -- on windows, i'm not sure how to get to a "gem install" prompt
bkxd has quit [Max SendQ exceeded]
bkxd has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
shady0wl_ has quit [Ping timeout: 248 seconds]
qba73 has quit [Remote host closed the connection]
bkxd_ has quit [Ping timeout: 264 seconds]
qba73 has joined #ruby
bkxd__ has joined #ruby
karapety_ has joined #ruby
anisha has quit [Ping timeout: 264 seconds]
bkxd has quit [Ping timeout: 264 seconds]
tsglove has joined #ruby
Cavallari has quit [Quit: Cavallari]
drowze has joined #ruby
roshanavand has quit [Quit: Leaving]
zautomata has joined #ruby
cognoscente has joined #ruby
cdg has joined #ruby
zautomata has quit [Client Quit]
zautomata has joined #ruby
xco has quit [Ping timeout: 272 seconds]
ldnunes has quit [Ping timeout: 256 seconds]
cdg has quit [Ping timeout: 255 seconds]
cognoscente has quit [Ping timeout: 272 seconds]
vtx has joined #ruby
<vtx> hi guys, if i have a hash of 20 key-value pairs, how can i select a subset of the key-value pairs? e.g. i want to paginate my hash to the client, so how would i skip the first 10 keys, then get the next 5 keys, returning keys and values 10-15 to the client?
karapety_ has quit [Remote host closed the connection]
AJA4350 has joined #ruby
ldnunes has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
larcara has quit [Remote host closed the connection]
larcara has joined #ruby
dviola has joined #ruby
milardovich has joined #ruby
jaruga has joined #ruby
cognoscente has joined #ruby
milardovich has quit [Remote host closed the connection]
funburn has quit [Quit: funburn]
cadillac_ has quit [Ping timeout: 272 seconds]
milardovich has joined #ruby
jaruga has quit [Ping timeout: 248 seconds]
larcara has quit [Ping timeout: 248 seconds]
jaruga has joined #ruby
cognoscente has quit [Ping timeout: 264 seconds]
aupadhye has quit [Ping timeout: 240 seconds]
quobo has quit [Quit: Connection closed for inactivity]
vtx has quit [Quit: vtx]
bkxd__ has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
aufi has quit [Ping timeout: 256 seconds]
aufi has joined #ruby
Beams_ has quit [Quit: .]
tlaxkit has quit [Quit: ¡Adiós!]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
funburn has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
Amorphia has joined #ruby
<Amorphia> Hello any suggestions for a CLI parse lib?
jespada has joined #ruby
jespada has quit [Client Quit]
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby
jespada has joined #ruby
jespada has quit [Client Quit]
tvw has joined #ruby
howdoi has joined #ruby
bkxd has quit []
Puffball_ has joined #ruby
larcara has joined #ruby
cdg has joined #ruby
govg has joined #ruby
Puffball has quit [Ping timeout: 248 seconds]
shinnya has joined #ruby
aufi_ has joined #ruby
aufi has quit [Ping timeout: 264 seconds]
cdg has quit [Ping timeout: 248 seconds]
larcara has quit [Ping timeout: 256 seconds]
mim1k has quit [Ping timeout: 256 seconds]
mjolnird has quit [Remote host closed the connection]
mim1k has joined #ruby
guardianx has joined #ruby
d_kam has quit [Quit: Be back later ...]
Defenestrate has joined #ruby
Defenestrate has quit [Changing host]
Defenestrate has joined #ruby
synthroid has joined #ruby
vondruch_ has joined #ruby
vondruch has quit [Ping timeout: 260 seconds]
vondruch_ is now known as vondruch
karapetyan has quit [Remote host closed the connection]
ana_ has quit [Remote host closed the connection]
DmitryBochkarev has joined #ruby
guardianx has quit []
ana_ has joined #ruby
karapetyan has joined #ruby
mim1k has quit [Ping timeout: 260 seconds]
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
Defenestrate has quit [Quit: Leaving]
karapetyan has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
karapetyan has joined #ruby
knight33 has joined #ruby
knight33 has quit [Max SendQ exceeded]
karapetyan has quit [Read error: Connection reset by peer]
rabajaj has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
alfiemax has quit [Remote host closed the connection]
karapetyan has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
karapetyan has joined #ruby
nankyokusei has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
kapil___ has joined #ruby
karapetyan has joined #ruby
nankyoku_ has quit [Ping timeout: 240 seconds]
karapetyan has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
karapetyan has joined #ruby
mtkd has quit [Ping timeout: 272 seconds]
alfiemax has quit [Ping timeout: 256 seconds]
karapetyan has quit [Read error: Connection reset by peer]
qba73 has quit [Ping timeout: 256 seconds]
mtkd has joined #ruby
karapetyan has joined #ruby
Musashi007 has quit [Quit: Musashi007]
karapetyan has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 248 seconds]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
uZiel has joined #ruby
karapetyan has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
truenito has joined #ruby
cognoscente has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
nankyoku_ has joined #ruby
hinbody has joined #ruby
karapetyan has joined #ruby
karapety_ has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 272 seconds]
karapety_ has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
loveablelobster has joined #ruby
truenito has quit [Ping timeout: 272 seconds]
karapetyan has quit [Read error: Connection reset by peer]
karapety_ has joined #ruby
cognoscente has quit [Ping timeout: 248 seconds]
karapety_ has quit [Read error: Connection reset by peer]
larcara has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
karapetyan has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
apparition has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
quobo has joined #ruby
dviola has quit [Quit: WeeChat 2.0]
karapetyan has joined #ruby
vondruch_ has joined #ruby
truenito has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch_ is now known as vondruch
karapetyan has quit [Read error: Connection reset by peer]
funburn has quit [Ping timeout: 248 seconds]
nankyokusei has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
dviola has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
nankyoku_ has quit [Ping timeout: 248 seconds]
Amorphia has left #ruby [#ruby]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
karapety_ has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
larcara has quit [Ping timeout: 248 seconds]
karapety_ has quit [Read error: Connection reset by peer]
milardovich has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
milardovich has joined #ruby
mim1k has quit [Ping timeout: 248 seconds]
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
im0nde has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
Ouchy has joined #ruby
Ouchy has quit [Changing host]
Ouchy has joined #ruby
Ouchy`w has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapety_ has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
ams__ has joined #ruby
karapety_ has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
gigetoo has quit [Ping timeout: 246 seconds]
karapetyan has joined #ruby
gigetoo has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
nankyoku_ has joined #ruby
karapetyan has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
joast has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
karapety_ has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
hfp_work has quit [Quit: bye]
karapety_ has quit [Read error: Connection reset by peer]
andikr has quit [Remote host closed the connection]
karapetyan has joined #ruby
milardovich has quit [Remote host closed the connection]
karapetyan has quit [Read error: Connection reset by peer]
karapety_ has joined #ruby
milardovich has joined #ruby
karapety_ has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
<tcopeland> vtx is it a ActiveSupport::OrderedHash? otherwise seems like order would not be guaranteed
hfp_work has joined #ruby
znz_jp has quit [Remote host closed the connection]
Barrt has joined #ruby
znz_jp has joined #ruby
alex`` has joined #ruby
tcopeland has quit [Quit: tcopeland]
milardovich has quit [Ping timeout: 264 seconds]
larcara has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has joined #ruby
Musashi007 has joined #ruby
<Burgestrand> Rubys hashes retain insertion order since 2.0 (?), but before that order was undefined
Bish has quit [Ping timeout: 240 seconds]
Puffball_ has quit [Remote host closed the connection]
Bish has joined #ruby
Puffball has joined #ruby
larcara has quit [Ping timeout: 272 seconds]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
rhebz916 has quit [Remote host closed the connection]
cdg_ has joined #ruby
Beams has joined #ruby
Musashi007 has quit [Read error: Connection reset by peer]
Musashi007 has joined #ruby
aufi_ has quit [Quit: Leaving]
cdg has quit [Ping timeout: 248 seconds]
aufi has joined #ruby
cdg_ has quit [Remote host closed the connection]
cdg has joined #ruby
aufi has quit [Client Quit]
aufi has joined #ruby
cognoscente has joined #ruby
truenito1 has joined #ruby
truenito has quit [Read error: Connection reset by peer]
vee__ has quit [Ping timeout: 260 seconds]
jnyw has quit [Quit: WeeChat 2.0]
cognoscente has quit [Ping timeout: 264 seconds]
cdg has quit [Ping timeout: 272 seconds]
chocoelho has joined #ruby
cdg has joined #ruby
allcentury has joined #ruby
Musashi007 has quit [Quit: Musashi007]
Beams has quit [Quit: .]
<dminuoso> Burgestrand: break.
<dminuoso> How does it work?
<Burgestrand> dminuoso Hammer time
<dminuoso> asm>> f { break }
* dminuoso kicks ruby[bot]
<dminuoso> :(
<dminuoso> Mmm, so break is like throw.
<dminuoso> What sets up the catch table for break?
<Burgestrand> No idea, don't care :p
alfiemax has joined #ruby
<dminuoso> Is `break` possibly equivalent to `return` ?
<Burgestrand> Not quite
<dminuoso> Burgestrand: https://eval.in/918578
aufi has quit [Ping timeout: 240 seconds]
<dminuoso> Burgestrand: `loop` aside.
<dminuoso> I think its a special case
<dminuoso> For normal blocks `return` seems to compile into the same assembly as `break`
<Burgestrand> You asked if it's equivalent
<Burgestrand> Special case or not they're not equivalent :P
<dminuoso> Fair enough.
larcara has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
grr123 has joined #ruby
<Burgestrand> dminuoso also lambdas make them behave differently https://eval.in/918590
karapetyan has quit [Remote host closed the connection]
<dminuoso> Burgestrand: with lambda its obvious.
im0nde has quit [Ping timeout: 255 seconds]
karapetyan has joined #ruby
vee__ has joined #ruby
DLSteve_ has joined #ruby
<Burgestrand> dminuoso how so?
Ltem has joined #ruby
chocoelho has quit [Quit: chocoelho]
karapetyan has quit [Read error: Connection reset by peer]
<dminuoso> Burgestrand: Okay not obvious, but not news.
safetypin has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
jamesst20 has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
Psybur has joined #ruby
karapety_ has joined #ruby
karapety_ has quit [Remote host closed the connection]
Musashi007 has joined #ruby
larcara has quit [Ping timeout: 248 seconds]
karapetyan has joined #ruby
Musashi007 has quit [Client Quit]
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
Musashi007 has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
aufi has joined #ruby
karapetyan has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has quit [Read error: Connection reset by peer]
qba73 has joined #ruby
funburn has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
<Burgestrand> dminuoso fun to play with
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
oleo has joined #ruby
bmurt has joined #ruby
pastorinni has joined #ruby
qba73 has quit [Remote host closed the connection]
qba73 has joined #ruby
karapetyan has quit [Ping timeout: 248 seconds]
aScottishBoat has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Burgestrand has quit [Quit: Closing time!]
grr123 has quit [Quit: Page closed]
bmurt has joined #ruby
aScottishBoat has quit [Read error: Connection reset by peer]
vtx has joined #ruby
alfiemax has joined #ruby
pastorinni has quit [Remote host closed the connection]
aScottishBoat has joined #ruby
milardovich has joined #ruby
LoRez has joined #ruby
KeyJoo has quit [Remote host closed the connection]
dalitom_ has joined #ruby
vondruch has quit [Quit: vondruch]
<dalitom_> hi
vondruch has joined #ruby
<dalitom_> anyone familiar with RBVMOMI
alfiemax has quit [Ping timeout: 260 seconds]
<dalitom_> please help
pastorinni has joined #ruby
<dalitom_> how do I get vm OS using rbvmomi ??? please help
jamesaxl has quit [Read error: Connection reset by peer]
KeyJoo has joined #ruby
aScottishBoat has quit [Read error: Connection reset by peer]
polishdub has joined #ruby
milardovich has quit [Ping timeout: 264 seconds]
funburn has quit [Ping timeout: 264 seconds]
larcara has joined #ruby
jamesaxl has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
despai has joined #ruby
aScottishBoat has joined #ruby
tcopeland has joined #ruby
uZiel has joined #ruby
ur5us has joined #ruby
mikkelsen has joined #ruby
loveablelobster has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
loveablelobster has joined #ruby
govg has quit [Ping timeout: 260 seconds]
mtkd has quit [Ping timeout: 256 seconds]
larcara has quit [Ping timeout: 256 seconds]
FastJack has quit [Read error: Connection reset by peer]
aScottishBoat has quit [Ping timeout: 272 seconds]
Musashi007 has quit [Quit: Musashi007]
cognoscente has joined #ruby
Guest39900 has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
mtkd has joined #ruby
funburn has joined #ruby
despai_ has joined #ruby
* Guest39900 waves
<Guest39900> I have not been on IRC in 20 years... how do I change my nick?
<mikkelsen> Welcome back
<mikkelsen> wow
<mikkelsen> that's mindblowing to me
jamesst20 has quit [Quit: Page closed]
<mikkelsen> select the Freenode channel it'll have instructions
<mikkelsen> on choosing your nick and etc/
despai has quit [Ping timeout: 272 seconds]
<Guest39900> k. thanks
<mikkelsen> ofc mate
FastJack has joined #ruby
cognoscente has quit [Ping timeout: 268 seconds]
Guest39900 is now known as iankes
iankes is now known as jkes
milardovich has joined #ruby
mikkelsen has quit [Quit: mikkelsen]
darix has quit [Quit: may the packets be with you...]
aScottishBoat has joined #ruby
Rapture has joined #ruby
darix has joined #ruby
Ouchy`w has quit []
<jkes> OK, thanks @mikkelsen
<jkes> @mikkelsen thanks
<jkes> Oh well. I don't remember how to do this. Either way, I registered my old nick
<jkes> I think I was last on IRC in 1998
<jkes> I need to figure out how to extract a block of text from a txt file
<jkes> standard raw email. I'm trying to get the body. All mime types. Don't care about that yet. I just need to get everything between the first '--' and the ending '--'
<jkes> but, if there are multiple mimes I need to get everything in between, even if it includes '--'
<jkes> So, really, I need to find the first '--' in a text file and the last '--' in a text file and get all in between, including other instances of '--'
<jkes> I know this might be better asked in a regex room so I'm asking in both
milardovich has quit [Ping timeout: 268 seconds]
rrutkowski has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
apparition has quit [Quit: Bye]
karapetyan has joined #ruby
nofxx_ has joined #ruby
nofxx__ has quit [Read error: Connection reset by peer]
rrutkowski has quit [Client Quit]
rrutkowski has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
qba73 has quit [Ping timeout: 248 seconds]
funburn has quit [Quit: funburn]
larcara has joined #ruby
funburn has joined #ruby
larcara has quit [Ping timeout: 248 seconds]
kryptoz has joined #ruby
rippa has joined #ruby
troys has joined #ruby
funburn has quit [Ping timeout: 264 seconds]
houhoulis has joined #ruby
Neptu_ has joined #ruby
selim has quit [Ping timeout: 268 seconds]
selim has joined #ruby
DmitryBochkarev has joined #ruby
vtx has quit [Quit: vtx]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
cognoscente has joined #ruby
karapetyan has joined #ruby
alfiemax has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
sagax has joined #ruby
cagomez has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
vtx has joined #ruby
cognoscente has quit [Ping timeout: 256 seconds]
guille-moe has quit [Ping timeout: 248 seconds]
synthroid has quit [Remote host closed the connection]
larcara has joined #ruby
cognoscente has joined #ruby
guille-moe has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
<aScottishBoat> jkes, sorry for the MIA
<aScottishBoat> got into a language discussion with a new coworker
<aScottishBoat> C#, PHP, etc.
<aScottishBoat> well feel free to pick at us here in #ruby. We've a few regex wizards I've seen
karapetyan has joined #ruby
larcara has quit [Ping timeout: 256 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
ana_ has quit [Ping timeout: 264 seconds]
milardovich has joined #ruby
qba73 has joined #ruby
ledestin has joined #ruby
karapetyan has joined #ruby
larcara has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
kernelPaniq has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
amatas_ has joined #ruby
qba73 has quit [Ping timeout: 240 seconds]
<guardian> hello, I have a string which is "hello #{foo}". There are reasons that makes it containing #{foo} and not %{foo}. Which means I can't use str % arg -> new_str
<guardian> what's my best bet then?
<guardian> also I control the content of the foo variable and I trust it not to be malicious. It's not user provided
<guardian> I notived eval '"' + s + '"' does what I want but it looks weird
<guardian> is there another way? maybe better?
<dminuoso> guardian: I don't follow.
<dminuoso> Please gist an example that illustrates your question/problem.
<aScottishBoat> gist.github.com
jackjackdripper has joined #ruby
<guardian> is there a more elegant way of doing this?
conta has quit [Ping timeout: 272 seconds]
synthroid has joined #ruby
karapetyan has joined #ruby
<dminuoso> guardian: I like to use %Q() or %() if the string should also contain ""
karapetyan has quit [Read error: Connection reset by peer]
<dminuoso> i.e. %("#{foo}")
<dminuoso> %Q("#{foo}")
<dminuoso> "\"#{foo}\""
<dminuoso> Those are three equivalent approaches
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
<amatas_> Hi all, I'm loading a yaml file with the field "creationTimestamp: 2017-12-12T20:02:51Z" , then if I dump the same hash I get "creationTimestamp: 2017-12-12 20:02:51.000000000 Z" which is a problem in my case.
<guardian> dminuoso: thanks will look into it
<guardian> dminuoso: also I failed the pastebin, should have been s = '#{foo}' of course
<amatas_> does someone know what's going on with the timestamp, and give me some clue about how to solve the issue?
mark_66 has quit [Remote host closed the connection]
karapetyan has joined #ruby
<dminuoso> guardian: I hope you don't intend to `eval` that.
rubycoder37 has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
<guardian> sure
<guardian> sure I do, I control what's inside, and I need the dynamic nature
karapetyan has joined #ruby
cloaked1 has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
cloaked1 has joined #ruby
cloaked1 has quit [Changing host]
<guardian> I would have preferred string formatting with %{} but there's another constraint that makes it be s='#{foo}' and not s='%{foo}'
karapetyan has joined #ruby
vee__ has quit [Ping timeout: 256 seconds]
karapetyan has quit [Read error: Connection reset by peer]
loveablelobster has quit [Quit: Textual IRC Client: www.textualapp.com]
larcara has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
larcara has joined #ruby
<dminuoso> amatas_: Im thinking you might have to refine the Psych emitter.
banisterfiend has joined #ruby
<dminuoso> amatas_: Yup just found it.
<href> 1
<amatas_> but I'm not able to figure out how to do so. I set the "canonical" variable to true with the hope of change the output format
<dminuoso> amatas_: I cant tell you straight away the "clean" solution, but I can tell you exactly *where* and *how* its behaving that way.
uZiel has quit [Ping timeout: 248 seconds]
<dminuoso> amatas_: (Aside from activating a refinement and monkey patching Psych itself)
<amatas_> dminuoso: I'm a begginer please be patient :D
<dminuoso> this visitor calls into
<dminuoso> And that's what produces the output.
<rubycoder37> I'm upset all my coworkers are now writing python instead of ruby
<rubycoder37> I feel, lonely
<amatas_> dminuoso: is it possible in ruby to overload the "format_time" method?
<aScottishBoat> aww rubycoder37
<dminuoso> amatas_: No, but you could monkey patch it in a refinement: https://ruby-doc.org/core-2.4.0/doc/syntax/refinements_rdoc.html
<dminuoso> (The refinement makes the monkey patch just local, which is sort of fine)
<dminuoso> (It's super easy to use)
larcara has quit [Ping timeout: 256 seconds]
uZiel has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
rubycoder37 has quit [Quit: Lost terminal]
<amatas_> dminuoso: thanks!
vee__ has joined #ruby
chocoelho has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
p0p0pr37 has quit [Remote host closed the connection]
karapetyan has joined #ruby
ur5us has joined #ruby
dionysus69 has joined #ruby
karapetyan has quit [Remote host closed the connection]
dionysus69 has quit [Remote host closed the connection]
minimalism has quit [Quit: minimalism]
karapetyan has joined #ruby
d10n-work has joined #ruby
nofxx_ has quit [Ping timeout: 248 seconds]
karapetyan has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
mostlybadfly has joined #ruby
nofxx has joined #ruby
karapetyan has quit [Remote host closed the connection]
dalitom_ has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 264 seconds]
garyserj has quit []
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
allcentury has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
mtkd has quit [Ping timeout: 268 seconds]
karapety_ has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
karapety_ has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
troys is now known as troys_
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
mahlon has quit [Read error: Connection reset by peer]
ged has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
qba73 has joined #ruby
orbyt_ has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
larcara has joined #ruby
ged has joined #ruby
mahlon has joined #ruby
rubycoder37 has joined #ruby
Serpent7776 has quit [Quit: Leaving]
brent__ has joined #ruby
troys_ is now known as troys
eckhardt has joined #ruby
alfiemax has quit [Remote host closed the connection]
qba73 has quit []
kies has quit [Ping timeout: 248 seconds]
<rubycoder37> python developers often brag about their explicit syntax, can someone say why implicit is better in ruby?
larcara has quit [Ping timeout: 272 seconds]
karapetyan has joined #ruby
alfiemax has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
clemens3 has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
Technodrome has joined #ruby
<rubycoder37> anyone?
<apeiros> rubycoder37: uh, you can be as explicit in ruby syntax-wise as you wish
<apeiros> but you're free to tone down explicity to a level where it's explicit enough for the average coder and thus reducing unnecessary noise and actually improve readability.
<rubycoder37> I thought implicit was preferred in ruby
<rubycoder37> I see
<apeiros> maybe make an example of that so we talk about the same thing
alfiemax has quit [Ping timeout: 248 seconds]
ana_ has joined #ruby
<rubycoder37> I'm not sure avoiding to type () for function calls and not using return is unnecessary noise
<rubycoder37> I like that I don't have to pass self to each function all the time
kapil___ has quit [Quit: Connection closed for inactivity]
exhiled has joined #ruby
<rubycoder37> I'm just bitter all my coworkers are writing python and they expect me to do the same
milardovich has quit [Remote host closed the connection]
<apeiros> in a method, I'd probably be fine with explicit return
<apeiros> but in all things block? tedious and ugly. I hate it in JS.
<apeiros> and the ()'s add up IMO
<apeiros> there are places I'd prefer people would use more ()'s in ruby, though.
<aScottishBoat> apeiros, same
TomyLobo has joined #ruby
<aScottishBoat> I first started with Python, so the ()'s are things I do kind of miss
<rubycoder37> TensorFlow is only for Python, that's why
<aScottishBoat> I thought TF was for C++? Or is it just written in C++?
<apeiros> well, ruby & python aren't so different. shouldn't be difficult to just use both.
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lupine has quit [Remote host closed the connection]
lupine has joined #ruby
<rubycoder37> good thing we'll have new ruby this xmas
rrutkowski has quit [Remote host closed the connection]
xco has joined #ruby
<aScottishBoat> I want ruby 3 :(
<aScottishBoat> give it to usss
rrutkowski has joined #ruby
<rubycoder37> what will be new in ruby 3?
Technodrome has joined #ruby
houhoulis has quit []
<rubycoder37> isn't crystal basically ruby 3?
<rubycoder37> or close to that
<aScottishBoat> If I recall there's a lot going on with GC, right?
milardovich has joined #ruby
<rubycoder37> hrm, no idea
Pierreb|home has quit []
larcara has joined #ruby
kryptoz has quit [Remote host closed the connection]
Tempesta has quit [Read error: Connection reset by peer]
modin has joined #ruby
jjaii9 has joined #ruby
nofxx has quit [Ping timeout: 272 seconds]
allcentury has joined #ruby
sepp2k has quit [Quit: Leaving.]
<rubycoder37> apeiros: yes, I get what you mean, I'm also not a big JS fan
banisterfiend has quit [Ping timeout: 248 seconds]
<aScottishBoat> anyone like perl?
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
larcara has quit [Ping timeout: 256 seconds]
ged has quit [Quit: WeeChat 1.8]
mahlon has quit [Quit: WeeChat 2.0]
<havenwood> rubycoder37: While it resembles Ruby aesthetically, Crystal is a substantially different language.
<havenwood> rubycoder37: Crystal's compiler was written in Ruby before they bootstrapped it in Crystal.
<rubycoder37> havenwood: I see
<aScottishBoat> havenwood: it was actually written in Ruby?
<aScottishBoat> Ruby had bindings for LLVM?
<havenwood> aScottishBoat: The creator of YARV has proposed gemifying the GC so it can be swapped out for different implementations in the same Ruby version.
<havenwood> aScottishBoat: If I recall, the compiler produced LLVM IR.
<havenwood> aScottishBoat: #crystal channel would know details.
exhiled has joined #ruby
mikkelsen has joined #ruby
<havenwood> aScottishBoat: The GC would use an established API so you could swap it out with experimental GC implementations in gem form.
<havenwood> aScottishBoat: That would be great for experimentally trying out various GC implementations.
vtx has quit [Quit: vtx]
<havenwood> aScottishBoat: There're also massive changes proposed to Ruby internals - namely switching from an AST-based IR to a Node-based one with RTL.
hahuang65 has quit [Quit: WeeChat 2.0]
mikkelsen has quit [Read error: Connection reset by peer]
<havenwood> aScottishBoat: The JIT proposals are also looking really strong. The JIT can be disabled to save memory or enabled to run faster.
aScottishBoat has quit [Ping timeout: 248 seconds]
mikkelsen has joined #ruby
Dimik has joined #ruby
<mikkelsen> havenwood, it's aScottishBoat. God my internet is being severe crap today
<havenwood> Here's the JIT with RTL branch: https://github.com/vnmakarov/ruby/tree/rtl_mjit_branch
<mikkelsen> anyways that's awesome, I love it
<havenwood> ^ that's an amazing piece of work, but it's not ready yet
<rubycoder37> I wonder how difficult it would be to port ruby to TempleOS
<mikkelsen> rubycoder37, what's TempleOS?
<havenwood> or here's the JIT work from the above applied to YARV instead of RTL, which is less ambitious but closer to ready: https://github.com/k0kubun/yarv-mjit
<mikkelsen> oh right nvm yeah I know it
<havenwood> The latter might be adopted while work continues on the former.
<havenwood> mikkelsen: Perl 6 seems nice but I haven't learned it deeply.
<havenwood> rubycoder37: should be doable with mruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rubycoder37> Terry A. Davis is the best, but not as crazy as Larry Wall
marxarelli|afk is now known as marxarelli
kies has joined #ruby
<rubycoder37> I want to see all programmers making music together like this
<havenwood> rubycoder37: Sam Aaron had a bunch of people dancing at RubyConf after party with Sonic Pi live coding.
jjaii9 has quit []
<havenwood> An interesting proposal is for frozen Hash and Array literals with a prepended f, like: [1, 2, 3]f
<rubycoder37> havenwood: wow, very nice!
<rubycoder37> ty
hahuang65 has joined #ruby
slester_ has joined #ruby
<havenwood> []f.equal? []f #=> true
<havenwood> well, I guess that's not guaranteed by the proposed spec
<havenwood> implementation-specific
<slester_> Is there a way to run migrations on mock databases with Sequel? Just connecting to mock://postgres and then Sequel::Migrator.run(DB, 'migrations') doesn't seem to actually run them.
bmurt has joined #ruby
Ltem has quit [Quit: Leaving]
dionysus69 has joined #ruby
mikkelsen has quit [Quit: mikkelsen]
discopatrick has joined #ruby
CrazyEddy has quit [Read error: Connection reset by peer]
larcara has joined #ruby
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
dionysus70 is now known as dionysus69
guille-moe has quit [Ping timeout: 264 seconds]
sameerynho has joined #ruby
CrazyEddy has joined #ruby
vtx has joined #ruby
truenito1 has quit [Remote host closed the connection]
nofxx has joined #ruby
larcara has quit [Ping timeout: 272 seconds]
uZiel has quit [Ping timeout: 248 seconds]
jkes has quit [Read error: Connection reset by peer]
jkes has joined #ruby
truenito has joined #ruby
tsglove has quit [Quit: Leaving]
ana_ has quit [Ping timeout: 240 seconds]
aufi has quit [Quit: Leaving]
jaruga has quit [Quit: jaruga]
|ifei5g00d has quit [Ping timeout: 250 seconds]
guille-moe has joined #ruby
marr has quit [Ping timeout: 264 seconds]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
alex`` has quit [Ping timeout: 246 seconds]
|ifei5g00d has joined #ruby
|ifei5g00d has quit [Read error: Connection reset by peer]
milardovich has quit [Ping timeout: 240 seconds]
|ifei5g00d has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
ur5us has joined #ruby
karapetyan has joined #ruby
<apeiros> havenwood: I assume only shallowly frozen?
* apeiros somehow would like []ff for deep-freeze
bradleyp_ has joined #ruby
<havenwood> apeiros: It raises an error unless all array/hash elements are themselves frozen.
<havenwood> apeiros: But no, it's not deep - because there's no guarantee that the frozen elements themselves don't contain mutable objects.
<havenwood> "The intent is to guarantee immutability only for the array/hash and the elements contained immediately inside it."
larcara has joined #ruby
cdg has quit [Ping timeout: 255 seconds]
ur5us has quit [Ping timeout: 248 seconds]
<apeiros> I see, thanks
joelwallis has joined #ruby
ramfjord has joined #ruby
<havenwood> apeiros: Though I guess this got rejected, so nvm!
<apeiros> hrm, sad
<havenwood> Somehow I didn't catch that they dropped the f prepend for String.
bradleyprice has quit [Ping timeout: 255 seconds]
<havenwood> I guess they have the unary operators for frozen literals now.
dx_ has joined #ruby
<havenwood> >> s = -''; s.frozen?
<ruby[bot]> havenwood: # => true (https://eval.in/918711)
<havenwood> >> s = -''; s = +s; s.frozen?
<ruby[bot]> havenwood: # => false (https://eval.in/918712)
<dx_> how do i assigned an actual value, if ever a variable does not exists or is nil?
rrutkowski has quit [Ping timeout: 264 seconds]
<havenwood> dx_: What have you tried and what was the problem with it?
<dx_> in bash, i do it like m=${x:-13}
<havenwood> dx_: m = x || 13
<dx_> if x exists, then it is assigned to m otheriwes 13 gets assigned
<al2o3-cr> >> [1,2,3].map { |x, y, z| y=z=x; x<<y<<z }
<ruby[bot]> al2o3-cr: # => [4, 32, 192] (https://eval.in/918713)
<al2o3-cr> amazing!
<dx_> errors here..saying undefined variable or
<baweaver> GOOD MORNING
jackjackdripper has quit [Quit: Leaving.]
* baweaver is channeling his inner Radar
<havenwood> baweaver: Radar!
larcara has quit [Ping timeout: 264 seconds]
larcara has joined #ruby
<havenwood> al2o3-cr: or just: [1, 2, 3].map { |n| n << n << n }
plexigras has quit [Ping timeout: 272 seconds]
<havenwood> #=> [4, 32, 192]
<ule> Hey guys.. do you know if there is a magic way to get a specific value inside a structure doesn't matter if the data is nested or if its a hash or array? This is what I have:
<al2o3-cr> lol, i like mine better :P
<ule> {"class"=>"MyWorker", "args"=>["delivery_message", {"message_id"=>1063283837, "message_version"=>1, "type"=>"Message.vid"}, "2017-12-13 00:10:42 UTC"], "retry"=>true, "queue"=>"default", "jid"=>"7f8cb80d52b1115d63427d65", "created_at"=>1513192240.646089}
larcara has quit [Remote host closed the connection]
<al2o3-cr> whao!
<ule> I want the value for that: "message_id"
mtkd has quit [Ping timeout: 256 seconds]
King_of_Ireland has joined #ruby
<ule> but doing something like: foo.first['args'][1]['message_id'] is so ugly
dx_ has quit [Quit: leaving]
<baweaver> I have a super secret tool that does exactly that
<tobiasvl> ule: what do you want to happen if there are several keys named "message_id" in the nested structure?
<baweaver> buuuuut it's not open source quite yet
<ule> I was expecting that ruby has something like: magic('message_id')
<ule> tobiasvl: That will never happen
<baweaver> It'd do Q(data).query('>message_id')
<ule> it's only that fixed structure always
<ule> baweaver: whaaattt
<baweaver> which says dive until you find anything with a message_id key and grab it for me
<meesles> Q being your liv?
<baweaver> It's my fun time project I'm working on open sourcing
<meesles> lib*
<ule> whats that Q
<tobiasvl> ule: well, in your structure, perhaps, but if ruby had a magic method for it, it would have to consider duplicate keys
<baweaver> Well it's not actually Q
mtkd has joined #ruby
<baweaver> but that's a placeholder
LocaMocha has quit [Ping timeout: 248 seconds]
<tobiasvl> baweaver: what does it do about duplicate keys
<meesles> Decent idea, I'm a fan of '
<baweaver> It shoves all of it into an array for any matches
<ule> tobiasvl: there is no duplicate keys
<meesles> '>' and syntax like CSS selectors to do stuff
<baweaver> I wanted XPath for Hashes basically
<al2o3-cr> ule: h.dig('args', 1, 'message_id')
<tobiasvl> ule: I understand that there are no duplicate keys in your specific structure.
<al2o3-cr> so much nicer
<tobiasvl> baweaver: cool
<meesles> Niiiice
<meesles> TIL
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> different from dig in that everything responds to ===, so you can do this: Q(data).query('api.specs.method=/GET|POST/.>key=/message_id/')
* baweaver is not fond of the negative lookahead he had to do for .
pastorinni has quit [Ping timeout: 256 seconds]
King_of_Ireland has quit [Quit: "Or perhaps he's wondering why someone would shoot a man, before throwing him out of a plane?"]
<baweaver> So any api spec with a method of GET or POST with a message_id key somewhere in it
alex`` has joined #ruby
<ule> cool thanks guys
<meesles> Harder to read for sure
<baweaver> or if you lop off the _id anything that looks like message
<ule> I'm trying those suggestions here
<tobiasvl> class Hash; alias_method :magic, :dig; end
<meesles> Kind of writing a new DSL
tvw has quit [Ping timeout: 248 seconds]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
rubycoder37 has quit [Quit: Lost terminal]
SeepingN has joined #ruby
larcara has joined #ruby
sameerynho has quit [Ping timeout: 248 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
conta2 has joined #ruby
allcentury has quit [Ping timeout: 248 seconds]
desnudopenguino has quit [Quit: leaving]
<al2o3-cr> meesles: dsl is magical
conta2 has quit [Ping timeout: 272 seconds]
joelwallis has quit [Ping timeout: 248 seconds]
larcara has quit [Remote host closed the connection]
larcara has joined #ruby
drowze has quit [Ping timeout: 260 seconds]
amatas_ has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
tubbo has joined #ruby
<tubbo> hey folks, i had a really weird thing happen to me today
p0p0pr37 has joined #ruby
p0p0pr37 has quit [Changing host]
p0p0pr37 has joined #ruby
<havenwood> tubbo: Doing your part to Keep Ruby Weird!
King_of_Ireland has joined #ruby
joelwallis has joined #ruby
<tubbo> haha yup havenwood...so I was trying to override Array#pop and call `super` inside it
<tubbo> apparently, that is not possible because there is no superclass method to call...since Array#pop is actually defined in C, not Ruby.
<al2o3-cr> tubbo: most are.
<tubbo> so is there a way to monkey-patch C-defined ruby methods? or am i SOL here?
synthroid has quit [Remote host closed the connection]
sanscoeur has quit []
larcara has quit [Ping timeout: 272 seconds]
synthroid has joined #ruby
<apeiros> tubbo: you have a misunderstanding there
<tubbo> most likely, yes
<apeiros> you can't call super because you defined a new pop method
<apeiros> it's entirely unrelated to the method being in C
<apeiros> and the two solutions which come to my mind work the same with ruby methods:
<apeiros> 1: alias, 2: keep an UnboundMethod instance around (via Module#instance_method)
<tubbo> apeiros: i can't really do #1, array.pop *needs* to be called, it can't be like array.my_pop
<tubbo> but #2 sounds interesting to me
<apeiros> you can't
<apeiros> array.pop *necessarily* is your new method
<apeiros> oh, 3rd way is new: use prepend
<tubbo> oh cool
slester_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
marr has joined #ruby
<apeiros> why is it that it can't be "my_pop"?
* apeiros usually doesn't believe such blanket claims
<apeiros> re your misunderstanding: what you did is this: `class Foo; def bar; "original"; end; def bar; "boom, original is *gone*"; end; end`
bmurt has joined #ruby
truenito has quit [Ping timeout: 256 seconds]
<tubbo> apeiros: because i'm trying to make a joke :)
<apeiros> o0
<apeiros> that's not really an explanation
<tubbo> haha true
<tubbo> apeiros: did you hear about that Prongles thing that cards against humanity made?
<apeiros> no
cschneid_ has joined #ruby
<tubbo> they made this fake potato chip brand with the slogan "once you pop, that's great"
<tubbo> so i wanted to override Array#pop in a project as a joke to puts "that's great" every time you called it
<apeiros> in a play @ pringles?
<tubbo> which, as it turns out, is a really awful idea lol
<tubbo> yeah
<apeiros> ok, I guess you misunderstood the alias variant then
<tubbo> maybe
vee__ has quit [Ping timeout: 256 seconds]
<apeiros> >> class Foo; def bar; "original"; end; alias bar_without_feature; def bar; puts "plopp!"; bar_without_feature; end; end
<ruby[bot]> apeiros: # => /tmp/execpad-061c9628c050/source-061c9628c050:2: syntax error, unexpected ';' ...check link for more (https://eval.in/918729)
<apeiros> err
<tubbo> Module#prepend worked though
<apeiros> why did I >> that?
<apeiros> anyway, prepend is cleaner IMO. alias was "the old ways" before prepend.
<tubbo> yeah
<apeiros> but with ^, you still do: Foo.new.bar, you don't do Foo.new.bar_without_feature (only if you want the old behavior without the new)
jenrzzz has quit [Ping timeout: 272 seconds]
<tubbo> >> module Prongles; def pop(*args); puts "that's great"; super(*args); end; end; Array.send(:prepend, Prongles); [].pop
<ruby[bot]> tubbo: # => that's great ...check link for more (https://eval.in/918730)
<tubbo> :D
<apeiros> why'd you use send?
<tubbo> i dunno
<tubbo> i thought it was private like include
<apeiros> include isn't private
<tubbo> >> module Prongles; def pop(*args); puts "that's great"; super(*args); end; end; Array.prepend(Prongles); [].pop
<ruby[bot]> tubbo: # => that's great ...check link for more (https://eval.in/918731)
<tubbo> it isn't?
<apeiros> for a couple of years now :)
<tubbo> welp, TIL
<tubbo> :D
<apeiros> didn't get the memo? :-p
<apeiros> iirc around 2.1
<apeiros> 21>> module Foo; end; Array.include Foo
<ruby[bot]> apeiros: # => Array (https://eval.in/918732)
<apeiros> 20>> module Foo; end; Array.include Foo
<ruby[bot]> apeiros: # => private method `include' called for Array:Class (NoMethodError) ...check link for more (https://eval.in/918733)
<apeiros> yupp. 2.1 made it public. and prepend never was private to begin with.
dionysus69 has quit [Ping timeout: 264 seconds]
troys is now known as troys_
<tubbo> si forgot about that
<tubbo> i*
troys_ is now known as troys
karapetyan has quit [Remote host closed the connection]
ldnunes has quit [Quit: Leaving]
larcara has joined #ruby
jackjackdripper has joined #ruby
QualityAddict has quit [Ping timeout: 264 seconds]
QualityAddict has joined #ruby
vee__ has joined #ruby
allcentury has joined #ruby
PaulCapestany has quit [Quit: .]
allcentury has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jamesaxl has quit [Quit: WeeChat 1.9.1]
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
karapetyan has joined #ruby
Ouchy`w has joined #ruby
<adaedra> Hello rubyists
joelwallis has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 248 seconds]
ur5us has joined #ruby
joelwallis has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ouchy has quit [Ping timeout: 248 seconds]
Ouchy has joined #ruby
Ouchy has quit [Changing host]
Ouchy has joined #ruby
Ouchy`w has quit [Client Quit]
Ouchy has quit [Client Quit]
cschneid_ has quit [Ping timeout: 240 seconds]
kapil___ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<vtx> guys are there any easy ways of measuring the performance of a sinatra endpoint? and finding out what calls take a long time to complete?
Ltem has joined #ruby
darix has quit [*.net *.split]
FastJack has quit [*.net *.split]
mayamai has quit [*.net *.split]
lunarkitty7 has quit [*.net *.split]
olblak has quit [*.net *.split]
CustosLimen has quit [*.net *.split]
DanKnox has quit [*.net *.split]
N64N64 has quit [*.net *.split]
tekk has quit [*.net *.split]
volix has quit [*.net *.split]
wopi has quit [*.net *.split]
flips has quit [*.net *.split]
AlHafoudh has quit [*.net *.split]
mistym has quit [*.net *.split]
jan4 has quit [*.net *.split]
DarthGandalf has quit [*.net *.split]
chridal has quit [*.net *.split]
saltsa has quit [*.net *.split]
elomatreb has quit [*.net *.split]
timmow has quit [*.net *.split]
olblak_ has joined #ruby
tekk has joined #ruby
saltsa has joined #ruby
AlHafoudh has joined #ruby
elomatreb has joined #ruby
mistym has joined #ruby
mistym has quit [Changing host]
mistym has joined #ruby
iamayam has joined #ruby
jan4 has joined #ruby
timmow has joined #ruby
DanKnox has joined #ruby
DarthGandalf has joined #ruby
CustosLimen has joined #ruby
volix has joined #ruby
flips has joined #ruby
N64N64 has joined #ruby
ams__ has quit [Quit: Connection closed for inactivity]
chridal has joined #ruby
lunarkitty7 has joined #ruby
King_of_Ireland has quit [Quit: "Or perhaps he's wondering why someone would shoot a man, before throwing him out of a plane?"]
gbailey has quit [Ping timeout: 259 seconds]
shortdudey123 has quit [Ping timeout: 260 seconds]
joelwallis has quit [Ping timeout: 272 seconds]
<xco> how can i avoid doing status == status in this? https://gist.github.com/xcobar/5cad7617fd651ab3b12bf1cb3ca60b71#file-rb-rb-L10
bokayio has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
<xco> i would like to use another variable for the ‘status’ in Status::VALUES.each
<baweaver> What are you actually trying to do here?
<baweaver> if you only have two statuses just write them out
<baweaver> you don't really need define_method there
bokayio has joined #ruby
rhyselsmore has joined #ruby
raynold has joined #ruby
shortdudey123 has joined #ruby
<baweaver> vtx: Same as most of Ruby, rubyprof or other tools like it
<baweaver> Just look up Ruby performance testing on Google and you'll find a few.
<xco> yeah i have two statuses but i’d like to define methods for both of them. how do i just “write them out”? baweaver ?
<baweaver> literally as methods
<baweaver> def sending; end
vee__ has quit [Ping timeout: 248 seconds]
<baweaver> though really this sounds a lot like a state machine
<xco> and not def sending; ‘sending’; end?
<baweaver> which is why I mention what you're actually doing
gbailey has joined #ruby
<baweaver> it was an example, fill in the blank
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
Kestrel-029 has quit [Read error: Connection reset by peer]
zautomata has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
zautomata has joined #ruby
leah2 has quit [Ping timeout: 250 seconds]
BTRE has quit [Quit: Leaving]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has joined #ruby
bmurt has joined #ruby
cdg has joined #ruby
pastorinni has joined #ruby
WebDawg has quit [Ping timeout: 240 seconds]
cdg_ has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
krasnus has quit [Ping timeout: 240 seconds]
vee__ has joined #ruby
karapetyan has quit [Remote host closed the connection]
krasnus has joined #ruby
eckhardt has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
cdg has quit [Remote host closed the connection]
karapetyan has joined #ruby
eckhardt has quit [Client Quit]
joelwallis has joined #ruby
Nicmavr has joined #ruby
Nicmavr is now known as Guest12480
Guest12480 has quit [Changing host]
Guest12480 has joined #ruby
cdg has joined #ruby
reber has quit [Remote host closed the connection]
dreamthese has quit [Remote host closed the connection]
Guest12480 is now known as Kestrel-029
leah2 has joined #ruby
dreamthese has joined #ruby
WebDawg has joined #ruby
cdg_ has quit [Ping timeout: 248 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nofxx has quit [Ping timeout: 256 seconds]
joelwallis has quit [Remote host closed the connection]
darix has joined #ruby
BTRE has joined #ruby
enterprisey has quit [Quit: Leaving]
biberu has quit []
bmurt has joined #ruby
vee__ has quit [Ping timeout: 264 seconds]
mtkd has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
PaulCapestany has joined #ruby
tubbo has quit [Quit: WeeChat 1.9.1]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 272 seconds]
joelwallis has joined #ruby
vee__ has joined #ruby
mtkd has joined #ruby
larcara has quit [Remote host closed the connection]
larcara has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
skweek has quit [Ping timeout: 260 seconds]
aScottishBoat has joined #ruby
tcopeland has quit [Quit: tcopeland]
PaulCapestany has quit [Quit: .]
joelwallis has quit []
milardovich has quit [Remote host closed the connection]
mtkd has quit [Ping timeout: 272 seconds]
synthroid has quit []
exhiled has joined #ruby
zautomata1 has joined #ruby
mtkd has joined #ruby
c0ncealed has quit [Remote host closed the connection]
mahlon has joined #ruby
c0ncealed has joined #ruby
zautomata has quit [Ping timeout: 264 seconds]
<apeiros> xco: call the block variable `status_value`?
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> and re writing out: baweaver probably missed the ?, so def sending?; status == 'sending'.freeze'; end # f.ex.
mtkd has quit [Ping timeout: 264 seconds]
Pierreb has joined #ruby
mtkd has joined #ruby
<xco> apeiros: i chose to go with writing it out as using a different block variable breaks my test with “NameError: undefined local variable or method `status' for #<Class:0x005566d38e91c8>”
mtkd has quit [Ping timeout: 240 seconds]
PaulCapestany has joined #ruby
milardovich has joined #ruby
<apeiros> o0
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<apeiros> sounds to me like you omitted critical parts in your gist then.
ikopico has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
jenrzzz_ has joined #ruby
milardovich has quit [Ping timeout: 255 seconds]
skweek has joined #ruby
ikopico has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
fclausen has joined #ruby
milardovich has joined #ruby
PaulCapestany has quit [Quit: .]
jenrzzz_ has quit [Ping timeout: 264 seconds]
larcara has quit []
ahrs has quit [Remote host closed the connection]
c0ncealed has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 256 seconds]
c0ncealed has joined #ruby
Psybur has quit [Ping timeout: 264 seconds]
mtkd has joined #ruby
ahrs has joined #ruby
cagomez has quit [Remote host closed the connection]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
cagomez has joined #ruby
PaulCapestany has joined #ruby
alex`` has quit [Quit: WeeChat 1.9.1]
milardovich has quit [Ping timeout: 255 seconds]
cagomez has quit [Ping timeout: 272 seconds]
miskatonic has joined #ruby
truenito has joined #ruby
baweaver is now known as lemur
lemur is now known as baweaver
lucz has joined #ruby
jnollette has quit [Read error: Connection reset by peer]
alfiemax has quit [Ping timeout: 264 seconds]
jnollette has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
troys is now known as troys_
slester_ has joined #ruby
exhiled has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troys_ is now known as troys
karapetyan has quit [Remote host closed the connection]
rhyselsmore has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
karapetyan has joined #ruby
slester_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
aScottishBoat has quit [Ping timeout: 255 seconds]
slester_ has joined #ruby
_aeris_ has quit [Ping timeout: 248 seconds]
polishdub has quit [Quit: leaving]
Musashi007 has joined #ruby
dtcristo has quit [Ping timeout: 240 seconds]
dman[m] has quit [Ping timeout: 240 seconds]
yana[m] has quit [Ping timeout: 240 seconds]
_aeris_ has joined #ruby
simonizor has quit [Ping timeout: 240 seconds]
simonizor has joined #ruby
yana[m] has joined #ruby
dman[m] has joined #ruby
dtcristo has joined #ruby
dtcristo has joined #ruby
code_zombie has joined #ruby
despai_ has quit [Quit: ...]
skweek has joined #ruby
safetypin has quit [Quit: ZZZzzz…]
Musashi007 has quit [Quit: Musashi007]
jenrzzz has quit [Ping timeout: 272 seconds]
Musashi007 has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
chocoelho has quit [Quit: chocoelho]
Neptu_ has quit [Ping timeout: 256 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
troys is now known as troys_
Ltem has quit [Quit: Leaving]
milardovich has joined #ruby
John____ has joined #ruby
miskatonic has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
Neptu_ has joined #ruby
milardovich has quit [Ping timeout: 256 seconds]
cognoscente has quit [Quit: leaving]
cagomez has joined #ruby
clemens3 has quit [Ping timeout: 240 seconds]
Qommand0r has quit [Quit: WeeChat 2.0]
hahuang65 has quit [Quit: WeeChat 2.0]
SCHAPiE has quit [Read error: Connection reset by peer]
wolfshappen has quit [Quit: Waffs have technical problems too]
SCHAPiE has joined #ruby
Dimik has quit [Remote host closed the connection]
fclausen has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
bruce_lee has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
guardianx has joined #ruby
slester_ has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
kapil___ has quit [Quit: Connection closed for inactivity]
guardianx has quit [Client Quit]
xco has quit [Ping timeout: 240 seconds]
nofxx has joined #ruby
Dimik has joined #ruby
pastorinni has quit [Remote host closed the connection]
RyanMcCoskrie has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
tcopeland has joined #ruby
Emmanuel_Chanel has joined #ruby
xco has joined #ruby
alfiemax has joined #ruby
Azure has quit [Quit: Oops.]
PaulCapestany has quit [Ping timeout: 264 seconds]
alfiemax has quit [Ping timeout: 255 seconds]