havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.0, 2.7.2, 2.6.6: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
oneeggeach has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
s3nd1v0g1us has joined #ruby
_whitelogger has joined #ruby
TorpedoSkyline has quit [Ping timeout: 265 seconds]
<nakilon> is there a way to String#unpack lazily?
jonhg has joined #ruby
TomyLobo has quit [Read error: Connection reset by peer]
jonhg has quit [Ping timeout: 265 seconds]
cow[moo] has joined #ruby
alexherbo2 has quit [Ping timeout: 245 seconds]
jonhg has joined #ruby
Sina has quit [Quit: Connection closed for inactivity]
jonhg has quit [Ping timeout: 245 seconds]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
konsolebox has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
jonhg has joined #ruby
jonhg has quit [Ping timeout: 246 seconds]
cow[moo] has joined #ruby
nertzy has joined #ruby
Technodrome has joined #ruby
s3nd1v0g1us has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonhg has joined #ruby
jonhg has quit [Ping timeout: 245 seconds]
oneeggeach has quit [Quit: Leaving...]
oneeggeach has joined #ruby
GodFather has quit [Ping timeout: 264 seconds]
Swyper has joined #ruby
oneeggeach has quit [Quit: Leaving...]
cuerbot has joined #ruby
crawler_ has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
crawler has joined #ruby
elcuervo has quit [Ping timeout: 245 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ChmEarl has quit [Quit: Leaving]
jonhg has joined #ruby
jonhg has quit [Ping timeout: 245 seconds]
m27frogy has quit [Ping timeout: 246 seconds]
_whitelogger has joined #ruby
s3nd1v0g1us has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
konsolebox has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
StarOnD has joined #ruby
konsolebox has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
MalkbabY has quit [Remote host closed the connection]
MalkbabY_ has joined #ruby
MalkbabY_ is now known as MalkbabY
_whitelogger has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
Swyper has quit [Remote host closed the connection]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nofxx__ has joined #ruby
nofxx_ has quit [Ping timeout: 260 seconds]
MalkbabY has quit [Ping timeout: 256 seconds]
Technodrome has joined #ruby
MalkbabY has joined #ruby
Furai has quit [Quit: WeeChat 3.1]
Furai has joined #ruby
jonhg has joined #ruby
jonhg has quit [Ping timeout: 265 seconds]
s3nd1v0g1us has quit [Quit: Textual IRC Client: www.textualapp.com]
tpanarch1st_ has quit [Ping timeout: 265 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix- has quit [Ping timeout: 265 seconds]
MalkbabY has quit []
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
konsolebox has quit [Read error: Connection reset by peer]
hiroaki has quit [Ping timeout: 272 seconds]
konsolebox has joined #ruby
hiroaki has joined #ruby
jonhg has joined #ruby
teclator has joined #ruby
blackmesa has joined #ruby
blackmesa has quit [Client Quit]
jonhg has quit [Ping timeout: 265 seconds]
jonhg has joined #ruby
shtirlic has quit [Remote host closed the connection]
Rounin has joined #ruby
TomyWork has joined #ruby
ur5us has joined #ruby
iNs has quit [Ping timeout: 268 seconds]
iNs has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
StarOnD has quit [Ping timeout: 240 seconds]
Rudd0 has quit [Ping timeout: 260 seconds]
Guest81648 is now known as LW_Luna
LW_Luna is now known as aloy
englosh has joined #ruby
StarOnD has joined #ruby
shtirlic has joined #ruby
DTZUZU_ has joined #ruby
DTZUZU has quit [Ping timeout: 265 seconds]
rafadc_ has quit [Ping timeout: 256 seconds]
rafadc has joined #ruby
cthulchu_ has joined #ruby
fercell has joined #ruby
jenrzzz has joined #ruby
BTRE has quit [Ping timeout: 265 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
alexherbo2 has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
vondruch has quit [Ping timeout: 246 seconds]
konsolebox has quit [Read error: Connection reset by peer]
englosh has quit [Quit: Connection closed]
konsolebox has joined #ruby
Rudd0 has joined #ruby
infinityfye has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
cd has joined #ruby
teardown has quit [Remote host closed the connection]
konsolebox has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
teardown has joined #ruby
konsolebox has joined #ruby
vondruch has joined #ruby
roadt_ has joined #ruby
roadt__ has quit [Ping timeout: 246 seconds]
m27frogy has joined #ruby
gray-_-wolf has joined #ruby
<gray-_-wolf> Hello. Does bundler has support for S3? Or at least plugable transports so that I could write my own?
jenrzzz has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
yann-kaelig has joined #ruby
konsolebox has joined #ruby
SobiX has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
cd has quit [Read error: Connection reset by peer]
vondruch has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
StarOnD has quit [Quit: Connection closed]
alexherbo2 has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
jetchisel has joined #ruby
alexherbo2 has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
konsolebox has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
konsolebox has joined #ruby
alindeman has quit [Remote host closed the connection]
alindeman has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
Technodrome has joined #ruby
jenrzzz has joined #ruby
ua has quit [Ping timeout: 256 seconds]
ua has joined #ruby
Swyper has quit [Remote host closed the connection]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has joined #ruby
cow[moo] has joined #ruby
vondruch has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
ChmEarl has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
jenrzzz has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
NL3limin4t0r_afk is now known as NL3limin4t0r
DarthGandalf has quit [Remote host closed the connection]
konsolebox has joined #ruby
al2o3-cr has quit [Ping timeout: 256 seconds]
BTRE has joined #ruby
alexherbo2 has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby
GodFather has joined #ruby
DTZUZU has joined #ruby
vondruch has joined #ruby
DTZUZU_ has quit [Ping timeout: 264 seconds]
bvdw has quit [Quit: The Lounge - https://thelounge.chat]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bvdw has joined #ruby
Technodrome has joined #ruby
bvdw has quit [Client Quit]
bvdw has joined #ruby
jonhg has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
yann-kaelig has quit []
jonhg has joined #ruby
yann-kaelig has joined #ruby
Swyper has joined #ruby
jonhg has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
kinduff has quit [Quit: Ping timeout (120 seconds)]
kinduff has joined #ruby
Swyper has quit [Remote host closed the connection]
cow[moo] has quit [Ping timeout: 260 seconds]
jonhg has joined #ruby
jonhg has quit [Ping timeout: 245 seconds]
MalkbabY has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
jonhg has joined #ruby
DTZUZU_ has joined #ruby
konsolebox has joined #ruby
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
DTZUZU has quit [Ping timeout: 256 seconds]
jonhg has quit [Ping timeout: 264 seconds]
TorpedoSkyline has quit [Ping timeout: 264 seconds]
konsolebox has quit [Read error: Connection reset by peer]
jonhg has joined #ruby
TorpedoSkyline has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
konsolebox has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TorpedoSkyline has quit [Ping timeout: 264 seconds]
infinityfye has quit [Quit: Leaving]
ItsAboutToGoDown has joined #ruby
TomyWork has quit [Ping timeout: 258 seconds]
<User4588> Hi, I have an issue when using byebug, I get this error https://paste.debian.net/1189488/. When I do the same command inside `irb` or `rails c` I don't have any errors. Recently I updated my ruby version and rails version,
TomyWork has joined #ruby
<ItsAboutToGoDown> in this scenario, how could i extract the `name` of `:option_type`? i guess it's tricky since it's not an actual value but rather a variable pointing to an AR object? https://dpaste.org/i5ve -- i hope that made sense. anyway right now im getting `#<Spree::OptionType:0x0000050c922fed08>`
<havenwood> ItsAboutToGoDown: option_types.map { |type| type.fetch name }
<havenwood> ItsAboutToGoDown: I mean: :name
<havenwood> ItsAboutToGoDown: option_types.map { |type| type.fetch :name }
<havenwood> User4588: Have you tried?: gem pristine byebug
SobiX has quit [Ping timeout: 240 seconds]
cuerbot has quit [Read error: Connection reset by peer]
<havenwood> ItsAboutToGoDown: Or in Ruby 3: option_types.map { _1.fetch :name ]
elcuervo has joined #ruby
TorpedoSkyline has joined #ruby
<havenwood> ItsAboutToGoDown: Is that what you meant?
<havenwood> User4588: Does a pristine one work?
<ItsAboutToGoDown> hey there, *nice*
<User4588> havenwood I am investigating, here is the first results: https://paste.debian.net/1189491/
TorpedoSkyline has quit [Client Quit]
<nakilon> User4588 just put "\" before ";"
<nakilon> it depends on OS and Ruby version probably
<havenwood> nakilon: Why does a semicolon need escaping? Odd...
<nakilon> /shrug
<User4588> after `gem pristine byebug` https://paste.debian.net/1189492/ it reverts my ruby version
<nakilon> User4588 try "\\" since it's inside a string literal
<havenwood> User4588: Where do you see the version reverted?
<nakilon> can you add before both ; and the same time?
<nakilon> *at
<User4588> havenwood I now use ruby 3.1.0dev (2021-03-12T15:35:39Z master 722e6c1d04) [x86_64-darwin19] whereas before I had ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin19]
<havenwood> User4588: Make sure the `gem` command in your PATH is fromRuby 2.5.
<User4588> nakilon sorry my fault, it passes with both
<havenwood> User4588: See the issue I linked ^. Looks like a known byebug bug.
<havenwood> hellobug
<nakilon> I had it on ruby 2.3, macos too
<nakilon> it's old
<User4588> havenwood Thanks for the link
<User4588> havenwood lol
vondruch has quit [Quit: vondruch]
hiroaki has quit [Ping timeout: 264 seconds]
vondruch has joined #ruby
hiroaki has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
<nakilon> heh
<nakilon> leaving a folder opened has tripled the CPU usage
<nakilon> my program generates temporary images and Finder.app notices them appear and in reindexing all the stuff
<nakilon> I was wondering why cpulimit -l 25 is so hot and now spotted that it's also 35% for Finder.app
moldorcoder7 has quit [Read error: Connection reset by peer]
moldorcoder7 has joined #ruby
howdoi has joined #ruby
grvgr_ has joined #ruby
shaman42_ has joined #ruby
snapcase_ has joined #ruby
JanHebler[m]1 has joined #ruby
Hanma[m]1 has joined #ruby
turt2live1 has joined #ruby
grvgr has quit [Ping timeout: 265 seconds]
hiroaki has quit [Ping timeout: 265 seconds]
JanHebler[m] has quit [Ping timeout: 265 seconds]
Hanma[m] has quit [Ping timeout: 265 seconds]
turt2live has quit [Ping timeout: 265 seconds]
shaman42 has quit [Ping timeout: 265 seconds]
snapcase has quit [Ping timeout: 265 seconds]
grvgr_ is now known as grvgr
DTZUZU has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
DTZUZU_ has quit [Ping timeout: 246 seconds]
lightstalker has quit [Ping timeout: 246 seconds]
michael_mbp has quit [Ping timeout: 264 seconds]
yokel has quit [Ping timeout: 276 seconds]
konsolebox has quit [Ping timeout: 246 seconds]
dinfuehr has quit [Ping timeout: 246 seconds]
dinfuehr has joined #ruby
konsolebox has joined #ruby
lightstalker has joined #ruby
Swyper has joined #ruby
jenrzzz has joined #ruby
hiroaki has joined #ruby
TomyWork has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
konsolebox has quit [Read error: Connection reset by peer]
michael_mbp has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jenrzzz has joined #ruby
konsolebox has joined #ruby
<havenwood> M1 time?
prepend has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<nakilon> wat
jenrzzz_ has joined #ruby
mnathani has quit [Remote host closed the connection]
jenrzzz has quit [*.net *.split]
hiroaki has quit [*.net *.split]
howdoi has quit [*.net *.split]
spk has quit [*.net *.split]
lazypwny[m] has quit [*.net *.split]
Nightmare has quit [*.net *.split]
mnathani has joined #ruby
yann-kaelig has quit []
lazypwny[m] has joined #ruby
spk has joined #ruby
howdoi has joined #ruby
hiroaki has joined #ruby
Nightmare has joined #ruby
<hahuang65> is there a better way to express this (setA - setB).empty? <- that is... all of setA is in setB
<hahuang65> i guess superset?
michael_mbp has quit [Ping timeout: 246 seconds]
cyberarm has quit [Ping timeout: 240 seconds]
Cubixusin[m] has quit [Ping timeout: 240 seconds]
themsay[m] has quit [Ping timeout: 244 seconds]
jo-so has quit [Ping timeout: 244 seconds]
Hanma[m]1 has quit [Ping timeout: 241 seconds]
hkoot_hoot[m] has quit [Ping timeout: 241 seconds]
swann11[m] has quit [Ping timeout: 241 seconds]
Theora[m] has quit [Ping timeout: 268 seconds]
kktt007 has quit [Ping timeout: 249 seconds]
f3rno has quit [Ping timeout: 249 seconds]
leviduncan has quit [Ping timeout: 249 seconds]
yunta has quit [Ping timeout: 247 seconds]
PaulB[m] has quit [Ping timeout: 247 seconds]
JanHebler[m]1 has quit [Ping timeout: 264 seconds]
lazypwny[m] has quit [Ping timeout: 265 seconds]
jordanh has quit [Ping timeout: 268 seconds]
watzon has quit [Ping timeout: 268 seconds]
linuus[m] has quit [Ping timeout: 268 seconds]
hsiktas[m] has quit [Ping timeout: 268 seconds]
turt2live1 has quit [Ping timeout: 268 seconds]
tekk has quit [Ping timeout: 264 seconds]
Technodrome has joined #ruby
tekk has joined #ruby
<NL3limin4t0r> havenwood: "why does a semicolon need escaping" probably because byebug parses the line before Ruby does. It probably adds it's own commands on top of Ruby. Seems like byebug parser sees a semicolon as the end of a statement regardless of the context it is in. Meaning that `"toto;tata".split(";")` is passed to Ruby as `"toto` then `tata".split("` then `")`
michael_mbp has joined #ruby
<NL3limin4t0r> Using `"toto\;tata".split("\;")` escapes the semicolon in byebug context (not in the string), which will pass it to Ruby as `"toto;tata".split(";")`
split-brain has joined #ruby
<NL3limin4t0r> User4588: ^
<nakilon> at the same time it does not happen on Ubuntu
<NL3limin4t0r> hahuang65: If you are using Set (from the stdlib) `setA <= setB`
<NL3limin4t0r> ^ set A is a subset, or equal to set B
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
DTZUZU_ has joined #ruby
<hahuang65> NL3limin4t0r brilliant, thank you
DTZUZU has quit [Ping timeout: 245 seconds]
DarthGandalf has joined #ruby
<NL3limin4t0r> nakilon: I'm running Ubuntu and the byebug strangeness happens for me as well if I run the example. (RVM Ruby 2.5.8, byebug 9.1.0, Ubuntu 18.04.5 LTS)
<nakilon> NL3limin4t0r idk that was 2 years ago in the office where there were two rubyists -- me with macos and a guy with ubuntu
<nakilon> he wondered why I put those slashes ..D
yann-kaelig has joined #ruby
<NL3limin4t0r> Yeah, sometimes strange behaviour of gems leaves you with some strange code.
gray-_-wolf has quit [Quit: WeeChat 3.0]
<NL3limin4t0r> If the `;` are in the file it is probably fine, but when passed to the byebug command line it results in issues.
supercoven has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
Cubixusin[m] has joined #ruby
DTZUZU has joined #ruby
DTZUZU_ has quit [Ping timeout: 240 seconds]
* ItsAboutToGoDown checks out byebug :P
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<ItsAboutToGoDown> pretty neat!
<ItsAboutToGoDown> my ruby ecommerce store btw: https://dpaste.org/VxSv
Swyper has joined #ruby
jenrzzz_ has quit [Ping timeout: 246 seconds]
gray-_-wolf has joined #ruby
<nakilon> and btw, on current machine I don't have this issue; ruby 2.3.8p459 (2018-10-18 revision 65136) [x86_64-darwin18]
<nakilon> here no issue too: ruby 2.5.7p206 (2019-10-01 revision 67816) [x86_64-darwin18]
ChmEarl has quit [Read error: No route to host]
<ItsAboutToGoDown> havenwood: thank you so much for the `type.fetch`!
Ca1us has joined #ruby
Ca1us has quit [Changing host]
Ca1us has joined #ruby
seed0_ has joined #ruby
zofrex has quit [Ping timeout: 265 seconds]
voker57_ has joined #ruby
Net_ has joined #ruby
Junaos_ has joined #ruby
Caius has quit [Ping timeout: 256 seconds]
xMopx has quit [Ping timeout: 256 seconds]
Net has quit [Ping timeout: 256 seconds]
JasonO has quit [Ping timeout: 256 seconds]
voker57 has quit [Ping timeout: 256 seconds]
Junaos has quit [Ping timeout: 256 seconds]
Nowaker has quit [Read error: Connection reset by peer]
Gizmokid2005 has quit [Excess Flood]
seed0 has quit [Ping timeout: 256 seconds]
chamunks- has quit [Ping timeout: 256 seconds]
z4phod has quit [Ping timeout: 256 seconds]
jegade has quit [Ping timeout: 256 seconds]
Gizmokid2010 has joined #ruby
jegade_ has joined #ruby
Net_ is now known as Net
z4phod has joined #ruby
xMopx- has joined #ruby
gray-_-wolf has quit [Quit: WeeChat 3.0]
Gizmokid2010 is now known as Gizmokid2005
xMopx- is now known as xMopx
Nowaker has joined #ruby
JasonO has joined #ruby
zofrex has joined #ruby
chamunks has joined #ruby
gigetoo has quit [Ping timeout: 246 seconds]
Theora[m] has joined #ruby
jo-so has joined #ruby
PaulB[m] has joined #ruby
turt2live has joined #ruby
watzon has joined #ruby
swann11[m] has joined #ruby
kktt007 has joined #ruby
hsiktas[m] has joined #ruby
themsay[m] has joined #ruby
linuus[m] has joined #ruby
f3rno has joined #ruby
cyberarm has joined #ruby
jordanh has joined #ruby
lazypwny[m] has joined #ruby
JanHebler[m] has joined #ruby
leviduncan has joined #ruby
Hanma[m] has joined #ruby
yunta has joined #ruby
hkoot_hoot[m] has joined #ruby
ChmEarl has joined #ruby
gigetoo has joined #ruby
m27frogy_ has joined #ruby
tempate has quit [Ping timeout: 264 seconds]
NL3limin4t0r has quit [Ping timeout: 264 seconds]
jonhg has quit [Remote host closed the connection]
NL3limin4t0r has joined #ruby
m27frogy has quit [Ping timeout: 264 seconds]
joast has quit [Ping timeout: 264 seconds]
tempate has joined #ruby
tempate has quit [Changing host]
tempate has joined #ruby
jonhg has joined #ruby
s3nd1v0g1us has joined #ruby
<deimos_> why is this so slow? arr = Array.new(50000000) using a hash or a set to store 50m strings is equally slow
gix has joined #ruby
jonhg has quit [Ping timeout: 264 seconds]
<deimos_> ruby takes 35 minutes to allocate the memory on a amd epyc 7502P with 256gb of ram. the final ruby process takes about 19gb of ram once it's allocated
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
tempate has left #ruby [#ruby]
<nakilon> why not?
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<leftylink> &>> t = Time.now; Array.new(10**8); Time.now - t
<rubydoc> # => 0.73931453 (https://carc.in/#/r/ajr2)
<leftylink> since that only took < 1 second, there must be strange other circumstances if 50000000 takes 35 minutes
<leftylink> certainly carcinogen wouldn't have 256 gb of ram
<phaul> deimos_ says strings, although the code doesn't show it
<leftylink> ah. you are right. that does take up a bit more time
<leftylink> &>> t = Time.now; Array.new(10**6) { ?a }; Time.now - t
<rubydoc> # => 0.112402781 (https://carc.in/#/r/ajr7)
<leftylink> if I tried 10**7 instead, carcinogen rejects me because of time out
<leftylink> &>> t = Time.now; Array.new(10**7) { ?a }; Time.now - t
neshpion has joined #ruby
<rubydoc> # => playpen: timeout triggered! (https://carc.in/#/r/ajr8)
<phaul> yeah, I am guessing nil is just the immutable nil, so you would just point each contained object to the nil reference (which is prly just setting the flag of being nil) - but I'm speculating a lot here and I might be completely wrong
<phaul> &>> Array.new(10) { nil }.map(&:object_id)
<rubydoc> # => [8, 8, 8, 8, 8, 8, 8, 8, 8, 8] (https://carc.in/#/r/ajr9)
<deimos_> odd
<deimos_> on this desktop, it's 0.099 seconds to do the first Array.new(50000000)
<deimos_> on the server it's still going
<deimos_> i'm putting 50m ip addresses into an array to work with
<deimos_> i tried set, hash, array and they all perform about the same
<phaul> deimos_: are you doing Array.new(50000000) or your code is different. ^that code doesn't allocate strings
Technodrome has joined #ruby
<deimos_> i was trying to find ways to pre-allocate the memory for the array, so stuffing data into it would be faster
Ringtailed-Fox has joined #ruby
<Ringtailed-Fox> heya guys... i'm trying to install some gems, but i'm getting some strange errors.... https://dpaste.org/2CAc
<deimos_> i'm reading from a txt file on nvme disk, File.readlines("/path/to/csv") { |row| arr.push(row) }
<deimos_> which for some reason is faster than arr = File.readlines("/path/to/csv")
<phaul> deimos_: can you paste your code on dpaste? I have a feeling there are some mistakes there
<deimos_> i'm sure ;)
<phaul> but push appends.. so if you allocate an array of 50m nils. the next push will add the row at the 50m + 1 position
raj has quit [Ping timeout: 256 seconds]
raj__ has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
DTZUZU_ has joined #ruby
<deimos_> it's basically something like that
<deimos_> you're right, i forgot push appends
<deimos_> i don't have a csv of 50m ips hanging around to share
DTZUZU has quit [Ping timeout: 268 seconds]
<phaul> I would start thinking about changing the algorithm so I can avoid having all IP's in memory at the same time. Is stream based processing an option? Depends on what you are doing with the IPs
konsolebox has joined #ruby
<deimos_> for each ip in the array, i then lookup geoip info against an internal api
<adam12> Why load everything at once?
<deimos_> it's faster to pull all the data from the db, sort/unique/etc in ruby array/set and then lookup each against api THAN it is to do the sort/distinct in sql on the db server
<deimos_> and it's vastly faster than my first approach of select distinct into tmp table and then foreach the ip in result to geoip lookup
jenrzzz has joined #ruby
<deimos_> this is data from a CDN
<adam12> What database?
<deimos_> postgres
<deimos_> in reality, the best way would be to do the sort/unique in sql
<deimos_> but i'll work with what i have
<adam12> This is with inet column type? I’m surprised it’s so slow.
ByronJohnson has quit [Ping timeout: 260 seconds]
<deimos_> it's stored as string, unfortunately
<deimos_> or varchar really
<deimos_> the total table has like 100b ip addr in there, mostly ipv6 obviously
<deimos_> there's only 4b ipv4 addr possible
<adam12> That is indeed unfortunate.
<phaul> hm. while this is still the wrong approach, as one shouldn't allocate 50m objects in a process - here's an idea: you could convert the programs IP representation to 32 bit integers. Allocating the ints should be as fast as allocating nils.
<adam12> I’d still try to keep it in postgres. Maybe add an inet column with a trigger that updates the inet column on update. But that’s just me.
<adam12> An interesting problem tho.
epstein has joined #ruby
<deimos_> yeah, i'm looking at total time to complete from start to finish
<epstein> is there a ruby interpreter here?
<deimos_> in the db, it does work, but the whole process takes 120 hours. doing it in ruby, it takes 80 hours
<phaul> adam12: I agree, I would try to solve it by other means, but ^ might be a way if we are not allowed to do in the DB
<epstein> > puts "hi"
jenrzzz has quit [Ping timeout: 264 seconds]
<phaul> epstein: &>>
jonhg has joined #ruby
<epstein> &>> puts "hi"
Swyper has quit [Remote host closed the connection]
<rubydoc> # => hi... check link for more (https://carc.in/#/r/ajrk)
<deimos_> the real answer would be to get a dump of the geoip tables from the API service into the psql db and then it's all just joins
<epstein> &>> puts "UPGRADE TO PYTHON LOSERS"
<rubydoc> # => UPGRADE TO PYTHON LOSERS... check link for more (https://carc.in/#/r/ajrl)
<deimos_> all that to troll
<phaul> sigh
<deimos_> on my desktop, that dpaste takes 415.57914488 s
Swyper has joined #ruby
<deimos_> unrelated: dpaste.org is going to be terminated March 31, 2021. So Long, and Thanks for All the Fish. 🙏
ByronJohnson has joined #ruby
<adam12> deimos_: Good to know. But how do you know?
Swyper has quit [Remote host closed the connection]
<deimos_> it's a message on the bottom of the dpaste page
<epstein> why are they shutting down dpaste?
<epstein> paste.debian.net is good
<deimos_> epstein: because it runs python and not ruby
<epstein> fuck!
<epstein> maybe i should host one
<epstein> i guess there's literally nothing to gain from running such a service
<epstein> - like, monetarily. as a broke person
<epstein> i'm a hobo
<epstein> - of course i want to give back to my rubies
<adam12> epstein: You get to receive all the abuse reports! Hurrah!
DTZUZU has joined #ruby
<epstein> ah, right, all the illegal material stuffs
<epstein> i can run some regex on the input to check that it's mostly code :P
<epstein> epstein.paste.xxx
<epstein> who's with me?
<epstein> it'll be like 9000 lines of ruby or 10 lines of py
jess has joined #ruby
gray-_-wolf has joined #ruby
DTZUZU_ has quit [Ping timeout: 245 seconds]
Ringtailed-Fox has quit [Read error: Connection reset by peer]
jonhg has quit [Ping timeout: 264 seconds]
<adam12> epstein: Sure, but is that Python 3 or Python 2.7?
<deimos_> it's far more than 10 lines of py, https://github.com/bartTC/dpaste
Ringtailed-Fox has joined #ruby
<epstein> i'm still on 2.5
<epstein> i'm never upgrading
<epstein> according to my benchmarks, it beats 3.7, and the gap is growing
<epstein> seriously
<epstein> why are they shutting down dpaste?
ur5us has joined #ruby
supercoven has quit [Ping timeout: 268 seconds]
<epstein> i live another day
<epstein> so what is cool about ruby, i'm not even being lame
<epstein> i tried it 12 yrs ago
<phaul> Flexible and expressive syntax. Being fully reflexive for metaprogramming. It's object model that's inhereted from Smalltalk. These are the things that I like about it, but it's subjective
m27frogy_ has quit [*.net *.split]
weaksauce has quit [*.net *.split]
BTRE has quit [*.net *.split]
jordanm has quit [*.net *.split]
ErhardtMundt has quit [*.net *.split]
banisterfiend has quit [*.net *.split]
^ has quit [*.net *.split]
shortdudey123 has quit [*.net *.split]
hagebake has quit [*.net *.split]
dorian has quit [*.net *.split]
thebetrayer has quit [*.net *.split]
eldritch has quit [*.net *.split]
booboy has quit [*.net *.split]
tinco has quit [*.net *.split]
tabakhase has quit [*.net *.split]
liKe2k1- has quit [*.net *.split]
void09 has quit [*.net *.split]
m27frogy_ has joined #ruby
shortdudey123 has joined #ruby
banisterfiend has joined #ruby
booboy has joined #ruby
weaksauce has joined #ruby
BTRE has joined #ruby
tinco has joined #ruby
jordanm has joined #ruby
dorian has joined #ruby
ErhardtMundt has joined #ruby
hagebake has joined #ruby
thebetrayer has joined #ruby
liKe2k1- has joined #ruby
void09 has joined #ruby
<epstein> ruby is the one lang i haven't been curious to try just because i can do the same things already. same with go, but supposedly go has something to offer. dunno what
<epstein> but goes for many langs ofc
^ has joined #ruby
<epstein> how is the std lib and libs in general cmp to py?
<epstein> - and package management, like pip, venv, etc
ErhardtMundt has quit [Ping timeout: 256 seconds]
Swyper has joined #ruby
tabakhase has joined #ruby
ErhardtMundt has joined #ruby
split-brain has quit [Remote host closed the connection]
eldritch has joined #ruby
jenrzzz has joined #ruby
banisterfiend has quit [Ping timeout: 256 seconds]
banisterfiend has joined #ruby
<adam12> epstein: I’d say stdlib is reasonably equal, tho Ruby’s webserver is being shipped as a package now.
<adam12> epstein: I find package management much more sane. Everyone basically uses bundler.
<adam12> epstein: Not sure the benefit of switching to Ruby from Python. If anything you’d probably want a statically compiled static typed language like Nim to compliment your existing language. I would think.
epst3in has joined #ruby
epstein has quit [Ping timeout: 264 seconds]
epst3in has quit [K-Lined]
jordanm has quit [Ping timeout: 256 seconds]
jonhg has joined #ruby
jordanm has joined #ruby
Swyper has quit [Remote host closed the connection]
konsolebox has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
meerohar has joined #ruby
shortdudey123 has quit [Ping timeout: 256 seconds]
shortdudey123 has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
konsolebox has joined #ruby
BTRE has quit [Ping timeout: 256 seconds]
RougeR has joined #ruby
Swyper has quit [Remote host closed the connection]
BTRE has joined #ruby
englosh has joined #ruby
Swyper has joined #ruby
Rudd0^ has joined #ruby
Swyper has quit [Remote host closed the connection]
periode has joined #ruby
periode has quit [Client Quit]
Rudd0 has quit [Ping timeout: 264 seconds]
meerohar has quit [Remote host closed the connection]
meerohar has joined #ruby
meerohar has quit [Remote host closed the connection]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
konsolebox has quit [Read error: Connection reset by peer]
fercell has quit [Ping timeout: 256 seconds]
ferr_ has joined #ruby
konsolebox has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
gray-_-wolf has quit [Ping timeout: 265 seconds]
gray-_-wolf has joined #ruby
shalok_ has joined #ruby
konsolebox has joined #ruby
s3nd1v0g1us has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cthulchu_ has quit [Ping timeout: 256 seconds]
Technodrome has joined #ruby
_whitelogger has joined #ruby
_whitelogger has joined #ruby
_whitelogger__ has joined #ruby
_whitelogger_ has joined #ruby
_whitelogger_ has joined #ruby
_whitelogger_ has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
konsolebox has quit [Read error: Connection reset by peer]
konsolebox has quit [Read error: Connection reset by peer]
Ringtailed-Fox has quit [Read error: Connection reset by peer]
Ringtailed-Fox has quit [Read error: Connection reset by peer]
Ringtailed-Fox has quit [Read error: Connection reset by peer]
Ringtailed-Fox has joined #ruby
Ringtailed-Fox has joined #ruby
Ringtailed-Fox has joined #ruby
englosh has quit [Quit: Connection closed]
englosh has quit [Quit: Connection closed]
englosh has quit [Quit: Connection closed]
konsolebox has joined #ruby
konsolebox has joined #ruby
konsolebox has joined #ruby
kinduff has quit [Quit: Ping timeout (120 seconds)]
kinduff has quit [Quit: Ping timeout (120 seconds)]
kinduff has quit [Quit: Ping timeout (120 seconds)]
kinduff has joined #ruby
kinduff has joined #ruby
kinduff has joined #ruby
Rounin has quit [Ping timeout: 260 seconds]
Rounin has quit [Ping timeout: 260 seconds]
Rounin has quit [Ping timeout: 260 seconds]
sombra has joined #ruby
sombra has joined #ruby
sombra has joined #ruby
sombra is now known as Guest79218
sombra is now known as Guest79218
sombra is now known as Guest79218
aloy has quit [Ping timeout: 258 seconds]
aloy has quit [Ping timeout: 258 seconds]
aloy has quit [Ping timeout: 258 seconds]
Dweezahr has quit [Ping timeout: 260 seconds]
Dweezahr has quit [Ping timeout: 260 seconds]
Dweezahr has quit [Ping timeout: 260 seconds]
Ringtailed-Fox has quit [Read error: Connection reset by peer]
Ringtailed-Fox has quit [Read error: Connection reset by peer]
Ringtailed-Fox has quit [Read error: Connection reset by peer]
Dweezahr has joined #ruby
Dweezahr has joined #ruby
Dweezahr has joined #ruby
Ringtailed-Fox has joined #ruby
Ringtailed-Fox has joined #ruby
Ringtailed-Fox has joined #ruby
havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.0, 2.7.2, 2.6.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.0, 2.7.2, 2.6.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.0, 2.7.2, 2.6.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3
lockweel has joined #ruby
lockweel has joined #ruby
lockweel has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
ur5us has quit [Ping timeout: 264 seconds]
ur5us has quit [Ping timeout: 264 seconds]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has quit [Remote host closed the connection]
MalkbabY has joined #ruby
MalkbabY has joined #ruby
MalkbabY has joined #ruby
ur5us has joined #ruby
ur5us has joined #ruby
ur5us has joined #ruby
konsolebox has quit [Read error: Connection reset by peer]
konsolebox has quit [Read error: Connection reset by peer]
konsolebox has quit [Read error: Connection reset by peer]