jhass[m] changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
giorgian has quit [Ping timeout: 260 seconds]
giorgian has joined #ruby
giorgian has quit [Ping timeout: 260 seconds]
Starfoxxes has quit [Ping timeout: 240 seconds]
Starfoxxes has joined #ruby
shiru has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 256 seconds]
shiru has quit [Quit: Lost terminal]
shiru has joined #ruby
Rounin has quit [Ping timeout: 252 seconds]
giorgian has joined #ruby
jhawthorn has quit [Quit: ZNC 1.8.2 - https://znc.in]
giorgian has quit [Ping timeout: 276 seconds]
jhawthorn has joined #ruby
yxhuvud has quit [Ping timeout: 260 seconds]
yxhuvud has joined #ruby
hanzo has joined #ruby
libsys has quit [Remote host closed the connection]
libsys has joined #ruby
libsys has quit [Ping timeout: 260 seconds]
shiru has quit [Quit: leaving]
Al2O3 has joined #ruby
giorgian has joined #ruby
Ziyan has joined #ruby
emcb542 has joined #ruby
jpn has joined #ruby
giorgian has quit [Ping timeout: 256 seconds]
emcb54 has quit [Ping timeout: 260 seconds]
emcb542 is now known as emcb54
jpn has quit [Ping timeout: 256 seconds]
libsys has joined #ruby
swaggboi has quit [Ping timeout: 240 seconds]
Glitch85678 has joined #ruby
swaggboi has joined #ruby
SteveR has joined #ruby
giorgian has joined #ruby
giorgian has quit [Ping timeout: 248 seconds]
SteveR has quit [Ping timeout: 252 seconds]
jpn has joined #ruby
jpn has quit [Ping timeout: 248 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
giorgian has joined #ruby
giorgian has quit [Ping timeout: 260 seconds]
seabre has quit [Ping timeout: 248 seconds]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
seabre has joined #ruby
z4kz has joined #ruby
giorgian has joined #ruby
z4kz has quit [Ping timeout: 252 seconds]
giorgian has quit [Ping timeout: 276 seconds]
foxhole_ has quit [Remote host closed the connection]
CrazyEddy has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 250 seconds]
Sankalp has quit [Ping timeout: 248 seconds]
szkl has quit [Quit: Connection closed for inactivity]
roadie has joined #ruby
gr33n7007h has quit [Ping timeout: 248 seconds]
giorgian has joined #ruby
gr33n7007h has joined #ruby
giorgian has quit [Ping timeout: 260 seconds]
slothby has quit [Quit: brb ... maybe]
giorgian has joined #ruby
teclator has joined #ruby
hanzo has quit [Quit: Connection closed for inactivity]
jpn has joined #ruby
Sankalp has joined #ruby
jpn has quit [Ping timeout: 256 seconds]
jpn has joined #ruby
Sankalp has quit [Read error: Connection reset by peer]
Sankalp has joined #ruby
joast has quit [Ping timeout: 250 seconds]
jpn has quit [Ping timeout: 260 seconds]
szkl has joined #ruby
Rounin has joined #ruby
ua_ has quit [Ping timeout: 256 seconds]
Glitch85678 has quit []
Glitch85678 has joined #ruby
Ziyan has quit [Ping timeout: 276 seconds]
rahl has joined #ruby
<rahl> I decided to try mdless, so ran `gem26 install mdless` (I had no `gem`) - running on OpenBSD 6.8
<rahl> upon trying to then uninstall it with `gem26 uninstall mdless`, it appeared successful, but there are remnants remaining
Ziyan has joined #ruby
<rahl> including `/usr/ocal/bin/mdless26` which now just crashes (obviously some things were removed but not others)
<rahl> How might I go about cleaning this up?
ur5us has joined #ruby
yossarian has quit [Ping timeout: 240 seconds]
yossarian has joined #ruby
yossarian has joined #ruby
yossarian has quit [Changing host]
kjetilho has joined #ruby
<kjetilho> I have some code here using Resolv.each_address - but that function does not follow CNAME records. what is the recommended fix?
Thanzex has quit [Ping timeout: 248 seconds]
ssh073 has quit [Remote host closed the connection]
ssh073 has joined #ruby
roadie has quit [Ping timeout: 252 seconds]
jmcgnh has quit [Ping timeout: 246 seconds]
jmcgnh has joined #ruby
roadie has joined #ruby
roadie` has joined #ruby
roadie has quit [Remote host closed the connection]
dionysus69 has joined #ruby
ssh073 has quit [Remote host closed the connection]
ssh073 has joined #ruby
_ht has joined #ruby
brw0 has joined #ruby
mjacob has quit [Ping timeout: 256 seconds]
mjacob has joined #ruby
brw has quit [Ping timeout: 256 seconds]
brw0 is now known as brw
Sankalp has quit [Ping timeout: 248 seconds]
Sankalp has joined #ruby
jpn has joined #ruby
ssh073 has quit [Ping timeout: 240 seconds]
Thanzex has joined #ruby
ua_ has joined #ruby
oxfuxxx has joined #ruby
roadie` has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
oxfuxxx has quit [Ping timeout: 256 seconds]
ssh073 has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Remote host closed the connection]
Ziyan has quit [Ping timeout: 260 seconds]
Ziyan has joined #ruby
smp has quit [Ping timeout: 260 seconds]
smp has joined #ruby
John_Ivan has quit [Read error: Connection reset by peer]
protektwar has quit [Ping timeout: 260 seconds]
John_Ivan has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
smp_ has joined #ruby
smp has quit [Ping timeout: 260 seconds]
smp_ is now known as smp
perrierjouet has quit [Ping timeout: 248 seconds]
giorgian has quit [Ping timeout: 248 seconds]
giorgian has joined #ruby
_ht has quit [Remote host closed the connection]
_ht has joined #ruby
phryk has quit [Read error: Connection reset by peer]
phryk has joined #ruby
ssh0734 has joined #ruby
ssh073 has quit [Ping timeout: 240 seconds]
ssh0734 is now known as ssh073
szkl has quit [Quit: Connection closed for inactivity]
<rahl> Is there a good way to clean up after gem uninstall leaves remnants?
<rahl> I've been reading around, but not yet found anything useful
Bish has joined #ruby
<Bish> can i make unicorn not force me to use .ru endings?
<leah2> i'm sorry
gr33n7007h has quit [Ping timeout: 256 seconds]
<Bish> leah2: don't be
<leah2> but you can start unicorn yourself maybe?
<Bish> that's what i am trying to do, but it really likes that .ru ending
<Bish> i mean i could read the code and write my own, but that sounds stupid
gr33n7007h has joined #ruby
brown121407 has left #ruby [#ruby]
Ziyan has quit [Ping timeout: 256 seconds]
Ziyan has joined #ruby
<leah2> what's the problem with .ru?
<Bish> i don't know i have an obession with ignore .filenedings
<Bish> since i left from windows
<Bish> and i hate every software that uses them
<leah2> shouldnt just passing another file name work oO
<Bish> you don't seem to have read my original question
<Bish> unicorn some_file.ru works
<leah2> and unicorn foo.rb doesnt?
<Bish> unicorn some_file doesn't work while being the same file
<leah2> i see
<leah2> still could work tho i think
<Bish> yeah not that way atleast
<leah2> hm, require doesnt load a pure path does it
<Bish> looks like it
<Bish> bleh, this is really stupid
Guest81 has joined #ruby
Guest81 has quit [Client Quit]
entropie has quit [Quit: ""]
entropie has joined #ruby
twosuns has joined #ruby
totoro has joined #ruby
Guest19 has joined #ruby
Guest19 has quit [Client Quit]
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
Ziyan_ has joined #ruby
<adam12> Morning
moldorcoder7 has quit [Ping timeout: 248 seconds]
Ziyan has quit [Ping timeout: 256 seconds]
moldorcoder7 has joined #ruby
twosuns has quit [Quit: ...]
<adam12> https://github.com/rubygems/rfcs/pull/40 Interesting stuff...
bit4bit has joined #ruby
Ziyan_ has quit [Ping timeout: 252 seconds]
Ziyan has joined #ruby
<leah2> one day i'll write a big rant how to write a package manager :p
slothby has joined #ruby
cocalero has joined #ruby
hololeap_ has quit [Ping timeout: 240 seconds]
Ziyan has quit [Ping timeout: 276 seconds]
Ziyan has joined #ruby
bit4bit has quit [Ping timeout: 256 seconds]
hololeap_ has joined #ruby
hololeap_ has quit [Ping timeout: 240 seconds]
___nick___ has joined #ruby
hololeap_ has joined #ruby
Guest72 has joined #ruby
Guest72 has quit [Client Quit]
jpn has quit [Ping timeout: 250 seconds]
jpn has joined #ruby
oxfuxxx has joined #ruby
<adam12> leah2: heh
<adam12> I like the approach that Eventide uses, tho not all names elegantly transpose as theirs do. https://rubygems.org/search?query=evt-
<adam12> They clobber global namespace on some too, which is unfortunate. I know they plan on them being used for Eventide but it would still be nice to not have them all at the top.
oxfuxxx has quit [Ping timeout: 252 seconds]
Ziyan has quit [Ping timeout: 248 seconds]
Ziyan has joined #ruby
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
roadie has joined #ruby
Ziyan has quit [Ping timeout: 260 seconds]
Ziyan has joined #ruby
<rapha> the parallel gem is nice, but DB=Sequel.connect('sqlite://23GB_of_text.sqlite3');something=Parallel.map(DB[:table].all){|rows| do_stuff} will have to read the whole 23GB into memory _first_ before it can begin with do_stuff. Is there a way to have it start doing stuff _while_ it's still reading the data, at least as fast as the data will come in?
sgt_chuckles has joined #ruby
Ziyan has quit [Ping timeout: 256 seconds]
Ziyan has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
cocalero has quit [Quit: Going offline, see ya! (www.adiirc.com)]
hanzo has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
giorgian has quit [Ping timeout: 260 seconds]
Ziyan has quit [Ping timeout: 248 seconds]
<leah2> use .each?
<leah2> instead of .all
Ziyan has joined #ruby
<leah2> or just pass the DB to Parallel.map i guess
giorgian has joined #ruby
<ox1eef> a lazy Enumerator comes to mind.
Ziyan has quit [Ping timeout: 260 seconds]
<sgt_chuckles> im trying to scaffold a new package in my rails app with `rails g package package_name` but I get an error saying: "Could not find mysql2-0.5.3 in any of the sources. Run `bundle install` to install missing gems."
Ziyan has joined #ruby
<sgt_chuckles> When I run bundle install, I get another error saying: "An error occurred while installing mysql2 (0.5.3), and Bundler cannot continue.
<sgt_chuckles> Make sure that `gem install mysql2 -v '0.5.3'` succeeds before bundling."
<sgt_chuckles> when i run that, i get another error message -_-
<sgt_chuckles> lost for ideas here
<ox1eef> what platform are you on? it sounds like the mysql native extension is probably failing to build.
<sgt_chuckles> im on macos
<ox1eef> i dunno about macos
gr33n7007h has quit [Ping timeout: 256 seconds]
giorgian has quit [Ping timeout: 240 seconds]
sgt_chuckles has quit [Quit: Client closed]
sgt_chuckles has joined #ruby
<havenwood> sgt_chuckles: Have you install mysql?
<havenwood> Not the gem, the DB?
<sgt_chuckles> how do i know if i have it?
<havenwood> sgt_chuckles: brew install mysql
<sgt_chuckles> thing is, im using a remote db, so i don't think i need?
noname has joined #ruby
<havenwood> I mean, you can ask brew if it's installed, but betcha it isn't.
<ox1eef> you need mysql-client at least
<havenwood> sgt_chuckles: the gem needs the library headers
<sgt_chuckles> aah, i see
<sgt_chuckles> okay, im installing now
Ziyan has quit [Ping timeout: 248 seconds]
Sankalp has quit [Ping timeout: 260 seconds]
Ziyan has joined #ruby
<sgt_chuckles> So when I try running `rails g package echo` again, I get: "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) (Mysql2::Error::ConnectionErr"
oxfuxxx has joined #ruby
<havenwood> sgt_chuckles: You'd have to be running MySQL to connect to it.
<havenwood> You have to install MySQL to build the gem extension and you have to run MYSQL to connect.
<havenwood> Make sure you can connect to the DB without Ruby first and the Ruby part should be easy.
<havenwood> (from this machine)
Sankalp has joined #ruby
giorgian has joined #ruby
jpn has joined #ruby
oxfuxxx has quit [Client Quit]
graywolf has joined #ruby
jpn has quit [Ping timeout: 276 seconds]
giorgian has quit [Ping timeout: 276 seconds]
noname has quit [Quit: Leaving]
<adam12> I must be out of Rails a while now because I don't recall rail g package..
giorgian has joined #ruby
Ziyan has quit [Ping timeout: 260 seconds]
Ziyan has joined #ruby
protektwar has quit [Ping timeout: 240 seconds]
giorgian has quit [Ping timeout: 248 seconds]
<weaksauce> i don't think that's standard adam12
<weaksauce> probably a gem
hololeap_ has quit [Ping timeout: 240 seconds]
hololeap_ has joined #ruby
giorgian has joined #ruby
giorgian has quit [Ping timeout: 260 seconds]
Inoperable has quit [Quit: All your buffer are belong to us!]
Ziyan has quit [Ping timeout: 248 seconds]
Ziyan has joined #ruby
giorgian has joined #ruby
Inoperable has joined #ruby
hololeap_ has quit [Remote host closed the connection]
giorgian has quit [Ping timeout: 246 seconds]
hololeap_ has joined #ruby
dionysus69 has joined #ruby
Ziyan has quit [Ping timeout: 256 seconds]
Ziyan has joined #ruby
giorgian has joined #ruby
jpn has joined #ruby
Buggys has quit [Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in]
Buggys- has joined #ruby
hololeap_ has quit [Ping timeout: 240 seconds]
hololeap_ has joined #ruby
Buggys- has left #ruby [#ruby]
Buggys- has joined #ruby
quintasan has quit []
quintasan has joined #ruby
quintasan has quit [Client Quit]
quintasan has joined #ruby
Ziyan has quit [Ping timeout: 246 seconds]
Buggys- has left #ruby [Textual IRC Client: www.textualapp.com]
Ziyan has joined #ruby
hololeap_ has quit [Ping timeout: 240 seconds]
hololeap_ has joined #ruby
Ziyan has quit [Quit: Textual IRC Client: www.textualapp.com]
Buggys has joined #ruby
_ht has quit [Remote host closed the connection]
___nick___ has quit [Ping timeout: 276 seconds]
jpn has quit [Ping timeout: 252 seconds]
hololeap_ has quit [Ping timeout: 240 seconds]
hololeap_ has joined #ruby
hanzo has quit [Quit: Connection closed for inactivity]
mixfix41 has joined #ruby
sgt_chuckles has quit [Quit: Client closed]
graywolf has quit [Quit: WeeChat 3.5]
<rapha> leah2: wait, how does that work ... passing the DB to Parallel.map? Using .each was the thing I first thought about, but it doesn't work like that ('LocalJumpError: no block given (yield)'). And there's a bigger problem anyways as the stuff inside of the Parallel.map doesn't fit into memory, apparently not even into 64GB of it.
* rapha starts reading up on lazy enumerators
apotheon has left #ruby [#ruby]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
<havenwood> rapha: Usually you'd use batches for that kinda thing. In Rails it's #find_by or something like #paged_each in Sequel. https://www.rubydoc.info/github/jeremyevans/sequel/Sequel%2FDataset:paged_each
<havenwood> rapha: the idea is that under the hood it breaks the query into multiple parts of separate batches, only one at a time being in memory.
<havenwood> rapha: Both default to batches of 1,000, but you can go lower if that's still too much memory.
<havenwood> rapha: DB[:table].all.paged_each(rows_per_fetch: 42) { |row| row row row your boat }
hololeap_ has quit [Ping timeout: 240 seconds]
jpn has joined #ruby
hololeap_ has joined #ruby
ur5us has joined #ruby
hololeap_ has quit [Ping timeout: 240 seconds]
hololeap_ has joined #ruby
<rapha> oh, certainly no rails here havenwood :)
<rapha> hmm yeah, batches makes sense
<rapha> okay lemme try to rewrite it to that
<rapha> got 96GB of RAM that should count for something
<rapha> so 1000 seems fine
z4kz has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
protektwar has quit [Ping timeout: 256 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
z4kz has quit [Quit: Client closed]
<rapha> havenwood: something is already "wrong" with DB[:table].all.paged_each(rows_per_fetch: 2){|row| pp row; exit} ... it takes a looong time for the pp to happen (in fact i'll Ctrl-C it now after waiting 30 minutes)
<rapha> time sqlite3 file.db 'select * from table limit 2 offset 1000;' comes back after 0.009s
<rapha> oooh i think it needs to be without #all
<rapha> okay, needs to be .order().paged_each()
<rapha> and only works with sqlite3, not with extralite
roadie has joined #ruby
<rapha> this help nicely with the RAM problem, but it doesn't work with Parallel
<rapha> +s
roadie has quit [Ping timeout: 248 seconds]
<weaksauce> doesn't offset get really slow the further in the offset you are?
<rapha> i don't know weaksauce but that's what Sequel does here under the hood
<weaksauce> yeah I am pretty sure it has to fetch all the records and then discard the results after counting n offset
<rapha> fwiw i have this running now with rows_per_fetch:80000 and it just got to half a million records processed and is still going reasonably fast. ofc it'd go faster on 20 CPUs than on just 1 :)
<weaksauce> has it been slowing down each iteration?
<rapha> it's fast enough to not be able to really tell (as a progress report, i have the number of iterations showing as print "\\033[K\r#{i}")
<rapha> hmm it does pause every now and then ... safe bet to say to fetch the next 80000?
<leah2> isn't to_enum enough?
jpn has quit [Quit: leaving]
<rapha> leah2: for passing this to Parallel.each you mean?
<leah2> yes
jpn has joined #ruby
jpn has quit [Client Quit]
<rapha> seems to just take a giant, long while again before anything starts happening
emcb549 has joined #ruby
RickHull has joined #ruby
emcb54 has quit [Ping timeout: 256 seconds]
emcb549 is now known as emcb54
roadie has joined #ruby
<weaksauce> rapha what's the structure of your data?
<weaksauce> if you can use an indexed column it's much faster
<weaksauce> like instead of select * from foo limit 80000 offset N
emcb540 has joined #ruby
<weaksauce> you'd so something like lastrecord = row.timestamp; select * from froo limit 80000 where timestamp > timestamp
<weaksauce> er timestamp > lastrecord
<weaksauce> and you'd have to order by the time
emcb54 has quit [Ping timeout: 246 seconds]
emcb540 is now known as emcb54
hololeap_ has quit [Ping timeout: 240 seconds]
idiocrash has joined #ruby
hololeap_ has joined #ruby
idiocrash_ has joined #ruby
giorgian has quit [Ping timeout: 248 seconds]
roadie has quit [Ping timeout: 248 seconds]
idiocrash has quit [Ping timeout: 256 seconds]
z4kz has joined #ruby
giorgian has joined #ruby
roadie has joined #ruby
giorgian has quit [Ping timeout: 246 seconds]
roadie has quit [Ping timeout: 248 seconds]
<leah2> shouldnt a plain select * already stream the result?
giorgian has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
giorgian has quit [Ping timeout: 256 seconds]