baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: 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!
kurko_ has joined #ruby
xfbs has joined #ruby
knight33 has joined #ruby
uplime has joined #ruby
IanMalcolm has joined #ruby
arescorpio has joined #ruby
arescorpio has quit [Max SendQ exceeded]
IanMalcolm has quit [Quit: Textual IRC Client: www.textualapp.com]
<freemo> al2o3-cr: no, i couldnt figure out how to programatically change locale, how do i do that?
IanMalcolm has joined #ruby
IanMalcolm has quit [Client Quit]
<al2o3-cr> i don't think you can straight from ruby.
<al2o3-cr> you could knock up a little wrapper around setlocale(3) though.
chouhoulis has joined #ruby
IanMalcolm has joined #ruby
RougeR has quit [Read error: Connection reset by peer]
RougeR has joined #ruby
arescorpio has joined #ruby
<al2o3-cr> freemo: have you tried from the commandline first?
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marmotini_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has joined #ruby
orbyt_ has joined #ruby
za1b1tsu has quit [Ping timeout: 250 seconds]
IanMalcolm has quit [Quit: Textual IRC Client: www.textualapp.com]
orbyt_ has quit [Ping timeout: 250 seconds]
IanMalcolm has joined #ruby
asphyxia has quit [Quit: Lost terminal]
IanMalcolm has quit [Client Quit]
bmurt has joined #ruby
chouhoulis has quit [Remote host closed the connection]
weaksauce has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
<freemo> al2o3-cr: i dont think thts it cause the border renders just not when i use addstr.. so its not at the terminal level it has to be NCurses specific
xfbs has quit [Quit: afk]
<al2o3-cr> freemo: what string are you passing to addstr?
xfbs has joined #ruby
<freemo> al2o3-cr: box drawing characyers, the same ones successfully rendered for the border
<al2o3-cr> freemo: i've tested and they seem to work.
blackmesa has quit [Ping timeout: 252 seconds]
d^sh has quit [Ping timeout: 244 seconds]
<freemo> al2o3-cr: yea others have had success too, but not for me
d^sh has joined #ruby
<freemo> al2o3-cr: let me see your code, maybe there is a clue...
<al2o3-cr> it's literally 4 lines
<freemo> sure let me see any way
<al2o3-cr> ok.
<al2o3-cr> freemo: https://imgur.com/a/z9qO8gt
<freemo> hmmm
<freemo> al2o3-cr: ok definately doesnt work for me.. what os?
marmotini_ has quit [Ping timeout: 246 seconds]
<al2o3-cr> arch linux
<freemo> al2o3-cr: hmm yea linux here too
<freemo> al2o3-cr: what ruby library did you use?
<al2o3-cr> freemo: same one as you.
<freemo> al2o3-cr: perhaps its the backend lib, maybe we are biding to different native libs
<al2o3-cr> freemo: what does `localectl status` say?
<freemo> hmm
nadir has quit [Quit: Connection closed for inactivity]
<freemo> al2o3-cr: System Locale: LANG=en_US.UTF-8
throwntall has quit [Remote host closed the connection]
<al2o3-cr> hmm, something weird here then.
throwntall has joined #ruby
rkoller has quit [Quit: Textual IRC Client: www.textualapp.com]
<freemo> al2o3-cr: yea its very odd
<al2o3-cr> freemo: does it work if you issue `LC_ALL=en_US.UTF-8 ruby yourscript.rb`
<freemo> al2o3-cr: im running it via bundler... should i do it via that?
<al2o3-cr> freemo: just put LC_ALL=en_US.UTF-8 infront of the bundler command
<freemo> kk
<freemo> al2o3-cr: same results
<al2o3-cr> i'm not sure what's going on here.
<freemo> al2o3-cr: yea im clueless too
<freemo> al2o3-cr: i think maybe you are on ncursesw and im on ncurses but if that were true the borders shouldnt work, so i dunno
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> freemo: it might be that, but in all honesty i'm at a loss.
<freemo> ya
pskosinski has quit [Ping timeout: 268 seconds]
pskosinski has joined #ruby
cagomez has joined #ruby
esrse has joined #ruby
RougeR has quit [Ping timeout: 252 seconds]
ivanskie has joined #ruby
xfbs has quit [Quit: afk]
darkhanb has joined #ruby
d^sh has quit [Ping timeout: 244 seconds]
d^sh has joined #ruby
za1b1tsu has joined #ruby
za1b1tsu has quit [Ping timeout: 244 seconds]
venmx has quit [Ping timeout: 245 seconds]
Dimik has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
chouhoulis has quit [Remote host closed the connection]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ivanskie has joined #ruby
arescorpio has quit [Remote host closed the connection]
braincrash has quit [Quit: bye bye]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
braincrash has joined #ruby
ivanskie has joined #ruby
eckhardt has joined #ruby
jetchisel has joined #ruby
Dimik has quit [Ping timeout: 272 seconds]
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ivanskie has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fluxAeon has quit [Ping timeout: 244 seconds]
sarmiena_ has joined #ruby
fluxAeon has joined #ruby
_whitelogger has joined #ruby
MoritaShinobu has joined #ruby
<freemo> al2o3-cr: hey you still around?
sarmiena_ has quit [Quit: sarmiena_]
knight33 has joined #ruby
knight33 has quit [Client Quit]
cagomez has quit [Remote host closed the connection]
MoritaShinobu has quit [Ping timeout: 244 seconds]
cagomez has joined #ruby
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has joined #ruby
cagomez has quit [Ping timeout: 272 seconds]
ivanskie has joined #ruby
lxsameer has quit [Ping timeout: 246 seconds]
jic has joined #ruby
MoritaShinobu has joined #ruby
Pisuke has joined #ruby
MyMind has quit [Ping timeout: 276 seconds]
reber has joined #ruby
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
themsay has quit [Ping timeout: 252 seconds]
themsay has joined #ruby
themsay has quit [Read error: Connection reset by peer]
themsay has joined #ruby
MoritaShinobu has quit [Ping timeout: 272 seconds]
rivalomega has joined #ruby
idiocrash has joined #ruby
whysthatso has joined #ruby
whysthatso has quit [Client Quit]
qolq has quit [Ping timeout: 250 seconds]
apeiros_ has quit [Remote host closed the connection]
MoritaShinobu has joined #ruby
qolq has joined #ruby
aufi has joined #ruby
m27frogy has quit [Quit: ZNC - https://znc.in]
m27frogy has joined #ruby
zapata has quit [Quit: WeeChat 2.2]
crankharder has quit [Ping timeout: 252 seconds]
LiftLeft has quit [Ping timeout: 252 seconds]
ua_ has quit [Ping timeout: 250 seconds]
ua has joined #ruby
clemens3 has joined #ruby
idiocrash has quit [Ping timeout: 272 seconds]
idiocrash has joined #ruby
clemens3 has quit [Ping timeout: 250 seconds]
aufi has quit [Ping timeout: 245 seconds]
za1b1tsu has joined #ruby
aufi has joined #ruby
qolq3 has joined #ruby
qolq has quit [Ping timeout: 246 seconds]
qolq3 is now known as qolq
spiette has quit [Ping timeout: 244 seconds]
spiette has joined #ruby
Tuor has joined #ruby
clemens3 has joined #ruby
freemo has quit [Ping timeout: 244 seconds]
zapata has joined #ruby
za1b1tsu has quit [Ping timeout: 268 seconds]
themsay has quit [Ping timeout: 244 seconds]
rivalomega has quit [Remote host closed the connection]
rivalomega has joined #ruby
za1b1tsu has joined #ruby
<zenspider> rawr
nowhere_man has joined #ruby
marahin has quit [Ping timeout: 252 seconds]
rivalomega has quit [Ping timeout: 252 seconds]
reber has quit [Remote host closed the connection]
Snowy has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
GodFather has quit [Read error: Connection reset by peer]
marahin has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
mikecmpbll has quit [Client Quit]
Snowy has joined #ruby
GodFather has joined #ruby
GodFather has quit [Max SendQ exceeded]
mikecmpbll has joined #ruby
clemens3 has quit [Remote host closed the connection]
Blaguvest has joined #ruby
clemens3 has joined #ruby
Puffball has quit [Remote host closed the connection]
GodFather has joined #ruby
lxsameer has joined #ruby
Puffball has joined #ruby
themsay has joined #ruby
moei has quit [Read error: Connection reset by peer]
moei has joined #ruby
phaul has joined #ruby
roshanavand has joined #ruby
GodFather has quit [Ping timeout: 252 seconds]
venmx has joined #ruby
idiocrash has quit [Ping timeout: 245 seconds]
paraxial has quit [Ping timeout: 252 seconds]
idiocrash has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
GodFather has joined #ruby
kapil____ has joined #ruby
Nicmavr has joined #ruby
blackmesa has joined #ruby
GodFather has quit [Max SendQ exceeded]
za1b1tsu has quit [Ping timeout: 272 seconds]
blackmesa has quit [Ping timeout: 252 seconds]
ansraliant has quit [Quit: My planet needs me]
blackmesa has joined #ruby
KeyJoo has joined #ruby
phaul has quit [Ping timeout: 250 seconds]
lxsameer has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
mikecmpbll has joined #ruby
themsay has quit [Ping timeout: 252 seconds]
themsay has joined #ruby
lxsameer has joined #ruby
za1b1tsu has joined #ruby
throwntall has quit [Remote host closed the connection]
throwntall has joined #ruby
_whitelogger has joined #ruby
whysthatso has joined #ruby
mike11 has joined #ruby
<Cork> if you have callback = -> { puts "works" }, is there a way to get the text "puts \"works\"" or similar from the variable callback?
<Cork> (both with or without the -> {} works for me)
raulp has quit [Ping timeout: 268 seconds]
rivalomega has joined #ruby
rivalomega has quit [Ping timeout: 246 seconds]
Sp4rKy has quit [Quit: leaving]
Sp4rKy has joined #ruby
KeyJoo has quit [Ping timeout: 268 seconds]
_whitelogger has joined #ruby
Pisuke has quit [Read error: Connection reset by peer]
vondruch has joined #ruby
vondruch has quit [Quit: vondruch]
Blaguvest has quit [Read error: Connection reset by peer]
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ruby
Pisuke has joined #ruby
paraxial has joined #ruby
themsay has quit [Ping timeout: 272 seconds]
themsay has joined #ruby
dionysus69 has quit [Quit: ZNC 1.7.1+deb2 - https://znc.in]
dbz has joined #ruby
dionysus69 has joined #ruby
blackmesa has quit [Quit: WeeChat 2.2]
dbz has quit [Ping timeout: 268 seconds]
<phage> I'm crawling a site to get some specific output. I have the following code that returns the correct data, but I only need every second line from the output. Any ideas? https://dpaste.de/HHkU#L16
xfbs has joined #ruby
SolarAquarion has quit [Ping timeout: 250 seconds]
za1b1tsu has quit [Ping timeout: 252 seconds]
SolarAquarion has joined #ruby
Tuor has quit [Ping timeout: 246 seconds]
qolq3 has joined #ruby
qolq has quit [Read error: Connection reset by peer]
qolq3 is now known as qolq
za1b1tsu has joined #ruby
<Cork> phage: .each_with_index.select {|a,b| b % 2 == 1 } is one option
<phage> Cork: Thanks. I changed my approach a bit and made it work with this: https://dpaste.de/ZR1X
<Cork> ya, that is a much better approch
xfbs has quit [Ping timeout: 260 seconds]
kapil____ has quit [Quit: Connection closed for inactivity]
apparition has joined #ruby
<Cork> djellemah: are you sure that works with lamdas?, lamdas doens't have source methods
GodFather has joined #ruby
<djellemah> Cork: Works for me in pry on 2.5.1 ¯\_(ツ)_/¯
<djellemah> lambda must be defined in file though. So #source can read the source from somewhere.
whysthatso has quit [Quit: whysthatso]
GodFather has quit [Max SendQ exceeded]
GodFather has joined #ruby
GodFather has quit [Max SendQ exceeded]
esrse has quit [Ping timeout: 246 seconds]
kurko_ has joined #ruby
KeyJoo has joined #ruby
za1b1tsu has quit [Ping timeout: 268 seconds]
Chetic has quit [Ping timeout: 244 seconds]
Eiam has quit [Ping timeout: 250 seconds]
rivalomega has joined #ruby
reber has joined #ruby
rivalomega has quit [Ping timeout: 244 seconds]
phaul has joined #ruby
donofrio_ has joined #ruby
<Cork> ah
<Cork> that isn't a problem in this case though
<Cork> djellemah: thx!
donofrio has quit [Ping timeout: 268 seconds]
GodFather has joined #ruby
GodFather has quit [Max SendQ exceeded]
urbanmonk has joined #ruby
xfbs has joined #ruby
xfbs has quit [Client Quit]
xfbs has joined #ruby
lxsameer has quit [Ping timeout: 252 seconds]
apeiros_ has joined #ruby
urbanmonk has quit [Client Quit]
apeiros_ has quit [Read error: Connection reset by peer]
xfbs has quit [Ping timeout: 252 seconds]
bmurt has joined #ruby
Snowy has quit [Remote host closed the connection]
Snowy has joined #ruby
za1b1tsu has joined #ruby
GodFather has joined #ruby
Snowy has quit [Ping timeout: 252 seconds]
GodFather has quit [Ping timeout: 244 seconds]
knight33 has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]
whysthatso has joined #ruby
GodFather has joined #ruby
nowhere_man has joined #ruby
apeiros_ has joined #ruby
apeiros_ has quit [Read error: Connection reset by peer]
GodFather has quit [Max SendQ exceeded]
GodFather has joined #ruby
KeyJoo has quit [Ping timeout: 268 seconds]
GodFather has quit [Max SendQ exceeded]
dmitch has joined #ruby
lxsameer has joined #ruby
cranq has joined #ruby
kapil____ has joined #ruby
lxsameer has quit [Ping timeout: 268 seconds]
GodFather has joined #ruby
marmotini_ has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whysthatso has quit [Quit: whysthatso]
lxsameer has joined #ruby
marmotini_ has quit [Ping timeout: 250 seconds]
dbz has joined #ruby
fluxAeon has quit [Quit: Textual IRC Client: www.textualapp.com]
dbz has quit [Ping timeout: 268 seconds]
Snowy has joined #ruby
uplime has quit [Ping timeout: 272 seconds]
knight33 has joined #ruby
jetchisel has quit [Ping timeout: 276 seconds]
nowhere_man has quit [Ping timeout: 276 seconds]
jetchisel has joined #ruby
justicefries has joined #ruby
apeiros_ has joined #ruby
DTZUZU has joined #ruby
apeiros_ has quit [Read error: Connection reset by peer]
wildermind has joined #ruby
justicefries has quit [Client Quit]
justicefries has joined #ruby
fluxAeon has joined #ruby
Snowy has quit [Remote host closed the connection]
Snowy has joined #ruby
dmitch has quit [Ping timeout: 252 seconds]
moei has quit [Ping timeout: 252 seconds]
moei has joined #ruby
Rapture has joined #ruby
chouhoulis has joined #ruby
kristofferR has joined #ruby
marmotini_ has joined #ruby
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
bga57 has quit [Ping timeout: 250 seconds]
sirecote has joined #ruby
conta1 has joined #ruby
themsay has quit [Ping timeout: 252 seconds]
apparition has quit [Quit: Bye]
rivalomega has joined #ruby
Cthulu201 has quit [Ping timeout: 250 seconds]
DTZUZU has quit [Quit: WeeChat 2.2]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uplime has joined #ruby
themsay has joined #ruby
cyberRodent has quit [Ping timeout: 244 seconds]
DTZUZU has joined #ruby
SeepingN has joined #ruby
conta1 has quit [Quit: conta1]
aufi has quit [Ping timeout: 252 seconds]
cyberRodent has joined #ruby
conta1 has joined #ruby
za1b1tsu has quit [Ping timeout: 245 seconds]
SeepingN has quit [Disconnected by services]
SeepingN_ has joined #ruby
freemo has joined #ruby
<freemo> bhaak and al2o3-cr fixed my problem last night, my suspicions were correct
<freemo> al2o3-cr: something you had said helped and pointed me in the right direction
kapil____ has quit [Quit: Connection closed for inactivity]
aufi has joined #ruby
clemens3 has quit [Ping timeout: 272 seconds]
bga57 has joined #ruby
Cthulu201 has joined #ruby
dbz has joined #ruby
idiocrash has quit [Quit: Textual IRC Client: www.textualapp.com]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
apeiros_ has joined #ruby
roshanavand has quit [Ping timeout: 252 seconds]
dbz has quit [Ping timeout: 244 seconds]
zerocold has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kurko_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
knight33 has joined #ruby
xfbs has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN_ is now known as SeepingN
jetchisel has joined #ruby
salasrod has quit [Quit: /quit]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
salasrod has joined #ruby
justicefries has joined #ruby
Snowy is now known as iAmAnon
crankharder has joined #ruby
iAmAnon is now known as ReporterMan
desperek has joined #ruby
sarmiena_ has joined #ruby
cd has quit [Quit: cd]
sarmiena_ has quit [Quit: sarmiena_]
zerocold has quit [Ping timeout: 252 seconds]
Rapture has quit [Ping timeout: 260 seconds]
cyberRodent has quit [Ping timeout: 276 seconds]
za1b1tsu has joined #ruby
ReporterMan has quit [Remote host closed the connection]
ReporterMan has joined #ruby
dbz has joined #ruby
za1b1tsu has quit [Ping timeout: 276 seconds]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ivanskie has joined #ruby
Reporter_ has joined #ruby
ReporterMan has quit [Ping timeout: 246 seconds]
Eiam has joined #ruby
dbz has quit [Ping timeout: 252 seconds]
conta1 has quit [Ping timeout: 252 seconds]
lxsameer has quit [Ping timeout: 276 seconds]
rippa has joined #ruby
kapil____ has joined #ruby
tycoon177 has joined #ruby
<tycoon177> if i wanted to use a database connection with a sinatra app, what gems should i look at? the database that i'd need to connect to would be microsoft sqlserver
<tycoon177> for some reason, i figured tiny_tds was more rails specific..not sure why. i've used it in my rails projects
<havenwood> tycoon177: My girlfriend uses it in a couple Roda apps with Sequel, which provides an adapter.
<havenwood> tycoon177: I don't think it's entangled with Rails.
sarmiena_ has joined #ruby
<tycoon177> i *really* want to try Sequel at some point, but I think that this project will only need like 1 or 2 database calls so i don't think it's worth the setup
<tycoon177> i could get by with making an API and doing this all from js actually...
<tycoon177> maybe i'll do that
<tycoon177> i'm going to a ruby meetup in about 30 minutes actually :) it'll be my first time going. i'm really excited
<havenwood> tycoon177: Awesome!
sarmiena_ has quit [Read error: Connection reset by peer]
Reporter_ has quit [Remote host closed the connection]
ReporterMan has joined #ruby
<Eiam> Sequel for sure, its pretty easy to pop into
<Eiam> #sequel is a very helpful crew too
<tycoon177> Eiam: is it really worth it to add that as a dependency if i really just need maybe 2 sql queries?
ReporterMan has quit [Ping timeout: 272 seconds]
MoritaShinobu has quit [Ping timeout: 252 seconds]
darkhanb has joined #ruby
nowhere_man has joined #ruby
<Eiam> are you going to write raw SQL queries that take input from the wild or other sources?
<Eiam> someone has to setup your DB connections and deal with the data
<Eiam> its probably 3 lines in Sequel to have it do it for you
<Eiam> but I'm not the one managing your code thats you =)
eckhardt has joined #ruby
Cthulu201 has quit [Ping timeout: 245 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
MoritaShinobu has joined #ruby
aufi has quit [Remote host closed the connection]
aufi has joined #ruby
aufi has quit [Ping timeout: 245 seconds]
orbyt_ has joined #ruby
<orbyt_> As a learning experiment, I wanted to benchmark string comparisons in the context of timing attacks. I have the following code: https://gist.github.com/Orbyt/d9ed93b8c8a62cb7fa576d65666c2644
ta_ has joined #ruby
<orbyt_> The units output here appear to be in seconds, which is far to large
<orbyt_> is there anyway to get micro/nano seconds?
GodFather has quit [Ping timeout: 276 seconds]
ta_ has quit [Remote host closed the connection]
mike11 has quit [Read error: Connection reset by peer]
<ivanskie> hi
<ivanskie> im writing a comman line utility... if i have a bunch of stuff to install, and separate function to install each thing..
<ivanskie> how can i wait until the first one is done before starting the next one?
<ivanskie> kind of in async await way..
GodFather has joined #ruby
Cthulu201 has joined #ruby
kurko_ has joined #ruby
GodFather has quit [Ping timeout: 252 seconds]
<havenwood> orbyt_: Checkout the benchmark-ips gem: https://github.com/evanphx/benchmark-ips
<havenwood> orbyt_: It's great for this kind of benchmark.
<orbyt_> Was just looking at https://github.com/garybernhardt/readygo
<orbyt_> Any experience with that?
<havenwood> orbyt_: I really prefer benchmark-ips for a couple reasons.
<havenwood> orbyt_: Warmup, std deviation, etc.
lytol_ has joined #ruby
wildermind has quit [Quit: Connection closed for inactivity]
Fr4n has joined #ruby
<havenwood> ivanskie: Rake is a good option for parallel execution of dependent tasks.
<ivanskie> i meant serial.
<ivanskie> one after another
<ivanskie> unless ruby is already async?
<havenwood> ivanskie: Rake is great for that.
<ivanskie> right
<ivanskie> thank you :)
dbz has joined #ruby
<apeiros_> 19:18 ivanskie: kind of in async await way..
<apeiros_> you mean… like… normal program code? :D
<ivanskie> lol yes :(
dbz has quit [Remote host closed the connection]
<apeiros_> (still rake, though, as it's a good task execution framework)
dbz has joined #ruby
<ivanskie> i forget if have def run_stuff {func1();func2();func3()}. if it runs all and doesnt wait for one to finish before the next or not.
dbz has quit [Remote host closed the connection]
<ivanskie> dumb question now that i think about it
armyriad has quit [Read error: Connection reset by peer]
dbz has joined #ruby
armyriad has joined #ruby
jetchisel has quit [Ping timeout: 252 seconds]
cthulchu has quit [Read error: Connection reset by peer]
<apeiros_> I'm honestly tempted to write an "async" gem which allows you to do `async { foo }; async { bar }; …`
<apeiros_> (and all it does is `module Kernel; module_function def async(&block); Thread.new(&block); end; end`
<apeiros_> )
<ivanskie> heh
xfbs has quit [Quit: afk]
<apeiros_> ok, if I'd do it well I'd actually create a Promise emulating class instead of a bare Thread.
<orbyt_> havenwood That gem seems to be good for determining iterations per sec for a given block of code...can I use it for the use case shown in my gist?
<orbyt_> I just want to compare executing time of string comparisons
<ivanskie> isn't there already a gem for performance tracking?
<orbyt_> Theres a built in benchmark thing but it's in seconds
<orbyt_> which is too large
<orbyt_> see my gist above
<ivanskie> ah
<havenwood> orbyt_: I assumed you wanted to compare execution time, not figure out how many ns it takes.
<havenwood> orbyt_: Process.clock_gettime Process::CLOCK_MONOTONIC, :nanosecond
<ivanskie> someone needs to write a Skippy vscode plugin to insult you when you make syntax and other mistakes.
<orbyt_> Yes, compare execution time
<havenwood> orbyt_: IPS is a better way to do that.
<orbyt_> Eg I want to find out how long "hello" == "erm" takes vs "hello" == "hello"
<havenwood> orbyt_: Comparing iterations per second is the best way to do that.
<havenwood> orbyt_: Have you tried comparing them with benchmark-ips?
<ivanskie> send the code to Scout, so it'll send you an email to tell you if your app is slower or faster for the past week
<ivanskie> (sarcasm)
moei has quit [Quit: Leaving...]
<orbyt_> havenwood Yea, the syntax is basically identiccally
<orbyt_> let me throw up another gist with the new code/results
<havenwood> orbyt_: just add an: x.compare!
xfbs has joined #ruby
<orbyt_> yea thats in there
Sembei has joined #ruby
Pisuke has quit [Ping timeout: 276 seconds]
<havenwood> orbyt_: You can compare ns with a monotonic clock yourself, but usually you want many iterations, warmup, etc to get a meaningful result.
<orbyt_> new code + results
<orbyt_> The results kinda make sense, but i was hoping for something like " x took .0123 milleseconds", "y took 0.223 millseconds" etc
johnny56 has quit [Read error: Connection reset by peer]
<havenwood> orbyt_: Hehe, with TruffleRuby it folds it away: 2.972B IPS
<orbyt_> uh what
<orbyt_> 2 iterations per second?
<havenwood> B for Billion :)
<orbyt_> or
<orbyt_> oh
<orbyt_> lol
MoritaShinobu has quit [Read error: Connection reset by peer]
jetchisel has joined #ruby
ellcs has joined #ruby
MoritaShinobu has joined #ruby
<havenwood> orbyt_: Here's a simplistic example of looking at nanoseconds: https://gist.github.com/havenwood/72434aba0785bd915942898b42fd3175
<havenwood> orbyt_: You can easily extend it to do whatever you really want. But keep in mind that variances at the nanosecond level are extreme, so it's best to test many iterations.
mikecmpbll has joined #ruby
whysthatso has joined #ruby
<orbyt_> havenwood Oh neat, will give that a quick go
<orbyt_> Was just speaking to a colleague and he'd only used Benchmark as well
<havenwood> apeiros_: I swear it was Tenderlove who announced async support in Ruby a while back with: Async = Thread
<havenwood> >.>
<apeiros_> aaahahaha, quite possible
<orbyt_> havenwood Is there a reason that that only reports in 10^3 nanoseconds? Eg 4000, 5000, 6000 ns
<orbyt_> https://ruby-doc.org/core-2.4.1/Process.html#method-c-clock_gettime doesn't seem to have docs for the constant used
cthulchu has joined #ruby
<orbyt_> Or..intuitive descriptions at least
clemens3 has joined #ruby
<orbyt_> CLOCK_MONOTONIC_RAW seems to give non-rounded numbers
<orbyt_> but with a pretty large margin
<orbyt_> or deviation between runs
<orbyt_> Ah, results seem to heavily skewed. The first run is 10x slower than other calls to Benchmark.orbyt
<orbyt_> startup overhead i guess
xfbs has quit [Quit: afk]
xfbs has joined #ruby
SeepingN has quit [Ping timeout: 244 seconds]
marmotini_ has quit [Ping timeout: 246 seconds]
marmotini_ has joined #ruby
DTZUZU has quit [Quit: WeeChat 2.2]
DTZUZU has joined #ruby
dellavg_ has joined #ruby
moei has joined #ruby
sriehl has quit [Quit: ZNC 1.7.1 - https://znc.in]
sriehl has joined #ruby
MoritaShinobu has quit [Ping timeout: 245 seconds]
ellcs has quit [Ping timeout: 276 seconds]
ellcs has joined #ruby
tdy has joined #ruby
MoritaShinobu has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
m27frogy has quit [Ping timeout: 245 seconds]
whysthatso has quit [Quit: whysthatso]
m27frogy has joined #ruby
whysthatso has joined #ruby
<tycoon177> Eiam: Sorry, I was away from my computer. In this case, it is ONLY a select statement without any sort of input from outside sources
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
venmx has quit [Ping timeout: 244 seconds]
sameerynho has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has joined #ruby
SeepingN has joined #ruby
justicefries has quit [Client Quit]
justicefries has joined #ruby
justicefries has quit [Client Quit]
orbyt_ has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
orbyt_ has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
GodFather has joined #ruby
DTZUZU has quit [Read error: Connection reset by peer]
GodFather has quit [Max SendQ exceeded]
xfbs has quit [Quit: afk]
nowhere_man has quit [Ping timeout: 244 seconds]
DoubleMalt has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dbugger has joined #ruby
sauvin has quit [Ping timeout: 250 seconds]
xfbs has joined #ruby
sauvin has joined #ruby
darkhanb has joined #ruby
reber has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sauvin has quit [Ping timeout: 276 seconds]
GodFather has joined #ruby
sauvin has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marmotini_ has quit [Ping timeout: 260 seconds]
darkhanb has joined #ruby
marmotini_ has joined #ruby
dbz has quit [Remote host closed the connection]
dviola has joined #ruby
GodFather has quit [Ping timeout: 252 seconds]
MoritaShinobu has quit [Ping timeout: 260 seconds]
Dbugger has quit [Remote host closed the connection]
GodFather has joined #ruby
GodFather has quit [Max SendQ exceeded]
dellavg_ has quit [Ping timeout: 244 seconds]
DTZUZU has joined #ruby
freemo has quit [Ping timeout: 252 seconds]
MoritaShinobu has joined #ruby
MoritaShinobu has quit [Max SendQ exceeded]
dviola has quit [Quit: WeeChat 2.2]
SeepingN has quit [Disconnected by services]
SeepingN_ has joined #ruby
GodFather has joined #ruby
GodFather has quit [Max SendQ exceeded]
whysthatso has quit [Quit: whysthatso]
venmx has joined #ruby
desperek has quit [Quit: xoxo]
Dimik has joined #ruby
ReporterMan has joined #ruby
GodFather has joined #ruby
GodFather has quit [Max SendQ exceeded]
ReporterMan has quit [Remote host closed the connection]
ReporterMan has joined #ruby
ReporterMan has quit [Ping timeout: 244 seconds]
GodFather has joined #ruby
venmx has quit [Remote host closed the connection]
venmx has joined #ruby
ivanskie has quit [Read error: Connection reset by peer]
venmx has quit [Remote host closed the connection]
blackmesa has joined #ruby
blackmesa has quit [Client Quit]
zapata has quit [Read error: Connection reset by peer]
zapata has joined #ruby
clemens3 has quit [Ping timeout: 252 seconds]
chouhoulis has quit [Ping timeout: 260 seconds]
marmotini_ has quit [Ping timeout: 244 seconds]
crankharder has quit [Ping timeout: 268 seconds]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<phaul> &list &
<rubydoc> Array#&, FalseClass#&, Integer#&, NilClass#&, Process::Status#&, TrueClass#&
sameerynho has quit [Ping timeout: 245 seconds]
ur5us has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
ellcs has quit [Ping timeout: 260 seconds]
phaul has quit [Ping timeout: 252 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver> Ever wanted to paste into pry without having to go into edit mode? - https://github.com/pry/pry/issues/1524#issuecomment-430431760
<baweaver> It works for OSX at least :D
<uplime> lol
<baweaver> If people are really nice and send me lemur pictures I may do Linux and Windows too
venmx has joined #ruby
tdy has quit [Ping timeout: 245 seconds]
xfbs has quit [Quit: afk]
darkhanb has quit [Quit: Textual IRC Client: www.textualapp.com]
uplime has quit [Quit: life is about the moments that take your bread away]
nadir has joined #ruby
orbyt_ has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
_whitelogger has joined #ruby
xfbs has joined #ruby
darkhanb has joined #ruby
xfbs has quit [Quit: afk]
Fr4n has quit [Read error: Connection reset by peer]
Fr4n has joined #ruby
bmurt has joined #ruby