alfiemax has quit [Remote host closed the connection]
giorgian has quit [Ping timeout: 240 seconds]
giorgian has joined #ruby
alfiemax has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
nowhere_man has quit [Read error: Connection reset by peer]
chalkmonster has quit [Remote host closed the connection]
Xiti` has joined #ruby
Xiti has quit [Ping timeout: 240 seconds]
SCHAPiE has joined #ruby
dhollinger has quit [Ping timeout: 240 seconds]
dhollinger has joined #ruby
akem has joined #ruby
akem has quit [Max SendQ exceeded]
akem has joined #ruby
cnsvc has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has joined #ruby
henninb has joined #ruby
krillbat has quit [Quit: Connection closed for inactivity]
xco has joined #ruby
markopasha has joined #ruby
markopasha has quit [Max SendQ exceeded]
markopasha has joined #ruby
RiPuk has joined #ruby
jetchisel has quit [Ping timeout: 265 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jetchisel has joined #ruby
markopasha has quit [Quit: Leaving]
arup_r has joined #ruby
gdonald has joined #ruby
Pixi__ has joined #ruby
go|dfish has joined #ruby
Xiti` has quit [Ping timeout: 246 seconds]
<xco>
how do i extra the href and text from <a href="/entertainment/best-old-hollywood-classic-films-to-stream-right-now">Best old Hollywood films to stream right now</a> with Nokogiri?
<xco>
I don't want to use regex
bradfordli123 has quit [Remote host closed the connection]
<jhass>
just get the node and link["href"] and link.text
cnsvc has quit [Ping timeout: 240 seconds]
<xco>
jhass <a href="/entertainment/best-old-hollywood-classic-films-to-stream-right-now">Best old Hollywood films to stream right now</a> is of class Nokogiri::XML::Element
<jhass>
use p, which calls inspect, for debug prints
<xco>
jhass returns this
<xco>
#<Nokogiri::XML::Element:0x11fa8 name="a" attributes=[#<Nokogiri::XML::Attr:0x11f80 name="href" value="https://video.foxnews.com/v/6152098031001/">] children=[#<Nokogiri::XML::Text:0x11f94 "Hog farmer Brian Duncan on how COVID-19 is impacting food supply chains">]>
<xco>
i need the href value AND the text from this
<jhass>
travis going downhill is kind of a tradegy but was kinda to expect after they got bought by Idera. Many of their original staff left as a result
<jhass>
oh wait wrong channel :D
chalkmonster has joined #ruby
schne1der has joined #ruby
arcaos has joined #ruby
conta has joined #ruby
GodFather has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.8]
Technodrome has joined #ruby
<xco>
jhass thanks :)
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
sergioro has quit [Quit: leaving]
cnsvc has quit [Ping timeout: 240 seconds]
TCZ has joined #ruby
banisterfiend has quit [Ping timeout: 244 seconds]
tpanarch1st has quit [Quit: Thanks for your help, nice to see you, take care.]
tpanarch1st has joined #ruby
cnsvc has quit [Quit: WeeChat 2.8]
alfiemax_ has quit [Remote host closed the connection]
alfiemax has joined #ruby
cahoots has joined #ruby
<cahoots>
hi, i want to turn "{a,b}" into ["a", "b"], like bash sort of does with globbing. is there a standard ruby way of doing that?
alfiemax has quit [Ping timeout: 260 seconds]
<cahoots>
(note that there may not be any files named "a" or "b" in the current dir)
<havenwood>
cahoots: {a,b} is invalid syntax. say more?
<havenwood>
cahoots: ahhh
<havenwood>
cahoots: bash, gotcha
<cahoots>
yep
<cahoots>
and invoking a shell is too slow
<jhass>
validate start_with? && end_with?, strip the braces [1..-2] and .split?
<cahoots>
jhass, yeah, looks like i'll be doing that. was just curious if there was a std library solutin
<jhass>
there's File.fnmatch to validate a string against a glob pattern
<jhass>
your question is a bit XYy, so not sure
Ai9zO5AP has quit [Ping timeout: 240 seconds]
Ai9zO5AP has joined #ruby
<cahoots>
bracecomp gem ftw
ExoUNX has quit [Quit: I'm leaving these neckbeards]
drincruz has joined #ruby
drincruz has quit [Ping timeout: 260 seconds]
ExoUNX has joined #ruby
cahoots has quit [Quit: leaving]
<tty1>
hi... i am using a library and its giving me some trouble because there is a class that relies on static variables (variable shared by all instances of the class).. however it is causing problems and I effectively need to seperate out the static variables into their own isolated instances... is there some way to do that?
<havenwood>
tty1: It's best to avoid defining class variables or global variables, for sure.
<havenwood>
tty1: Show your code?
<tty1>
havenwood: its not "my code" im using a library, and that library ultimately seems to be a thin wrapper around a system level library... so unlikely it can be modified in the source itself.. but I am refering to the ncursesw library
<tty1>
havenwood: if you really want though I can share my code.. one sec ill link it
<tty1>
havenwood: but to explain the issue in context a little more.. the issue is the NCurses library is apparently designed for the typical use case of rendering an ncurses app on the local console, as you might expect.. but this is going over telnet with multiple clients, each needing to render their own ncurses encironment.. works fine when a single client is connected but crashes horrible when a second
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
<tty1>
This room is suprisingly dead for a quarintine... anyone know of any other chat rooms that might be more active?
Pixi__ has quit [Quit: Leaving]
SeepingN has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
<havenwood>
tty1: Offhand I can't think of an obvious solution other than a separate process per connection.
<tty1>
havenwood: i wouldnt mind seperate processes except that since this is an mmorpg Im not sure that would be workable without a complete rewrite
<tty1>
havenwood: there has got to be a way to force an eigenclass into multiple instances givent he hackability of ruby
Xiti has joined #ruby
<havenwood>
tty1: You could probably reopen Curses and change the class variables to thread local variables, but that sounds like an undertaking.
<havenwood>
tty1: It's certainly possible.
roadie has joined #ruby
<tty1>
havenwood: the thing is... im really just trying to work around a bug in the library in the first place
<havenwood>
tty1: A bug in curses?
<tty1>
havenwood: I think so, the wrapper is kind of thing but could be the wrapper itself
<tty1>
havenwood: normally this is solved with set_term.. thing is i am getting a segfault
<tty1>
havenwood: so I think its just because the ruby library is so old, problem is the more modern ruby curses library leave out the methods i need entierly so i cant update
ellcs has quit [Ping timeout: 240 seconds]
<tty1>
havenwood: this issue has been a thorn in my side for years I think ive rewritten this library for every curses ruby library there is over the years
roadie has quit [Ping timeout: 246 seconds]
ur5us has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Azure has joined #ruby
hiroaki has quit [Ping timeout: 240 seconds]
SuperL4g is now known as SuperLag
jeromelanteri has quit [Quit: Leaving]
drincruz has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roadie has quit [Ping timeout: 260 seconds]
mkroman has quit [Remote host closed the connection]
mkroman has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
cnsvc has joined #ruby
DTZUZU has joined #ruby
bwitt has joined #ruby
CrazyEddy has joined #ruby
Zubov has joined #ruby
imode has joined #ruby
roadie has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
roadie has quit [Ping timeout: 246 seconds]
schne1der has quit [Ping timeout: 244 seconds]
Technodrome has joined #ruby
emptyflask has quit [Quit: WeeChat 2.7.1]
dionysus69 has quit [Quit: dionysus69]
TomyWork has joined #ruby
s2013 has joined #ruby
Garb0 has quit [Remote host closed the connection]
Garb0 has joined #ruby
sticaz has quit [Quit: WeeChat 2.8]
rmnull has joined #ruby
<tty1>
well i think i may have solved it!\
wilhelm418 has quit [Remote host closed the connection]
roadie has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
drincruz has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
drincruz has quit [Ping timeout: 240 seconds]
Zubov has quit [Remote host closed the connection]
roadie has quit [Ping timeout: 240 seconds]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
jetchisel has joined #ruby
jinie has quit [Ping timeout: 256 seconds]
ta has quit [Ping timeout: 256 seconds]
infinityfye has quit [Quit: Leaving]
ta has joined #ruby
Garb0 has quit [Remote host closed the connection]
Garb0 has joined #ruby
jinie has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]