reber has quit [Remote host closed the connection]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
elphe has joined #ruby
hgost has quit [Quit: leaving]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
wolfshappen has quit [Quit: Waffs have technical problems too]
wolfshappen has joined #ruby
white_lilies has joined #ruby
CrazyEddy has quit [Ping timeout: 276 seconds]
tty has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
BTRE has joined #ruby
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
redlegion has quit [Max SendQ exceeded]
CrazyEddy has joined #ruby
redlegion has joined #ruby
mroutis has left #ruby [#ruby]
<Radar>
Found a Ruby bug today. Don't encounter many of those.
<Radar>
Fortunately, it's fixed in 2.4.4.
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
alfiemax has joined #ruby
mroutis has joined #ruby
mroutis has quit [Remote host closed the connection]
white_lilies has quit [Ping timeout: 256 seconds]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
AJA4350 has quit [Quit: AJA4350]
Raboo has quit [Ping timeout: 240 seconds]
unshackled has quit [Ping timeout: 245 seconds]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
Raboo has joined #ruby
edwardly has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has quit [Ping timeout: 244 seconds]
tdy has joined #ruby
bmurt has joined #ruby
bmurt has quit [Client Quit]
banisterfiend has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
beilabs has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
ciro has quit [Quit: WeeChat 2.2]
alfiemax has quit [Ping timeout: 264 seconds]
akaiiro has joined #ruby
siery has quit [Ping timeout: 248 seconds]
cadillac_ has quit [Ping timeout: 256 seconds]
Caerus has joined #ruby
cadillac_ has joined #ruby
<dviola>
was it a regression?
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
braincrash has quit [Quit: bye bye]
<havenwood>
dviola: When something that used to work stops working, you regress.
<havenwood>
dviola: New code causes a regression in that it breaks other code.
<Radar>
havenwood: I think you read that wrong.
<Radar>
not "what is a", but "was it a"
<havenwood>
Radar: Oh, yes. I sure did!
<havenwood>
haha
<Radar>
how embarrassment
<havenwood>
scrolls back, mmm - context sure makes that clear
* havenwood
squints
<dviola>
I ask because git-bisect is great when finding regressions
<Radar>
dviola: I am... not sure if it was a regression or not. I would need to recompile each Ruby version to determine that and ain't nobody got time for that.
<dviola>
git bisect start, then mark good/bad, until you get the bad commit
<havenwood>
I did the recompile ruby bisect dance the other day
<Radar>
dviola: Yeah, git bisect is great :)
<Radar>
This seems like the kind of bug that would happen for perhaps 1 or 2 Ruby versions but then be squashed.
<havenwood>
It takes forever
<Radar>
It'd probably be quicker for me to read the changelogs.
braincrash has joined #ruby
<dviola>
nice
<dviola>
:P
<Radar>
Going to try installing Ruby 2.4.3 and see if the bug is there or not now. And then I will go and read the changelogs. I must know what caused this.
akaiiro has quit [Remote host closed the connection]
<Radar>
my guess is something fucky around require not checking $LOADED_FEATURES correctly
<Radar>
One day I'll remember to run "git fetch --tags" before attempting a tag checkout.
nadir has joined #ruby
alfiemax has joined #ruby
kapil___ has joined #ruby
<Radar>
Hoping it's fixed in between 2.4.2 and 2.4.3 as the changelog there is smaller.
al2o3-cr has quit [Quit: WeeChat 2.2]
gix has joined #ruby
<Radar>
Na, it's in 2.4.4. I don't have the time to run a bisect over that many changes to see what's changed. I'll guess I'll have to be happy knowing that it's fixed... but not knowing what it is.
<Bish>
if @mon_owner != Thread.current then @mon_mutex.lock
<Bish>
doesn't make much sense too me
<Bish>
well it does.. but still
schneider has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
GodFather has joined #ruby
elphe has quit [Ping timeout: 256 seconds]
jottr has quit [Ping timeout: 268 seconds]
rikkipitt has joined #ruby
za1b1tsu has quit [Quit: WeeChat 2.1]
za1b1tsu has joined #ruby
elphe has joined #ruby
beefjoe has quit [Remote host closed the connection]
apparition47 has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
MyMind has joined #ruby
Sembei has quit [Ping timeout: 256 seconds]
conta has joined #ruby
AJA4350 has joined #ruby
sarna has joined #ruby
ohcibi has quit [Remote host closed the connection]
schneider has quit [Quit: WeeChat 2.0.1]
ellcs has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
jasmith has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
ciro has joined #ruby
<kspencer>
Has anyone else noticed that the cert for ruby-lang.org has been getting rejected since its for lists.ruby-lang.org
GodFather has joined #ruby
rikkipitt has quit [Remote host closed the connection]
rikkipitt has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
sarna has quit [Quit: Leaving]
rikkipitt has quit [Ping timeout: 268 seconds]
conta has quit [Remote host closed the connection]
jcalla has joined #ruby
jottr has joined #ruby
mikecmpb_ has quit [Read error: Connection reset by peer]
redlegion has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
redlegion has joined #ruby
beefjoe has joined #ruby
User458764 has joined #ruby
crankhar1er has joined #ruby
cadillac_ has quit [Ping timeout: 256 seconds]
redlegion has quit [Max SendQ exceeded]
cadillac_ has joined #ruby
redlegion has joined #ruby
Doow has joined #ruby
<Doow>
Hi, I'm trying to do string interpolation and want to format numbers, is there a decent way to do that inline? (e.g. "I have #{num_apples} apples"). I'd prefer avoiding "" % var notation if possible.
<Doow>
I.e. assume num_apples is a floating point number in the above example and I want to only use two decimals.
<z64>
"#{num_apples.round(2)}"?
kapil___ has quit [Quit: Connection closed for inactivity]
<Doow>
z64, that makes sense, thanks. I was hoping for something more compact, but that works.
<z64>
think thats the best you'll get unless you just assign (or re-assign) another variable and interpolate that new rounded variable instead
rikkipitt has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
<TvL2386>
Bish: that makes sense right
<TvL2386>
if you're calling it twice from the same thread, you won't wait for yourself (deadlock)
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
crankhar1er has quit [Quit: leaving]
<TvL2386>
Doow: probably not what you want, but an option: sprintf("I have %.2f apples", num_apples)
<Doow>
TvL2386, thanks for the tip, but not what I wanted, no. I was hoping for something like the .2f for the #{} notation
<TvL2386>
Doow: yeah that's not in there :) I'd go with z64's solution
Snowy has joined #ruby
eblip has quit [Quit: WeeChat 2.0.1]
beefjoe has quit [Ping timeout: 276 seconds]
beefjoe has joined #ruby
eblip has joined #ruby
Alina-malina has quit [Ping timeout: 264 seconds]
rikkipitt has quit [Quit: Leaving...]
fmcgeough has joined #ruby
dhollin3 is now known as dhollinger
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tempesta has quit [Quit: See ya!]
frem has joined #ruby
bmurt has joined #ruby
Alina-malina has joined #ruby
roadrunneratwast has joined #ruby
Rapture has joined #ruby
Zaab1t has joined #ruby
<roadrunneratwast>
Hi I am unable to install "sudo gem install ruby-debug-ide"
<roadrunneratwast>
/usr/bin/ruby2.3: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake (LoadError)
Nicmavr has quit [Read error: Connection reset by peer]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
<TvL2386>
roadrunneratwast: guess you're not using rbenv or rvm or ....
gnufied has joined #ruby
Nicmavr has joined #ruby
<roadrunneratwast>
oh. i installed rake and rubocop
<roadrunneratwast>
working now
<roadrunneratwast>
i am not a ruby dev
Inline has joined #ruby
<roadrunneratwast>
so all that environment setup kills me
<TvL2386>
check :)
<TvL2386>
I installed it, using ruby-2.5.1 with my own user and it went fine
<havenwood>
roadrunneratwast: "You don't have write permissions for the /var/lib/gems/2.3.0 directory."
<roadrunneratwast>
yeah
<roadrunneratwast>
i tried running the IDE (ideaJ) as sudo
<roadrunneratwast>
maybe i just have to stick with that
<havenwood>
roadrunneratwast: Or you could switch to installing Rubies in a local directory. That, or just switch to a newer Ruby and install it locally.
redlegion has quit [Max SendQ exceeded]
<roadrunneratwast>
i don t know how to do that stuff yet. i am not a ruby dev
<havenwood>
roadrunneratwast: What OS/distro?
redlegion has joined #ruby
Zaab1t has quit [Quit: Zaab1t]
conta1 has joined #ruby
chrisseaton has joined #ruby
<chrisseaton>
Does anyone have an interest in fibers and want to read a draft blog post?
biberu has quit []
<havenwood>
chrisseaton: I'm interested.
<chrisseaton>
Hah you're always there for me, haven wood!
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cork has quit [Quit: .]
NightMonkey has joined #ruby
GodFather has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
beefjoe has quit [Remote host closed the connection]
Cork has joined #ruby
Cork has quit [Excess Flood]
Cork has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
apparition47 has quit [Quit: Bye]
<ellcs>
i'm also interested
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
alfiemax has joined #ruby
Cork has quit [Quit: .]
regedit has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<regedit>
hey
<regedit>
i have a HUGE string of text i'm trying to process/work with, it's giving me some problems because well, it's huge
Nilium has quit [Ping timeout: 260 seconds]
<regedit>
getting some memory limitations complaints (heroku ruby/rails)
jcarl43 has joined #ruby
Cork has joined #ruby
<mnemon>
regedit: what are you doing with/to it'
<mnemon>
?
alfiemax has quit [Ping timeout: 256 seconds]
<ineb>
regedit: take a look at StringIO and treat it like a file
creeg has quit [Ping timeout: 260 seconds]
<regedit>
it's basically like 9M of phone numbers i'm trying to compare with other existing phone numbers in my database
Nilium has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
<ineb>
regedit: you can do #gets, #read, #each_line, #each_char and so on there
havenwood has joined #ruby
redlegion has quit [Max SendQ exceeded]
<regedit>
but first i fix up the huge string a bit... split it, remove some characters from it (area codes & whitespace etc), all in all it looks like the runtime piles up a lot of memory very quickly. even trying to call GC.start a few times but still memory complaints
haylon has quit [Ping timeout: 240 seconds]
redlegion has joined #ruby
<regedit>
ineb: hmmm.... maybe
<mozzarella>
where are you getting that string from
<regedit>
if it helps clarify the requirements here: this is a Do Not Call list from the federal gov
<ineb>
regedit: but if you say 9 megabyte of size... this shouldn be a problem. especially not if you preprocess it in chunks
<regedit>
telemerketing.ftc.gov kinda stuff
<mnemon>
regedit: if you store multiple versions if the huge string it will be a problem, creating array of strings shouldn't be too bad I guess.
<mnemon>
*of
GodFather has quit [Ping timeout: 256 seconds]
<regedit>
ye eventually i try making a Hash of phone-number => nil, so that i can use it as a lookup
<regedit>
i was wondering if i need to somehow make some sort of clever compact lookup structure out of it (btree or something?) so it uses as little ram as possible
<mnemon>
regedit: what are you doing to it now? modifying the whole massive string for each number?
<regedit>
but it seems all the gsub and split etc steps before might also be "conflagrating" the ram copies of the data...
<regedit>
some line numbers of possible interest: :20 fetch_file.file.read might load the entire zip compressed file into memory
<regedit>
:30 dnc_raw = entry.get_input_stream.read copies the entire extracted string into ram?
<regedit>
:33 trying to regex through the entire string to make sure it conforms to expected format - copies it again?
redlegion has quit [Max SendQ exceeded]
<regedit>
:35 gsub twice
redlegion has joined #ruby
c0ncealed2 has quit [Remote host closed the connection]
cagomez has joined #ruby
mzo has joined #ruby
za1b1tsu has quit [Ping timeout: 276 seconds]
c0ncealed2 has joined #ruby
<regedit>
im actually finding some instances of these extracted data files to contain 16M+ of data
GodFather has joined #ruby
<regedit>
so how can i sanely process this much data within limited resources, effectively cleaning up after everything so RAM doesn't keep leaking?
<ineb>
what does fetch_file.file.read return? you want IO there
lxsameer has joined #ruby
<ineb>
regedit: if this is a full string it would explain your problems
<regedit>
ineb: ah ye i was having problems giving Zip::File.open() something IO-ish, nothing seemed to work except open_buffer(fetch_file.file.read) which i think might indeed be the full string...
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
Snowy has quit [Quit: ragequit]
dviola has quit [Quit: WeeChat 2.2]
yohji has quit [Remote host closed the connection]
<ineb>
regedit: since the numbers seem somewhat formatted i would iterate through them one by one and do whatever operations needed
<siery>
remind*
<regedit>
ineb: it causes memory complaints which in some cases triggers a killing of the process. It seems to happen "over time" after executing this process several times (not the first times it executes. memory leak-ish...)
Beams has quit [Quit: .]
ellcs has quit [Ping timeout: 240 seconds]
eckhardt_ has joined #ruby
deathwishdave has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
alfiemax_ has quit [Ping timeout: 260 seconds]
<ineb>
regedit: okay, i cant spot critical errors there
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bak1an has joined #ruby
bak1an has quit [Client Quit]
troulouliou_div2 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mzo has quit [Ping timeout: 264 seconds]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
za1b1tsu has joined #ruby
bmurt has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
troys has quit [Ping timeout: 240 seconds]
sagax has joined #ruby
scrptktty has joined #ruby
dviola_ has joined #ruby
dviola has quit [Quit: WeeChat 2.2]
dviola_ is now known as dviola
akaiiro has quit [Remote host closed the connection]
krawchyk has quit [Quit: krawchyk]
krawchyk has joined #ruby
akaiiro has joined #ruby
lytol_ has joined #ruby
cadillac_ has quit [Ping timeout: 240 seconds]
worch has joined #ruby
cadillac_ has joined #ruby
<worch>
is there a canonical way to add the gem's bin path to $PATH? Presumably you wouldn't want to simply hardcode it as it contains a version number in the path
venmx has quit [Ping timeout: 240 seconds]
r29v has joined #ruby
Mike11 has quit [Quit: Leaving.]
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
ferr has quit [Quit: WeeChat 2.1]
augcesar has joined #ruby
Caerus has joined #ruby
redlegion has quit [Max SendQ exceeded]
redlegion has joined #ruby
darkhanb has quit [Ping timeout: 240 seconds]
fowlduck has quit [Read error: Connection reset by peer]
<havenwood>
I like the idea of a `gem env bindir`. That would be easy to implement.
samosaphile has quit [Ping timeout: 252 seconds]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather has joined #ruby
raynold has quit [Quit: brb]
sauvin has quit [Read error: Connection reset by peer]
kapil___ has quit [Quit: Connection closed for inactivity]
kapil___ has joined #ruby
roadrunneratwast has quit [Quit: Leaving.]
SeepingN has joined #ruby
deathwishdave has joined #ruby
krawchyk has quit [Quit: krawchyk]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has quit [Ping timeout: 248 seconds]
cadillac_ has quit [Ping timeout: 256 seconds]
cadillac_ has joined #ruby
<regedit>
how are ruby Hash lookups implemented? is it anything special to make look ups very fast?
<regedit>
i'm trying to find a cood collection/container to use in order to lookup simply whether (boolean true/false) a value exists in the collection or not, with super fastest lookup time possible
<regedit>
*good
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
CrazyEddy has quit [Ping timeout: 268 seconds]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eblip has quit [Quit: WeeChat 2.0.1]
deathwishdave has joined #ruby
krawchyk has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deathwishdave has quit [Client Quit]
snickers has joined #ruby
bmurt has joined #ruby
vikaton has joined #ruby
biberu has quit []
CrazyEddy has joined #ruby
<baweaver>
regedit: Set
<baweaver>
Though it uses Hash, so..
<regedit>
i've been doing Hash with key => nil, because all i care for are the existence of the keys, dont care for the values
<regedit>
so i was wondering if there's an even more optimized way of only using the keys part of it without values
eindoofus has joined #ruby
<baweaver>
Set
<regedit>
also, since i'm adding a huge amount of elements, which if i understand correctly the underlying mechanisms of Hash how it increases in number of underlying "bins", i wish there was a way for me to specify number of bins to begin with, so it doesnt have to keep re-dividing and re-creating Hash bins...
fmcgeough has quit [Quit: fmcgeough]
<regedit>
which if i understand correctly could exponentially affect performance