kerunaru has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
Iskarlar has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
chadwtay_ has quit [Remote host closed the connection]
duderonomy has quit [Read error: Connection reset by peer]
ttilley has quit [Read error: Connection reset by peer]
michael_mbp has quit [Excess Flood]
hahuang65 has joined #ruby-lang
TheMoonMaster has quit [Ping timeout: 240 seconds]
alakra has quit [Ping timeout: 256 seconds]
michael_mbp has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
hahuang65 has quit [Ping timeout: 265 seconds]
TheMoonMaster has joined #ruby-lang
kerunaru has joined #ruby-lang
duderonomy has joined #ruby-lang
alakra has joined #ruby-lang
aghalarp has quit [Read error: Connection reset by peer]
havenwood has quit []
aghalarp has joined #ruby-lang
aghalarp has quit [Max SendQ exceeded]
aghalarp has joined #ruby-lang
Bertg has joined #ruby-lang
Randroid has joined #ruby-lang
Bertg has quit [Remote host closed the connection]
marr has joined #ruby-lang
Bertg has joined #ruby-lang
ljarvis has left #ruby-lang [#ruby-lang]
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RickHull_ has joined #ruby-lang
<RickHull_>
Hi, I was asking a few days about about remote execution lib. my apologies if anyone was annoyed by my pings.
Iskarlar has quit [Write error: Broken pipe]
Iskarlar has joined #ruby-lang
<RickHull_>
anyway, I said I would try to fill that gap, if it indeed exists in the ruby ecosystem. i had some specific requirements -- mainly ssh, output redirection story, failure handling story including retries and alerting
<jhass>
"An executable runsible is provided, which parses a YAML file which is provided as a command line argument. The YAML file defines the runlist and settings, while the command line options for runcible can override the YAML settings."
<DefV>
Apache config is a DSL for Apache configuration
<DefV>
Nginx config is a DSL
<rob_>
you wouldnt encapsulate abitrary data in a DSL
<toretore>
let's invent even more config formats
gwendall has joined #ruby-lang
<DefV>
well, ansible has it's own config format
<DefV>
it just adds the complexity in formatting it like YML
<DefV>
it's like saying "config is in JSON format, and you need to have a key "virtual_hosts", which has to be an array with the different virtual hosts
<DefV>
and if that's the case I prefer a DSL over smth like JSON/YML/XML
MagicHat has joined #ruby-lang
<apeiros>
DefV: ok
<apeiros>
toretore: we have the same opinion on something?
MagicHat has quit [Remote host closed the connection]
<toretore>
apeiros: hah
<toretore>
machine readable > human readable
<toretore>
i just like machines better than humans
<DefV>
but if you prefer machine readable, why not go with XML?
<apeiros>
toretore: depending on the use-case, I even agree there. but for config files, there exist sufficient formats which can be read by both humans and machines and don't artificially restrict you to a single language (which a DSL does)
<toretore>
sure
<apeiros>
I just wish I had gone ahead and finished my yaml like config file format. had some (IMO) ups over yaml in that it would have provided some primitive operations (concatenation e.g.) and something like a schema which would allow automatic dialog building (to guide you through config)
<ljarvis>
what about toml?
<toretore>
toml is stupid
<apeiros>
haven't heard of it
<ljarvis>
toretore: how so?
<toretore>
it's ambiguous
<ljarvis>
ah right
<toretore>
more human readable than machine readable
<ljarvis>
I haven't used it properly
<ljarvis>
that's what config files should be
<ljarvis>
human readable
<toretore>
no
<ljarvis>
well yes
<toretore>
machines come first
<toretore>
that's what they're meant for
<ljarvis>
if they're to be edited by a human
<ljarvis>
no
<toretore>
a human can understand machine-optimized formats, but not the other way around
<ljarvis>
lets store config files in zeros and ones then
chadwtaylor has joined #ruby-lang
<toretore>
i used to buy into this "humans first" bs, but i've seen the light
ta_ has quit [Remote host closed the connection]
<toretore>
"as an end user, i would like a magic button that does whatever i want it to do"
<oddmunds>
if your config is likely to be written by humans, i think it makes sense to make it easily writeable
<ljarvis>
that's what I think
<oddmunds>
computers are not that shit at reading
<ljarvis>
you expect a human to edit it, it should be human-friendly
chouhoulis has joined #ruby-lang
<ljarvis>
if not, who cares
<toretore>
computers *are* shit at reading
chouhoul_ has joined #ruby-lang
<ljarvis>
be cap
<ljarvis>
...
<ljarvis>
wow i haven't done that for a while
chadwtaylor has quit [Ping timeout: 245 seconds]
chouhoulis has quit [Ping timeout: 245 seconds]
<yorickpeterse>
I like how we have the same alias for bundle exec
<apeiros>
alias die=bundle exec
<apeiros>
die rails server
<apeiros>
it's german, of course. meaning the rails server. 0:-)
<jhass>
as you can see Regexp.union combines its arguments into one regexp
Musashi007 has quit [Quit: Musashi007]
_ko1 has joined #ruby-lang
gwendall has joined #ruby-lang
<jhass>
then we invoke gsub with a block, which takes the match as a param and should return a string which is used to replace the match
<jhass>
we look the match up in the hash and call .sample, which returns a random entry, on the resulting array
<jhass>
and as I explain that I realize for it to work you need to turn your regexp keys into strings
cpt_yossarian has quit [Ping timeout: 252 seconds]
thelastinuit has joined #ruby-lang
<doppler>
jhass: nice, thanks for the crash course in regexp =D
jwaldrip_______ has quit [Quit: Be back later ...]
jwaldrip_______ has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
bantic has joined #ruby-lang
<doppler>
jhass: it seems to work like a charm. are their any other way to write this script ive made... better way... =)?
tvon has joined #ruby-lang
<jhass>
doppler: I'm not sure why you put it into a class body
<doppler>
jhass : me neither.. haha
jwaldrip_______ has quit [Ping timeout: 245 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
jwaldrip_______ has joined #ruby-lang
ledestin has joined #ruby-lang
<jhass>
doppler: cipher also seems to want to be a CONSTANT
jwaldrip_______ has quit [Ping timeout: 245 seconds]
<doppler>
jhass: thanks for pointing it out
jwaldrip_______ has joined #ruby-lang
chrisrmno has joined #ruby-lang
Time14 has joined #ruby-lang
michaeldeol has joined #ruby-lang
jwaldrip_______ has quit [Ping timeout: 265 seconds]
dellavg_ has joined #ruby-lang
Musashi007 has joined #ruby-lang
minotep has quit [Ping timeout: 264 seconds]
shazaum has joined #ruby-lang
jwaldrip_______ has joined #ruby-lang
<darix>
doppler: what are you doing there exactly?
symm- has quit [Ping timeout: 256 seconds]
bb010g has joined #ruby-lang
minotep has joined #ruby-lang
<Time14>
Saw https://bugs.ruby-lang.org/issues/9644 which was fixed with the latest version of ruby just released and the suggestion to immediately update. How feasible is it that someone could really take advantage of this? It sounds like it mostly would just effect people who used that type of wildcard referenced by the bugzilla article attached to the issue.
<Time14>
I guess someone could trick a user to trust a wildcard cert and then be able to man in the middle attack them on any sites using an unpatched ruby version?
jwaldrip_______ has quit [Ping timeout: 245 seconds]
djbkd has quit [Remote host closed the connection]
bantic has quit [Quit: bantic]
djbkd has joined #ruby-lang
yatish27 has joined #ruby-lang
gwendall has quit [Remote host closed the connection]
Time14 has quit [Quit: Page closed]
baweaver has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
jwaldrip_______ has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
deg has quit [Ping timeout: 272 seconds]
chrisrmno has left #ruby-lang ["Textual IRC Client: www.textualapp.com"]
yatish27 has joined #ruby-lang
MXfive has joined #ruby-lang
godzilla_ has joined #ruby-lang
jwaldrip_______ has quit [Ping timeout: 245 seconds]
Miphix has quit [Quit: Leaving]
jwaldrip_______ has joined #ruby-lang
Iskarlar has joined #ruby-lang
<jhass>
patience!
skade has joined #ruby-lang
<jhass>
darix: learning the language, I suppose
jwaldrip_______ has quit [Ping timeout: 244 seconds]
djbkd has joined #ruby-lang
jwaldrip_______ has joined #ruby-lang
bantic has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
sarahdashdashp has quit [Quit: sarahdashdashp]
rcvalle has joined #ruby-lang
workmad3 has joined #ruby-lang
b_hoffman has quit [Quit: b_hoffman]
deg has joined #ruby-lang
jwaldrip_______ has quit [Ping timeout: 255 seconds]
froots has quit [Read error: Connection reset by peer]
Musashi007 has quit [Quit: Musashi007]
froots has joined #ruby-lang
stef204 has joined #ruby-lang
baweaver has joined #ruby-lang
jwaldrip_______ has joined #ruby-lang
centrx has quit [Quit: Shutting down, Please wait...]
baweaver has quit [Remote host closed the connection]
<RickHull>
my current testing regime is to run the examples ;)
yfeldblum has quit [Remote host closed the connection]
clayreed has quit [Remote host closed the connection]
cornerma1 has joined #ruby-lang
vipaca has joined #ruby-lang
vipaca has quit [Read error: Connection reset by peer]
morton has joined #ruby-lang
<morton>
what jobs are there for ruby without rails
<weaksauce>
i see
<RickHull>
you'll notice the module is written very deliberately and explicitly. zero magic IMHO, and rather complete in terms of logic branching based on hash values, etc. I will probably refactor into a class with some internal state at some point, and then tests will prove quite valuable
clayreed has joined #ruby-lang
cornerman has quit [Ping timeout: 246 seconds]
cornerma1 is now known as cornerman
nathanstitt has quit [Quit: I growing sleepy]
matp has joined #ruby-lang
matp_ has quit [Ping timeout: 265 seconds]
<RickHull>
extensive use of Hash#fetch. I'm anticipating most bugs in terms of failing fast causing unexpected behavior, leaving the remote side dirty or failing to alert
<pipework>
RickHull: Usually I notice that code is written accidentally and rather implicitly. However, where we begin to disagree is when tests prove valuable.
<RickHull>
outside of refactoring, i'm not sure how much local mocks and stubs can prevent such bugs
<pipework>
RickHull: Is this just a stream of conscious? I love these, but I need to get popcorn
<RickHull>
ha
<RickHull>
don't get me started...
<ljarvis>
you should have popcorn ready at all times, often since yorickpeterse does that 24/7
<pipework>
ljarvis: Some people don't deserve popcorn. yorickpeterse gets popecorn.
<RickHull>
i'm very interested in feedback and alternate design suggestions
morton has quit [Ping timeout: 246 seconds]
<ljarvis>
pipework: that sounds difficult to digest
b_hoffman has quit [Quit: b_hoffman]
<pipework>
ljarvis: But the tiny hats on each kernel are so cute!
<ljarvis>
:)
<RickHull>
pipework: any suggestions for how to approach testing? without involving the network?
<pipework>
RickHull: Level up your testing skills, probably.
<RickHull>
i can imagine some tests that target specific function sigs and impls, but that doesn't help in a refactor
<RickHull>
pipework: this is great advice
<ljarvis>
lol
<pipework>
You seem to have some idea, but don't really have a solid idea in your head just yet. For your project, I'd suggest just making a mess and looking for good ideas.
<clayreed>
It's back.
nertzy has quit [Quit: This computer has gone to sleep]
<pipework>
Testing is a very large and wide subject matter, to ask someone how to approach testing what you hope will become a useful library/framework isn't exactly a short conversation to have.
<RickHull>
IMHO, you end up with a lot of brittle tests that test very trivial things, once you start mocking remote stuff. i know I'm making the correct calls to Net::SSH already
<clayreed>
"This installation of RMagick was configured with ImageMagick 6.9.1 but ImageMagick 6.8.9-9 is in use."
<clayreed>
I have tried gem removing and gem installing rmagick.
<pipework>
RickHull: I think that's a sign of inexperience then.
<RickHull>
but i think i'm not seeing this from the right angle, if other folks see more value there
yfeldblum has joined #ruby-lang
<RickHull>
i'm all ears, if we can get beyond the platitudes to the specifics ;)
<weaksauce>
tests are very valuable imo
<pipework>
RickHull: I'm all for it, if we can step beyond the empty and shallow requests for advice for testing and to more specific scenarios where you describe behaviour, and implementation if you have it.
<pipework>
Go go go!
apt-get__ has joined #ruby-lang
djbkd has quit [Ping timeout: 276 seconds]
rcvalle has quit [Ping timeout: 250 seconds]
<RickHull>
given a remote host running ssh on a particular port, with key based authentication, runsible can ssh in, and execute a list of commands with per-command retries and alerting, as well as falling back to other runlists if any command ultimately fails
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shazaum has quit [Quit: Leaving]
apt-get_ has quit [Ping timeout: 264 seconds]
<pipework>
So you probably have a number of distinct systems that you can describe from that. Come up with their boundaries, find their interfaces, and then glue them all together.[
ldnunes has quit [Quit: Leaving]
<clayreed>
Alright, it was caused by two different versions of imagemagick.
<weaksauce>
RickHull perhaps look at the ssh lib that you are using for some examples of how they test
<pipework>
I mean, if I were you, I'd isolate myself from all dependencies by providing a consistent interface that encapsulates some behaviour and then treat that as a bridge or adaptor.
<pipework>
Starting with net-ssh
Respek_ has quit [Quit: gone to sleep. ZZZzzz…]
<pipework>
If you want to start off with that part of your system.
houhoulis has joined #ruby-lang
<RickHull>
so should i write tests before the refactor or after?
<RickHull>
(your hypothetical refactor)
<pipework>
What refactor?
Respek has joined #ruby-lang
<pipework>
I mean, I prefer to spike things I don't know, then I set that aside and TDD. That's me, but doesn't necessarily mean you'll have better code/tests/sex/waffles/projects/friends because of it.
<RickHull>
ok, so yeah, what I have now is probably a spike, and I can buy TDD at this point :)
djbkd has joined #ruby-lang
<pipework>
You probably ought to have tests at the end. I personally would set everything you have aside and use it as a reference for a rebuild. But that's because I feel like when I rewrite with the original close at hand, I have a better time of things and come up with cooler ideas.
<RickHull>
but that also explains the current (and likely future) lack of tests until the TDD refactor
elia has quit [Read error: Connection reset by peer]
<ljarvis>
hmm waffles
<pipework>
RickHull: no one ever actually cares in any meaningful way except you, so have fun!
elia has joined #ruby-lang
<RickHull>
yep, i'm here to get feedback to improve things :)
ur5us has joined #ruby-lang
sarahdashdashp has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
Torrieri has joined #ruby-lang
fedexo has joined #ruby-lang
apt-get__ has quit [Remote host closed the connection]
clayreed has quit [Remote host closed the connection]
toretore has quit [Quit: Leaving]
houhoulis has quit [Remote host closed the connection]
[dmp] has joined #ruby-lang
[dmp] has joined #ruby-lang
solars has quit [Ping timeout: 250 seconds]
tenderlove has joined #ruby-lang
sgambino has quit [Remote host closed the connection]
[dmp]_ has quit [Write error: Broken pipe]
kaleido has joined #ruby-lang
lytol has quit [Remote host closed the connection]
fedexo has quit [Read error: Connection reset by peer]
Blackhole has joined #ruby-lang
michaeldeol has joined #ruby-lang
wiwillia has quit [Quit: Page closed]
havenwood has quit []
havenwood has joined #ruby-lang
casshern2 has joined #ruby-lang
cartothemax has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
duderonomy has quit [Read error: Connection reset by peer]
centrx has quit [Quit: Shutting down, Please wait...]
centrx has joined #ruby-lang
duderonomy has joined #ruby-lang
cartothemax has quit [Ping timeout: 276 seconds]
Respek has quit [Read error: Connection reset by peer]
clayreed has quit []
<darix>
jhass: so what you are saying it is not worth to package diaspora?
clayreed has joined #ruby-lang
clayreed has quit [Client Quit]
skade has quit [Quit: Computer has gone to sleep.]
<jhass>
I'm saying it's still a crappy codebase, but ~20k users is enough to keep it alive for now. If you want to package it for something I won't hold you ;)
caseypatrickdris has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Respek has joined #ruby-lang
yatish27 has joined #ruby-lang
yatish27 has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
|jemc| has joined #ruby-lang
nedp has joined #ruby-lang
chadwtaylor has joined #ruby-lang
cartothemax has joined #ruby-lang
baweaver has joined #ruby-lang
baweaver has quit [Remote host closed the connection]
sarahdashdashp has quit [Quit: sarahdashdashp]
nedp has quit [Ping timeout: 245 seconds]
duderonomy has quit [Ping timeout: 252 seconds]
cartothemax has quit [Ping timeout: 250 seconds]
slawrence00 has quit [Ping timeout: 240 seconds]
sarahdashdashp has joined #ruby-lang
marr has quit [Ping timeout: 250 seconds]
baweaver has joined #ruby-lang
dm78 has joined #ruby-lang
hahuang65 has quit [Ping timeout: 256 seconds]
sarahdashdashp has quit [Quit: sarahdashdashp]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cartothemax has joined #ruby-lang
<darix>
jhass: what makes the code base so crappy in your eyes?