vintik has quit [Remote host closed the connection]
marr has joined #ruby-lang
Mon_Ouie has quit [Read error: Connection reset by peer]
kiddorails has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
Mon_Ouie has quit [Changing host]
ddv has quit [Changing host]
ddv has joined #ruby-lang
robbyoconnor has joined #ruby-lang
kiddorails has joined #ruby-lang
kek_ has joined #ruby-lang
<yorickpeterse>
my pants are soaked
<yorickpeterse>
I'm very tempted to grab an XL t-shirt we have lying around and wear that as a skirt
ur5us has quit [Remote host closed the connection]
djinni` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
kek has quit [Ping timeout: 245 seconds]
Cakey has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Ping timeout: 250 seconds]
Benny1992 has quit [Quit: leaving]
Benny1992 has joined #ruby-lang
djinni` has joined #ruby-lang
macsplean1 has joined #ruby-lang
<macsplean1>
hey, i am just learning how to spawn a process. does anyone know how to 'reactivate' one, i.e. unbackground it
<yorickpeterse>
macsplean1: Once detached you can not re-attach it
<macsplean1>
thanks yorickpeterse
ur5us has joined #ruby-lang
<matti>
Soaked pants.
Newbie0086 has quit [Ping timeout: 250 seconds]
<yorickpeterse>
Jeans, even worse
<yorickpeterse>
That means they never dry up
<matti>
yorickpeterse: For the same of UK, I had to mentally s/pants/trousers/ ;p
<yorickpeterse>
heh
<matti>
yorickpeterse: Otherwise it sonuded bit awkward ;]
* matti
hugs yorickpeterse
<yorickpeterse>
ヽ(´ー`)ノ
<yorickpeterse>
dang it that's not the one
haraoka has joined #ruby-lang
<yorickpeterse>
(つ。◕‿‿‿‿◕。)つ
<yorickpeterse>
nope
<yorickpeterse>
(っ´ω`)っ
<yorickpeterse>
That's it
<yorickpeterse>
I have too many
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby-lang
jxie has quit [Ping timeout: 264 seconds]
jxie has joined #ruby-lang
gianlucadv has quit [Ping timeout: 260 seconds]
Newbie0086 has joined #ruby-lang
Newbie0086 has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby-lang
dangerousdave has joined #ruby-lang
hahuang65 has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby-lang
gianlucadv has joined #ruby-lang
Lewix_ has joined #ruby-lang
Lewix has quit [Ping timeout: 256 seconds]
Miphix has quit [Quit: Leaving]
hahuang65 has quit [Ping timeout: 272 seconds]
macsplean1 has quit [Ping timeout: 245 seconds]
heftig has joined #ruby-lang
vintik has joined #ruby-lang
Muz_ is now known as Muz
kek_ has quit [Remote host closed the connection]
kek has joined #ruby-lang
kek has quit [Ping timeout: 240 seconds]
gianlucadv has quit [Ping timeout: 260 seconds]
AlecTaylor has joined #ruby-lang
AlecTaylor has joined #ruby-lang
<AlecTaylor>
hi
<AlecTaylor>
self is @ right?
<apeiros>
no
havenwood has joined #ruby-lang
<apeiros>
but @variables belong to the object referenced by self
<AlecTaylor>
Hmm
* AlecTaylor
is from C++, Python and JavaScript
<AlecTaylor>
Can you explain?
<apeiros>
what should I explain?
homeless has joined #ruby-lang
<homeless>
test
<homeless>
i don't what wrong with the rails irc
ur5us has quit [Read error: Connection reset by peer]
ur5us_ has joined #ruby-lang
<homeless>
what is the difference between RsSpec and capybara
<homeless>
anyone
<yorickpeterse>
homeless: One is a testing framework, the other one is a library that you can use in said framework to test web pages
havenwood has quit [Ping timeout: 264 seconds]
<homeless>
my confusing is why i have to write capybara inside Rspec
<AlecTaylor>
apeiros: Are there any issues with always using @ instead of self? - Can self do something @ can't do; and vice versa?
<yorickpeterse>
homeless: do you want to test web pages by checking for certain elements, or if some JS is working?
vintik has quit [Remote host closed the connection]
<yorickpeterse>
homeless: or perhaps test web pages in an actual browser? If so, Capybara.
<yorickpeterse>
If not, then you don't need it
<yorickpeterse>
You can use rack-test for most basic testing
<yorickpeterse>
* more basic
<homeless>
I am following tutorial from micheal
<yorickpeterse>
"micheal"?
<homeless>
I am nearly finished
<apeiros>
AlecTaylor: self.foo is not the same as @foo
<apeiros>
AlecTaylor: self.foo calls a method. which must be defined. @foo is a variable lookup.
<homeless>
This book by Michael Hartl
<apeiros>
AlecTaylor: and self.foo being a method, it does not necessarily have to be a method which returns the value of @foo, or does nothing else than returning that value
macsplean1 has joined #ruby-lang
<apeiros>
but self and @vars are closely related. as said before, @variables belong to the object referenced by self.
* apeiros
will be back in ~30min
Lewix_ has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby-lang
<homeless>
yorickpeterse: thanks for trying to help me
ikrima has quit [Ping timeout: 240 seconds]
<homeless>
I will do some mor reasearch
diegoviola has quit [Ping timeout: 260 seconds]
<homeless>
and come up with some clear question
macsplean1 has quit [Ping timeout: 240 seconds]
<homeless>
why we have to implement TDD at the begaining
<homeless>
why can't we should do it at the last
apeiros has quit [Ping timeout: 245 seconds]
hahuang65 has joined #ruby-lang
<ljarvis_>
homeless: that's the definition of tdd
ljarvis_ is now known as ljarvis
kiddorails has quit [Remote host closed the connection]
<oddmunds>
yorickpeterse: what should i use instead?
<yorickpeterse>
A proper fucking database
symm- has joined #ruby-lang
<yorickpeterse>
MySQL or PostgreSQL will serve most needs, outside of that evaluate choices based on your use-case
<yorickpeterse>
But avoid Mongo like the plague
<oddmunds>
i heard postgres got key store stuff that outperforms the nosql stuff
<yorickpeterse>
It has JSON support which in some cases is indeed better than Mongo
<yorickpeterse>
lemme see if I can find the slides
<yorickpeterse>
Hm can't find it
<yorickpeterse>
Either way, some core Pg dev I believe compared Pg to Mongo and found that in some cases it was faster and compressed data more efficiently
kiddorails has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
stamina has joined #ruby-lang
kiddorails has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
AKASkip has joined #ruby-lang
alexju has joined #ruby-lang
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby-lang
ldnunes has joined #ruby-lang
kyb3r_ has quit [Read error: Connection reset by peer]
benlovell has quit [Ping timeout: 255 seconds]
yatish27 has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 250 seconds]
Miphix has joined #ruby-lang
tomkadwill has joined #ruby-lang
miqui has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
joonty has quit [Quit: WeeChat 0.4.2]
Sgeo has quit [Read error: Connection reset by peer]
ur5us_ has quit [Remote host closed the connection]
benlovell has joined #ruby-lang
yatish27 has joined #ruby-lang
spastorino has joined #ruby-lang
snoopybbt has joined #ruby-lang
hahuang65 has quit [Ping timeout: 260 seconds]
snoopybbt has quit [Read error: Connection reset by peer]
<yorickpeterse>
or MyFoobarBatch.new.process(rows_here) depending on what you need
<AlecTaylor>
Mmm
[spoiler] has joined #ruby-lang
<AlecTaylor>
yorickpeterse: Going to just do batch as default case
<AlecTaylor>
Find to have a one element list for the other case
<AlecTaylor>
*fine
<yorickpeterse>
You mean pass the data to process in the constructor?
<apeiros>
AlecTaylor: if you want multiple constructors, have a normalized new, and just define the other constructors as class methods which normalize the input and call new
<AlecTaylor>
Mmm
<apeiros>
if that's not feasible, you probably shouldn't stick it into one class
gianlucadv has joined #ruby-lang
gianlucadv has quit [Remote host closed the connection]
<apeiros>
yorickpeterse: IMO a different constructor can have side-effects. but only on the created object. e.g. it runs a couple of methods for you already (your socket example would probably fit that bill)
<yorickpeterse>
apeiros: what I mostly meant is that some object shouldn't start batch-processing lord knows how much data when you create an instance of it
<yorickpeterse>
It also introduces this pattern where you create instances you never use
<yorickpeterse>
e.g.
<yorickpeterse>
MyFoobarObject.new(...) # that's all, no methods are ever called on it since it already did everything
<apeiros>
ah. yes, true
<yorickpeterse>
which is basically procedural programming using objects
<yorickpeterse>
aka Javascript
* yorickpeterse
runs
<apeiros>
what I mean is that with your example `MyFoobarBatch.new(rows_here).process`, one could make a constructor `MyFoobarBatch.process(rows_here)` which does precisely that: call new(rows_here).process.
<yorickpeterse>
Oh right
<yorickpeterse>
Yeah that's fine, just don't overwrite "new"
hahuang65 has joined #ruby-lang
* apeiros
nods
tkuchiki has quit [Ping timeout: 260 seconds]
katlogic has quit [Read error: Connection reset by peer]
hahuang65 has quit [Ping timeout: 260 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jgpawletko has joined #ruby-lang
katlogic has joined #ruby-lang
skade has joined #ruby-lang
Forgetful_Lion has quit [Remote host closed the connection]
<yorickpeterse>
Docs question: is there something in Ruby similar to Sphinx (http://sphinx-doc.org/) minus the braindead RST markup
<yorickpeterse>
I'm currently looking at what we'd use for our API docs and such, there are a few things (e.g. Slate or Home grown stuff) but I prefer to be as lazy as possible
hahuang65 has joined #ruby-lang
emerson_ has joined #ruby-lang
<yorickpeterse>
Right now we have some Swagger stuff running which is ok-ish for just some examples
<yorickpeterse>
But you can't really fit freeform documentation in it
<yorickpeterse>
Plus I had to hack it to get Markdown support
<yorickpeterse>
In particular I *hate* the markup used for hyperlinks in RST
<yorickpeterse>
`Text here <link-here>`__ # <- who the F came up with this
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
<darix>
yorickpeterse: if you consider that plaintext readable
<darix>
the format is actually nice
<darix>
much more readable than [Text here](linkhere)
<darix>
imho
hahuang65 has joined #ruby-lang
<sluukkonen>
I never remember if it's (foo)[bar] or [foo](bar)
<sluukkonen>
and usually I guess wrong
hahuang65 has quit [Ping timeout: 272 seconds]
kiddorails has quit []
thang has quit [Remote host closed the connection]
fmendez has joined #ruby-lang
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
TvL2386 has quit [Quit: Ex-Chat]
weems|mac has joined #ruby-lang
davidfrey has joined #ruby-lang
khaase has joined #ruby-lang
khaase has joined #ruby-lang
weems|mac has quit [Client Quit]
<yorickpeterse>
darix: I disagree
yxhuvud has joined #ruby-lang
<yorickpeterse>
sluukkonen: one of them is for images
<yorickpeterse>
I forgot which one
<yorickpeterse>
something like !(alt text)[image url]
<yorickpeterse>
or the other way around
JohnFord has joined #ruby-lang
Cakey has joined #ruby-lang
charliesome has joined #ruby-lang
shinnya has joined #ruby-lang
loincloth has joined #ruby-lang
jds has joined #ruby-lang
AlecTaylor has quit [Quit: Leaving]
havenwood has joined #ruby-lang
frank_o has joined #ruby-lang
araujo has joined #ruby-lang
khaase has quit [Remote host closed the connection]
khaase has joined #ruby-lang
chouhoulis has joined #ruby-lang
hahuang65 has joined #ruby-lang
<frank_o>
Hello. I'm fetching some products from the ShopSense API with Rails, but the part that parses the XML looks really ugly. Is there a way I can beautify it with Hashie Rash? Ie. https://gist.github.com/frankie-loves-jesus/6b8012f9197ca6c675a9 although that errors out.
havenwood has quit [Remote host closed the connection]
enebo has joined #ruby-lang
khaase has quit [Ping timeout: 272 seconds]
hahuang65 has quit [Ping timeout: 250 seconds]
GenaraL has joined #ruby-lang
haraoka has quit [Ping timeout: 255 seconds]
<GenaraL>
sLm
GenaraL has quit [Client Quit]
Sirupsen has joined #ruby-lang
cmhobbs has joined #ruby-lang
cmhobbs has joined #ruby-lang
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 255 seconds]
hahuang65 has joined #ruby-lang
havenwood has joined #ruby-lang
sharpmachine has joined #ruby-lang
sharpmachine has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 272 seconds]
cmhobbs has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
mistym has joined #ruby-lang
stamina has quit [Ping timeout: 245 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
ari-_-e has quit [Read error: Connection reset by peer]
mistym has quit [Remote host closed the connection]
<darix>
redgetan: maybe also check the system_timer thing, which as far as i know was generated for better working timeouts
stulzer has joined #ruby-lang
banister has quit [Ping timeout: 245 seconds]
Cakey has quit [Ping timeout: 256 seconds]
Cakey has joined #ruby-lang
loincloth has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
ironhide_604 has quit [Ping timeout: 264 seconds]
rippa has joined #ruby-lang
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<redgetan>
darix: it seems like system_timer is mostly used for ruby 1.8 where the prob is green threads are not getting scheduled, but i'll take a look at it :)
Blaguvest has joined #ruby-lang
mikecmpbll has quit [Remote host closed the connection]
tbuehlmann has quit [Quit: Leaving]
jlovick has joined #ruby-lang
benlovell has quit [Ping timeout: 264 seconds]
kek has quit [Remote host closed the connection]
kek has joined #ruby-lang
kek has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
__butch__ has joined #ruby-lang
mistym has joined #ruby-lang
cantonic has joined #ruby-lang
__butch__ has quit [Client Quit]
__butch__ has joined #ruby-lang
yalue has joined #ruby-lang
fragamus has quit [Quit: Computer has gone to sleep.]
vintik has joined #ruby-lang
vintik has quit [Remote host closed the connection]
banister has quit [Read error: Connection reset by peer]
mistym has quit [Ping timeout: 240 seconds]
ari-_-e has joined #ruby-lang
cornerma1 has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Client Quit]
adphillips has quit []
JohnFord has joined #ruby-lang
cornerman has quit [Ping timeout: 255 seconds]
relix_ has joined #ruby-lang
relix has quit [Ping timeout: 250 seconds]
banister has joined #ruby-lang
Cakey has quit [Ping timeout: 255 seconds]
khaase has quit [Remote host closed the connection]
khaase has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cantonic has quit [Quit: cantonic]
wallerdev has joined #ruby-lang
khaase has quit [Ping timeout: 256 seconds]
fragamus has joined #ruby-lang
benlovell has joined #ruby-lang
banister has quit [Ping timeout: 250 seconds]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
mistym has joined #ruby-lang
mistym_ has joined #ruby-lang
mistym has quit [Ping timeout: 240 seconds]
majjoha has joined #ruby-lang
<majjoha>
If I want to write good documentation for a gem I am working, what would be the best tool then: TomDoc, YARD, RDoc or something else?
banister has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby-lang
emerson_ has quit [Remote host closed the connection]
yatish27 has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby-lang
enebo has quit [Quit: enebo]
banister has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
rahul_j has joined #ruby-lang
stulzer has quit [Quit: leaving]
stulzer has joined #ruby-lang
mistym_ is now known as mistym
cantonic has joined #ruby-lang
<Lewix>
hi guys
shinnya has quit [Ping timeout: 272 seconds]
<havenwood>
hi
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby-lang
tbuehlmann has joined #ruby-lang
saarinen has joined #ruby-lang
mbr__ is now known as mbr
elia has quit [Quit: Computer has gone to sleep.]
dangerousdave has quit [Read error: Connection reset by peer]
toastynerd has quit []
dangerousdave has joined #ruby-lang
<karamazov>
I'm about to work through the ruby koans using vim but can't seem to find a definitive guide to setting Vim up for Ruby. Anyone have suggestions? Right now I'm running vanilla vim.
riffraff has joined #ruby-lang
rahul_j has quit [Quit: rahul_j]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
adphillips has joined #ruby-lang
<centrx>
karamazov, I just use syntax highlighting
kek has joined #ruby-lang
<karamazov>
Cool, thanks centrx
jds has quit [Quit: Connection closed for inactivity]
skade has quit [Quit: Computer has gone to sleep.]
<centrx>
karamazov, You can install/activate auto-completion for Ruby or for Rails, but that always seems unnecessary with Ruby and more for languagesThatUseUnnecessaryLongMethodNames()
<karamazov>
Haha that's a valid point. I think I'll stick to syntax highlighting for now and then maybe incorporate tmux if I find myself wanting it
<centrx>
vim also has window-splitting
AKASkip has joined #ruby-lang
kek has quit [Ping timeout: 272 seconds]
djbkd has quit [Remote host closed the connection]
<karamazov>
oh yeah - I do think I stumbled across that before.
<ferski>
and I don't know why this small sample isn't confirming that this is Array
<Mon_Ouie>
I'm not sure, but the problem is that @variables are instance variables of self, and you can check what self is at the point where you created one:
Lewix has quit [Remote host closed the connection]
<dostoyevsky>
Can I tell to_json somehow that I it shouldn't try to convert my binary encoded strings as UTF8?
seamon has quit [Quit: seamon]
Lewix has joined #ruby-lang
gix has quit [Ping timeout: 240 seconds]
Johz has joined #ruby-lang
agrinb has joined #ruby-lang
<darix>
dostoyevsky: define a to_json on them which encodes them as base64 e.g.?
gix has joined #ruby-lang
banister_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
toastynerd has joined #ruby-lang
<agrinb>
noob question: I thought pop removes the last element in the array and returns it, therefore I can iterate through an array with an each loop and eventually be left with an empty array. However, I'm getting something else in pry.
<dostoyevsky>
darix: I've just done: class String; def encode(*a); self; end; end
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby-lang
foucist has quit [Quit: leaving]
<dostoyevsky>
and now to_json doesn't muck about anymore
ur5us has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
<dostoyevsky>
I am not sure how to_json will determine the encoding it wants to create... maybe there is another flag I just could set to "binary" like my strings are...
<wallerdev>
agrinb: when you do pop youre changing the size of the array youre iterating over
djbkd has joined #ruby-lang
ldnunes has quit [Quit: Leaving]
<wallerdev>
not usually a good idea
<wallerdev>
try doing a loop like while arr.size > 0; arr.pop; end
banister has joined #ruby-lang
relix_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<agrinb>
that makes perfect sense, and I honestly haven't looked for alternatives because I want to understand what's happening with the pop method.
JohnFord has joined #ruby-lang
<wallerdev>
i think everytime the block runs arr.each checks that its not past the end of the array
<wallerdev>
so at 1, it removes the 7, sees theres 6 items in the list and keeps going, 2 removes 6, 5 items, 3 removes 5, 4 items, 4 removes 4, 3 items in the array now, it sees its trying to iterate past the end and stops
<wallerdev>
somethin like that
<wallerdev>
not sure about the internals of it
<wallerdev>
but a lot of languages dont let you even modify arrays in foreach loops because of the weird issues that can happen
<aledovsky>
It leaves precisely half of array unprocessed, so your theory seems valid
<agrinb>
ok, that makes sense, will try the alternative you suggested. Thanks