« Back to channel list

#ruby - 12 July 2016

« Back 1 day Forward 1 day »
[00:00:19] tubuliferous: has joined #ruby
[00:00:57] Rodya_: has joined #ruby
[00:01:19] rhllor: has joined #ruby
[00:02:56] SilverKey: has joined #ruby
[00:03:22] JeanCarl1Machado: has joined #ruby
[00:05:53] mattwashere: has joined #ruby
[00:05:57] ghr: has joined #ruby
[00:06:34] mattwashere: has joined #ruby
[00:11:12] nankyokusei: has joined #ruby
[00:15:06] tristanp_: has joined #ruby
[00:15:48] flashpoint9: has joined #ruby
[00:17:03] mattwashere: has joined #ruby
[00:17:28] ghr: has joined #ruby
[00:17:50] skweek: has joined #ruby
[00:19:41] tristanp: has joined #ruby
[00:20:00] Tariq: has joined #ruby
[00:20:58] Tariq: I have a weird error message: "recvfrom for buffered IO (IOError)" and my Google search reveals it may be because I'm mixing buffered and non-buffered methods
[00:21:34] Tariq: I have built a web server for a school project, and I am using the method recv_nonblock to read a POST request
[00:22:03] Tariq: I would like to know what I should do to deal with the IO error
[00:24:59] craigp: has joined #ruby
[00:27:04] ghr: has joined #ruby
[00:27:47] djbkd: has joined #ruby
[00:29:46] Ropeney: has joined #ruby
[00:32:10] whathappens: has joined #ruby
[00:32:48] whathappens: has joined #ruby
[00:34:35] fredolinhares: has joined #ruby
[00:36:14] weaksauce: has joined #ruby
[00:38:15] `tim`: has joined #ruby
[00:38:16] Tariq: I fixed the issue by replacing recv_nonblock with read, thanks for your help rubber duckies.
[00:41:17] flashpoint9: has joined #ruby
[00:41:33] roamingdog: has joined #ruby
[00:41:34] flashpoint9: has joined #ruby
[00:42:01] ghr: has joined #ruby
[00:42:46] roamingdog: has joined #ruby
[00:45:54] flashpoint9: has joined #ruby
[00:45:54] mattwashere: has joined #ruby
[00:46:15] flashpoint9: has joined #ruby
[00:47:30] ekinmur: has joined #ruby
[00:49:08] whathappens: has joined #ruby
[00:52:00] ghr: has joined #ruby
[00:54:21] Guest76251: has joined #ruby
[00:54:23] moei: has joined #ruby
[00:54:34] dminuoso: has joined #ruby
[00:54:49] devyn: has joined #ruby
[00:55:05] AndrewIsHere: has joined #ruby
[00:55:42] LoneHermit: has joined #ruby
[01:00:03] macsteps: has joined #ruby
[01:00:14] spiette: has joined #ruby
[01:00:19] blackmesa: has joined #ruby
[01:02:01] ghr: has joined #ruby
[01:02:17] enterprisey: has joined #ruby
[01:02:53] edwinvdg_: has joined #ruby
[01:04:44] jsaak: has joined #ruby
[01:06:23] fredolinhares: has left #ruby: ("WeeChat 1.5")
[01:07:45] fredolinhares: has joined #ruby
[01:09:00] Ropeney: has joined #ruby
[01:09:01] CloCkWeRX: has joined #ruby
[01:12:08] crystal77: has joined #ruby
[01:13:27] flashpoint9: has joined #ruby
[01:14:02] ghr: has joined #ruby
[01:14:04] flashpoi_: has joined #ruby
[01:15:24] charliesome: has joined #ruby
[01:19:00] al2o3-cr: has joined #ruby
[01:19:24] macsteps: has joined #ruby
[01:20:00] al2o3-cr: frozen madras is shit
[01:21:18] zacts: has joined #ruby
[01:21:44] stardiviner: has joined #ruby
[01:21:48] pawnbox: has joined #ruby
[01:21:59] al2o3-cr: boil in the bag basmati rice nice
[01:23:31] al2o3-cr: anyone can cook :)
[01:23:32] ghr: has joined #ruby
[01:23:42] `tim`: has joined #ruby
[01:24:24] zenlot6: has joined #ruby
[01:25:45] craigp: has joined #ruby
[01:29:58] leea: has joined #ruby
[01:30:19] cdg: has joined #ruby
[01:32:23] Ebok: has joined #ruby
[01:33:39] ghr: has joined #ruby
[01:37:02] Radar: !offtopic
[01:37:04] Radar: ?offtopic
[01:37:04] ruby[bot]: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
[01:39:12] ericsupreme: has joined #ruby
[01:42:23] Guest76251: has joined #ruby
[01:44:33] ghr: has joined #ruby
[01:46:31] tristanp_: has joined #ruby
[01:52:36] aryaching: has joined #ruby
[01:53:14] downdonedown: has joined #ruby
[01:53:57] postapocallyptic: I have a loop and inside I have socket connections trying sites/servers. In my code once a connections is achieved I want the loop to stop working. for some reason I think it makes a succesful connection and continues on with the loop.
[01:54:04] ghr: has joined #ruby
[01:54:07] postapocallyptic: I'm using sockify btw.
[01:55:21] dminuoso: has joined #ruby
[01:56:01] al2o3-cr: socksify still uses the underlying socket class
[01:56:12] SilverKey: has joined #ruby
[01:57:56] bhaak: has joined #ruby
[01:58:22] postapocallyptic: why is the loop continueing though ? shouldn't the loop pause and wait until the connection is closed?
[01:59:10] al2o3-cr: postapocallyptic: gist actual code, other wise it's a shot in the dark
[02:02:16] roamingdog: has joined #ruby
[02:02:32] blackmesa: has joined #ruby
[02:03:35] ghr: has joined #ruby
[02:07:59] Elvin: has joined #ruby
[02:09:43] pawnbox: has joined #ruby
[02:12:04] nankyokusei: has joined #ruby
[02:12:41] lxsameer: has joined #ruby
[02:13:05] ghr: has joined #ruby
[02:13:13] postmodern: has joined #ruby
[02:17:04] karapetyan: has joined #ruby
[02:20:11] flashpoint9: has joined #ruby
[02:22:36] ghr: has joined #ruby
[02:22:47] ElFerna: has joined #ruby
[02:22:55] phredus_: has joined #ruby
[02:23:34] tmtwd: has joined #ruby
[02:24:44] jlyndon_: has joined #ruby
[02:25:30] `tim`: has joined #ruby
[02:26:27] LoneHerm_: has joined #ruby
[02:26:29] craigp: has joined #ruby
[02:26:29] benlieb: has joined #ruby
[02:32:41] eljimmy: has joined #ruby
[02:32:42] Dimik--: has joined #ruby
[02:33:06] ghr: has joined #ruby
[02:33:29] mistermocha: has joined #ruby
[02:34:28] travisxcode: has joined #ruby
[02:41:17] arescorpio: has joined #ruby
[02:42:29] Guest76251: has joined #ruby
[02:42:52] al2o3-cr: >> -Object.class_eval { def -@; "bec timf" end }
[02:42:53] ruby[bot]: al2o3-cr: # => "bec timf" (https://eval.in/603655)
[02:44:07] ghr: has joined #ruby
[02:45:37] LoneHermit: has joined #ruby
[02:47:53] jhass: has joined #ruby
[02:48:04] Mayniac: has joined #ruby
[02:48:33] crystal77: has joined #ruby
[02:49:15] sumobob: has joined #ruby
[02:50:30] jenrzzz: has joined #ruby
[02:54:07] ghr: has joined #ruby
[02:55:43] LoneHerm_: has joined #ruby
[02:56:07] dminuoso: has joined #ruby
[02:56:17] zacts: has joined #ruby
[02:57:16] allstar: has joined #ruby
[02:58:30] Ebok: has joined #ruby
[03:00:13] mattwashere: has joined #ruby
[03:02:40] zacts: has joined #ruby
[03:03:38] ghr: has joined #ruby
[03:04:15] Coldblackice: has joined #ruby
[03:05:35] blackmesa: has joined #ruby
[03:07:41] pawnbox: has joined #ruby
[03:09:58] hutch34: has joined #ruby
[03:10:31] gix: has joined #ruby
[03:12:27] triangles2: has joined #ruby
[03:13:05] tmtwd: has joined #ruby
[03:13:38] ghr: has joined #ruby
[03:18:43] treaki_: has joined #ruby
[03:20:52] `tim`: has joined #ruby
[03:21:47] flashpoint9: has joined #ruby
[03:21:55] isxek: has joined #ruby
[03:23:09] ghr: has joined #ruby
[03:23:56] pontiki: has joined #ruby
[03:27:14] craigp: has joined #ruby
[03:30:21] mattwashere: has joined #ruby
[03:30:52] Spami: has joined #ruby
[03:31:54] Spami: has joined #ruby
[03:31:54] jenrzzz: has joined #ruby
[03:33:11] ghr: has joined #ruby
[03:38:54] jswe: has joined #ruby
[03:39:24] travisxcode: has joined #ruby
[03:41:34] crystal77: has joined #ruby
[03:41:38] enterprisey: has joined #ruby
[03:42:40] ghr: has joined #ruby
[03:44:28] Spami: has joined #ruby
[03:45:20] agent_white: has joined #ruby
[03:46:23] hk238: has joined #ruby
[03:47:30] leea: has joined #ruby
[03:54:41] ghr: has joined #ruby
[03:56:01] colegatron_origi: has joined #ruby
[03:56:52] dminuoso: has joined #ruby
[03:59:34] mattwashere: has joined #ruby
[04:03:04] yadobujo: has joined #ruby
[04:04:12] ghr: has joined #ruby
[04:04:55] LoneHerm_: has joined #ruby
[04:06:38] pawnbox: has joined #ruby
[04:07:11] charliesome: has joined #ruby
[04:08:37] blackmesa: has joined #ruby
[04:10:40] ponga: has joined #ruby
[04:12:31] yadobujo: has joined #ruby
[04:12:52] nankyokusei: has joined #ruby
[04:13:48] yadobujo: has joined #ruby
[04:14:12] ghr: has joined #ruby
[04:20:10] auzty: has joined #ruby
[04:22:11] craigp: has joined #ruby
[04:23:43] ghr: has joined #ruby
[04:24:24] djbkd: has joined #ruby
[04:28:50] nisstyre: has joined #ruby
[04:29:12] nisstyre: has joined #ruby
[04:29:51] roamingdog: has joined #ruby
[04:31:59] brunto: has joined #ruby
[04:33:02] A_Drone: has joined #ruby
[04:33:43] ghr: has joined #ruby
[04:36:26] allstar: has joined #ruby
[04:40:56] dminuoso: has joined #ruby
[04:43:17] ghr: has joined #ruby
[04:47:39] pawnbox: has joined #ruby
[04:51:28] atomx: has joined #ruby
[04:53:44] ghr: has joined #ruby
[04:57:48] Yzguy: has joined #ruby
[04:58:21] moeabdol: has joined #ruby
[04:58:52] edwinvdgraaf: has joined #ruby
[05:01:19] dminuoso: has joined #ruby
[05:03:15] ghr: has joined #ruby
[05:04:20] A_Drone: has joined #ruby
[05:04:36] travisxcode: has joined #ruby
[05:05:55] LoneHermit: has joined #ruby
[05:07:27] A_Drone: has joined #ruby
[05:08:36] astrobunny: has joined #ruby
[05:09:16] user12: has joined #ruby
[05:10:55] user12: porter.rb:7: syntax error, unexpected ',' (SyntaxError) def self.download_images(destination:, cookie:, access_token:)
[05:11:04] user12: what's wrong with this?
[05:11:37] blackmesa: has joined #ruby
[05:11:44] MrBusiness3: has joined #ruby
[05:11:47] Radar: user1_: what version of Ruby?
[05:11:57] conta: has joined #ruby
[05:12:00] user12: 2.0.0p598
[05:12:13] pontiki: good call, radar
[05:12:30] Radar: user1_: keyword args are only available in Ruby 2.2 and up I think
[05:12:56] user12: thanks, i'll try a new version then
[05:16:40] Radar: Or at least, that required keyword syntax is from 2.2 up iirc
[05:16:40] Rodya_: has joined #ruby
[05:16:56] Radar: I think (destination: nil) would work in Ruby 2.0. I don't have that accessible to find out
[05:16:58] akira616: has joined #ruby
[05:17:21] baweaver: Radar user1_: You can't have blank kwarg values in under 2.1
[05:17:32] baweaver: and that last bit will work
[05:18:46] ghr: has joined #ruby
[05:19:15] spyder55: has joined #ruby
[05:24:04] sinanislekdemir: has joined #ruby
[05:25:07] yadobujo: has joined #ruby
[05:29:16] ghr: has joined #ruby
[05:29:55] user12: newer version worked, thanks again
[05:35:00] mistermocha: has joined #ruby
[05:37:23] A_Drone: has joined #ruby
[05:39:17] ghr: has joined #ruby
[05:40:59] tvw: has joined #ruby
[05:41:45] daumie: has joined #ruby
[05:42:56] achamian: has joined #ruby
[05:43:03] TomyLobo: has joined #ruby
[05:45:19] kraken: has joined #ruby
[05:45:58] Guest34255: When I see this #<Micropost id: 1, content: "First micropost!", user_id: 1, created_at:"2016-05-15 02:37:37", updated_at: "2016-05-15 02:37:37">
[05:46:11] GinoManWorks_: has joined #ruby
[05:46:18] Guest34255: Is that an object of Micropost class with attributes : id, content, user_id etc
[05:46:31] Guest34255: I don't get what the attributes are, instance variables?
[05:47:58] dminuoso: has joined #ruby
[05:48:35] pontiki: Guest34255: assuming Micropost is a Rails ActiveRecord class, they're the database record attributes
[05:48:48] ghr: has joined #ruby
[05:49:17] moeabdol: has joined #ruby
[05:49:21] Guest34255: pontiki, ok got it. I see. I was trying to figure out what type of variable they are in ruby
[05:49:27] Guest34255: I guess it doesn't really translate
[05:50:13] edwardly: has joined #ruby
[05:50:13] edwardly: has joined #ruby
[05:51:54] futilegames: has joined #ruby
[05:52:05] thoraxe: has joined #ruby
[05:55:56] Radar: oh well they left
[05:56:09] Radar: The values are stored on the class under the @attributes instance variable
[05:56:20] Radar: the methods are defined dynamically to access it, like @attributes["content"]
[05:56:40] A_Drone: has joined #ruby
[05:57:32] zacts: has joined #ruby
[05:58:15] yfeldblum: has joined #ruby
[05:58:54] pawnbox: has joined #ruby
[05:59:03] yfeldblum: has joined #ruby
[06:00:19] xlegoman: has joined #ruby
[06:01:22] ghr: has joined #ruby
[06:03:22] naftilos76: has joined #ruby
[06:03:51] sucks: has joined #ruby
[06:04:22] sucks: has joined #ruby
[06:06:06] sucks: has joined #ruby
[06:06:53] yadobujo: has joined #ruby
[06:10:25] burgestrand: has joined #ruby
[06:10:49] ghr: has joined #ruby
[06:12:06] sucks: has joined #ruby
[06:12:33] edwinvdgraaf: has joined #ruby
[06:12:49] sucks: has joined #ruby
[06:13:26] blackmesa: has joined #ruby
[06:13:29] DevMagpie: has joined #ruby
[06:13:33] singalaut: has joined #ruby
[06:13:46] nankyokusei: has joined #ruby
[06:15:06] solars: has joined #ruby
[06:18:41] LoneHerm_: has joined #ruby
[06:20:19] ghr: has joined #ruby
[06:21:02] crystal77: has joined #ruby
[06:21:28] firstdayonthejob: has joined #ruby
[06:22:34] Macaveli: has joined #ruby
[06:23:11] sucks: has joined #ruby
[06:23:17] Macaveli: has joined #ruby
[06:24:01] Macaveli: has joined #ruby
[06:24:48] dminuoso: has joined #ruby
[06:24:51] tvw: has joined #ruby
[06:25:41] craigp: has joined #ruby
[06:27:14] Macaveli_: has joined #ruby
[06:28:05] conta: has joined #ruby
[06:28:35] Xeago_: has joined #ruby
[06:28:47] skade: has joined #ruby
[06:28:52] futilegames: has joined #ruby
[06:35:20] ghr: has joined #ruby
[06:35:25] mark_66: has joined #ruby
[06:35:27] colegatron_origi: has joined #ruby
[06:36:10] DevMagpie: has joined #ruby
[06:36:52] moeabdol: has joined #ruby
[06:37:38] jeyraof: has joined #ruby
[06:38:34] A_Drone: has joined #ruby
[06:39:14] aganov: has joined #ruby
[06:40:33] zacts: has joined #ruby
[06:42:40] dionysus69: has joined #ruby
[06:43:04] Xeago_: has joined #ruby
[06:43:21] deecross: has joined #ruby
[06:43:53] the_drow: has joined #ruby
[06:45:40] travisxcode: has joined #ruby
[06:46:31] raeoks: has joined #ruby
[06:47:58] mgiagante: has joined #ruby
[06:49:51] ghr: has joined #ruby
[06:54:58] Spami: has joined #ruby
[06:55:18] deecross: has joined #ruby
[06:55:36] mtkd: has joined #ruby
[06:57:34] Spami: has joined #ruby
[06:57:56] exadeci: has joined #ruby
[06:59:41] finnnnnnnnnnn: has joined #ruby
[06:59:52] ghr: has joined #ruby
[07:00:22] A_Drone: has joined #ruby
[07:01:40] blackmesa: has joined #ruby
[07:08:06] aufi: has joined #ruby
[07:09:52] ghr: has joined #ruby
[07:10:40] jenrzzz: has joined #ruby
[07:11:37] TomyWork: has joined #ruby
[07:13:39] antgel: has joined #ruby
[07:14:01] fraktalize: has joined #ruby
[07:15:15] brianpWins_: has joined #ruby
[07:15:49] blackmesa: has joined #ruby
[07:16:05] blaxter: has joined #ruby
[07:16:20] Firw: has joined #ruby
[07:18:55] aupadhye: has joined #ruby
[07:20:44] deecross: has joined #ruby
[07:20:49] Abonec: has joined #ruby
[07:21:38] Firw: has left #ruby: ()
[07:21:53] ghr: has joined #ruby
[07:23:10] symm-: has joined #ruby
[07:23:40] dminuoso: has joined #ruby
[07:23:44] deecross: has joined #ruby
[07:24:07] flashpoint9: has joined #ruby
[07:25:41] hahuang62: has joined #ruby
[07:25:51] max3: has joined #ruby
[07:28:43] ur5us: has joined #ruby
[07:29:49] dminuoso: has joined #ruby
[07:30:37] pwnd_nsfw: has joined #ruby
[07:31:09] ghr: has joined #ruby
[07:31:40] Guest87305: has joined #ruby
[07:31:52] anisha: has joined #ruby
[07:32:14] pawnbox: has joined #ruby
[07:32:17] achamian_: has joined #ruby
[07:32:25] Kedare: has joined #ruby
[07:33:10] deuterium: has joined #ruby
[07:33:13] moeabdol: has joined #ruby
[07:33:24] andikr: has joined #ruby
[07:35:07] haxrbyte_: has joined #ruby
[07:36:20] A_Drone: has joined #ruby
[07:36:32] dionysus69: has joined #ruby
[07:42:42] Chair: has joined #ruby
[07:42:44] edwinvdgraaf: has joined #ruby
[07:43:10] Hounddog: has joined #ruby
[07:45:15] pawnbox: has joined #ruby
[07:45:47] edwinvdg_: has joined #ruby
[07:46:05] Hyuk: has joined #ruby
[07:47:28] garethrees: has joined #ruby
[07:47:50] sinanislekdemir: has joined #ruby
[07:49:01] travisxcode: has joined #ruby
[07:50:05] edwinvdgraaf: has joined #ruby
[07:50:21] multi_io: has joined #ruby
[07:50:26] deecross: has joined #ruby
[07:54:13] Xeago_: has joined #ruby
[07:55:13] A_Drone: has joined #ruby
[07:56:23] ramfjord: has joined #ruby
[08:01:55] garethrees: has joined #ruby
[08:02:26] nhhc: has joined #ruby
[08:02:40] roshanavand: has joined #ruby
[08:04:14] Rodya_: has joined #ruby
[08:04:29] zenlot6: has joined #ruby
[08:05:45] tvw: has joined #ruby
[08:06:21] Rodya_: has joined #ruby
[08:06:32] mcls: has joined #ruby
[08:08:24] Macaveli: has joined #ruby
[08:10:46] ngw: has joined #ruby
[08:12:44] atomx: has joined #ruby
[08:13:10] isxek: has joined #ruby
[08:14:37] nankyokusei: has joined #ruby
[08:15:22] futilegames: has joined #ruby
[08:15:54] der-landgraf: has joined #ruby
[08:20:11] codecop: has joined #ruby
[08:22:16] zacts: has joined #ruby
[08:22:42] burgestrand: has joined #ruby
[08:22:42] jaruga___: has joined #ruby
[08:24:56] snowy: has joined #ruby
[08:28:29] bweston92: has joined #ruby
[08:28:51] bweston92: has joined #ruby
[08:29:45] A_Drone: has joined #ruby
[08:31:52] biberu: has joined #ruby
[08:33:17] lupine: has joined #ruby
[08:33:25] anisha: has joined #ruby
[08:33:45] eizua: has joined #ruby
[08:34:37] A_Drone: has joined #ruby
[08:36:13] futilegames: has left #ruby: ()
[08:36:24] watersoul: has joined #ruby
[08:37:01] eizua: has joined #ruby
[08:37:52] A_Drone_: has joined #ruby
[08:39:40] eizua: has joined #ruby
[08:41:36] A_Drone: has joined #ruby
[08:45:51] pawnbox: has joined #ruby
[08:47:44] der-landgraf: has joined #ruby
[08:49:08] hck89: has joined #ruby
[08:51:26] jeyraof: has joined #ruby
[08:54:10] Niandalu: has joined #ruby
[08:55:01] blackmesa: has joined #ruby
[08:58:54] crdpink: has joined #ruby
[08:59:18] troulouliou_div2: has joined #ruby
[08:59:25] Ishido: has joined #ruby
[09:00:17] blaxter: has joined #ruby
[09:00:59] blaxter: has joined #ruby
[09:02:09] pawnbox: has joined #ruby
[09:02:31] yfeldblum: has joined #ruby
[09:03:05] marr: has joined #ruby
[09:06:25] valkyrka: has joined #ruby
[09:06:48] Niandalu: has joined #ruby
[09:07:16] valkyrka: hi guys, I know this is Chef but maybe you can give me a hand since it’s Ruby based - executing https://gist.github.com/anonymous/6552a5c36ba89853e2b7668ee3a94189 throws the error /opt/chef-solo/cookbooks/chef-splunk/recipes/deploy_apps.rb:64: syntax error, unexpected end-of-input, expecting keyword_end, which and am I missing?
[09:08:22] elomatreb: valkyrka: Is that the whole file?
[09:08:27] jhass: valkyrka: every do needs an end
[09:08:38] ruby[bot]: Ruby community standards recommend using 2 spaces as indentation (see https://github.com/bbatsov/ruby-style-guide#spaces-indentation and https://ukupat.github.io/tabs-or-spaces/).
[09:08:55] valkyrka: that is the whole file
[09:09:01] Xeago_: has joined #ruby
[09:09:08] elomatreb: Then you're missing an "end" at the end of the file
[09:11:37] valkyrka: thanks @elomatreb
[09:11:40] valkyrka: that did the trick!
[09:11:44] Gooer: has joined #ruby
[09:12:49] xue: has joined #ruby
[09:13:36] dminuoso: valkyrka: Also, you cut out your gist. It says line 64, but your gist has only 55 lines of code.
[09:13:42] dminuoso: So don't lie.
[09:13:58] elomatreb: Why so hostile?
[09:14:59] dminuoso: elomatreb: Because I hate it when people paste incomplete gists. Not only makes it impossible to correlate error messages to source code, but people also have a tendency to cut out parts they assume to be correct, but may be wrong.
[09:15:13] valkyrka: sorry, it’s my bad - i I did cut out the comments which would make it hard to debug
[09:15:35] valkyrka: they were just the comments in the beginning as they reveal my company name
[09:15:42] valkyrka: the company that I work for*
[09:16:07] elomatreb: dminuoso: Even so, calling someone a liar like that is hardly appropriate
[09:17:34] mistermocha: has joined #ruby
[09:20:22] apeiros: lets assume they said "please don't leave out information" and move on. the underlying sentiment to use a clearly negative description is IMO very understandable. they provide free help. having to deal with bad information is annoying. and I think valkyrka understood.
[09:21:22] benlieb: has joined #ruby
[09:22:06] elomatreb: apeiros: Of course, I was purely picking on wording
[09:22:29] ur5us: has joined #ruby
[09:23:50] dminuoso: valkyrka: It's fine. Next time just include a remark to let us (something like: "This is line 64 where the error was reported at") or something similar.
[09:23:52] zacstewart: has joined #ruby
[09:23:59] dminuoso: To let us know I mean. :)
[09:24:00] antgel: has joined #ruby
[09:24:39] TomyWork: 18# def foo; return not 1; end
[09:24:54] TomyWork: 18>> def foo; return not 1; end
[09:24:54] Pumukel: has joined #ruby
[09:25:12] dminuoso: TomyWork: You need to be identified in order to use the bot.
[09:25:28] TomyWork: 18>> def foo; return not 1; end
[09:25:29] ruby[bot]: TomyWork: # => /tmp/execpad-07451cbd4231/source-07451cbd4231:2: syntax error, unexpected kNOT, expecting kEND ...check link for more (https://eval.in/603846)
[09:26:21] TomyWork: i have a VM with ruby 1.8.7 that shows me that strange syntax error... easy enough to work around, but nonetheless odd
[09:27:10] apeiros: TomyWork: it's unrelated to 1.8
[09:27:15] apeiros: >> def foo; return not 1; end
[09:27:16] ruby[bot]: apeiros: # => /tmp/execpad-a7f0c54c17ba/source-a7f0c54c17ba:2: syntax error, unexpected tINTEGER, expecting '(' ...check link for more (https://eval.in/603848)
[09:27:37] apeiros: either precedence or parser issue. I'd bet on precedence. but too lazy to figure the details.
[09:27:55] apeiros: >> def foo; return !1; end # works just fine
[09:27:56] ruby[bot]: apeiros: # => :foo (https://eval.in/603849)
[09:28:05] apeiros: >> def foo; return (not 1); end # does too
[09:28:06] ruby[bot]: apeiros: # => :foo (https://eval.in/603850)
[09:28:36] dminuoso: apeiros: It definitely is a precedence issue.
[09:28:43] TomyWork: >> def foo; return not(@modify_password or @add_entry or @modify_attr or @modify_group); end
[09:28:44] ruby[bot]: TomyWork: # => :foo (https://eval.in/603854)
[09:28:47] dminuoso: apeiros: And it is by design.
[09:28:50] nettoweb: has joined #ruby
[09:28:54] dminuoso: So not a bug, working as intended.
[09:28:57] TomyWork: that's the actual line
[09:29:06] TomyWork: 18>> def foo; return not(@modify_password or @add_entry or @modify_attr or @modify_group); end
[09:29:06] ruby[bot]: TomyWork: # => /tmp/execpad-4e2f3a1785cf/source-4e2f3a1785cf:2: syntax error, unexpected kNOT, expecting kEND ...check link for more (https://eval.in/603855)
[09:29:07] dminuoso: TomyWork: Use !
[09:29:10] armyriad: has joined #ruby
[09:29:15] TomyWork: dminuoso not my code, i'm afraid :)
[09:29:38] dminuoso: TomyWork: It is illegal regardless of the Ruby version.
[09:29:49] TomyWork: dminuoso i just showed that it isn't
[09:30:02] apeiros: TomyWork: I think I just showed that it is :)
[09:30:13] dminuoso: TomyWork: you showed that it is.
[09:30:25] dminuoso: TomyWork: keyword_and is defined as being left associative - explicitly.
[09:30:32] TomyWork: apeiros yeah my inadequately simplified code runs on no ruby version
[09:30:53] cc: has joined #ruby
[09:30:57] apeiros: missed the one where you showed your actual code on current ruby
[09:31:41] dminuoso: Ah, that bit I missed too. :)
[09:31:56] shevy: old ruby confuses people!
[09:33:36] apeiros: yes shevy, it does. have you moved on yet? :-p
[09:33:58] A_Drone: has joined #ruby
[09:34:31] shevy: thanks to tenderlove's syck gem
[09:35:07] apeiros: oh, so you still have the transition syck -> psych before you. have fun.
[09:35:24] shevy: I don't feel any pain right now :)
[09:35:30] dminuoso: TomyWork: Can you run this simple program: "def f; return not(a); end" with "ruby -y" on your 1.8 machine and gist the output?
[09:35:31] apeiros: tip: load all your data using the Syck engine, change the engine to Psych, and then write it back
[09:35:37] apeiros: that's how we migrated from syck to psych
[09:35:53] dminuoso: TomyWork: (I dont have Debian, so I dont have access to Ruby 1.8)
[09:36:11] apeiros: shevy: you will once either syck becomes dysfunctional or you have some dependency which requires psych.
[09:36:19] dminuoso: ACTION is genuinely curious what changes were made to the grammar to make this functional
[09:36:25] chip_: has joined #ruby
[09:36:29] apeiros: dminuoso: 18>> here does htat
[09:36:34] apeiros: 18>> RUBY_VERSION
[09:36:35] ruby[bot]: apeiros: # => "1.8.7" (https://eval.in/603860)
[09:36:58] dminuoso: apeiros: Does it have -y baked in?
[09:37:11] apeiros: now you made me man ruby
[09:37:22] apeiros: lol, "DO NOT USE"
[09:37:30] apeiros: I guess that's why I didn't remember that one
[09:37:42] elomatreb: --i-know-what-im-doing
[09:38:14] apeiros: still love zenspider's i_am_an_idiot_because_my_tests_are_order_dependent (or similar) in minitest
[09:39:35] eizua: has joined #ruby
[09:41:21] Bish: how do i start processes with ruby and pipe from it?
[09:41:41] Bish: sure i have `` or %x(), but how can i start a process and read/write from it's stdin/stdout
[09:41:45] apeiros: Bish: dozens of possibilities
[09:41:57] Bish: what's the best
[09:41:57] apeiros: Kernel/Process.spawn being the most universal
[09:42:01] Bish: inb4 "the best is"
[09:42:02] apeiros: ?best Bish
[09:42:03] ruby[bot]: Bish: "better" and "best" depend entirely on your context. Try to describe what quality would make one thing better than the other.
[09:42:09] Bish: haha, i called it
[09:42:23] apeiros: IO.popen, open3, open4 etc. being alternatives
[09:42:33] skade: has joined #ruby
[09:42:42] Bish: IO.popen sounds good, i've seen that often in code, meaning it is inside good code.
[09:42:56] Bish: bot nothing is more universal than %x/`` right?
[09:43:06] apeiros: um, `` is not universal.
[09:43:10] apeiros: it's the most limited there is.
[09:43:15] shevy: `` is beauty!
[09:43:23] apeiros: well, might consider system() more limited.
[09:43:52] elomatreb: backticks have a weird aftertaste for an ex-php developer
[09:44:19] dminuoso: apeiros: It's not even a Ruby function, it just enables bison debugging - it cannot possibly be useful to anyone using Ruby unless they are debugging not just the interpreter, but the grammar Ruby uses. ;-)
[09:44:20] platzhirsch: has joined #ruby
[09:44:23] apeiros: backticks also shouldn't be used if part of the command is from user-input
[09:44:33] dminuoso: So the "DO NOT USE" makes sense since it would just confuse anyone.
[09:44:53] apeiros: laters @ all
[09:44:53] toretore: has joined #ruby
[09:48:09] wazzat: has joined #ruby
[09:48:58] Bish: im just trying to parse postfix utilities
[09:49:01] Bish: like postqueue -p
[09:50:18] ur5us: has joined #ruby
[09:52:54] A_Drone: has joined #ruby
[09:53:07] AlexRussia: has joined #ruby
[09:54:56] symm-: has joined #ruby
[09:57:45] blackmesa: has joined #ruby
[10:03:15] mtkd: has joined #ruby
[10:06:46] karapetyan: has joined #ruby
[10:07:29] workmad3: has joined #ruby
[10:09:06] nfk: has joined #ruby
[10:11:25] matp: has joined #ruby
[10:11:38] astrobunny: has joined #ruby
[10:12:17] edwinvdgraaf: has joined #ruby
[10:13:15] bauruine: has joined #ruby
[10:13:55] A_Drone: has joined #ruby
[10:14:31] edwinvdgraaf: has joined #ruby
[10:15:30] nankyokusei: has joined #ruby
[10:17:11] freerobby: has joined #ruby
[10:20:11] flashpoint9: has joined #ruby
[10:20:33] rickmasta: has joined #ruby
[10:22:21] alfiemax: has joined #ruby
[10:22:33] skade: has joined #ruby
[10:22:51] Guest76251: has joined #ruby
[10:24:57] flashpoint9: has joined #ruby
[10:25:07] tubuliferous: has joined #ruby
[10:25:40] flashpoi_: has joined #ruby
[10:26:36] TomyWork: dminuoso sles11
[10:26:49] Mimorial: has joined #ruby
[10:27:23] singalaut: has left #ruby: ("WeeChat 1.6-dev")
[10:27:47] dminuoso: TomyWork: I think you mistood my sarcasm for an honest remark.
[10:27:55] TomyWork: https://packages.debian.org/jessie/ruby debian stable has 2.1.5
[10:28:03] TomyWork: oldstable has 1.9.3
[10:30:13] TomyWork: and honestly i get why they dont upgrade after the release. or can you guarantee that a ruby 1.9.3 program runs with 2.3.1?
[10:34:45] e4xit_: has joined #ruby
[10:35:35] giz|work: has joined #ruby
[10:37:06] Gooer: has joined #ruby
[10:38:00] solars: has joined #ruby
[10:38:29] craigp: has joined #ruby
[10:38:58] A_Drone: has joined #ruby
[10:39:36] shevy: this is fine
[10:39:49] shevy: then they should tell people to not come to #ruby but stay on #debian when they have problems related from debian-ruby
[10:39:50] xue: has joined #ruby
[10:41:18] kavanagh: has joined #ruby
[10:42:13] spiette: has joined #ruby
[10:49:31] coffeecupp: has joined #ruby
[10:49:47] daumie254: has joined #ruby
[10:51:18] David27: has joined #ruby
[10:54:04] rodfersou: has joined #ruby
[10:56:34] dionysus69: has joined #ruby
[10:59:48] alfiemax: has joined #ruby
[11:00:46] blackmesa: has joined #ruby
[11:02:28] johnmilton: has joined #ruby
[11:04:17] astrobunny: has joined #ruby
[11:10:43] Rutix: has joined #ruby
[11:10:43] Rutix: has joined #ruby
[11:14:38] sdothum: has joined #ruby
[11:18:13] burgestrand: has joined #ruby
[11:19:31] Ebok: has joined #ruby
[11:19:36] Ropeney: has joined #ruby
[11:23:58] giz|work: has joined #ruby
[11:25:55] the_drow: has joined #ruby
[11:26:22] jaruga___: has joined #ruby
[11:29:20] burgestrand: has joined #ruby
[11:31:57] watersoul_: has joined #ruby
[11:36:02] dminuoso: TomyWork: You have to ask the maintainers in #debian-ruby on OFTC
[11:36:48] dminuoso: TomyWork: And regarding your question, even minor Ruby releases can and have made compatibility breaks.
[11:36:59] Niandalu: has joined #ruby
[11:37:45] A_Drone: has joined #ruby
[11:39:34] ldnunes: has joined #ruby
[11:40:20] TomyWork: i know and that's my point. your sarcasm was a little misplaced :)
[11:43:37] Hanmac: has joined #ruby
[11:43:58] TomyWork: i really hate having to acknowledge that fact about ruby. backwards compatibility is the one big issue with ruby that I have. Would be great if I could just specify a ruby version in my Gemfile and bundler takes care of running it with "bundle exec"
[11:44:22] TomyWork: then I wouldnt have to worry about backwards compatibility at all
[11:44:32] apeiros: you can, it'll at least verify the version
[11:44:43] apeiros: and most of the ruby version managers support .ruby-version files
[11:45:56] TomyWork: well, i've only used rvm so far... installing it is a majorly intrusive operation by itself that I wouldnt want to automate
[11:46:22] TomyWork: gesundheit!
[11:46:33] TomyWork: i'll look that up :)
[11:46:40] apeiros: TomyWork: well, choose your poison
[11:46:55] apeiros: and as adaedra pointed out - there's other version managers than rvm if you don't like the way rvm works
[11:47:26] apeiros: we're using rvm in production and don't have a reason to complain so far (iirc 5-6y of operations)
[11:47:57] TomyWork: well i have this one machine with at least 3 different ruby apps on it
[11:48:12] TomyWork: i dont think it was ever properly set up though
[11:52:42] TomyWork: adaedra chruby looks great
[11:52:46] electrostat: has joined #ruby
[11:53:00] TomyWork: i'll give it a try next time i need a ruby version manager
[11:53:22] dminuoso: apeiros: I still think RVM for production environments is a bold thing to do. ;-)
[11:53:35] dminuoso: But then again I may be spoiled by thinking in terms of docker.
[11:54:11] apeiros: dminuoso: maybe we're not knowledgable enough to see the dangers. but so far zero problems we've had in the past 6 years wrt ruby were rvm's fault.
[11:54:12] hck89: has joined #ruby
[11:54:44] adaedra: at the end, it's always human fault.
[11:54:48] dminuoso: apeiros: Until some random part that expects cd/do not to be hooked breaks. :)
[11:54:57] mdw: has joined #ruby
[11:55:08] apeiros: dminuoso: see, and either we don't have that or it's less of a problem than you make it
[11:55:28] elomatreb: The problems start when *another* program hooks cd
[11:55:45] apeiros: the hooked cd is afaik only a problem for login shells anyway
[11:56:13] dminuoso: apeiros: Well, honestly shells already have a well-defined mechanism for controlling which binary to execute - PATH, which is precisely what chruby does.
[11:56:17] dminuoso: Everything else is just hacks.
[11:56:30] dminuoso: Whether they work or not.
[11:56:40] apeiros: that's not the problem the hook in rvm solves, though
[11:56:43] apeiros: so apples to pears
[11:56:52] dminuoso: Fair enough. :)
[11:56:57] dminuoso: That's a good point.
[11:57:11] elomatreb: The cd hook handles .ruby-version files, right?
[11:57:13] apeiros: the application change is managed through env vars too - again, afaik/afaiu (understand)
[11:57:17] dminuoso: elomatreb: Yeah.
[11:57:18] apeiros: I think so, yes
[11:57:47] dminuoso: elomatreb: Either you have to hook cd or provide a binstub, cant get around that if you want to dynamically check based on your current directory.
[11:58:12] dminuoso: (That is unless another invocation mechanism was provided, that implicitly passed the current working directory)
[11:58:23] elomatreb: Yeah. The question is if it'S even worth it, tbh
[11:58:40] apeiros: on a server: IMO not. on a dev machine: I like the automatic change.
[11:59:14] elomatreb: How often do you have different ruby versions locally though? I have installed and set 2.3.1 when it came out, never needed something else since
[11:59:15] apeiros: we use rvm because it was the first. we never changed because there was no reason to. I guess if we'd retool our stuff, we'd not use rvm on the servers.
[11:59:32] apeiros: how often do I? 100% of the time on all of my machines :)
[11:59:53] apeiros: we don't have the resources to permanently move and test all applications to the current ruby version.
[12:00:05] apeiros: s/permanently/all the time/
[12:00:06] jhass: dminuoso: https://github.com/postmodern/chruby/blob/master/share/chruby/auto.sh#L32
[12:00:09] dminuoso: elomatreb: Well, I might be tempted to have this to accomdate multiple gemsets honestly.
[12:00:17] dminuoso: Because some projects I have use different gemsets.
[12:00:24] elomatreb: Mh, I guess if you're working with more than one app
[12:00:36] jhass: bundler replaced gemsets for me
[12:00:36] apeiros: mhm, more than a dozen apps
[12:00:44] apeiros: same @ gemsets/bundler
[12:01:04] dminuoso: jhass: There's some bits and parts where you have to use gemsets. If you plan on using multiple versions of the same gem providing bins (like Rails)
[12:01:18] jhass: bundle exec rails / bin/rails
[12:01:25] dminuoso: jhass: And how do you install rails?
[12:01:26] Bish: what's a good syntax to let user create configuration of, lets's say, mysql databases
[12:01:36] roshanavand: has joined #ruby
[12:01:36] dminuoso: jhass: I mean yeah, you could start with a Gemfile and populate it as you go..
[12:01:48] Ropeney: has joined #ruby
[12:01:57] jhass: if I start an app I want to start it on latest rails anyway
[12:01:59] Bish: at first i had them like "hostname:port" one per line, but the user wanted more and more parameters, what's a good way to do that
[12:02:07] jhass: so a global installed most recent rails is no issue
[12:02:08] lupine: I quite like bundle install --path=vendor/bundle instead of gemsets
[12:02:14] dminuoso: jhass: I suppose its a moot point, since you only need it once anyway.
[12:02:45] jhass: Bish: most stuff settle's on URIs these days
[12:03:15] jhass: mysql://user:password@host:port/database?encoding=utf8mb4
[12:03:47] dminuoso: Bish: It depends on your needs really. Oracle for example allows for jdbc uris like this: jdbc:oracle:thin:@//[HOST][:PORT]/SERVICE
[12:03:47] blackmesa: has joined #ruby
[12:03:50] jhass: lupine: yeah, I just added BUNDLE_PATH: vendor/bundle to my ~/.bundle/config
[12:04:06] synthroid: has joined #ruby
[12:04:08] dminuoso: Or I suppose that is not an actual URI..
[12:04:28] jhass: the @// part is weird
[12:04:34] jhass: multiple protocols is a ok iirc
[12:04:49] dminuoso: Yeah I was wondering about the @// part
[12:04:52] dminuoso: Reading the RFC now.
[12:06:12] dminuoso: scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
[12:06:23] Mayniac: has joined #ruby
[12:06:24] dminuoso: And the authority needs to be preceeded with //, so it s not an RFC3986 URI.
[12:07:10] jhass: the current RFC is a 6... one iirc?
[12:07:14] hutch34: has joined #ruby
[12:07:56] giz|work: has joined #ruby
[12:08:27] jhass: mh I guess I don't
[12:13:34] dminuoso: jhass: Oh wait, it is a legal URI!
[12:13:42] dminuoso: authority = [ userinfo "@" ] host [ ":" port ]
[12:13:54] dminuoso: Silly me, I was thinking preceeding was doing its thing on the other hand.
[12:13:56] edwinvdgraaf: has joined #ruby
[12:14:16] kgutteridge: has joined #ruby
[12:14:17] p0p0pr37_: has joined #ruby
[12:14:19] dminuoso: Or is this? Im confused.
[12:14:30] jhass: / is not part of host
[12:14:42] kedare1: has joined #ruby
[12:16:20] nankyokusei: has joined #ruby
[12:18:00] deviation: has joined #ruby
[12:19:03] edwinvdgraaf: has joined #ruby
[12:26:23] roshanavand: has joined #ruby
[12:26:38] Mayniac: has joined #ruby
[12:28:15] ElFerna: has joined #ruby
[12:29:09] colegatron_origi: has joined #ruby
[12:29:32] flashpoint9: has joined #ruby
[12:29:43] dionysus69: has joined #ruby
[12:31:21] deviation: has joined #ruby
[12:32:00] rodferso1: has joined #ruby
[12:35:04] statelesscode_: has joined #ruby
[12:36:52] spiette: has joined #ruby
[12:38:37] zacstewart: has joined #ruby
[12:39:01] Ropeney: has joined #ruby
[12:39:34] benlieb: has joined #ruby
[12:39:36] pawnbox: has joined #ruby
[12:40:20] aupadhye: has joined #ruby
[12:40:23] pawnbox: has joined #ruby
[12:41:05] zenlot6: has joined #ruby
[12:42:48] blackmesa: has joined #ruby
[12:43:09] wazzat: has joined #ruby
[12:44:03] crystal77: has joined #ruby
[12:44:20] mr_rich101: has joined #ruby
[12:44:24] Bish: jhass: this is pretty much what i did
[12:45:00] jhass: pretty much?
[12:45:03] Bish: then i ran into the problem of the password containing ":" when the user copy pasted it, (sure i could encode it, but then i have to parse it first ) :(
[12:45:28] lupine: has joined #ruby
[12:45:41] Bish: mysql by the way was just an example
[12:46:22] l4v2: has joined #ruby
[12:46:41] colegatron_origi: has joined #ruby
[12:47:17] jhass: well that's what URL encoding is for though
[12:47:42] Bish: doesn't help if the user doesn't give me correctly encoded urls
[12:47:45] elomatreb: Does it have to be a string?
[12:47:56] Bish: well, it should be readable so #{user} is not confused
[12:48:08] Bish: i would use json, but that's already too complex, i guess
[12:48:16] elomatreb: How about a hash?
[12:48:24] Bish: same thing i guess?
[12:48:44] jhass: oh, actually
[12:48:44] Bish: but it has to be something like that, sadly :/
[12:48:56] jhass: >> require "uri"; URI.parse("mysql://user:pass:word@host").password
[12:48:57] ruby[bot]: jhass: # => "pass:word" (https://eval.in/603963)
[12:48:58] elomatreb: Mh, if JSON is too complex, a URI might be too, esp. if you want the user to have their password in it
[12:49:13] Bish: jhass: well there was more to it, i think it was an ]
[12:49:35] Bish: >> require "uri"; URI.parse("mysql://user:pass]=123@host");
[12:49:36] ruby[bot]: Bish: # => bad URI(is not URI?): mysql://user:pass]=123@host (URI::InvalidURIError) ...check link for more (https://eval.in/603964)
[12:49:48] Bish: it looked kinda like that
[12:50:26] jhass: that you would need to CGI.escape, yes
[12:50:27] zenlot6: has joined #ruby
[12:50:44] Bish: yeah well, but to do that, i would've to parse it first
[12:51:06] Bish: i think i will force the user to do that
[12:51:30] jhass: asking people dealing with database connection strings to URL encode them is not too much to ask
[12:51:31] Bish: well but how to detect corrupt uri
[12:51:44] Bish: jhass: as i said, mysql was an example, they're not adding mysql servers
[12:51:46] jhass: you just did, rescue URI::InvalidURIError
[12:52:03] jhass: Bish: I can only argue on the things you state
[12:52:14] Bish: well, it's basicially the same thing.. just not mysql
[12:52:15] sash_: has joined #ruby
[12:52:19] Bish: a URI to specify stuff
[12:52:35] mtkd: has joined #ruby
[12:52:46] elomatreb: I still think a user working with databases should be capable of using JSON or a ruby Hash
[12:53:00] elomatreb: Def. more convenient than URI-encoding passwords
[12:53:19] mrmortondk: has joined #ruby
[12:53:28] jhass: the thing is URIs are pretty standard for database connection strings
[12:53:34] jhass: your made up JSON structure is not
[12:53:38] sash_: Hey everyone, I am converting an old ruby program that uses ruby-dbi for database stuff. I found some problems and bugs and started to rewrite parts of it. Then I found https://github.com/RDBI/rdbi. Does anyone know if I can use it as a drop in replacement?
[12:54:40] jhass: well, looks pretty dead
[12:54:42] elomatreb: jhass: Isn't requring the password to be URL-encoded just as arbitrary?
[12:55:02] jhass: elomatreb: it is, requring a valid URI as a whole isn't
[12:55:09] bkxd: has joined #ruby
[12:56:00] elomatreb: That's true I suppose. Maybe offer both, as a convenience?
[12:56:17] ekinmur: has joined #ruby
[12:56:49] lupine: ruby doesn't GC anonymous classes, does it?
[12:57:39] jhass: good question, I would hope it does
[12:57:44] jhass: and kinda thought so
[12:58:12] roshanavand: has joined #ruby
[12:58:58] elomatreb: Is the "class << self" syntax explained somewhere? Is it just arbitrary syntax?
[12:59:16] ekinmur: has joined #ruby
[12:59:59] jhass: not sure I would call it arbitrary
[13:00:00] lupine: http://stackoverflow.com/questions/18444430/anonymous-modules-and-classes-garbage-collection-in-ruby suggests it does
[13:00:08] jhass: but it is just syntax to open an objects singleton class
[13:00:40] jhass: >> o = Object.new; class << o; def hello; "world"; end; end; o.hello
[13:00:41] ruby[bot]: jhass: # => "world" (https://eval.in/603972)
[13:01:08] elomatreb: I guess what I meant was: Is the "<<" part something the interpreter does or is it a method call?
[13:01:16] snowy: has joined #ruby
[13:01:17] jhass: it's syntax
[13:01:30] jhass: "class <<" should be the keyword I think
[13:01:43] jhass: lex>> class << foo; end
[13:02:07] lupine: 2.3 and 2.1 are fine
[13:02:13] jhass: tok>> class << foo; end
[13:02:14] ruby[bot]: jhass: I have tokenized your code, the result is at https://eval.in/603973
[13:02:28] jhass: ast>> class << foo; end
[13:02:29] ruby[bot]: jhass: I have parsed your code, the result is at https://eval.in/603974
[13:02:40] skalfyfan: has joined #ruby
[13:02:43] ramortegui: has joined #ruby
[13:02:47] dminuoso: elomatreb: https://github.com/ruby/ruby/blob/trunk/parse.y#L2995
[13:02:53] elomatreb: jhass: Thank you! That's helpful
[13:03:41] elomatreb: dminuoso: OK, that's a little too high for me, but thank you as well!
[13:03:45] singalaut: has joined #ruby
[13:03:51] ChiefAlexander: has joined #ruby
[13:04:16] charliesome: has joined #ruby
[13:05:05] dminuoso: elomatreb: It's the grammar rule that looks for "keyword_class << expression" :)
[13:05:21] dminuoso: Interestingly it shows, that the right hand side may be any epxression.
[13:05:47] blackmesa: has joined #ruby
[13:05:48] elomatreb: I figured as much, can't read that file though. Maybe something I should learn
[13:06:07] Bish: >> require "uri";require "cgi"; URI.parse("mysql://user:#{CGI.escape(pass]=123)}@host");
[13:06:08] ruby[bot]: Bish: # => /tmp/execpad-731f65d245e6/source-731f65d245e6:2: syntax error, unexpected ']', expecting ')' ...check link for more (https://eval.in/603978)
[13:06:34] dminuoso: Bish: You have a stray ] in there, is that desired?
[13:06:46] Bish: obviously not ;)
[13:08:17] dminuoso: elomatreb: If you are familiar with formal grammars, Bison uses a machine readable form of the "Backus Naur Form" :)
[13:08:48] dminuoso: Which Ruby uses to generate its parser from.
[13:09:12] elomatreb: I know the concept, haven't had to work with it yet. Just a hobby programmer :)
[13:11:43] dminuoso: I find it quite surprising, that Bison is still used, considering the age of it and lack of active development over the years.
[13:12:09] dminuoso: The horrible documentation (that more often than not requires you to RTFS), or incomplete implementation of things (C++ generators)
[13:13:06] jrafanie: has joined #ruby
[13:14:13] A_Drone: has joined #ruby
[13:14:34] jhass: parser generators, love them or hate them ;)
[13:15:17] M-shine: has joined #ruby
[13:16:51] griffindy: has joined #ruby
[13:17:16] dminuoso: jhass: ANTLR is far superior in all of these aspects. :P
[13:17:29] dminuoso: Also twitter uses ANTLR. So it has to be good.
[13:17:35] Mayniac: has joined #ruby
[13:17:56] jhass: I'm sure Twitter uses PHP somewhere too.
[13:19:40] cdg: has joined #ruby
[13:21:43] edwinvdg_: has joined #ruby
[13:22:20] swills: has joined #ruby
[13:22:34] malconis: has joined #ruby
[13:23:37] dminuoso: jhass: Ticket created. "Migrate all tools and applications to PHP" Thanks for the hint.
[13:23:38] sinanislekdemir: has joined #ruby
[13:24:00] malconis: has joined #ruby
[13:24:19] aphprentice: has joined #ruby
[13:26:10] dminuoso: jhass: In unrelated news...
[13:26:11] dminuoso: https://twitter.com/RReverser/status/722092088213565440
[13:26:17] dminuoso: Now if that shit is not downright hilarious.
[13:26:52] Bish: well, who does not minify javascript?
[13:27:06] dminuoso: Bish: People who don't just use JavaScript for web development?
[13:27:21] dminuoso: Like, you know, node.js
[13:27:54] Bish: people who not use javascript do not minify it
[13:28:08] Bish: tautology if you ask me
[13:28:15] jhass: Bish: node.js is javascript
[13:28:37] Bish: well, if you use js serverside or clientside is still for web development
[13:28:40] Bish: don't you think so
[13:28:45] Bish: otherwise rails isn't web development
[13:29:00] jhass: there are CLI apps written in node
[13:29:08] jhass: iirc keybase was for example before they switched to Go
[13:29:09] workmad3: Bish: node.js can be used for general purpose tools, not just web services
[13:29:10] Bish: yeah but he said web development
[13:29:29] workmad3: Bish: he said "people who use JS for things other than web development" (rephrased for clarity)
[13:30:08] Bish: workmad3: how do you know what he wanted to say?
[13:30:26] workmad3: Bish: because I can read and interpret the term `don't just use` correctly? :P
[13:30:39] dminuoso: workmad3: You would suck as an LALR parser.
[13:30:46] dminuoso: But nice error recovery!
[13:31:02] Bish: okay you win
[13:31:14] Bish: but know i start the real flamewar
[13:31:18] Bish: and say, who uses spaces instead of tabs
[13:31:26] ruby[bot]: Ruby community standards recommend using 2 spaces as indentation (see https://github.com/bbatsov/ruby-style-guide#spaces-indentation and https://ukupat.github.io/tabs-or-spaces/).
[13:31:27] dminuoso: workmad3: Jokes aside, thanks for clarifying.
[13:31:32] workmad3: dminuoso: no probs :)
[13:32:07] ekinmur: has joined #ruby
[13:32:40] Bish: i never got where the advantage of spaces is
[13:32:50] dminuoso: Bish: They always look the same everywhere.
[13:33:02] dminuoso: (Assuming you ahve a font that uses equal width for all characters of course)
[13:33:10] mjuszczak: has joined #ruby
[13:33:20] Bish: yeah, i would say that's a disadvantage
[13:33:34] Bish: with tabs you could align it, as much as you want ( i do that with vim )
[13:33:49] Bish: just set the width of a tab to 2 spaces, dafuq is wrong with people
[13:33:49] pawnbox: has joined #ruby
[13:34:04] dminuoso: Bish: And then you would have to change the tab width for every project, just because they all mandate different tab width.
[13:34:18] jhass: what if I want to indent something to three visual spaces then?
[13:34:26] Bish: how do i have to change it for every project? i have an editor, and i use it everywhere
[13:34:51] dminuoso: Bish: Project A uses tab indention, assuming 8 character width. Project b uses tab indention, assuming 4 character width.
[13:34:56] jhass: (there's actually a superior alternative to both, flexitabs or so, but no shit actually implements it)
[13:35:22] Bish: dminuoso: !? why would say switch?
[13:35:27] Bish: why would i switch*
[13:35:36] dminuoso: Bish: Because you may be involved in more than one project?
[13:35:45] Bish: i thought both use tabs indention?
[13:36:00] Bish: why would it matter how it's displayed
[13:36:15] bruce_lee: has joined #ruby
[13:36:22] dminuoso: Bish: Let's say you break a single line, say a function call like foo(1234,5678,8901,2345,5678,8901) into multiple lines and align the arugments to appear in the same columnn.
[13:36:56] dminuoso: Suddenly you care very greatly about the tab width.
[13:37:22] Bish: a) that's another thing i'd never do because it's as crazy as spaces as indention
[13:37:30] Bish: b) i don't get how that WOULD be a problem with tabs
[13:37:41] M-Kodo: has joined #ruby
[13:38:06] dminuoso: If you cannot see how that would be a problem with tabs, then I don't know how I can help you.
[13:38:16] aegis3121: has joined #ruby
[13:38:27] Bish: ... yeah pressing spaces twice for every tab i want to write really makes a difference
[13:38:33] Bish: you spaces people are b*s*tcrazy
[13:38:35] dminuoso: Bish: My editor expands tabs automatically into spaces.
[13:38:44] Bish: yeah that's great, and crazy
[13:38:53] dminuoso: Bish: Every half way modern editor supports this.
[13:39:01] snowy: has joined #ruby
[13:39:06] Bish: yeah because people are crazy, never needed it, if i need it then because people are crazy
[13:39:12] jhass: s/half way modern//
[13:39:25] dminuoso: jhass: Well, I wanted to make sure nobody mentioned Notepad if I said that.
[13:39:54] jhass: Bish: cool down, accept that your opinion about a topic is not objective truth (and neither is anybody else's)
[13:40:17] dminuoso: Is it just me, or did github get new default fonts? :)
[13:40:23] Bish: i do accept it, but i have to live in this world where people tell me to use spaces while i think its crazy
[13:40:28] jhass: dminuoso: notepad is as much a editor as the input field of my bank accounts login :P
[13:40:56] jhass: dminuoso: it's not just you, everybody gets a different random font now
[13:41:23] synthroid: has joined #ruby
[13:41:33] jhass: they basically fucked but their font-family to the degree that it's hugely dependent on OS/browser/available fonts
[13:41:50] jhass: more than before anyway
[13:41:56] Bish: i would've never noticed taht if you didn't mention
[13:41:59] dminuoso: Mmm, well whatever they did - I like how it looks.
[13:42:17] dminuoso: So now I am a happy paying customer. :)
[13:42:37] dminuoso: Granted... I was before too..
[13:43:06] johnny56_: has joined #ruby
[13:43:11] failshell: has joined #ruby
[13:44:48] edwinvdgraaf: has joined #ruby
[13:45:41] _pablo_: has joined #ruby
[13:48:02] edwinvdgraaf: has joined #ruby
[13:48:20] _mak: has left #ruby: ("..")
[13:50:08] sergey_makagon: has joined #ruby
[13:50:33] SilverKey: has joined #ruby
[13:50:42] rbr: has joined #ruby
[13:51:13] Macaveli: has joined #ruby
[13:51:18] eljimmy: has joined #ruby
[13:58:26] pawnbox: has joined #ruby
[13:58:56] haxrbyte: has joined #ruby
[13:59:26] SilverKey: has joined #ruby
[13:59:44] solars: has joined #ruby
[14:00:21] freerobby: has joined #ruby
[14:00:43] ekinmur: has joined #ruby
[14:01:40] SilverKey: has joined #ruby
[14:01:44] cpruitt: has joined #ruby
[14:02:31] mattwashere: has joined #ruby
[14:03:48] dfinninger: has joined #ruby
[14:05:38] Mayniac: has joined #ruby
[14:07:40] Spami: has joined #ruby
[14:08:36] mattwashere: has joined #ruby
[14:09:23] Spami_: has joined #ruby
[14:09:46] A_Drone: has joined #ruby
[14:12:49] freerobby: has joined #ruby
[14:12:51] TranzTeKkz: has joined #ruby
[14:13:06] AnoHito_: has joined #ruby
[14:14:51] triangles3: has joined #ruby
[14:15:09] davidcelis_: has joined #ruby
[14:15:42] anisha: has joined #ruby
[14:16:06] maxmanders: has joined #ruby
[14:16:07] j416_: has joined #ruby
[14:16:07] ryotarai_: has joined #ruby
[14:16:26] webnanners: has joined #ruby
[14:16:31] akitada: has joined #ruby
[14:17:54] pawnbox: has joined #ruby
[14:18:07] djbkd: has joined #ruby
[14:18:16] stardiviner: has joined #ruby
[14:18:54] D9: has joined #ruby
[14:22:09] mattwashere: has joined #ruby
[14:22:37] Emmanuel_Chanel: has joined #ruby
[14:22:58] astrobunny: has joined #ruby
[14:24:31] mattwashere: has joined #ruby
[14:25:12] mattwashere: has joined #ruby
[14:25:51] mattwashere: has joined #ruby
[14:25:58] djbkd: has joined #ruby
[14:28:11] kgutteridge: has joined #ruby
[14:35:07] SilverKey: has joined #ruby
[14:38:03] yadobujo: has joined #ruby
[14:38:43] M-mistake: has joined #ruby
[14:41:28] caral: has joined #ruby
[14:41:45] lupine: has joined #ruby
[14:43:55] sepp2k: has joined #ruby
[14:44:20] deadnull: has joined #ruby
[14:44:26] evansbee: has joined #ruby
[14:44:54] plujon: has joined #ruby
[14:46:02] arooni: has joined #ruby
[14:46:11] arooni: has left #ruby: ()
[14:46:52] rippa: has joined #ruby
[14:47:09] dminuoso: has joined #ruby
[14:47:10] gigetoo: has joined #ruby
[14:47:20] fmcgeough: has joined #ruby
[14:47:53] banisterfiend: has joined #ruby
[14:50:22] ChiefAlexander: has joined #ruby
[14:52:15] lupine: has joined #ruby
[14:53:40] agent_white: has joined #ruby
[14:54:28] diegoviola: has joined #ruby
[14:55:15] daumie: has joined #ruby
[14:58:02] tokynet: has joined #ruby
[15:02:18] Macaveli: has joined #ruby
[15:02:32] pawnbox: has joined #ruby
[15:03:13] shinnya: has joined #ruby
[15:04:30] pawnbox: has joined #ruby
[15:05:01] GodFather: has joined #ruby
[15:05:27] Mayniac: has joined #ruby
[15:06:13] aegis3121: has joined #ruby
[15:06:27] SteppenII: has joined #ruby
[15:08:56] SteppenII: Hi, I have the book, programming ruby 1.9, is it worthwhile buying programming ruby 1.2 & 2.0?
[15:09:12] blackmesa: has joined #ruby
[15:09:14] gigetoo: has joined #ruby
[15:09:15] SteppenII: Hi, I have the book, programming ruby 1.9, is it worthwhile buying programming ruby 1.9 & 2.0?
[15:10:04] jhass: probably not, the big changes were between 1.8 and 1.9
[15:10:15] jhass: read a couple what's new in ruby 2.0/2.1/2.2/2.3 blogs
[15:10:38] jhass: you'd have to do that for 2.1/2.2/2.3 anyway so doing it for 2.0 doesn't add much
[15:10:53] SteppenII: Thanks, where are those blogs
[15:11:03] jhass: in your google results
[15:15:38] Silthias: has joined #ruby
[15:16:15] freerobby: has joined #ruby
[15:16:45] yadobujo: has joined #ruby
[15:17:21] erlend: has joined #ruby
[15:17:25] the_drow: has joined #ruby
[15:17:58] the_drow: has joined #ruby
[15:18:49] tubuliferous: has joined #ruby
[15:20:57] Mon_Ouie: has joined #ruby
[15:21:54] dminuoso: has joined #ruby
[15:22:15] malconis: has joined #ruby
[15:23:45] astrobunny: has joined #ruby
[15:24:28] hck89: has joined #ruby
[15:25:09] macsteps: has joined #ruby
[15:25:34] mistermocha: has joined #ruby
[15:25:37] dionysus69: has joined #ruby
[15:27:03] mistermocha: has joined #ruby
[15:31:53] flashpoint9: has joined #ruby
[15:31:53] dvinciguerra: has joined #ruby
[15:33:42] tubuliferous: has joined #ruby
[15:34:51] rkazak: has joined #ruby
[15:38:42] amclain: has joined #ruby
[15:39:33] systemnate: has joined #ruby
[15:40:02] snowy: has joined #ruby
[15:43:49] astrobunny: has joined #ruby
[15:45:03] jmignault: has joined #ruby
[15:45:56] mattwashere: has joined #ruby
[15:46:39] mattwashere: has joined #ruby
[15:48:38] A_Drone: has joined #ruby
[15:48:42] Macaveli: has joined #ruby
[15:49:25] Macaveli: has joined #ruby
[15:50:05] Macaveli: has joined #ruby
[15:50:45] Macaveli: has joined #ruby
[15:50:54] AndyBotwin: has joined #ruby
[15:51:08] dennisvennink: has joined #ruby
[15:51:25] Macaveli: has joined #ruby
[15:52:05] Macaveli: has joined #ruby
[15:52:29] [Butch]: has joined #ruby
[15:53:05] Macaveli: has joined #ruby
[15:53:15] mattwashere: has joined #ruby
[15:54:06] Macaveli_: has joined #ruby
[15:54:07] skade: has joined #ruby
[15:57:57] aegis3121: has joined #ruby
[16:00:24] aupadhye: has joined #ruby
[16:00:51] macsteps: has joined #ruby
[16:00:59] ramfjord: has joined #ruby
[16:01:22] dfinninger: has joined #ruby
[16:01:42] tjohnson: has joined #ruby
[16:02:55] shinnya: has joined #ruby
[16:06:21] techietrash: has joined #ruby
[16:06:30] tristanp: has joined #ruby
[16:07:10] roshanavand: has joined #ruby
[16:07:10] Gadgetoid: has joined #ruby
[16:07:10] Emmanuel_Chanel: has joined #ruby
[16:08:49] elaptics: has joined #ruby
[16:10:14] kgutteridge: has joined #ruby
[16:10:21] whathappens: has joined #ruby
[16:11:05] kith: has joined #ruby
[16:11:50] whathapp_: has joined #ruby
[16:11:55] camonz: has joined #ruby
[16:12:51] blackmesa: has joined #ruby
[16:13:30] webnanners: has joined #ruby
[16:14:13] webnanners: has joined #ruby
[16:14:14] webnanners: has joined #ruby
[16:15:42] cschneid_: has joined #ruby
[16:16:19] depesz: has joined #ruby
[16:16:35] depesz: hi. if/when I do require 'xxx' - how can I see full path to file that got loaded?
[16:17:32] aryaching: has joined #ruby
[16:18:03] nankyokusei: has joined #ruby
[16:18:13] toretore: $LOADED_FEATURES.last
[16:19:04] depesz: toretore: cool. thanks.
[16:19:07] SCHAAP137: has joined #ruby
[16:19:25] smathy: has joined #ruby
[16:21:10] AndrewIsHere: has joined #ruby
[16:21:23] Emmanuel_Chanel: has joined #ruby
[16:21:25] dminuoso: has joined #ruby
[16:21:48] Emmanuel_Chanel: has joined #ruby
[16:21:59] apeiros: note that if xxx requires something itself too, it won't be .last on $LOADED_FEATURES
[16:23:26] anisha: has joined #ruby
[16:23:46] depesz: yeah, noticed.
[16:25:12] moeabdol: has joined #ruby
[16:26:02] toretore: apeiros: won't it though?if i require 'foo' which requires 'bar' it will happen recursively, and the bar require will "finish" first
[16:26:30] Pumukel: has joined #ruby
[16:26:33] nadir: has joined #ruby
[16:26:41] toretore: >> require 'json'; $LOADED_FEATURES[-3, 3]
[16:26:42] ruby[bot]: toretore: # => ["/execpad/interpreters/ruby-2.3.0/lib/ruby/2.3.0/i686-linux/json/ext/generator.so", "/execpad/inter ...check link for more (https://eval.in/604172)
[16:26:50] edwinvdgraaf: has joined #ruby
[16:28:13] daumie: has joined #ruby
[16:28:26] eljimmy: has joined #ruby
[16:28:30] mello: has joined #ruby
[16:28:36] craigp: has joined #ruby
[16:30:09] bogusdisk: has joined #ruby
[16:32:25] blackmesa: has joined #ruby
[16:37:31] tubuliferous: has joined #ruby
[16:37:48] hck89: has joined #ruby
[16:38:50] macsteps: has joined #ruby
[16:39:51] tomchapin: has joined #ruby
[16:39:59] n90b0jjf: has joined #ruby
[16:40:34] polishdub: has joined #ruby
[16:46:19] caral: has joined #ruby
[16:47:28] umdstu: has joined #ruby
[16:48:54] sergey_makagon: has joined #ruby
[16:48:55] jaruga___: has joined #ruby
[16:49:43] SilverKey: has joined #ruby
[16:50:02] Coldblackice: has joined #ruby
[16:50:30] mattwashere: has joined #ruby
[16:51:11] Emmanuel_Chanel: has joined #ruby
[16:51:36] Emmanuel_Chanel: has joined #ruby
[16:52:14] hck89: has joined #ruby
[16:52:32] craigp: has joined #ruby
[16:53:57] marr: has joined #ruby
[16:58:31] eljimmy: has joined #ruby
[16:58:46] frem_: has joined #ruby
[16:59:18] spudowiar: has joined #ruby
[17:00:04] tristanp: has joined #ruby
[17:00:25] symm-: has joined #ruby
[17:00:50] hahuang61: has joined #ruby
[17:02:11] freerobby: has joined #ruby
[17:02:29] aegis3121: has joined #ruby
[17:02:51] daumie: has joined #ruby
[17:03:00] d5sx43: has joined #ruby
[17:03:45] benlieb: has joined #ruby
[17:03:47] dragon9783: has joined #ruby
[17:04:53] yeticry: has joined #ruby
[17:05:56] synthroid: has joined #ruby
[17:08:31] pawnbox: has joined #ruby
[17:08:41] swills: has joined #ruby
[17:11:39] blackmesa: has joined #ruby
[17:11:55] pawnbox: has joined #ruby
[17:12:22] mistermocha: has joined #ruby
[17:13:14] daumie: has joined #ruby
[17:14:33] eljimmy: has joined #ruby
[17:15:12] daumie: has joined #ruby
[17:15:12] d5sx43: has joined #ruby
[17:15:13] firstdayonthejob: has joined #ruby
[17:16:16] d5sx43: has joined #ruby
[17:16:17] leea: has joined #ruby
[17:16:28] aegis3121: has joined #ruby
[17:18:07] giz|work: has joined #ruby
[17:19:35] d5sx43: has joined #ruby
[17:20:19] SilverKey: has joined #ruby
[17:21:52] swills: has joined #ruby
[17:22:32] nando293921: has joined #ruby
[17:22:52] Madplatypus: has joined #ruby
[17:23:04] freerobby: has joined #ruby
[17:23:25] daumie: has joined #ruby
[17:23:27] [Butch]: has joined #ruby
[17:25:26] shinnya: has joined #ruby
[17:26:27] dopamean_: has joined #ruby
[17:27:25] maloik: has joined #ruby
[17:28:07] hahuang61: has joined #ruby
[17:30:19] SilverKey: has joined #ruby
[17:30:51] eljimmy: has joined #ruby
[17:31:03] deadnull: has joined #ruby
[17:31:30] ChiefAlexander: has joined #ruby
[17:31:36] dionysus69: has joined #ruby
[17:32:09] karapetyan: has joined #ruby
[17:32:19] max2: has joined #ruby
[17:33:17] ChiefAlexander: has joined #ruby
[17:33:30] craigp: has joined #ruby
[17:33:59] skade: has joined #ruby
[17:34:17] Spami: has joined #ruby
[17:34:26] finisherr: has joined #ruby
[17:34:33] willemb: has joined #ruby
[17:34:55] axl_: has joined #ruby
[17:35:42] TomyLobo: has joined #ruby
[17:35:54] roshanavand: has joined #ruby
[17:36:49] axl_: has left #ruby: ()
[17:37:48] Spami: has joined #ruby
[17:40:08] ramfjord: has joined #ruby
[17:40:27] skade: has joined #ruby
[17:41:55] pwnd_nsfw`: has joined #ruby
[17:43:28] SilverKey: has joined #ruby
[17:44:24] tristanp: has joined #ruby
[17:44:56] hellcode: has joined #ruby
[17:47:23] sneakers: has joined #ruby
[17:48:12] eljimmy: has joined #ruby
[17:48:35] vuoto: has joined #ruby
[17:51:59] roshanavand: has joined #ruby
[17:53:10] yfeldblum: has joined #ruby
[17:54:09] Oclair: has joined #ruby
[17:54:43] kirun: has joined #ruby
[17:58:52] axl_: has joined #ruby
[17:58:58] eljimmy: has joined #ruby
[17:59:13] macsteps: has joined #ruby
[18:00:36] marxarelli: has joined #ruby
[18:03:25] minimalism: has joined #ruby
[18:05:31] vuoto: has joined #ruby
[18:06:29] vuoto: has joined #ruby
[18:06:48] eljimmy: has joined #ruby
[18:07:49] allstar: has joined #ruby
[18:09:11] elementaru: has joined #ruby
[18:09:21] zeroDi: has joined #ruby
[18:10:31] FernandoBasso: How do I use 'foo 10 bar 20 jedi'[/\d+/, 1], but makig the regex global?
[18:11:00] FernandoBasso: It seems ruby does not allow something like /regex/g
[18:12:02] dminuoso: tercenya: Not for String#[] from what I can tell. You have to use the Regexp#match interface.
[18:12:08] FernandoBasso: yes, I have seen that on the web. I just wondered if there is a way using the syntax I showed.
[18:12:28] Hanmac: dminuoso: Regexp#match also does only the first one
[18:12:58] dminuoso: hanmac: On second thought... :-)
[18:13:15] apeiros: FernandoBasso: correct. in ruby, it's not the regex which decides how often it should match, it's the method which operates on/with the regex.
[18:13:16] eljimmy: has joined #ruby
[18:13:19] inukshuk_: has joined #ruby
[18:13:25] dminuoso: FernandoBasso: map is your friend then :-)
[18:13:25] apeiros: hence toretore's String#scan
[18:14:32] failshell: has joined #ruby
[18:15:42] edwinvdgraaf: has joined #ruby
[18:17:31] moeabdol: has joined #ruby
[18:18:26] axl_: has joined #ruby
[18:18:54] nankyokusei: has joined #ruby
[18:19:14] skade: has joined #ruby
[18:19:36] bluOxigen: has joined #ruby
[18:20:30] douglascorrea: has joined #ruby
[18:20:39] wrkrcoop: has joined #ruby
[18:20:55] vuoto_: has joined #ruby
[18:21:27] whathappens: has joined #ruby
[18:21:57] GodFather: has joined #ruby
[18:22:47] wrkrcoop: im trying to stub a method in a module but it doesnt seem to be working
[18:23:12] wrkrcoop: i tried my_module.stub(:endpoint_transaction).and_return(:msd)
[18:23:22] wrkrcoop: it says undefined method ‘endpoint transaction’
[18:23:25] aryaching: has joined #ruby
[18:23:50] wrkrcoop: the method in the module is not prefixed with self.
[18:24:26] toretore: ?code wrkrcoop
[18:24:26] ruby[bot]: wrkrcoop: We can't help you without your code, please post it to https://gist.github.com
[18:24:45] replay: has joined #ruby
[18:24:49] wrkrcoop: that is the code: my_module.stub(:endpoint_transaction).and_return(:msd)
[18:25:21] wrkrcoop: my_module def endpoint_transaction end end
[18:25:26] pawnbox: has joined #ruby
[18:25:40] mistermocha: has joined #ruby
[18:26:52] cdg: has joined #ruby
[18:27:42] wrkrcoop: thats the code
[18:28:02] ncthom91: has joined #ruby
[18:28:14] aryaching: has joined #ruby
[18:28:31] jhass: come back when you have a runnable self contained example demonstrating your issue
[18:28:51] AndyBotwin: has joined #ruby
[18:28:54] jhass: we've been through this too many times, please just stop it
[18:30:16] wrkrcoop: im just asking how to stub a module
[18:30:34] jhass: your example is correct
[18:30:42] jhass: it's also irrelevant to your real code
[18:30:45] wrkrcoop: hmm wierd then
[18:35:15] leea: has joined #ruby
[18:37:30] JeanCarloMachado: has joined #ruby
[18:39:26] biberu: has joined #ruby
[18:46:28] jaruga___: has joined #ruby
[18:47:44] David27: has joined #ruby
[18:48:05] AndroidLoverInSF: has joined #ruby
[18:49:09] lupine: this guy gives worker's cooperatives a bad name :/
[18:51:53] akira616: has joined #ruby
[18:53:30] krobzaur: has joined #ruby
[18:53:38] pwnd_nsfw: has joined #ruby
[18:53:59] Mayniac: has joined #ruby
[18:54:50] tristanp_: has joined #ruby
[18:55:49] pawnbox: has joined #ruby
[18:57:25] djbkd: has joined #ruby
[18:57:53] Dimik: has joined #ruby
[18:59:19] miqlas-H: has joined #ruby
[19:01:36] gregf: has joined #ruby
[19:01:40] aegis3121: has joined #ruby
[19:02:07] daumie: has joined #ruby
[19:02:22] eljimmy: has joined #ruby
[19:02:52] havenwood: ACTION stubs a toe
[19:04:05] spider-mario: has joined #ruby
[19:04:10] GinoMan2440: has joined #ruby
[19:08:04] Mimorial: has joined #ruby
[19:09:19] freerobby: has joined #ruby
[19:11:00] shevy: stab all the toes!
[19:13:08] hutch34: has joined #ruby
[19:18:50] shadeslayer: has joined #ruby
[19:21:12] gregf: has joined #ruby
[19:21:36] lupine: sorry matz ^^
[19:21:38] tristanp: has joined #ruby
[19:21:47] Spami: has joined #ruby
[19:21:47] skade: has joined #ruby
[19:21:57] edwinvdgraaf: has joined #ruby
[19:23:04] kappy: has joined #ruby
[19:24:04] sergey_makagon: has joined #ruby
[19:30:13] tristanp_: has joined #ruby
[19:31:37] douglasc_: has joined #ruby
[19:34:43] haxrbyte_: has joined #ruby
[19:36:35] symm-: has joined #ruby
[19:37:05] skade: has joined #ruby
[19:37:10] toretore: has joined #ruby
[19:37:17] Mayniac: has joined #ruby
[19:39:18] drbrain: has joined #ruby
[19:39:18] drbrain: has joined #ruby
[19:39:51] chris2: has joined #ruby
[19:43:14] tomchapin: has joined #ruby
[19:44:56] postapocallyptic: I'm doing a do while loop and I have a break inside it and for some reason when the break is reached the whole application shuts down. instead of getting out of the loop.
[19:45:08] postapocallyptic: maybe I should specify the loop with a {}
[19:45:22] freerobby: has joined #ruby
[19:45:48] minimalism: has joined #ruby
[19:46:54] Mayniac: has joined #ruby
[19:46:55] shevy: postapocallyptic come on man
[19:47:00] toretore: ?code postapocallyptic
[19:47:01] ruby[bot]: postapocallyptic: We can't help you without your code, please post it to https://gist.github.com
[19:49:31] havenwood: postapocallyptic: control will be transferred to the line after the loop block after a break
[19:50:49] zacts: has joined #ruby
[19:51:12] wrkrcoop: has joined #ruby
[19:51:38] postapocallyptic: the code goes like this http://pastebin.com/7gpLXYQH
[19:51:38] ruby[bot]: postapocallyptic: as I told you already, please use https://gist.github.com
[19:52:03] pawnbox: has joined #ruby
[19:52:28] johnmilton: has joined #ruby
[19:52:37] n90b0jjf: has joined #ruby
[19:52:46] lupine: has joined #ruby
[19:52:57] toretore: `begin` does not loop
[19:54:48] shevy: switch to "loop {}" constructs and your problems will go away
[19:56:28] flashpoint9: has joined #ruby
[19:58:15] ChiefAlexander: has joined #ruby
[19:58:26] kavanagh: has joined #ruby
[19:58:36] dminuoso: toretore: I think all begin does is set up catch/throw (the exception mechanism uses this)
[19:58:57] arooni-mobile: has joined #ruby
[20:01:29] wrkrcoop: has joined #ruby
[20:02:03] jhass: dminuoso: begin; body; end while condition is one way to do a do-while loop in ruby
[20:02:37] whathappens: has joined #ruby
[20:02:48] dminuoso: jhass: I actually wonder how that is implemented.
[20:02:53] rcvalle: has joined #ruby
[20:02:56] jhass: special cased
[20:03:06] highbass: has joined #ruby
[20:03:17] dminuoso: Like everything else in Ruby. :-)
[20:03:29] highbass: hey guys.. i used some gems to overwrite the default Raisl logger... however, i still have some logs that get written over to logs/production.log ....
[20:03:37] highbass: how can i go about redirecting those logs to a different location?
[20:03:43] dminuoso: ?rails highbass
[20:03:43] ruby[bot]: highbass: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[20:03:52] dminuoso: You are welcome.
[20:04:01] highbass: join #RubyOnRails
[20:04:04] whathappens: has joined #ruby
[20:04:24] tristanp: has joined #ruby
[20:06:51] isberg: has joined #ruby
[20:09:12] nando293921: has joined #ruby
[20:09:48] elifoster: has joined #ruby
[20:10:32] LBRapid: has joined #ruby
[20:10:32] yqt: has joined #ruby
[20:10:36] newbie1: has joined #ruby
[20:11:02] chip_: has joined #ruby
[20:11:05] johnmilton: has joined #ruby
[20:11:37] jhass: has joined #ruby
[20:14:17] hahuang61: has joined #ruby
[20:14:38] yfeldblum: has joined #ruby
[20:15:34] Guest72131: has joined #ruby
[20:18:40] ooo: has joined #ruby
[20:19:02] hellcode: Ijust made my first nontrivial ruby script
[20:19:06] hellcode: ACTION feels good
[20:19:26] shevy: did you write a class for that
[20:19:35] smathy: has joined #ruby
[20:19:50] nankyokusei: has joined #ruby
[20:19:56] hellcode: three classes
[20:20:17] hellcode: they could've been objects tho
[20:20:59] jenrzzz: has joined #ruby
[20:20:59] jenrzzz: has joined #ruby
[20:24:41] karapetyan: has joined #ruby
[20:25:54] postapocallyptic: ACTION <3 ruby
[20:26:15] dminuoso: hellcode: Classes are objects!
[20:26:18] dminuoso: hellcode: ;-)
[20:26:30] dminuoso: Either way, you created objects! :-)
[20:26:51] iszak: has left #ruby: ()
[20:27:31] flashpoint9: has joined #ruby
[20:27:35] VeryBewitching: has joined #ruby
[20:27:44] SilverKey: has joined #ruby
[20:27:45] edwinvdgraaf: has joined #ruby
[20:29:06] Polysics: has joined #ruby
[20:30:13] hellcode: fair enough
[20:31:07] dminuoso: hellcode: For all intends and purposes everything in Ruby is an object, consider this to be a base paradigm of the language.
[20:32:00] blackgoat: has joined #ruby
[20:34:29] Madplatypus: has joined #ruby
[20:36:06] hellcode: it's actually one of the best things in the language imo
[20:39:01] smathy: has joined #ruby
[20:39:37] mrmortondk: has joined #ruby
[20:39:59] vuoto: has joined #ruby
[20:40:23] shevy: classes are one (good) way to arrange and in particular re-use code
[20:40:59] leea: has joined #ruby
[20:42:35] skade: has joined #ruby
[20:45:04] wrkrcoop: has joined #ruby
[20:47:05] Hobbyboy: has joined #ruby
[20:48:15] AndyBotwin: has joined #ruby
[20:50:07] hahuang61: has joined #ruby
[20:57:20] hellcode: I was more used to the functional way
[20:57:30] hellcode: but it's not tooo different once you get used to it
[20:57:44] akira616: has joined #ruby
[20:59:47] tristanp: has joined #ruby
[21:02:12] dfinninger: has joined #ruby
[21:03:06] hahuang61: has joined #ruby
[21:04:26] tubuliferous: has joined #ruby
[21:05:11] buylowsellhigh: has joined #ruby
[21:05:43] buylowsellhigh: how do I handle socket connection exceptions after a connection has been established
[21:07:35] flashpoint9: has joined #ruby
[21:09:45] Avinty-L: has joined #ruby
[21:10:55] symm-: has joined #ruby
[21:11:20] skalfyfan: has joined #ruby
[21:11:22] postmodern: has joined #ruby
[21:11:39] edwinvdg_: has joined #ruby
[21:12:28] Guest43: has joined #ruby
[21:12:29] Guest43: has joined #ruby
[21:13:04] arooni-mobile: has joined #ruby
[21:17:12] Avinty-L_: has joined #ruby
[21:17:27] arooni-mobile__: has joined #ruby
[21:17:55] buylowsellhigh: I connect to the socket, begin rescue end, and then run the socket related code in another begin rescue end block, to ensure there are no errors?
[21:18:13] dminuoso: buylowsellhigh: First, don't use catch all rescue.
[21:18:16] dminuoso: It is very bad style.
[21:18:24] dminuoso: Be explicit about what kind of exceptions you expect.
[21:19:38] tomchapin: has joined #ruby
[21:20:02] skade: has joined #ruby
[21:20:07] jud: has joined #ruby
[21:20:32] AndrewIsHere: has joined #ruby
[21:21:22] zacts: has joined #ruby
[21:22:13] ledestin: has joined #ruby
[21:24:03] whathappens: has joined #ruby
[21:25:25] tubuliferous: has joined #ruby
[21:25:31] spudowiar: has joined #ruby
[21:26:20] arooni-mobile: has joined #ruby
[21:27:04] jhass: "to ensure there are no errors" is not well worded, rescue doesn't not prevent errors from happening, it just gives you a chance to handle them instead of crashing your program
[21:27:19] kavanagh: has joined #ruby
[21:27:30] ChiefAlexander: has joined #ruby
[21:27:46] rikkipitt: has joined #ruby
[21:29:05] edwinvdgraaf: has joined #ruby
[21:29:44] gnufied: has joined #ruby
[21:30:04] GodFather: has joined #ruby
[21:31:25] skade: has joined #ruby
[21:33:14] karapetyan: has joined #ruby
[21:34:05] failshell: has joined #ruby
[21:34:21] wrkrcoop: has joined #ruby
[21:35:45] Avinty-L: has joined #ruby
[21:36:32] ruby[bot]: hellcode: # => [] (https://eval.in/604275)
[21:36:40] hellcode: >> system("uname")
[21:36:41] ruby[bot]: hellcode: # => (https://eval.in/604276)
[21:36:55] hellcode: bot not safe ?
[21:37:34] kavanagh: has joined #ruby
[21:37:47] Avinty-L_: has joined #ruby
[21:38:53] hellcode: >> system("pwd")
[21:38:54] ruby[bot]: hellcode: # => (https://eval.in/604279)
[21:39:04] foul_owl: has joined #ruby
[21:39:12] hellcode: oh I see. cool, it's quite safe
[21:39:29] Sashimi: has joined #ruby
[21:39:34] Papierkorb: If that'd be the only attack possible Oo
[21:39:40] foul_owl: Hi folks. If there is a webrick process running on a server, is there a command I can run to see the path to the code that webrick is serving?
[21:39:49] foul_owl: (os is linux)
[21:40:07] moei: has joined #ruby
[21:40:54] hellcode: Papierkorb: okay maybe it's not too safe but the owner did not neglect that aspect
[21:41:01] mistermocha: has joined #ruby
[21:41:04] edwinvdg_: has joined #ruby
[21:41:28] Papierkorb: hellcode: it should be quite safe. Else the owner probably wouldn't make a web service out of it.
[21:41:53] Papierkorb: Or, if it wouldn't be, it'd be constantly owned.
[21:42:04] yadobujo: has joined #ruby
[21:42:40] xlegoman: has joined #ruby
[21:42:52] hellcode: yeah I can imagine
[21:43:05] Xiti: has joined #ruby
[21:43:21] Mon_Ouie: It runs in a ptrace sandbox to restrict the system calls you can run
[21:43:59] edwinvdgraaf: has joined #ruby
[21:44:18] Avinty-L: has joined #ruby
[21:45:38] Avinty-L_: has joined #ruby
[21:45:41] kavanagh: has joined #ruby
[21:46:11] bkxd: has joined #ruby
[21:46:25] Ebok: has joined #ruby
[21:48:10] tristanp: has joined #ruby
[21:50:11] A_Drone: has joined #ruby
[21:52:15] flashpoint9: has joined #ruby
[21:52:18] blackmesa: has joined #ruby
[21:53:18] troulouliou_div2: has joined #ruby
[21:53:47] eam: >> File.read("/proc/self/exe", 4)[1,3]
[21:53:48] ruby[bot]: eam: # => "ELF" (https://eval.in/604310)
[21:55:33] al2o3-cr: File.read("/proc/self/exe", 3, 1)
[21:55:56] swills: has joined #ruby
[21:57:38] SilverKey: has joined #ruby
[21:58:11] Ebok: has joined #ruby
[21:59:19] aryaching: has joined #ruby
[22:00:35] aeterne: has joined #ruby
[22:00:38] MrBusiness2: has joined #ruby
[22:01:35] eam: al2o3-cr: tru
[22:05:07] swills: has joined #ruby
[22:07:45] Mia: has joined #ruby
[22:09:19] Avinty-L: has joined #ruby
[22:09:54] Avinty-L_: has joined #ruby
[22:11:15] n90b0jjf: has joined #ruby
[22:12:28] dennisvennink: Is it possible to get the name of the parent's process in a Ruby script?
[22:13:12] rkazak: has joined #ruby
[22:13:53] workmad3: dennisvennink: http://ruby-doc.org/core-2.2.0/Process.html#method-c-ppid you can get the parent pid
[22:15:41] dennisvennink: workmad3: Thanks.
[22:16:04] dennisvennink: I guess I could use the shell to get the name from that pid.
[22:17:22] workmad3: dennisvennink: there should be a way with the Process class to get that too, I guess
[22:17:31] ramfjord: how to I convert a unix time in seconds since epoch to a GMT timestamp if my default timezone is something else?
[22:17:37] pawnbox: has joined #ruby
[22:19:53] ramfjord: nm, my question doens't make sense. If I had a quarter for every hour I spent dealing with timezone issues between my local system, my local test dabase, staging database, prod system time, prod database timezone...
[22:20:00] ramfjord: I'd have not much more money than I already hav
[22:20:54] nankyokusei: has joined #ruby
[22:21:35] al2o3-cr: dennisvennink: you could use, File.read("/proc/#{Process.ppid}/cmdline")
[22:23:29] jenrzzz: has joined #ruby
[22:23:29] jenrzzz: has joined #ruby
[22:23:44] mattwashere: has joined #ruby
[22:23:45] dennisvennink: al2o3-cr: I'm on macOS. I don't think it has a /proc directory.
[22:24:57] al2o3-cr: i should stop assuming
[22:25:15] al2o3-cr: scrap that then
[22:25:45] dennisvennink: al2o3-cr: Thanks though. :—)
[22:26:31] kavanagh: has joined #ruby
[22:28:03] sepp2k: has joined #ruby
[22:28:50] havenwood: dennisvennink: maybe something like: `ps -o comm= #{Process.ppid}`.chomp
[22:29:59] skalfyfan: has joined #ruby
[22:30:17] dennisvennink: havenwood: That works. :—)
[22:30:24] n90b0jjf: has joined #ruby
[22:30:51] havenwood: dennisvennink: or maybe ucomm is slightbly better?: `ps -o ucomm= #{Process.ppid}`.chomp
[22:31:01] ramfjord: >> Time.at(Time.utc('2015-12-1')).utc
[22:31:02] ruby[bot]: ramfjord: # => 2015-01-01 00:00:00 UTC (https://eval.in/604322)
[22:31:13] fredolinhares: has joined #ruby
[22:31:54] dennisvennink: havenwood: Indeed. First one returns a file path, second returns just the name. Cheers.
[22:32:07] skalfyfan: has joined #ruby
[22:32:59] moeabdol: has joined #ruby
[22:33:51] zenlot: has joined #ruby
[22:33:52] djbkd: has joined #ruby
[22:33:57] ramfjord: >> '2015-12-1'.to_i
[22:33:58] ruby[bot]: ramfjord: # => 2015 (https://eval.in/604324)
[22:34:44] SilverKey: has joined #ruby
[22:36:12] Axy: has joined #ruby
[22:36:37] nando293921: has joined #ruby
[22:36:54] wrkrcoop: has joined #ruby
[22:42:44] mistermocha: has joined #ruby
[22:43:49] flashpoint9: has joined #ruby
[22:46:08] flashpoint9: has joined #ruby
[22:46:24] Polysics: has joined #ruby
[22:47:45] wrkrcoop: has joined #ruby
[22:48:59] rikkipitt: has joined #ruby
[22:52:04] yeticry: has joined #ruby
[22:53:04] triangles: has joined #ruby
[22:54:28] tomchapin: has joined #ruby
[22:54:54] tristanp: has joined #ruby
[22:56:49] edwinvdg_: has joined #ruby
[23:00:26] Nahra: has joined #ruby
[23:03:00] jenrzzz: has joined #ruby
[23:09:36] yfeldblum: has joined #ruby
[23:09:39] dminuoso: has joined #ruby
[23:09:40] A_Drone: has joined #ruby
[23:10:19] leea: has joined #ruby
[23:11:04] daffy_duck: has joined #ruby
[23:11:41] aryaching_: has joined #ruby
[23:12:04] dvinciguerra: has joined #ruby
[23:13:59] Rodya_: has joined #ruby
[23:14:05] mattwashere: has joined #ruby
[23:15:31] wrkrcoop: has joined #ruby
[23:17:35] karapetyan: has joined #ruby
[23:18:25] Mayniac: has joined #ruby
[23:20:22] zacts: has joined #ruby
[23:20:24] bogdanteleaga: has joined #ruby
[23:24:36] AndrewIs_: has joined #ruby
[23:28:20] arescorpio: has joined #ruby
[23:29:23] drale2k: has joined #ruby
[23:30:04] Rodya_: has joined #ruby
[23:31:10] hck89: has joined #ruby
[23:35:52] aryaching: has joined #ruby
[23:36:40] Mayniac: has joined #ruby
[23:41:11] AlexRussia: has joined #ruby
[23:46:13] SilverKey: has joined #ruby
[23:48:25] ReK2GnULinuX: has joined #ruby
[23:48:50] ferr: has joined #ruby
[23:54:05] hutch34: has joined #ruby
[23:54:14] shevy: does anyone know of some ruby scripts that work in a very simple manner, and tell you which specific file/class in any given ruby gem/project may be "slow"? that is, say you have 100 .rb files, one class each, some perform only a few tasks, others perform more. I sorta want to have a group-specific way to analyze which file or which files is/are the bottleneck
[23:55:41] flashpoint9: has joined #ruby
[23:57:46] eljimmy: has joined #ruby
[23:57:46] n90b0jjf: has left #ruby: ()