« Back to channel list

#ruby-offtopic - 11 January 2018

« Back 1 day Forward 1 day »
[00:15:24] guacamole: has joined #ruby-offtopic
[00:48:12] guacamole: has joined #ruby-offtopic
[01:10:03] guacamole: has joined #ruby-offtopic
[01:14:29] guacamole: has joined #ruby-offtopic
[01:18:21] guacamole: has joined #ruby-offtopic
[03:45:39] naprimer2: has joined #ruby-offtopic
[04:38:51] guacamole: has joined #ruby-offtopic
[04:54:12] eckhardt: has joined #ruby-offtopic
[05:08:05] guacamole: has joined #ruby-offtopic
[05:23:00] guacamole: has joined #ruby-offtopic
[05:37:45] kapil___: has joined #ruby-offtopic
[05:41:23] guacamole: has joined #ruby-offtopic
[06:30:25] eckhardt: has joined #ruby-offtopic
[07:04:07] apeiros: has joined #ruby-offtopic
[07:59:09] apeiros: has joined #ruby-offtopic
[08:00:26] burgestrand: has joined #ruby-offtopic
[08:38:28] eckhardt: has joined #ruby-offtopic
[11:31:15] burgestrand: has joined #ruby-offtopic
[15:11:45] apeiros__: has joined #ruby-offtopic
[16:44:54] eckhardt: has joined #ruby-offtopic
[17:02:32] universa1: has joined #ruby-offtopic
[17:49:24] guacamole: has joined #ruby-offtopic
[17:55:48] guacamole: has joined #ruby-offtopic
[17:56:14] apeiros: has joined #ruby-offtopic
[18:04:48] guacamole: has joined #ruby-offtopic
[18:04:48] guacamole: has joined #ruby-offtopic
[18:05:45] aScottishBoat: has joined #ruby-offtopic
[18:06:47] aScottishBoat: I'm looking to write a program that utilizes curses _and_ make *potentially* heavy use of executing shell commands directly from the program. Would this be considered bad practice? My instinct tells me 'yes'
[18:07:13] aScottishBoat: But I want to understand why if so, and why not if no
[18:13:01] eam: I mean, shell commands in general indicate that an interface isn't ideal
[18:13:13] eam: but it doesn't seem particularly terrible and it's pretty common practice
[18:19:47] aScottishBoat: I remember that I used to write some ruby programs backticking cmds along the way, manipulating I/O, etc. and I got heavily criticized for it. That was a while ago, but I never really shook off that I was doing smth bad
[18:20:29] aScottishBoat: I think it may have been the amount of of executing I was doing. Or maybe they didn't know what they were talking about. Irregardless it styaed with me. Thanks for your input eam
[18:21:47] apeiros: has joined #ruby-offtopic
[18:40:40] eam: I mean, generally it's a bad way to do things and it indicates that you're trying to adapt the command line idioms you're familiar with instead of learning the proper interfaces
[18:41:14] eam: like, say you want a list of files in the current directory. You could write `ls`.split
[18:41:26] eam: or you could write Dir['*']
[18:42:11] eam: the real question is what the shell commands are, and why you wouldn't be using a gem which interacts with their component libraries instead of running them directly
[18:43:05] eam: there are some commands that it makes sense to run because maybe there isn't an underlying library interface (ssh is one of these, gpg used to be)
[18:43:39] eam: and there are some that will raise eyebrows - ls, grep, etc would be the more egregious examples where there's an obvious native replacement
[18:44:19] eam: like, if your program is a curses based menu for launching a movie player and you're shelling out to mplayer? Yeah, totally reasonable
[18:48:33] mikkelsen: has joined #ruby-offtopic
[18:55:38] baweaver: eam: we can have a pizza day too
[18:55:45] baweaver: every day is pizza day here
[18:56:18] baweaver: Speaking of, do you know why the cafe is on 9?
[18:58:43] baweaver: Because you're supposed to get three square meals a day :D
[18:59:03] baweaver: havenwood ^
[19:14:28] baweaver: havenwood: we should get you a Skipper hat
[19:39:48] guacamole: has joined #ruby-offtopic
[19:39:49] guacamole: has joined #ruby-offtopic
[19:43:35] guacamole: has joined #ruby-offtopic
[19:43:36] guacamole: has joined #ruby-offtopic
[20:33:38] eckhardt: has joined #ruby-offtopic
[21:03:16] guacamole: has joined #ruby-offtopic
[21:03:16] guacamole: has joined #ruby-offtopic
[21:05:08] miah: has joined #ruby-offtopic
[21:09:19] guacamole: has joined #ruby-offtopic
[21:09:19] guacamole: has joined #ruby-offtopic
[22:31:30] _sfiguser: has joined #ruby-offtopic
[23:01:14] zenspider: has joined #ruby-offtopic
[23:37:46] guacamole: has joined #ruby-offtopic
[23:37:47] guacamole: has joined #ruby-offtopic