<tejas-manohar>
whats with that error? im just trying to uninstall a ruby version
sarkyniin has joined #ruby-lang
<workmad3>
tejas-manohar: rm: /Users/.../.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/tzinfo-1.2.2/test/zoneinfo: Permission denied <-- that's the important error
<workmad3>
tejas-manohar: namely, there's a gem in your install that you don't have permission to remove... did you install the tzinfo gem with 'sudo' by any chance?
gianlucadv has joined #ruby-lang
allomov has joined #ruby-lang
<mustmodify>
Does the "tell don't ask" principle mean "don't ask me for any information" or "don't micromanage me"? I find myself doing things like this a lot: Message::Identifier.new(message: m).account_id
<workmad3>
mustmodify: in strict form, it's "don't ask for any information"
allomov has quit [Ping timeout: 265 seconds]
<workmad3>
mustmodify: instead, what you'd do is tell something that you want the account ID, and provide a callback, so the target can tell the callback what the account ID is
<mustmodify>
workmad3: In your opinion, does this lead to better code? Seems like it would just make things more complicated. But since I haven't implemented it that way, I could just be blind to the benefits.
<workmad3>
mustmodify: depends on exactly what you're trying to achieve, IMO
<mustmodify>
That's true of just about anything. :P
<workmad3>
mustmodify: it allows for much more asynchronous, distributed code though
<workmad3>
mustmodify: e.g. something like the Actor pattern for concurrency is heavily biased towards Tell, Don't Ask
<workmad3>
mustmodify: it's also quite appealing if you want loosely coupled components, such as you'd find in many UI frameworks... or a callback-heavy language like Javascript
<workmad3>
mustmodify: personally, I tend towards the slightly less strict CQRS principle in most things... but if I was writing a highly distributed, concurrent application, I'd rely on Tell, Don't Ask as the principle for exchanging data
<workmad3>
mustmodify: is that more what you were looking for? :P
<mustmodify>
workmad3: I write a lot more asyncronous javascript than Ruby. For some reason, it just doesn't occur to me to write things async in Ruby until I hit some bottleneck.
<workmad3>
mustmodify: I tend to be the same, tbh
sen_jalapeno has quit [Ping timeout: 256 seconds]
<mustmodify>
I'm reading about CQRS now. Seems kind of familiar, but Martin Fowler is being kind of abstract right now and I tend to be an example person.
<workmad3>
mustmodify: methods are either command (state
<workmad3>
(state-changing) or query (request information)
saramic has quit [Remote host closed the connection]
dagda1 has joined #ruby-lang
<workmad3>
mustmodify: command methods don't give you useful info, query methods don't change state
<mustmodify>
My initial thought is, "duh?" but maybe I haven't integrated it fully yet. I'll let it sink in for a bit.
<workmad3>
mustmodify: tbh, it's mostly aimed at 'query methods don't change state', so that when coding you know that doing something like 'foobar_collection.size' (a query method) can be called repeatedly and, as long as you haven't called a command method in the interim, it'll always return the same thing
<workmad3>
mustmodify: so it's a criteria for idempotency around query methods... which seems pretty self-evident, but there's plenty of more subtle cases where you could violate that, and in large code-bases that can cause weirdnesses :)
<workmad3>
mustmodify: I think there's also a criteria that query methods shouldn't leak mutable state too...
<mustmodify>
I was just thinking that in a heavy-use web app you couldn't count on foo.size staying consistent for long.
<workmad3>
mustmodify: sure... but you should be able to count on it not adding shit to an array... or incrementing an ID in the database...
<mustmodify>
yeah.
bmichelsen has joined #ruby-lang
<workmad3>
mustmodify: in all honesty, many principles in coding are either 'self-evident' in the examples given or 'why would I do it that way?' for the examples given... that really speaks more to the size of examples more than anything else though, IMO
<workmad3>
anyway, must run
<workmad3>
hopefully this has helped rather than muddied the waters more :)
<mustmodify>
yes, thanks.
<tejas-manohar>
was trying to do a simple database migration
ur5us has quit [Read error: Connection reset by peer]
marcdel has quit []
tejas-manohar has left #ruby-lang [#ruby-lang]
ur5us_ has joined #ruby-lang
dxta has quit [Remote host closed the connection]
sarkyniin has quit [Remote host closed the connection]
dxta has joined #ruby-lang
dxta has quit [Read error: Connection reset by peer]
dxta_ has joined #ruby-lang
dxta_ has quit [Remote host closed the connection]
sarkyniin has joined #ruby-lang
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
marcdel has joined #ruby-lang
fusillicode1 has quit [Quit: Leaving.]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tbuehlmann has quit [Remote host closed the connection]
kaiwren has joined #ruby-lang
NoNMaDDeN has quit [Remote host closed the connection]
midhir has quit [Remote host closed the connection]
symm- has quit [Quit: Leaving...]
relix has joined #ruby-lang
frank_o has joined #ruby-lang
<frank_o>
Hi! Does anyone here do like `# ----------" or similar to separate / group together similar parts of code in their models and controllers?
workmad3 has joined #ruby-lang
<centrx>
frank_o, ### Header ###
NoNMaDDeN has joined #ruby-lang
midhir has joined #ruby-lang
symm- has joined #ruby-lang
<frank_o>
centrx: Nice
lsegal has joined #ruby-lang
workmad3 has quit [Ping timeout: 255 seconds]
kaiwren has quit [Read error: Connection reset by peer]
<banister>
frank_o no :)
<red_menace>
that, along with MARK to get them into the menu
kaiwren has joined #ruby-lang
jkad1 has quit [Quit: WeeChat 1.0.1]
spastorino has joined #ruby-lang
lewix has quit [Remote host closed the connection]
jkad1 has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
havenwood has joined #ruby-lang
jkad1 has quit [Quit: WeeChat 1.0.1]
NoNMaDDeN has quit [Remote host closed the connection]
NoNMaDDeN has joined #ruby-lang
jkad1 has joined #ruby-lang
lsegal has quit [Read error: Connection reset by peer]
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lsegal has joined #ruby-lang
lewix has joined #ruby-lang
lewix has joined #ruby-lang
tejas-manohar has joined #ruby-lang
bmichelsen has quit [Quit: ZZZzzz…]
dagda1 has joined #ruby-lang
<tejas-manohar>
https://github.com/tejas-manohar/1-1/blob/master/ifttt.rb -- `puts options` returns something like "#<Commander::Command::Options:0x007faa6119b4d8>" -- how do i get the names of properties on this? i want to retrieve like what the user is entering in an understandable format lol
allomov has joined #ruby-lang
<tejas-manohar>
wait nvm got it
<tejas-manohar>
no i didnt
<tejas-manohar>
https://github.com/tejas-manohar/1-1/blob/master/ifttt.rb -- `puts options` returns something like "#<Commander::Command::Options:0x007faa6119b4d8>" -- how do i get the names of properties on this? i want to retrieve like what the user is entering in an understandable format
<tejas-manohar>
thats my question
elia has joined #ruby-lang
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoviola has quit [Remote host closed the connection]
allomov has quit [Ping timeout: 240 seconds]
Areessell has joined #ruby-lang
BubonicPestilenc has joined #ruby-lang
vondruch has quit [Ping timeout: 255 seconds]
bmichelsen has joined #ruby-lang
relix has joined #ruby-lang
saramic has joined #ruby-lang
jimbach has joined #ruby-lang
RoxasShadowRS has joined #ruby-lang
jimbach has quit [Ping timeout: 258 seconds]
buddy_tucker has quit [Read error: Connection reset by peer]
buddy_tucker has joined #ruby-lang
parzzix has quit [Remote host closed the connection]
gianlucadv has quit [Ping timeout: 256 seconds]
sarkyniin has quit [Remote host closed the connection]
nelsonsar has joined #ruby-lang
solars has quit [Ping timeout: 240 seconds]
tejas-manohar has left #ruby-lang [#ruby-lang]
tejas-manohar has joined #ruby-lang
<tejas-manohar>
hey i got my question answered
tejas-manohar has left #ruby-lang [#ruby-lang]
oleo has quit [Ping timeout: 256 seconds]
oleo has joined #ruby-lang
solars has joined #ruby-lang
hahuang61 has joined #ruby-lang
workmad3 has joined #ruby-lang
solars has quit [Ping timeout: 264 seconds]
diegoviola has joined #ruby-lang
havenwood has quit []
workmad3 has quit [Ping timeout: 272 seconds]
jimbach has joined #ruby-lang
Averna has joined #ruby-lang
kaiwren has quit [Quit: kaiwren]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arBmind has quit [Ping timeout: 255 seconds]
havenwood has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Musashi007 has joined #ruby-lang
benanne has quit [Quit: kbai]
lewix has quit [Remote host closed the connection]
bmichelsen has quit [Quit: ZZZzzz…]
workmad3 has joined #ruby-lang
workmad3 has quit [Client Quit]
pablocantero has joined #ruby-lang
nofxx has joined #ruby-lang
nofxx has joined #ruby-lang
arBmind has joined #ruby-lang
RoxasShadowRS has quit [Quit: Leaving]
workmad3 has joined #ruby-lang
lewix has joined #ruby-lang
lewix has quit [Changing host]
lewix has joined #ruby-lang
allomov has joined #ruby-lang
charliesome has joined #ruby-lang
Demannu has quit [Remote host closed the connection]
bmichelsen has joined #ruby-lang
pablocantero has quit [Remote host closed the connection]
workmad3_ has joined #ruby-lang
Narzew has quit [Quit: Wychodzi]
hahuang61 has quit [Ping timeout: 265 seconds]
allomov has quit [Ping timeout: 258 seconds]
workmad3 has quit [Ping timeout: 256 seconds]
workmad3_ has quit [Client Quit]
jimbach has quit [Remote host closed the connection]
workmad3 has joined #ruby-lang
Areessell has left #ruby-lang [#ruby-lang]
Demannu has joined #ruby-lang
symm- has quit [Ping timeout: 244 seconds]
arBmind has quit [Read error: Connection reset by peer]
arBmind has joined #ruby-lang
Demannu has quit [Ping timeout: 240 seconds]
pablocantero has joined #ruby-lang
pablocantero has quit [Remote host closed the connection]
jmrepett_ has quit [Remote host closed the connection]
<nofxx>
How am I suppose to avoid the law&order with long strings? (rubocop) fail "This is really long message that makes a point, and it's also 100chars long"
<nofxx>
"This is a message" + \n "continues" ?
<zenspider>
who cares? I'd just turn it off since it really isn't helping in this case.
<zenspider>
long messages are long. derp OH NOES
<zenspider>
yes, they're long because they need to be sometimes
<nofxx>
hmm, turn of only for strings? checking it out
<zenspider>
If you really want to, prolly array of strings w/ a join? then they'll line up nice in your editor and maybe be a bit more readable.
<zenspider>
I stick to at 80 col rule myself, so that's usually the way I go
<zenspider>
or heredoc. but I hate heredocs most of the time
<nofxx>
I like that rule too, it's exactly half my emacs screen hehe... but agree with your point if it's only for strings
<nofxx>
would like to still get the errors of long lines of code
r0bby_ has joined #ruby-lang
frank_o has quit [Quit:]
klmlfl has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 264 seconds]
<zenspider>
I've got my emacs full screened, split vertically in half, so I get autotest/shell on one side and code/test on the other
<zenspider>
and emacs is set up to gray out any chars over 80 (79?)