<thoraxe>
soooo weird question. but i'm trying to look for some kind of ruby gem that "distills the dom" a'la https://chromium.googlesource.com/chromium/dom-distiller -- basically want to scrape a site but simplify its content for reader-type stuff
za1b1tsu has quit [Ping timeout: 264 seconds]
herbmillerjr has quit [Quit: Konversation terminated!]
r29v has quit [Quit: r29v]
arahael1 has joined #ruby
herbmillerjr has joined #ruby
arahael1 is now known as ArahaelPi
weaksauce has joined #ruby
fluxAeon has joined #ruby
FernandoBasso has quit [Remote host closed the connection]
<mroutis>
thoraxe: maybe you can run a headless chrome and call it as written on the documentation
<thoraxe>
there's python newspaper3k and a fresher python port of readability
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<thoraxe>
i could probably either make a flask python microservice or do some horrific python-from-ruby incantation
<thoraxe>
but it doesn't look like there's a good pure ruby solution
<thoraxe>
i think i did some horrible ruby-python stuff back in the day
s2013 has joined #ruby
dbz has quit [Remote host closed the connection]
postmodern has joined #ruby
t0xik has joined #ruby
s2013 has quit [Ping timeout: 240 seconds]
dbz has joined #ruby
Guest23176 has joined #ruby
nowhere_man has quit [Ping timeout: 272 seconds]
JoshS has quit [Quit: Leaving]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RedNifre has quit [Ping timeout: 264 seconds]
Guest23176 has quit [Ping timeout: 252 seconds]
Guest23176 has joined #ruby
lytol_ has quit [Remote host closed the connection]
orbyt_ has joined #ruby
dbz has quit [Remote host closed the connection]
Guest23176 has quit [Ping timeout: 240 seconds]
venmx has quit [Quit: leaving]
Tempesta has joined #ruby
thy0_ has quit [Quit: TTFN]
thy0 has joined #ruby
faitswulff has joined #ruby
s2013 has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arescorpio has joined #ruby
hurricanehrndz has joined #ruby
Guest32721 has quit [Quit: WeeChat 1.6]
jokester has joined #ruby
hurricanehrndz has quit [Quit: Goodbye]
hurricanehrndz has joined #ruby
hahuang65 has joined #ruby
vondruch has quit [Ping timeout: 264 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hurricanehrndz has quit [Ping timeout: 240 seconds]
faitswulff has quit [Remote host closed the connection]
Guest23176 has joined #ruby
faitswulff has joined #ruby
saiyanprince has joined #ruby
<saiyanprince>
Hi, where is ruby mostly used? what is ruby for?
Guest23176 has quit [Ping timeout: 272 seconds]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raulp has quit [Ping timeout: 244 seconds]
<mrush>
saiyanprince: web development, domain specific languages, and systems integration 'glue' language are some of the more commonly cited areas of popular use
saiyanprince has left #ruby [#ruby]
<mrush>
oh, also rapid prototyping is another one
orbyt_ has joined #ruby
darkhanb has joined #ruby
za1b1tsu has joined #ruby
vonfry has joined #ruby
dbz has joined #ruby
za1b1tsu has quit [Ping timeout: 244 seconds]
vonfry has quit [Quit: WeeChat 2.2]
Creatornator has joined #ruby
Guest23176 has joined #ruby
k0mpa has joined #ruby
akaiiro has quit [Ping timeout: 244 seconds]
polyidus has joined #ruby
cadillac_ has joined #ruby
Guest23176 has quit [Ping timeout: 240 seconds]
thy0 has quit [Quit: TTFN]
Guest23176 has joined #ruby
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akaiiro has joined #ruby
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
gothicsouth has quit [Quit: leaving]
\void has joined #ruby
Guest23176 has quit [Ping timeout: 252 seconds]
Guest23176 has joined #ruby
Guest23176 has quit [Ping timeout: 252 seconds]
Guest23176 has joined #ruby
polyidus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest23176 has quit [Ping timeout: 272 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tristanp has joined #ruby
venmx has joined #ruby
akaiiro has quit [Quit: Ping timeout (120 seconds)]
venmx has quit [Client Quit]
akaiiro has joined #ruby
tristanp has quit [Ping timeout: 272 seconds]
nofxx_ has quit [Remote host closed the connection]
<fork_fx>
rindolf: I do not know what you are trying to say to me with http://sscce.org. The posted link https://dpaste.de/GcqA is full executable ruby code. Of course i did not enclose a script to install a mysql database server and a create table for the database i am using. So in what way my question is lacking information here?
gigetoo has quit [Read error: No route to host]
<rindolf>
fork_fx: i mean that there should be best practices
gigetoo has joined #ruby
<rindolf>
fork_fx: rather than WTF?isies
jlebrech has quit [Remote host closed the connection]
<fork_fx>
rindolf: Sorry. I'm absolutely not getting to your point.
<rindolf>
fork_fx: nm
<rindolf>
fork_fx: nevermind
<mikhael_k33hl>
rindolf: hmmm, tried this one https://gist.github.com/marzdgzmn/f4c423327d56bfe37afea617d39d7152 still can't make it work. Why am I getting the error: NoMethodError: undefined method `to_sym' for #<Marz::Rsync::Result:0x00000000019918c0> when I've mocked it?
postmodern has quit [Quit: Leaving]
<rindolf>
mikhael_k33hl: something is not mocked
tristanp has joined #ruby
RedNifre has joined #ruby
<rindolf>
mikhael_k33hl: is your paste complete?
dbz has joined #ruby
Guest23176 has quit [Ping timeout: 276 seconds]
tristanp has quit [Ping timeout: 264 seconds]
Guest23176 has joined #ruby
dbz has quit [Ping timeout: 240 seconds]
RedNifre_ has joined #ruby
hahuang65 has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby
RedNifre has quit [Ping timeout: 264 seconds]
xt233 has joined #ruby
dhollin3 has joined #ruby
Zaab1t has joined #ruby
Guest23176 has quit [Ping timeout: 240 seconds]
Guest23176 has joined #ruby
dhollinger has quit [Ping timeout: 268 seconds]
jottr has joined #ruby
Beams has joined #ruby
druonysus has quit [Ping timeout: 272 seconds]
jottr has quit [Ping timeout: 268 seconds]
aufi has quit [Ping timeout: 268 seconds]
alex`` has joined #ruby
xall has joined #ruby
Zaab1t has quit [Quit: Zaab1t]
clorisu has joined #ruby
Puffball has quit [Remote host closed the connection]
Bish has joined #ruby
<Bish>
does unicorn really only serve 1 connection at a time by default?
<mikhael_k33hl>
I've stubbed my command module to return a mocked object
fork_fx has joined #ruby
Puffball has joined #ruby
dellavg_ has quit [Ping timeout: 272 seconds]
cadillac_ has quit [Read error: Connection reset by peer]
Puffball has quit [Remote host closed the connection]
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
cadillac_ has joined #ruby
rkoller has joined #ruby
cr1xu5 has quit [Quit: Leaving]
cr1xu5 has joined #ruby
<mikhael_k33hl>
Do you have to indicate the parameters to a stubbed method?
<balo>
Bish: nope. but you can set it to an envvar in the config file so you can run it like $ WORKERS=4 unicorn -c config/unicorn.rb
<balo>
given you have `worker_processes ENV.fetch('WORKERS').to_i` in your config
bijan_ has quit [Remote host closed the connection]
<balo>
my personal recommendation would be to use a different appserver. puma, phusion or some jruby based
<balo>
but we use unicorn for now as well because of _reasons_ and it with some experimenting with server numbers and sizes you can serve quite a lot of traffic with it
<mikhael_k33hl>
Tried mocking my module method via mock.expect(Marz::Rsync.run, result, ['/foo1', 'root@127.0.0.1:/foo2', ['-a']]) but I'm getting an error: ArgumentError: wrong number of arguments (given 0, expected 2..3)
jottr has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
<mikhael_k33hl>
I've selected minitest when I setup my gem, is there a way I can change it to rspec?
bijan_ has quit [Read error: Connection reset by peer]
jottr has joined #ruby
bijan_ has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
aninaki has joined #ruby
bijan__ has joined #ruby
bijan_ has quit [Ping timeout: 276 seconds]
bijan__ has quit [Ping timeout: 252 seconds]
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 264 seconds]
jottr has joined #ruby
gnufied has quit [Ping timeout: 240 seconds]
apparition has joined #ruby
bijan_ has joined #ruby
jespada has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
jespada has left #ruby [#ruby]
t0x has quit [Quit: Connection closed for inactivity]
bijan_ has joined #ruby
bijan__ has joined #ruby
fork_fx has quit [Quit: Verlassend]
bijan_ has quit [Ping timeout: 276 seconds]
bijan__ has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
bijan__ has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
apeiros_ has joined #ruby
LiftLeft2 has joined #ruby
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bijan_ has joined #ruby
LiftLeft has quit [Ping timeout: 265 seconds]
Zaab1t has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
Sprckt has left #ruby ["Leaving"]
thy0 has joined #ruby
MrGrymReaper has joined #ruby
<MrGrymReaper>
Hello.
<MrGrymReaper>
I'm currently wondering whether in Ruby you can do an array, but then have other variables which aren't sub arrays associated with it; for example string, integer, float etc?
venmx has quit [Quit: leaving]
<MrGrymReaper>
In otherwords 1 array but then say a nam
<MrGrymReaper>
I mean a name as in a first name, surname and age etc.
<MrGrymReaper>
Or some other place where this can come in handly. I managed to do something like this with the Visual Basic 6.0 in the past and really came in handy several times.
<MrGrymReaper>
Though are interested in doing this with Ruby as it can be a useful caching method for data as ram is often faster than accessing it from elsewhere. For example hard disks, or from another remote system.
bijan_ has quit [Ping timeout: 252 seconds]
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
Bish has quit [Remote host closed the connection]
g- has quit [Ping timeout: 276 seconds]
hdabrows has joined #ruby
<MrGrymReaper>
Or in Ruby game development where you have an inventory and you wish to create it from scratch. Using a array with multiple sub-variables (but not sub-arrays).
dbz has joined #ruby
bijan_ has joined #ruby
snickers has quit [Ping timeout: 264 seconds]
deathwishdave has joined #ruby
Puffball has joined #ruby
<ineb>
Sorry i dont understand your question
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
dionysus70 is now known as dionysus69
<MrGrymReaper>
I would like to define an Array in Ruby, but then not create sub-arrays. Though have additional values stored through strings, floats, integer, boolean etc.
<MrGrymReaper>
While being associated with the original array.
dbz has quit [Ping timeout: 268 seconds]
<ineb>
You mean like [1,2,3] + "Whatever" ?
bijan_ has quit [Ping timeout: 252 seconds]
<ineb>
with "Whatever" not really being loaded into the original array
<ineb>
but the new object knows about [1,2,3] and "Whatever"?
<MrGrymReaper>
Yes. and no the structure I'm talking about under VB would go something like Define MyArray().Firstname As String etc. Is there something similar for Ruby.
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
dionysus70 is now known as dionysus69
<ineb>
so you basically want an array with additional features?
<MrGrymReaper>
Yes!
AJA4350 has joined #ruby
<ineb>
you can subclass array if you want
<ineb>
but if you dont need the full feature set of an array for your purpose you can look into forwardable
<MrGrymReaper>
I'm new to Ruby is there any tutorials, documentation or code please - Gems?
<MrGrymReaper>
I'm currently learning Ruby but coming from Microsoft Visual Basic 6.0 Professional.
<apeiros_>
it's generally not advisable to subclass classes you don't own
argoneus_ is now known as argoneus
<apeiros_>
(Object & BasicObject being exempted for obvious reasons)
apeiros_ is now known as apeiros
<ineb>
i agree. forwardable makes more sense
<ineb>
but i wanted to distill the question. and it looks like its boils down 'how to enrich an existing class with features'
<ineb>
which can be done by inheritance :)
<MrGrymReaper>
When I do this is it possible for this to be considered for Ruby 2.6 as an additional feature of Array class. For the IO reasons I specified.
<apeiros>
indeed. alternative forms of inheritance are (applicability depends of course on what exactly you want to do): refinements, Module#prepend, Object#extend and in rarer cases Module#include
<apeiros>
(not entirely sure whether refinements actually truly belong into the inheritance "box")
mrush has quit [Quit: leaving]
bijan_ has quit [Read error: Connection reset by peer]
<apeiros>
but apart from refinements, inheritance should usually only be used for classes/objects you own
<ineb>
MrGrymReaper: iam still not sure what feature you want to implement. if its something for inventory management in a game, then its unlikely that it will land in the standard libraries :)
<ineb>
however, you can extend and use them as you like in your own environment
bijan_ has joined #ruby
<MrGrymReaper>
I'm talking about the extending the Array Class in a fashion where you don't always have to use sub arrays. But can use strings, etc in a fashion similar to the VB example given but in a Ruby format. As I found this feature from VB very useful many times and for many different uses. I was wondering whether it would also help Ruby's arrays feature.
<ineb>
Okay, maybe you are just looking for a Hash?
<ruby[bot]>
ineb: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
faitswulff has quit [Remote host closed the connection]
yohji has quit [Remote host closed the connection]
dbz has joined #ruby
<MrGrymReaper>
I'm not talking about hashes which can be accessed by keys. The method I'm reffering to coming from VB was an Array - as it still uses indexes. Though each array could contain many values and many subvariables. In a similar fashion to a database but without actually creating an actual database.
bijan_ has quit [Ping timeout: 252 seconds]
<ineb>
and how do you receive the values and subvariables?
<ineb>
if not by index or by key
gnufied has joined #ruby
<MrGrymReaper>
You define the the Array first in VB. Then define each subvariable.
[Butch] has joined #ruby
<ineb>
and a subvariable is a reference to a value in the array?
Alina-malina has quit [Ping timeout: 244 seconds]
<MrGrymReaper>
The values themselves are stored in the subvariables and the array becomes like a database record.
<ineb>
this doesnt provide any performance benefits regarding io
faitswulff has joined #ruby
dbz has quit [Ping timeout: 272 seconds]
cr1xu5 has quit [Read error: Connection reset by peer]
<ineb>
well, of course it does in c where you could just store an array of pointers instead of copying the actual value
<ineb>
but was that the case in VB?
bijan_ has joined #ruby
<MrGrymReaper>
In VB you could iterate through the array using a for loop or if you knew the index go straight to the value.
<ineb>
you can do that in ruby too
bijan_ has quit [Read error: Connection reset by peer]
za1b1tsu has quit [Read error: Connection reset by peer]
za1b1tsu has joined #ruby
MrGrymReaper has quit [Ping timeout: 252 seconds]
GodFather has quit [Ping timeout: 252 seconds]
segy has joined #ruby
GodFather has joined #ruby
cadillac_ has quit [Ping timeout: 268 seconds]
cadillac_ has joined #ruby
bijan_ has joined #ruby
orbyt_ has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
faitswulff has quit [Remote host closed the connection]
segy has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Client Quit]
segy has joined #ruby
tristanp has joined #ruby
bougyman has quit [Ping timeout: 255 seconds]
tristanp has quit [Ping timeout: 272 seconds]
bijan_ has joined #ruby
bougyman has joined #ruby
dhollin3 is now known as dhollinger
faitswulff has joined #ruby
Guest23176 has quit [Quit: WeeChat 2.1]
BuildTheRobots has quit []
BuildTheRobots has joined #ruby
bijan_ has quit [Ping timeout: 252 seconds]
GodFather has quit [Ping timeout: 264 seconds]
bijan_ has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
mroutis has joined #ruby
IanMalcolm has joined #ruby
dbz has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]
Rapture has joined #ruby
cadillac_ has joined #ruby
dbz has quit [Ping timeout: 252 seconds]
kryptoz has joined #ruby
kryptoz has quit [Remote host closed the connection]
<apeiros>
soooo… was this a bug in older rubies or is it a bug in newer rubies? ruby 2.3-: `FileUtils.rmdir(non_empty_dir)` -> no exception, ruby 2.4+: `FileUtils.rmdir(non_empty_dir)` -> Errno::ENOTEMPTY
<apeiros>
oh, actually it changes with ruby 2.5, not 2.4
* apeiros
reads ticket #3178
g- has joined #ruby
faitswulff has quit [Remote host closed the connection]
<apeiros>
uuuh, I'm blind? where the heck is the current changelog?
<apeiros>
I can only find one up to ruby 2.4
faitswulff has joined #ruby
tty has joined #ruby
croberts has joined #ruby
ogres has joined #ruby
shenghi has joined #ruby
cadillac_ has quit [Ping timeout: 252 seconds]
faitswulff has quit [Remote host closed the connection]