havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.2, 2.5.5, 2.4.5: 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!
orbyt_ has joined #ruby
Noxilex has quit [Ping timeout: 255 seconds]
kapil____ has quit [Quit: Connection closed for inactivity]
zachk has quit [Quit: Leaving]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
code_zombie has quit [Quit: Leaving]
hightower2 has quit [Ping timeout: 245 seconds]
renich has joined #ruby
gix has quit [Ping timeout: 246 seconds]
renich has quit [Ping timeout: 246 seconds]
renich has joined #ruby
houhoulis has joined #ruby
bjpenn has quit [Ping timeout: 245 seconds]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has quit [Read error: Connection reset by peer]
m27frogy has quit [Read error: Connection reset by peer]
mangold has quit [Quit: This computer has gone to sleep]
kapil____ has joined #ruby
grilix has quit [Ping timeout: 258 seconds]
Azure has quit [Remote host closed the connection]
Azure has joined #ruby
gell5 has joined #ruby
grilix has joined #ruby
m27frogy has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
gell5 has quit []
imadper` has joined #ruby
imadper has quit [Ping timeout: 246 seconds]
imadper` has quit [Ping timeout: 272 seconds]
arescorpio has joined #ruby
orbyt_ has quit [Ping timeout: 246 seconds]
renich has quit [Ping timeout: 250 seconds]
renich has joined #ruby
Francisco has joined #ruby
Fr4n has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
grvgr has quit [Quit: Connection closed for inactivity]
tdy2 has joined #ruby
tdy1 has quit [Ping timeout: 244 seconds]
bjpenn has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy3 has joined #ruby
teej has quit [Quit: Connection closed for inactivity]
Swyper has quit [Remote host closed the connection]
tdy2 has quit [Ping timeout: 246 seconds]
dviola has joined #ruby
uplime is now known as horselime
Swyper has joined #ruby
gigetoo has quit [Ping timeout: 245 seconds]
imadper has joined #ruby
dviola has quit [Quit: WeeChat 2.4]
cyberarm has quit [Ping timeout: 244 seconds]
arescorpio has quit [Quit: Leaving.]
teej has joined #ruby
postmodern has joined #ruby
Azure has quit [Ping timeout: 245 seconds]
mangold has joined #ruby
bjpenn has quit [Ping timeout: 246 seconds]
tdy3 is now known as tdy
segy has quit [Ping timeout: 246 seconds]
gigetoo has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
brool has quit [Ping timeout: 252 seconds]
segy has joined #ruby
bambanx has joined #ruby
houhoulis has quit [Remote host closed the connection]
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
sauvin has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
moei has joined #ruby
Nicmavr has joined #ruby
grilix has quit [Ping timeout: 245 seconds]
ur5us has quit [Remote host closed the connection]
stryek has quit [Quit: Connection closed for inactivity]
elcuervo has quit [Remote host closed the connection]
mic_mac has joined #ruby
mic_mac has quit [Quit: mic_mac]
mic_mac has joined #ruby
Devalo has joined #ruby
horselime is now known as uplime
Devalo has quit [Ping timeout: 246 seconds]
Swyper has quit [Remote host closed the connection]
bjpenn has joined #ruby
mic_mac has left #ruby [#ruby]
mic_mac has joined #ruby
dviola has joined #ruby
Inline has quit [Quit: Leaving]
renich_ has joined #ruby
reber has joined #ruby
renich has quit [Ping timeout: 255 seconds]
reber has quit [Remote host closed the connection]
laaron- has quit [Quit: ZNC 1.7.1 - https://znc.in]
reber has joined #ruby
renich_ is now known as renich
marz_d`ghostman has joined #ruby
<marz_d`ghostman> I'm working on an old rails project. Regarding this snippet https://gist.github.com/marzdgzmn/6b13cb8147c857d30f58b44c7a25497c Is this a ruby thing or a rails thing? Cause I'm testing it on irb and I'm getting an undefined method error
laaron has joined #ruby
i1nfusion has quit [Remote host closed the connection]
i1nfusion has joined #ruby
aufi has joined #ruby
skwurl has joined #ruby
<skwurl> hey fairly active around here?
hightower2 has joined #ruby
conta has joined #ruby
<skwurl> working on sinatra app here. if i use datamapper.auto_migrate!, is it still necessary to use .finalize
<skwurl> ?
Devalo has joined #ruby
nowhere_man has joined #ruby
gigetoo has quit [Ping timeout: 246 seconds]
mangold has quit [Quit: This computer has gone to sleep]
mangold has joined #ruby
hiroaki has quit [Ping timeout: 246 seconds]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
Devalo has quit [Ping timeout: 244 seconds]
gigetoo has joined #ruby
renich has quit [Quit: renich]
Dbugger has joined #ruby
aufi_ has joined #ruby
skwurl has quit [Quit: WeeChat 2.4]
aufi has quit [Ping timeout: 272 seconds]
r3m has quit [Quit: WeeChat 2.5-dev]
r3m has joined #ruby
mic_mac has quit [Quit: mic_mac]
tau has quit [Quit: k]
clemens3 has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
hahuang6| has joined #ruby
hahuang6- has quit [Ping timeout: 252 seconds]
dviola has quit [Quit: WeeChat 2.4]
i1nfusion has quit [Remote host closed the connection]
conta has quit [Quit: conta]
i1nfusion has joined #ruby
reber has quit [Remote host closed the connection]
clemens3 has quit [Ping timeout: 268 seconds]
jmcgnh has quit [Read error: Connection reset by peer]
jmcgnh has joined #ruby
voidwatch has joined #ruby
_joes_ has joined #ruby
grr12314 has quit [Remote host closed the connection]
grr12314 has joined #ruby
clemens3 has joined #ruby
andikr has joined #ruby
nowhere_man has quit [Ping timeout: 258 seconds]
SeepingN has quit [Read error: Connection reset by peer]
SeepingN has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #ruby
Noxilex has joined #ruby
Noxilex has quit [Client Quit]
schleppel has joined #ruby
postmodern has quit [Quit: Leaving]
TomyWork has joined #ruby
tdy has quit [Quit: WeeChat 1.9.1]
pabs has quit [Ping timeout: 244 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
stooj has quit [Ping timeout: 244 seconds]
pabs has joined #ruby
suukim has joined #ruby
stooj has joined #ruby
Dbugger has quit [Ping timeout: 264 seconds]
alexeev_ has joined #ruby
mangold has joined #ruby
ur5us has joined #ruby
hightower2 has quit [Changing host]
hightower2 has joined #ruby
segy has quit [Ping timeout: 245 seconds]
segy has joined #ruby
bambanx has quit [Quit: Leaving]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
GodFather has quit [Read error: Connection reset by peer]
GodFather has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
dan64 has joined #ruby
bjpenn has quit [Ping timeout: 272 seconds]
<leftylink> marz_d`ghostman: it doesn't look to me like anything in there is specifically rails
alem0lars has joined #ruby
<leftylink> &>> class C; attr_accessor :foo end; a = C.new; b = C.new; b.foo = 17; a.send("foo=", b.send("foo")); a.foo # marz_d`ghostman
<rubydoc> # => 17 (https://carc.in/#/r/6j54)
nakuku has joined #ruby
nakuku has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
alem0lars_ has joined #ruby
alem0lars has quit [Ping timeout: 245 seconds]
kapil____ has quit [Quit: Connection closed for inactivity]
voidwatch has quit [Ping timeout: 245 seconds]
ellcs has joined #ruby
bjpenn has joined #ruby
themsay has joined #ruby
bjpenn has quit [Ping timeout: 246 seconds]
dar123 has joined #ruby
deathwishdave has joined #ruby
Swyper has joined #ruby
gregf_ has joined #ruby
Swyper has quit [Ping timeout: 245 seconds]
rem_ has joined #ruby
Swyper has joined #ruby
Swyper has quit [Ping timeout: 244 seconds]
conta has joined #ruby
_joes_ has quit [Ping timeout: 250 seconds]
ebbflowgo has joined #ruby
_joes_ has joined #ruby
bjpenn has joined #ruby
Swyper has joined #ruby
dionysus69 has joined #ruby
ferr has quit [Quit: WeeChat 2.4]
bjpenn has quit [Ping timeout: 268 seconds]
Swyper has quit [Ping timeout: 246 seconds]
ur5us has quit [Remote host closed the connection]
Furai has quit [Quit: WeeChat 2.4]
Furai has joined #ruby
Swyper has joined #ruby
Swyper has quit [Ping timeout: 246 seconds]
ferr has joined #ruby
mangold has quit [Ping timeout: 252 seconds]
InfinityFye has joined #ruby
mangold has joined #ruby
_joes_ has quit [Ping timeout: 250 seconds]
mangold has quit [Client Quit]
conta has quit [Ping timeout: 255 seconds]
mangold has joined #ruby
bjpenn has joined #ruby
InfinityFye has left #ruby ["Leaving"]
<Cork> is it possible to alias a private method?
bjpenn has quit [Ping timeout: 250 seconds]
conta has joined #ruby
joast has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
fercell has joined #ruby
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
bjpenn has joined #ruby
fercell has left #ruby [#ruby]
laaron has joined #ruby
bjpenn has quit [Ping timeout: 250 seconds]
_joes_ has joined #ruby
<dionysus69> any ideas how BigDecimal "0.00626962" can become "0.006269620000000001" stored in rails pg decimal column?
hightower2 has quit [Ping timeout: 245 seconds]
ldnunes has joined #ruby
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
hightower2 has joined #ruby
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
_joes_ has quit [Ping timeout: 245 seconds]
<Cork> dionysus69: most likely cause of floating point in the decimal column
<Cork> phaul: hmm interesting... i get method undefined when i try
* Cork digs deeper...
alexeev_ has quit [Remote host closed the connection]
_joes_ has joined #ruby
alexeev has joined #ruby
alexeev has quit [Remote host closed the connection]
AJA4350 has joined #ruby
bjpenn has joined #ruby
bjpenn has quit [Ping timeout: 244 seconds]
Swyper has quit [Ping timeout: 246 seconds]
mangold has quit [Quit: This computer has gone to sleep]
imadper has quit [Remote host closed the connection]
_joes_ has quit [Ping timeout: 245 seconds]
rem_ has quit [Quit: rem_]
alexeev has joined #ruby
alexeev has quit [Ping timeout: 252 seconds]
alexeev has joined #ruby
bjpenn has joined #ruby
Azure has joined #ruby
bjpenn has quit [Ping timeout: 246 seconds]
hightower2 has quit [Ping timeout: 268 seconds]
dviola has joined #ruby
Swyper has joined #ruby
griffindy has joined #ruby
bmurt has joined #ruby
griffindy has quit [Ping timeout: 245 seconds]
noark9 has joined #ruby
ubuntuisloved has joined #ruby
ebbflowgo has quit [Remote host closed the connection]
_joes_ has joined #ruby
alexeev has quit [Remote host closed the connection]
ubuntuisloved has left #ruby ["Textual IRC Client: www.textualapp.com"]
Fridtjof has quit [Ping timeout: 246 seconds]
bjpenn has joined #ruby
bjpenn has quit [Ping timeout: 245 seconds]
lucasb has joined #ruby
griffindy has joined #ruby
agent_white has quit [Quit: bbl]
Emmanuel_Chanel has quit [Ping timeout: 250 seconds]
<dionysus69> Cork: meaning? I didn't really understand what is it caused by
alexeev has joined #ruby
<Cork> dionysus69: the database most likely stores the data as a floating point
<Cork> causing floating point errors
<dionysus69> ahh, I thought BigDecimal converted the input to string by default
<dionysus69> I didnt know BigDecimal(0.1) and BigDecimal("0.1") were different
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Cork> dionysus69: it does, (kinda) but it isn't bigdecimal cuasing the erorr
<Cork> databases has floating points too
<Cork> so depending on the column type you use, and the accuracy of that type you can get errors from there too
<dionysus69> just checked with factory bot just now, if I save dec as a string, it doesn't get that trailing dust
<dionysus69> the type is decimal, scale is 16
<dionysus69> precision 32
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Cork> dionysus69: you might want to have a read at this https://dev.mysql.com/doc/refman/5.7/en/precision-math-decimal-characteristics.html
bjpenn has joined #ruby
<Cork> posgress has a similar page if you use that
<dionysus69> ok I ll find pg one, thanks!
Emmanuel_Chanel has joined #ruby
<dionysus69> oh, decimal is name in rails, pg col type turns out is numeric(32,16)
bjpenn has quit [Ping timeout: 250 seconds]
segy has quit [Ping timeout: 244 seconds]
deathwishdave has joined #ruby
segy has joined #ruby
ferr has quit [Ping timeout: 244 seconds]
dviola has quit [Quit: WeeChat 2.4]
noark9 has quit [Ping timeout: 250 seconds]
dviola has joined #ruby
<alexeev> Is BigDecimal(0.1) and BigDecimal("0.1") are different? Why?
NeilCarvalho has joined #ruby
<Cork> 0.1 is a floating value in ruby
<Cork> so you get the floating point error
<Cork> "0.1" isn't
<Cork> so ya, you never want a dot value that isn't a tring given to BigDecimal
mangold has joined #ruby
t0xik has joined #ruby
<alexeev> yup, ok
hightower2 has joined #ruby
ferr has joined #ruby
Swyper has quit [Remote host closed the connection]
dviola has quit [Quit: WeeChat 2.4]
conta has quit [Ping timeout: 245 seconds]
mangold has quit [Ping timeout: 252 seconds]
reber has joined #ruby
waheedi has joined #ruby
conta has joined #ruby
Swyper has joined #ruby
bjpenn has joined #ruby
Swyper has quit [Ping timeout: 245 seconds]
dviola has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bjpenn has quit [Ping timeout: 250 seconds]
RedSnarf has joined #ruby
waheedi has quit [Quit: waheedi]
cyberarm has joined #ruby
brool has joined #ruby
rippa has joined #ruby
mangold has joined #ruby
Swyper has joined #ruby
Swyper has quit [Ping timeout: 245 seconds]
brool has quit [Ping timeout: 252 seconds]
Swyper has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
bjpenn has joined #ruby
Nicmavr has joined #ruby
Rapture has joined #ruby
hightower2 has quit [Changing host]
hightower2 has joined #ruby
grilix has joined #ruby
Brian-W-Gray has quit [Ping timeout: 252 seconds]
bjpenn has quit [Ping timeout: 250 seconds]
grilix has quit [Ping timeout: 244 seconds]
marz_d`ghostman has quit [Quit: Page closed]
grilix has joined #ruby
sergio_101 has joined #ruby
sergio_101 has left #ruby [#ruby]
polishdub has joined #ruby
cyberarm has quit [Ping timeout: 246 seconds]
dviola has quit [Quit: WeeChat 2.4]
hightower2 has quit [Ping timeout: 246 seconds]
cyberarm has joined #ruby
renich has joined #ruby
dar123 has joined #ruby
fnord__ has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
za1b1tsu has joined #ruby
dviola has joined #ruby
Swyper has joined #ruby
bjpenn has joined #ruby
renich has quit [Remote host closed the connection]
alem0lars_ has quit [Remote host closed the connection]
nowhere_man has joined #ruby
<al2o3-cr> &fake Faker::Beer.brand
<rubydoc> Guinness
alem0lars has joined #ruby
<al2o3-cr> hmmm, tasty!
RedSnarf has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stooj has quit [Ping timeout: 244 seconds]
stooj has joined #ruby
conta has quit [Ping timeout: 246 seconds]
iNs_ has quit [Remote host closed the connection]
iNs has joined #ruby
blaguvest has joined #ruby
grr12314 has quit [Remote host closed the connection]
deathwishdave has joined #ruby
dviola has quit [Quit: WeeChat 2.4]
dviola has joined #ruby
orbyt_ has joined #ruby
aufi_ has quit [Ping timeout: 245 seconds]
TomyWork has quit [Ping timeout: 246 seconds]
Inline has joined #ruby
Azure has joined #ruby
orbyt_ has quit [Ping timeout: 268 seconds]
_joes_ has quit [Ping timeout: 272 seconds]
Dbugger has joined #ruby
Swyper has quit [Remote host closed the connection]
renich has joined #ruby
polishdub has quit [Remote host closed the connection]
dviola has quit [Quit: WeeChat 2.4]
cyberarm has quit [Ping timeout: 255 seconds]
llua has quit [Remote host closed the connection]
Swyper has joined #ruby
llua has joined #ruby
Swyper has quit [Remote host closed the connection]
<keden> &fake Faker::Beer.brand
<rubydoc> Stella Artois
<keden> Meh
_joes_ has joined #ruby
Swyper has joined #ruby
ua has quit [Quit: Leaving]
polishdub has joined #ruby
Francisco has quit [Read error: Connection reset by peer]
Fr4n has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
NeilCarvalho has quit [Ping timeout: 268 seconds]
bjpenn has quit [Ping timeout: 245 seconds]
i1nfusion has quit [Remote host closed the connection]
i1nfusion has joined #ruby
ua has joined #ruby
CrazyEddy has joined #ruby
za1b1tsu has quit [Remote host closed the connection]
za1b1tsu has joined #ruby
[Butch] has joined #ruby
clemens3 has quit [Ping timeout: 250 seconds]
dinfuehr_ has joined #ruby
dinfuehr has quit [Ping timeout: 245 seconds]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
grilix has quit [Ping timeout: 250 seconds]
grilix has joined #ruby
Swyper has quit [Remote host closed the connection]
sauvin has quit [Read error: Connection reset by peer]
dinfuehr has joined #ruby
dinfuehr_ has quit [Ping timeout: 255 seconds]
joast has joined #ruby
Swyper has joined #ruby
Tempesta has quit [Ping timeout: 250 seconds]
andikr has quit [Remote host closed the connection]
deathwishdave has joined #ruby
bjpenn has joined #ruby
Swyper has quit [Remote host closed the connection]
deathwishdave has quit [Client Quit]
Fr4n has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
renich has quit [Ping timeout: 272 seconds]
renich_ has joined #ruby
jottr has joined #ruby
_joes_ has quit [Ping timeout: 246 seconds]
Swyper has quit [Remote host closed the connection]
dinfuehr_ has joined #ruby
dinfuehr has quit [Ping timeout: 246 seconds]
deathwishdave has joined #ruby
Swyper has joined #ruby
nowhere_man has quit [Ping timeout: 258 seconds]
Swyper has quit [Remote host closed the connection]
Noxilex has joined #ruby
Noxilex has quit [Client Quit]
iNs_ has joined #ruby
iNs has quit [Ping timeout: 256 seconds]
hightower2 has joined #ruby
Devalo has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has joined #ruby
za1b1tsu has quit [Ping timeout: 245 seconds]
Flyingdog has quit [Quit: Leaving]
Tempesta has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NeilCarvalho has joined #ruby
ravenous_ has joined #ruby
ravenous_ has quit [Client Quit]
renich_ has quit [Quit: renich_]
renich_ has joined #ruby
zachk has joined #ruby
zachk has quit [Read error: Connection reset by peer]
zachk has joined #ruby
zachk has joined #ruby
zachk has quit [Changing host]
zachk has quit [Max SendQ exceeded]
Azure has joined #ruby
zachk has joined #ruby
zachk has quit [Changing host]
zachk has joined #ruby
deathwishdave has joined #ruby
Swyper has quit [Remote host closed the connection]
zachk has quit [Max SendQ exceeded]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix has joined #ruby
orbyt_ has joined #ruby
Swyper has joined #ruby
lucasb has quit [Ping timeout: 252 seconds]
manveru has quit [Ping timeout: 252 seconds]
strmpnk has quit [Ping timeout: 252 seconds]
BuildTheRobots has quit [Ping timeout: 252 seconds]
teej has quit [Ping timeout: 252 seconds]
jhill has quit [Ping timeout: 252 seconds]
zipkid has quit [Ping timeout: 252 seconds]
dar123 has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
manveru has joined #ruby
G has quit [Ping timeout: 252 seconds]
BuildTheRobots has joined #ruby
Fire-Dragon-DoL has quit [Ping timeout: 250 seconds]
dumptruckman has quit [Ping timeout: 250 seconds]
dar123 has joined #ruby
G has joined #ruby
zipkid has joined #ruby
mikecmpbll has joined #ruby
jhill has joined #ruby
teej has joined #ruby
dumptruckman has joined #ruby
reber has quit [Remote host closed the connection]
Fire-Dragon-DoL has joined #ruby
SeepingN has joined #ruby
za1b1tsu has joined #ruby
strmpnk has joined #ruby
Swyper has quit [Remote host closed the connection]
c0dec has quit [Ping timeout: 250 seconds]
c0dec has joined #ruby
cow[moo] has joined #ruby
postmodern has joined #ruby
suukim has quit [Quit: Konversation terminated!]
kapil____ has joined #ruby
englishm_ has joined #ruby
mangold has quit [Ping timeout: 252 seconds]
themsay has quit [Ping timeout: 258 seconds]
themsay has joined #ruby
r3m has quit [Quit: WeeChat 2.5-dev]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
r3m has joined #ruby
cd has joined #ruby
waheedi has joined #ruby
englishm_ is now known as englishm
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta_ has quit [Ping timeout: 244 seconds]
<IGnorAND> Hi, I'm trying to parse a html page with nokogiri. I want an array where x is 3 - 23 and only the uneven numbers. @parse_page.css(".moduletable_rates").css(".rate-info").children[1].children[x].children[5].inner_text
<waheedi> IGnorAND: is that one question or two?
<IGnorAND> waheedi: My question is how do I get the array
<IGnorAND> map doesn't work since not all elements have a children[5]
<phaul> &>> ((3..23) % 2).to_a
<rubydoc> # => [3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23] (https://carc.in/#/r/6j7s)
Fridtjof has joined #ruby
ta_ has joined #ruby
<phaul> &>> 3.step(to:23, by: 2).to_a
<rubydoc> # => [3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23] (https://carc.in/#/r/6j7u)
<havenwood> IGnorAND: children[3..23]
<havenwood> oh, uneven (odd), gotcha
Devalo has quit [Remote host closed the connection]
<IGnorAND> phaul: I was able to do (3..23).step(2).to_a
Devalo has joined #ruby
<IGnorAND> phaul: but I have no clue how to place that in stead of the x
<havenwood> IGnorAND: how about mapping?
<havenwood> IGnorAND: #flat_map
ta_ has quit [Ping timeout: 245 seconds]
Inline has quit [Ping timeout: 264 seconds]
Devalo has quit [Ping timeout: 250 seconds]
anothertorusr has quit [Ping timeout: 245 seconds]
Inline has joined #ruby
<IGnorAND> havenwood: it still seems to take all numbers
<IGnorAND> I'll go read the doc a bit
Devalo has joined #ruby
<leftylink> wasn't sure what was meant by "it" in "it still seems to take all numbers", so if you didn't find an answer from the docs, maybe some example code
ur5us has joined #ruby
[Butch] has quit [Ping timeout: 246 seconds]
hahuang65_ has joined #ruby
rindolf has joined #ruby
<rindolf> hi all
hahuang65 has quit [Ping timeout: 245 seconds]
<al2o3-cr> hi, rindolf :)
<rindolf> al2o3-cr: sup?
<al2o3-cr> all good brotha!
<al2o3-cr> IGnorAND: is inner_text supposed to be inner_html?
<IGnorAND> al2o3-cr: don't think it matters
za1b1tsu has quit [Remote host closed the connection]
<al2o3-cr> nope, it doesn't
hahuang65 has joined #ruby
<IGnorAND> leftylink: the map function goes through every element of the array. I want @parse_page.css(".moduletable_rates").css(".rate-info").children[1].children[3].children[3].inner_text, @parse_page.css(".moduletable_rates").css(".rate-info").children[1].children[5].children[3].inner_text, @parse_page.css(".moduletable_rates").css(".rate-info").children[1].children[7].children[3].inner_text etc
code_zombie has joined #ruby
ta_ has joined #ruby
<al2o3-cr> IGnorAND: then iterate over it; (3..23).flat_map { |x| @parse_page.css(".moduletable_rates").css(".rate-info").children[1].children[x].children[3].inner_text }
<al2o3-cr> (2..23).step(2) ...
hahuang65_ has quit [Ping timeout: 246 seconds]
anothertorusr has joined #ruby
m27frogy has quit [Ping timeout: 272 seconds]
<al2o3-cr> IGnorAND: ?
<phaul> &>> ((3 .. 7) % 2).map { |x| "some.complicated.stuff[#{x}]" }.join(' ')
m27frogy has joined #ruby
<al2o3-cr> phaul: what happened?
rubydoc has quit [Ping timeout: 245 seconds]
<leftylink> *waves* what happened? / nothing link, we were just about to have a feast
<al2o3-cr> &fake Faker::Beer.brand
Swyper has joined #ruby
<al2o3-cr> oh, pinged timed out :(
<phaul> kernel panic
anothertorusr has quit [Ping timeout: 245 seconds]
<phaul> openbsd. don't ask
<al2o3-cr> phaul: we pray for you :p
m27frogy has quit [Ping timeout: 250 seconds]
<al2o3-cr> i sing a little prayer for phaul lol
m27frogy has joined #ruby
rubydoc has joined #ruby
<phaul> &fake Faker::Beer.brand
<rubydoc> Pabst Blue Ribbon
<phaul> that will do
<al2o3-cr> :)
<al2o3-cr> &fake Faker::Beer.brand
<rubydoc> Harp
<al2o3-cr> that stuff is shit!
<phaul> never heard of it
<phaul> ah irish lager
mikecmpbll has quit [Ping timeout: 245 seconds]
<rindolf> phaul: wow
mikecmpbll has joined #ruby
<phaul> &>> ((3 .. 7) % 2).map { |x| "some.complicated.stuff[#{x}]" }.join(' ') # IGnorAND
<rubydoc> # => "some.complicated.stuff[3] some.complicated.stuff[5] some.complicated.stuff[7]" (https://carc.in/#/r/6j8j)
waheedi has quit [Ping timeout: 272 seconds]
<al2o3-cr> phaul: i think it's brewed by guinness
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cthulchu has joined #ruby
cthu| has quit [Ping timeout: 250 seconds]
orbyt_ has quit [Quit: Textual IRC Client: www.textualapp.com]
noboruma_ has joined #ruby
anothertorusr has joined #ruby
<al2o3-cr> &fake Faker::Crypto.sha2
<rubydoc> parser error at position 0 around `f'
<al2o3-cr> &fake Faker::Crypto.md5
<rubydoc> parser error at position 0 around `f'
<al2o3-cr> oops
m27frogy has quit [Ping timeout: 255 seconds]
<phaul> number in method name. We had the exact same bug with class names.
* phaul sigh
<phaul> &ri md5
<rubydoc> parser error at position 0 around `r'
<al2o3-cr> oh
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
noboruma_ has quit [Quit: leaving]
alem0lars has quit [Ping timeout: 250 seconds]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
zachk has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
<phaul> &fake Faker::Crypto.sha2
<rubydoc> No suitable faker found. The list is at https://github.com/stympy/faker with the restriction that I need Classname.methodname.
<phaul> &fake Faker::Crypto.md5
<rubydoc> 02a7e855dd279b6d7b371fd6c7d28111
Devalo has quit [Ping timeout: 245 seconds]
<IGnorAND> al2o3-cr: ow, I didnt think of that. (3..23).step(2).map { |x| @parse_page.css(".moduletable_rates").css(".rate-info").children[1].children[x].children[1].inner_text } works amazing
ldnunes has quit [Quit: Leaving]
<IGnorAND> al2o3-cr: I was trying to place the (3..23).step(2) after map {}
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
TvL2386_ has quit [Ping timeout: 244 seconds]
m27frogy has joined #ruby
TvL2386 has joined #ruby
deathwishdave has joined #ruby
<al2o3-cr> &fake Faker::WorldCup.team
<rubydoc> Saudi Arabia
<al2o3-cr> phaul: it can't do method calls can it?
ivanskie has joined #ruby
<phaul> hopefully I haven't put in any security holes with this. class_name, method_name are just strings from the parser
sagax has quit [Ping timeout: 246 seconds]
<al2o3-cr> phaul: security holes?
waheedi has joined #ruby
<phaul> like inject `rm -rf /`
<al2o3-cr> phaul: nah, bro.
<phaul> one has to be cautious ...
<al2o3-cr> seriously, nothing to be worried about
<al2o3-cr> phaul: that won't do shit anyway these days.
Devalo has joined #ruby
Devalo has quit [Ping timeout: 255 seconds]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
laaron has joined #ruby
<phaul> &>> Class.send("x `ls -l` y")
<rubydoc> stderr: -e:2:in `<main>': undefined method `x `ls -l` y' for Class:Class (NoMethodError) (https://carc.in/#/r/6j93)
laaron has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: inabit. zz.]
laaron has joined #ruby
anothertorusr has quit [Ping timeout: 245 seconds]
Brainium has joined #ruby
waheedi has quit [Quit: waheedi]
laaron has quit [Client Quit]
laaron has joined #ruby
bambanx has joined #ruby
laaron has quit [Client Quit]
t0xik has quit [Quit: Connection closed for inactivity]
anothertorusr has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
moei has quit [Quit: Leaving...]
laaron has joined #ruby
anothertorusr has quit [Ping timeout: 245 seconds]
Eiam has quit [Ping timeout: 252 seconds]
Eiam has joined #ruby
j6p has joined #ruby
duderonomy has joined #ruby
Dbugger has quit [Ping timeout: 268 seconds]
grilix has quit [Ping timeout: 244 seconds]
<uplime> this might be a silly question, but if your app needs to create a system user, is there a more ruby/rails way than just sticking a shellscript in the project root and having that user run it beforehand?
<al2o3-cr> uplime: just run as root then drop privs?
<uplime> al2o3-cr: what does that have to do with creating the user?
<al2o3-cr> create user first
<al2o3-cr> uplime: why would you create a user in a script?
<uplime> yes, thats what i asked
<uplime> because its a user for the app, not a normal user
dviola has joined #ruby
<zenspider> uplime: WHY would you have it IN the app?
<uplime> zenspider: i'm asking where i should have it
<al2o3-cr> uplime: create it first.
NeilCarvalho has quit [Ping timeout: 245 seconds]
Brainium has quit [Quit: Konversation terminated!]
<zenspider> I wouldn't provide ANYTHING. Just say it is a requirement. Let them decide what is right for their OS
<uplime> create the user before creating the user?
<al2o3-cr> oh, i see.
<zenspider> otherwise you're asking for trouble, because every OS is just slightly different
<al2o3-cr> sorry, uplime
<uplime> i only need to support posix
<uplime> so its just adduser
<uplime> np al2o3-cr
<uplime> erm, not adduser, i'd have to look up the command
<al2o3-cr> useradd
<uplime> yeah
<zenspider> uplime: every time a nerd says "just", they're massively underestimated something
<al2o3-cr> just add two sugars to that coffee
<zenspider> eg... OSX is posix. There is no useradd.
<zenspider> guaranteed these aren't all the same for adding users: AIX, HP-UX, IRIX, EulerOS, macOS, Solaris, Tru64, UnixWare, QNX Neutrino, Inspur K-UX, INTEGRITY
<zenspider> also interesting that linux is only listed as mostly posix... yet I think most ppl think of it is a fully
griffindy has joined #ruby
<uplime> i know linux isn't POSIX complete, also you are correct, i thought useradd was indeed posix
<uplime> guess im mistaken
<uplime> i'll leave it up to the packagers then
<al2o3-cr> uplime: maybe, there isn't then
<al2o3-cr> doesn't actually looks like there is.
<uplime> yeah, i was sorely mistaken
<uplime> glad i asked first
<al2o3-cr> yeah, got me too that one.
polishdub has quit [Quit: leaving]
schleppel has quit [Quit: Konversation terminated!]
NeilCarvalho has joined #ruby
<miah> there are no user management tools in posix afaik. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html
laaron has quit [Remote host closed the connection]
<miah> newgrp is in there. maybe there is another list
renich has joined #ruby
laaron has joined #ruby
<miah> amazing how varied it is http://bhami.com/rosetta.html
renich_ has quit [Ping timeout: 272 seconds]
<al2o3-cr> newgrp is posix?
<al2o3-cr> so it is
D9 has joined #ruby
<miah> ya im confused at that too lol
<zenspider> yeah. it is a mess.
<zenspider> just never try to automate it... otherwise you reinvent puppet/chef/ansible/hell
<miah> been there done that (and i work for chef)
<miah> mostly im confused that there is no su or equivilent in there, but we have newgrp.
<miah> possibly related to how people used the systems previously compared to now, more group usage probably. i dont see very complex groups anymore
<miah> but ive never really "used" newgrp either, just good group permissions
ivanskie has quit [Quit: Textual IRC Client: www.textualapp.com]
hphhphhphhphhphh has joined #ruby
t0x has joined #ruby
postmodern has quit [Quit: Leaving]
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dar123 has joined #ruby
NeilCarvalho has quit [Remote host closed the connection]
dinfuehr has joined #ruby
dinfuehr_ has quit [Ping timeout: 245 seconds]