« Back to channel list

#ruby - 16 June 2016

« Back 1 day Forward 1 day »
[00:03:51] startupality: has joined #ruby
[00:04:23] certainty: has joined #ruby
[00:05:18] al2o3-cr: tothepoint = big green fucking giant; if big green fucking giant gotta big green fucking hammer then run else poke the fuckers eyes out end # of story
[00:06:21] ramfjord_: has joined #ruby
[00:06:23] RegulationD: has joined #ruby
[00:06:26] chouhoulis: has joined #ruby
[00:08:35] ledestin: has joined #ruby
[00:09:05] jenrzzz: has joined #ruby
[00:09:05] jenrzzz: has joined #ruby
[00:09:51] kwatz: has joined #ruby
[00:09:59] destructure: has joined #ruby
[00:11:38] flashpoint9: has joined #ruby
[00:13:25] rickmasta: has joined #ruby
[00:14:58] matp_: has joined #ruby
[00:15:21] Dios: has joined #ruby
[00:17:38] jhass: al2o3-cr: we told you in the past, don't drink and IRC
[00:17:40] jhass: !kick al2o3-cr
[00:17:42] ruby[bot]: +bbb $a:gr33n7007h$#ruby-banned al2o3-cr!*@*$#ruby-banned *!*@unaffiliated/gr33n7007h$#ruby-banned
[00:17:44] ruby[bot]: ruby[bot] kicked al2o3-cr: offense, see http://ruby-community.com/pages/user_rules
[00:18:42] ruby[bot]: -bbb $a:gr33n7007h$#ruby-banned al2o3-cr!*@*$#ruby-banned *!*@unaffiliated/gr33n7007h$#ruby-banned
[00:19:27] arooni: has joined #ruby
[00:20:44] hxegon_: are #reduce and #inject analagous to fold_l or fold_r?
[00:21:00] jhass: hxegon_: foldl
[00:21:47] hxegon_: jhass: is there a way to foldr?
[00:22:03] jhass: .reverse.reduce ?
[00:22:14] ramfjord: has joined #ruby
[00:22:24] hxegon_: doesn't work in my cas
[00:23:09] jhass: well perhaps ask about your usecase
[00:25:04] hxegon: I'll explain it in a bit, have to head out for now. thanks jhass
[00:26:31] vdamewood: has joined #ruby
[00:27:44] ljarvis: has joined #ruby
[00:31:25] ekinmur: has joined #ruby
[00:32:04] arooni: has joined #ruby
[00:33:23] nankyokusei: has joined #ruby
[00:34:40] swills: has joined #ruby
[00:35:16] moeabdol: has joined #ruby
[00:35:25] mistermocha: has joined #ruby
[00:37:05] solars: has joined #ruby
[00:40:20] elifoster: has joined #ruby
[00:42:13] aupadhye: has joined #ruby
[00:42:34] matp: has joined #ruby
[00:43:43] Tempesta: has joined #ruby
[00:46:17] charliesome: has joined #ruby
[00:47:11] arooni: has joined #ruby
[00:47:48] arescorpio: has joined #ruby
[00:51:36] Sashimi: has joined #ruby
[00:51:46] Ropeney: has joined #ruby
[00:52:16] Sashimi: has joined #ruby
[00:53:30] freerobby: has joined #ruby
[00:54:24] charliesome: has joined #ruby
[00:55:32] al2o3-cr: has joined #ruby
[00:56:29] minimalism: has joined #ruby
[00:57:51] Niham: has joined #ruby
[00:58:33] blackmes1: has joined #ruby
[01:00:12] danostrowski: has joined #ruby
[01:01:24] maloik: has joined #ruby
[01:02:05] arooni: has joined #ruby
[01:02:45] Rodya_: has joined #ruby
[01:05:10] certainty: has joined #ruby
[01:07:13] jancel: has joined #ruby
[01:08:33] Rodya_: has joined #ruby
[01:10:55] aryaching: has joined #ruby
[01:11:47] lapointe: has joined #ruby
[01:12:17] charliesome: has joined #ruby
[01:12:53] Channel6: has joined #ruby
[01:13:18] lapointe: I'm looking for a way to search for multiple patterns in a log file (multiple lines) and return an error if one of them is not present
[01:13:36] lapointe: this is for a sensu plugin if that matters
[01:14:11] lapointe: as you can expect, I'm not very good at ruby ;)
[01:14:16] lapointe: so your help is appreciated
[01:15:10] mistermo_: has joined #ruby
[01:15:25] AcidCras_: has joined #ruby
[01:16:31] arooni: has joined #ruby
[01:17:40] rickmasta: has joined #ruby
[01:18:24] shevy: you can use .scan() and check the result you get from it
[01:18:55] shevy: ruby-doc.org/core/String.html#method-i-scan
[01:19:22] mistermocha: has joined #ruby
[01:19:40] freerobby: has joined #ruby
[01:20:04] rustyworks: has joined #ruby
[01:22:01] rustyworks: has left #ruby: ()
[01:22:13] mistermocha: has joined #ruby
[01:24:14] mistermo_: has joined #ruby
[01:27:58] jaguarmagenta: has joined #ruby
[01:28:29] ljarvis: has joined #ruby
[01:29:12] mistermocha: has joined #ruby
[01:29:42] arooni: has joined #ruby
[01:30:19] solars: has joined #ruby
[01:30:53] zacstewart: has joined #ruby
[01:30:58] DiCablo: has joined #ruby
[01:31:06] ElFerna: has joined #ruby
[01:32:10] mistermo_: has joined #ruby
[01:35:05] mistermocha: has joined #ruby
[01:35:35] jgt3: has joined #ruby
[01:37:05] mistermo_: has joined #ruby
[01:40:01] mistermocha: has joined #ruby
[01:40:07] arooni: has joined #ruby
[01:41:29] shakes: has joined #ruby
[01:41:36] tAn: has joined #ruby
[01:44:57] mistermo_: has joined #ruby
[01:45:25] ur5us: has joined #ruby
[01:46:19] rkazak: has joined #ruby
[01:47:54] jancel: has joined #ruby
[01:50:58] aryaching: has joined #ruby
[01:56:11] arooni: has joined #ruby
[01:56:54] kgrz: has joined #ruby
[01:57:32] mattwashere: has joined #ruby
[01:59:30] blackmes1: has joined #ruby
[02:02:45] JakFrist: has joined #ruby
[02:05:50] certainty: has joined #ruby
[02:06:49] Alazoral: has joined #ruby
[02:06:50] RegulationD: has joined #ruby
[02:09:39] freerobby: has joined #ruby
[02:11:40] arooni: has joined #ruby
[02:12:34] LoneHerm_: has joined #ruby
[02:19:42] JakFrist: has joined #ruby
[02:23:23] moeabdol: has joined #ruby
[02:25:22] Niham: has joined #ruby
[02:27:32] arooni: has joined #ruby
[02:28:34] ncthom91: has joined #ruby
[02:29:16] ljarvis: has joined #ruby
[02:31:53] sdothum: has joined #ruby
[02:32:27] tmtwd: has joined #ruby
[02:34:14] nankyokusei: has joined #ruby
[02:35:44] ramfjord: has joined #ruby
[02:36:57] c_nick: has joined #ruby
[02:37:31] c_nick: need to check for every {([ we have }])
[02:38:53] banisterfiend: has joined #ruby
[02:39:15] DotKite: has joined #ruby
[02:40:12] arooni: has joined #ruby
[02:46:42] tAn: has joined #ruby
[02:46:56] kies: has joined #ruby
[02:50:46] rueben: has joined #ruby
[02:52:09] binaryplease1: has joined #ruby
[02:54:12] arooni: has joined #ruby
[02:54:19] mattwashere: has joined #ruby
[02:55:30] lictor36: has joined #ruby
[02:57:05] solars: has joined #ruby
[02:57:11] juanfra_: has joined #ruby
[02:58:10] xall: has joined #ruby
[02:58:39] blackgoat: has joined #ruby
[03:00:20] sandstrom: has joined #ruby
[03:03:03] blackmes1: has joined #ruby
[03:03:24] mistermocha: has joined #ruby
[03:04:57] jancel: has joined #ruby
[03:05:03] snath: has joined #ruby
[03:05:40] mistermocha: has joined #ruby
[03:06:39] certainty: has joined #ruby
[03:06:47] jgt3: has joined #ruby
[03:07:37] RegulationD: has joined #ruby
[03:07:51] Yiota: has joined #ruby
[03:08:17] arooni: has joined #ruby
[03:10:59] lightt: has joined #ruby
[03:16:33] Ropeney: has joined #ruby
[03:18:17] uranellus: has joined #ruby
[03:19:19] braincrash: has joined #ruby
[03:20:39] tAn: has joined #ruby
[03:21:08] k3rn31: has joined #ruby
[03:22:44] arooni: has joined #ruby
[03:23:53] houhoulis: has joined #ruby
[03:25:55] lektrik: has joined #ruby
[03:26:59] rkazak: has joined #ruby
[03:28:43] jackjackdripper: has joined #ruby
[03:28:45] jaguarmagenta: has joined #ruby
[03:28:47] aryaching: has joined #ruby
[03:31:15] ljarvis: has joined #ruby
[03:31:40] stardiviner: has joined #ruby
[03:32:44] xue: has joined #ruby
[03:33:32] iceden: has joined #ruby
[03:34:11] arooni: has joined #ruby
[03:36:12] Long: has joined #ruby
[03:36:25] kareeoleez: has joined #ruby
[03:37:20] c_nick: has left #ruby: ()
[03:37:34] Long: has left #ruby: ()
[03:38:30] Long: has joined #ruby
[03:38:34] Long: has left #ruby: ()
[03:38:42] ruby[bot]: -bb $a:|8|chan$#ruby-banned |8|chan!*@*$#ruby-banned
[03:39:01] Long: has joined #ruby
[03:39:37] vdamewood: has joined #ruby
[03:39:49] gix: has joined #ruby
[03:43:52] pontiki: has joined #ruby
[03:47:57] Vingador: has joined #ruby
[03:47:59] vdamewood: has joined #ruby
[03:50:35] arooni: has joined #ruby
[03:51:18] Rodya_: has joined #ruby
[03:51:49] codecop: has joined #ruby
[03:52:36] lightt: has joined #ruby
[03:53:24] DiCablo: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[03:54:56] houhoulis: has joined #ruby
[03:57:47] Coldblackice: has joined #ruby
[03:58:57] lektrik: has joined #ruby
[03:59:38] mattwashere: has joined #ruby
[04:02:23] k3rn31: has joined #ruby
[04:04:00] arooni: has joined #ruby
[04:04:11] rueben: has joined #ruby
[04:05:40] hahuang62: has joined #ruby
[04:05:46] hutch34: has joined #ruby
[04:06:06] blackmes1: has joined #ruby
[04:06:52] aberen: has joined #ruby
[04:08:51] bluOxigen: has joined #ruby
[04:08:51] moei: has joined #ruby
[04:08:53] bluOxigen: has joined #ruby
[04:09:27] slash_ni1k: has joined #ruby
[04:11:32] moeabdol: has joined #ruby
[04:11:43] bruce_lee: has joined #ruby
[04:11:52] Dimik: has joined #ruby
[04:12:49] ornerymoose: has joined #ruby
[04:16:17] lightt: has joined #ruby
[04:17:56] arooni: has joined #ruby
[04:18:06] ornerymoose: has joined #ruby
[04:18:40] tAn: has joined #ruby
[04:20:08] Yiota: has joined #ruby
[04:20:51] idle_task: has joined #ruby
[04:22:31] jgt3: has joined #ruby
[04:30:50] Es0teric: has joined #ruby
[04:31:56] arooni: has joined #ruby
[04:31:58] ljarvis: has joined #ruby
[04:35:05] nankyokusei: has joined #ruby
[04:37:05] paradisaeidae: has joined #ruby
[04:38:26] jaguarmagenta: has joined #ruby
[04:47:01] Klumben: has joined #ruby
[04:49:21] tildes: has joined #ruby
[04:49:23] arooni: has joined #ruby
[04:52:31] banister: has joined #ruby
[04:53:20] crystal77: has joined #ruby
[04:54:05] duncannz: has joined #ruby
[04:54:58] duncannz: has joined #ruby
[04:55:03] alem0lars: has joined #ruby
[04:55:46] jancel: has joined #ruby
[04:57:00] crystal77: has joined #ruby
[04:59:33] jas02: has joined #ruby
[05:02:40] crystal77: has joined #ruby
[05:03:56] arooni: has joined #ruby
[05:07:09] crystal77: has joined #ruby
[05:07:52] blackmes1: has joined #ruby
[05:07:57] certainty: has joined #ruby
[05:08:09] dcunit3d: has joined #ruby
[05:08:19] RegulationD: has joined #ruby
[05:09:02] craigp: has joined #ruby
[05:18:07] arooni: has joined #ruby
[05:19:23] agent_white: has joined #ruby
[05:20:07] tildes: has joined #ruby
[05:20:39] sauvin: has joined #ruby
[05:21:36] rkazak: has joined #ruby
[05:22:19] kgrz: has joined #ruby
[05:24:01] dionysus69: has joined #ruby
[05:27:57] crystal77: has joined #ruby
[05:28:13] axxyhtrx: has joined #ruby
[05:29:11] arooni: has joined #ruby
[05:33:37] kgrz: has joined #ruby
[05:36:59] kgrz: has joined #ruby
[05:37:22] bokayio: has joined #ruby
[05:37:54] chandlerbing: has joined #ruby
[05:39:45] tAn: has joined #ruby
[05:42:30] jenrzzz: has joined #ruby
[05:42:31] arooni: has joined #ruby
[05:42:51] crystal77: has joined #ruby
[05:50:13] Es0teric: has joined #ruby
[05:50:52] tAn: has joined #ruby
[05:51:14] mistermocha: has joined #ruby
[05:53:14] spudowiar: has joined #ruby
[05:56:17] arooni: has joined #ruby
[05:57:50] chandlerbing: has joined #ruby
[05:57:50] bokayio: has joined #ruby
[05:58:06] arlek: has joined #ruby
[05:59:47] moeabdol: has joined #ruby
[06:00:37] fenre: has joined #ruby
[06:01:54] kareeoleez: has joined #ruby
[06:02:00] certainty: has joined #ruby
[06:04:43] eGGshke: has joined #ruby
[06:04:44] kareeoleez: has joined #ruby
[06:06:47] Dreamer3: has joined #ruby
[06:07:12] chopin: has joined #ruby
[06:07:49] aberen: has joined #ruby
[06:09:11] jas02: has joined #ruby
[06:09:37] blackmes1: has joined #ruby
[06:10:50] arooni: has joined #ruby
[06:13:29] czerasz: has joined #ruby
[06:13:51] vuoto: has joined #ruby
[06:14:29] solars: has joined #ruby
[06:17:03] LoneHerm_: has joined #ruby
[06:17:42] sandstrom: has joined #ruby
[06:18:52] dionysus69: has joined #ruby
[06:19:37] tubuliferous_: has joined #ruby
[06:19:54] d0lph1n98: has joined #ruby
[06:20:48] Qommand0r: has joined #ruby
[06:20:54] jackjackdripper: has joined #ruby
[06:21:50] arooni: has joined #ruby
[06:23:09] jgt3: has joined #ruby
[06:24:47] jaguarmagenta: has joined #ruby
[06:25:01] fenre: has joined #ruby
[06:25:53] kgrz: has joined #ruby
[06:28:45] arlek: has joined #ruby
[06:29:02] skade: has joined #ruby
[06:32:27] axxyhtrx: has joined #ruby
[06:32:48] last_staff: has joined #ruby
[06:35:13] dcunit3d: has joined #ruby
[06:35:59] nankyokusei: has joined #ruby
[06:37:16] ramfjord: has joined #ruby
[06:37:37] arooni: has joined #ruby
[06:37:39] brianpWins: has joined #ruby
[06:39:19] yardenbar: has joined #ruby
[06:40:29] brianpWins: I’m running in to a problem I need help with. The error is very straight forward, we’ve all seen it before, normally I know what to do. In this case though, I have no idea why the “expected type” isn’t &mut. I’m defining it as &mut I don’t know why it would be expected to be anything but that: http://pastie.org/private/rv1dxyvhyhh9kdfzy51zw
[06:40:59] yfeldblum: has joined #ruby
[06:41:35] kgrz: has joined #ruby
[06:41:50] brianpWins: this is the wrong room
[06:42:11] JohnBat26: has joined #ruby
[06:42:23] yfeldblum: has joined #ruby
[06:43:59] ur5us: has joined #ruby
[06:44:32] howdoi: has joined #ruby
[06:44:38] jancel: has joined #ruby
[06:50:11] arooni: has joined #ruby
[06:50:30] vinleod: has joined #ruby
[06:53:20] Es0teric: has joined #ruby
[06:55:46] jas02: has joined #ruby
[06:57:07] giz|work: has joined #ruby
[06:58:23] arooni: has joined #ruby
[07:00:40] blaxter: has joined #ruby
[07:00:49] mdw: has joined #ruby
[07:03:26] karmatr0n: has joined #ruby
[07:03:31] flughafen: has joined #ruby
[07:04:21] ferr1: has joined #ruby
[07:05:20] aswen: has joined #ruby
[07:09:13] RegulationD: has joined #ruby
[07:10:10] govg: has joined #ruby
[07:11:25] blackmes1: has joined #ruby
[07:12:44] n1x-nz: has joined #ruby
[07:14:08] DoubleMalt: has joined #ruby
[07:15:25] ctp: has joined #ruby
[07:16:06] czerasz: has joined #ruby
[07:16:07] cgfbee: has joined #ruby
[07:17:07] mistermocha: has joined #ruby
[07:18:46] Hounddog: has joined #ruby
[07:23:44] andikr: has joined #ruby
[07:24:00] jgt3: has joined #ruby
[07:28:25] mrmortondk: has joined #ruby
[07:29:07] KnownSyntax: has joined #ruby
[07:29:14] KnownSyntax: has joined #ruby
[07:29:35] antgel: has joined #ruby
[07:32:42] sandstrom: has joined #ruby
[07:33:31] vuoto: has joined #ruby
[07:35:45] KnownSyntax: has joined #ruby
[07:35:45] KnownSyntax: has joined #ruby
[07:37:28] ur5us: has joined #ruby
[07:41:51] slackbotgz: has joined #ruby
[07:44:35] multi_io: has joined #ruby
[07:44:48] guest56: has joined #ruby
[07:45:59] arooni: has joined #ruby
[07:46:20] Long1: has joined #ruby
[07:47:20] Ishido: has joined #ruby
[07:47:51] moeabdol: has joined #ruby
[07:48:06] aberen: has joined #ruby
[07:48:45] aganov: has joined #ruby
[07:51:45] jgt3: has joined #ruby
[07:57:01] arooni: has joined #ruby
[07:59:35] Omen: has joined #ruby
[08:01:26] the_drow: has joined #ruby
[08:02:31] workmad3: has joined #ruby
[08:03:02] mikecmpbll: has joined #ruby
[08:03:56] TomyWork: has joined #ruby
[08:05:07] aufi: has joined #ruby
[08:06:45] Es0teric: has joined #ruby
[08:07:25] Es0teric: has joined #ruby
[08:09:58] arooni: has joined #ruby
[08:11:01] Long: has joined #ruby
[08:11:28] diegoaguilar: has joined #ruby
[08:12:46] aswen: has joined #ruby
[08:13:10] blackmes1: has joined #ruby
[08:13:39] Janno: has joined #ruby
[08:14:18] toretore: has joined #ruby
[08:17:21] biggernashing: has joined #ruby
[08:18:48] mistermocha: has joined #ruby
[08:24:04] Silthias: has joined #ruby
[08:25:15] blackmes1: has joined #ruby
[08:25:40] edwinvdgraaf: has joined #ruby
[08:27:41] tvw: has joined #ruby
[08:29:13] aep_: has joined #ruby
[08:30:37] joonty: has joined #ruby
[08:32:07] exilarch: has joined #ruby
[08:32:24] madgen: has joined #ruby
[08:32:27] exilarch: Hello all, what is the easiest way to get started with Ruby without no programming skills. My goal is to develop a simple GUI program.
[08:34:12] sid_fules: has joined #ruby
[08:35:57] ocbtec: has joined #ruby
[08:36:31] Silthias: has joined #ruby
[08:36:53] nankyokusei: has joined #ruby
[08:36:56] wuyin: has joined #ruby
[08:37:09] ddv: exilarch: by just doing
[08:38:48] luckyme: has joined #ruby
[08:40:03] luckyme: I don't really understand what a "build script" or a "makefile" are. I feel like it's supposed to help my code run on another environment that doesn't have ruby installed, but I don't really get how I'm supposed to transition my code from ruby into a makefile
[08:40:34] luckyme: could anyone explain it to me?
[08:40:49] charliesome: has joined #ruby
[08:41:29] giz|work: has joined #ruby
[08:41:30] startupality: has joined #ruby
[08:44:25] platzhirsch: has joined #ruby
[08:45:12] edwinvdgraaf: has joined #ruby
[08:46:12] edwinvdg_: has joined #ruby
[08:46:31] digneety: has joined #ruby
[08:47:38] certainty: has joined #ruby
[08:48:55] jenrzzz: has joined #ruby
[08:49:11] skade: has joined #ruby
[08:50:17] Ropeney: has joined #ruby
[08:52:34] moeabdol: has joined #ruby
[08:54:15] pawnbox: has joined #ruby
[08:55:13] nerium: has joined #ruby
[08:55:18] gregf_: exilarch: why a simple GUI program? you could just follow rubymonk or rubykoans?
[08:55:30] gregf_: also, without no == with :)
[08:56:05] exilarch: gregf_: i'm not familiar with those.
[08:56:16] heftig: there is no class without end
[08:56:37] gregf_: exilarch: nobody is, so i am suggesting :). if you were familiar you would'nt need to read it ;)
[08:56:54] exilarch: gregf_: thanks for the suggestion :)
[08:57:34] gregf_: exilarch: when you say you dont have programming skills , you need to learn the syntax first?
[08:58:10] exilarch: gregf_: Correct, I only studied basic C at school but I hated it.
[08:58:30] gregf_: you hated C... *weeps*
[08:59:22] gregf_: btw, i hated programming in uni :) tho i majored in Comp sc
[09:01:56] exilarch: gregf_: maybe it was because of the bad teacher.
[09:02:27] ramfjord: has joined #ruby
[09:02:36] allenn: has joined #ruby
[09:02:36] allenn: has joined #ruby
[09:03:20] gregf_: exilarch: nope, the more time you spend on the computer, the more you;ll code better ;). nobody can teach you logic *honest*
[09:03:31] gregf_: well, you're partly correct
[09:05:55] biberu: has joined #ruby
[09:06:37] aef: has joined #ruby
[09:07:17] nhhc: has joined #ruby
[09:07:50] weckl: has joined #ruby
[09:08:43] marr: has joined #ruby
[09:10:03] RegulationD: has joined #ruby
[09:10:46] blackmesa: has joined #ruby
[09:11:05] renderful: has joined #ruby
[09:13:48] jaruga___: has joined #ruby
[09:15:40] sid_fules: has joined #ruby
[09:16:21] Olipro: has joined #ruby
[09:16:22] axxyhtrx: has joined #ruby
[09:18:49] Saloun: has left #ruby: ()
[09:20:16] chip_: has joined #ruby
[09:21:11] jenrzzz: has joined #ruby
[09:21:11] jenrzzz: has joined #ruby
[09:22:09] rvchangue: has joined #ruby
[09:39:41] edwinvdg_: has joined #ruby
[09:42:31] aupadhye_: has joined #ruby
[09:44:11] jenrzzz: has joined #ruby
[09:45:15] Hanmac: has joined #ruby
[09:46:37] existensil: has joined #ruby
[09:48:23] yfeldblum: has joined #ruby
[09:49:57] aupadhye: has joined #ruby
[09:54:55] matp: has joined #ruby
[09:57:33] isxek: has joined #ruby
[09:58:39] lupine: has joined #ruby
[09:58:55] uranellus: has joined #ruby
[09:58:55] uranellus: has joined #ruby
[09:59:56] biberu: has joined #ruby
[10:00:37] edwinvdgraaf: has joined #ruby
[10:04:34] tvw: has joined #ruby
[10:05:35] blackgoat: has joined #ruby
[10:05:47] yfeldblum: has joined #ruby
[10:07:12] renderful: has joined #ruby
[10:07:21] mdw: has joined #ruby
[10:08:46] c355E3B: has joined #ruby
[10:14:21] snowy: has joined #ruby
[10:19:20] craigp: has joined #ruby
[10:19:57] jancel: has joined #ruby
[10:20:17] sid_fules: has joined #ruby
[10:21:19] mistermocha: has joined #ruby
[10:25:44] Pisuke: has joined #ruby
[10:26:42] sameerynho: has joined #ruby
[10:27:59] axxyhtrx: has joined #ruby
[10:29:43] allcentury: has joined #ruby
[10:30:58] sdothum: has joined #ruby
[10:32:14] jenrzzz: has joined #ruby
[10:32:15] jenrzzz: has joined #ruby
[10:32:42] d0lph1n98: has joined #ruby
[10:32:45] chrismytton: has joined #ruby
[10:34:33] zenspider: has joined #ruby
[10:36:41] ramfjord: has joined #ruby
[10:37:44] nankyokusei: has joined #ruby
[10:39:16] ljarvis: has joined #ruby
[10:41:58] noregret: has joined #ruby
[10:43:38] noregret: i'm new to ruby and trying to understand some code. "if @repo_data[:store][:files].key?(req_path)" - does this check if there is a key (in :files) that matches req_path?
[10:43:46] hk238: has joined #ruby
[10:44:48] jhass: noregret: assuming @repo_data[:store][:files] returns a hash, key? checks whether that hash has the given (req_path) key. So yes. There's a more verbose alias for Hash#key? called Hash#has_key?
[10:45:10] noregret: jhass: thanks
[10:47:59] axxyhtrx: has joined #ruby
[10:48:30] johnny56_: has joined #ruby
[10:49:10] nettoweb: has joined #ruby
[10:49:53] dhk: has joined #ruby
[10:50:04] d0nn1e: has joined #ruby
[10:51:58] sandstrom: has joined #ruby
[10:52:18] rodfersou: has joined #ruby
[10:56:12] sid_fules: has joined #ruby
[10:56:39] TheMonster: has left #ruby: ("Konversation terminated!")
[10:57:20] rodferso1: has joined #ruby
[10:57:37] Xeago: has joined #ruby
[10:59:13] certainty: has joined #ruby
[10:59:40] giz|work: has joined #ruby
[11:06:24] joonty: has joined #ruby
[11:07:59] GodFather: has joined #ruby
[11:08:25] blackmesa: has joined #ruby
[11:10:56] RegulationD: has joined #ruby
[11:12:52] jaguarmagenta: has joined #ruby
[11:17:04] hrob: has joined #ruby
[11:17:41] hrob: I'm looking for a foolproof way of embedding shell script code in a string inside ruby
[11:18:11] hrob: i saw advice to use,,, mystr = <<-EOF my shell code .... EOF
[11:18:35] hrob: however, when I write this string to a file, I find that not all characters are escaped
[11:19:02] hrob: for example "\" followed by new line, seems to result in no "\" and no new line
[11:19:56] hrob: In python the syntax would be """ my code """ tripple quotes
[11:19:57] apeiros: foolproof - good luck
[11:20:26] apeiros: triple quotes in python won't protect you either
[11:20:42] jhass: also why don't you just write it in ruby
[11:20:44] hrob: apeiros: no they wont, but they will preserve pack slashes
[11:20:46] apeiros: there's two basic string quotings in ruby, single-quote and double-quote
[11:20:59] apeiros: in single-quotes, only \\ and \' are escape sequences
[11:21:16] apeiros: there's no string literal in ruby where \ can be used unescaped
[11:21:40] charliesome: has joined #ruby
[11:21:46] nerium: has joined #ruby
[11:21:50] apeiros: and there's various ways to write single-quoted strings. 'like this', %q{like this}, <<-'EOF' \n like this \n EOF
[11:22:25] apeiros: but those things are all only related to how escaping works. it's *entirely* unrelated to the fact that this string is "shell script code"
[11:24:04] jhass: hrob: the two foolproof ways I see in order of preference: 1) don't do it at all, Ruby can do everything shell script can 2) Write it to a separate file and let your shell run that file
[11:24:24] hrob: apeiros: ah ok, I see. I will have to work around the back slashes... perhaps just .gsub('/','//)
[11:24:40] jhass: hrob: no, that won't work at all
[11:25:08] hrob: sorry meant \
[11:25:25] hrob: yeah, I guess separate file is going to be foolproof :)
[11:25:26] jhass: took that into account
[11:25:43] jhass: hrob: curious, why isn't 1) an option?
[11:26:11] hrob: jhass: the company I work for use ruby for provisionings scripts -- the build environment is however mxe in some cases
[11:26:23] hrob: jhass: mxe has its own config file syntax... shell-like
[11:26:39] apeiros: gsubbing won't work because there's no backslash in your string to begin with if you don't escape it
[11:26:41] jhass: yeah, separate file seems the most sane then
[11:27:00] johnmilton: has joined #ruby
[11:29:48] sdothum: has joined #ruby
[11:30:07] k3rn31: has joined #ruby
[11:33:22] duckpuppy: has joined #ruby
[11:33:32] sepp2k: has joined #ruby
[11:35:47] flashpoint9: has joined #ruby
[11:36:09] skade: has joined #ruby
[11:36:49] freerobby: has joined #ruby
[11:37:41] Fernando-Basso: has joined #ruby
[11:37:49] d0lph1n98: has joined #ruby
[11:38:00] certainty: has joined #ruby
[11:38:09] nerium: has joined #ruby
[11:39:07] elSaxo: has joined #ruby
[11:41:32] A124: has joined #ruby
[11:42:34] CloCkWeRX: has joined #ruby
[11:42:37] shadeslayer: has joined #ruby
[11:43:47] johnmilton: has joined #ruby
[11:44:18] Yiota: has joined #ruby
[11:44:27] k3rn31: has joined #ruby
[11:44:37] edwinvdgraaf: has joined #ruby
[11:47:06] giz|work: has joined #ruby
[11:47:12] blackgoat: has joined #ruby
[11:48:36] fisch123456: has joined #ruby
[11:49:57] elSaxo: has joined #ruby
[11:50:30] jojojojo: has joined #ruby
[11:51:42] ElFerna: has joined #ruby
[11:51:52] joonty: has joined #ruby
[11:51:56] Hanmac: has joined #ruby
[11:52:25] ornerymoose: has joined #ruby
[11:53:28] maucar: has joined #ruby
[11:54:38] gnufied: has joined #ruby
[11:56:46] edwinvdgraaf: has joined #ruby
[11:58:24] blackgoat: has joined #ruby
[12:02:16] Adam_FrVancouver: has joined #ruby
[12:03:44] ldnunes: has joined #ruby
[12:03:46] Mia: has joined #ruby
[12:03:46] Mia: has joined #ruby
[12:05:34] ferr1: has joined #ruby
[12:07:05] sergio_101: has joined #ruby
[12:08:10] Mia: has joined #ruby
[12:08:37] hutch34: has joined #ruby
[12:09:55] idle_task: has joined #ruby
[12:10:11] shevy: go insanity, go!
[12:10:13] blackmesa: has joined #ruby
[12:10:21] shevy: one big monster file to rule them all
[12:11:55] ur5us: has joined #ruby
[12:12:16] synthroid: has joined #ruby
[12:13:13] iamvery: has joined #ruby
[12:13:34] dhk_: has joined #ruby
[12:13:48] Yiota: has joined #ruby
[12:14:40] allcentury: has joined #ruby
[12:16:48] CloCkWeRX: has joined #ruby
[12:17:56] sid_fules: has joined #ruby
[12:17:59] tkiel: has joined #ruby
[12:18:25] joaumg: has joined #ruby
[12:18:32] dcunit3d: has joined #ruby
[12:18:33] axxyhtrx: has joined #ruby
[12:19:00] AlexJakeGreen: has joined #ruby
[12:19:07] joaumg: has joined #ruby
[12:20:47] davedev24: has joined #ruby
[12:22:45] mistermocha: has joined #ruby
[12:26:29] eljimmy: has joined #ruby
[12:28:19] duckpupp1: has joined #ruby
[12:28:38] dcunit3d: has joined #ruby
[12:28:59] chip_: has joined #ruby
[12:29:25] ornerymoose: has joined #ruby
[12:30:43] christianrojas: has joined #ruby
[12:30:49] zacstewart: has joined #ruby
[12:33:44] nadir: has joined #ruby
[12:34:16] tvw: has joined #ruby
[12:38:34] nankyokusei: has joined #ruby
[12:39:02] truenito: has joined #ruby
[12:39:35] dhk: has joined #ruby
[12:39:43] ornerymoose_: has joined #ruby
[12:40:15] christianrojas_: has joined #ruby
[12:44:38] aryaching: has joined #ruby
[12:45:10] christianrojas: has joined #ruby
[12:47:15] roamingdog: has joined #ruby
[12:50:58] jrafanie: has joined #ruby
[12:51:03] axxyhtrx: has joined #ruby
[12:53:28] mdw: has joined #ruby
[12:54:23] zacstewart: has joined #ruby
[12:54:48] banister: has joined #ruby
[12:55:04] chouhoulis: has joined #ruby
[12:55:11] christianrojas: has joined #ruby
[12:55:44] chouhoulis: has joined #ruby
[12:56:57] GodFather: has joined #ruby
[12:57:22] Silthias: has joined #ruby
[12:58:06] iCHAIT: has joined #ruby
[12:58:10] amsharma: has joined #ruby
[12:58:46] CloCkWeRX: has joined #ruby
[12:58:55] iCHAIT: Can someone help with porting this python method - http://dpaste.com/3M6FNBW
[12:59:56] apeiros: what kind of help do you need?
[13:01:08] Dysp: has joined #ruby
[13:01:55] ramfjord: has joined #ruby
[13:02:05] jhass: and what do you have so far?
[13:02:10] iCHAIT: I'm trying to understand what I can use in place of that patch function.
[13:02:13] relix: has joined #ruby
[13:02:29] relix: Hey, I'd like to see if my project is frozen string literal compatible without adding the pragma line at the top of every file
[13:02:30] Dysp: Mjello. Here I am again with my many problems. I am using rubyXL to deal with excel sheets, unfortunately when pulling values, rubyXL (?) decides to convert some values to scientific notation. When I try to do anything with the array of values, I obviously get errors because they are handled as strings. Any idea or anyone who have encountered this problem before?
[13:02:33] apeiros: iCHAIT: we do not know what that patch function does
[13:02:33] iCHAIT: I need to see if a mocked function was called with a particular argument
[13:02:38] relix: how can I enable it globally?
[13:02:53] ChiefAlexander: has joined #ruby
[13:02:53] Vile`: has joined #ruby
[13:03:07] relix: I know of the `--enable-frozen-string-literal` option, but my ruby scripts are run through `#!/usr/bin/ruby`-ish command, so no where to do `ruby --set-enable-...`
[13:03:22] relix: I tried running `export RUBYOPT=--enable-frozen-string-literal
[13:03:25] relix: but that didn't work
[13:05:03] ChiefAlexander: has joined #ruby
[13:05:35] ddffg: has joined #ruby
[13:06:31] giz|work: has joined #ruby
[13:06:34] nerium: has joined #ruby
[13:06:41] aegis3121: has joined #ruby
[13:10:22] christianrojas: has joined #ruby
[13:10:36] ramortegui: has joined #ruby
[13:10:51] ncthom91: has joined #ruby
[13:11:51] RegulationD: has joined #ruby
[13:12:32] tAn: has joined #ruby
[13:12:55] swills: has joined #ruby
[13:13:09] iCHAIT: apeiros: I have a function delete_object in my ruby code, now I want to test another function delete_time (which uses delete_object implicitly), for this I am patching the result of the function delete_object whose result goes into the argument m_delete_object.
[13:13:13] shevy: isn't the --enable-frozen-string-literal a directive at configure time relix?
[13:13:14] blackmesa: has joined #ruby
[13:13:25] relix: oh that could be it shevy
[13:13:31] relix: I have a hard time finding information about it actually
[13:13:34] jaguarmagenta: has joined #ruby
[13:14:13] shevy: hmm let's see... I think nobu added that code
[13:15:02] malconis: has joined #ruby
[13:15:12] shevy: https://wyeworks.com/blog/2015/12/1/immutable-strings-in-ruby-2-dot-3
[13:15:44] shevy: so if the information on that blog is correct, "ruby --enable-frozen-string-literal foobar.rb" should work
[13:16:17] shevy: yeah seems to work
[13:16:53] edwinvdgraaf: has joined #ruby
[13:17:00] shevy: relix perhaps it is a bug if it does not work
[13:17:36] Dysp: Mjello. Here I am again with my many problems. I am using rubyXL to deal with excel sheets, unfortunately when pulling values, rubyXL (?) decides to convert some values to scientific notation. When I try to do anything with the array of values, I obviously get errors because they are handled as strings. Any idea or anyone who have encountered this problem before?
[13:18:34] Rodya_: has joined #ruby
[13:19:08] colegatron: has joined #ruby
[13:19:26] jhass: iCHAIT: which test framework?
[13:20:23] jhass: Dysp: are you sure you're not just confusing the value with how ruby represents it on a plain puts / .to_s?
[13:20:33] iCHAIT: I am using Test::Unit
[13:21:03] Dysp: jhass: I think I am, unfortunately
[13:21:23] relix: thanks shevy, I believe it's due to how ruby is run in my scripts
[13:22:06] Dysp: jhass: Because I get an argumenterror: comparison of string failed when calling .max on the array
[13:22:13] jhass: iCHAIT: I don't think that supports mocking/stubbing by itself. You either have to add a gem that does, like mocha, or switch to a test framework that does, like minitest
[13:22:38] jhass: Dysp: show code and output of p array ?
[13:23:16] c0mrad3: has joined #ruby
[13:23:25] mistermocha: has joined #ruby
[13:23:59] Dysp: jhass: Only if you promise not to lynch me for formatting
[13:24:00] Dysp: https://gist.github.com/Dysp/754315401a934bf6b5853452edd4b253
[13:24:16] tubuliferous_: has joined #ruby
[13:24:20] jhass: ACTION lynches Dysp
[13:24:48] jhass: ah well, it's just initialize being off
[13:25:04] jhass: formatting wise
[13:25:06] tAn: has joined #ruby
[13:25:07] evansbee: has joined #ruby
[13:25:18] jhass: anyway, second part of the question? I can't run the code myself to get it
[13:25:34] Dysp: Would you like me to send you what you need?
[13:25:53] Dysp: Thought so
[13:25:59] jhass: actually you always return an empty array there
[13:26:26] jhass: extract_values
[13:26:33] jhass: so not sure, but that code should never raise
[13:26:43] jhass: you probably run some other version if it does
[13:26:45] Dysp: It doesnt return an empty array
[13:26:59] jhass: that version of the code surely does
[13:27:06] jhass: oooh, nvm I you hid it
[13:27:17] Dysp: I did what, now? :D
[13:27:23] k3rn31: has joined #ruby
[13:27:23] jhass: I totally didn't see the <<
[13:27:36] sdothum: has joined #ruby
[13:27:50] cek: has joined #ruby
[13:28:01] jhass: so, do p array between ll 18, 19
[13:28:05] jhass: and show me the output
[13:28:15] ramfjord: has joined #ruby
[13:28:20] cek: How do I check if a -v parameter's been passed to rake file?
[13:28:21] Dysp: between what, now?
[13:28:27] jhass: lines 18 and 19
[13:28:53] malconis: has joined #ruby
[13:29:55] Dysp: https://gist.github.com/Dysp/99e13ad5cf02be91b4e0428ed6a75d19
[13:30:01] Dysp: Im just giving you a snippet
[13:30:12] Dysp: You can probably guess what the rest looks like. But this is the troubling area.
[13:31:09] jhass: I guess this RubyXL thing is pretty shit then :P
[13:31:21] Ebok: has joined #ruby
[13:31:31] jhass: >> "-2E-3".to_f
[13:31:33] ruby[bot]: jhass: # => -0.002 (https://eval.in/590348)
[13:31:43] jhass: so just .to_f all the values
[13:32:14] ddffg: has left #ruby: ("Leaving")
[13:32:53] spiette: has joined #ruby
[13:32:55] Dysp: Yeah, that would be a fix
[13:33:11] Dysp: But I always wanna make sure it is not just I who is a fuckup
[13:33:40] Dysp: What happens if a random string is converted to float?
[13:33:52] Dysp: >> "hello".to_f
[13:34:03] shevy: has joined #ruby
[13:34:06] jhass: >> "hello".to_f
[13:34:07] ruby[bot]: jhass: # => 0.0 (https://eval.in/590351)
[13:34:16] Dysp: Why does it hate me?
[13:34:22] jhass: because you're not identified
[13:34:33] Dysp: Damn bot.
[13:35:10] kies: has joined #ruby
[13:35:16] Dysp: Just a quick thought: It is possible to check for whether the "fix" I apply actually did any work?
[13:35:24] Dysp: I mean, if it actually converted anything.
[13:35:38] tAn: has joined #ruby
[13:36:53] jhass: short of doing it in a separate step, keeping the original and finding the differences between the two, nope
[13:37:17] jhass: well or you could check explicitly for strings before calling it and set a flag at the same time I guess
[13:37:41] Dysp: Yes. Just seems like a lot of work to fix a problem that there shouldn't be there in the first place.
[13:37:48] Dysp: Oh well, I will look into it. Thank you very much.
[13:38:29] bruce_lee: has joined #ruby
[13:39:01] lektrik: has joined #ruby
[13:40:59] JJM: has joined #ruby
[13:44:52] karmatr0n: has joined #ruby
[13:45:24] matp: has joined #ruby
[13:45:48] jhass: cek: Ruby pros just read the code https://github.com/ruby/rake/blob/master/lib/rake/application.rb#L570 -> https://github.com/ruby/rake/blob/e4277364efa6c28afa3f502361d8446f0f0ccdef/lib/rake/file_utils_ext.rb#L42-L53
[13:46:43] cek: FileUtilsExt.verbose_flag then
[13:46:48] cek: this is largely confusing
[13:47:32] mattwashere: has joined #ruby
[13:48:05] aegis3121: has joined #ruby
[13:48:43] startupality: has joined #ruby
[13:49:26] howdoi: has joined #ruby
[13:49:43] yqt: has joined #ruby
[13:49:49] mattwashere: has joined #ruby
[13:49:49] cs_0x6373: has joined #ruby
[13:50:04] get_durnk: has joined #ruby
[13:50:27] Fernando-Basso: has joined #ruby
[13:50:30] get_durnk: stupid question: if I have an instance of an object that I want to extend with a module, without extending other instances of that class, how can I do that?
[13:51:54] pingu_: has joined #ruby
[13:52:04] pingu_: has left #ruby: ()
[13:54:15] snowy: has joined #ruby
[13:54:44] jhass: instance.extend Module
[13:55:04] jhass: but doing it for anything but long-lived objects can hurt your performance significantly
[13:55:36] jhass: consider writing a wrapper instead, SimpleDelegator from delegate stdlib might help in doing so
[13:55:39] blackmesa: has joined #ruby
[13:56:15] jancel: has joined #ruby
[13:56:50] tAn: has joined #ruby
[13:58:53] lektrik: has joined #ruby
[13:59:34] pawnbox: has joined #ruby
[14:00:45] CJKinni: has joined #ruby
[14:01:00] cs_0x6373: could anyone point me to the ruby-sourcefile where class IO (used by class File) is implemented?
[14:01:30] jhass: it's io.c
[14:01:45] cs_0x6373: I'm currently troubleshooting some strange issues where ruby 2.1.8 running on AIX is unable to open /dev/null
[14:02:10] mattwashere: has joined #ruby
[14:02:43] jhass: https://github.com/ruby/ruby/blob/trunk/io.c#L12214
[14:04:07] cs_0x6373: jhass: so there's no real "class IO" since this is just a mapping to systemcalls? (with rb_define_singleton_method(...) ), right?
[14:04:54] jhass: well there's nothing defined in Ruby code, stuff defined via the C API is as real as anything else though
[14:05:46] cs_0x6373: :) i'm still not sure if this is a problem with my self-compiled ruby or with the gcc i compiled to compile it...
[14:06:14] tAn: has joined #ruby
[14:06:15] jgt3: has joined #ruby
[14:07:43] ramfjord: has joined #ruby
[14:08:16] Infra-Red: has joined #ruby
[14:11:31] cs_0x6373: a simple "bla = File.open('/dev/null', 'r') fails with in "`initialize': Invalid argument @ rb_sysopen - /dev/null (Errno::EINVAL)", while a open of a real file works (no device).
[14:11:57] cs_0x6373: with an older ruby 2.0.0 it works for both...
[14:12:44] LoneHermit: has joined #ruby
[14:12:56] idle_task: has joined #ruby
[14:13:04] jhass: well, have fun untangling io.c :P
[14:13:38] jhass: it's just a good 12.5kloc, piece of cake!
[14:16:21] matp: has joined #ruby
[14:16:53] cs_0x6373: this whole situation is just bad, since i already invested a huge amount of time to get it to build so that i can run a newer version of puppet.. :)
[14:17:47] skweek: has joined #ruby
[14:18:14] jhass: stracing the relevant syscalls (open, uh fcntl? read/write?) with the working and not working version might give some difference to grep for
[14:20:11] cs_0x6373: yeah, i already used truss, currently i'm just seeing kopen but not the open/open64 syscall and the difference is the mode-flag, which is why i'm looking for how the are generated...
[14:22:01] van: has joined #ruby
[14:22:59] tAn: has joined #ruby
[14:24:01] mistermocha: has joined #ruby
[14:24:14] ramfjord: has joined #ruby
[14:24:33] flashpoint9: has joined #ruby
[14:24:36] kareeoleez: has joined #ruby
[14:24:48] jhass: cs_0x6373: can you still reproduce with http://devdocs.io/ruby~2.3/io#method-c-sysopen ? might cut some slack
[14:27:01] mattwashere: has joined #ruby
[14:27:53] cs_0x6373: jhass: Yes, IO.sysopen("/dev/null") fails, with a normal file it works...
[14:28:40] cs_0x6373: Also, i wrote some simple c programm to do open() and open64() with the same compiler and both work, so i suspected the glue between ruby and the syscalls...
[14:28:43] andrewvos: has joined #ruby
[14:29:09] cs_0x6373: jhass: btw, thx for the help...
[14:29:52] jhass: so somewhere here https://github.com/ruby/ruby/blob/trunk/io.c#L6411-L6435
[14:31:06] andrewvos: Has anyone here every utilized GridFS with Ruby to store images? I am wondering what I am doing wrong in the code below, it comes basically straight from the documentation (https://docs.mongodb.com/ecosystem/tutorial/ruby-driver-tutorial/#gridfs), here is the code I have written (https://gist.github.com/terrabl/f0e6038cba2e210cf366cbbd5eb11e11) And I am getting a gridFS_test.insert | FAILED | wrong number of arguments (2 for 0..1) e
[14:33:00] christianrojas: has joined #ruby
[14:34:56] kvrapo: has joined #ruby
[14:35:44] cdg: has joined #ruby
[14:36:24] cs_0x6373: jhass: do you know where rb_scan_args is implemented?
[14:36:35] Sembei: has joined #ruby
[14:37:50] jhass: http://rxr.whitequark.org/mri/ident
[14:38:03] jhass: not quite having the latest version available, but should get you into the right area
[14:39:24] nankyokusei: has joined #ruby
[14:40:00] tAn: has joined #ruby
[14:40:27] fmcgeough: has joined #ruby
[14:40:42] agent_white: has joined #ruby
[14:42:04] CJKinni: has joined #ruby
[14:43:33] Silthias: has joined #ruby
[14:45:12] lektrik: has left #ruby: ("Leaving")
[14:45:34] ramfjord: has joined #ruby
[14:46:39] cs_0x6373: jhass: great tool, i will post my finding when i have some...
[14:46:54] hightower: has joined #ruby
[14:47:06] madgen: has joined #ruby
[14:47:40] dionysus69: has joined #ruby
[14:47:43] droidburgundy: has joined #ruby
[14:49:06] aryaching: has joined #ruby
[14:49:56] futilegames: has joined #ruby
[14:49:57] Rodya_: has joined #ruby
[14:51:07] moty66_: has joined #ruby
[14:51:14] schlauberg: has joined #ruby
[14:51:32] roamingdog: has joined #ruby
[14:51:37] giz|work|2: has joined #ruby
[14:56:16] snowy: has joined #ruby
[14:56:31] ChiefAlexander: has joined #ruby
[14:58:17] rippa: has joined #ruby
[14:58:38] jgt3: has joined #ruby
[14:59:03] snowy: has joined #ruby
[14:59:35] SilverKey: has joined #ruby
[15:01:05] ornerymoose: has joined #ruby
[15:02:33] aegis3121: has joined #ruby
[15:05:50] edwinvdgraaf: has joined #ruby
[15:06:57] snath: has joined #ruby
[15:07:48] ljarvis: has joined #ruby
[15:08:17] chopin: has joined #ruby
[15:08:42] banister: has joined #ruby
[15:09:43] jrafanie_: has joined #ruby
[15:12:34] tokynet: has joined #ruby
[15:12:42] RegulationD: has joined #ruby
[15:13:15] diegoaguilar: has joined #ruby
[15:13:16] polishdub: has joined #ruby
[15:14:20] jaguarmagenta: has joined #ruby
[15:15:54] jancel: has joined #ruby
[15:16:26] mdw: has joined #ruby
[15:17:27] kareeoleez: has joined #ruby
[15:18:34] Ebok: has joined #ruby
[15:18:53] ornerymoose: has joined #ruby
[15:20:00] tubuliferous_: has joined #ruby
[15:23:06] brendan-: has joined #ruby
[15:24:01] ornerymoose: has joined #ruby
[15:24:47] mistermocha: has joined #ruby
[15:25:15] xlegoman: has joined #ruby
[15:26:52] edwinvdgraaf: has joined #ruby
[15:27:04] evidex: has joined #ruby
[15:28:31] Yiota: has joined #ruby
[15:29:05] mattwashere: has joined #ruby
[15:29:13] nettoweb: has joined #ruby
[15:31:30] Vingador: has joined #ruby
[15:31:31] cschneid: has joined #ruby
[15:33:08] joonty: has joined #ruby
[15:35:00] Kus: has joined #ruby
[15:35:00] chouhoulis: has joined #ruby
[15:37:01] mistermocha: has joined #ruby
[15:37:40] aberen: has joined #ruby
[15:38:25] mistermocha: has joined #ruby
[15:44:06] LoneHermit: has joined #ruby
[15:44:16] tjohnson: has joined #ruby
[15:45:45] antgel: has joined #ruby
[15:48:05] shinnya: has joined #ruby
[15:51:02] roamingdog: has joined #ruby
[15:52:03] synthroid: has joined #ruby
[15:53:06] zel: has joined #ruby
[15:53:06] mistermocha: has joined #ruby
[15:53:46] Es0teric: has joined #ruby
[15:53:49] mattwashere: has joined #ruby
[15:54:50] flopsec: has joined #ruby
[15:55:43] evidex: has joined #ruby
[15:57:23] edwinvdgraaf: has joined #ruby
[15:57:33] kareeoleez: has joined #ruby
[15:57:49] arlek: has joined #ruby
[15:59:25] ramfjord: has joined #ruby
[15:59:30] Travis-42: I have a class constant that looks something like "FILTERS = { :existing => [ { missing: { field: 'deleted_at' } } ] }" -- I want in some particular cases get the :existing value from filters, and then modify the field value, but I keep modifying the actual class value. dup/clone only do shallow copies and so don't really help. What is an appropriate way to
[15:59:30] Travis-42: deal with this?
[16:00:14] RegulationD: has joined #ruby
[16:01:26] amclain: has joined #ruby
[16:01:53] matp: has joined #ruby
[16:03:26] kareeoleez: has joined #ruby
[16:03:37] ljarvis: you shouldn't modify a constant
[16:03:45] ljarvis: that's why they're called constants
[16:05:10] dfockler: has joined #ruby
[16:05:27] jhass: Hash#clone should deep copy, no?
[16:05:28] rueben: has joined #ruby
[16:05:37] certainty: has joined #ruby
[16:05:55] toretore: it doesn't, afaik
[16:06:06] phutchins2: has joined #ruby
[16:06:42] giz|work|2: has joined #ruby
[16:06:46] phutchins2: I'm looking for a good way to bundle ruby inside of my app's dir... I've used bundler in the past but that doesn't bundle actual ruby, jsut the Gems. So anyone know of anything that works well for this?
[16:06:54] Travis-42: ljarvis: I don't want to modify the constant, obviously, I want to take the value, which in this case is [ { missing: { field: 'deleted_at' } } ] and use a modified version of that
[16:06:56] phutchins2: I see traveling-ruby, but have not tried it
[16:06:59] adaedra: Seems not, jhass
[16:07:01] adaedra: >> a = {b: [1]}; b = a.clone; b[:b].clear; a
[16:07:02] ruby[bot]: adaedra: # => {:b=>[]} (https://eval.in/590379)
[16:07:12] jhass: how annoying
[16:07:43] Travis-42: right now, I'm basically calling dup at each level of nesting when I copy/modify it
[16:08:00] ljarvis: yeah unless you use activesupport you'll have to implement something yourself
[16:08:05] ljarvis: they use deep_dup iirc
[16:08:27] diegoviola: has joined #ruby
[16:09:34] Travis-42: ah, maybe I'll just leverage their method
[16:09:49] toretore: Travis-42: here's what i do for deep merging: https://github.com/toretore/enkidu/blob/master/lib/enkidu/tools.rb - the reason it's not in stdlib is that there are different ways to do it that each have their gotchas
[16:10:00] whathappens: has joined #ruby
[16:10:16] Travis-42: thank you tore
[16:11:47] flashpoint9: has joined #ruby
[16:13:09] kies: has joined #ruby
[16:14:49] ElFerna: has joined #ruby
[16:15:08] augcesar: has joined #ruby
[16:15:33] tildes: has joined #ruby
[16:17:47] kareeoleez: has joined #ruby
[16:20:00] danostrowski: has joined #ruby
[16:21:13] mtkd: has joined #ruby
[16:21:18] krobzaur: has joined #ruby
[16:21:20] VeryBewitching: has joined #ruby
[16:21:53] rkazak: has joined #ruby
[16:22:11] Es0teric: has joined #ruby
[16:23:56] SCHAAP137: has joined #ruby
[16:24:16] Dimik: has joined #ruby
[16:25:33] elifoster: has joined #ruby
[16:26:06] xall: has joined #ruby
[16:26:56] [Butch]: has joined #ruby
[16:27:39] barajasfab: has joined #ruby
[16:27:56] ramfjord: has joined #ruby
[16:28:41] willardg: has joined #ruby
[16:30:53] jetpackjoe: has joined #ruby
[16:31:15] xall: has joined #ruby
[16:31:27] jancel: has joined #ruby
[16:34:07] mistermocha: has joined #ruby
[16:34:09] sphex: has joined #ruby
[16:34:33] TomyLobo: has joined #ruby
[16:34:57] moredhel: has joined #ruby
[16:35:15] ornerymoose: has joined #ruby
[16:35:51] kareeoleez: has joined #ruby
[16:36:24] startupality: has joined #ruby
[16:36:49] snath: has joined #ruby
[16:37:25] giz|work|2: has joined #ruby
[16:38:20] mattwashere: has joined #ruby
[16:39:30] startupality: has joined #ruby
[16:39:53] choke: has joined #ruby
[16:40:18] nankyokusei: has joined #ruby
[16:41:21] whathapp_: has joined #ruby
[16:43:05] rodfersou: has joined #ruby
[16:44:09] sternj: has joined #ruby
[16:44:59] sternj: has joined #ruby
[16:45:14] choke: has joined #ruby
[16:45:28] mistermocha: has joined #ruby
[16:46:03] sternj: Anyone here familiar with Open Datamaker? It is an API that uses Ruby and, in attempting to run the bootstrap file associated with it, I am encountering some issues that I can't figure out
[16:46:24] cschneid_: has joined #ruby
[16:46:51] dcunit3d: has joined #ruby
[16:48:04] havenwood: sternj: Gist the code involved and errors you're getting?
[16:49:32] sternj: Havenwood: The specific error that I am encountering is "cannot load such file --zlib". I've done my due dilligence in searching the web, I'm working on Ruby 2.2.4. Give me a sec to find to find the specific code
[16:50:45] iCHAIT: has joined #ruby
[16:51:52] tAn: has joined #ruby
[16:51:57] startupality: has joined #ruby
[16:52:29] sternj: havenwood: I can't quite figure out where the specicfic issue lies, I only have error printouts. They are as follows: Installing dependencies... ERROR: Loading command: install (LoadError) cannot load such file -- zlib ERROR: While executing gem ... (NoMethodError) undefined method `invoke_with_build_args' for nil:NilClass
[16:53:19] alxgsv: has joined #ruby
[16:53:43] havenwood: sternj: Looks like a link is broken to the zlib library?: http://zlib.net
[16:53:48] havenwood: sternj: OS/distro?
[16:53:52] havenwood: sternj: How'd you install Ruby?
[16:54:04] renderful: has joined #ruby
[16:54:05] kareeoleez: has joined #ruby
[16:54:14] Satyajit: has joined #ruby
[16:54:25] zacts: has joined #ruby
[16:54:29] xall: has joined #ruby
[16:54:33] sternj: havenwood: zlib has been installed, running CentOS 7, Ruby built from source
[16:54:45] craigp: has joined #ruby
[16:55:16] havenwood: sternj: I'd probably try rebuilding Ruby so it can statically link again, unless you just built it.
[16:55:25] havenwood: dynamically*
[16:55:32] havenwood: ACTION tries to wake up
[16:56:16] sternj: Built today and reinstalled using RVM after installation of zlib
[16:56:39] Chirimbolito: has joined #ruby
[16:57:14] get_durnk: has joined #ruby
[16:57:18] moeabdol: has joined #ruby
[16:57:39] sternj: havenwood: another thing, the bootstrap seems to invoke linuxbrew, I'm attempting to install that and see if it does anything
[16:57:42] havenwood: sternj: you might try: rvm pkg install zlib
[16:57:45] get_durnk: if I have an object, and I've extended that object with a couple modules, how can I get a list of modules that have been mixed in
[16:57:56] startupality: has joined #ruby
[16:58:00] sternj: havenwood: Already done
[16:58:01] get_durnk: I did self.class.included_modules, but it doesnt seem to show modules that I .extend'd
[16:58:04] havenwood: sternj: hmm
[16:58:11] get_durnk: because its per instance
[16:59:18] guardian: hello, is File.mv atomic?
[16:59:18] sternj: havenwood: Working on getting linuxbrew up and running, not sure if that will help but there are several lines of code dedicated to it in the bootstrap
[17:01:24] guardian: I meant is FileUtils.mv atomic?
[17:02:10] havenwood: get_durnk: (class << self.class; self end).included_modules
[17:02:43] havenwood: get_durnk: or just: class << self.class; self.included_modules end
[17:02:56] havenwood: get_durnk: There might be a prettier way. >.>
[17:03:05] get_durnk: what does that mean? is that like a singleton of that particular object?
[17:03:20] mostlybadfly: has joined #ruby
[17:03:36] rodfersou: has joined #ruby
[17:03:45] kareeoleez: has joined #ruby
[17:04:05] malconis: has joined #ruby
[17:04:41] Zai00: has joined #ruby
[17:05:10] tubuliferous_: has joined #ruby
[17:05:24] pawnbox: has joined #ruby
[17:05:49] giz|work|2: has joined #ruby
[17:06:16] certainty: has joined #ruby
[17:06:54] rcvalle: has joined #ruby
[17:08:12] Papierkorb: guardian: as long the source and destination directories lie on the same partition, the underlying filesystem should ensure this.
[17:08:21] Papierkorb: guardian: if they do not, then no.
[17:08:56] RedNifre: has joined #ruby
[17:09:21] DroidBur_: has joined #ruby
[17:09:44] havenwood: guardian: yup
[17:09:51] havenwood: get_durnk: ^
[17:10:25] get_durnk: alright, well that works I guess
[17:10:26] Papierkorb: guardian: Oh, and that only applies for a single file/directory, not for multiple file/directories.
[17:10:47] iCHAIT: has left #ruby: ()
[17:11:32] jackjackdripper: has joined #ruby
[17:12:16] get_durnk: havenwood: some_obj.singleton_class.included_modules is a thing
[17:12:24] superlou: has joined #ruby
[17:12:40] get_durnk: which does what I was after. I'm not sure if that's the same operation, I wasn't explaining it very well anyways, but yeah
[17:12:54] havenwood: get_durnk: ah, nice
[17:13:28] havenwood: guardian: Rails has a File.atomic_write you might like looking at. Dunno! https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/file/atomic.rb
[17:14:03] RedNifre: Hello. I'd like to install the ruby software "tracks" on my OpenBSD machine but I'm not clear on the details regarding gems and bundler. The install instructions say that I should install bundler with 'gem install bundler', which didn't work so I tried it as root which I think worked, but then I get problems in the next step "bundle install --without development test". I guess installing bundler as root was a
[17:14:05] RedNifre: mistake? What should I do?
[17:14:26] willardg_: has joined #ruby
[17:14:48] RedNifre: My ruby knowledge is pretty minimal, I wrote tiny scripts with it but haven't used gem so far. I only know that it's a package manager.
[17:15:02] LoneHermit: has joined #ruby
[17:15:08] jaguarmagenta: has joined #ruby
[17:15:33] havenwood: RedNifre: Some OSes opt for a system gem install location by default. Then you need to prefix sudo. You can use the `--user-install` flag with RubyGems to do a local user install of gems. You can save that setting in a .gemrc file.
[17:15:55] havenwood: RedNifre: RubyGems (providing the `gem` binary) ships with Ruby. Bundler is itself a gem.
[17:16:03] startupality: has joined #ruby
[17:16:37] roamingdog: has joined #ruby
[17:16:38] the_drow: has joined #ruby
[17:16:41] aberen: has joined #ruby
[17:17:04] RedNifre: Okay, thanks. Was installing bundler as root a good or bad idea? When I do "bundler install..." as non-root I get many errors like "Bundler::GemspecError: Could not read gem at /usr/local/lib/ruby/gems/2.3/cache/htmlentities-4.3.2.gem. It may be corrupted.".
[17:17:15] havenwood: While RubyGems ships with gem dependency resolver itself these days, Bundler is still quite popular. If it's a Rails app then I'd say use Bundler. If it's just a gem consider using `gem install -g` to build the Gemfile.lock and prefix `RUBYGEMS_GEMDEPS=~` to autodetect the Gemfile.lock and use it.
[17:19:47] pilne: has joined #ruby
[17:19:54] chopin: has joined #ruby
[17:20:17] startupality: has joined #ruby
[17:20:18] RedNifre: I'm trying to install the stable version of tracks, the install instructions is an older version of this: https://github.com/TracksApp/tracks/blob/master/doc/installation.md
[17:20:33] havenwood: RedNifre: Seems you have a borked gem cache. Maybe?: gem sources --clear-all && gem pristine htmlentities
[17:20:38] ReK2: has joined #ruby
[17:20:38] ReK2: has joined #ruby
[17:21:19] kareeoleez: has joined #ruby
[17:21:52] mistermocha: has joined #ruby
[17:24:29] RedNifre: I pasted the output here, what could be the problem?: http://pastebin.com/S1DcKtSj
[17:24:31] ruby[bot]: RedNifre: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/7901716450a57edf859a611e583949c6
[17:24:31] ruby[bot]: RedNifre: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[17:25:06] RedNifre: havenwood oh sorry, I didn't notice that you answered...
[17:26:12] havenwood: RedNifre: Ah, so it thinks all the gem caches are corrupted. Maybe Bundler just doesn't have permission and gives a weird error?
[17:26:15] tAn: has joined #ruby
[17:26:43] RedNifre: well, I guess. I installed bundler as root because it didn't work without root. I guess that was wrong.
[17:27:09] havenwood: RedNifre: You might try --user-local with your gem installs. Avoid permissions issues by installing locally.
[17:27:11] RedNifre: How can I uninstall bundler and install it again without root?
[17:27:21] havenwood: sudo gem uninstall bundler
[17:27:29] havenwood: gem install bundler --user-local
[17:27:32] RedNifre: ah, how intuitive! one sec...
[17:27:50] get_durnk: I'm sure somebody has done this before, but I figured out how to extend objects with mixins that can be constrained by which modules have already been included, like traits https://repl.it/C2lF/4
[17:28:15] havenwood: RedNifre: Then prepend `~/.gem/ruby/<ruby-version-here>/bin` to your PATH so you can get at the gem binaries.
[17:29:02] aegis3121: has joined #ruby
[17:29:52] whathappens: has joined #ruby
[17:32:06] blackmesa: has joined #ruby
[17:32:23] RedNifre: hm, the --user-local flag seems to not exist.
[17:33:02] chosen1: has joined #ruby
[17:34:26] whathappens: has joined #ruby
[17:35:09] pontiki: has joined #ruby
[17:35:38] RedNifre: havenwood did you mean --user-install instead of --user-local?
[17:36:11] havenwood: RedNifre: yeah, sorry about that, i meant --user-install
[17:36:30] RedNifre: Hm. Or should I maybe set my GEM_HOME to ~/.gem or something?
[17:37:30] shevy: hmm if several different ruby files, all try to load the same base .rb file, via require... that file will only be loaded up once right? e. g. not evaluate more than once upon require-time
[17:38:32] RedNifre: Oh, or should I just create a .gemrc file in my home that only has "--user-install" in it? Or how would I put that setting there exactly?
[17:38:54] marahin: has joined #ruby
[17:39:26] pilne: i need to really drill a bit on the .each notation's syntax, as well as the scoping sigils, they aren't quite clicking yet but it's a syntax, not semantics issue for me at this point.
[17:39:28] kareeoleez: has joined #ruby
[17:39:40] shevy: Papierkorb okies ... I just (almost) finished rewriting some old code in the last 5 days ... lots of things had to be changed
[17:40:20] havenwood: RedNifre: echo 'gem: "--user-local"' >> ~/.gemrc
[17:40:46] havenwood: RedNifre: The syntax is like: gem: '--user-install'
[17:41:04] havenwood: RedNifre: Again, I typoed back to the wrong flag, but that's the idea.
[17:41:50] RedNifre: I just googled it and someone wrote that without the quotes, i.e. just 'gem: --user-install'.
[17:41:52] jancel: has joined #ruby
[17:45:09] SilverKey: has joined #ruby
[17:45:42] sameerynho: has joined #ruby
[17:45:44] flashpoint9: has joined #ruby
[17:45:58] rodfersou: has joined #ruby
[17:47:17] SilverKey: has joined #ruby
[17:48:11] codecop: has joined #ruby
[17:48:23] aep-shoutlet: has joined #ruby
[17:49:00] mattwashere: has joined #ruby
[17:51:07] giz|work|2: has joined #ruby
[17:53:16] CSWookie: has joined #ruby
[17:53:22] Vingador: has joined #ruby
[17:53:44] CSWookie: Hey all, if I catch an exception with a bare rescue, is there a way to find out what type of exception it was?
[17:53:55] erlendf: has joined #ruby
[17:54:11] adaedra: You can do .class on it
[17:54:45] CSWookie: How do I get it? I'm a ruby newb. Is there a special variable that gets set in the rescue block or something?
[17:55:02] adaedra: Ah, you just do `rescue`?
[17:55:07] tubuliferous_: has joined #ruby
[17:55:17] adaedra: Maybe show a little more code to have full context
[17:55:25] spider-mario: has joined #ruby
[17:55:27] CSWookie: That's how I have it. I'm sure it's wrong, though.
[17:55:36] adaedra: But if you do `rescue => ex`, you'll access the exception in `ex`
[17:56:09] CSWookie: Oh, wait, maybe I figured out what the exception type was after all.
[17:56:33] RedNifre: Okay, it looks like it installed without root, but autocomplete says I have bundle23, bundler23. Is that normal or should I have a "bundle" command without a number?
[17:57:33] kareeoleez: has joined #ruby
[17:57:48] CSWookie: Setting up Vagrantfiles isn't the most friendly way to learn Ruby...
[17:58:00] SilverKey: has joined #ruby
[17:58:13] RedNifre: Hm, my ~.gem/ruby/2.3/bin/ only contains the numbered bundler thingies so I'll just assume that's how it's supposed to be...
[17:58:45] rodfersou: has joined #ruby
[17:58:50] the_drow: has joined #ruby
[17:58:57] danostrowski: has joined #ruby
[18:02:06] Zai00: has joined #ruby
[18:02:22] gusrub: has joined #ruby
[18:03:57] RedNifre: Or should I put a symlink called "bundle" in my ~/bin that points to the bundle23 in .gems?
[18:05:04] jamo: https://github.com/bbatsov/ruby-style-guide ?
[18:05:31] choke: has joined #ruby
[18:05:53] startupality: has joined #ruby
[18:06:06] jamo: whoops, wrong but still kinda correct channel... but paste on mistake
[18:07:03] certainty: has joined #ruby
[18:07:14] duckpuppy: has joined #ruby
[18:07:48] RedNifre: Do you use ruby for large scale projects or only for smaller things?
[18:07:53] ornerymoose: has joined #ruby
[18:08:18] havenwood: RedNifre: Both.
[18:08:29] d5sx43: has joined #ruby
[18:09:07] aberen: has joined #ruby
[18:09:13] snath: has joined #ruby
[18:09:31] robk: has joined #ruby
[18:10:06] robk: has left #ruby: ()
[18:10:19] blaxter: has joined #ruby
[18:11:10] RedNifre: hhrrrrrm... now "bundle23 install --without development test" has still the same error, why does bundler try to read /usr/local/lib/ruby/gems/2.3/cache... ?
[18:11:27] RedNifre: Or does bundler not read the --user-install setting from my .gemrc?
[18:12:05] kareeoleez: has joined #ruby
[18:12:06] dionysus70: has joined #ruby
[18:12:13] SilverKey: has joined #ruby
[18:12:50] zeroDi: has joined #ruby
[18:17:55] wrkrcoop: has joined #ruby
[18:18:18] DoubleMalt: has joined #ruby
[18:18:33] ddffg: has joined #ruby
[18:19:00] shevy: RedNifre for everything
[18:19:25] christianrojas: has joined #ruby
[18:21:01] startupality: has joined #ruby
[18:21:21] monod: has joined #ruby
[18:21:35] kareeoleez: has joined #ruby
[18:22:08] kirun: has joined #ruby
[18:22:15] giz|work|2: has joined #ruby
[18:24:36] jordanm: has joined #ruby
[18:25:58] xue: has joined #ruby
[18:26:01] nankyokusei: has joined #ruby
[18:26:37] rueben: has joined #ruby
[18:26:44] aep-shoutlet: has joined #ruby
[18:27:09] arlek: has joined #ruby
[18:27:16] havenwood: RedNifre: Bundler has silly "remembered" options. Check: bundle config
[18:28:15] JJM: has joined #ruby
[18:28:22] nadir: has joined #ruby
[18:28:23] choke: has joined #ruby
[18:29:16] tubuliferous_: has joined #ruby
[18:29:36] smathy: has joined #ruby
[18:29:45] JeremyM_: has joined #ruby
[18:31:16] kareeoleez: has joined #ruby
[18:31:20] michael_mbp: If anyone has any leads for any work, would appreciate if you could ping me please http://desilva.io
[18:31:27] the_drow: has joined #ruby
[18:32:16] the_drow: has joined #ruby
[18:32:32] AoN: has joined #ruby
[18:32:45] JohnBat26: has joined #ruby
[18:33:14] AoN: Is this a the right chat to ask a quick question regarding a ruby server?
[18:33:51] havenwood: AoN: ask away!
[18:33:54] havenwood: michael_mbp: hi!
[18:35:12] christianrojas: has joined #ruby
[18:35:31] arlek: has joined #ruby
[18:35:45] iCHAIT: has joined #ruby
[18:35:58] iCHAIT: has left #ruby: ()
[18:37:12] yqt: has joined #ruby
[18:38:16] giz|work|2: has joined #ruby
[18:38:37] k3rn31: has joined #ruby
[18:38:40] michael_mbp: hey havenwood
[18:39:55] mdw: has joined #ruby
[18:43:57] choke: has joined #ruby
[18:44:46] antgel: has joined #ruby
[18:46:43] nadir: has joined #ruby
[18:47:34] [Butch]: has joined #ruby
[18:47:57] SilverKey: has joined #ruby
[18:49:27] whatelse: has joined #ruby
[18:49:32] minimalism: has joined #ruby
[18:51:13] ryan_notabot: has joined #ruby
[18:52:45] neha-: has joined #ruby
[18:53:28] e4xit: has left #ruby: ()
[18:53:30] roamingdog: has joined #ruby
[18:54:17] n_blownapart: has joined #ruby
[18:56:03] choke: has joined #ruby
[18:57:56] centrx: has joined #ruby
[18:58:25] last_staff: has joined #ruby
[18:59:37] DoubleMalt: has joined #ruby
[18:59:38] wrkrcoop: should i say ‘raise an error’ or raise an exception'
[19:01:19] havenwood: wrkrcoop: fails
[19:01:37] wrkrcoop: havenwood: which is it
[19:01:43] havenwood: >> fail 'Oh my!'
[19:01:44] ruby[bot]: havenwood: # => Oh my! (RuntimeError) ...check link for more (https://eval.in/590430)
[19:02:23] cdg: has joined #ruby
[19:02:25] havenwood: wrkrcoop: There's a school of thought that one should `fail` initially and only re-rail with a `raise`.
[19:02:47] havenwood: raise within a fail
[19:02:53] shevy: you refailed there!
[19:02:58] havenwood: shevy: haha
[19:02:59] wrkrcoop: havenwood: makes sense, but should i say ‘raise an error’ or raise an exception
[19:03:20] chouhoul_: has joined #ruby
[19:04:24] havenwood: wrkrcoop: raising an error causes an exception i suppose
[19:04:37] yfeldblum: has joined #ruby
[19:05:25] yfeldblum: has joined #ruby
[19:06:17] michael_mbp: havenwood: you can rescue and throw it again (re-raise the exception)
[19:06:20] chouhoul_: has joined #ruby
[19:06:59] shevy: we must not teach havenwood - we must teach wrkrcoop
[19:07:33] havenwood: http://devblog.avdi.org/2014/05/21/jim-weirich-on-exceptions/
[19:07:44] certainty: has joined #ruby
[19:08:29] havenwood: "Use fail to indicate failure. Use raise to indicate you are explicitly manipulating exceptions." ~@jimweirich
[19:09:05] aberen: has joined #ruby
[19:10:48] QORRiE: has joined #ruby
[19:12:07] AoN: havenwood: I'm sorry for the slow reponse. Almost as soon as I posted I got pulled into a phone conference.
[19:12:37] AoN: My question is this: Is it possible to determine is a ruby server is pushing a cached version of a page from the client?
[19:12:50] tubuliferous_: has joined #ruby
[19:15:24] chip_: has joined #ruby
[19:15:56] jaguarmagenta: has joined #ruby
[19:16:37] vuoto: has joined #ruby
[19:17:23] havenwood: AoN: Depends on how the caching is done. Something along these lines would be pretty telling: HTTP/1.1 304 Not Modified
[19:17:39] pawnbox: has joined #ruby
[19:17:47] havenwood: AoN: Say more about what you're doing?
[19:18:04] wldcordeiro: has joined #ruby
[19:18:41] diegoviola: has joined #ruby
[19:18:45] havenwood: AoN: Maybe compare a HEAD request for the resource when it is and isn't being cached.
[19:18:56] havenwood: What's the difference?
[19:19:05] havenwood: (In the response.)
[19:19:08] troulouliou_div2: has joined #ruby
[19:19:35] AoN: I have a user that is not seeing updated content while everyone else is and it's happening for him from multiple computers/browsers and is persistent through the browser cache clearing.
[19:21:11] dsimon: has joined #ruby
[19:21:30] dsimon: i've ran into a curiousity
[19:21:52] dsimon: why does `x = nil; x[:foo] = :bar` work?
[19:22:00] sdothum: has joined #ruby
[19:22:04] dsimon: or rather, why doesn't it raise anything? it seems to be ano-op
[19:22:08] havenwood: AoN: Can you find those requests and responses in your logs?
[19:22:33] havenwood: dsimon: What version of Ruby?
[19:22:48] havenwood: dsimon: Upgrade to 2.3.1 for the bugfix.
[19:22:51] dsimon: oh, it's a bug?
[19:22:56] havenwood: >> x = nil; x[:foo] = :bar
[19:22:57] ruby[bot]: havenwood: # => nil (https://eval.in/590437)
[19:23:00] AoN: havenwood: Do you want them from the server or browser? The server is outside my control.
[19:23:08] biox: has left #ruby: ("Leaving")
[19:23:11] havenwood: dsimon: Yeah, saw it on the bug tracker.
[19:23:22] CJKinni: has joined #ruby
[19:23:26] havenwood: AoN: Ah, I misunderstood.
[19:23:33] dsimon: havenwood, ah, ok, thanks :-)
[19:23:37] dsimon: i thought it was some obscure feature maybe
[19:23:46] dsimon: though i couldn't think of what help it would be
[19:24:03] rueben: has joined #ruby
[19:24:15] AoN: havenwood: From the browser, the user is getting 200 OK with Cache-Control: no-cache, no-store, max-age=0, must-revalidate
[19:24:16] havenwood: AoN: Do you have access to the user's computer?
[19:24:22] tAn: has joined #ruby
[19:24:54] havenwood: AoN: Seems to not be cached, at least that's what the HTTP header is saying.
[19:25:03] AoN: Everything it should need to force it to pull the most recent content, yet I'm getting the old material. :S
[19:25:20] agentmeerkat: has joined #ruby
[19:25:31] havenwood: AoN: What type of Ruby app?
[19:25:53] AoN: havenword: I know apache servers can be configured to provide such headers while using server-side caching, but I don't know the first thing about Ruby servers. :S
[19:26:30] czerasz: has joined #ruby
[19:26:33] AoN: havenword: I don't know about a classification for it. It's a LMS called Canvas.
[19:27:34] AoN: havenword: I'm sorry if I'm not much help, I'm a PHP Developer. Ruby and its server requirements are all foreign to me, but I'm the closet thing to an expert on it that we have. ^^'
[19:27:50] AoN: closest*
[19:28:29] havenwood: AoN: Looks like it's a Rails app. You might try asking in the #RubyOnRails channel as well.
[19:28:43] cisco: has joined #ruby
[19:28:53] AoN: Thank you for looking into it!
[19:29:08] AoN: has left #ruby: ("Closing Window")
[19:29:34] jackjackdripper: has joined #ruby
[19:30:09] johnmilton: has joined #ruby
[19:30:09] tuelz: has joined #ruby
[19:30:29] jackjackdripper: has joined #ruby
[19:30:40] tuelz: can bundler pull down branches from local git paths? `gem 'mygem', path: '/some/path', branch: 'a_branch'` ?
[19:31:01] anisha: has joined #ruby
[19:31:06] dsimon: tuelz, i think bundler treats paths as raw directories, doesn't even care if they're git repos or not
[19:31:10] jschoolcraft: has joined #ruby
[19:31:28] dsimon: maybe if you used :git with a local repo path?
[19:31:30] Rodya_: has joined #ruby
[19:31:42] tuelz: oh ill try that thanks
[19:33:44] elifoster: has joined #ruby
[19:35:22] chopin_: has joined #ruby
[19:36:25] cevett: has joined #ruby
[19:39:16] choke: has joined #ruby
[19:40:30] blasius: has joined #ruby
[19:40:47] zacts: has joined #ruby
[19:41:20] giz|work|2: has joined #ruby
[19:41:48] chouhoulis: has joined #ruby
[19:44:09] Yiota: has joined #ruby
[19:45:01] jxs_: has joined #ruby
[19:47:04] whathappens: has joined #ruby
[19:47:05] al2o3-cr: has joined #ruby
[19:49:29] RedNifre: Hm, bundle config has a BUNDLE_ORIG_PATH that looks fine I guess, no /usr/local/lib/ruby/gems/2.3/cache there.
[19:50:40] symm-: has joined #ruby
[19:50:54] joonty: has joined #ruby
[19:51:49] RedNifre: That's odd, all the gems needed by bundle install are in ~/.gem/ruby/2.3/cache, so why does bundle successfully put them in the local gem folder but then fails by looking for them in /usr...?
[19:52:02] jancel: has joined #ruby
[19:52:18] danostrowski: has joined #ruby
[19:54:56] havenwood: RedNifre: Gist the whole `bundle config`?
[19:55:08] RedNifre: okay, one moment...
[19:56:41] RedNifre: bundle23 config: https://gist.github.com/RedNifre/857b4b03c87b9f07207119feaa31a7ed
[19:57:12] jgt3: has joined #ruby
[19:57:28] RedNifre: btw shouldn't I be able to type "bundle" instead of "bundle23", just like I'm able to write "ruby" instead of "ruby23"?
[19:57:46] shevy: what the heck is bundle23
[19:58:06] havenwood: RedNifre: That's another optional RubyGems flag, that your distro saw fit to set.
[19:58:26] RedNifre: it's what autocomplete offers me after I installed the bundle gem.
[19:58:43] skweek: has joined #ruby
[19:58:51] shevy: how strange
[19:58:58] RedNifre: havenwood what do you mean?
[19:59:17] christianrojas: has joined #ruby
[19:59:20] shevy: bundler gem itself has these files in the bin/ directory: "bundle", "bundler" and "bundle_ruby"
[20:01:06] shevy: 1.12.5 has ... "rake", "rspec", "rubocop", "with_rubygems"
[20:01:08] shevy: what the :)
[20:01:42] RedNifre: Which bin? ~/.gem/ruby/2.3/bin only has bundle23 and bundler23.
[20:01:50] centrx: has joined #ruby
[20:02:18] shevy: that is even stranger
[20:02:34] shevy: looks as if some script appended some version to the filename there
[20:02:38] RedNifre: ...and the bundler-1.12.5/bin has what shevy said.
[20:02:44] shevy: 1.10.x had the "bundle", "bundler" and "bundle_ruby"
[20:02:56] havenwood: RedNifre: There's a `--format-exectuable` flag that makes the executable filename append the Ruby version.
[20:02:57] blackgoat: has joined #ruby
[20:03:05] havenwood: RedNifre: It's off by default. You can turn it off with: --no-format-executable
[20:03:06] shevy: ah, what bundler version do you actually have RedNifre?
[20:03:24] RedNifre: I guess it's 1.12.5 ?
[20:03:46] nettoweb: has joined #ruby
[20:04:05] mistermo_: has joined #ruby
[20:04:16] chouhoulis: has joined #ruby
[20:04:18] RedNifre: I have the latest OpenBSD which comes with ruby 2.3.0p0 rev 53290 and I just installed bundler without specifying a version.
[20:04:37] havenwood: RedNifre: You may have to tell bundler the --path, so it can "remember" it >.>.
[20:05:26] ramfjord: has joined #ruby
[20:05:27] havenwood: RedNifre: Bundler *should* work with --user-install but I don't know that it does. Is this a Rails app you're bundling for?
[20:05:31] RedNifre: That's insane, it manages to download the gems into the gem folder in my home, how can it forget that? grrrr
[20:05:57] havenwood: Bundler doesn't really respect RubyGems options. Nor does it use the same flags.
[20:05:58] RedNifre: I think it might be, it's the getontracks.org todo list server.
[20:06:38] RedNifre: Bundler doesn't read the --user-install from the .gemrc? Then why are the required gems in ~/.gem...?
[20:07:17] flashpoint9: has joined #ruby
[20:07:19] the_drow: has joined #ruby
[20:07:49] RedNifre: I'm trying to install this: https://github.com/TracksApp/tracks/blob/2.3_branch/doc/installation.md
[20:08:33] certainty: has joined #ruby
[20:09:05] havenwood: RedNifre: https://github.com/bundler/bundler/issues/2565
[20:09:30] the_drow: has joined #ruby
[20:10:00] havenwood: RedNifre: So I suppose you could set the $GEM_HOME so Bundler has that to go off of. It's RubyGems installing the gems into the proper location.
[20:10:08] pilne: i'm doing very basic stuff still, and rvm is working quite well for my use case
[20:10:14] lightt: has joined #ruby
[20:10:27] havenwood: I for one look forward to the post-Bundler days! :)
[20:10:28] havenwood: pilne: Using gemsets?
[20:10:29] mattwashere: has joined #ruby
[20:10:47] mattwashere: has joined #ruby
[20:10:55] pilne: but again, i just have a jekyll and global setup right now
[20:10:59] RedNifre: ah, makes sense.
[20:11:02] pilne: and a rails, but i haven't delved in there yet.
[20:11:07] wrkrcoop: has joined #ruby
[20:11:27] havenwood: These days for non-Rails stuff I just use `gem install -g` with `RUBYGEMS_GEMDEPS=~`. Can't beat shipping with Ruby.
[20:12:03] moeabdol: has joined #ruby
[20:12:10] RedNifre: sooo... I set the GEM_HOME env variable to $HOME/.gem ?
[20:12:26] pilne: the ubuntu spin i use doesn't ship with ruby, and i like using virtual environments for anything personal, separation of shit is something i'm kinda anal about.
[20:13:08] wrkrcoop: has joined #ruby
[20:13:15] bougyman: before all these goodies (rubygems, bundler, rvm, rbenv) we just used local rubies and one user per app.
[20:13:27] havenwood: RedNifre: Something like: export GEM_HOME="$HOME/.gem/ruby/2.3.1"
[20:13:29] bougyman: /home/app1 with ruby using --prefix /home/app1, etc.
[20:13:43] bougyman: it was very effective.
[20:13:57] havenwood: bougyman: chruby to set env vars and what ships with Ruby works well for me :P
[20:14:11] bougyman: havenwood: again, this was before any of these things existed.
[20:14:20] bougyman: ruby 1.6 and below
[20:14:22] LoneHerm_: has joined #ruby
[20:14:30] havenwood: RedNifre: chruby is a short shell script that congures the Ruby-related env vars, including $GEM_HOME and setting up $PATH for gem binaries
[20:14:35] havenwood: bougyman: eek
[20:14:48] bougyman: thing is: it still works.
[20:14:57] havenwood: bougyman: <3 RubyGems though :)
[20:14:58] bougyman: though I use rvm these days.
[20:15:23] Kneecaps: has joined #ruby
[20:15:27] havenwood: RedNifre: https://github.com/postmodern/chruby
[20:15:37] havenwood: RedNifre: But yeah, you can just set PATH, GEM_HOME and friends yourself.
[20:15:56] havenwood: chruby is nice if you want to switch Rubies
[20:16:25] blackmesa: has joined #ruby
[20:18:53] kies: has joined #ruby
[20:19:39] RedNifre: Oh my god, bundler install is outputting green lines!
[20:20:11] RedNifre: ...and it ended with a red line. hmmm...
[20:20:24] RedNifre: ACTION reads
[20:21:29] RedNifre: Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
[20:21:30] lightt: has joined #ruby
[20:21:37] RedNifre: Installing libv8 3.16.14.7 with native extensions
[20:22:07] the_drow: has joined #ruby
[20:22:12] RedNifre: uh... looks like it needs python? How strange.
[20:22:26] havenwood: RedNifre: I usually just install Node.
[20:22:28] gizmore: has joined #ruby
[20:22:35] nerium: has joined #ruby
[20:22:36] RedNifre: Why do I need python to build a ruby app?
[20:22:53] the_drow: has joined #ruby
[20:22:56] havenwood: RedNifre: Ask the #RubyOnRails folk! :P
[20:23:08] RedNifre: Heh, what would installing Node accomplish?
[20:23:26] havenwood: RedNifre: v8
[20:23:34] neha-: it needs a javascript runtime
[20:23:47] neha-: some gems need javascript
[20:24:26] havenwood: RedNifre: Node is the most straightforward way to get that runtime ^
[20:25:27] havenwood: RedNifre: Building the libv8 gem does require Python. But you don't need the gem if you have an alternative JavaScript runtime.
[20:25:52] RedNifre: but isn't installing node somewhat tricky itself? It's usually not in repositories, right?
[20:26:26] havenwood: RedNifre: pkg install node-devel
[20:27:03] RedNifre: I actually have python, it's just that it's called python3.5 or python2.7. Guess I'll just alias python to python3.5 and hope for the best?
[20:27:04] havenwood: RedNifre: I'd think it's pretty ubiquitously available by package manager these days.
[20:27:32] havenwood: RedNifre: I'd just install Node, since v8 isn't large (made to ship in a browser after all) and there's a package for it.
[20:28:09] RedNifre: Will that actually work? If I pkg_add node-devel and run bundle install, it will no longer ask for python?
[20:28:37] GodFather: has joined #ruby
[20:28:51] ur5us: has joined #ruby
[20:29:26] RedNifre: Nope, no node-devel for openbsd.
[20:29:32] havenwood: RedNifre: They mention here how to skip therubyracer if you have Node installed: https://github.com/TracksApp/tracks/blob/2.3_branch/doc/installation.md#install-dependencies
[20:29:37] eljimmy: has joined #ruby
[20:29:38] havenwood: RedNifre: How about just `node`?
[20:29:47] mattwashere: has joined #ruby
[20:30:03] jenrzzz: has joined #ruby
[20:30:19] RedNifre: oh, right. that one exists.
[20:30:20] digneety: has joined #ruby
[20:30:26] havenwood: (You can remove `therubyracer` from your Gemfile (or the weird subGemfiles they have in this project) or add the `--without therubyracer` to you bundle command)
[20:30:53] RedNifre: Why do some gems need python or javascript? I thought python and javascript were kinda in the same category as ruby?
[20:31:56] havenwood: RedNifre: The #rubyonrails channel is probably a better place to ask about why javascript is needed for the asset pipeline.
[20:32:17] symm-: has joined #ruby
[20:32:26] RedNifre: ah, so it's an unusual thing for a gem to need python and javascript, huh?
[20:32:26] havenwood: RedNifre: As far as depending on other languages as part of a gem's build, it's very rare but authors are free to do whatever.
[20:32:32] havenwood: RedNifre: Very.
[20:33:03] bluOxigen: has joined #ruby
[20:33:26] havenwood: RedNifre: It's more common for a gem to have C or Java extensions.
[20:33:30] David27: has joined #ruby
[20:33:47] adamf: has left #ruby: ()
[20:33:49] miqlas-H: has joined #ruby
[20:34:06] havenwood: Less common yet to have a Crystal extension with MRuby embedded in it! :P
[20:34:56] havenwood: ACTION plots things
[20:36:06] chopin: has joined #ruby
[20:36:08] RedNifre: Maybe I should switch to FreeBSD where they have Docker...
[20:37:02] sameerynho: has joined #ruby
[20:37:08] dcunit3d: has joined #ruby
[20:37:23] wrkrcoop: has joined #ruby
[20:37:24] adaedra: Calm down havenwood, they just started embedding rust extensions
[20:37:35] bluOxigen: has joined #ruby
[20:37:59] RedNifre: okay, here goes nothing...
[20:38:13] chip_: has joined #ruby
[20:39:15] Kneecaps: has left #ruby: ()
[20:39:23] Kneecaps: has joined #ruby
[20:39:44] RedNifre: hm, same error. Should I really exclude "therubyracer"? Why not exclude libv8 if I have node? It's still the same error, it can't install libv8 because it wants python or python2 or python (???).
[20:41:28] havenwood: RedNifre: The #RubyOnRails folk will have more experience with this particular rabbit hole on average.
[20:42:21] wrkrcoop: i’m trying to run rspec, but when i run it, its complaining because the file its testing doesn’t require a dependency. im not requiring those files because im using LazyRequire to load everything, how can iload all my files before running rspec
[20:42:26] havenwood: RedNifre: libv8 is a dependency of therubyracer
[20:44:30] d0nn1e: has joined #ruby
[20:45:01] sandstrom: has joined #ruby
[20:45:28] Kneecaps: has left #ruby: ()
[20:47:57] eljimador: has joined #ruby
[20:48:17] whathappens: has joined #ruby
[20:48:34] Coldblackice: has joined #ruby
[20:48:56] aberen: has joined #ruby
[20:53:04] wrkrcoop: how do i load all my files before running rspec?
[20:53:19] wrkrcoop: LazyRequire.require_all('../apps/asdfasdfad/apis/*.rb')
[20:53:21] wrkrcoop: doesn’t work
[20:54:07] diegoaguilar: has joined #ruby
[20:54:15] arooni: has joined #ruby
[20:54:27] troulouliou_div2: has joined #ruby
[20:55:17] flashpoint9: has joined #ruby
[20:56:03] RedNifre: havenwood if libv8 is only a dependency of therubyracer, why does bundler then try to install libv8 when I add therubyracer to --without?
[20:57:00] havenwood: RedNifre: Maybe they have it listed in the Gemfile explicitly as well? It's a bit hard to tell with the crazy Gemfile.d dir they have.
[20:57:11] Dysp: has joined #ruby
[20:57:18] RedNifre: Also, it truly is a rabbit hole, after I symlinked python and python2 I now get an error that I don't have a compiler that is officially supported by v8 because I have 5.9 and they want 4.4 or something. I'll check the rails channel...
[20:57:25] jetpackjoe: has joined #ruby
[20:58:02] RedNifre: Hmpf, maybe I should give up on tracks and look for something else. Can anyone recommend a good GTD server software with a XML or JSON API? ;)
[20:58:05] chouhoulis: has joined #ruby
[20:59:47] Dysp: I want to create a hash with an undefined number of elements (keys and corresponding value). It is based on elements in an array, which are iterated and then put into a hash. My problem is trying to figure out how to create a key automatically, lets call it r and then the number in the loop. How would one come around doing this?
[21:00:05] mistermocha: has joined #ruby
[21:00:18] Dysp: Like r1 => [data], r2 => [data] etc.
[21:00:20] neanderslob: has joined #ruby
[21:00:32] neanderslob_: has joined #ruby
[21:00:37] juanfra: has joined #ruby
[21:00:38] Dysp: Problem is; I don't know how many "r's" there will be.
[21:00:57] havenwood: Dysp: Show an example of the Array you're starting with and the Hash you'd like to end up with? Maybe a Gist?
[21:01:05] hs366: has joined #ruby
[21:01:15] Dysp: Just did.
[21:01:21] Dysp: It's not more complex than that.
[21:01:53] neanderslob: has joined #ruby
[21:02:05] Dysp: [data1, data2, data3] should become {r1 => [data1], r2 => [data2], r3 => [data3] }
[21:02:42] the_drow: has joined #ruby
[21:03:41] RedNifre: Strange... removing therubyracer from the Gemfile seems to do the trick. I wonder why --without therubyracer didn't work. Oh well.
[21:03:43] workmad3: has joined #ruby
[21:03:59] havenwood: >> %w[:data1 data2 data3].each.with_index(1).map { |data, index| ["r#{index}", data] }.to_h
[21:04:01] ruby[bot]: havenwood: # => {"r1"=>":data1", "r2"=>"data2", "r3"=>"data3"} (https://eval.in/590469)
[21:04:33] jenrzzz: has joined #ruby
[21:04:39] Dysp: That was exactly what I was looking for and thinking I should do, but couldn't figure out!
[21:04:43] Dysp: Thank you so much.
[21:04:56] havenwood: Dysp: You're welcome.
[21:05:41] Gasher: has joined #ruby
[21:06:04] Dysp: havenwood: One thing; what does the 1 do in each.with_index?
[21:06:35] Dysp: Oh. Got it.
[21:06:37] Dysp: Sets the offset.
[21:08:39] RedNifre: Ah, it's getting late. Bundler succeeded, but the installation manual has many more steps so I'll continue tomorrow. Thank you very much for your help, havenwood!
[21:08:47] wrkrcoop: anyone know how i can load all my files when i run rspec?
[21:08:56] havenwood: RedNifre: You're welcome, good luck!
[21:09:00] agentmeerkat: has joined #ruby
[21:09:06] RedNifre: Thanks, good night.
[21:09:16] certainty: has joined #ruby
[21:09:24] firstdayonthejob: has joined #ruby
[21:09:57] tubuliferous_: has joined #ruby
[21:09:58] the_drow: has joined #ruby
[21:11:00] dcunit3d: has joined #ruby
[21:11:19] skade: has joined #ruby
[21:11:47] Sembei: has joined #ruby
[21:11:57] the_drow: has joined #ruby
[21:12:30] Madplatypus: has joined #ruby
[21:12:59] the_drow: has joined #ruby
[21:13:35] lightt: has joined #ruby
[21:14:08] moeabdol: has joined #ruby
[21:14:38] firstdayonthejob: has joined #ruby
[21:15:47] pwnd_nsfw: has joined #ruby
[21:16:09] madgen: has joined #ruby
[21:16:16] the_drow: has joined #ruby
[21:16:41] jaguarmagenta: has joined #ruby
[21:19:49] roamingdog: has joined #ruby
[21:20:09] Neon: has joined #ruby
[21:22:17] Neon: Let's say I want to make a module Foo for including in other scripts. That module includes a module Bar, because it needs it, but a common use case is that a script includes Bar and Foo. If such a script includes Bar, then Foo, Foo wouldn't actually need to include Bar as well, would it? How can I avoid that? Should I avoid double include at all?
[21:22:27] futilegames: has joined #ruby
[21:22:27] tubuliferous_: has joined #ruby
[21:23:27] Neon: I tried include?(Bar), but that just gives me false, even if the including script includes Bar before that.
[21:24:03] Regulati_: has joined #ruby
[21:24:47] swills: has joined #ruby
[21:24:51] diegoaguilar: has joined #ruby
[21:27:11] yfeldblum: has joined #ruby
[21:27:32] shevy: I don't know what your question is but you are asking for some conditional include right?
[21:27:45] Neon: shevy: Kind of. Like an include_once
[21:28:07] jhass: you probably should include less and instead move stuff to classes
[21:28:44] jhass: ACTION never was a fan of include Foo into the toplevel for anything
[21:28:50] Neon: That's funny. I actually started using modules, because I read everywhere that modules are cool and flexible and I should use them. :/
[21:28:59] Neon: I've set an example up (minimal): https://gist.github.com/Neosublimation/24f587d3f6f7eaa978fb631d7a745767
[21:29:14] the_drow: has joined #ruby
[21:29:19] shevy: you can try to ask .ancestors whether, and if, something was already included
[21:29:36] spiette: has joined #ruby
[21:29:36] jhass: if you include them into the toplevel you're just trying to hide that you're still programming in a procedural style
[21:30:01] Neon: It's a Rakefile extension, so it is in fact procedural programming.
[21:30:05] vjacob: has joined #ruby
[21:30:10] jhass: modules are cool, but not for grouping your procedural methods just visually
[21:30:23] jhass: I have many rake tasks that just task :foo; Foo.new.run
[21:30:28] Neon: The plan is to just include the module in the Rakefile, then use its methods.
[21:30:37] the_drow: has joined #ruby
[21:31:19] Neon: I couldn't figure out how to access the Rake environment from classes without having to add much technical code again. After all it should be minimal and quick to use.
[21:31:34] Neon: But when I include the module it can just use the Rake methods.
[21:31:48] Hiryu: has joined #ruby
[21:32:25] jhass: anyway, to answer the question, you cam define def self.included(base) in module Foo; then check base.ancestors for Bar and call base.send(:include, Bar) if it's not there already
[21:32:50] SilverKey: has joined #ruby
[21:32:55] jhass: that'll prevent a double include on include Bar; include Foo; but not on include Foo; include Bar;
[21:33:06] fflush: has joined #ruby
[21:33:17] shevy: you managed to use the word include 5 times there
[21:33:28] Hiryu: fflush: hi!
[21:33:36] fflush: fflush kicked Hiryu:
[21:33:42] Hiryu: has joined #ruby
[21:34:19] Neon: Apart from that, there is no way to get the actual Rake object somehow, is there?
[21:34:21] gizless: has joined #ruby
[21:34:32] jhass: "Rake object"?
[21:35:00] Neon: To get an object for calling the Rake methods like rule or task.
[21:35:34] Neon: Ah, no, I remember something. They are private anyway. Or protected.
[21:35:40] Hiryu: mwuhahaha
[21:35:40] the_drow: has joined #ruby
[21:36:25] Neon: It appears to me as if Rake was not designed to be extended easily with functions that just serve as kind of rule generators or the like, is it?
[21:38:44] shevy: Neon I think Rake just is similar to make with ruby-syntax
[21:39:14] Hiryu: I'm not a bot.
[21:39:33] havenwood: Hiryu: Sounds like what a bot would say.
[21:40:02] Hiryu: havenwood: what is this? The turing test?
[21:41:20] Neon: shevy: Nah, it can do much more than make. Or at least much easier.
[21:42:34] Neon: Somehow, in the Foo module, ancestors just contains Foo.
[21:42:46] Neon: Even if the includer has Bar included beforehand.
[21:43:12] Hiryu: fflush: thanks!
[21:43:55] the_drow: has joined #ruby
[21:44:21] Radar: How about no?
[21:44:38] Neon: Maybe it's not worth the trouble at all. Let's just include it twice.
[21:44:55] Radar: Hiryu: I don't know who you are.
[21:45:27] diegoviola: has joined #ruby
[21:45:38] troulouliou_div2: has joined #ruby
[21:45:43] Hiryu: ACTION sighs
[21:45:45] Radar: Hiryu: ID plz.
[21:46:27] fflush: has joined #ruby
[21:46:43] Neon: IRC Channel Operator rank - the best nerd toy since 1930.
[21:46:52] whathappens: has joined #ruby
[21:46:54] Radar: Hiryu: Last chance.
[21:47:04] Radar: fflush: Who is Hiryu?
[21:47:07] Radar: fflush: Why do you op randos?
[21:47:10] fflush: lastr chance for what ?
[21:47:20] postmodern: has joined #ruby
[21:48:06] ChanServ: +o havenwood
[21:48:22] ChanServ: -o havenwood
[21:48:59] Hiryu: because I like Ruby.
[21:49:18] jenrzzz: has joined #ruby
[21:49:18] jenrzzz: has joined #ruby
[21:49:18] mattwashere: has joined #ruby
[21:50:17] the_drow: has joined #ruby
[21:51:19] oncall-pokemon: has joined #ruby
[21:51:24] the_drow: has joined #ruby
[21:52:30] havenwood: Hiryu: That's what brings us here. Have any Ruby to share or any questions? :-)
[21:53:16] Hiryu: I was invited by the channel owner
[21:53:18] startupality: has joined #ruby
[21:53:19] czerasz: has joined #ruby
[21:53:26] havenwood: Hiryu: Welcome!
[21:53:31] havenwood: (However you came.)
[21:53:42] fflush: we will make #ruby great again
[21:54:52] ruby[bot]: +qq fflush!*@* *!*@unaffiliated/fflush
[21:56:16] tAn: has joined #ruby
[21:56:47] lucky_rem: has joined #ruby
[21:57:09] Hiryu: havenwood: thanks
[21:57:39] hutch34: has joined #ruby
[21:58:02] lucky_rem: So I wrote a ruby executable. If I send it to someone without ruby, will they be able to run it if I don't write anything else except "#!/usr/bin/env ruby" at the top?
[21:58:10] the_drow: has joined #ruby
[21:58:15] kies: has joined #ruby
[21:58:26] havenwood: lucky_rem: Nope.
[21:58:39] Papierkorb: lucky_rem: they won't be able to run it without ruby at all, no matter what you write at the top
[21:58:51] lucky_rem: @havenwood ah poop, so they have to have ruby installed then?
[21:58:56] the_drow: has joined #ruby
[21:59:00] havenwood: lucky_rem: /usr/bin/env ruby #=> env: ruby: No such file or directory
[21:59:16] flashpoint9: has joined #ruby
[21:59:36] havenwood: lucky_rem: You could ship it with something a la Traveling Ruby: http://phusion.github.io/traveling-ruby/
[21:59:45] [Butch]_: has joined #ruby
[21:59:50] lucky_rem: havenwood: ah so they won't have that env and therefore it doesn't know what to do with it
[22:00:00] havenwood: lucky_rem: yup
[22:00:57] lucky_rem: awesome, thanks for the advice - I'll take a look at traveling-ruby too
[22:01:53] lucky_rem: Papierkorb: thanks for that, helped put a nail in that question
[22:02:35] yfeldblum: has joined #ruby
[22:02:43] rffleiae: has joined #ruby
[22:04:02] mdw: has joined #ruby
[22:05:32] wald0: has joined #ruby
[22:06:19] the_drow: has joined #ruby
[22:07:09] the_drow: has joined #ruby
[22:07:17] dcunit3d: has joined #ruby
[22:07:49] rffleiae: has joined #ruby
[22:09:57] nettoweb: has joined #ruby
[22:10:02] certainty: has joined #ruby
[22:10:08] kobain: has joined #ruby
[22:10:47] yfeldblum: has joined #ruby
[22:11:48] the_drow: has joined #ruby
[22:12:42] centrx: has joined #ruby
[22:12:46] the_drow: has joined #ruby
[22:13:13] aberen: has joined #ruby
[22:15:18] moeabdol: has joined #ruby
[22:17:03] mrmortondk: has joined #ruby
[22:19:37] al2o3-cr: has joined #ruby
[22:19:53] voodoofish430: has joined #ruby
[22:20:12] arooni: has joined #ruby
[22:20:40] wrkrcoop: how do i test that my error is getting rescued? can’t find anything on the internet
[22:20:57] tAn: has joined #ruby
[22:21:00] jhass: expect { ... }.not_to raise_error
[22:21:50] edwinvdgraaf: has joined #ruby
[22:21:51] the_drow: has joined #ruby
[22:23:10] biox: has joined #ruby
[22:30:16] pwnd_nsfw: has joined #ruby
[22:31:09] flashpoint9: has joined #ruby
[22:31:13] wrkrcoop: jhass: oh ...
[22:31:28] wrkrcoop: jhass: really? ok
[22:32:01] flashpoint9: has joined #ruby
[22:32:28] tlaxkit: has joined #ruby
[22:34:20] flashpoint9: has joined #ruby
[22:34:36] blackgoat: has joined #ruby
[22:35:41] zenlot: has joined #ruby
[22:37:00] eljimmy: has joined #ruby
[22:39:31] madgen: has joined #ruby
[22:39:39] danostrowski: has joined #ruby
[22:41:08] sp4rrow: has joined #ruby
[22:41:50] ocbtec: has joined #ruby
[22:44:21] SilverKey: has joined #ruby
[22:44:25] cdg: has joined #ruby
[22:45:44] tessi_zz: has joined #ruby
[22:48:13] mattwashere: has joined #ruby
[22:50:52] SenpaiSilver: has joined #ruby
[22:51:24] lightt: has joined #ruby
[22:51:45] arooni: has joined #ruby
[22:52:19] Gasher^: has joined #ruby
[22:52:47] yfeldblum: has joined #ruby
[22:52:56] tAn: has joined #ruby
[22:54:33] nankyokusei: has joined #ruby
[22:55:06] lacuna: has joined #ruby
[22:55:19] aberen: has joined #ruby
[22:55:50] ruby[bot]: -qq fflush!*@* *!*@unaffiliated/fflush
[22:57:11] millerti: has joined #ruby
[22:58:12] jenrzzz: has joined #ruby
[22:58:13] jenrzzz: has joined #ruby
[22:58:33] jancel: has joined #ruby
[22:58:57] mikeiniowa: has joined #ruby
[23:00:28] tildes: has joined #ruby
[23:01:06] wrkrcoop: has joined #ruby
[23:02:38] superlou_: has joined #ruby
[23:04:01] Asher: has joined #ruby
[23:04:51] GGMethos: has joined #ruby
[23:07:06] SenpaiSilver: has joined #ruby
[23:07:49] koochdog: has joined #ruby
[23:08:23] koochdog: Can anyone point me in the right direction on testing threaded code?
[23:08:25] danostrowski: has joined #ruby
[23:08:54] koochdog: For example, I have a scheduler thread that polls from a queue and then offloads the work to a threadpool of worker threads
[23:08:59] banister: has joined #ruby
[23:10:48] certainty: has joined #ruby
[23:10:48] sp4rrow: has joined #ruby
[23:11:32] lightt: has joined #ruby
[23:11:51] Uranio: has joined #ruby
[23:13:51] mattwashere: has joined #ruby
[23:14:03] moeabdol: has joined #ruby
[23:17:24] jaguarmagenta: has joined #ruby
[23:18:03] blackmesa: has joined #ruby
[23:21:02] the_drow: has joined #ruby
[23:21:52] the_drow: has joined #ruby
[23:25:52] tildes: has joined #ruby
[23:26:20] snath: has joined #ruby
[23:26:26] jhass: there's no universal solution, it highly depends on what you want to test and how it's implemented
[23:26:54] Rodya_: has joined #ruby
[23:27:07] mistermocha: has joined #ruby
[23:27:18] koochdog: jhass: thanks, I'm just looking for anything to me started at this point
[23:27:58] moeabdol: has joined #ruby
[23:28:06] jhass: start with choosing a testing framework and learning how to test regular single threaded code
[23:28:10] wrkrcoop: has joined #ruby
[23:28:16] the_drow: has joined #ruby
[23:28:35] koochdog: Yeah, I started using rspec, and tested single threads is pretty easy for me
[23:28:55] koochdog: The hard part is I feel like I lose visiblity when the thread starts so I'm not sure how to test that
[23:29:05] the_drow: has joined #ruby
[23:29:14] mistermocha: has joined #ruby
[23:29:44] koooge: has joined #ruby
[23:29:46] ornerymoose: has joined #ruby
[23:29:48] jhass: I would try to define finite, quickly executing testcases, probably a bit higher level than regular unit tests
[23:30:04] jhass: and then it stays at the regular, setup, execute, assert desired result
[23:30:08] Rodya_: has joined #ruby
[23:30:12] koochdog: ex: scheduler = Scheduler.new; scheduler.start; .start creates the thread and loops polling for jobs from the queue
[23:30:31] jhass: how do you regularly terminate it?
[23:30:49] jhass: ideally you would have a kill job
[23:31:01] mistermo_: has joined #ruby
[23:31:02] koochdog: yeah i can exit the schduler
[23:31:29] koochdog: so each scheduler object has its own threadpool of worker threads
[23:31:33] jhass: so start it, push some jobs, push the kill job, join it, assert it's no longer running and has done all its work properly
[23:31:39] koochdog: and when it finds a job it sends it off to the threadpool
[23:32:29] koochdog: I was thinking something like add a job to the queue, start the scheduler, sleep for 1second, see if job ran
[23:32:32] koochdog: just felt hacky
[23:32:44] jhass: that's definitely racy and inappropriate
[23:32:51] lightt: has joined #ruby
[23:33:00] mistermo_: has joined #ruby
[23:33:16] lightt: has joined #ruby
[23:33:18] koochdog: but without something like futures I'm not sure how to test that
[23:33:30] jhass: you'll need a way to join all threads
[23:33:48] jhass: additionally to sending them a message to kill themselves
[23:34:46] the_drow_: has joined #ruby
[23:34:56] koochdog: why the kill if it's joining?
[23:34:56] mistermocha: has joined #ruby
[23:35:38] jhass: I thought they loop endlessly?
[23:35:54] koochdog: good point ;-)
[23:36:05] rffleiae: has joined #ruby
[23:36:57] mistermo_: has joined #ruby
[23:37:03] koochdog: seems like even with killing and joining there is no guarantee that the racyness is gone
[23:37:17] koochdog: (if thread gets killed before it has scheduled work)
[23:37:30] jgt3: has joined #ruby
[23:38:03] jhass: thus kill job
[23:38:13] Rodya_: has joined #ruby
[23:38:37] koochdog: yeah but what is even being tested at that point
[23:38:58] jhass: it does gets into being an integration test, yes
[23:39:01] mistermo_: has joined #ruby
[23:40:19] Yiota: has joined #ruby
[23:40:56] mistermocha: has joined #ruby
[23:40:58] koochdog: yea that'd be like a feature spec i think
[23:41:50] CloCkWeRX: has joined #ruby
[23:42:08] rueben: has joined #ruby
[23:44:15] rffleiae: has joined #ruby
[23:45:21] mdw: has joined #ruby
[23:45:24] the_drow__: has joined #ruby
[23:46:10] roamingdog: has joined #ruby
[23:46:20] Ropeney: has joined #ruby
[23:46:44] mistermocha: has joined #ruby
[23:46:57] ElFerna: has joined #ruby
[23:47:29] amoeba: has joined #ruby
[23:48:35] mistermo_: has joined #ruby
[23:50:03] karmatr0n: has joined #ruby
[23:50:22] LoneHermit: has joined #ruby
[23:51:37] RickHull: has joined #ruby
[23:52:40] mistermocha: has joined #ruby
[23:54:14] tAn: has joined #ruby
[23:57:18] tildes: has joined #ruby