adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.0.2, 2.7.4, 2.6.8: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
ivy31 has joined #ruby
<adam12> dviola: Looks OK to me
random-jellyfish has joined #ruby
<dviola> adam12: yeah, thanks
<adam12> cuppajoeman: Something is seriously wrong there...
<cuppajoeman> adam12: Yes, I realized that - I ended up going to ruby 2.7 following this random guide I stumbled across https://flyingcakes85.github.io/blog/jekyll/2021/05/24/jekyll-webricks-issue.html
<random-jellyfish> is there some gem that can help me find the main div on a webpage, for example in a news article I want to automatically extract the text of the article and ignore other text like title, navbar, menus, adds, etc. ?
<cuppajoeman> Which somehow solved my issue
postmodern has joined #ruby
<adam12> random-jellyfish: Nothing automatic AFAIK. You could use nokogiri or Oga and just work through some known selectors for main elements.
<adam12> cuppajoeman: Not even the TypeError is concerning; you have a segfault too. Glad you got it working on 2.7 tho.
<adam12> random-jellyfish: You'd need some sort of ML maybe. I saw a library for Python not too long ago.
<cuppajoeman> the weird thing is that I'm sure I followed two diff install instructions to a tee (arch linux one and then jekyll) one both with same result
<random-jellyfish> adam12 do you remember the name of the python lib?
<adam12> random-jellyfish: Checking my GH stars now :)
<adam12> random-jellyfish: This one I think: https://github.com/lorey/mlscraper
BSaboia has quit [Quit: This computer has gone to sleep]
<random-jellyfish> adam12 many thanks, will have a look at it
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
motherr has quit [Quit: zzz]
Munto has quit [Quit: Leaving]
jetchisel has quit [Ping timeout: 260 seconds]
ivy31 has quit [Quit: Client closed]
jetchisel has joined #ruby
gr33n7007h has joined #ruby
jetchisel has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
<dviola> adam12: let's say I want to create other classes, so that my class App won't grow too large, should I just pass r to other class/methods in that case?
Rounin has quit [Ping timeout: 244 seconds]
<dviola> and continue from there
<adam12> dviola: Depends on what your doing. If it's related to routing, look at the plugins for splitting apps. multi_route, hash_route, etc.
<adam12> dviola: If it's application code, then definitely split it out but I wouldn't pass in `r`. That's unnecessary binding.
<dviola> oh, interesting
<dviola> I'll check those, thanks
jetchisel has joined #ruby
<dviola> adam12: looks interesting as well: https://github.com/jeremyevans/roda#composition-
Intelo has joined #ruby
Intelo has left #ruby [#ruby]
crankharder has joined #ruby
_aeris_ has joined #ruby
aeris has quit [Ping timeout: 276 seconds]
_aeris_ is now known as aeris
BSaboia has joined #ruby
weaksauce has joined #ruby
niv has quit [Quit: Powered by LunarBNC: https://LunarBNC.net]
niv has joined #ruby
gravitongraves has joined #ruby
gravitongraves has quit [Quit: Iridium IRC Client]
gravitongraves has joined #ruby
crankharder has quit [Quit: leaving]
gravitongraves has quit [Remote host closed the connection]
random-jellyfish has quit [Quit: Client closed]
ur5us has quit [Ping timeout: 245 seconds]
ur5us has joined #ruby
_ht has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
shokohsc8 has quit [Read error: Connection reset by peer]
shokohsc8 has joined #ruby
infernix has quit [Ping timeout: 246 seconds]
infernix has joined #ruby
jpw has joined #ruby
teclator has joined #ruby
_ht has quit [Remote host closed the connection]
hololeap has quit [Remote host closed the connection]
hololeap has joined #ruby
fercell has joined #ruby
Rounin has joined #ruby
ur5us has joined #ruby
Sandlayth has joined #ruby
jmcgnh has quit [Ping timeout: 260 seconds]
jmcgnh has joined #ruby
ur5us has quit [Ping timeout: 245 seconds]
ur5us has joined #ruby
ur5us_ has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
Jonopoly has joined #ruby
CrazyEddy has quit [Ping timeout: 264 seconds]
roshanavand has joined #ruby
ur5us_ has quit [Ping timeout: 264 seconds]
xyhuvud_ has joined #ruby
yxhuvud has quit [Ping timeout: 260 seconds]
postmodern has quit [Quit: Leaving]
nakilon has quit [Quit: rasengan did nothing wrong]
Jonopoly has quit [Quit: WeeChat 3.3]
BSaboia has quit [Quit: This computer has gone to sleep]
motherr has joined #ruby
BSaboia has joined #ruby
quazimodo has quit [Ping timeout: 260 seconds]
shiru has joined #ruby
quazimodo has joined #ruby
nakilon has joined #ruby
quazimodo has quit [Ping timeout: 245 seconds]
steerpike has quit [Ping timeout: 276 seconds]
steerpike has joined #ruby
<adam12> dviola: I use the multi_route in most of my apps.
<nakilon> guys, to generate simple static html pages from markdown -- would you chose kramdown or pandoc-ruby?
<adam12> Pandoc is definitely more flexible, but it's another dependency.
<adam12> If you're only generating HTML, I'd just use kramdown. But I might try to build a markdown adapter that you can swap for pandoc if necessary.
<nakilon> looks like kramdown was made after pandoc according to the first section here https://kramdown.gettalong.org/syntax.html
<nakilon> *paragraph
<nakilon> I remember Jeff Atwood wanted to define own markdown and I've heard nothing since then
<nakilon> but lol, the website that is linked in that 2014 article is some crap, with some page about aimbots and banned video embedded; website says it's already has nothing to do with original authors
<nakilon> so they've implemented it and then abandoned?...
<adam12> Isnt' there another markdown that's standard? CommonMark?
<nakilon> Ш see
<nakilon> *I see
<nakilon> yeah they've renamed it
BSaboia has quit [Remote host closed the connection]
justHaunt has quit [Read error: Connection reset by peer]
justHaunt has joined #ruby
<dviola> adam12: interesting, I'll take a look, thanks
markong has joined #ruby
<dviola> I'm enjoying working with roda, Jeremy Evans gems are really good
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
shiru has quit [Quit: leaving]
Rounin has quit [Ping timeout: 260 seconds]
<adam12> dviola: I have lots of apps built on Roda + Sequel.
<dviola> adam12: nice
steerpike has quit [Remote host closed the connection]
darkxploit has left #ruby [#ruby]
exeqcius has joined #ruby
exeqcius has quit [Remote host closed the connection]
darkxploit has joined #ruby
roshanavand has quit [Ping timeout: 245 seconds]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
dviola has quit [Quit: WeeChat 3.3]
dviola has joined #ruby
dviola has quit [Quit: WeeChat 3.3]
roshanavand has joined #ruby
ur5us_ has joined #ruby
markong has quit [Ping timeout: 260 seconds]
donofrio has quit [Read error: Connection reset by peer]
ur5us_ has quit [Ping timeout: 245 seconds]
roshanavand has quit [Ping timeout: 260 seconds]
CrazyEddy has joined #ruby
Inline has quit [Ping timeout: 245 seconds]
<rapha> evening all
<rapha> is there a nice library not depending on curses for editing a string on the commandline? before reading it back with gets/etc.?
<rapha> oh, nevermind ... tty provides the answer as usual ... they have tty-prompt :P
jpw has quit [Remote host closed the connection]
_ht has joined #ruby
___nick___ has quit [Ping timeout: 260 seconds]
_ht has quit [Remote host closed the connection]
<cAMP> I was looking at Jeremy Evans Roda introduction. It says Roda applications are "meant to be frozen." What does a frozen application imply? Is it a process inside which the ruby interpreter is frozen?
<adam12> cAMP: Frozen means that mutable objects are "frozen". I quote frozen because nothing in Ruby is truly frozen.
<adam12> cAMP: So, let's say Roda maintains plugins inside an Array. Adding a plugin mutates that Array. But you don't want to mutate that Array when handling a request, as it might be a sign of something unsafe, so you call `freeze` after booting your app, and now that Array will raise a FrozenError if it's mutated, showing you that you might have an
<adam12> unsafe operation somewhere.
<adam12> cAMP: This generally means that when booting your Roda app, the call inside your config.ru would look something like `run App.freeze.app`
<adam12> Jeremy has a refridgerator gem that takes things a bit further. https://github.com/jeremyevans/ruby-refrigerator
ur5us_ has joined #ruby
<cAMP> All right, even more complicated than I could imagine.
<cAMP> So its an serialized frozen Roda app thats in App.freeze.app?
<cAMP> Hm, thats probably not it.
<adam12> cAMP: It's a Roda class that has had all it's internal objects frozen which prevent mutation.
<cAMP> It must mean some objects are frozen at about request time to make some objects safe to render.
<cAMP> adam12: right, so this freezing happens, for resource efficiency or?
<adam12> Some objects are more efficient when frozen (ie, strings), but I _think_ Jeremy's opinion is that it prevents unwanted bugs.
<adam12> You could ask in the Roda google group and Jeremy will probably provide clarification.
<cAMP> kewl, thanks for insight
<adam12> Cheers.
cer-0 has joined #ruby
cer-0 has quit [Client Quit]
goldfish has joined #ruby
mollerup has quit [Remote host closed the connection]
mollerup has joined #ruby
motherr has quit [Quit: zzz]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
markong has joined #ruby
justHaunt is now known as justache
goldfish has quit [Ping timeout: 260 seconds]
roshanavand has joined #ruby
motherr has joined #ruby
leonthemisfit has quit [Remote host closed the connection]
ur5us_ has quit [Ping timeout: 264 seconds]
Rounin has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]