Swyper_ has quit [Remote host closed the connection]
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 265 seconds]
roshanavand_ is now known as roshanavand
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Emmanuel_Chanel has quit [Ping timeout: 256 seconds]
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
arekushi has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
Swyper has quit [Remote host closed the connection]
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
mikecmpbll has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
evdubs_ is now known as evdubs
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
cthu| has quit [Ping timeout: 258 seconds]
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 240 seconds]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
alfiemax has joined #ruby
Rudd0 has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Read error: Connection reset by peer]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
ap4y has quit [Ping timeout: 240 seconds]
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
pxl has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Ping timeout: 272 seconds]
pxl has quit [Quit: Leaving]
pxl has joined #ruby
cd has quit [Quit: cd]
alfiemax has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
blueFire has joined #ruby
blueFire has quit [Client Quit]
_whitelogger has joined #ruby
jordanm has quit [Ping timeout: 272 seconds]
mikecmpbll has quit [Ping timeout: 240 seconds]
jordanm has joined #ruby
mikecmpbll has joined #ruby
ChmEarl has quit [Quit: Leaving]
rafadc has joined #ruby
rafadc has quit [Ping timeout: 246 seconds]
pxl has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
rafadc has joined #ruby
alfiemax has joined #ruby
a-l-e has joined #ruby
dfucci has joined #ruby
vondruch has joined #ruby
rafadc has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
Swyper has quit [Read error: Connection reset by peer]
burgestrand has joined #ruby
Swyper has joined #ruby
rafadc has joined #ruby
Swyper has quit [Remote host closed the connection]
rafadc has quit [Read error: Connection reset by peer]
rafadc has joined #ruby
jobewan has quit [Ping timeout: 256 seconds]
Swyper has joined #ruby
jobewan has joined #ruby
Swyper_ has joined #ruby
Swyper has quit [Read error: Connection reset by peer]
dfucci has quit [Ping timeout: 240 seconds]
sleetdrop has joined #ruby
cuerbot has joined #ruby
elcuervo has quit [Ping timeout: 240 seconds]
akem has quit [Ping timeout: 264 seconds]
pentest1337 has joined #ruby
<pentest1337>
hi
<pentest1337>
!
ldepandis has joined #ruby
pentest1337 has left #ruby [#ruby]
dfucci has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
akem has joined #ruby
sagax has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
ur5us has joined #ruby
alfiemax has quit [Remote host closed the connection]
rafadc_ has joined #ruby
rafadc has quit [Ping timeout: 272 seconds]
BSaboia has joined #ruby
alfiemax has joined #ruby
rafadc_ has quit [Read error: Connection reset by peer]
rafadc has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
Swyper_ has quit [Remote host closed the connection]
Swyper has joined #ruby
sagax has joined #ruby
dfucci has quit [Ping timeout: 260 seconds]
mikecmpbll has quit [Ping timeout: 258 seconds]
imode has quit [Ping timeout: 272 seconds]
Technodrome has joined #ruby
mikecmpbll has joined #ruby
lanky_leguan has joined #ruby
donofrio has joined #ruby
alfiemax has quit [Remote host closed the connection]
<lanky_leguan>
rdoc delete_if says 'array is changed instantly every time the block is called', reject! says 'array may not be be changed instantly every time the block is called'; is that observable for me?
<lanky_leguan>
probably IN the block, right?
alfiemax has joined #ruby
akem_ has joined #ruby
TCZ has joined #ruby
akem has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
lanky_leguan has quit [Remote host closed the connection]
akem_ has quit [Ping timeout: 240 seconds]
TCZ has quit [Quit: Leaving]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<EdwardIII>
hey, i'm playing with minitest_benchmark for the first time, but i'm confused. i think assert_performance_constant should fail if the execution (or cpu time?) goes up. it looks like the numbers are going up, but the benchmark doesn't fail? https://gist.github.com/EdwardIII/b4cc6f9902962b5dea3cac82bbb8aa93
troulouliou_div2 has joined #ruby
mikecmpbll has joined #ruby
rafadc has joined #ruby
ramfjord_ has quit [Ping timeout: 240 seconds]
akem has joined #ruby
<jhass>
EdwardIII: constant doesn't mean independent of n
<jhass>
it tests that doubling n doesn't quadruple the time
<EdwardIII>
jhass: ah ok, it actually says 'you probably want to tighten it from the default', so i should do that then :)
<EdwardIII>
in my test i'm injecting in a double which is obviously lightning fast. but in reality it'll be an http request (i'm comparing a non-threading with a threading implementation. kinda for fun
<jhass>
yeah, it's probably not good for anything that does IO
<jhass>
benchmarking IO is very very hard
troulouliou_div2 has quit [Ping timeout: 265 seconds]
Rudd0^ has joined #ruby
Rudd0 has quit [Ping timeout: 272 seconds]
<EdwardIII>
jhass: i was wondering about that. is there some way to emulate io blocking calls with a test double? i'm guessing based on your comment the answer is "not easily" :)
burgestrand has quit [Quit: burgestrand]
stan has quit [Quit: killed]
turt2live has quit [Quit: killed]
MeVegan[m] has quit [Quit: killed]
Arkaniad has quit [Quit: killed]
nod0n[m] has quit [Quit: killed]
r34lp0w3r[m] has quit [Quit: killed]
Romain[m] has quit [Quit: killed]
sepp2k has quit [Quit: killed]
linuus[m] has quit [Quit: killed]
hsiktas[m] has quit [Quit: killed]
finn[m] has quit [Quit: killed]
<jhass>
I mean you could put a sleep call into a stubbed method body, but...
MeVegan[m] has joined #ruby
sleetdrop has quit [Ping timeout: 256 seconds]
<EdwardIII>
jhass: but? :)
<jhass>
I wouldn't be sure it unlocks the same locks
fercell has joined #ruby
<EdwardIII>
hmm right
<EdwardIII>
i guess as long as it's the kind of speed problem solved by threading in MRI it should show a big impact in the benchmarks
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
vondruch has quit [Ping timeout: 260 seconds]
neozor has joined #ruby
<neozor>
Hi! Just wanted to share some concerns i have of my OO design approach. I'm trying to put in practice The POODR by sandi metz, I'm building a very standard API which has a key and a series of get and post requests.
fercell has quit [Ping timeout: 260 seconds]
Nahra has quit [Ping timeout: 260 seconds]
<neozor>
When i'm dveloping APIs i always hesitate where the put the module that takes care of the http requests and json parsing if it's present. This time wanted to make that responsibility as a role, moving the actual http request parsing and json parsing to another role called requestable, then including that module in my API. I think this is a good approach because in the future i can reuse this module that only depends on the
<neozor>
'HTTP' gem.
<neozor>
The part where I'm not sure if this is really a role and I'm not separating responsibilities just for the sake of having less code in one file
<neozor>
Sometimes i'm not sure if I'm following the right path when working with modules and composition
drincruz has joined #ruby
<EdwardIII>
neozor: well it depends on what you think is good :) obviously rails devs thought it was fine, but a lot of people don't like ActiveRecord. i guess a more 'purist' approach would be to have a service class that serialises the objects and just use that everywhere, but i find ActiveRecord's approach is OK in small doses
<EdwardIII>
by adding this mixin to a class you are increasing it's responsibilities for sure, but you're also making it super easy to use, and keeping things in a logical place. so it's a trade-off :)
Nahra has joined #ruby
Nahra has quit [Client Quit]
wallace_mu has joined #ruby
<EdwardIII>
neozor: as for whether it's premature, i guess the right approach is, if it's only one object that needs it, leave it on there, and extract it when necessary using TDD along the way to ensure it does what you think
<EdwardIII>
(99 bottles of OOP is brilliant for this)
<neozor>
EdwardIII: When you say that is how ActiveRecord does it, should i take a look at the serializers Module?
akem has quit [Ping timeout: 240 seconds]
<EdwardIII>
neozor: well i meant just more from a perspective of "if activerecord does it, it can't be that bad", but opinions differ
weaksauce has quit [Ping timeout: 256 seconds]
Nahra has joined #ruby
<neozor>
what i often see is the 'able' suffix not being followed 100% of time. So every mixin is not taken as a role
Nahra has quit [Client Quit]
<neozor>
And sometimes is hard to follow this naming 'able' convention
<EdwardIII>
neozor: yesss, although maybe that's a sign that it's not the right thing to do in a mixin
<EdwardIII>
this is all very abstract :) got some code you can gist?
<neozor>
Sure, i can copy it. Should i follow some rule about sharing a gist? Is there a common tool used here?
wallace_mu has quit []
wallace_mu has joined #ruby
wallace_mu has quit [Client Quit]
Nahra has joined #ruby
<EdwardIII>
just pasting into gist and pasting the link is good i think. or do you have a public project on github?
<ruby[bot]>
neozor: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
bsdbandit-01 has quit [Excess Flood]
bsdbandit-01 has joined #ruby
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
akem has joined #ruby
vondruch has joined #ruby
alfiemax has quit [Remote host closed the connection]
BSaboia has quit [Quit: This computer has gone to sleep]
<EdwardIII>
neozor: for my money, if i was making this, i'd rather just have a HttpClient or something and not use a mixin like this (also what's with webinar/base?)
<EdwardIII>
i'd also be very careful about silently eating the RequestError
<EdwardIII>
neozor: i think you'll find using TDD really helpful. make the simplest, quickest, maybe even dirtiest thing that makes the test pass, then build up from there if you think you need it (e.g. if you now need to add some new functionality and it doesn't seem easy)
Technodrome has joined #ruby
Nahra has quit [Quit: leaving]
Nahra has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
stoffus has quit [Quit: leaving]
Nahra has quit [Quit: leaving]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weaksauce has joined #ruby
impermanence has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
<neozor>
EdwardIII: Thanks for the tips, I did my test suite first but from that side I'm covered
<EdwardIII>
neozor: it's more the "do the basics, then only change something if you need to" :)
<EdwardIII>
rather than just having tests at all
BSaboia has joined #ruby
ChmEarl has joined #ruby
mikecmpbll has joined #ruby
<neozor>
EdwardIII: I was silently eating the request errors because I wanted my frontend not to worry about communication errors, just checking empty means that is invalid
<neozor>
But maybe i need t move this validation a level up and make some intermediary between this API and my app
Emmanuel_Chanel has joined #ruby
<EdwardIII>
neozor: it can be useful to give a reason the app can report back on
<EdwardIII>
even if it's just "Sorry an error occured, try later"
<neozor>
that's true, i was delegating the case of having an error to an empty object, but is better to fail hard
<neozor>
Now that i see I'm making too much assumptions
<neozor>
EdwardIII: Thanks a lot for your contributions, at the moment I'm in a very small team and sometimes i don't have the opportunity to discuss my ideas to another colleague
<EdwardIII>
neozor: yeah, true of many people :) IRC is great for that
houhoulis has joined #ruby
neozor has quit []
bmurt has joined #ruby
bmurt has quit [Client Quit]
adu has joined #ruby
houhoulis has quit []
justache has quit [Remote host closed the connection]
justache has joined #ruby
fercell has joined #ruby
Technodrome has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
skryking has joined #ruby
<EdwardIII>
if you use rubocop: do you folks bother writing top level comments for classes? or just disable that rubocop rule for test cases? looking at our tests, those comments would just be pointless noise i think
<burgestrand>
EdwardIII for some, yes — I just joined a new project, and while the code-base is small/well-written I found it hard to parse what the purpose of some classes/modules existing
BSaboia has quit [Quit: This computer has gone to sleep]
<burgestrand>
I kept forgetting what a class was for, and so I had to re-read its code all the time to remind myself, eventually I just added 1-2 YARD paragraphs and that made things so much better
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adu has quit [Quit: adu]
Technodrome has joined #ruby
<havenwood>
EdwardIII: I disable the cops that offend me, which aren't that many.
<apotheon>
Taken out of context, that statement is hilarious.
<havenwood>
apotheon: Reminds me of years ago talking a bit too loud in a Mexican restaurant about how we should kill *all* the Unicorns, including the leader, and see how God handles it compared to Blue Pill.
<apotheon>
lovely
<Frankenlime>
kill all parents and orphans
<apotheon>
"After you kill parents, make sure you kill their orphans, too."
<havenwood>
Frankenlime: What about the zombie orphans of the parents I've killed?
<Frankenlime>
yeah but you have to kill -HEAD those
<EdwardIII>
havenwood: makes sense
pxl has joined #ruby
foxxx0 has quit [Quit: foxxx0]
foxxx0 has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
greengriminal has joined #ruby
burgestrand has quit [Quit: burgestrand]
TCZ has quit [Quit: Leaving]
mikecmpbll has joined #ruby
troulouliou_div2 has joined #ruby
cthu| has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
ramfjord has joined #ruby
cd has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
cthu| has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
ramfjord has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
troulouliou_div2 has quit [Ping timeout: 260 seconds]
greengriminal has joined #ruby
cthu| has quit [Read error: Connection reset by peer]
cthu| has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
ruurd has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
joshuacronemeyer has joined #ruby
akem_ has joined #ruby
akem_ has quit [Remote host closed the connection]
<arichiardi[m]>
it seems like the class is still initializing or something, I read about lazy init in rspec but I am too noob at the moment for understanding what's going on
<jhass>
well, it's quite specific. If you can publish some minimal case that reproduces it and people can just download to debug, it might be possible to figure out, but like this it's quite vague :)
<arichiardi[m]>
right...yeah ok I will try what I can do...unfortunaetly I am debugging in a docker container...not ideal but thanks jbass
<arichiardi[m]>
the culprit seems to be this deep_replace
alfiemax has quit [Remote host closed the connection]