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.
<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
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]
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]
<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…]
<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?
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.
<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.
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>
^ 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
<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."
<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:
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)
<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]