« Back to channel list

#ruby - 13 July 2016

« Back 1 day Forward 1 day »
[00:00:49] skalfyfan: has joined #ruby
[00:01:00] wrkrcoop: has joined #ruby
[00:05:04] ramfjord_: has joined #ruby
[00:07:31] skalfyfan: has joined #ruby
[00:10:25] dminuoso: has joined #ruby
[00:11:07] pwnd_nsfw`: has joined #ruby
[00:11:35] failshell: has joined #ruby
[00:12:19] flashpoint9: has joined #ruby
[00:13:02] ProofTechnique: has joined #ruby
[00:13:27] epitron: shevy: you could use set_trace_func to time each line of code
[00:13:45] epitron: Should be pretty straight forward... just make a giant hash of times
[00:14:56] A_Drone: has joined #ruby
[00:15:34] tristanp: has joined #ruby
[00:18:19] drbrain: shevy: use a sampling profiler
[00:21:30] nankyokusei: has joined #ruby
[00:21:55] aryaching: has joined #ruby
[00:23:45] GodFather: has joined #ruby
[00:24:08] coffeecupp: has joined #ruby
[00:24:21] Dimik--: has joined #ruby
[00:24:56] cd-rum: has joined #ruby
[00:28:56] bkxd: has joined #ruby
[00:28:59] Mia: has joined #ruby
[00:29:23] phrozen77: has joined #ruby
[00:29:34] whathappens: has joined #ruby
[00:30:34] hutch34: has joined #ruby
[00:31:06] ElFerna: has joined #ruby
[00:32:51] cd-rum: has joined #ruby
[00:39:30] flashpoint9: has joined #ruby
[00:41:56] coffeecupp: has joined #ruby
[00:43:19] mattwashere: has joined #ruby
[00:48:02] tubuliferous: has joined #ruby
[00:50:01] blackmesa: has joined #ruby
[00:50:17] pawnbox: has joined #ruby
[00:52:30] meinside: has joined #ruby
[00:54:05] shakes: has joined #ruby
[00:54:45] JesseH: has joined #ruby
[00:55:35] yfeldblum: has joined #ruby
[00:55:42] allstar: has joined #ruby
[01:00:05] ReK2: has joined #ruby
[01:00:54] dhk: has joined #ruby
[01:01:04] GodFather: has joined #ruby
[01:01:47] weaksauce: has joined #ruby
[01:11:34] dminuoso: has joined #ruby
[01:13:22] flashpoint9: has joined #ruby
[01:13:32] failshell: has joined #ruby
[01:16:47] skalfyfan: has joined #ruby
[01:17:19] yfeldblum: has joined #ruby
[01:19:34] A_Drone: has joined #ruby
[01:20:58] skalfyfan: has joined #ruby
[01:24:01] ruby-lang614: has joined #ruby
[01:29:22] Mayniac: has joined #ruby
[01:29:25] Ropeney: has joined #ruby
[01:29:39] bkxd: has joined #ruby
[01:29:49] flashpoint9: has joined #ruby
[01:29:50] Rodya_: has joined #ruby
[01:31:17] AndroidLoverInSF: has joined #ruby
[01:31:31] nersoh: has joined #ruby
[01:34:02] cpruitt: has joined #ruby
[01:35:23] rodfersou: has joined #ruby
[01:37:00] freerobby: has joined #ruby
[01:37:25] smathy: has joined #ruby
[01:39:55] l4v2: has joined #ruby
[01:41:47] giz|work|2: has joined #ruby
[01:42:11] coffeecupp: has joined #ruby
[01:45:18] AndroidLoverInSF: has joined #ruby
[01:46:36] tristanp: has joined #ruby
[01:51:48] Rodya_: has joined #ruby
[01:52:00] yeticry: has joined #ruby
[01:59:31] moeabdol: has joined #ruby
[01:59:52] mattwashere: has joined #ruby
[02:00:36] colegatron_origi: has joined #ruby
[02:02:04] Christina_: has joined #ruby
[02:02:09] AndroidLoverInSF: has joined #ruby
[02:03:13] Christina_: Hey there! New to Ruby and need help with a problem anyone available to help?
[02:05:02] blackmesa: has joined #ruby
[02:05:37] AndroidLoverInSF: has joined #ruby
[02:06:34] AndroidLoverInSF: has joined #ruby
[02:07:42] jenrzzz: has joined #ruby
[02:07:42] jenrzzz: has joined #ruby
[02:08:02] Ebok: has joined #ruby
[02:08:08] nersoh: tell your problem, christina...
[02:08:20] lxsameer: has joined #ruby
[02:08:57] arooni-mobile: has joined #ruby
[02:09:16] arooni-mobile__: has joined #ruby
[02:12:20] dminuoso: has joined #ruby
[02:14:51] kies: has joined #ruby
[02:15:10] ElFerna: has joined #ruby
[02:15:20] A_Drone: has joined #ruby
[02:15:38] hahuang61: has joined #ruby
[02:18:28] singalaut: has joined #ruby
[02:19:02] T2: has joined #ruby
[02:22:22] nankyokusei: has joined #ruby
[02:24:26] shevy: drbrain okies
[02:24:36] shevy: epitron interesting idea
[02:25:24] Mayniac: has joined #ruby
[02:25:28] ged: has joined #ruby
[02:26:08] phrozen77: has joined #ruby
[02:26:09] benlieb: has joined #ruby
[02:29:07] coffeecupp: has joined #ruby
[02:30:36] skalfyfan: has joined #ruby
[02:31:35] cpruitt: has joined #ruby
[02:33:25] djbkd: has joined #ruby
[02:34:06] travisxcode: has joined #ruby
[02:37:53] coffeecupp: has joined #ruby
[02:38:23] travisxcode: Can the sleep method be interrupted at all? I'm trying to create a console application that starts a timer (which counts by the second), and stops when you press enter, displaying the total elapsed time since you started the timer.
[02:38:34] flashpoint9: has joined #ruby
[02:39:32] travisxcode: I am new to Ruby, so I doubt that this is the most optimal way to do it, but I was going to create a variable named 'count' that sleeps for one second, then increments by 1, inside of a while loop.
[02:40:01] skalfyfan: has joined #ruby
[02:40:58] travisxcode: If you have any suggestions as far as program design, I am open to them. Like I said, I'm new and I think this may not be the best way to handle an application such as this one.
[02:42:22] shevy: sigint will interrupt it :D
[02:43:27] shevy: so ctrl-c; you can also use threads to have it count in its own thread and handle the thread execution there
[02:43:38] travisxcode: Thanks shevy, I'll look into sigint. As far as my concept goes, would you consider it pretty solid?
[02:44:31] travisxcode: I'm sure there are a thousand different ways to handle this task, but I was curious as to whether there is a more 'rubyish' way?
[02:44:42] mistermocha: has joined #ruby
[02:44:55] arooni-mobile: has joined #ruby
[02:45:01] arooni-mobile__: has joined #ruby
[02:45:51] shevy: I have no idea if your concept is solid or not
[02:45:59] shevy: you want to do something so that's fine
[02:46:18] shevy: in your case you want to have the user input a newline (which is "press enter" essentially)
[02:46:26] tmtwd: has joined #ruby
[02:46:38] shevy: so you need some way to have a timer, and fetch user input at the same time
[02:47:08] shevy: http://ruby-doc.org/core-2.0.0/IO.html#method-c-select may have an example
[02:47:10] underplank: has joined #ruby
[02:47:29] shevy: I am sure you can adapt the ping/pong to also include a sleep call via some method
[02:49:37] underplank: Hi all. I have some ruby code in a set of files. We have a dsl in each file that is basically function do { params }. I would like to autogenerate these function calls in ruby. Is there anything beyond just string parsing that does this?
[02:50:05] underplank: ie are there libraries around (or core ruby functions) that allow me to generate ruby code?
[02:51:19] wazzat: has joined #ruby
[02:56:02] eizua: has joined #ruby
[03:00:16] xall: has joined #ruby
[03:03:14] coffeecupp: has joined #ruby
[03:05:19] tristanp: has joined #ruby
[03:05:48] blackmesa: has joined #ruby
[03:08:55] gix: has joined #ruby
[03:09:04] zacts: has joined #ruby
[03:13:05] dminuoso: has joined #ruby
[03:13:09] wsewolod: has joined #ruby
[03:14:36] failshell: has joined #ruby
[03:17:15] hahuang61: has joined #ruby
[03:17:42] treaki__: has joined #ruby
[03:22:05] sucks: has joined #ruby
[03:28:47] xue: has joined #ruby
[03:30:17] xue: has joined #ruby
[03:30:47] bkxd: has joined #ruby
[03:31:32] allstar: has joined #ruby
[03:33:00] Caerus|Away: has joined #ruby
[03:34:40] shevy: hmm I am wondering a bit about instance variables
[03:34:59] shevy: I tend to, the larger a project becomes, use quite a lot of instance variables for some (larger) classes
[03:35:18] shevy: so now I am thinking - I could just store them all into one variable like @config, which is a hash or a hash like object instead
[03:35:28] shevy: and get rid of all of them; and query only that hash-like object instead
[03:36:01] Tempesta: has joined #ruby
[03:36:19] xue: has joined #ruby
[03:38:21] sucks: has joined #ruby
[03:41:41] mattwashere: has joined #ruby
[03:42:03] A_Drone: has joined #ruby
[03:42:09] sucks: has joined #ruby
[03:42:29] dopie: has joined #ruby
[03:42:53] A_Drone: has joined #ruby
[03:43:18] zacts: has joined #ruby
[03:45:10] A_Drone: has joined #ruby
[03:47:31] sucks: has joined #ruby
[03:48:36] yadobujo: has joined #ruby
[03:50:04] coffeecupp: has joined #ruby
[03:52:12] dopie: has joined #ruby
[03:52:27] symm-: has joined #ruby
[03:52:47] lxsameer: has joined #ruby
[03:53:54] leea: has joined #ruby
[03:55:56] Polysics: has joined #ruby
[03:56:01] scottalan: has joined #ruby
[03:56:32] hk238: has joined #ruby
[03:56:36] Hobogrammer: has joined #ruby
[03:56:40] dopie: has joined #ruby
[03:58:18] scottalan: I'm new to Ruby and I'm trying to update, or rather, add to an existing Vagrantfile. I'm getting an error: `from /opt/drupalvm/master-env/Vagrantfile:189:in 'eval'` where 189 is referring to this line: `eval File.read "#{host_config_dir}/Vagrantfile.local" if File.exist?("#{host_config_dir}/Vagrantfile.local")`
[03:59:08] scottalan: sorry, I worded that incorrectly. The error is actually
[03:59:08] coffeecupp: has joined #ruby
[03:59:09] scottalan: 189:in `eval': undefined method `[]=' for nil:NilClass (NoMethodError)
[03:59:38] mattwashere: has joined #ruby
[03:59:59] scottalan: I assume it is referring to 'eval' as the method that is undefined, would that be correct?
[04:03:42] A_Drone: has joined #ruby
[04:05:52] shevy: scottalan you have a nil there
[04:06:22] shevy: x = nil; x[] = 'some value' # NoMethodError: undefined method `[]=' for nil:NilClass
[04:06:38] tristanp: has joined #ruby
[04:06:46] gix: has joined #ruby
[04:07:03] daumie: has joined #ruby
[04:07:51] blackmesa: has joined #ruby
[04:08:09] scottalan: shevy: ahh, okay. I missed part of the stacktrace: from (eval):1:in `each'
[04:10:18] scottalan: Here is what I'm trying to iterate over:
[04:10:46] scottalan: case synced_folder['files']
[04:10:46] scottalan: when "/sites/default/files"
[04:11:19] scottalan: errr, that didn't get everything. Going to just post a gist
[04:11:49] coffeecupp: has joined #ruby
[04:13:31] dopie: has joined #ruby
[04:15:06] dminuoso: has joined #ruby
[04:15:18] failshell: has joined #ruby
[04:15:19] scottalan: shevy: So, in this example: https://gist.github.com/scottalan/aa519aa0b7f67d6e7fffbb39cf605d21 would that be referring to "synced_folder"?
[04:15:23] scottalan: for the nil?
[04:16:10] xall: has joined #ruby
[04:18:10] kavanagh: has joined #ruby
[04:18:15] hahuang61: has joined #ruby
[04:18:22] Beverage: has joined #ruby
[04:20:25] shevy: I would use variables and check on these
[04:20:38] shevy: since you expect a certain value, yet you get nil, some error must have happened prior to that already
[04:21:10] shevy: have a look at the hash synced_folder
[04:21:28] shevy: on what line does the nil error occur?
[04:21:34] benlieb: has joined #ruby
[04:23:15] nankyokusei: has joined #ruby
[04:25:12] scottalan: shevy: I updated the gist with more information
[04:25:25] pontiki: has joined #ruby
[04:26:42] scottalan: I really appreciate your help. Basically the file (Vagrantfile) looks for a (Vagrantfile.local) and it should include the contents of that file, correct?
[04:27:32] karapetyan: has joined #ruby
[04:27:57] shevy: I don't know how vagrant works
[04:28:27] shevy: I am also unsure why you have to use eval
[04:29:30] shevy: make sure that your hash contains all the data that you require before you enter vconfig['vagrant_synced_folders'].each do |synced_folder|
[04:29:37] shevy: or alternatively, add safeguards against nils
[04:30:07] triangles2: has joined #ruby
[04:31:04] scottalan: okay, that helps actually. At least a place to start. Much appreciated!
[04:36:42] coffeecupp: has joined #ruby
[04:38:13] rickmasta: has joined #ruby
[04:38:13] travisxcode: has joined #ruby
[04:40:27] akira616: has joined #ruby
[04:42:22] daumie: has joined #ruby
[04:42:33] dkam: has joined #ruby
[04:43:27] dopie: has joined #ruby
[04:44:05] alfiemax: has joined #ruby
[04:45:29] LMity: has joined #ruby
[04:45:37] pawnbox: has joined #ruby
[04:45:43] max2: has joined #ruby
[04:47:38] pawnbox: has joined #ruby
[04:49:10] dminuoso: has joined #ruby
[04:52:47] nlsun: has left #ruby: ("WeeChat 1.5")
[04:53:33] ur5us: has joined #ruby
[04:53:46] dopie: has joined #ruby
[04:55:13] dopie: has joined #ruby
[04:55:32] bluOxigen: has joined #ruby
[04:55:49] daumie: has joined #ruby
[04:57:32] conta: has joined #ruby
[04:59:35] ericsupreme: has joined #ruby
[05:00:00] astrobun_: has joined #ruby
[05:01:41] daumie: has joined #ruby
[05:03:00] dopie: has joined #ruby
[05:03:21] dminuoso: https://github.com/chrislgarry/Apollo-11
[05:03:23] singalaut: has joined #ruby
[05:03:25] dminuoso: Who is up for a kickstarter project?
[05:04:36] atomx: has joined #ruby
[05:05:31] Hyuk: has joined #ruby
[05:06:03] xcesariox: has joined #ruby
[05:06:18] daumie: ACTION raises his hand
[05:06:36] dminuoso: daumie: Great, I was still looking for someone to actually fly it.
[05:06:41] xue: has joined #ruby
[05:07:54] daumie: lol ..I will look at it when my network access is stable
[05:08:13] Dimik--: has joined #ruby
[05:08:29] daumie: has joined #ruby
[05:08:51] blackmesa: has joined #ruby
[05:09:07] djbkd: has joined #ruby
[05:09:26] daumie: dminuoso: Will be a co -pilot or crew?
[05:09:54] dminuoso: daumie: https://github.com/chrislgarry/Apollo-11/issues/3
[05:10:03] willemb: has joined #ruby
[05:10:10] dminuoso: Considering that issue was closed with "WONTFIX", I'm not going to be near the thing.
[05:10:18] vrand: has joined #ruby
[05:11:20] Madplatypus: has joined #ruby
[05:13:53] daumie: dminuoso: Am currently unable to access the internet...will look at it
[05:15:57] A_Drone: has joined #ruby
[05:16:00] mistermocha: has joined #ruby
[05:16:57] symm-: has joined #ruby
[05:17:03] mistermocha: has joined #ruby
[05:18:59] hahuang61: has joined #ruby
[05:19:06] isberg: has joined #ruby
[05:19:28] jenrzzz: has joined #ruby
[05:19:28] jenrzzz: has joined #ruby
[05:19:31] howdoi: has joined #ruby
[05:21:07] macsteps: has joined #ruby
[05:21:37] dopie: has joined #ruby
[05:22:02] yadobujo: has joined #ruby
[05:23:03] dopie: has joined #ruby
[05:26:04] travisxcode: has joined #ruby
[05:26:40] shevy: good thing that you did not need the internet to fly away from planet earth
[05:27:19] aufi: has joined #ruby
[05:27:49] macsteps: has joined #ruby
[05:29:31] yfeldblum: has joined #ruby
[05:31:02] yfeldblum: has joined #ruby
[05:31:34] bkxd: has joined #ruby
[05:44:11] dminuoso: has joined #ruby
[05:46:01] tristanp: has joined #ruby
[05:48:01] Emmanuel_Chanel: has joined #ruby
[05:53:29] flashpoint9: has joined #ruby
[05:54:14] daumie: has joined #ruby
[05:54:33] terlar: has joined #ruby
[05:55:04] Macaveli: has joined #ruby
[05:58:11] ledestin: has joined #ruby
[05:59:20] mistermocha: has joined #ruby
[05:59:35] dopie: has joined #ruby
[05:59:49] aryaching: has joined #ruby
[06:00:21] xlegoman: has joined #ruby
[06:03:11] TomyLobo: has joined #ruby
[06:03:12] dionysus69: has joined #ruby
[06:03:23] dopie: has joined #ruby
[06:03:30] yadobujo: has joined #ruby
[06:04:09] yadobujo: has joined #ruby
[06:07:05] ducklobster: has joined #ruby
[06:07:53] dopie: has joined #ruby
[06:09:37] Hyuk: has joined #ruby
[06:10:32] blackmesa: has joined #ruby
[06:11:35] moeabdol: has joined #ruby
[06:12:20] sucks: has joined #ruby
[06:13:53] Sashimi: has joined #ruby
[06:14:12] A_Drone: has joined #ruby
[06:16:06] failshell: has joined #ruby
[06:16:45] vuoto: has joined #ruby
[06:18:34] priodev: has joined #ruby
[06:18:52] Emmanuel_Chanel: has joined #ruby
[06:19:18] Emmanuel_Chanel: has joined #ruby
[06:21:47] mlehrer: has joined #ruby
[06:22:42] stardiviner: has joined #ruby
[06:24:03] nankyokusei: has joined #ruby
[06:25:54] A_Drone: has joined #ruby
[06:25:59] the_drow: has joined #ruby
[06:26:14] ltp: has joined #ruby
[06:27:55] codecop: has joined #ruby
[06:28:31] firstdayonthejob: has joined #ruby
[06:28:45] daumie: has joined #ruby
[06:32:23] bkxd: has joined #ruby
[06:33:33] Gooer: has joined #ruby
[06:35:50] Polysics: has joined #ruby
[06:36:14] zacts: has joined #ruby
[06:36:40] finnnnnnnnnnn: has joined #ruby
[06:36:45] conta: has joined #ruby
[06:38:33] Hyuk: has joined #ruby
[06:40:50] atomx: has joined #ruby
[06:41:54] Pumukel: has joined #ruby
[06:44:56] xall: has joined #ruby
[06:45:59] travisxcode: has joined #ruby
[06:46:51] hakunin: has joined #ruby
[06:48:47] daumie: has joined #ruby
[06:52:12] diprotic: has joined #ruby
[06:52:12] diprotic: has joined #ruby
[06:59:07] mark_66: has joined #ruby
[06:59:12] burgestrand: has joined #ruby
[06:59:19] dminuoso: has joined #ruby
[07:01:58] Dimik: has joined #ruby
[07:02:54] triangles: has joined #ruby
[07:03:02] blackmesa: has joined #ruby
[07:04:21] AnoHito: has joined #ruby
[07:04:34] dionysus69: has joined #ruby
[07:07:53] jsaak: has joined #ruby
[07:09:53] Sashimi: has joined #ruby
[07:10:46] Pumukel: has joined #ruby
[07:11:44] blaxter: has joined #ruby
[07:12:29] A_Drone: has joined #ruby
[07:13:05] yadobujo: I am trying to see if an interface is there where the minitest tests start (setup) with if system("ifconfig vether33") and it works but also I get the command's output. I tried to dump it with if system("ifconfig vether33 > /dev/null") but the same thing is exported again. Any ideas ?
[07:13:57] edwinvdgraaf: has joined #ruby
[07:15:09] moeabdol1: has joined #ruby
[07:15:39] lkb: has joined #ruby
[07:16:31] daumie: has joined #ruby
[07:18:38] AndroidLoverInSF: has joined #ruby
[07:18:52] tristanp: has joined #ruby
[07:20:53] hahuang61: has joined #ruby
[07:21:52] dminuoso: yadobujo: I think you are trying to use minitest for something minitest is not meant for.
[07:21:58] TomyWork: has joined #ruby
[07:22:07] dminuoso: yadobujo: But that aside, do you just care about the return status?
[07:22:42] yadobujo: dminuoso: no I am just creating and deleting interfaces and I want to be sure they don't exist before running tests
[07:23:05] yadobujo: dminuoso: and yes, I don't want output, just a true/false that system() does
[07:24:38] dminuoso: This works for me: Kernel.system("ifconfig en0 > /dev/null")
[07:24:43] AndroidLoverInSF: has joined #ruby
[07:26:12] jsaak: has joined #ruby
[07:26:59] Pumukel: has joined #ruby
[07:27:40] moeabdol1: has joined #ruby
[07:28:12] dminuoso: yadobujo: Oh, if if fails it does not write to STDOUT but STDERR, so you need to redirect STDERR too.
[07:28:36] biberu: has joined #ruby
[07:28:51] dminuoso: yadobujo: system("ifconfig vether33 > /dev/null 2>&1") should probably do the trick for you.
[07:28:52] yadobujo: kernel? hmm
[07:29:08] dminuoso: yadobujo: Well, that's where system comes from.
[07:29:23] dminuoso: I was just explicit about it, since I majorly dislike how Kernel pollutes global namespace.
[07:29:24] haxrbyte: has joined #ruby
[07:30:09] ponga: has joined #ruby
[07:30:52] yadobujo: dminuoso: awesome. Thank you
[07:31:05] tristanp: has joined #ruby
[07:32:07] Hounddog: has joined #ruby
[07:32:52] antgel: has joined #ruby
[07:32:57] bhrgunatha: has joined #ruby
[07:33:21] jaruga___: has joined #ruby
[07:33:58] jaruga___: has joined #ruby
[07:35:09] Silthias: has joined #ruby
[07:36:39] Polysics: has joined #ruby
[07:37:01] nocco: has joined #ruby
[07:38:38] harfangk: has joined #ruby
[07:39:07] pawnbox: has joined #ruby
[07:41:23] gnufied: has joined #ruby
[07:41:24] aganov: has joined #ruby
[07:43:59] Gooer: has joined #ruby
[07:44:12] LoneHerm_: has joined #ruby
[07:48:06] bkxd: has joined #ruby
[07:48:07] rsc___: has joined #ruby
[07:49:17] anisha: has joined #ruby
[07:49:43] travisxcode: has joined #ruby
[07:50:41] Couch: has joined #ruby
[07:50:49] multi_io: has joined #ruby
[07:52:43] Hyuk: has joined #ruby
[07:53:23] futilegames: has joined #ruby
[07:53:32] edwardly: has joined #ruby
[07:53:32] edwardly: has joined #ruby
[07:54:14] ngw: has joined #ruby
[07:54:52] flashpoint9: has joined #ruby
[07:58:06] jsaak: has joined #ruby
[07:58:47] ur5us: has joined #ruby
[08:00:16] roshanavand: has joined #ruby
[08:00:19] Silthias: has joined #ruby
[08:05:15] hutch34: has joined #ruby
[08:06:19] kgutteridge: has joined #ruby
[08:06:44] harfangk: has joined #ruby
[08:07:37] armyriad: has joined #ruby
[08:07:49] dopie: has joined #ruby
[08:07:55] andikr: has joined #ruby
[08:07:59] Sashimi: has joined #ruby
[08:08:31] terlar: has joined #ruby
[08:11:38] craigp: has joined #ruby
[08:12:00] burgestrand: has joined #ruby
[08:12:26] Macaveli: has joined #ruby
[08:16:48] failshell: has joined #ruby
[08:17:56] tmtwd: has joined #ruby
[08:18:37] atomx: has joined #ruby
[08:19:19] Axy: has joined #ruby
[08:21:30] hahuang61: has joined #ruby
[08:24:09] Es0teric: has joined #ruby
[08:24:58] nankyokusei: has joined #ruby
[08:27:27] auzty: has joined #ruby
[08:27:43] harfangk: has joined #ruby
[08:27:46] senayar: has joined #ruby
[08:27:55] Mia: has joined #ruby
[08:28:36] marr: has joined #ruby
[08:29:55] armyriad: has joined #ruby
[08:33:20] interki: has joined #ruby
[08:35:08] hipertracker: has joined #ruby
[08:36:26] tAn: has joined #ruby
[08:36:29] bweston92: has joined #ruby
[08:39:52] Polysics: has joined #ruby
[08:40:32] jolamb: has joined #ruby
[08:43:40] Mia: has joined #ruby
[08:45:04] workmad3: has joined #ruby
[08:45:32] AlexRussia: has joined #ruby
[08:46:19] Sashimi: has joined #ruby
[08:47:30] anisha_: has joined #ruby
[08:48:11] hck89: has joined #ruby
[08:48:16] travisxcode: has joined #ruby
[08:49:22] blackmesa: has joined #ruby
[08:49:31] Sashimi: has joined #ruby
[08:57:42] LoneHermit: has joined #ruby
[08:58:48] Tristan-Speccy: has joined #ruby
[09:00:16] der-landgraf: has joined #ruby
[09:00:32] jolamb: has joined #ruby
[09:01:42] dionysus69: has joined #ruby
[09:02:15] A_Drone: has joined #ruby
[09:04:10] tvw: has joined #ruby
[09:04:51] tristanp: has joined #ruby
[09:05:18] Kedare: has joined #ruby
[09:06:49] Hyuk: has joined #ruby
[09:07:25] chip_: has joined #ruby
[09:16:23] snowy: has joined #ruby
[09:20:18] blackmesa: has joined #ruby
[09:22:28] bkxd: has joined #ruby
[09:22:30] hahuang61: has joined #ruby
[09:22:33] sergey_makagon: has joined #ruby
[09:22:58] Gooer: has joined #ruby
[09:24:37] xcesariox: has joined #ruby
[09:28:45] karapetyan: has joined #ruby
[09:29:10] Ropeney: has joined #ruby
[09:30:50] karapetyan: has joined #ruby
[09:32:18] A_Drone: has joined #ruby
[09:34:24] harfangk: has joined #ruby
[09:38:18] mdw: has joined #ruby
[09:38:45] yoongkang: has joined #ruby
[09:40:02] jmignault: has joined #ruby
[09:41:23] Polysics: has joined #ruby
[09:42:14] beawesomeinstead: has joined #ruby
[09:45:25] nadir: has joined #ruby
[09:47:42] yoongkang: has joined #ruby
[09:54:08] karapetyan: has joined #ruby
[09:55:02] yoongkang: has joined #ruby
[09:57:45] daffy_duck: has joined #ruby
[09:58:46] karapetyan: has joined #ruby
[09:58:58] yoongkang: has joined #ruby
[09:59:03] LoneHermit: has joined #ruby
[10:00:23] Wildfyr: has joined #ruby
[10:01:23] failshell: has joined #ruby
[10:05:56] karapetyan: has joined #ruby
[10:10:01] A_Drone: has joined #ruby
[10:10:15] Mon_Ouie: has joined #ruby
[10:10:33] pandaant: has joined #ruby
[10:16:36] Hyuk: has joined #ruby
[10:17:35] marsjaninzmarsa: has joined #ruby
[10:19:38] harfangk: has joined #ruby
[10:20:35] DoubleMalt: has joined #ruby
[10:21:15] pawnbox: has joined #ruby
[10:22:15] nennes: has joined #ruby
[10:23:29] pawnbox: has joined #ruby
[10:23:33] hahuang61: has joined #ruby
[10:25:24] johnny56: has joined #ruby
[10:25:42] karapetyan: has joined #ruby
[10:25:50] nankyokusei: has joined #ruby
[10:30:09] A_Drone: has joined #ruby
[10:31:13] freerobby: has joined #ruby
[10:32:32] Es0teric: has joined #ruby
[10:32:44] rstacruz: has joined #ruby
[10:34:41] toretore: has joined #ruby
[10:37:34] Gooer: has joined #ruby
[10:37:54] bluOxigen: has joined #ruby
[10:40:40] tristanp: has joined #ruby
[10:42:53] Polysics: has joined #ruby
[10:47:25] Azure: has joined #ruby
[10:49:56] Mia: has joined #ruby
[10:51:05] armyriad: has joined #ruby
[10:53:02] Axy: has joined #ruby
[10:53:02] Axy: has joined #ruby
[10:57:11] sdothum: has joined #ruby
[10:59:14] yfeldblum: has joined #ruby
[10:59:31] Sashimi: has joined #ruby
[10:59:45] mistermocha: has joined #ruby
[10:59:46] LoneHerm_: has joined #ruby
[11:02:29] failshell: has joined #ruby
[11:05:17] bruce_lee: has joined #ruby
[11:05:17] bruce_lee: has joined #ruby
[11:05:33] pawnbox_: has joined #ruby
[11:09:02] armyriad: has joined #ruby
[11:12:54] rodfersou: has joined #ruby
[11:14:01] Miron: has joined #ruby
[11:15:28] A_Drone: has joined #ruby
[11:15:31] sulky_: has joined #ruby
[11:17:02] armyriad: has joined #ruby
[11:18:20] flashpoint9: has joined #ruby
[11:18:22] Sashimi: has joined #ruby
[11:18:35] nhhc: has joined #ruby
[11:24:03] matp: has joined #ruby
[11:25:20] harfangk: has joined #ruby
[11:25:36] jmignault: has joined #ruby
[11:25:51] A_Drone: has joined #ruby
[11:26:18] last_staff: has joined #ruby
[11:26:55] Es0teric: has joined #ruby
[11:27:38] Es0teric: has joined #ruby
[11:30:25] roshanavnad_: has joined #ruby
[11:30:44] GodFather: has joined #ruby
[11:30:58] Ishido: has joined #ruby
[11:34:19] blackmesa: has joined #ruby
[11:35:34] cajone: has joined #ruby
[11:35:49] Ebok: has joined #ruby
[11:36:33] sergey_m_: has joined #ruby
[11:36:50] armyriad: has joined #ruby
[11:37:55] Pumukel: has joined #ruby
[11:38:02] ldnunes: has joined #ruby
[11:38:11] blackgoat: has joined #ruby
[11:39:39] xiaket: has joined #ruby
[11:39:54] johnmilton: has joined #ruby
[11:41:01] AphelionZ: has joined #ruby
[11:42:17] AphelionZ: hi, can somebody help me with a ruby + heroku deployment. It appears as if my app is not reading the environment variables properly
[11:42:51] dminuoso: AphelionZ: Do you have a Ruby error?
[11:42:53] AphelionZ: I have a block like this --> https://www.irccloud.com/pastebin/1KMrS3mK/
[11:42:54] ruby[bot]: AphelionZ: we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/08a33eefe681fe00313a85a59df643e7
[11:42:54] ruby[bot]: AphelionZ: irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
[11:43:20] AphelionZ: I don't have an error, no... I just have my RACK_ENV set to production
[11:43:25] AphelionZ: and this configure block doesnt seem to be firing
[11:44:10] dminuoso: AphelionZ: How did you set RACK_ENV?
[11:44:15] Hanmac: has joined #ruby
[11:44:24] Polysics: has joined #ruby
[11:45:10] AphelionZ: as a config variable... what's confusing is my production app's config variables are identical
[11:46:24] AphelionZ: https://usercontent.irccloud-cdn.com/file/WtQlNjVp/
[11:47:29] JeanCarloMachado: has joined #ruby
[11:48:25] toretore: AphelionZ: you have to explain better what "doesn't work" means
[11:48:30] AphelionZ: im just not sure where :production is being set, and I'm not familiar enough with Ruby to debug :(
[11:48:51] AphelionZ: The configure block about should execute, it doesnt
[11:48:52] Es0teric: has joined #ruby
[11:49:09] toretore: "doesn't seem to be firing" "not reading the environment variables properly" == "doesn't work"
[11:49:33] toretore: you have to be more specific
[11:50:14] toretore: you are talking about a bunch of variables, explain what they do and where they are used in your code
[11:50:38] AphelionZ: https://gist.github.com/08a33eefe681fe00313a85a59df643e7
[11:50:45] AphelionZ: It's used here, in my application.rb
[11:51:02] toretore: is that the entire file? where is the file from?
[11:51:13] dminuoso: AphelionZ: I would be aggressive about it, and pry into the execution block - and look at the environment.
[11:51:16] augcesar: has joined #ruby
[11:51:17] dkam: has joined #ruby
[11:51:37] AphelionZ: dminuoso: ok.. what is the best practice for debugging in heroku in that manner?
[11:52:05] dminuoso: AphelionZ: Is that script executed inside a shell somehow?
[11:52:22] dminuoso: AphelionZ: If not, https://github.com/Mon-Ouie/pry-remote
[11:52:29] AphelionZ: the procfile has web: bundle exec rake start
[11:52:38] AphelionZ: and then i believe rake is calling puma
[11:53:19] jhass: where did you get whatever this is from?
[11:53:32] nennes: has joined #ruby
[11:53:43] harfangk: has joined #ruby
[11:53:54] AphelionZ: age old story. I inherited this code from two devs who abandoned the project
[11:54:18] AphelionZ: they wanted to use every fancy thing under the sun (the front end is in friggin Dart)
[11:54:36] AphelionZ: and now I'm just trying to fix this deployment issue and I'm getting hung up on this
[11:56:19] AngryBuzzy: has joined #ruby
[11:56:27] jhass: anyway, I agree that you didn't actually properly describe your problem yet
[11:56:46] jhass: something doesn't work and somehow you narrowed it down to that context-free piece of code
[11:57:00] jhass: we can't even judge whether that assessment is right
[11:57:15] synthroid: has joined #ruby
[11:57:26] jhass: note that configure is not a core Ruby method, it could come from wherever
[11:57:39] jhass: we don't even have indications as to where it might come from
[11:58:07] toretore: AphelionZ: explain what you expect to happen, and then what actually happens
[11:58:20] toretore: the first step of any problem solving
[11:58:31] AphelionZ: I expect that block of code within the configure method to execute, based on the value of :production
[11:58:39] AphelionZ: what actually happens is that it does not
[11:58:46] xall: has joined #ruby
[11:58:46] toretore: how do you know that it doesn't?
[11:58:50] toretore: give more details
[11:59:15] AphelionZ: well i know it doesnt because there are s3 URLs on the front end that are populated based on the Paperclip config, that are null
[11:59:24] AphelionZ: so none of my images are loading
[11:59:38] toretore: how do you know that those actually come from this block of code?
[12:00:00] jhass: also "null" is not a well defined ruby value
[12:00:26] AphelionZ: ...is this how the ruby community helps people?
[12:00:30] toretore: you are making assumptions, and there are layers in between where you observe the result and where you think it comes from
[12:00:31] AphelionZ: take a hike, guys
[12:01:31] jhass: we try to find a solution that works for you, not take wild guesses and waste your time with trying them out
[12:01:55] br07030: has joined #ruby
[12:02:01] jhass: if you prefer wild guesses over actual help, then yes we might not come together here
[12:02:51] AphelionZ: well, i havent seen any suggestions besides what dminuoso offered
[12:03:20] dminuoso: AphelionZ: The only thing I offered was the only way to actually figure out whats wrong, so nobody has to guess.
[12:03:30] dminuoso: Well, perhaps not the only way. But one.
[12:04:19] AphelionZ: anyway, I know that block of code is the culprit because i can get the image URLs to resolve locally by moving that Paperclip config out of the config :production do block
[12:05:03] AphelionZ: I have no idea how or where :production is being set - there are only two instances of it in the code base and they are both in similar config blocks
[12:05:12] ngw: has joined #ruby
[12:05:46] tristanp: has joined #ruby
[12:06:19] Sashimi_: has joined #ruby
[12:06:39] umdstu: has joined #ruby
[12:07:05] jhass: 13:51 <toretore> is that the entire file? where is the file from?
[12:07:21] jhass: perhaps its time to answer that question so we get a clue as to where configure might come from
[12:07:59] Rodya_: has joined #ruby
[12:08:16] AphelionZ: alright hang on
[12:08:21] TomyWork: if i include a module containing an initialize method in a class that also contains an initialize method, the module's initialize is overwritten and thus never called. How do I run module-specific code when the class is instantiated?
[12:08:56] AphelionZ: jhass: toretore here's the entire file, as a gist
[12:08:58] jhass: TomyWork: you have to call super in the class'es initialize
[12:08:58] AphelionZ: https://gist.github.com/aphelionz/81fe7872e7da7a2cc51a9a70694a4626
[12:09:22] jhass: TomyWork: or expect the class to implement a foo_initialize which you call from the module's
[12:09:34] jhass: TomyWork: initialize is just a regular method called from Class#allocate
[12:09:52] jhass: #new is #allocate && initialize on the new object
[12:09:54] burgestrand: has joined #ruby
[12:11:09] Hyuk: has joined #ruby
[12:11:41] TomyWork: jhass ok i called super in all the modules and classes and also gave the class a superclass that includes no modules
[12:11:57] TomyWork: now it calls the superclass initialize twice
[12:12:03] jhass: huh, example?
[12:12:16] TomyWork: got an executing bin?
[12:12:32] Mon_Ouie: eval.in executes your code
[12:12:59] TomyWork: https://eval.in/private/4715d38e457cbc
[12:13:28] Mon_Ouie: You wrote Baz.initialize in two places
[12:13:53] TomyWork: https://eval.in/private/444d531a0a06d4 ok now that's better
[12:13:53] unforgiven512: has joined #ruby
[12:14:27] unforgiven512: has joined #ruby
[12:15:00] unforgiven512: has joined #ruby
[12:15:34] unforgiven512: has joined #ruby
[12:16:07] unforgiven512: has joined #ruby
[12:16:26] AphelionZ: jhass: when you get a chance, did you see the file?
[12:16:40] unforgiven512: has joined #ruby
[12:16:56] catphish: has joined #ruby
[12:17:13] unforgiven512: has joined #ruby
[12:17:27] jhass: yeah, currently double checking how sinatra decides whether to yield or not
[12:17:36] jhass: https://github.com/sinatra/sinatra/blob/939ce04c1b77d24dd78285ba0836768ad57aff6c/lib/sinatra/base.rb#L1440
[12:17:47] unforgiven512: has joined #ruby
[12:17:47] nando293921: has joined #ruby
[12:17:54] craigp: has joined #ruby
[12:17:58] jhass: mmh https://github.com/sinatra/sinatra/blob/939ce04c1b77d24dd78285ba0836768ad57aff6c/lib/sinatra/base.rb#L1769
[12:18:01] TomyWork: jhass so what happens here? does include insert the module as a superclass for the class and make that superclass's superclass the original superclass of the class?
[12:18:20] unforgiven512: has joined #ruby
[12:18:30] nando293921: has joined #ruby
[12:18:44] AphelionZ: so :environment should be getting set to 'production' as per my config vars, yes?
[12:18:51] AphelionZ: but what about :production
[12:19:04] AphelionZ: thats whats tripping me up... im not sure how that's set
[12:19:08] jhass: TomyWork: kind of, you can picture method lookup to check each entry of Class#ancestors sequentially and include as an insert into that array (compare .ancestors before and after an include)
[12:20:08] jhass: AphelionZ: :production is a Symbol, it's a value, like the string "production" is a value or the number 23 is one. .to_sym converts a String to a Symbol
[12:20:26] mark_661: has joined #ruby
[12:20:40] AphelionZ: ACTION nods
[12:21:16] AphelionZ: so let me get this straight, that's saying take RACK_ENV if it exists, otherwise, assign :development (a Symbol)
[12:21:29] jhass: I would debug print ENV["RACK_ENV"] and Application.environment
[12:21:53] AphelionZ: and a debug print will show up in heroku logs?
[12:22:14] jhass: and output to stdout or stderr will, yes
[12:22:22] AphelionZ: hey, thank you
[12:22:29] AphelionZ: i'll try this stuff
[12:22:45] jhass: use Kernel#p btw, so just p ENV["RACK_ENV"] etc
[12:23:04] jhass: so you notice any spaces or other weird stuff
[12:23:12] pawnbox: has joined #ruby
[12:26:19] dminuoso: AphelionZ: Or just interactively debug it with pry.
[12:26:39] nankyokusei: has joined #ruby
[12:26:40] dminuoso: And not rely on magical print statements, that require re-execution for every new variable you might be interested in.
[12:28:22] deviation: has joined #ruby
[12:30:54] deviation: has joined #ruby
[12:33:45] TomyWork: instead, rely on a magical debugger that uses black magic to poke into running programs :D
[12:33:59] pawnbox: has joined #ruby
[12:34:49] aupadhye: has joined #ruby
[12:34:53] AphelionZ: lol is it like this all the time in here?
[12:35:04] TomyWork: ruby is magic
[12:35:11] hipertracker: has joined #ruby
[12:35:18] elomatreb: Arguing over things that are pureley personal preference? All the time
[12:35:37] AphelionZ: ruby is love
[12:36:57] dvinciguerra: has joined #ruby
[12:39:20] blackmesa: has joined #ruby
[12:40:01] pawnbox_: has joined #ruby
[12:40:04] eizua: has joined #ruby
[12:41:17] moeabdol1: has joined #ruby
[12:42:09] magicien: has joined #ruby
[12:42:20] pawnbox: has joined #ruby
[12:44:48] moeabdol2: has joined #ruby
[12:45:55] Polysics: has joined #ruby
[12:48:44] Es0teric: has joined #ruby
[12:48:46] pontiki: has joined #ruby
[12:52:26] AphelionZ: jhass: yup... environment is still development
[12:52:53] AphelionZ: ENV['RACK_ENV'] is also development which is O_o because I absolutely did not set that in the config vars
[12:53:08] jhass: well, time to blame heroku?
[12:53:28] stoopidmunkey: has joined #ruby
[12:53:31] jhass: maybe you're looking at the wrong app?
[12:53:57] jhass: AphelionZ: actually, perhaps Dotenv.load screws you over
[12:54:17] jhass: check your .env file whether it explicitly sets RACK_ENV
[12:54:20] failshell: has joined #ruby
[12:54:23] AphelionZ: aha! i think you'ere 100% correct
[12:54:30] AphelionZ: let me check that out
[12:55:09] AphelionZ: yup. RACK_ENV=development in the env file
[12:55:20] jhass: there you go then
[12:55:27] AphelionZ: thanks again
[12:55:41] AphelionZ: i guess i could check to see if ENV['RACK_ENV'] is set
[12:55:46] AphelionZ: and if not, load the .env
[12:55:58] jhass: eh I'd just not set it in the .env file
[12:56:09] jhass: there are fallbacks to development everywhere after all
[12:56:54] jhass: also good example of why I think the dotenv gem is a terrible idea, stuff like that should be setup/environment logic, not application logic
[12:57:06] jhass: I have a zsh plugin for it for example
[12:57:12] AphelionZ: yeah, i see what you're saying
[12:57:18] AphelionZ: it was great when i was working locally
[12:57:24] AphelionZ: but now obviously its messing with my head
[12:57:24] jhass: and deployed stuff just sets it wherever the app is started explicitly
[12:57:52] AphelionZ: if it was built in to Dotenv to ignore already-set variables like I said, that would be nice
[12:58:01] jhass: it probably is
[12:58:14] jhass: by that doesn't correct my design issue with it
[12:59:52] jhass: https://github.com/bkeepers/dotenv/blob/master/lib/dotenv/environment.rb#L21
[13:00:16] jhass: normal load shouldn't override, there#s overload for that
[13:00:24] jhass: eh, s/by/but/
[13:00:41] pontiki: can you use ||= in the .env file?
[13:01:18] jhass: pontiki: https://github.com/bkeepers/dotenv/blob/master/lib/dotenv/parser.rb#L14
[13:01:45] pontiki: never mind
[13:02:01] jhass: perhaps heroku reads a .env file?
[13:02:16] LoneHermit: has joined #ruby
[13:02:32] rstacruz: has joined #ruby
[13:03:39] ramortegui: has joined #ruby
[13:06:21] omphe: has joined #ruby
[13:08:29] Blue_Ice_: has joined #ruby
[13:09:25] PaulCapestany: has joined #ruby
[13:09:57] giz|work: has joined #ruby
[13:11:16] spiette: has joined #ruby
[13:11:24] loocash: has joined #ruby
[13:11:26] pawnbox: has joined #ruby
[13:12:18] treaki__: has joined #ruby
[13:12:43] loocash: has left #ruby: ()
[13:16:23] AphelionZ: jhass: lol environment is development regardless of what I set in .env OR config vars
[13:16:38] AphelionZ: hell is a metaphor. we create hell for ourselves here on earth.
[13:16:47] AphelionZ: thats what I think about this project.
[13:16:48] treaki__: has joined #ruby
[13:18:30] johnny56: has joined #ruby
[13:21:07] treaki__: has joined #ruby
[13:21:33] ljc: has joined #ruby
[13:22:35] ItSANgo: has joined #ruby
[13:22:52] ljc: hey, i'm on mac osx el capitan (10.11.5), and now i'm getting an error when i try to update gems (using `gem update`), where I don't have write permissions for /Library/RubyGems/2.0.0
[13:22:53] ljc: just wondering what the best practice is to now update the gems
[13:24:09] adaedra: install gems as user (--user-install)
[13:24:15] ryez: has joined #ruby
[13:25:17] treaki__: has joined #ruby
[13:26:22] ljc: adaedra: thanks :)
[13:27:06] shinnya: has joined #ruby
[13:30:19] tristanp: has joined #ruby
[13:30:36] nersoh_: has joined #ruby
[13:32:06] malconis: has joined #ruby
[13:34:06] malconis: has joined #ruby
[13:35:15] dfinninger: has joined #ruby
[13:40:58] aegis3121: has joined #ruby
[13:41:33] ljc: has joined #ruby
[13:42:43] cpruitt: has joined #ruby
[13:43:19] Azure: has joined #ruby
[13:43:23] l4v2: has joined #ruby
[13:43:42] jrafanie: has joined #ruby
[13:44:18] darthdiablo: has joined #ruby
[13:45:15] nettoweb: has joined #ruby
[13:45:55] swills: has joined #ruby
[13:46:24] darthdiablo: Good morning - for some reason I cannot for life of me figure out how to read (all at once) from a StringIO CSV object http://ruby-doc.org/stdlib-2.2.0/libdoc/csv/rdoc/CSV.html#class-CSV-label-All+at+Once (except I'm not read from file, or string.. it's a StringIO object)
[13:47:23] Polysics: has joined #ruby
[13:47:29] toretore: CSV.read expects a string with a filename
[13:47:49] nettoweb: hey guys, Im trying to upload an rails app to heroku and I got an error with migration, because I tried to create a table with a reference to a table would be added in next migration. So it tried to add a constraint to related table and it was not created yet, giving an error.
[13:48:18] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[13:48:20] GodFather: has joined #ruby
[13:48:43] ChiefAlexander: has joined #ruby
[13:49:04] dkam: has joined #ruby
[13:49:23] nettoweb: My question is if I have to add these tables before the table with the references?
[13:49:49] darthdiablo: toretore: is there a way to read csv, of StringIO type? It's what I have, generated directly from CSV file (but not written to disk yet).. how do I read that back
[13:50:33] darthdiablo: for example this is what i have in console:
[13:50:35] darthdiablo: irb(main):119:0> string_io => <#CSV io_type:StringIO encoding:US-ASCII lineno:3 col_sep:"," row_sep:"\n" quote_char:"\"" headers:["id", "partner_id", "commission_rate", "partner_short_identifier", "bill_to", "remit_to", "billing_terms", "job_data", "created_at", "updated_at"]>
[13:50:36] icedp: has joined #ruby
[13:50:48] hutch34: has joined #ruby
[13:51:12] toretore: what exactly is the object you have?
[13:51:22] toretore: the StringIO is contained within it
[13:51:41] darthdiablo: .class for the object returns CSV
[13:51:42] toretore: explain what you're trying to do
[13:51:47] darthdiablo: irb(main):120:0> string_io.class => CSV
[13:52:01] toretore: so you already have it then?
[13:52:30] darthdiablo: yeah, i believe i have object with 3 rows in it already, but i cannot seem to figure out how to read rows out of the object
[13:52:51] toretore: explain what you're trying to do
[13:53:26] darthdiablo: explaining what i'm trying to do - yeah, trying to read rows out of the object I already have
[13:53:42] toretore: for what purpose?
[13:53:58] darthdiablo: to stream it toward user. Trying to avoid writing it to disk
[13:54:27] darthdiablo: i have object generated by CSV class.. but I don't want to write it to disk
[13:54:31] toretore: what does it mean to stream it to the user?
[13:54:40] mattwashere: has joined #ruby
[13:54:50] toretore: what does "read the rows out" mean?
[13:55:44] darthdiablo: it's just me wanting to have the console (irb) manually output the rows out of the object I have right now
[13:56:03] darthdiablo: sort of my own "hello world" i'm trying to do with this object but failing
[13:56:10] toretore: that doesn't mean anything
[13:56:38] toretore: i'm asking this because that's how you solve your problem - by accurately describing it
[13:56:58] toretore: you are having the problem in the first place because you can't accurately describe what you want to do
[13:58:02] darthdiablo: the problem simply is this: I need it to iterate over all rows i have inside this "string_io" instance I have, directly in the console session (irb) i'm running right now. that's iall
[13:58:27] toretore: ok, so CSV includes Enumerable
[13:58:57] toretore: Enumerable has an each method, among other things
[13:59:08] Billias: has joined #ruby
[13:59:35] darthdiablo: hmm - sec, trying out .each
[14:00:07] cdg: has joined #ruby
[14:00:38] toretore: what you *actually* want to do is two different things: 1) you want to iterate through the data structure and then print something for each line to the console, and 2) iterate through the data and write it to an output stream in some (i assume) http library
[14:01:11] darthdiablo: yeah - 2) is the eventual thing i want to do. right now all i'm trying to do is 1)
[14:01:22] toretore: the second issue is complicated because it depends, as everything does, on the context
[14:01:26] freerobby: has joined #ruby
[14:01:33] darthdiablo: once I get 1) resolved, i'll move on to 2). Haven't worked with CSV class in the past
[14:03:20] LoneHermit: has joined #ruby
[14:03:42] toretore: io_string.to_a
[14:04:15] toretore: this will do what you want for 1, but it doesn't help you understand how to solve 2
[14:05:13] blackmesa: has joined #ruby
[14:05:33] darthdiablo: 2) is not a problem for me (yet). 2) is simply an answer to one of your questions (what am I trying to do). I didn't realize you wanted to know what I was trying to do in the immediate sense (short-term) - apologies
[14:05:43] colegatron_origi: has joined #ruby
[14:05:56] Hobogrammer: has joined #ruby
[14:06:13] ruby[bot]: has joined #ruby
[14:06:13] ChanServ: +o ruby[bot]
[14:07:08] nando293921: has joined #ruby
[14:07:20] haxrbyte: has joined #ruby
[14:08:16] jrafanie_: has joined #ruby
[14:08:20] macsteps: has joined #ruby
[14:08:37] bluOxigen: has joined #ruby
[14:08:54] bluOxigen: has joined #ruby
[14:10:59] flughafen_: has joined #ruby
[14:12:47] deadnull: has joined #ruby
[14:13:57] GodFather: has joined #ruby
[14:14:56] Gooer: has joined #ruby
[14:15:12] AndyBotwin: has joined #ruby
[14:15:28] eljimmy: has joined #ruby
[14:19:36] SilverKey: has joined #ruby
[14:19:36] mark_66: has joined #ruby
[14:20:06] czerasz: has joined #ruby
[14:20:40] JeanCarloMachado: has joined #ruby
[14:20:57] dvinciguerra: has joined #ruby
[14:22:11] macsteps: has joined #ruby
[14:24:49] depesz: hi. i'm reading data from file that is encoed in utf-8, but ruby treats the data as set of bytes, and for string "żółw" returns length of 7
[14:25:02] depesz: what/how can I change so that data loaded will be "understood" as utf8 encoed?
[14:25:06] apeiros: depesz: ruby treats it the way you tell it to
[14:25:11] Polysics: has joined #ruby
[14:25:13] sdothum: has joined #ruby
[14:25:16] apeiros: which ruby version?
[14:25:28] depesz: apeiros: 2.3
[14:25:40] depesz: I just opened the file, and am reading from it.
[14:25:54] apeiros: if you work with utf-8 exclusively, set your defaults to utf-8: Encoding.default_external and _internal
[14:26:04] apeiros: and for specific cases, see:
[14:26:09] apeiros: &ri File.open
[14:26:09] `derpy: http://ruby-doc.org/core-2.3.1/File.html#method-c-open
[14:26:21] apeiros: oh well…
[14:26:25] apeiros: &ri IO::new
[14:26:25] `derpy: http://ruby-doc.org/core-2.3.1/IO.html#method-c-new
[14:26:58] apeiros: check the option param. there's various options for encoding.
[14:27:00] depesz: reading. trying to understand.
[14:27:13] underplank: has joined #ruby
[14:27:19] apeiros: ok. if you after reading it still have problems, feel free to ask again ;-)
[14:27:35] nankyokusei: has joined #ruby
[14:28:23] chip_: has joined #ruby
[14:28:51] depesz: apeiros: did File.open(path, 'r:UTF-8') but it doesn't seem to help :(
[14:29:17] skalfyfan: has joined #ruby
[14:29:43] toretore: what does file.encoding show?
[14:29:48] tristanp: has joined #ruby
[14:31:07] depesz: moment, I have a problem now, that I can't replicate the problem in smaller program :(
[14:31:54] apeiros: I usually use File.open(path, encoding: "UTF-8"), but yours ought to work. unless I misremember how Encoding.default_internal interacts with a missing explicit int_enc in File.open
[14:32:17] depesz: undefined method `encoding' for #<File:/home/depesz/x.log
[14:32:27] depesz: toretore: that's for calling file.encoding
[14:32:47] xcesariox: has joined #ruby
[14:33:04] toretore: probably external|internal_encoding
[14:33:13] apeiros: depesz: .external_ and .internal_encoding
[14:33:21] roflovski: has joined #ruby
[14:33:37] roflovski: hhhhhhhhhhheeeeeeeeeeeeeeeeeeeeelllllllllllllllllllllllllllllloooooooooooooooooooooooooooooooooooooooooooo eeeeeeeeeeeeeeeeeeeevvvvvvvvvvvvvveeeeeeeeeeeeeerrrrrrrrrrryyyyyyyyyyooooooooooonnnnnnnnnnneeeeeeeeeeeeee
[14:33:58] apeiros: .encoding is only on strings. IOs have 2 encodings (ext_enc and int_enc)
[14:34:00] adaedra: owowow, calm down
[14:34:04] depesz: toretore / apeiros : external utf-8, internal: empty
[14:34:07] ruby[bot]: -bb $a:xuin$#ruby-banned xuin!*@*$#ruby-banned
[14:34:24] apeiros: depesz: ok, with 2.3, that should produce a utf-8 string on read. how do you read the file?
[14:34:28] depesz: i wonder, could it be because I use read_nonblock ?
[14:34:35] depesz: ^^ apeiros
[14:34:41] depesz: I use read_nonblock on the files
[14:34:44] apeiros: possible, since that's probably byte based
[14:34:55] apeiros: so it can't guarantee complete sequences
[14:35:19] depesz: ok. this makes sense. is there any way I can convert text, when I'm reasonably-sure(ish) that the data is complete, to utf8 ?
[14:35:20] toretore: depesz: then you should check .encoding on the resulting string
[14:35:21] apeiros: read_nonblock for a local file rarely ever makes sense, though
[14:35:25] roflovski: wwwwwwwwwwwwwwwhhhhhhhhhhhhhhhhhhaaaaaaaaaaaaaaaaaattttttttttttttttttt iiiiiiiiiiiisssssssssssssssss tttttttttttttttthhhhhhhhhhhhhhheeeeeeeeeeeeeee bbbbbbbbbbbbbbbbbbeeeeeeeeeeeeeeeesssssssssssssssssttttttttttttttt bbbbbbbbbbbbbbbbbboooooooooooooooooookkkkkkkkkkkkkkkkkkkkk ooooooooooooooooooonnnnnnnnnnnnnnnnnnnnnn rrrrrrrrrrrrrrrrrrrrrruuuuuuuuuuuuuuuuuuuuuuuuuuuubbbbbbbbbbbbbbbbbbbbbbbbyyyyyyy
[14:35:25] roflovski: yyyyyyyyyyyyyy tttttttttttttttthhhhhhhhhhhhhhhhhhhhaaaaaaaaaaaaaaaaaaaaatttttttttttttttttttttttttttt hhhhhhhhhhhhhhhhhhhhaaaaaaaaaaaaaaaaaaaaaaaaaaasssssssssssssssssssssssss pppppppppppppppppppppprrrrrrrrrrrrrrrrrroooooooooooooooooojjjjjjjjjjjjjjjjjjjeeeeeeeeeeeeeeeecccccccccccccccccttttttttttttttttssssssssssssssss
[14:35:29] apeiros: !spam roflovski
[14:35:30] ruby[bot]: +bb roflovski!*@*$#ruby-banned *!*@99-181-20-181.lightspeed.rcsntx.sbcglobal.net$#ruby-banned
[14:35:30] ruby[bot]: ruby[bot] kicked roflovski: is a bannable offense, see http://ruby-community.com/pages/user_rules
[14:35:56] depesz: apeiros: i'm doing basically fail -f on multiple files, and reading data as it appears.
[14:36:06] adaedra: someone should check their key repetition rate setting.
[14:36:15] apeiros: depesz: ok
[14:36:39] apeiros: depesz: in that case, you'll probably have to manually ensure the read block is complete and set its encoding to utf-8
[14:36:49] depesz: toretore: /ASCII-8BIT/
[14:36:54] toretore: there you go
[14:37:08] depesz: apeiros: ok. how do I do it? I am sure that the data is correct utf8 - how do I convince ruby about it ?
[14:37:09] apeiros: and yepp, read_nonblock produces binary strings because it is byte based. just checked.
[14:37:19] apeiros: depesz: no, you are not sure the data is correct utf-8 :-p
[14:37:30] toretore: depesz: you can force_encoding('UTF-8') if you know that it's UTF-8
[14:37:36] apeiros: depesz: you are sure the data is *eventually* correct utf-8. but the *chunks* you read my be invalid at the tail.
[14:37:37] depesz: apeiros: i am. i write the data.
[14:37:43] toretore: and probably make sure to read entire lines before output
[14:37:44] depesz: apeiros: yes, and I split the chunks
[14:37:45] apeiros: depesz: you still aren't.
[14:37:53] depesz: and return only the chunks to further processing - basically each line
[14:37:57] apeiros: doesn't matter. unless you controll *all* the buffering, you are not.
[14:38:05] dionysus69: has joined #ruby
[14:38:16] depesz: each read_nonblock adds data to buffer, then I split the buffer by line, and work only on full lines.
[14:38:18] apeiros: .force_encoding('utf-8') as toretore said, and .valid_encoding? to check whether the chunk is valid.
[14:38:34] dminuoso: has joined #ruby
[14:38:43] depesz: apeiros: i guess in my case, I can be sure that the encoding is correct, because I never work on incomplete character from input.
[14:38:45] toretore: splitting on newline should be reasonably safe
[14:38:57] apeiros: splitting on newline in utf-8 is safe.
[14:39:01] depesz: so, apeiros, yes - I can be sure :)
[14:39:04] apeiros: all sequences are hi-byte
[14:39:12] rippa: has joined #ruby
[14:39:24] apeiros: depesz: yeah, *after* the postprocessing part (splitting by line) :-p
[14:39:33] apeiros: but not after a pure read_nonblock
[14:39:44] _Gooer: has joined #ruby
[14:39:46] depesz: EYS> force_encoding worked like a charm. great.
[14:40:03] depesz: now I just need to figure out why the script ignores last "line" from input
[14:40:24] toretore: because there is no newline?
[14:40:55] toretore: newline || eof
[14:41:09] depesz: toretore: nah, it's "line", not *line*.
[14:41:21] apeiros: literal "line" I guess
[14:41:25] xall: has joined #ruby
[14:41:28] depesz: each "line" to be shown is actually 3 lines from input file.
[14:41:38] depesz: i see the script reads them, but doesn't print last "line"
[14:41:39] apeiros: or maybe not
[14:42:03] depesz: these 3 lines from input, get aprsed into some hash, and then printing shows information as single line of output.
[14:42:07] toretore: maybe the "line" is 2 lines? who knows, we're talking about imaginary code here
[14:42:32] depesz: no, it is 3 lines input, saw, tested, see it even being added to "queue", but it just doesn
[14:42:36] depesz: no, it is 3 lines input, saw, tested, see it even being added to "queue", but it just doesn't print it.
[14:42:47] depesz: well, it's my fault, some logic is broken in the script - i'll fix it :)
[14:43:32] al2o3-cr: has joined #ruby
[14:45:46] depesz: i'm so stupid. all works as expected, and correctly.
[14:45:53] depesz: thanks again for the help.
[14:47:22] yardenbar: has joined #ruby
[14:48:18] alfiemax: has joined #ruby
[14:51:09] Contigi777: has joined #ruby
[14:53:37] hahuang61: has joined #ruby
[14:57:11] Macaveli: has joined #ruby
[14:58:47] harfangk: has joined #ruby
[15:00:48] JeanCarloMachado: has joined #ruby
[15:00:55] ChiefAlexander: has joined #ruby
[15:04:08] blackmesa: has joined #ruby
[15:04:37] tvsutton: has joined #ruby
[15:05:40] aegis3121: has joined #ruby
[15:05:42] polishdub: has joined #ruby
[15:05:58] bluOxigen: has joined #ruby
[15:06:50] Madplatypus: has joined #ruby
[15:09:12] SilverKey: has joined #ruby
[15:09:32] mikecmpbll: has joined #ruby
[15:13:40] jrafanie: has joined #ruby
[15:14:38] Es0teric: has joined #ruby
[15:15:19] Es0teric: has joined #ruby
[15:15:24] fmcgeough: has joined #ruby
[15:15:50] Sashimi: has joined #ruby
[15:18:38] macsteps: has joined #ruby
[15:19:09] Wildfyr: has joined #ruby
[15:19:09] aupadhye: has joined #ruby
[15:19:09] Wildfyr: has joined #ruby
[15:19:20] ybart: has joined #ruby
[15:19:54] imperator: has joined #ruby
[15:20:05] Robtop__: has joined #ruby
[15:20:50] mdw: has joined #ruby
[15:20:59] lxsameer: has joined #ruby
[15:21:23] freerobby: has joined #ruby
[15:21:30] stardiviner: has joined #ruby
[15:22:30] cschneid_: has joined #ruby
[15:29:48] tokynet: has joined #ruby
[15:30:34] treaki: has joined #ruby
[15:33:52] TomyLobo: has joined #ruby
[15:35:41] xall: has joined #ruby
[15:40:11] theRoUS: has joined #ruby
[15:40:11] theRoUS: has joined #ruby
[15:43:01] tristanp: has joined #ruby
[15:45:50] disconnekted: has joined #ruby
[15:46:23] jrafanie: has joined #ruby
[15:46:23] Vingador: has joined #ruby
[15:49:27] yadobujo: has joined #ruby
[15:50:15] GinoMan2440: has joined #ruby
[15:54:56] [Butch]: has joined #ruby
[15:56:40] amclain: has joined #ruby
[15:56:54] Rodya_: has joined #ruby
[15:56:55] aryaching: has joined #ruby
[15:59:13] skalfyfan: has joined #ruby
[15:59:39] leea: has joined #ruby
[16:01:22] colegatron_origi: has joined #ruby
[16:03:32] dfinninger: has joined #ruby
[16:04:50] LoneHermit: has joined #ruby
[16:05:29] neohunter: has joined #ruby
[16:06:09] synthroid: has joined #ruby
[16:06:14] nettoweb: has joined #ruby
[16:07:28] moeabdol2: has joined #ruby
[16:07:33] neohunter: has joined #ruby
[16:09:11] nando293921: has joined #ruby
[16:10:28] karapetyan: has joined #ruby
[16:12:44] troulouliou_div2: has joined #ruby
[16:13:04] JakFrist: has joined #ruby
[16:14:45] imperator: has left #ruby: ("Leaving")
[16:16:07] snowy: has joined #ruby
[16:16:45] ledestin: has joined #ruby
[16:18:13] xcesariox: has joined #ruby
[16:23:11] croberts_: has left #ruby: ("http://quassel-irc.org - Chat comfortably. Anywhere.")
[16:23:34] dfinning_: has joined #ruby
[16:24:32] mistermocha: has joined #ruby
[16:24:54] croberts: has joined #ruby
[16:26:59] tristanp: has joined #ruby
[16:27:17] smathy: has joined #ruby
[16:28:22] nankyokusei: has joined #ruby
[16:28:54] mattwashere: has joined #ruby
[16:29:54] xall: has joined #ruby
[16:30:19] nersoh: has joined #ruby
[16:31:14] The_Phoenix: has joined #ruby
[16:31:14] aupadhye: has joined #ruby
[16:31:23] pawnbox: has joined #ruby
[16:34:26] mistermocha: has joined #ruby
[16:34:34] jakkn: has joined #ruby
[16:35:16] shakes: has joined #ruby
[16:35:37] mistermo_: has joined #ruby
[16:38:29] dvinciguerra_: has joined #ruby
[16:38:37] jakkn: hello, I'm working on a Rakefile and need a rule that adds an extension to a FileList. FileList.ext('baz') will make foo.bar into foo.baz, but I'm looking for foo.bar.baz
[16:39:52] Gooer: has joined #ruby
[16:40:11] djbkd: has joined #ruby
[16:41:06] davedev24: has joined #ruby
[16:41:25] bfrizzle: has joined #ruby
[16:41:41] jhass: .map {|p| p << '.baz' }
[16:41:41] jakkn: I spent the last two days on this but I'm getting nowhere. I tried appending with FileList.sub but failed to understand how to reference capture groups
[16:42:01] spudowiar: has joined #ruby
[16:42:05] skweek: has joined #ruby
[16:42:34] mattwashere: has joined #ruby
[16:44:05] jakkn: wow that did it.. so simple.
[16:44:25] jhass: mh perhaps better + instead of <<
[16:45:10] jakkn: + didn't work
[16:46:08] hightower2: has joined #ruby
[16:46:40] astrobunny: has joined #ruby
[16:46:50] tomchapin: has joined #ruby
[16:47:07] blandflakes: has joined #ruby
[16:47:09] jhass: mh, the provided methods do the kinda weird construct of x.inject(x.class.new) {|res, fn| res << fn + 'baz' }
[16:47:22] conta: has joined #ruby
[16:47:28] jhass: I guess .sub(/$/, '.baz') could work too
[16:48:44] aupadhye: has joined #ruby
[16:54:53] ascarter: has joined #ruby
[16:57:12] JeanCarloMachado: has joined #ruby
[16:58:04] jakkn: any idea which method would perform better?
[16:59:07] jhass: my first suggestion is actually dangerous
[16:59:26] sepp2k: has joined #ruby
[16:59:50] jhass: the second probably performs better than the third, though I'd rewrite it with each_with_object
[17:00:34] jhass: but pick the most understandable to you one, until you prove a bottleneck
[17:01:04] jakkn: how is it dangerous?
[17:01:21] jhass: String#<< modifies the receiver, it doesn't return a copy
[17:02:22] jakkn: ah so that explains what I was currently trying to figure out
[17:02:38] aegis3121: has joined #ruby
[17:02:54] jakkn: suddenly the original list was not matching with what it used to
[17:04:14] conta: has joined #ruby
[17:05:38] SilverKey: has joined #ruby
[17:06:30] JeanCarloMachado: has joined #ruby
[17:07:31] diegoviola: has joined #ruby
[17:10:30] cdg: has joined #ruby
[17:11:14] lxsameer: has joined #ruby
[17:12:01] macsteps: has joined #ruby
[17:12:29] centrx: has joined #ruby
[17:14:40] kgutteridge: has joined #ruby
[17:15:01] zeroDi: has joined #ruby
[17:16:42] hahuang65: has joined #ruby
[17:17:26] nettoweb: has joined #ruby
[17:17:29] ChiefAlexander: has joined #ruby
[17:17:39] alfiemax: has joined #ruby
[17:18:19] whathappens: has joined #ruby
[17:18:57] sneakers: has joined #ruby
[17:19:26] mikecmpbll: has joined #ruby
[17:20:16] rcvalle: has joined #ruby
[17:21:00] krobzaur: has joined #ruby
[17:21:02] firstdayonthejob: has joined #ruby
[17:21:54] chip_: has joined #ruby
[17:21:58] krobzaur: has joined #ruby
[17:23:33] aegis3121: has joined #ruby
[17:23:45] JeanCarloMachado: has joined #ruby
[17:24:12] scootsmcgoots: has joined #ruby
[17:25:21] Drakx: has joined #ruby
[17:27:35] xid: has joined #ruby
[17:31:26] SilverKey: has joined #ruby
[17:32:43] elifoster: has joined #ruby
[17:36:02] SCHAAP137: has joined #ruby
[17:38:37] Rodya_: has joined #ruby
[17:39:00] edwinvdgraaf: has joined #ruby
[17:39:32] jenrzzz: has joined #ruby
[17:39:32] jenrzzz: has joined #ruby
[17:39:54] scootsmcgoots: has left #ruby: ()
[17:44:11] spudowiar: has joined #ruby
[17:45:07] yadobujo: has joined #ruby
[17:46:31] xid: is there string interpolation syntax that replaces a string object that is undefined, nil or empty?
[17:46:51] skalfyfan: has joined #ruby
[17:47:36] apeiros: a string object can't be undefined or nil
[17:47:47] apeiros: it can't be undefined because that doesn't exist
[17:47:53] apeiros: it can't be nil because then it isn't a string object
[17:48:12] leea: why not interpolate the nil/undefined/empty?
[17:48:14] apeiros: and string interpolation invokes to_s on the expression to interpolate
[17:48:34] apeiros: >> "A#{nil}B"
[17:48:36] ruby[bot]: apeiros: # => "AB" (https://eval.in/604814)
[17:48:45] nando293921: has joined #ruby
[17:49:31] apeiros: if by replace you mean "use another string instead": you can simply use ||
[17:49:59] jenrzzz: has joined #ruby
[17:50:08] apeiros: >> x = nil; default = "(x is nil)"; "A#{x || default}B"
[17:50:09] ruby[bot]: apeiros: # => "A(x is nil)B" (https://eval.in/604815)
[17:50:52] pard: has joined #ruby
[17:51:20] pard: is there any reason the expression '[print 12]' is not a valid one actually?
[17:51:48] kriskropd: has joined #ruby
[17:52:08] leea: >> '[print 12]'
[17:52:21] leea: identify leea Simple Password
[17:52:26] leea: oops lol
[17:53:01] pard: leea, thanks; i meant the expression without 's
[17:53:19] pard: >> [print 12]
[17:53:20] ruby[bot]: pard: # => /tmp/execpad-d37e549f3c39/source-d37e549f3c39:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/604817)
[17:53:21] Oclair_: has joined #ruby
[17:53:30] leea: what are you trying to do?
[17:53:32] tristanp: has joined #ruby
[17:53:37] leea: [] is syntax for an array
[17:53:58] Mon_Ouie: Not sure why this doesn't, but [print(12)] works
[17:54:10] pard: leea, thanks; i was just being interested :)
[17:54:22] pard: Mon_Ouie, thanks :)
[17:54:27] leea: oh ok i think i see what you're asking
[17:54:33] nankyokusei: has joined #ruby
[17:54:37] leea: maybe it has to do with the order things are evaluated
[17:55:04] Mon_Ouie: Maybe it has something to do with the ambiguity of multiple parameters vs. multiple elements in the array if you add a comma afterwards ([print 12, 3] could be [print(12), 3] or [print(12, 3)])
[17:55:39] maloik: has joined #ruby
[17:56:18] deadnull: has joined #ruby
[17:56:27] pard: still i thought may be there is an 'default' behaviour which would have enabled the syntax above
[17:56:35] pard: >> print print 12, 12
[17:56:36] ruby[bot]: pard: # => 1212nil (https://eval.in/604818)
[17:56:46] hahuang61: has joined #ruby
[17:57:05] karapetyan: has joined #ruby
[17:58:05] xid: apeiros++
[17:58:07] pard: print print 12, 12 could've also been 'print(print(12,12))' or print((print(12)), 12)
[17:58:54] pard: i just thought the same intuition also applies to [print 12, 12]
[18:01:04] nando293921: has joined #ruby
[18:01:28] tristanp: has joined #ruby
[18:02:09] ChiefAlexander: has joined #ruby
[18:02:22] isberg_: has joined #ruby
[18:02:28] kirun: has joined #ruby
[18:02:31] conta: has joined #ruby
[18:03:19] Mon_Ouie: Interestingly this used to work in 1.8
[18:03:36] JakFrist: has joined #ruby
[18:04:33] yfeldblum: has joined #ruby
[18:05:16] jrafanie: has joined #ruby
[18:06:00] LoneHerm_: has joined #ruby
[18:06:15] karapetyan: has joined #ruby
[18:12:08] dfinninger: has joined #ruby
[18:13:17] dfinninger: has joined #ruby
[18:13:19] hutch34: has joined #ruby
[18:14:02] VeryBewitching: has joined #ruby
[18:14:30] sumobob: has joined #ruby
[18:14:31] xid: i forgot i can write ruby within string interpolation blocks
[18:15:24] karapetyan: has joined #ruby
[18:16:41] catphish: has joined #ruby
[18:17:41] mattwashere: has joined #ruby
[18:17:57] catphish: is there a simple syntax to create a binary string with arbitrary octets in it? i know for example "\0" will work, but can one do this for any value?
[18:18:03] singalaut: has joined #ruby
[18:18:21] catphish: for longer strings, i'd use pack, but i'd quite like a shorthand
[18:21:14] Mon_Ouie: You can use \xXX to write bytes in hexadecimal
[18:21:27] catphish: thnks, literally just found it too
[18:21:40] catphish: "\xNN" is perfect
[18:24:13] roshanavnad_: has joined #ruby
[18:25:00] spider-mario: has joined #ruby
[18:26:06] ramfjord: has joined #ruby
[18:26:25] memorasus: has joined #ruby
[18:29:05] JakFrist: has joined #ruby
[18:29:17] eljimmy: has joined #ruby
[18:31:38] jackjackdripper: has joined #ruby
[18:32:20] sol: has joined #ruby
[18:32:52] mattwashere: has joined #ruby
[18:33:02] aef: has joined #ruby
[18:33:05] miqlas-H: has joined #ruby
[18:33:55] whathappens: has joined #ruby
[18:34:25] nando293921: has joined #ruby
[18:36:29] A_Drone: has joined #ruby
[18:37:10] Rutix`away: has joined #ruby
[18:37:10] Rutix`away: has joined #ruby
[18:37:22] flughafen_: has joined #ruby
[18:37:40] miqlas-H: has joined #ruby
[18:37:43] pawnbox: has joined #ruby
[18:38:25] blandflakes: has joined #ruby
[18:38:36] Oclair: has joined #ruby
[18:40:11] nando294021: has joined #ruby
[18:40:40] ChiefAlexander: has joined #ruby
[18:41:03] akira616: has joined #ruby
[18:41:59] zacts: has joined #ruby
[18:42:20] Xiti: has joined #ruby
[18:45:38] bluOxigen: has joined #ruby
[18:47:02] [Butch]: has joined #ruby
[18:47:39] DoubleMalt: has joined #ruby
[18:50:15] mistermocha: has joined #ruby
[18:55:33] yfeldblum: has joined #ruby
[18:55:42] Pumukel: has joined #ruby
[18:55:58] shinnya: has joined #ruby
[18:56:50] c355E3B: has joined #ruby
[18:57:03] nankyokusei: has joined #ruby
[18:58:27] mistermocha: has joined #ruby
[19:00:53] mistermocha: has joined #ruby
[19:02:54] tristanp: has joined #ruby
[19:02:55] Spami: has joined #ruby
[19:03:03] Dimik: has joined #ruby
[19:04:41] sucks: has joined #ruby
[19:05:00] tristanp_: has joined #ruby
[19:05:12] gregf: has joined #ruby
[19:05:13] blackmesa: has joined #ruby
[19:05:17] dionysus69: has joined #ruby
[19:05:37] mistermocha: has joined #ruby
[19:07:07] nando293921: has joined #ruby
[19:07:09] LoneHermit: has joined #ruby
[19:14:26] Sashimi: has joined #ruby
[19:15:25] skalfyfan: has joined #ruby
[19:15:29] freerobby: has joined #ruby
[19:20:02] memorasus: has joined #ruby
[19:20:10] jrafanie: has joined #ruby
[19:22:24] zacts: has joined #ruby
[19:25:47] tvon: has joined #ruby
[19:30:29] tvw: has joined #ruby
[19:32:37] Madplatypus: has joined #ruby
[19:34:35] chip_: has joined #ruby
[19:36:00] tomchapin: has joined #ruby
[19:37:54] eric_crane: has joined #ruby
[19:38:10] mistermocha: has joined #ruby
[19:38:57] symm-: has joined #ruby
[19:39:08] SilverKey: has joined #ruby
[19:40:29] djbkd: has joined #ruby
[19:42:34] zacts: has joined #ruby
[19:44:10] jenrzzz: has joined #ruby
[19:45:35] djbkd: has joined #ruby
[19:45:51] al2o3-cr: has joined #ruby
[19:48:21] flughafen_: has joined #ruby
[19:48:47] tristanp: has joined #ruby
[19:49:17] Atomic2: has joined #ruby
[19:49:55] AlexRussia: has joined #ruby
[19:52:34] whathappens: has joined #ruby
[19:55:17] dfinninger: has joined #ruby
[19:55:59] dfinninger: has joined #ruby
[19:56:13] tristanp: has joined #ruby
[19:56:34] blandflakes: has joined #ruby
[19:56:54] craigp_: has joined #ruby
[19:57:17] zapata: has joined #ruby
[19:58:47] Atomic2: has joined #ruby
[19:59:17] dfinninger: has joined #ruby
[20:00:53] karapetyan: has joined #ruby
[20:01:09] eljimmy: has joined #ruby
[20:03:15] craigp_: has joined #ruby
[20:11:10] DoubleMalt: has joined #ruby
[20:11:18] martxel: has joined #ruby
[20:12:32] highbass: has joined #ruby
[20:13:02] Sashimi: has joined #ruby
[20:15:23] yadobujo: has joined #ruby
[20:15:26] mistermocha: has joined #ruby
[20:17:05] zacts|pi: has joined #ruby
[20:17:25] JakFrist: has joined #ruby
[20:18:18] ChiefAlexander: has joined #ruby
[20:18:31] mistermocha: has joined #ruby
[20:19:38] whathappens: has joined #ruby
[20:20:16] mistermocha: has joined #ruby
[20:20:36] craigp_: has joined #ruby
[20:23:30] bmurt: has joined #ruby
[20:24:32] tomchapin: has joined #ruby
[20:24:58] A_Drone: has joined #ruby
[20:26:52] omphe: has joined #ruby
[20:27:01] weaksauce: has joined #ruby
[20:29:33] JeanCarloMachado: has joined #ruby
[20:32:56] yadobujo: has joined #ruby
[20:33:24] Cohedrin: has joined #ruby
[20:35:57] ascarter: has joined #ruby
[20:38:19] LBRapid: has joined #ruby
[20:42:08] Dexx1_: has joined #ruby
[20:42:18] Dexx1_: How do I fix this error? "../usr/lib/ruby/vendor_ruby/liquid/htmltags.rb:43: warning: duplicated key at line 46 ignored: "index0".." ?
[20:43:47] shevy: Dexx1_ can you publish the source?
[20:45:06] yqt: has joined #ruby
[20:45:51] finnnnnnnnnnn: has joined #ruby
[20:46:00] apeiros: it means you have a hash literal with the same key multiple times in it
[20:46:05] apeiros: like: {a: 1, a: 2}
[20:48:27] spudowiar: has joined #ruby
[20:48:53] minimalism: has joined #ruby
[20:49:25] zacts|pi: has joined #ruby
[20:52:38] tristanp: has joined #ruby
[20:53:29] Dexx1_: apeiros: how do I fix that?
[20:53:58] apeiros: a hash can't have the same key twice, so remove the keys which occur multiple times
[20:54:21] Dexx1_: apeiros: where exactly do I do this? I am just trying to get jekyll working..
[20:55:16] apeiros: ruby told you where: "../usr/lib/ruby/vendor_ruby/liquid/htmltags.rb:43
[20:55:27] apeiros: also, that's a warning, not an error
[20:55:32] apeiros: it won't stop your app from running
[20:55:35] Dexx1_: apeiros: this is the full error(s): http://pastebin.com/JueD8ser
[20:55:36] ruby[bot]: Dexx1_: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/5dc077c2de67a0b2775ebb4947d799b8
[20:55:37] ruby[bot]: Dexx1_: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[20:55:59] havenwood: Dexx1_: https://github.com/Shopify/liquid/commit/0e98b296656eacc17f2dbcdb784d7308ef0591e6
[20:56:00] apeiros: mhm, your error is the one on the next line
[20:56:07] TheHodge: has joined #ruby
[20:56:15] aegis3121: has joined #ruby
[20:56:42] apeiros: and the error there means you need iconv
[20:57:04] apeiros: which also means you should file a bug report to whichever thing depends on iconv and doesn't add it as a dependency
[20:57:24] apeiros: (might also be that it's just plain f'ing old, since you don't need iconv anymore for almost anything as of ruby 1.)
[20:57:54] nankyokusei: has joined #ruby
[20:57:55] Dexx1_: apeiros: allegedly I have ruby 2.1
[20:58:08] Dexx1_: Fixed the duplicate key issue. How do I fix this iconv thing..
[20:58:27] hipertracker_: has joined #ruby
[20:58:56] jmignault: has joined #ruby
[20:59:33] hahuang61: has joined #ruby
[21:00:13] apeiros: this feels like spoonfeeding
[21:00:39] Dexx1_: Sorry, Noob here.
[21:00:46] apeiros: gem install iconv
[21:01:06] Dexx1_: damn, permission error.. let me see
[21:01:20] drewo: has joined #ruby
[21:01:47] marsjaninzmarsa: has joined #ruby
[21:02:11] postmodern: has joined #ruby
[21:04:20] ramfjord: has joined #ruby
[21:04:46] Dexx1_: apeiros: I get this: https://gist.github.com/anonymous/162086aac08ca759a47f0924d16b0cf2
[21:05:16] apeiros: let me guess - you're using apt?
[21:05:20] troulouliou_div2: has joined #ruby
[21:07:09] Dexx1_: apeiros: I used 'sudo gem install iconv' -- but yes, I am on a ubuntu based distro
[21:07:22] havenwood: Dexx1_: sudo apt-get install ruby-dev
[21:07:50] Dexx1_: havenwood: seems like I already have it..
[21:08:12] LoneHermit: has joined #ruby
[21:09:05] workmad3: has joined #ruby
[21:09:22] havenwood: Dexx1_: Is that for the Ruby you're currently using? What do you get for?: update-alternatives --display ruby
[21:09:49] tristanp: has joined #ruby
[21:10:08] SCHAAP137: has joined #ruby
[21:10:08] Dexx1_: havenwood: https://gist.github.com/anonymous/57cd11c548b4ec726399475f5af30046
[21:10:22] havenwood: Dexx1_: Brightbox maintains up-to-date Ruby package for Ubuntu if you tire of the default apt packages: https://www.brightbox.com/docs/ruby/ubuntu/
[21:11:22] havenwood: Dexx1_: I think you have the dev package installed for the ruby1.9.1 but as you can see ^ you're using Ruby 2.2 at the moment
[21:12:12] Dexx1_: havenwood: I see, so I need to figure out how to install the dev package for 2.1?
[21:12:22] havenwood: Dexx1_: Try?: sudo apt-get install ruby2.2-dev
[21:12:50] blackgoat: has joined #ruby
[21:12:59] havenwood: Dexx1_: 2.2.1*
[21:14:00] whathappens: has joined #ruby
[21:14:21] Dexx1_: havenwood: done
[21:14:30] GinoManWorks: has joined #ruby
[21:14:45] Dexx1_: havenwood: great. iconv worked
[21:15:22] Dexx1_: Now getting: /usr/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- posix_spawn_ext (LoadError)
[21:16:52] havenwood: Dexx1_: gem pristine posix-spawn
[21:17:09] Dexx1_: k let me see
[21:17:36] Rodya_: has joined #ruby
[21:17:43] Dexx1_: k. Thanks. No errors. Now i need to figure out why Jekyll is not rendering css
[21:20:52] Rodya__: has joined #ruby
[21:22:25] nersoh: has joined #ruby
[21:23:19] ascarter: has joined #ruby
[21:25:18] roamingd_: has joined #ruby
[21:26:38] tristanp: has joined #ruby
[21:27:18] roamingd_: has joined #ruby
[21:28:10] jackhill: Hi is there something like Python's virtualenv for Ruby?
[21:28:43] jackhill: I'm not sure if rvm, rbenv and friends do exactly the same thing.
[21:29:21] jackhill: Basically, what I want is to install stuff with gem and have it not pollute my global (or per-user global) environment.
[21:29:53] marr: has joined #ruby
[21:32:01] tvon: has joined #ruby
[21:32:02] Radar: jackhill: Bundler helps solve that issue. It will only load the dependencies that your app needs.
[21:32:12] cdg: has joined #ruby
[21:33:34] jackhill: Radar: cool. So I just install them globally, but run stuff via bundler and I'll only see what's in the Bundler configuration?
[21:34:30] bruce_lee: has joined #ruby
[21:34:30] bruce_lee: has joined #ruby
[21:34:43] mistermocha: has joined #ruby
[21:39:53] dhollinger: has joined #ruby
[21:39:57] tristanp: has joined #ruby
[21:39:58] Es0teric: has joined #ruby
[21:40:35] Es0teric: has joined #ruby
[21:40:47] Radar: jackhill: yup
[21:42:28] Polysics: has joined #ruby
[21:43:53] mistermocha: has joined #ruby
[21:44:23] nettoweb: has joined #ruby
[21:45:04] roamingdog: has joined #ruby
[21:53:12] hipertracker: has joined #ruby
[21:54:56] akira616: has joined #ruby
[21:55:29] tristanp: has joined #ruby
[21:56:56] LBRapid: has joined #ruby
[21:56:58] banisterfiend: has joined #ruby
[21:57:33] nettoweb: has joined #ruby
[21:58:56] zacts: has joined #ruby
[21:59:48] aupadhye: has joined #ruby
[22:02:43] pawnbox: has joined #ruby
[22:04:30] mistermocha: has joined #ruby
[22:04:52] mistermocha: has joined #ruby
[22:05:22] havenwood: >> 42.step.lazy.select { |n| n.to_s(2).count(?1).even? }.first(35).last(2).map(&:chr).join
[22:05:23] ruby[bot]: havenwood: # => "lo" (https://eval.in/604856)
[22:05:28] MEATCHICKEN: has joined #ruby
[22:05:33] MEATCHICKEN: where is the docs for the super method?
[22:05:41] MEATCHICKEN: I am seeing a usage of super that is block form
[22:06:02] MEATCHICKEN: super {|x| x.whatever }
[22:06:06] MEATCHICKEN: what does that mean?
[22:06:21] apeiros: super is not a method, it's syntax
[22:06:31] pawnbox: has joined #ruby
[22:06:32] apeiros: it'll invoke the next method of the same name in the ancestry
[22:06:45] mistermocha: has joined #ruby
[22:06:54] havenwood: meatchicken: It's a keyword: http://docs.ruby-lang.org/en/2.3.0/keywords_rdoc.html
[22:07:11] pawnbox: has joined #ruby
[22:07:17] apeiros: i.e. if you have a class A, and class B < A, and both define a method foo - when you the call super in B#foo, it'll invoke A's definition of foo
[22:08:01] MEATCHICKEN: what does the block form do then?
[22:08:09] apeiros: notable subtleties: `super` will pass on all methods the current method received
[22:08:11] MEATCHICKEN: it doesn't state it on the docs website
[22:08:23] apeiros: *pass on all *arguments*
[22:08:24] Mon_Ouie: It just passes the block to the method from the parent class/module
[22:08:37] apeiros: `super()` will omit the arguments, but still pass on a block
[22:09:42] MEATCHICKEN: that makes sense
[22:10:33] dvinciguerra_: has joined #ruby
[22:10:38] nogic: has joined #ruby
[22:10:49] skalfyfan: has joined #ruby
[22:11:53] tristanp: has joined #ruby
[22:12:50] banisterfiend: Mon_Ouie hru ltns
[22:13:21] workmad3: banisterfiend: o/
[22:13:28] aegis3121: has joined #ruby
[22:13:36] mistermocha: has joined #ruby
[22:13:38] Azure: has joined #ruby
[22:13:44] Mon_Ouie: banisterfiend: 'alut
[22:15:37] Dexx1_: has left #ruby: ()
[22:17:15] freerobby: has joined #ruby
[22:20:08] nettoweb: has joined #ruby
[22:21:05] singalaut: has left #ruby: ("WeeChat 1.6-dev")
[22:22:54] chosen1: has joined #ruby
[22:23:00] dhollinger: has joined #ruby
[22:24:02] SilverKey: has joined #ruby
[22:26:10] dkam: has joined #ruby
[22:26:52] oryman: has joined #ruby
[22:28:30] mistermocha: has joined #ruby
[22:30:33] Polysics: has joined #ruby
[22:32:28] karapetyan: has joined #ruby
[22:34:17] JeanCarloMachado: has joined #ruby
[22:34:32] colegatron_origi: has joined #ruby
[22:35:17] tristanp: has joined #ruby
[22:36:54] Rodya_: has joined #ruby
[22:38:48] dhk: has joined #ruby
[22:44:47] nando293921: has joined #ruby
[22:45:55] mistermocha: has joined #ruby
[22:50:06] tristanp: has joined #ruby
[22:52:35] Jet4Fire: has joined #ruby
[22:55:47] mistermocha: has joined #ruby
[22:57:24] mistermocha: has joined #ruby
[22:58:37] johnmilton: has joined #ruby
[22:58:43] postmodern: has joined #ruby
[22:58:44] nankyokusei: has joined #ruby
[23:00:30] zacts: nice havenwood
[23:00:40] zacts: re # => "lo"
[23:05:07] sdothum: has joined #ruby
[23:05:36] johnmilton: has joined #ruby
[23:05:42] xlegoman: has joined #ruby
[23:06:18] tristanp: has joined #ruby
[23:09:53] agent_white: has joined #ruby
[23:12:21] rodfersou: has joined #ruby
[23:17:24] ljc: has joined #ruby
[23:18:11] David27: has joined #ruby
[23:19:07] ruby[bot]: -b *!*@2607:fb90:540:d202:e18d:115d:5bdd:e66e$#ruby-banned
[23:22:07] ruby[bot]: -b *!*@gateway/web/irccloud.com/x-dneitgmfdygkbwzp$#ruby-banned
[23:23:15] tristanp: has joined #ruby
[23:24:27] hipertracker: has joined #ruby
[23:24:34] skalfyfan: has joined #ruby
[23:25:18] macsteps: has joined #ruby
[23:25:48] dkam: has joined #ruby
[23:26:18] arooni-mobile: has joined #ruby
[23:26:23] arooni-mobile__: has joined #ruby
[23:26:57] Azure: has joined #ruby
[23:28:20] burgestrand: has joined #ruby
[23:30:25] skalfyfan: has joined #ruby
[23:31:26] Es0teric: has joined #ruby
[23:34:51] memorasus: has joined #ruby
[23:34:53] tristanp: has joined #ruby
[23:35:48] koooge: has joined #ruby
[23:36:39] A_Drone: has joined #ruby
[23:39:35] burgestrand: has joined #ruby
[23:40:10] skalfyfan: has joined #ruby
[23:40:35] hipertracker: has joined #ruby
[23:42:13] karapetyan: has joined #ruby
[23:42:55] coffeecupp: has joined #ruby
[23:43:30] leea: has joined #ruby
[23:45:36] i: has joined #ruby
[23:49:17] tristanp: has joined #ruby
[23:50:06] sneakerhax: has joined #ruby
[23:56:37] nando293921: has joined #ruby
[23:58:06] GinoMan2440: has joined #ruby
[23:59:57] zacts: has joined #ruby