havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.5, 2.5.7, 2.7.0-preview1: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
freedom has quit [Quit: freedom]
fphilipe has quit [Ping timeout: 276 seconds]
Fernando-Basso has quit [Remote host closed the connection]
bambanx has quit [Remote host closed the connection]
duder____ has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 265 seconds]
duderonomy has joined #ruby
duderonomy is now known as Guest92788
jenrzzz_ has joined #ruby
bambanx has joined #ruby
d^sh has quit [Ping timeout: 265 seconds]
d^sh has joined #ruby
mroutis_ has quit [Remote host closed the connection]
bruce_lee has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
wildtrees has joined #ruby
jenrzzz_ has quit [Ping timeout: 265 seconds]
Guest92788 has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
bambanx has quit [Quit: Leaving]
ramfjord has joined #ruby
duderono_ has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
duderono_ has quit [Client Quit]
davor_ has joined #ruby
davor has quit [Ping timeout: 264 seconds]
davor_ is now known as davor
ramfjord has quit [Ping timeout: 268 seconds]
Swyper has joined #ruby
cthulchu has quit [Ping timeout: 240 seconds]
Swyper has quit [Remote host closed the connection]
wildtrees has quit [Quit: Leaving]
ramfjord has joined #ruby
freedom has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
gix has quit [Ping timeout: 240 seconds]
mroutis has joined #ruby
i9zO5AP has quit [Quit: WeeChat 2.5]
AJA4351 has joined #ruby
mroutis has quit [Client Quit]
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
tsujp has joined #ruby
<havenwood> galaxie: No, there are other ways.
<havenwood> &>> module Foo; FOO = :foo; def self.prepended(mod); self.constants.each { |constant| mod.const_set constant, const_get(constant) } end end; module Bar; FOO = :bar; prepend Foo end; Bar::FOO
<rubydoc> # => :foo stderr: -e:4: warning: already initialized constant Bar::FOO... check link for more (https://carc.in/#/r/7ogc)
<havenwood> galaxie: Redefining constants is a bit suspect.
<havenwood> (note the warning)
DaRock has joined #ruby
dasher00 has quit [Ping timeout: 276 seconds]
sgen has quit [Ping timeout: 245 seconds]
ramfjord has quit [Ping timeout: 265 seconds]
kyrylo has joined #ruby
drincruz has joined #ruby
<galaxie> havenwood: What would be another way to go about, then? I have classes that have subclasses where, to save on code, I want to use some sort of variable or constant or something to tell it that these subclasses have this property and thus do this something.
<havenwood> galaxie: Have any code to show that might help us understand?
grilix_ has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
thejs has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
fphilipe has joined #ruby
Esa_ has quit []
fphilipe has quit [Ping timeout: 246 seconds]
<galaxie> havenwood: Not really. It's scattered everywhere. I just feel constants would make better sense since they're "somewhat" immutable.
<havenwood> galaxie: But in this case, mutating.
<havenwood> galaxie: (Which is why there's not a mechanism to override constants.)
<havenwood> Is there a better word than `in` for pattern matching? https://bugs.ruby-lang.org/issues/16182
AJA4351 has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
Frobozz has quit [Quit: quit]
x86sk has joined #ruby
AJA4350 has quit [Quit: AJA4350]
mozzarella has quit [Quit: WeeChat 2.4]
thejs has quit [Remote host closed the connection]
tdy1 has joined #ruby
Technodrome has joined #ruby
tdy1 is now known as tdy
Swyper has quit [Remote host closed the connection]
freedom has quit [Quit: freedom]
mozzarella has joined #ruby
go|dfish has joined #ruby
hutch1 has joined #ruby
DTZUZO has joined #ruby
<baweaver> I'd almost reverse the order of it
<baweaver> Single-line matches are one of the only RTL read items in Ruby
<baweaver> Not even `for x in y` is RTL
tpanarch1st_ has quit [Ping timeout: 240 seconds]
hutch1 has quit [Ping timeout: 240 seconds]
<baweaver> havenwood: commented
rippa has joined #ruby
MrCrackPot has joined #ruby
brool has quit [Ping timeout: 245 seconds]
szTheory has quit []
duderonomy has joined #ruby
fphilipe has joined #ruby
freedom has joined #ruby
RiPuk has quit [Quit: ZNC 1.7.5 - https://znc.in]
RiPuk has joined #ruby
fphilipe has quit [Ping timeout: 276 seconds]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
freedom has quit [Quit: freedom]
freedom has joined #ruby
cesario_ has joined #ruby
tdy has quit [Ping timeout: 240 seconds]
cesario_ has quit [Client Quit]
cesario_ has joined #ruby
cesario_ has quit [Client Quit]
kyrylo has joined #ruby
Fusl has quit [Max SendQ exceeded]
samort14 has joined #ruby
Fusl has joined #ruby
samort7 has quit [Ping timeout: 245 seconds]
Rudd0 has quit [Ping timeout: 245 seconds]
mozzarel1 has joined #ruby
jinie has quit [Ping timeout: 245 seconds]
segy has quit [Ping timeout: 245 seconds]
davor_ has joined #ruby
jinie has joined #ruby
jmcgnh has quit [Ping timeout: 245 seconds]
dhollinger has quit [Ping timeout: 245 seconds]
swistak35 has quit [Ping timeout: 245 seconds]
davor has quit [Ping timeout: 245 seconds]
mozzarella has quit [Ping timeout: 245 seconds]
agrecascino has quit [Ping timeout: 245 seconds]
greypack has quit [Ping timeout: 245 seconds]
teclator has quit [Ping timeout: 245 seconds]
ltp has quit [Ping timeout: 245 seconds]
txdv has quit [Ping timeout: 245 seconds]
ule has quit [Ping timeout: 245 seconds]
wmoxam has quit [Ping timeout: 245 seconds]
Nowaker has quit [Ping timeout: 245 seconds]
davor_ is now known as davor
mozzarel1 is now known as mozzarella
camilasan has quit [Ping timeout: 245 seconds]
Cork has quit [Ping timeout: 245 seconds]
jmcgnh has joined #ruby
segy has joined #ruby
codefriar has quit [Ping timeout: 240 seconds]
ltp has joined #ruby
ule has joined #ruby
camilasan has joined #ruby
akosednar has quit [Ping timeout: 240 seconds]
Nowaker has joined #ruby
teclator has joined #ruby
agrecascino has joined #ruby
codefriar has joined #ruby
greypack has joined #ruby
swistak35 has joined #ruby
akosednar has joined #ruby
akosednar has joined #ruby
Cork has joined #ruby
suukim has joined #ruby
Rudd0 has joined #ruby
dhollinger has joined #ruby
txdv has joined #ruby
wmoxam has joined #ruby
cthulchu has joined #ruby
samort14 has quit [Read error: Connection reset by peer]
Inline has quit [Quit: Leaving]
ropeney has quit [Read error: Connection reset by peer]
ropeney has joined #ruby
cthulchu has quit [Read error: Connection reset by peer]
conta has joined #ruby
ramfjord has joined #ruby
jenrzzz has joined #ruby
DaRock has quit [Ping timeout: 240 seconds]
za1b1tsu has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
kyrylo has quit [Read error: Connection reset by peer]
kyrylo has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
dionysus69 has joined #ruby
conta has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
_mossplix has joined #ruby
i_wdt has joined #ruby
conta has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
_mossplix has quit [Remote host closed the connection]
fphilipe has joined #ruby
fphilipe has quit [Ping timeout: 276 seconds]
BH23 has joined #ruby
_mossplix has joined #ruby
BH23 has quit [Ping timeout: 240 seconds]
DaRock has joined #ruby
Furai has quit [Quit: WeeChat 2.6]
ta has quit [Ping timeout: 265 seconds]
xco has joined #ruby
i_wdt has quit [Ping timeout: 265 seconds]
fphilipe has joined #ruby
Furai has joined #ruby
cd has quit [Quit: cd]
fphilipe has quit [Ping timeout: 252 seconds]
snickers has joined #ruby
_mossplix has quit [Remote host closed the connection]
fphilipe has joined #ruby
Intelo has joined #ruby
_mossplix has joined #ruby
MrCrackPot has quit [Quit: Something went wrong again oh the joys]
fphilipe has quit [Ping timeout: 276 seconds]
TomyWork has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
conta has quit [Quit: conta]
fphilipe has joined #ruby
conta has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
snickers has quit [Quit: Textual IRC Client: www.textualapp.com]
za1b1tsu has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 245 seconds]
BH23 has joined #ruby
freedom has quit [Remote host closed the connection]
freedom has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
bitwinery has quit [Quit: Leaving]
freedom_ has joined #ruby
ta has joined #ruby
esrse has joined #ruby
freedom has quit [Ping timeout: 276 seconds]
freedom_ is now known as freedom
schne1der has joined #ruby
jmcgnh has quit [Ping timeout: 265 seconds]
jmcgnh_ has joined #ruby
jmcgnh_ is now known as jmcgnh
Intelo has quit [Ping timeout: 268 seconds]
Intelo has joined #ruby
conta has quit [Ping timeout: 265 seconds]
_mossplix has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
_mossplix has joined #ruby
dasher00 has joined #ruby
GodFather has quit [Ping timeout: 265 seconds]
dbugger has joined #ruby
conta has joined #ruby
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deathwishdave has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has quit [Quit: xco]
_mossplix has quit [Remote host closed the connection]
_mossplix has joined #ruby
ropeney has quit [Read error: Connection reset by peer]
ropeney has joined #ruby
kyrylo has joined #ruby
Intelo has quit [Ping timeout: 240 seconds]
deathwishdave has quit [Quit: Textual IRC Client: www.textualapp.com]
freedom has quit [Remote host closed the connection]
Ai9zO5AP has joined #ruby
freedom has joined #ruby
Intelo has joined #ruby
Intelo has quit [Remote host closed the connection]
Intelo has joined #ruby
c0san0stra has quit [Ping timeout: 265 seconds]
c0san0stra has joined #ruby
jenrzzz has joined #ruby
ramfjord has joined #ruby
Jonopoly has joined #ruby
freedom has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 245 seconds]
ramfjord has quit [Ping timeout: 245 seconds]
n13z has quit [Remote host closed the connection]
<Jonopoly> Would ruby be able to anonymize a large database?
d^sh has quit [Ping timeout: 268 seconds]
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
d^sh has joined #ruby
DaRock has quit [Ping timeout: 250 seconds]
DaRock has joined #ruby
Intelo has quit [Ping timeout: 245 seconds]
shansen has quit [Remote host closed the connection]
shansen has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has joined #ruby
Intelo has joined #ruby
Mrgoose8457 has quit [Quit: The Lounge - https://thelounge.chat]
Azure has quit [Ping timeout: 265 seconds]
_mossplix has quit [Remote host closed the connection]
cow[moo] has quit [Read error: Connection reset by peer]
DTZUZO has quit [Ping timeout: 265 seconds]
Mrgoose8457 has joined #ruby
nahra has joined #ruby
Intelo has quit [Ping timeout: 240 seconds]
ccooke has quit [Quit: Lost terminal]
ccooke has joined #ruby
ccooke_ has joined #ruby
ccooke___ has joined #ruby
fig-le-deunch has joined #ruby
Intelo has joined #ruby
conta has quit [Ping timeout: 268 seconds]
fig-le-deunch has quit [Read error: Connection reset by peer]
Jonopoly has quit [Ping timeout: 240 seconds]
fig-le-deunch has joined #ruby
ccooke__ has joined #ruby
ccooke_ has quit [Quit: Lost terminal]
Jonopoly has joined #ruby
<Jonopoly> d
Jonopoly has quit [Changing host]
Jonopoly has joined #ruby
ccooke_ has joined #ruby
<Jonopoly> Any tips on anonymizing a database with ruby?
<depesz> Jonopoly: just do it?
<depesz> not entirely sure what you want to do (anonymization is very broad term), but it's not all that complicated.
Intelo_ has joined #ruby
ccooke__ has quit [Quit: Lost terminal]
Intelo has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
ccooke_ has quit [Quit: Lost terminal]
_mossplix has joined #ruby
conta has joined #ruby
za1b1tsu has joined #ruby
DTZUZO has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
ctp has quit [Quit: Connection closed for inactivity]
Corey[m] has quit [Remote host closed the connection]
kira_rose[m] has quit [Write error: Connection reset by peer]
otaznik[m] has quit [Read error: Connection reset by peer]
sepp2k has quit [Read error: Connection reset by peer]
linuus[m] has quit [Remote host closed the connection]
qbrd[m] has quit [Read error: Connection reset by peer]
mistergibson[m] has quit [Read error: Connection reset by peer]
turt2live has quit [Read error: Connection reset by peer]
Hanma[m] has quit [Read error: Connection reset by peer]
danielk43[m] has quit [Remote host closed the connection]
iotatron[m] has quit [Read error: Connection reset by peer]
bertocq[m] has quit [Remote host closed the connection]
fig-le-deunch[m] has quit [Remote host closed the connection]
aecepoglu[m] has quit [Write error: Connection reset by peer]
tsujp has joined #ruby
fig-le-deunch has quit [Ping timeout: 240 seconds]
psmolen has quit [Ping timeout: 240 seconds]
Davey has quit [Ping timeout: 240 seconds]
cpallares_ has quit [Ping timeout: 240 seconds]
conta has quit [Remote host closed the connection]
conta has joined #ruby
mcspud has quit [Ping timeout: 240 seconds]
tsujp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_mossplix has quit [Remote host closed the connection]
psmolen has joined #ruby
cpallares has joined #ruby
Davey has joined #ruby
Sithembewena has joined #ruby
Intelo_ has quit [Quit: Leaving]
Intelo has joined #ruby
mcspud has joined #ruby
aecepoglu[m] has joined #ruby
fig-le-deunch has joined #ruby
andikr has quit [Ping timeout: 252 seconds]
andikr has joined #ruby
grilix_ has joined #ruby
cow[moo] has joined #ruby
drincruz has joined #ruby
tsujp has joined #ruby
grilix_ has quit [Ping timeout: 245 seconds]
_mossplix has joined #ruby
xco has joined #ruby
nahra has quit [Quit: ERC (IRC client for Emacs 26.2)]
turt2live has joined #ruby
linuus[m] has joined #ruby
sepp2k has joined #ruby
Corey[m] has joined #ruby
mistergibson[m] has joined #ruby
qbrd[m] has joined #ruby
iotatron[m] has joined #ruby
Hanma[m] has joined #ruby
bertocq[m] has joined #ruby
danielk43[m] has joined #ruby
fig-le-deunch[m] has joined #ruby
otaznik[m] has joined #ruby
kira_rose[m] has joined #ruby
conta has quit [Ping timeout: 276 seconds]
DTZUZO has quit [Ping timeout: 245 seconds]
drincruz has quit [Ping timeout: 240 seconds]
freedom has joined #ruby
conta2 has joined #ruby
salinasce has joined #ruby
AJA4350 has joined #ruby
andikr has quit [Ping timeout: 245 seconds]
andikr has joined #ruby
DTZUZO has joined #ruby
BH23 has quit [Ping timeout: 245 seconds]
<Swyper> hi
DTZUZO has quit [Ping timeout: 246 seconds]
ElFerna has joined #ruby
Radar has quit [Ping timeout: 245 seconds]
baweaver has quit [Ping timeout: 245 seconds]
darris has quit [Quit: Bye bye!]
conta2 has quit [Ping timeout: 240 seconds]
darris has joined #ruby
Radar has joined #ruby
Radar is now known as Guest86809
jenrzzz has joined #ruby
xco has quit [Quit: xco]
baweaver has joined #ruby
BH23 has joined #ruby
baweaver is now known as Guest35379
<Jonopoly> depesz: I was wondering how to approach it - basically remove/rename client names
xco has joined #ruby
<Jonopoly> Remove phone numbers or replace them across multiple tables
<Jonopoly> Any paticular library? or..
jenrzzz has quit [Ping timeout: 240 seconds]
Swyper has quit [Remote host closed the connection]
freedom has quit [Remote host closed the connection]
catbusters has joined #ruby
lucasb has joined #ruby
andikr has quit [Remote host closed the connection]
<depesz> Jonopoly: why not simplyu couple of update statements?
ogres has joined #ruby
kyrylo has joined #ruby
_mossplix has quit [Read error: Connection reset by peer]
_mosspli_ has joined #ruby
esrse has quit [Ping timeout: 240 seconds]
poontangmessiah has joined #ruby
jacksoow has quit [Ping timeout: 240 seconds]
jacksoow_ has joined #ruby
salinasce has quit [Ping timeout: 252 seconds]
nahra has joined #ruby
nahra has joined #ruby
xco has quit [Quit: xco]
fig-le-deunch has quit [Quit: Konversation terminated!]
hutch1 has joined #ruby
jacksoow has joined #ruby
matled has quit [Remote host closed the connection]
jacksoow_ has quit [Ping timeout: 265 seconds]
x86sk has quit [Quit: Connection closed for inactivity]
jrafanie has joined #ruby
_mosspli_ has quit [Remote host closed the connection]
_mossplix has joined #ruby
go|dfish has quit [Ping timeout: 240 seconds]
clemens3 has joined #ruby
matled has joined #ruby
ElFerna has quit [Quit: Leaving.]
salinasce has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZO has joined #ruby
jrafanie has joined #ruby
jrafanie has quit [Client Quit]
grilix_ has joined #ruby
schne1der has quit [Ping timeout: 250 seconds]
jacksoow_ has joined #ruby
jacksoow has quit [Ping timeout: 276 seconds]
sgen has joined #ruby
jacksoow_ has quit [Read error: Connection reset by peer]
jacksoow has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
salinasce has quit [Remote host closed the connection]
salinasc has joined #ruby
rbanffy has quit [Quit: rbanffy]
_mossplix has quit [Remote host closed the connection]
sgen has quit [Ping timeout: 250 seconds]
jacksoow has quit [Ping timeout: 245 seconds]
_mosspli_ has joined #ruby
Inline has joined #ruby
vondruch has quit [Ping timeout: 276 seconds]
salinasc has quit [Ping timeout: 250 seconds]
_mosspli_ has quit [Ping timeout: 246 seconds]
jacksoow has joined #ruby
Sithembewena has left #ruby ["Textual IRC Client: www.textualapp.com"]
onure has joined #ruby
_mossplix has joined #ruby
onure has quit [Quit: Leaving]
Technodrome has joined #ruby
hightower2 has quit [Ping timeout: 240 seconds]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
dionysus70 is now known as dionysus69
hightower2 has joined #ruby
_mossplix has quit [Remote host closed the connection]
nahra has quit [Ping timeout: 240 seconds]
kyrylo has joined #ruby
Intelo has quit [Remote host closed the connection]
Intelo has joined #ruby
nahra has joined #ruby
nahra has joined #ruby
drincruz has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
Intelo has quit [Ping timeout: 268 seconds]
thebananaking has quit [Quit: Connection closed for inactivity]
schne1der has joined #ruby
nahra has quit [Ping timeout: 240 seconds]
nahra has joined #ruby
jrafanie has joined #ruby
jacksoow has quit [Ping timeout: 276 seconds]
codefriar has quit [Ping timeout: 276 seconds]
go|dfish has joined #ruby
codefriar has joined #ruby
jacksoow has joined #ruby
deathwishdave has joined #ruby
hightower2 has quit [Ping timeout: 265 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
brool has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
znz_jp has quit [Remote host closed the connection]
duderonomy has joined #ruby
znz_jp has joined #ruby
_mossplix has joined #ruby
duderonomy has quit [Ping timeout: 246 seconds]
chalkmonster has joined #ruby
ellcs has quit [Read error: Connection reset by peer]
reber has joined #ruby
ellcs has joined #ruby
DaRock has quit [Ping timeout: 245 seconds]
ellcs has quit [Read error: Connection reset by peer]
conta2 has joined #ruby
Esa_ has joined #ruby
ellcs has joined #ruby
_mossplix has quit [Remote host closed the connection]
lucasb has quit [Quit: Connection closed for inactivity]
vondruch has joined #ruby
_mossplix has joined #ruby
hutch1 has quit [Ping timeout: 250 seconds]
_mossplix has quit [Ping timeout: 276 seconds]
eljimmy has joined #ruby
kyrylo has joined #ruby
joast has quit [Quit: Leaving.]
User458764 has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Jonopoly has quit [Quit: WeeChat 1.9.1]
mikecmpbll has quit [Quit: inabit. zz.]
mikecmpbll has joined #ruby
tpanarch1st_ has joined #ruby
cris_ has joined #ruby
kyrylo has joined #ruby
cris_ has quit [Quit: Leaving]
tdy has joined #ruby
xco has joined #ruby
clemens3 has quit [Quit: WeeChat 1.6]
chalkmonster has quit [Quit: WeeChat 2.6]
joast has joined #ruby
GodFather has quit [Ping timeout: 265 seconds]
SuperL4g has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SuperLag has quit [Ping timeout: 245 seconds]
kyrylo has joined #ruby
nahra has quit [Ping timeout: 240 seconds]
TomyWork has quit [Ping timeout: 246 seconds]
poontangmessiah has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rapture has joined #ruby
duderonomy has joined #ruby
duderonomy is now known as Guest79972
Guest79972 has quit [Client Quit]
duderono_ has joined #ruby
AndreYuhai has joined #ruby
<AndreYuhai> Hey there, I have a csv file that I am reading line by line. But cells contain digits with leading zeros which when parsed is converted to octal. How can I avoid that? "011" converts to "9"
<AndreYuhai> I am using CSV.foreach(path_to_csv, headers: true, header_converters: :symbol, converters: :numeric)
duderono_ has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
conta2 has quit [Remote host closed the connection]
salinasc has joined #ruby
<adam12> AndreYuhai: Interesting. That's actually because of the Integer() method in Kernel I'm assuming.
<adam12> AndreYuhai: My suggestion would be to not use the :numeric converter and possibly use your own by providing a lambda. You could try dropping the leading 0 before trying to cast to numeric.
<adam12> &>> Integer("011")
<rubydoc> # => 9 (https://carc.in/#/r/7omu)
<AndreYuhai> adam12, indeed it is. I was not expecting this and I don't think there is any way to avoid this when using :numeric
<AndreYuhai> Oh sure I will try the lambda way, thank you.
<adam12> AndreYuhai: I've never seen it before. Maybe it's actually a Ruby bug? I'm not sure I'd expect the string "011" to be octal...
duderono_ has quit [Read error: Connection reset by peer]
duderonomy has joined #ruby
<AndreYuhai> adam12, Well in some cases maybe but then there should be an option whether we want that or not I guess.
duderonomy is now known as Guest41093
tpanarch1st_ has quit [Quit: Thanks for your help, nice to see you, take care.]
SuperL4g has quit [Ping timeout: 276 seconds]
hutch1 has joined #ruby
<havenwood> &>> Integer("011", 10)
<rubydoc> # => 11 (https://carc.in/#/r/7omv)
SuperLag has joined #ruby
<havenwood> AndreYuhai: ^
dinfuehr has quit [Ping timeout: 240 seconds]
Intelo has joined #ruby
dinfuehr has joined #ruby
<AndreYuhai> havenwood, Oh, thank you for pointing that out as well. I will implement that.
chalkmonster has joined #ruby
Guest41093 has quit [Read error: Connection reset by peer]
snk has joined #ruby
duderono_ has joined #ruby
ramfjord has joined #ruby
SuperLag has quit [Quit: time to go dark for a bit]
spiette has quit [Quit: ZNC 1.7.3 - https://znc.in]
Intelo has quit [Remote host closed the connection]
Intelo has joined #ruby
xco has quit [Quit: xco]
spiette has joined #ruby
greengriminal has joined #ruby
duderono_ has quit [Quit: Textual IRC Client: www.textualapp.com]
xco has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
duderono_ has joined #ruby
psmolen has quit [Ping timeout: 265 seconds]
duderono_ has quit [Client Quit]
duderon__ has joined #ruby
psmolen has joined #ruby
jeremycw has joined #ruby
SuperLag has joined #ruby
cthulchu has joined #ruby
<NL3limin4t0r> &>> '011'.to_i(10)
<rubydoc> # => 11 (https://carc.in/#/r/7ona)
ellcs1 has joined #ruby
BH23 has quit [Ping timeout: 240 seconds]
<NL3limin4t0r> Depending on how strict you want to convert. #to_i produces 0 if there isn't a valid number, while #Integer raises an exception.
<NL3limin4t0r> &>> 'foo'.to_i(10)
<rubydoc> # => 0 (https://carc.in/#/r/7onb)
<NL3limin4t0r> &>> Integer('foo', 10)
<rubydoc> stderr: -e:4:in `Integer': invalid value for Integer(): "foo" (ArgumentError)... check link for more (https://carc.in/#/r/7ond)
<NL3limin4t0r> AndreYuhai: ^
morozovm has joined #ruby
morozovm has quit [Client Quit]
suukim has quit [Quit: Konversation terminated!]
duderon__ has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
Rapture has quit [Ping timeout: 264 seconds]
duderono_ has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
Rapture has joined #ruby
NL3limin4t0r is now known as NL3limin4t0r_afk
rbanffy has joined #ruby
xco has quit [Quit: xco]
salinasc has quit [Ping timeout: 276 seconds]
wildtrees has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
gavlee has joined #ruby
salinasc has joined #ruby
duderono_ has quit [Read error: Connection reset by peer]
duderonomy has joined #ruby
duderonomy is now known as Guest51441
deathwishdave has joined #ruby
lucasb has joined #ruby
Guest51441 has quit [Read error: Connection reset by peer]
ellcs1 has quit [Ping timeout: 245 seconds]
eljimmy has quit [Quit: Leaving]
duderono_ has joined #ruby
KeyJoo has joined #ruby
tdy has quit [Ping timeout: 240 seconds]
redlegion has quit [Remote host closed the connection]
Exuma has joined #ruby
rbanffy has quit [Quit: rbanffy]
redlegion has joined #ruby
xco has joined #ruby
gix has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rbanffy has joined #ruby
nowz has joined #ruby
banisterfiend has joined #ruby
fphilipe has quit [Ping timeout: 246 seconds]
xco has quit [Quit: xco]
antong has joined #ruby
duderono_ has quit [Read error: Connection reset by peer]
duderono_ has joined #ruby
duderono_ has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 240 seconds]
duderono_ has joined #ruby
ropeney_ has joined #ruby
ropeney has quit [Ping timeout: 240 seconds]
AJA4351 has joined #ruby
reyfi9e has quit [Ping timeout: 245 seconds]
za1b1tsu has quit [Remote host closed the connection]
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4351 is now known as AJA4350
antong has quit []
reyfi9e has joined #ruby
Ven`` has joined #ruby
antong has joined #ruby
antong has quit [Client Quit]
rbanffy has quit [Quit: rbanffy]
jenrzzz has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
gix has quit [Quit: Client exiting]
banisterfiend has joined #ruby
gix has joined #ruby
snickers has joined #ruby
banisterfiend has quit [Client Quit]
drincruz has quit [Read error: No route to host]
catbusters has quit [Quit: Connection closed for inactivity]
drincruz has joined #ruby
ropeney has joined #ruby
ropeney_ has quit [Ping timeout: 245 seconds]
tdy has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has quit [Ping timeout: 265 seconds]
banisterfiend has joined #ruby
xco has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
codefriar has quit [Ping timeout: 265 seconds]
codefriar has joined #ruby
banisterfiend has quit [Client Quit]
rem_ has joined #ruby
bitwinery has joined #ruby
bitwinery has quit [Remote host closed the connection]
bitwinery has joined #ruby
SeepingN has joined #ruby
_mossplix has joined #ruby
tdy has joined #ruby
tdy has quit [Ping timeout: 245 seconds]
drincruz has quit [Ping timeout: 268 seconds]
drincruz_ has joined #ruby
poontangmessiah has joined #ruby
grilix_ has quit [Ping timeout: 264 seconds]
salinasc has quit [Ping timeout: 265 seconds]
schne1der has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
duderono_ has quit [Read error: Connection reset by peer]
duderonomy has joined #ruby
duderonomy is now known as Guest70209
Guest70209 has quit [Ping timeout: 240 seconds]
ellcs1 has joined #ruby
jenrzzz has joined #ruby
codefriar has quit [Ping timeout: 240 seconds]
codefriar has joined #ruby
fphilipe has joined #ruby
bambanx has joined #ruby
bambanx has quit [Client Quit]
Exuma has joined #ruby
blackmesa1 has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
ramfjord has quit [Ping timeout: 265 seconds]
fphilipe has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
KeyJoo has quit [Quit: KeyJoo]
Fusl has quit [Max SendQ exceeded]
Fusl has joined #ruby
davidmogar has joined #ruby
<davidmogar> hello. Probably not the best place to ask, but let's see. I have a ruby program and I want to execute from it a command. For that I'm using system("mycommand &"). The thing here is that I need that command to stay alive even if the main program dies. How could I do this?
deathwishdave has quit [Quit: Textual IRC Client: www.textualapp.com]
<jeremycw> davidmogar: you can fork the process and then detach the parent
<jeremycw> i.e: https://dpaste.de/nCji
Fernando-Basso has joined #ruby
<davidmogar> jeremycw how do I detach the parent?
<havenwood> davidmogar: I was going to say spawn and detach, which is very similar to jeremycw's suggestion.
<jeremycw> like in the snippet above, with Process.detach
<havenwood> davidmogar: Process.detach spawn 'command'
<havenwood> davidmogar: (This is the best place to ask.) :)
<davidmogar> I should have given more details because that solution, although seems completely valid, it's not working
<davidmogar> so more details coming
<havenwood> as long as CGI isn't involved, I look forward to the details
<davidmogar> this is actually for a PoC. The parent program is Puppet Server, which runs ruby. What I'm trying to do is define a function that get's executed in the server. In that function I'm trying to exec system tool that kills the Puppet Server. The problem there is that the moment I kill it, the system tool is killed too. They way I'm executing it is with
<davidmogar> system("/mytool &") but this inherits the PGID. Fork is not implemented for the platform, so it's not an options here
Intelo has quit [Read error: Connection reset by peer]
Intelo has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
<davidmogar> too be fair is jruby...
<jeremycw> fork would be a bad option anyway since you wouldn't want to fork the entire JVM...
<davidmogar> exactly
<jeremycw> but I don't see why spawn wouldn't work.
<davidmogar> let me try that. Is the only one I haven't tried
<jeremycw> how are you killing the server?
<davidmogar> that part is in go. Basically killing the process with a sigint
<davidmogar> and spawn("/tool") inherits the pgid too so gets killed
rbanffy has joined #ruby
<jeremycw> you called Process.detach ?
<davidmogar> no, forgot. For the pid returned by spawn?
xco_ has joined #ruby
<jeremycw> yes. also PGID is process group id. you want to kill by PID
<davidmogar> jeremycw same thing. The PGID and the SID are the ones of the parent
salinasc has joined #ruby
<davidmogar> the main process has the same pid and pgid
xco has quit [Ping timeout: 240 seconds]
xco_ is now known as xco
salinasc has quit [Remote host closed the connection]
salinasc has joined #ruby
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
ellcs1 has quit [Ping timeout: 264 seconds]
tdy has joined #ruby
<havenwood> davidmogar: you can change the PGID with spawn. For example: Process.detach spawn 'ls', pgroup: true
<havenwood> davidmogar: the PID of a child will be different than the parent
banisterfiend has joined #ruby
<davidmogar> havenwood let's give it a try
<davidmogar> yep, it changed the pgid. The process was still killed. I guess this happened because the SID still points to the parent?
<AndreYuhai> NL3limin4t0r_afk, Thank you, I will go with Integer() because I also have some string so I don't want them to be 0. Sorry for the late reply. :)
AndreYuhai has quit [Quit: Leaving]
<havenwood> davidmogar: Sleep a second in the subprocess so you can successfully detach?
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drincruz_ has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
<davidmogar> havenwood same
<davidmogar> havenwood here you have the output of ps aux https://pastebin.com/wZ1yw3Ua
<ruby[bot]> davidmogar: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<havenwood> davidmogar: I have to relocate now, but just to confirm, killing the parent from a detached child is killing the child too?
<davidmogar> yes
<havenwood> davidmogar: That doesn't sound right. Can you show a minimal reproduction case? BBIAB.
<davidmogar> havenwood can show some code, but to reproduce you would need puppet at least so no minimal at all
xco has quit [Quit: xco]
<Iambchop> davidmogar: might be able to reproduce the behavior in a small script you run directly from jruby instead of puppet?
jenrzzz has joined #ruby
ellcs1 has joined #ruby
jeremycw has quit [Ping timeout: 245 seconds]
Azure has joined #ruby
jmcgnh has quit [Ping timeout: 240 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
salinasc has quit [Remote host closed the connection]
ccooke___ has quit [Ping timeout: 268 seconds]
salinasc has joined #ruby
Swyper has joined #ruby
jmcgnh has joined #ruby
Swyper has quit [Remote host closed the connection]
_mossplix has quit [Remote host closed the connection]
Swyper has joined #ruby
dbugger has quit [Ping timeout: 264 seconds]
davidmogar has quit [Remote host closed the connection]
salinasc has quit [Ping timeout: 265 seconds]
snickers has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has quit [Ping timeout: 245 seconds]
banisterfiend has joined #ruby
ramfjord has joined #ruby
reber has quit [Remote host closed the connection]
banisterfiend has quit [Client Quit]
lucasb has quit [Quit: Connection closed for inactivity]
_mossplix has joined #ruby
i9zO5AP has joined #ruby
banisterfiend has joined #ruby
Ai9zO5AP has quit [Ping timeout: 246 seconds]
Intelo has quit [Ping timeout: 265 seconds]
salinasc has joined #ruby
Azure has quit [Quit: Textual IRC Client: www.textualapp.com]
_mossplix has quit [Ping timeout: 265 seconds]
Swyper has quit [Remote host closed the connection]
salinasc has quit [Read error: Connection reset by peer]
salinasce has joined #ruby
Swyper has joined #ruby
poontangmessiah has quit [Remote host closed the connection]
fphilipe has joined #ruby
jenrzzz has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has quit [Remote host closed the connection]
fphilipe has quit [Ping timeout: 245 seconds]
Esa_ has quit []
Swyper has joined #ruby
salinasce has quit [Ping timeout: 240 seconds]
Swyper has quit [Remote host closed the connection]
also_uplime has joined #ruby
also_uplime has left #ruby ["/me scurries away"]
duderonomy has joined #ruby
duderonomy is now known as Guest11009
thebananaking has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest35379 is now known as baweaver
baweaver has quit [Changing host]
baweaver has joined #ruby
Guest11009 has quit [Ping timeout: 265 seconds]
tdy has quit [Ping timeout: 276 seconds]
Swyper has joined #ruby
ellcs1 has quit [Ping timeout: 245 seconds]
Swyper has quit [Ping timeout: 245 seconds]
greengriminal has quit [Quit: Leaving]
banisterfiend has joined #ruby
blackmesa has joined #ruby
blackmesa1 has quit [Ping timeout: 264 seconds]
Cache_Money has joined #ruby
Swyper has joined #ruby
salinasc has joined #ruby
Retronoodle has joined #ruby
Swyper has quit [Remote host closed the connection]
DaRock has joined #ruby
Retronoodle has quit [Quit: Going offline, see ya! (www.adiirc.com)]