havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.1, 3.0.3, 2.7.5: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
roadie has joined #ruby
SobiX has quit [Quit: Client closed]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
roadie has quit [Ping timeout: 252 seconds]
markong has quit [Ping timeout: 246 seconds]
donofrio has quit [Ping timeout: 246 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 260 seconds]
mixfix41 has quit [Ping timeout: 246 seconds]
donofrio has joined #ruby
ur5us_ has joined #ruby
donofrio has quit [Remote host closed the connection]
donofrio has joined #ruby
favadi has joined #ruby
roadie has joined #ruby
Rounin has quit [Ping timeout: 256 seconds]
roadie has quit [Ping timeout: 260 seconds]
roadie has joined #ruby
slothby has quit [Ping timeout: 260 seconds]
slothby has joined #ruby
roadie has quit [Ping timeout: 256 seconds]
favadi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
swaggboi has quit [Ping timeout: 246 seconds]
<rapha> hi (UGT) all
<rapha> anyone know why it was decided that, in Ruby, /\h/ won't match a horizontal whitespace but /[ABCDEFabcdef\d]/ instead?
<rapha> also, scrolling back up a bit, wow, y'all had quite the day here o_O
swaggboi has joined #ruby
favadi has joined #ruby
roadie has joined #ruby
donofrio has quit [Ping timeout: 260 seconds]
roadie has quit [Ping timeout: 260 seconds]
emcb58 has joined #ruby
emcb5 has quit [Ping timeout: 246 seconds]
emcb5 has joined #ruby
emcb58 has quit [Ping timeout: 272 seconds]
donofrio has joined #ruby
o|||||o has quit [Ping timeout: 256 seconds]
seifeslimene has quit [Ping timeout: 250 seconds]
emcb57 has joined #ruby
emcb5 has quit [Ping timeout: 272 seconds]
emcb57 is now known as emcb5
donofrio has quit [Ping timeout: 260 seconds]
cahoots has joined #ruby
cahoots has quit [Ping timeout: 260 seconds]
rawley has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
<havenwood> rapha: hmm, I'd hot have thought horizontal whitespace. I guess many meanings per letter.
<havenwood> rapha: I do use \h
donofrio has joined #ruby
neshpion has joined #ruby
RedNifre has quit [Ping timeout: 260 seconds]
rawley has quit [Remote host closed the connection]
donofrio has quit [Ping timeout: 246 seconds]
mixfix41 has joined #ruby
teclator has joined #ruby
cahoots has joined #ruby
RedNifre has joined #ruby
cahoots has quit [Ping timeout: 256 seconds]
reset has quit [Quit: reset]
mooff has quit [Remote host closed the connection]
mooff has joined #ruby
davidw has quit [Ping timeout: 260 seconds]
roadie has joined #ruby
ur5us_ has quit [Ping timeout: 260 seconds]
roadie` has joined #ruby
roadie has quit [Ping timeout: 250 seconds]
roadie` has quit [Ping timeout: 256 seconds]
cahoots has joined #ruby
neshpion has quit [Quit: neshpion]
cahoots has quit [Ping timeout: 260 seconds]
roadie` has joined #ruby
nirvdrum has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roadie` has quit [Ping timeout: 260 seconds]
roadie` has joined #ruby
favadi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
libsys has quit [Ping timeout: 246 seconds]
libsys has joined #ruby
swaggboi has quit [Ping timeout: 260 seconds]
roadie` has quit [Ping timeout: 260 seconds]
favadi has joined #ruby
roadie` has joined #ruby
swaggboi has joined #ruby
roadie` has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
swaggboi has quit [Ping timeout: 272 seconds]
o|||||o has joined #ruby
swaggboi has joined #ruby
roadie has joined #ruby
ur5us_ has joined #ruby
ur5us has joined #ruby
ur5us_ has quit [Read error: Connection reset by peer]
<rapha> apparently the PCRE meaning is for it to be synonymous with [[:blank:]], havenwood ... and that surprised me as i always thought Ruby regexes _were_ PCRE regexes
dionysus69 has joined #ruby
hanzo has joined #ruby
Rounin has joined #ruby
donofrio has joined #ruby
donofrio has quit [Ping timeout: 272 seconds]
emcb54 has joined #ruby
emcb5 has quit [Ping timeout: 260 seconds]
emcb54 is now known as emcb5
<ccooke> rapha: The problem with regex is that there are many standards :-)
<ccooke> (substitute regex for basically most things in tech, except for the ones where there aren't *sufficient* standards)
SobiX has joined #ruby
mixfix41 has quit [Ping timeout: 260 seconds]
taupiqueur has joined #ruby
taupiqueur_ has joined #ruby
taupiqueur has quit [Ping timeout: 246 seconds]
slact[m] has quit [Quit: You have been kicked for being idle]
donofrio has joined #ruby
seifeslimene has joined #ruby
hanzo has quit [Quit: Connection closed for inactivity]
taupiqueur_ has quit [Quit: taupiqueur_]
taupiqueur has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us_ has joined #ruby
SobiX has quit [Ping timeout: 250 seconds]
ur5us_ has quit [Ping timeout: 256 seconds]
gproto23 has joined #ruby
jpn_ has joined #ruby
favadi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
favadi has joined #ruby
SobiX has joined #ruby
favadi has quit [Client Quit]
favadi has joined #ruby
jpn_ has quit [Quit: leaving]
jpn has joined #ruby
<mooff> 'now you have n+1 problems!'
howdoi has quit [Quit: Connection closed for inactivity]
seifeslimene has quit [Quit: Ping timeout (120 seconds)]
seifeslimene has joined #ruby
infinityfye has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.4.1]
perrierjouet has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
teclator has joined #ruby
favadi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
markong has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
favadi has joined #ruby
fef has joined #ruby
SobiX has quit [Ping timeout: 250 seconds]
gproto23 has quit [Remote host closed the connection]
gproto23 has joined #ruby
cahoots has joined #ruby
favadi has quit [Ping timeout: 256 seconds]
John_Ivan has joined #ruby
roadie has joined #ruby
cahoots has quit [Quit: leaving]
roadie has quit [Ping timeout: 260 seconds]
roadie has joined #ruby
<adam12> Morning
<ox1eef> g'morning
<mooff> morning
hololeap has quit [Quit: Bye]
Tempesta has quit [Read error: Connection reset by peer]
Tempesta has joined #ruby
oxfuxxx has joined #ruby
seifeslimene has quit [Quit: Client closed]
seifeslimene has joined #ruby
bit4bit has joined #ruby
emcb5 has quit [Ping timeout: 272 seconds]
markong has quit [Ping timeout: 256 seconds]
cahoots has joined #ruby
<cahoots> hi, i have JSON-parsing task that's time-intensive: `Dir["*.json"].map { |file| JSON.parse(IO.read(file)) }`. i want to use parallel execution to solve it (since third-party parser gems have only helped so much). `Parallel.map(Dir["*.json"]) { ... }` is actually slower, probably due to the marshalling between processes that has to go on. can ractors solve this problem? if so, does anyone know of a snippet
<cahoots> for doing efficient parallel map with ractors? (ideally using work-stealing)
<cahoots> ah hm, it looks like the parallel gem supports ractors...
<adam12> cahoots: Do you think you're CPU or IO bound?
Thanzex4 has quit [Read error: Connection reset by peer]
<cahoots> adam12, i'm not disk bound, because IO.read on its own, in serial or in parallel, is quite fast
Thanzex has joined #ruby
<cahoots> it looks like the parallel gem's ractors mode doesn't help here either, so actually i am curious to know of any existing snippet for parallel map with ractors
Spitfire has quit [Ping timeout: 256 seconds]
<adam12> cahoots: Do you max out the CPU in something like `top` when this runs?
<adam12> It's really hard to say without being able to reproduce it. if you don't parallel map and just kick off a bunch of threads, discarding the return values, does that improve performance?
<cahoots> adam12, to your latter question, the answer is moot since it won't help me
<cahoots> in that case, the parallel version is still slower, although not as much. so marshalling is indeed a problem
<ox1eef> mooff: i've taken what you said yesterday as far as i could, to the point for example that Proto#delete will be Proto.kernel.delete(proto, "prop") and not an instance method on Proto. the only instance methods will be those i couldn't put on Proto.kernel. Then the behavior will be that any property can be defined, except those that would break Proto from working.
taupiqueur has quit [Ping timeout: 260 seconds]
<cahoots> adam12, and yes the cpus do max out for a lot of the duration of the job
<ox1eef> s/break/stop/
crundar has joined #ruby
reset has joined #ruby
davidw has joined #ruby
dionysus69 has quit [Ping timeout: 272 seconds]
bit4bit has quit [Ping timeout: 250 seconds]
dev99p has joined #ruby
dev99p has quit [Client Quit]
taupiqueur has joined #ruby
seifeslimene has quit [Quit: Client closed]
taupiqueur has quit [Ping timeout: 272 seconds]
oxfuxxx has quit [Quit: [H]EAT ROX FUCK R0X SHIT BRIX.]
Numocha has joined #ruby
eddof13 has joined #ruby
taupiqueur has joined #ruby
splud has quit [Ping timeout: 256 seconds]
crundar has quit [Quit: Client closed]
<mooff> neat, ox1eef. how do you feel about it?
Numocha has quit [Quit: WeeChat 3.5]
oxfuxxx has joined #ruby
<ox1eef> i'm having a lot of fun :) it's nice to know the direction i'll take where as a few days ago i was stumped. in the end your comment is what turned on the light.
jpn has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
<ox1eef> it's a pretty interesting problem, openstruct took an interesting approach
<ox1eef> in my new implementation even @proto.__send__ is gone for "Proto.brain.call_method(@proto, :__send__, ...)" (yeah i also swapped kernelf for brain)
oxfuxxx has quit [Quit: [H]EAT ROX FUCK R0X SHIT BRIX.]
oxfuxxx has joined #ruby
oxfuxxx has quit [Quit: [H]EAT ROX FUCK R0X SHIT BRIX.]
oxfuxxx has joined #ruby
jpn has quit [Ping timeout: 256 seconds]
roadie has quit [Remote host closed the connection]
roadie has joined #ruby
oxfuxxx has quit [Client Quit]
eddof13 has quit [Ping timeout: 245 seconds]
roadie has quit [Ping timeout: 245 seconds]
_ht has joined #ruby
oxfuxxx has joined #ruby
jpn has joined #ruby
<mooff> Ruby object hacking is intoxicating lol
<ox1eef> indeed
<mooff> for usability, what if the brain methods were existed on Proto itself?
<ox1eef> such as Proto.delete, etc?
<mooff> yeah
<ox1eef> yeah i think that's a fair point, "Proto.brain" looks cuter though.
<mooff> :D
jpn has quit [Ping timeout: 240 seconds]
fef has quit [Quit: Leaving]
roadie has joined #ruby
oxfuxxx has quit [Quit: [H]EAT ROX FUCK R0X SHIT BRIX.]
oxfuxxx has joined #ruby
roadie has quit [Ping timeout: 250 seconds]
ur5us_ has joined #ruby
cahoots has quit [Quit: leaving]
jpn has joined #ruby
oxfuxxx has quit [Read error: Connection reset by peer]
niv has quit [Quit: Powered by LunarBNC: https://LunarBNC.net]
niv has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
roadie has joined #ruby
nirvdrum has joined #ruby
roadie has quit [Ping timeout: 245 seconds]
o|||||o has quit [Ping timeout: 260 seconds]
whysthatso12507 has quit [Read error: Connection reset by peer]
whysthatso12507 has joined #ruby
taupiqueur has quit [Ping timeout: 272 seconds]
o|||||o has joined #ruby
taupiqueur has joined #ruby
dionysus69 has joined #ruby
jpn has joined #ruby
infinity_fye has joined #ruby
donofrio has quit [Remote host closed the connection]
ur5us_ has quit [Ping timeout: 260 seconds]
infinityfye has quit [Ping timeout: 260 seconds]
donofrio has joined #ruby
taupiqueur_ has joined #ruby
taupiqueur has quit [Ping timeout: 260 seconds]
taupiqueur has joined #ruby
taupiqueur_ has quit [Ping timeout: 272 seconds]
splud has joined #ruby
gproto23 has quit [Remote host closed the connection]
ur5us_ has joined #ruby
dortal has joined #ruby
<dortal> ruby is not secure
dionysus69 has quit [Ping timeout: 246 seconds]
havenwood has quit [Quit: The Lounge - https://thelounge.chat]
havenwood has joined #ruby
ur5us_ has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
<adam12> dortal: You don't say.
<dortal> :)
<adam12> You should say Ruby is not $SAFE
<adam12> because it was removed mostly in 2.7
_ht has quit [Remote host closed the connection]
<dortal> ruby is safe but not safe.
<dortal> maybe insecure.
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
<weaksauce> metasploit is written in ruby q.e.d. ruby is more secure than the associated attacks against the other products.
<weaksauce> ez
jpn has quit [Ping timeout: 246 seconds]
ur5us has quit [Ping timeout: 252 seconds]
jpn has joined #ruby
<dortal> but it is mass assigned
jpn has quit [Ping timeout: 260 seconds]
hanzo has joined #ruby
jpn has joined #ruby
duds- has quit [Max SendQ exceeded]
duds- has joined #ruby
taupiqueur has quit [Ping timeout: 272 seconds]
<fcser> Are there any best practices / approaches for a simple script to visit a site, click a couple links, and submit a form? I'm guessing Nokogiri / Mechanize can do it easy enough but was curious if there are other options / best practices?
<weaksauce> fcser selenium maybe
<fcser> ya essentially like a capybara test
<fcser> but just going to another website not testing my app
<fcser> ok
<John_Ivan> fcser, nokogiri does simple html parsing. mechanize is a headless browser that can simulate clicks and what not. watir is the ruby wrapper for selenium.
<weaksauce> watir is another option
<fcser> ahh yes forgot about watir
<John_Ivan> selenium is a fully blown option for controlling a browser driver.
<fcser> ya my first attempts with capybara were annoying since it's more for rails testing
<fcser> thank you weaksauce and John_Ivan for the suggestions
<John_Ivan> I've had my fair share of time spent with all three. submitting a form and clicking only, would be mechanize
<John_Ivan> it'd be all you need.
<weaksauce> no problem fcser
oxfuxxx has joined #ruby
nirvdrum has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
o|||||o has quit [Ping timeout: 260 seconds]
taupiqueur has joined #ruby
dortal has quit [Ping timeout: 250 seconds]
nirvdrum has joined #ruby
gcd has quit [Ping timeout: 272 seconds]
oxfuxxx has quit [Quit: [H]EAT ROX FUCK R0X SHIT BRIX.]
gcd has joined #ruby
<John_Ivan> oh. rubyworks...
<John_Ivan> nevermind. i answered my own question.
<fcser> aye mechanize the ticket forgot how great it is thanks again
oxfuxxx has joined #ruby
<John_Ivan> wait. no. I didn't anyway, my question is - how come String::edit_distance() isn't present in ruby?
<John_Ivan> nvm. found alternatives.
<adam12> fcser: https://ferrum.rubycdp.com for a Chrome option.
o|||||o has joined #ruby
<leftylink> hm yes I remember when I implemented a did-you-mean type thing for an MMO I was playing at the time. took a while to calculate the edit distance for each string, doh
aindilis has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
aindilis has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
donofrio has quit [Ping timeout: 246 seconds]
jpn has quit [Quit: Lost terminal]
swaggboi has quit [Quit: C-x C-c]
rawley has joined #ruby
TomyWork has quit [Quit: Leaving]
mixfix41 has joined #ruby
infinityfye_ has joined #ruby
swaggboi has joined #ruby
infinity_fye has quit [Ping timeout: 260 seconds]
TomyWork has joined #ruby
TomyWork has quit [Remote host closed the connection]