dionysus69 has quit [Read error: Connection reset by peer]
dionysus70 has joined #ruby
dionysus70 is now known as dionysus69
Laplace has joined #ruby
ur5us has joined #ruby
jpn has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
jpn has quit [Ping timeout: 276 seconds]
Vonter has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
hanzo has quit [Quit: Connection closed for inactivity]
Ziyan has joined #ruby
RickHull has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Read error: Connection reset by peer]
dionysus70 has joined #ruby
idiocrash has joined #ruby
idiocrash_ has joined #ruby
dionysus70 is now known as dionysus69
idiocrash has quit [Ping timeout: 256 seconds]
jpn has joined #ruby
r3m has quit [Quit: WeeChat 3.6-dev]
r3m has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
Sankalp has quit [Ping timeout: 260 seconds]
Sankalp has joined #ruby
Laplace has quit [Quit: Connection closed for inactivity]
r3m has quit [Quit: WeeChat 3.6-dev]
r3m has joined #ruby
idiocrash_ has quit [Ping timeout: 260 seconds]
mooff has quit [Remote host closed the connection]
mooff has joined #ruby
hanzo has joined #ruby
idiocrash has joined #ruby
idiocrash has quit [Ping timeout: 256 seconds]
idiocrash has joined #ruby
dionysus70 has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus70 is now known as dionysus69
z4kz has joined #ruby
swaggboi has quit [Ping timeout: 248 seconds]
z4kz has quit [Quit: Client closed]
swaggboi has joined #ruby
jpn has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
jpn has quit [Ping timeout: 248 seconds]
idiocrash_ has joined #ruby
idiocrash has quit [Ping timeout: 246 seconds]
jmcgnh has quit [Ping timeout: 248 seconds]
Thanzex has quit [Read error: Connection reset by peer]
Thanzex5 has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
vvmt0 has joined #ruby
vvmt0 has left #ruby [#ruby]
jpn has joined #ruby
vvmt0 has joined #ruby
vvmt0 has quit [Client Quit]
jpn has quit [Ping timeout: 256 seconds]
dionysus69 has quit [Read error: Connection reset by peer]
dionysus70 has joined #ruby
dionysus70 is now known as dionysus69
u0_a87 has joined #ruby
_ht has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus70 has joined #ruby
dionysus70 is now known as dionysus69
u0_a871 has joined #ruby
jpn has joined #ruby
u0_a87 has quit [Remote host closed the connection]
dionysus69 has quit [Quit: dionysus69]
dionysus69 has joined #ruby
u0_a871 has quit [Remote host closed the connection]
u0_a871 has joined #ruby
Ziyan has quit [Ping timeout: 248 seconds]
Ziyan has joined #ruby
Ziyan has quit [Client Quit]
dionysus69 has quit [Read error: Connection reset by peer]
dionysus70 has joined #ruby
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
dionysus70 is now known as dionysus69
dionysus70 has joined #ruby
dionysus70 has quit [Read error: Connection reset by peer]
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
Guest26nakilon has joined #ruby
<Guest26nakilon>
>> "asd"[/.#{/s/}./]
<Guest26nakilon>
anyway; is it possible to interpolate one regex into another one discarding its modes?
<Guest26nakilon>
more example, I have a regex REGEX_UUID = /\A[a-f0-9]{8}-[a-f0-9]{4}-[0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\z/ and I want to insert it into another regex but the \A\z thing makes it not match
dionysus69 has quit [Client Quit]
dionysus69 has joined #ruby
<Guest26nakilon>
or is the only way to remove \A\z from it and append them when I use it without interpolation?
<Guest26nakilon>
ohhh, I'm stupid, those are not modes at all, they are the part of the string, of course it won't work
dionysus69 has quit [Quit: dionysus69]
dionysus70 has joined #ruby
dionysus70 is now known as dionysus69
dionysus69 has quit [Quit: dionysus69]
dionysus70 has joined #ruby
u0_a871 has quit [Remote host closed the connection]
dionysus70 is now known as dionysus69
u0_a871 has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
u0_a871 has quit [Remote host closed the connection]
ur5us has joined #ruby
u0_a871 has joined #ruby
dionysus69 has quit [Quit: dionysus69]
dionysus69 has joined #ruby
Guest26nakilon has quit [Quit: Client closed]
oxfuxxx has joined #ruby
dionysus69 has quit [Remote host closed the connection]
Ziyan has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
u0_a871 has quit [Remote host closed the connection]
u0_a871 has joined #ruby
Guest26nakilon has joined #ruby
goldfish has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
Tempesta has quit [Quit: See ya!]
u0_a871 has quit [Quit: WeeChat 2.5]
jpn has quit [Ping timeout: 260 seconds]
Ziyan_ has joined #ruby
Tempesta has joined #ruby
Ziyan has quit [Ping timeout: 276 seconds]
dionysus69 has joined #ruby
protektwar has quit [Ping timeout: 260 seconds]
Tempesta has quit [Read error: Connection reset by peer]
<seydar>
wow i just learned about Enumerable::Lazy
<ox1eef>
havenwood seems to have deep knowledge about it, he has pasted gists using it in some interesting scenarios
<seydar>
i'll have to keep any eye out for his stuff
<seydar>
i'm shocked that today is the first time i'm hearing about lazy
moldorcoder7 has quit [Ping timeout: 250 seconds]
moldorcoder7 has joined #ruby
<seydar>
i was thinking about how i don't have a good grasp of how to do stream processing (e.g. IO -> gzip -> xml parsing), and then stumbled upon lazy as an option
<seydar>
i'm not sure if #lazy is the correct answer, but i'm excited to find out
ur5us has quit [Read error: Connection reset by peer]
ur5us_ has joined #ruby
ur5us_ has quit [Ping timeout: 240 seconds]
jpn has joined #ruby
<seydar>
also does anyone have any thoughts on vim vs neovim? am i just a caveman for still using vim?
oxfuxxx has quit [Ping timeout: 248 seconds]
jpn has quit [Ping timeout: 276 seconds]
Guest26nakilon has joined #ruby
<Guest26nakilon>
adam12, hi
<Guest26nakilon>
rubydoc.info has "permalink" anchor on methods, your site does not
<adam12>
seydar: I've switched back to VIM (from VSC + Vim bindings), and I didn't switch to Neovim because of the lack of a GUI. Fighting with 256 colour support is annoying in terminal.
<adam12>
Guest26nakilon: Interesting. Must be a theme thing. I'll look. Thanks.
twosuns has joined #ruby
<adam12>
seydar: There are Lua plugins for Neovim that aren't available for Vim (obviously), but if you're not using them yet you're not missing anything.
<adam12>
seydar: I say, just use what you're familiar with.
twosuns has quit [Quit: ...]
<seydar>
adam12: the boring answer is often the correct one
<seydar>
people in #haskell were saying similar stuff
<seydar>
but i'll prolly start checking out plugins so as to be less of a caveman
<seydar>
thanks!
seydar has quit [Quit: leaving]
Tempesta has quit [Read error: Connection reset by peer]
Tempesta has joined #ruby
Ziyan has joined #ruby
jpn has joined #ruby
mahlon has quit [Ping timeout: 248 seconds]
jpn has quit [Ping timeout: 260 seconds]
<ox1eef>
emacs was my thing before switching to vscode.
<ox1eef>
i kinda think emacs is the developers editor, and vim is the sysadmins editor.
<John_Ivan>
I see there's a .elements() method, which is great for enumerating children of the node you have selected
<John_Ivan>
is there any way I can get the next layer of nodes that are children to the node you have selected, but only that layer instead of the children's children?
<ox1eef>
is this a question or a statement of fact
<John_Ivan>
a question.
<ox1eef>
when i use nokogiri, i usually stick to using css selectors. have you tried that?
<John_Ivan>
yup. e.g if "div" has children "a, a, a, a, a" and each "a" has "img", I want only the "a's" returned, as an ElementCollection so I can iterate over that.
<John_Ivan>
ox1eef, I'm using that, yes.
<ox1eef>
then i can't think of how to do it beyond filtering those out.
<ox1eef>
in ruby-land.
<John_Ivan>
yeah. that's why I'm in a pickle :)
<John_Ivan>
there should technically be a ".subchildrenElements()" as opposed to just ".childrenElements()"
<John_Ivan>
where the latter one gives me "everything"
<ox1eef>
if you have an array of elements, who include children you don't need/want, then you might be able to exclude the ones further down by simple indexing, eg.. [0..-5] (include all but last 5)
<John_Ivan>
aye, so I thought. but it seems I managed to end up with a "single element" (which actually has subchildren and subsubchildren)
<John_Ivan>
so looping over it doesn't work and calling ".elements()" gives me everything rather than being able to loop only through the sublayer.
<ox1eef>
can you show some code, it's hard working purely in the land of theory
<John_Ivan>
sure
<John_Ivan>
ox1eef, doc.div(id: "favcontainer").elements().each() do | gallery_work |
<John_Ivan>
favcontainer has lots of a's
<John_Ivan>
and a's have lots of imgs.
<John_Ivan>
I only want to iterate over the a's.
<John_Ivan>
but that code above forces me to do so :(
<ox1eef>
why can't you do doc.css("#favcontainer a") - that'd give you the <a> elements, then you can read its attributes or go further down the chain to its children (the img tags)
<John_Ivan>
but yeah. I wanted to have the "a"s only.
<John_Ivan>
ox1eef, well. doc.css() will definitely work. which is cool. but there's no other way to do it without it is there?
<John_Ivan>
e.g no ".subchildren()" :( ?
<ox1eef>
not that i know of, you seem to be relying solely on the nokogiri api and i don't think that's as well known as css selectors, or documented that well.
<John_Ivan>
ox1eef, no worries. well, thank you then :)
<ox1eef>
sure
axisys has quit [Remote host closed the connection]
<John_Ivan>
which makes me believe that Nokogiri is not fond of data coming from mechanize that has been passed with a line feed.
<John_Ivan>
e.g in the url.
<ox1eef>
well, it is regular, that's how such characters have to be passed between http client and server.
<John_Ivan>
ox1eef, line = line.chomp() seems to fix everything. just gotta fix the massive parsing error now.
<ox1eef>
you should have a decode step to handle it
<ox1eef>
i wouldnt rely on that, decode and chomp, but definitely decode - that's a problem waiting to happen
<John_Ivan>
I hear ya.
<John_Ivan>
thanks
<ox1eef>
youre welcome
ur5us_ has joined #ruby
mr_tr0n has joined #ruby
<ox1eef>
time to learn how github actions work i guess, i prefer that than installing the jvm locally
<John_Ivan>
ox1eef, hmm?
<ox1eef>
i have a gem id like to test to see if it works on jruby, ive had bad luck with that in the past, it seems most code i write doesnt work on the jvm
<John_Ivan>
ah
<ox1eef>
bit of a headache but worth the effort all the same
<ox1eef>
plus the jruby are usually responsive, even if it doesnt work out in the end
<ox1eef>
the jruby team*
<John_Ivan>
ox1eef, working with java from ruby does sound like something worthwhile
<ox1eef>
yeah, it's suppose to be great for that, all of the java ecosystem at your fingertips
mr_tr0n has quit [Quit: mr_tr0n]
mr_tr0n has joined #ruby
mr_tr0n has quit [Client Quit]
<John_Ivan>
let's see
<John_Ivan>
50MB * 5000 = 250,000MB
<John_Ivan>
which is 250GB
<John_Ivan>
I'll need that much allocated for this...
<John_Ivan>
1 second * 150 = 150 seconds * 5000 = 750,000 seconds, is 12,500 minutes which is...208 hours...
<John_Ivan>
or 8.6 days.
<John_Ivan>
at 0.5 seconds, that'll be 4.2 days.
<John_Ivan>
0.25, 2.1 days.
<John_Ivan>
holy shit
<John_Ivan>
0.125 would be 1.05 days.
<John_Ivan>
24 f-ing hours.
<ox1eef>
for what?
<John_Ivan>
ox1eef, my "slightly more advanced" spider which is meant to download comics off a site
<John_Ivan>
ox1eef, I have about 5000+ favourited comics.
<John_Ivan>
ox1eef, I assumed 1 request a second since I download 1 image per page.
<John_Ivan>
but it'll take 8.6 days if I were to do that. which isn't a problem waiting. I'm just afraid the OS won't last that long.
<John_Ivan>
and requests every 0.125 seconds sounds like something the server might refuse or lock me out for "too many requests"
<John_Ivan>
ox1eef, I basically need to download 250GB worth of comics.
<weaksauce>
the OS?
<weaksauce>
as in operating system or some other initialism
<John_Ivan>
yes. windows.... tends to crash in any period longer than 2-3 days :P