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 }
<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.
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]
<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
<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
<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]
<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]