Asher has quit [Read error: Connection reset by peer]
David_H_Smith has quit [Ping timeout: 272 seconds]
Asher has joined #ruby-lang
tenderlove has quit [Quit: Leaving...]
kalehv has joined #ruby-lang
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
wallerdev has quit [Quit: wallerdev]
lcdhoffman has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
lcdhoffman has quit [Client Quit]
Newbie0086 has joined #ruby-lang
lcdhoffman has joined #ruby-lang
rushed has joined #ruby-lang
SuMo_D has joined #ruby-lang
rushed has quit [Quit: rushed]
wallerdev has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
rushed has joined #ruby-lang
seank_ has quit [Remote host closed the connection]
kurko__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jdecuirm__>
Hi! i want some guidance in the way of learning ruby!
<jdecuirm__>
i am learning from a good book, as far as many told me, but i got rusty with programming
amclain has joined #ruby-lang
<jdecuirm__>
and i need like problems to practice, or something, is any good book with problems to solve to use all learned with ruby? hope you can help me!
fuhgeddaboudit has quit [Ping timeout: 264 seconds]
hahuang65 has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
_santana has joined #ruby-lang
_santana is now known as santana
g0bl1n has quit [Ping timeout: 250 seconds]
oak has joined #ruby-lang
mistym has quit [Remote host closed the connection]
<jdecuirm__>
In which cases is most commonly implemented Enumerable module?
seank_ has joined #ruby-lang
<jdecuirm__>
I mean, i can use a lot of the methods like select collect, each to traverse an array
<jdecuirm__>
but why is the purpose to implement it?
cantonic has joined #ruby-lang
seank_ has quit [Ping timeout: 244 seconds]
<womble>
jdecuirm__: I don't understand the question.
<santana>
don't you mean "included" instead of "implemented"?
amsha has joined #ruby-lang
<santana>
you include Enumerable when you want your object to behave like an enumerable one. It only makes sense to include it if your object is enumerable and you actually want to treat it like so.
<jdecuirm__>
yeah sorry
<pipework>
santana: You can also implement #<=> if that helps.
<jdecuirm__>
can you give me an example? meaning in a real program, just to see the need of Enumerable, a little example would be great!
<zenspider>
but spaceship operator is for Comparable
<pipework>
You know, that would make sense.
<zenspider>
class Zoo; include Enumerable; def each(&b); animals.each(&b); end; end
<santana>
SequentialCursor, is a cursor for an Informix database
<santana>
you can iterator over a set of records
<jdecuirm__>
thanks santana!
<jdecuirm__>
i had this doubt about Enumerable because many of the methods behave the way you want even without having to include Enumerable
<pipework>
zenspider: Is your spirit animal "Anything that doesn't take shit from nobody"?
<santana>
so, you just define #each and you gain many methods more "for free"
lcdhoffman has joined #ruby-lang
marcdel has joined #ruby-lang
<jdecuirm__>
if i'm not doing anything complex, i can just define each(variable) and yield it?
<womble>
jdecuirm__: Normally you don't pass a variable to each
<womble>
But apart from that, yes
<jdecuirm__>
yeah true! thanks womble
<santana>
jdecuirm__: you define #each to yield something, supposedly an element of your enumerable object :)
JohnBat26 has joined #ruby-lang
<pipework>
Well, you define #each. You can pass a block to any method you want already, but it's assumed you probably do something with that block.
kalehv_ has joined #ruby-lang
hahuang65 has quit [Ping timeout: 272 seconds]
<jdecuirm__>
i'm checking a simple example on the web, so, for getting more methods you implement each, so, the real function of Enumerable is to get more methods?
<santana>
yes
lcdhoffman has quit [Client Quit]
<santana>
handy methods for your object
<santana>
if your object can define a meaningful #each method
kalehv has quit [Ping timeout: 255 seconds]
<santana>
that's the purpose of mixin modules
<jdecuirm__>
thanks santana!
<santana>
Comparable is another
<jdecuirm__>
for example, i implement each just to yield a value
<jdecuirm__>
then i pass an array with a block
lcdhoffman has joined #ruby-lang
<jdecuirm__>
every object in the array will be yielded just like it acts normally right?
djbkd has quit [Remote host closed the connection]
<zenspider>
what? my Zoo example wasn't perfect?
<jdecuirm__>
hahahaha
<jdecuirm__>
sorry zenspider, i am a little rusty with coding
<jdecuirm__>
as in my job i do other things, i am learning how to code daily
<santana>
jdecuirm__: you don't pass an array with a block. Your object should hold, or be able to fetch, a set of data that you would yield one by one with the #each method you define in its class
<santana>
so, your object would take place of the array you have in mind
<jdecuirm__>
ok let me write a little example!
<santana>
what do you use for pasting code?
<zenspider>
jdecuirm__: so the point of Enumerable is that yes, they look just like what you'd want them to do, but they don't know HOW to do it on what you want to do it upon. that's why they have a contract on #each existing.
<jdecuirm__>
gist? xd
<jdecuirm__>
that was very clear zenspider, thanks a lot!
mistym has joined #ruby-lang
djbkd has joined #ruby-lang
<jdecuirm__>
wait...
<jdecuirm__>
for example if i only need it to use it with arrays, do i have to re open array class?
<santana>
no, Array already includes it
<jdecuirm__>
Oh...
<jdecuirm__>
wait, i'll need to shoot myself in the head.
<santana>
I see where you are now :) Don't bother about Enumerable or Mixins yet
<jdecuirm__>
I feel this book it's good but there's not a lot of practice to understand
<jdecuirm__>
many many concepts, but not much of exercises
<santana>
yeah, that's the problem with books. They want to teach from A to Z
<santana>
but some of us are better learning by example
<santana>
by project, by doing
<jdecuirm__>
exactly! so, many concepts i assume, ok, i understand the theory, but what about a real situation?
<santana>
either go to the chapters that seem interesting to you, or find another book
snsei has joined #ruby-lang
<santana>
anyways, here's an example of including Enumerable
<mikecmpbll>
that'll do it in mysql, won't work in postgres tho
<mikecmpbll>
lose one closing bracket, too.
<mikecmpbll>
wrong window, epic..
<DefV>
that's one of the reasons I dislike rspec
<DefV>
assert_* all the way!
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
<zenspider>
DefV: YAY
<maloik>
rspec in this case was the faster way because I'm still more familiar with it than with minitest
<DefV>
assert_not_rspec
<maloik>
I've used minitest for a gem recently and I'll probably end up using it for a new project too since I'll almost be the only developer on it
<maloik>
that reminds me
sideshowcoder has joined #ruby-lang
<maloik>
is there any reason why the readme isn't in markdown? each town I end up on the minitest github I think "oh this can't be right, it looks unmaintained"
<maloik>
probably just me of course :D but still
<maloik>
md is so pretty on github
benlovell has quit [Ping timeout: 245 seconds]
gjaldon has joined #ruby-lang
tkuchiki has quit [Ping timeout: 245 seconds]
ldnunes has joined #ruby-lang
ta has joined #ruby-lang
allomov has joined #ruby-lang
ta_ has quit [Ping timeout: 272 seconds]
snsei has joined #ruby-lang
NoNMaDDeN has quit [Remote host closed the connection]
<yorickpeterse>
ddfreyne: ^ built with nanoc, so thanks for making that
charliesome has quit [Quit: zzz]
<yorickpeterse>
even uses node.js
* yorickpeterse
is dead serious there
<ljarvis>
for scale?
jmrepetti has joined #ruby-lang
mamantoha has joined #ruby-lang
<ljarvis>
silly question of course it's to scale
<maloik>
maybe he wanted to be closer to the metal \o/
<maloik>
\m/ sorry
<ljarvis>
should of used rust
<ljarvis>
(actually sorry)
<yorickpeterse>
ljarvis: No, to generate a search index
<yorickpeterse>
which uses a JS lib
<maloik>
hahaha, rust
<maloik>
clever you!
benlovell has joined #ruby-lang
jgpawletko has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
jgpawletko has quit [Client Quit]
ender|dkm has quit [Ping timeout: 255 seconds]
<DefV>
yorickpeterse: is it generated doc from code, generated from specs, or just plan HTML?
<yorickpeterse>
DefV: We yank source docs (using YARD) from the code, dump that into a JSON file, then convert that to Markdown
<yorickpeterse>
The JSON dumping happens in the API project, the other part in the portal source code
<yorickpeterse>
it's a bit like how Swagger does it
<DefV>
how do you do versioned documentation
<DefV>
or is v1 a hardcoded route?
<yorickpeterse>
routes are scoped to /v1 in the API. For new versions we'll move the docs to a subdomain
<yorickpeterse>
I cbf having one repository containing everything for multiple versions
face has quit [Ping timeout: 265 seconds]
<yorickpeterse>
well subdomain, or a dub directory
<yorickpeterse>
so developer.olery.com would always point to the stable version
<yorickpeterse>
but developer.olery.com/vXXXX would point to a specific version
<yorickpeterse>
I actually want to get rid of API versioning alltogether
<yorickpeterse>
and instead just not break shit, instead providing a decent upgrade path
workmad3 has quit [Ping timeout: 258 seconds]
<yorickpeterse>
If you keep old versions around people will continue using that anyway until the very last moment
<DefV>
hm
workmad3 has joined #ruby-lang
mamantoha has quit [Ping timeout: 272 seconds]
NoNMaDDeN has joined #ruby-lang
GBrawl has joined #ruby-lang
GBrawl has quit [Client Quit]
Xzanron has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ledestin has quit [Ping timeout: 265 seconds]
ledestin has joined #ruby-lang
mamantoha_ has joined #ruby-lang
kurko__ has joined #ruby-lang
seank_ has joined #ruby-lang
q_leonetti has quit [Quit: q_leonetti]
face has joined #ruby-lang
x0f has quit [Ping timeout: 250 seconds]
x0f has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 244 seconds]
q_leonetti has joined #ruby-lang
jo__ has quit [Quit: Connection closed for inactivity]
benlovell has joined #ruby-lang
skade has joined #ruby-lang
kaczmar has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
arooni-mobile has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
gjaldon has joined #ruby-lang
GBrawl has joined #ruby-lang
benlovell has quit [Ping timeout: 255 seconds]
workmad3 is now known as wm3|away
godd2 has joined #ruby-lang
yusuf1 has quit [Quit: Leaving.]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has joined #ruby-lang
Paradox has quit [Ping timeout: 272 seconds]
tbuehlmann has quit [Remote host closed the connection]
banister has joined #ruby-lang
cornerma1 has joined #ruby-lang
hinbody has joined #ruby-lang
cornerman has quit [Ping timeout: 255 seconds]
cornerma1 is now known as cornerman
GBrawl has quit [Quit: (null)]
jimbach has joined #ruby-lang
jimbach has quit [Remote host closed the connection]
jimbach has joined #ruby-lang
spastorino has joined #ruby-lang
benlovell has joined #ruby-lang
sepp2k has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
gjaldon has joined #ruby-lang
kaczmar has quit [Quit: kaczmar]
cantonic has joined #ruby-lang
dwknoxy has joined #ruby-lang
shinnya has joined #ruby-lang
GBrawl has joined #ruby-lang
arBmind has joined #ruby-lang
kalehv has joined #ruby-lang
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wm3|away has quit [Ping timeout: 255 seconds]
kalehv has quit [Remote host closed the connection]
dorei has joined #ruby-lang
kaczmar has joined #ruby-lang
GBrawl has quit [Quit: (null)]
jmrepetti has quit [Remote host closed the connection]
cleopatra has quit [Ping timeout: 264 seconds]
g0bl1n has joined #ruby-lang
g0bl1n has joined #ruby-lang
jmrepetti has joined #ruby-lang
chouhoulis has joined #ruby-lang
chouhoul_ has quit [Read error: Connection reset by peer]
<maloik>
Anyone using sidekiq's delay extensions? I'm writing tests by inlining sidekiq, checking the size of the DelayedModel jobs queue... it gets added, but even after timetraveling with timecop it doesn't actually remove it
<maloik>
trying to figure out if that's expected behaviour
[spoiler] has joined #ruby-lang
kaczmar has quit [Quit: kaczmar]
ironhide_604 has joined #ruby-lang
jmrepetti has quit [Remote host closed the connection]
jxpx777 has joined #ruby-lang
Sunlorhic has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 244 seconds]
<maloik>
I'm mistaken, it doesn't even get added, only when running in fake
wm3|away has joined #ruby-lang
caseydriscoll has quit [Remote host closed the connection]
tbuehlmann has joined #ruby-lang
hinbody has quit [Quit: leaving]
enebo has joined #ruby-lang
caseydriscoll has joined #ruby-lang
haraoka_ has quit [Ping timeout: 255 seconds]
malconis has joined #ruby-lang
mattyohe has joined #ruby-lang
jmrepetti has joined #ruby-lang
SuMo_D has joined #ruby-lang
snooc has joined #ruby-lang
oleo has joined #ruby-lang
mikecmpb_ has joined #ruby-lang
arBmind has quit [Ping timeout: 250 seconds]
SuMo_D has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 256 seconds]
SuMo_D has joined #ruby-lang
elia has quit [Read error: Connection reset by peer]
nelsonsar has joined #ruby-lang
nelsonsar has quit [Remote host closed the connection]
miqui has joined #ruby-lang
nelsonsar has joined #ruby-lang
elia has joined #ruby-lang
arBmind has joined #ruby-lang
SuMo_D has quit [Ping timeout: 264 seconds]
hinbody has joined #ruby-lang
dangerousdave has joined #ruby-lang
shinnya has quit [Ping timeout: 265 seconds]
mnngfltg has joined #ruby-lang
cantonic has quit [Read error: Connection reset by peer]
cantonic has joined #ruby-lang
kalehv has joined #ruby-lang
wm3|away is now known as workmad3
amigo99 has joined #ruby-lang
kalehv has quit [Ping timeout: 240 seconds]
elia has quit [Read error: Connection reset by peer]
elia has joined #ruby-lang
xwq17 has quit [Quit: leaving]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jg has quit [Quit: Leaving]
charliesome has quit [Quit: zzz]
cantonic has quit [Read error: Connection reset by peer]
cantonic has joined #ruby-lang
cantonic has quit [Client Quit]
loincloth has joined #ruby-lang
havenwood has joined #ruby-lang
g0bl1n has quit [Quit: Leaving]
amsha has joined #ruby-lang
clauswit_ has joined #ruby-lang
benlovell has quit [Ping timeout: 258 seconds]
clauswitt has quit [Ping timeout: 250 seconds]
clauswit_ has quit [Ping timeout: 240 seconds]
tenderlove has joined #ruby-lang
q_leonetti has quit [Ping timeout: 265 seconds]
mskaesz has joined #ruby-lang
mkaesz has quit [Ping timeout: 264 seconds]
csaunders has joined #ruby-lang
tharindu has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
csaunders has quit [Client Quit]
snsei has joined #ruby-lang
snsei has quit [Remote host closed the connection]
mskaesz has quit [Ping timeout: 264 seconds]
nathanstitt has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
mkaesz has joined #ruby-lang
whippythellama has joined #ruby-lang
RobertBirnie has joined #ruby-lang
apeiros has quit [Ping timeout: 256 seconds]
imperator has joined #ruby-lang
araujo has joined #ruby-lang
gjaldon has joined #ruby-lang
jo__ has joined #ruby-lang
tkuchiki has joined #ruby-lang
cmhobbs has joined #ruby-lang
cmhobbs has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
mikecmpbll has joined #ruby-lang
mikecmp__ has joined #ruby-lang
mikecmpb_ has quit [Ping timeout: 244 seconds]
mistym has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
mikecmpbll has quit [Ping timeout: 250 seconds]
arooni-mobile has quit [Ping timeout: 258 seconds]
nelsonsar has quit [Remote host closed the connection]
marcdel has joined #ruby-lang
marcdel_ has joined #ruby-lang
marcdel_ has quit [Client Quit]
diegoviola has joined #ruby-lang
marcdel has quit [Ping timeout: 244 seconds]
nelsonsar has joined #ruby-lang
fusillicode has joined #ruby-lang
fusillicode has quit [Client Quit]
fusillicode has joined #ruby-lang
fusillicode1 has quit [Read error: Connection reset by peer]
robbyoconnor has joined #ruby-lang
elia has quit [Quit: (IRC Client: textualapp.com)]
nelsonsar has quit [Remote host closed the connection]