havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.3, 2.5.5, 2.7.0-preview1: 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!
sgen has quit [Quit: Leaving]
Exuma has joined #ruby
skryking_ has joined #ruby
skryking has quit [Ping timeout: 248 seconds]
blizzow has quit [Ping timeout: 248 seconds]
agent_white has joined #ruby
sgen has joined #ruby
sgen has quit [Max SendQ exceeded]
sgen has joined #ruby
wildtrees has quit [Quit: Leaving]
sgen has quit [Remote host closed the connection]
lucasb has quit [Quit: Connection closed for inactivity]
banisterfiend has joined #ruby
cow[moo] has joined #ruby
code_zombie has quit [Quit: Leaving]
banisterfiend has quit [Ping timeout: 272 seconds]
Exuma has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Exuma has joined #ruby
ElFerna has joined #ruby
Fr4n has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
mre- has joined #ruby
jottr has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
mre- has quit [Ping timeout: 248 seconds]
yann-kaelig has quit [Quit: yann-kaelig]
Liothen has quit [Changing host]
Liothen has joined #ruby
tpanarch1st has quit [Ping timeout: 272 seconds]
mre- has joined #ruby
braderhart has quit [Quit: Connection closed for inactivity]
mre-_ has joined #ruby
mre- has quit [Ping timeout: 244 seconds]
poontangmessiah has quit [Remote host closed the connection]
ElFerna has quit [Remote host closed the connection]
chalkmonster has joined #ruby
jottr has joined #ruby
mozzarella has quit [Read error: Connection reset by peer]
mozzarel1 has joined #ruby
greengriminal has joined #ruby
mozzarel1 is now known as mozzarella
greengriminal has quit [Client Quit]
ajsharma has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
mozzarella has quit [Remote host closed the connection]
mozzarella has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
ajsharma has quit [Ping timeout: 245 seconds]
mre-_ has quit [Ping timeout: 245 seconds]
chunkypuffs has quit [Quit: ZNC 1.7.1 - https://znc.in]
mozzarella has quit [Remote host closed the connection]
Xiti has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
mozzarel1 has joined #ruby
mozzarel1 is now known as mozzarella
hutch has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch has quit [Ping timeout: 272 seconds]
<Exuma> does ruby somehow 'hoist' local variables to the top... i am so confused
<Exuma> i have a local method inside an if
<Exuma> and if i call that local variable in the else its nil
<Exuma> but its a local variable (not instance variable)
<mozzarella> show code, that's kind of unclear
<Exuma> mozzarella ok
<Exuma> mozzarella
<Exuma> change z to x and it will break
<Exuma> dude wtf, how have i never noticed this. what in the same kentucky fuk is happening
chunkypuffs has joined #ruby
<mozzarella> why would it not break?
<Exuma> mozzarella its because of hosting like i imagined. i had no idea ruby even does this
mre- has joined #ruby
<Exuma> hoisting*
jottr has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
mre- has quit [Ping timeout: 272 seconds]
jottr has quit [Ping timeout: 245 seconds]
<troulouliou_div2> hi i m appending this string to a pretty long string : resp << "\x4b\x00\x00\x00\x0c\x00\x00\x0b\x88\x49\xcf\x71\x8b" and on this 1 i get incompatible character encodings: ASCII-8BIT and UTF-8
<troulouliou_div2> seem like this characters are the problem if i m correct : x0b\x88
AJA4350 has quit [Remote host closed the connection]
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
jottr has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
cthulchu has joined #ruby
BH23 has joined #ruby
r29v has quit [Quit: r29v]
sylario has quit [Quit: Connection closed for inactivity]
<leftylink> &>> p
<rubydoc> stderr: /home/carcin/carcin/sandboxes/ruby/sandboxed_ruby2.6.0: error while loading shared libraries:... check link for more (https://carc.in/#/r/7g36)
jenrzzz has joined #ruby
Vashy has joined #ruby
code_zombie has joined #ruby
<Vashy> I want to programatically stictch some 1 second long .mov files; can someone point me in the right direction on getting started given a set of files and the order the files should be stitched in
<Vashy> Ruby's my go-to language but I'm open to other solutions as well
jenrzzz has quit [Ping timeout: 272 seconds]
jottr has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
Swyper has quit [Remote host closed the connection]
queip has quit [Ping timeout: 258 seconds]
gix- has joined #ruby
gix has quit [Disconnected by services]
queip has joined #ruby
x86sk has quit [Quit: Connection closed for inactivity]
kyrylo has joined #ruby
john2496 has joined #ruby
kyrylo has quit [Ping timeout: 268 seconds]
troulouliou_div2 has quit [Ping timeout: 246 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
john2496 has quit [Ping timeout: 268 seconds]
queip has quit [Ping timeout: 246 seconds]
hutch has joined #ruby
john2496 has joined #ruby
queip has joined #ruby
john2496 has quit [Ping timeout: 272 seconds]
<greypack> Vashy ffmpeg and bash
<Vashy> This one?
<Vashy> Ruby's my go-to language but I'm open to other solutions as well
<Vashy> oops wrong paste
<Vashy> ffmpeg/disco-security 7:4.1.3-0ubuntu1 amd64
<Vashy> Tools for transcoding, streaming and playing of multimedia files
<Vashy> greypack, ^
impermanence has quit [Remote host closed the connection]
<greypack> Sounds right * on phone
john2496 has joined #ruby
bitwinery has joined #ruby
hutch has quit [Ping timeout: 244 seconds]
john2496 has quit [Ping timeout: 245 seconds]
BH23 has quit [Ping timeout: 245 seconds]
galaxie has quit [Ping timeout: 260 seconds]
galaxie has joined #ruby
Azure|dc has joined #ruby
Azure has quit [Ping timeout: 268 seconds]
mre- has joined #ruby
Fr4n has quit [Ping timeout: 245 seconds]
agent_white has quit [Quit: brb]
mre- has quit [Ping timeout: 244 seconds]
agent_white has joined #ruby
jottr has joined #ruby
sauvin has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
chalkmonster has quit [Quit: WeeChat 2.5]
duderonomy has joined #ruby
Technodrome has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deepreds1 has joined #ruby
deepreds1 has quit [Ping timeout: 272 seconds]
code_zombie has quit [Quit: Leaving]
DTZUZO has quit [Ping timeout: 248 seconds]
mre- has joined #ruby
mre- has quit [Ping timeout: 245 seconds]
hutch has joined #ruby
Fr4n has joined #ruby
jenrzzz has joined #ruby
hutch has quit [Ping timeout: 246 seconds]
BH23 has joined #ruby
BH23 has quit [Ping timeout: 245 seconds]
ravenous_ has joined #ruby
orbyt_ has joined #ruby
luminousnine is now known as lumi
lumi is now known as luminousnine
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
suukim has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Quit: vondruch]
sameerynho has joined #ruby
vondruch has joined #ruby
schneider has joined #ruby
Freshnuts has quit [Quit: Leaving]
schneider has quit [Ping timeout: 248 seconds]
involans has joined #ruby
xco has joined #ruby
fkg has quit [Remote host closed the connection]
fkg has joined #ruby
deepreds1 has joined #ruby
bitwinery has quit [Quit: Leaving]
involans has quit [Quit: involans]
involans has joined #ruby
Rudd0 has quit [Remote host closed the connection]
mre- has joined #ruby
mre- has quit [Ping timeout: 272 seconds]
suukim has quit [Ping timeout: 272 seconds]
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
Ven`` has joined #ruby
suukim has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
hightower3 has joined #ruby
DTZUZO has joined #ruby
deepreds1 has quit [Ping timeout: 245 seconds]
iffraff has quit [Ping timeout: 272 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
involans has quit [Quit: involans]
leitz has joined #ruby
rapha has left #ruby ["WeeChat 2.3"]
AJA4350 has joined #ruby
involans has joined #ruby
shortCircuit__ has joined #ruby
involans has quit [Client Quit]
Rudd0 has joined #ruby
chalkmonster has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
ravenous_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gix- has quit [Ping timeout: 272 seconds]
Nicmavr has joined #ruby
fkg has quit [Remote host closed the connection]
fkg has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chalkmonster has quit [Quit: WeeChat 2.5]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
ravenou__ has joined #ruby
troulouliou_div2 has joined #ruby
shortCircuit__ has quit [Ping timeout: 245 seconds]
lucasb has joined #ruby
vel0city_netbook has joined #ruby
<vel0city_netbook> hello, I'm getting "cannot load such file -- bundler (LoadError)" when running "jekyll serve" even though I have installed bundler
<vel0city_netbook> I'm on Ubuntu 18.04 and I've tried the instructions here: https://jekyllrb.com/docs/installation/ubuntu/
Inline__ has joined #ruby
DTZUZO has quit [Ping timeout: 258 seconds]
jottr has joined #ruby
Inline has quit [Ping timeout: 264 seconds]
ellcs has joined #ruby
<havenwood> vel0city_netbook: Try?: bundle exec jekyll serve
Inline__ has quit [Quit: Leaving]
DTZUZO has joined #ruby
<vel0city_netbook> havenwood: "can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)"
<havenwood> vel0city_netbook: Is bundler installed?: gem which bundler
<havenwood> vel0city_netbook: Is "$(gem env gemdir)/bin" in your PATH?
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<vel0city_netbook> "gem install bundler" says it gets installed correctly, but "gem which bundler" says it's not there
<vel0city_netbook> yes
<vel0city_netbook> first entry
<havenwood> vel0city_netbook: Could you paste your `gem env` result?
<havenwood> vel0city_netbook: Or check the: INSTALLATION DIRECTORY
<vel0city_netbook> havenwood: https://pastebin.com/raw/rz9cp2wi
<ruby[bot]> vel0city_netbook: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<vel0city_netbook> I linked to the raw txt
Inline has joined #ruby
<havenwood> vel0city_netbook: Could you show the output of: gem install jekyll -V
<havenwood> vel0city_netbook: Or rather: gem install bundler -V
<havenwood> export PATH="/home/velo/.gem/ruby/2.5.0/bin:$PATH"
<vel0city_netbook> havenwood: https://pastebin.com/raw/2n05MH1K
<ruby[bot]> vel0city_netbook: as I told you already, please use https://gist.github.com
<vel0city_netbook> I use gists for more meaningful things
<havenwood> vel0city_netbook: And there it is: /home/velo/gems/bin/bundle
<havenwood> Hrm.
dionysus69 has joined #ruby
<havenwood> vel0city_netbook: And still no result from? gem which bundler
<havenwood> vel0city_netbook: gem which bundler
<havenwood> vel0city_netbook: with an "r"
shortCircuit__ has joined #ruby
<vel0city_netbook> yeah "ERROR: Can't find Ruby library file or shared library bundler"
<vel0city_netbook> also tried opening up a new cmd window in case source didn't work
<vel0city_netbook> but PATH looks fine anyway
<havenwood> vel0city_netbook: Yeah, PATH looks fine. I'm just confused why RubyGems is reporting it's not installed.
<havenwood> vel0city_netbook: Update RubyGems?
<havenwood> vel0city_netbook: gem update --system
<havenwood> vel0city_netbook: Reinstall bundler: gem pristine bundler
AJA4350 has quit [Remote host closed the connection]
cranq has quit [Remote host closed the connection]
<vel0city_netbook> guess I need sudo for the first one? "Permission denied @ dir_s_mkdir - /usr/local/lib/site_ruby"
kazooie has joined #ruby
<havenwood> vel0city_netbook: Ubuntu apt Ruby?
<vel0city_netbook> havenwood: if you're asking whether ruby's installed from apt, yes
<havenwood> Brightbox and Fullstaq maintain nice Ruby packages for Ubuntu, fwiw.
<havenwood> vel0city_netbook: Something is wrong with your gem install. Unsure what, but it seems you're not using `sudo` with gem installs, which you typically do with default apt Ruby unless you're using --user-install or otherwise change the default.
<vel0city_netbook> havenwood: seems to work after the gem update
<havenwood> vel0city_netbook: nice
<vel0city_netbook> thank you for the help
<havenwood> you're welcome
<vel0city_netbook> so the issue was that I hadn't used "sudo" in some command?
<havenwood> I'm not sure what the issue was. Something borked with gem.
kazooie is now known as kazooie___
<vel0city_netbook> "Could not find public_suffix-..." I did "gem install public_suffix", same issue. also tried with sudo afterwards
<vel0city_netbook> hm the error says public_suffix-3.0.1 and when I install it it's 4.0.1, does that matter?
<havenwood> vel0city_netbook: what command are you running to get an error?
kazooie___ has quit [Remote host closed the connection]
<vel0city_netbook> havenwood: "jekyll -s" to server, but just "jekyll" also triggers it
<vel0city_netbook> to serve*
<havenwood> vel0city_netbook: bundle exec jekyll
kazooie___ has joined #ruby
Swyper has joined #ruby
<vel0city_netbook> "Could not find public_suffix-3.0.1 in any of the sources" it told me to run bundle install which I did, then "jekyll" showed "You have already activated public_suffix 3.1.1, but your Gemfile requires public_suffix 3.0.1." and suggested prepending "bundle exec " which I did and it works now :)
<livcd> I want guilds and I want them now!
kazooie___ has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 272 seconds]
sh7d has quit [Ping timeout: 268 seconds]
kazooie___ has joined #ruby
hutch has joined #ruby
involans has joined #ruby
epergo has joined #ruby
epergo has quit [Client Quit]
sh7d has joined #ruby
kazooie___ has quit [Quit: Leaving]
sameerynho has quit [Ping timeout: 272 seconds]
hutch has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
AJA4350 has joined #ruby
involans has quit [Quit: involans]
AJA4350 has quit [Remote host closed the connection]
AJA4350 has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
<leitz> livcd, guilds? Something programmatic, or a group of like-minded semi-professional people?
* leitz is starting to think havenwood is a bot. Or a sleepless zombie.
<livcd> leitz: the ruby guilds
<livcd> aye
<leitz> Ah.
<leitz> Can Ruby the interpreter be made to run on more than one CPU>
<leitz> CPU?
sh7d has quit [Quit: meh]
<livcd> guilds should bring paralellism yes
sh7d has joined #ruby
<leitz> If it's still on one CPU, does it really win?
<leitz> livcd, note that I'm not well versed on the topic.
poontangmessiah has joined #ruby
* leitz is currently morphing his "build a starship crew" program to a "build a bar, with patrons, program".
<lupine> what's wrong with threads?
<lupine> just remove the GIL. you know, like jruby did
FastJack has quit [Ping timeout: 264 seconds]
<leitz> lupine, even I can afford a multi-core desktop (from Goodwill, anyway). Yet my Ruby only runs on one core and building ri docs takes minutes.
FastJack has joined #ruby
<leitz> Nothing I do *needs* multi-core processing, but it would be useful to stave off "well, we need a different language to scale".
<lupine> leitz: in fact, ruby can trivially run on multiple cores
xco has quit [Quit: xco]
<leitz> lupine, is it a compile time option, or am I just more clueless than normal?
Swyper has quit [Remote host closed the connection]
<lupine> mri only eats one core with 4 threads pounding an empty loop, but jruby eats 4
xco has joined #ruby
<lupine> you don't need to introduce a new application developer concept to make mri act like jruby in this case
hightower3 has quit [Changing host]
hightower3 has joined #ruby
dionysus69 has quit [Ping timeout: 258 seconds]
sleepee has joined #ruby
<lupine> in fact
<lupine> guilds are just going to be another version of multiple processes, aren't they?
<havenwood> lupine: Nope. Multiple guilds run within a single process.
<lupine> hmmm
vel0city_netbook has quit [Ping timeout: 246 seconds]
<havenwood> You can release the GIL Ruby-side with Fiddle or in C extensions, fwiw. There was a branch of CRuby with fine grain locks, but it's slower for single threaded code.
<havenwood> With Guilds, the GVL would be a guild-wide lock rather than a global one.
<havenwood> So you'd just have as many guilds as you do cores.
queip has quit [Ping timeout: 245 seconds]
tpanarch1st has joined #ruby
ravenou__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> IBM did an interesting paper a while back on a spike they did replacing the GVL with HTM. It's a shame that hardware implementation issues seem to have slowed progress. https://researcher.watson.ibm.com/researcher/files/jp-ODAIRA/PPoPP2014_RubyGILHTM.pdf
<havenwood> Guild channels and related immutable data types still seem interesting in JRuby. CRuby has more to gain from the parallel computation within a process standpoint.
queip has joined #ruby
Fernando-Basso has joined #ruby
Swyper has joined #ruby
fkg has quit [Ping timeout: 276 seconds]
kyrylo has joined #ruby
shortCircuit__ has quit [Ping timeout: 258 seconds]
FastJack has quit [Ping timeout: 264 seconds]
FastJack has joined #ruby
sylario has joined #ruby
Ven`` has joined #ruby
sleepee has quit [Ping timeout: 245 seconds]
livcd has quit [Remote host closed the connection]
fkg has joined #ruby
fphilipe_ has quit [Ping timeout: 248 seconds]
englishm has quit [Excess Flood]
englishm has joined #ruby
nowhere_man has joined #ruby
ravenous_ has joined #ruby
Swyper has quit [Remote host closed the connection]
mre- has joined #ruby
yokel has quit [Ping timeout: 244 seconds]
Swyper has joined #ruby
yokel has joined #ruby
mre- has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ellcs has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
kyrylo has joined #ruby
tpanarch1st has quit [Ping timeout: 272 seconds]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
Swyper has quit [Remote host closed the connection]
fphilipe_ has joined #ruby
sh7d has quit [Read error: Connection reset by peer]
sh7d has joined #ruby
Guest88641 is now known as Tristan-Speccy
<poontangmessiah> how do you get the HTTP server's response after sending a multipart file post? i'm using Net/HTTP
brool has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Max SendQ exceeded]
<havenwood> poontangmessiah: Are you using socketry/multipart-post?
<havenwood> poontangmessiah: https://github.com/socketry/multipart-post
fphilipe_ has quit [Ping timeout: 264 seconds]
<poontangmessiah> havenwood: no, i'm using plain net/http
<poontangmessiah> req.set_form([['upload', File.open('file.jpg')]], 'multipart/form-data')
Fernando-Basso has quit [Remote host closed the connection]
<havenwood> poontangmessiah: Ah, yeah, Net/HTTP only supports manual multipart post. I'd suggest using that socketry lib.
<poontangmessiah> the uploading does seem to work (i think?) i just don't know how to get a response out of it
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
<havenwood> HTTP.rb was inspired similarly https://github.com/httprb/form_data
<havenwood> An aside, but you can see Ruby HTTP clients that support multipart in this spreadsheet: https://docs.google.com/spreadsheets/d/1vPlk6nMIFa3sI5ISl7zZ5r6lDNpVQX6Jxi3ksXCyVbs/edit#gid=1392844939
ravenous_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe_ has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Max SendQ exceeded]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has quit [Quit: xco]
fphilipe_ has quit [Ping timeout: 264 seconds]
jottr has joined #ruby
sh7d has quit [Ping timeout: 245 seconds]
Ven`` has joined #ruby
Technodrome has joined #ruby
sh7d has joined #ruby
Technodrome has quit [Remote host closed the connection]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
xco has joined #ruby
Ven`` has quit [Ping timeout: 246 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
Esa_ has joined #ruby
cd has joined #ruby
hiroaki has joined #ruby
jottr has joined #ruby
jottr has quit [Ping timeout: 258 seconds]
desperek has joined #ruby
<desperek> can i compile regex during the load time?
vondruch has quit [Remote host closed the connection]
vondruch has joined #ruby
<havenwood> desperek: You can assign a constant to a frozen Regexp. If you're interpolating, use the /o option to perform #{} interpolation only once.
<havenwood> FOO = /#{an}#{example}/o.freeze
<havenwood> BAR = /another example/.freeze
<desperek> but like, can i have a class, which uses regex and it compiles only once? havenwood
<havenwood> desperek: I'm not sure I get what you're asking. Have example code?
<havenwood> desperek: You can assign constants inside a class. They'll evaluate only once.
jenrzzz has joined #ruby
<desperek> havenwood, https://dpaste.de/0NG3
Swyper has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
<desperek> and i dont want it to recompile regex each time its initialized
jottr has joined #ruby
<havenwood> desperek: Try the same ^ but without the /o modifier.
<desperek> i dont need interpolation tb
<desperek> tbh
<havenwood> desperek: I think you'll find you don't have a problem then.
<havenwood> &24>> def foo; // end; Array.new(100) { foo }.uniq.one?
<rubydoc> # => true (https://carc.in/#/r/7g4u)
<desperek> thats some advanced lisp
desperek has left #ruby ["Closing Window"]
desperek has joined #ruby
john2496 has joined #ruby
<havenwood> desperek: To ease your mind, you can extract a constant if you like: FOO = //.freeze; def foo; FOO end
jottr has quit [Ping timeout: 248 seconds]
john2496 has quit [Remote host closed the connection]
sgen has joined #ruby
<havenwood> desperek: If you end up interpolating, use /o option or extract a constant or both.
yann-kaelig has joined #ruby
<desperek> mkay, thanks
sgen has quit [Max SendQ exceeded]
<desperek> i thought that regex would like reinitialize or something with each new class instance havenwood
sgen has joined #ruby
<havenwood> desperek: yes, you'd want to extract to a constant to avoid that.
<havenwood> desperek: A constant is shared between all instances.
<desperek> oh
<havenwood> desperek: And not reinstantiated.
<desperek> havenwood, so this is in the class definition, right?
<havenwood> desperek: Yes: class Some; FOO = //.freeze; def foo; FOO end end
<havenwood> desperek: That's a common pattern.
<desperek> i had no idea it worked like that
<havenwood> yup! it does
<desperek> thanks!
<havenwood> desperek: extract constant things to constants liberally. you're welcome!
<desperek> that's like magic :p
<desperek> so i could just make a hash of those regexes i need and just use them?
sh7d_ has joined #ruby
sh7d has quit [Ping timeout: 246 seconds]
sameerynho has joined #ruby
<havenwood> desperek: If you want to be fancy, you can also use Forwardable. https://gist.github.com/havenwood/ae9192500b9a10f3382d04a6852b31f7
<desperek> thanks but i think thats a bit of an overkill for my application really :x
SuperLag has quit [Ping timeout: 246 seconds]
SuperLag has joined #ruby
Exuma has joined #ruby
sh7d_ has quit [Ping timeout: 268 seconds]
sh7d has joined #ruby
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
nowhere_man has quit [Ping timeout: 252 seconds]
nowhere_man has joined #ruby
amateur_rubyist has joined #ruby
sh7d has quit [Ping timeout: 248 seconds]
sh7d has joined #ruby
jottr has joined #ruby
leitz has quit [Quit: Leaving]
hiroaki has quit [Quit: Leaving]
hiroaki has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
greengriminal has joined #ruby
sgen has quit [Ping timeout: 244 seconds]
nowhere_man has quit [Ping timeout: 250 seconds]
sgen has joined #ruby
greypack has quit [Ping timeout: 244 seconds]
greypack has joined #ruby
fphilipe_ has joined #ruby
fphilipe_ has quit [Ping timeout: 245 seconds]
sgen has quit [Remote host closed the connection]
sgen has joined #ruby
sgen has quit [Max SendQ exceeded]
sgen has joined #ruby
vel0city_netbook has joined #ruby
johnny56 has joined #ruby
fkg has quit [Remote host closed the connection]
fkg has joined #ruby
schneider has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
cyclonis has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
desperek has quit [Quit: mew wew]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
suukim has quit [Quit: Konversation terminated!]
nowhere_man has joined #ruby
duderonomy has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
DTZUZU has quit [Ping timeout: 245 seconds]
livcd has joined #ruby
sgen has quit [Remote host closed the connection]
sgen has joined #ruby
bitwinery has joined #ruby
sgen has quit [Max SendQ exceeded]
sgen has joined #ruby
nowhere_man has quit [Ping timeout: 245 seconds]
DTZUZU has joined #ruby
xco has quit [Quit: xco]
sgen has quit [Ping timeout: 245 seconds]
ravenous_ has joined #ruby
ravenous_ has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
vel0city_netbook has left #ruby ["Leaving"]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiroaki has quit [Ping timeout: 252 seconds]
orbyt_ has joined #ruby
mre- has joined #ruby
jottr has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
jottr has quit [Ping timeout: 258 seconds]
greengriminal has quit [Quit: This computer has gone to sleep]
code_zombie has joined #ruby
johnny56 has quit [Remote host closed the connection]
johnny56 has joined #ruby
jottr has joined #ruby
yasumi2136 has joined #ruby
wildtrees has joined #ruby
queip has quit [Ping timeout: 245 seconds]
jottr has quit [Ping timeout: 268 seconds]
fphilipe_ has joined #ruby
yasumi2136 has quit [Remote host closed the connection]
fphilipe_ has quit [Ping timeout: 250 seconds]
queip has joined #ruby
xco has joined #ruby
cyclonis_ has joined #ruby
cyclonis has quit [Ping timeout: 272 seconds]
deepreds1 has joined #ruby
vondruch has quit [Quit: vondruch]
jottr has joined #ruby
vondruch_ has joined #ruby
deepredsky has joined #ruby
deepreds1 has quit [Ping timeout: 268 seconds]
jottr has quit [Ping timeout: 248 seconds]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis_ has quit [Ping timeout: 250 seconds]
Esa_ has quit []
cyclonis has joined #ruby
cyclonis has quit [Max SendQ exceeded]
yann-kaelig has quit [Quit: yann-kaelig]
vondruch_ has quit [Remote host closed the connection]
queip has quit [Ping timeout: 258 seconds]
mre- has quit [Ping timeout: 246 seconds]
hightower2 has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
queip has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Max SendQ exceeded]
xco has quit [Quit: xco]
hightower3 has quit [Ping timeout: 245 seconds]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
Swyper has quit [Remote host closed the connection]
mre- has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
bitwinery has quit [Quit: Leaving]
cyclonis has joined #ruby
cyclonis has quit [Excess Flood]
hightower2 has quit [Changing host]
hightower2 has joined #ruby
cyclonis has joined #ruby
cyclonis has quit [Max SendQ exceeded]
cyclonis has joined #ruby
cyclonis has quit [Max SendQ exceeded]
r29v has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
cyclonis has joined #ruby
Nicmavr has joined #ruby
teardown has quit [Ping timeout: 258 seconds]
vondruch_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troulouliou_div2 has quit [Remote host closed the connection]
cd has quit [Quit: cd]
lucasb has quit [Quit: Connection closed for inactivity]
queip has quit [Ping timeout: 244 seconds]
mre- has quit [Ping timeout: 245 seconds]
sgen has joined #ruby
queip has joined #ruby
deepreds1 has joined #ruby
reber has joined #ruby
reber has quit [Remote host closed the connection]
deepredsky has quit [Ping timeout: 272 seconds]
jottr has joined #ruby
jottr has quit [Ping timeout: 246 seconds]
r29v has quit [Quit: r29v]
vondruch_ has quit [Quit: vondruch_]
vondruch_ has joined #ruby
schneider has quit [Ping timeout: 246 seconds]
queip has quit [Ping timeout: 245 seconds]
queip has joined #ruby
amateur_rubyist has quit [Remote host closed the connection]
mitt3ns has joined #ruby
agent_white has quit [Ping timeout: 272 seconds]
r29v has joined #ruby
queip has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
orbyt_ has joined #ruby
cyclonis has quit [Ping timeout: 264 seconds]
queip has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
amateur_rubyist has joined #ruby
sgen has quit [Ping timeout: 250 seconds]
sameerynho has quit [Ping timeout: 272 seconds]
tdy has joined #ruby
fphilipe_ has joined #ruby
fphilipe_ has quit [Ping timeout: 245 seconds]
vondruch_ has quit [Quit: vondruch_]
ellcs has joined #ruby
ellcs has quit [Max SendQ exceeded]
ellcs has joined #ruby
r29v has quit [Quit: r29v]
r29v has joined #ruby
r29v has quit [Remote host closed the connection]
dionysus69 has joined #ruby
nowhere_man has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
kyrylo has joined #ruby
hightower2 has quit [Ping timeout: 244 seconds]
d^sh has quit [Ping timeout: 272 seconds]
d^sh has joined #ruby