« Back to channel list

#ruby - 29 September 2015

« Back 1 day Forward 1 day »
[00:00:55] ryanlntn: has joined #ruby
[00:01:20] ta: has joined #ruby
[00:01:56] unreal: has joined #ruby
[00:03:22] drptbl: has joined #ruby
[00:05:30] freerobby: has joined #ruby
[00:06:12] law: has joined #ruby
[00:06:27] law: all, anyone ever dealt with this error message on OS X 10.10 before?
[00:06:28] law: dyld: lazy symbol binding failed: Symbol not found: _rb_funcallv
[00:06:41] law: "Referenced from: /Users/law/.rvm/gems/ruby-2.1.2@chef11/gems/ffi-1.9.6/lib/ffi_c.bundle"
[00:06:52] law: I'm not even using the ffi gem in the program I'm trying to run
[00:07:18] law: funnily enough, this was all working just fine on Friday. No updates or anything over the weekend, and lo this bites me in the backside on Monday morning
[00:07:50] law: this is ruby 2.1.2p95, on rvm 1.26.11
[00:08:19] chipotle: has joined #ruby
[00:08:39] Azure: has joined #ruby
[00:09:05] dorei: law: mondays are always a problem :p
[00:09:26] law: heh, apparently so
[00:09:37] jcromartie: has joined #ruby
[00:11:02] tkuchiki: has joined #ruby
[00:11:35] law: I can run my program in pry no problem, which is super weird
[00:12:10] jschmid: has joined #ruby
[00:12:19] dorei: r u sure u dont have any weird in your LD_PRELOAD env vars
[00:12:32] iWaffles: has joined #ruby
[00:13:09] law: LD_PRELOAD isn't even set, as far as I can tell
[00:14:00] moeabdol: has joined #ruby
[00:14:04] elfuego: has joined #ruby
[00:16:06] dravine_: has joined #ruby
[00:17:34] skweek: has joined #ruby
[00:18:44] bruno-: has joined #ruby
[00:18:55] tomchapin: has joined #ruby
[00:18:58] vdamewood: has joined #ruby
[00:18:59] soloone: has joined #ruby
[00:21:07] workmad3_: has joined #ruby
[00:22:58] blackjid: has joined #ruby
[00:23:19] tkuchiki: has joined #ruby
[00:23:25] Xeago: has joined #ruby
[00:24:07] drptbl: has joined #ruby
[00:24:13] JDiPierro: has joined #ruby
[00:24:47] vF3hNGxc47h8: has joined #ruby
[00:25:10] Azure: has joined #ruby
[00:27:04] havenwood: has joined #ruby
[00:28:27] RegulationD: has joined #ruby
[00:30:23] stardiviner: has joined #ruby
[00:30:36] Azure: has joined #ruby
[00:31:09] shevy: hey it's early monday here!
[00:31:15] shevy: you need to let people wake up
[00:31:20] shevy: in 6 hours!
[00:31:41] NeverDie: has joined #ruby
[00:31:46] shevy: I am on linux so I don't know what weirdness OS X has
[00:31:47] julieeharshaw: has joined #ruby
[00:31:48] bronson: has joined #ruby
[00:31:59] asxbr: has joined #ruby
[00:32:58] asxbr: hi guys... im trying to iterate on matrix rows... but when i do a foreach expression, it is iterating on each element (abstracting rows)
[00:33:18] dorei: is there a foreach in ruby?
[00:33:19] asxbr: is there an easier way to to it ?
[00:33:26] asxbr: for ... in @matrix
[00:33:31] shevy: where is the each
[00:33:50] shevy: do you have a small example of your matrix? a gist?
[00:34:07] shevy: usually dataset.each would be simpler
[00:34:17] shevy: if you have e. g. an array with a table-layout like a .csv file
[00:34:20] asxbr: i'll provide it
[00:34:28] shevy: if you need an index, you can use .each_with_index
[00:34:33] havenwood: law: Does the error still occur after upgrading your Ruby to 2.1.7?
[00:34:49] bhaak: has joined #ruby
[00:36:35] asxbr: shevy: look it
[00:36:36] asxbr: https://gist.github.com/gbgdev/2d2c06968b503581008c
[00:36:41] asxbr: i need the row like a vector
[00:36:43] asxbr: to work on it
[00:37:21] CloCkWeRX: has joined #ruby
[00:37:37] asxbr: for column i can use column_vector
[00:38:09] asxbr: but i'm not getting one fast way to rows :/
[00:38:13] mary5030: has joined #ruby
[00:38:39] sgambino: has joined #ruby
[00:42:28] drptbl: has joined #ruby
[00:43:50] jcromartie: has joined #ruby
[00:44:01] renderful: has joined #ruby
[00:44:58] asxbr: better rephrase my question
[00:45:24] matp_: has joined #ruby
[00:45:30] asxbr: is there a direct way to iterate on matrix rows like a vector?
[00:46:12] rbowlby: has joined #ruby
[00:46:21] rushed: has joined #ruby
[00:46:22] asxbr: the Matrix class provides to me column_vectors, returning the columns like vector
[00:46:35] asxbr: but i'm not finding nothing to get rows as vector
[00:46:51] bnagy: asxbr: row_vectors?
[00:46:56] havenwood: asxbr: @matrix.row_vectors
[00:46:59] bnagy: these docs are super hard to read
[00:47:08] bnagy: with the words, and stuff
[00:47:20] drptbl_: has joined #ruby
[00:47:28] asxbr: thats it!
[00:47:34] slackbotgz: has joined #ruby
[00:48:39] tw1sted: has joined #ruby
[00:48:40] bnagy: Matrix is kind of a crusty stdlib :\
[00:49:10] Raboo: has joined #ruby
[00:49:18] livcd: has joined #ruby
[00:50:02] havenwood: >> require 'matrix'; Matrix.instance_methods(false).grep /row/
[00:50:04] ruboto: havenwood # => [:rows, :row_count, :row_size, :row, :row_vectors] (https://eval.in/441030)
[00:50:27] kies: has joined #ruby
[00:50:58] cassioscabral: has joined #ruby
[00:51:04] Azure: has joined #ruby
[00:51:29] pwnd_nsfw: has joined #ruby
[00:52:31] havenwood: Just an N away from NMatrix: https://github.com/sciruby/nmatrix#readme
[00:52:33] Log1x: has joined #ruby
[00:52:33] Log1x: has joined #ruby
[00:52:36] ghormoon: has joined #ruby
[00:52:41] perry: has joined #ruby
[00:55:55] gnarf: has joined #ruby
[00:56:00] JDiPierro: has joined #ruby
[00:56:31] CrazyEddy: has joined #ruby
[00:57:00] wallerdev: has joined #ruby
[00:58:05] Rollabunna: has joined #ruby
[00:58:26] otacon-: has joined #ruby
[01:01:50] rbennacer: has joined #ruby
[01:04:16] inteq: has joined #ruby
[01:09:33] tkuchiki: has joined #ruby
[01:12:01] bruno-_: has joined #ruby
[01:13:46] bb010g: has joined #ruby
[01:18:19] luckyme: has joined #ruby
[01:19:48] duncannz: has joined #ruby
[01:21:53] robh71: has joined #ruby
[01:21:55] Guest76355: has joined #ruby
[01:22:33] bootstrappm: has left #ruby: ()
[01:22:49] ericjphillips: has joined #ruby
[01:24:02] Rodya_: has joined #ruby
[01:25:27] devoldmx: has joined #ruby
[01:25:50] redondo: has joined #ruby
[01:27:26] JDiPierro: has joined #ruby
[01:27:49] haraoka: has joined #ruby
[01:28:10] solocshaw: has joined #ruby
[01:29:11] prereflect: has joined #ruby
[01:29:43] deject3d: has joined #ruby
[01:30:33] devbug: has joined #ruby
[01:33:14] bronson: has joined #ruby
[01:34:22] p0wn3d: has joined #ruby
[01:34:47] xxneolithicxx: has joined #ruby
[01:37:35] ankhers: has joined #ruby
[01:38:38] opensource_ninja: has joined #ruby
[01:46:10] rickmasta: has joined #ruby
[01:46:11] nopolitica: has joined #ruby
[01:46:26] Cyther_: has joined #ruby
[01:47:05] shadoi: has joined #ruby
[01:47:33] law: has left #ruby: ()
[01:47:53] tjbiddle: has joined #ruby
[01:52:20] chouhoulis: has joined #ruby
[01:55:12] drewvanstone: has joined #ruby
[01:55:14] roxtrongo: has joined #ruby
[01:55:14] icole`: has joined #ruby
[01:56:24] benlieb: has joined #ruby
[01:56:30] Puffball: has joined #ruby
[01:57:51] mary5030: has joined #ruby
[02:00:14] sdwrage: has joined #ruby
[02:00:19] swgillespie: has joined #ruby
[02:00:36] chouhoulis: has joined #ruby
[02:01:16] xcesariox: has joined #ruby
[02:02:42] Scripore: has joined #ruby
[02:03:47] Hyperfocal: has joined #ruby
[02:03:53] Coldblackice: has joined #ruby
[02:04:12] mary5030: has joined #ruby
[02:04:31] chouhoul_: has joined #ruby
[02:07:57] chouhoulis: has joined #ruby
[02:09:15] workmad3_: has joined #ruby
[02:11:03] slayerjain: has joined #ruby
[02:11:27] havenwood: has joined #ruby
[02:12:53] f3lp: has joined #ruby
[02:13:14] dravine_: has joined #ruby
[02:13:14] Hyperfocal: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[02:13:37] agent_meerkat: has joined #ruby
[02:13:53] `tim`: has joined #ruby
[02:15:09] x-light: has joined #ruby
[02:15:38] tjbiddle: has joined #ruby
[02:20:55] gambl0re: has joined #ruby
[02:21:43] InternetFriend: has joined #ruby
[02:22:00] bruno-: has joined #ruby
[02:22:09] Eiam_: has joined #ruby
[02:24:29] rickmasta: has joined #ruby
[02:26:20] Contigi: has joined #ruby
[02:27:57] dravine_: has joined #ruby
[02:29:32] yeticry: has joined #ruby
[02:30:33] bmurt: has joined #ruby
[02:32:20] bronson: has joined #ruby
[02:32:48] _djbkd: has joined #ruby
[02:34:23] reset: has joined #ruby
[02:34:34] newtonianb: has joined #ruby
[02:35:18] mclee_: has joined #ruby
[02:35:40] iamninja_: has joined #ruby
[02:35:48] baweaver: has joined #ruby
[02:36:24] lemur: has joined #ruby
[02:37:03] baweaver_: has joined #ruby
[02:38:34] ellisTAA: has joined #ruby
[02:40:18] newtonianb: has joined #ruby
[02:40:32] roxtrongo: has joined #ruby
[02:42:17] chipotle: has joined #ruby
[02:44:23] tokik: has joined #ruby
[02:44:32] mxrguspxrt: has joined #ruby
[02:44:35] tkuchiki: has joined #ruby
[02:46:07] charliesome_: has joined #ruby
[02:46:33] neohunter: has joined #ruby
[02:49:49] arescorpio: has joined #ruby
[02:52:15] reset: has joined #ruby
[02:52:15] aaeron: has joined #ruby
[02:54:34] neohunter: has joined #ruby
[02:54:41] neohunter: I'm using cap 2.3.0, this error appear (NoMethodError: undefined method `select!' for ["none"]:Array) with ruby 1.8.7-p374, but works with p370... gem list are exactly the same.. what could be?... or how i can debug that, there is no stacktrace or any file to log for, i tried runnign with -v same result
[02:56:14] devoldmx: has joined #ruby
[02:56:20] bnagy: neohunter: probably the core answer is get the heck off 1.8
[02:56:45] bnagy: 1.9 is pretty much eol, 1.8 is ancient
[02:57:00] neohunter: I can't is a web service used by a lot of people, we are creating an upgrade but i can just say, disable everything and send clients to competitors.
[02:57:39] bklane: has joined #ruby
[02:58:02] bnagy: well select! vanished as a method at some point, maybe that was it
[02:58:17] bnagy: I guess fix the code
[02:58:20] x-light: has joined #ruby
[02:58:28] bnagy: 1.8 is full of security bugs as well, btw
[02:58:56] Rollabunna: has joined #ruby
[02:59:28] xxneolithicxx: has joined #ruby
[02:59:38] renderful: has joined #ruby
[03:00:59] gener1c: has joined #ruby
[03:01:06] bnagy: hm.. actually it's kind of weird... it vanished from the docs
[03:01:18] bnagy: 18>> [].methods.include? :select!
[03:01:19] ruboto: bnagy # => false (https://eval.in/441185)
[03:01:28] bnagy: 19>> [].methods.include? :select!
[03:01:28] ruboto: bnagy # => true (https://eval.in/441186)
[03:01:50] bnagy: 18>> RUBY_VERSION
[03:01:51] ruboto: bnagy # => "1.8.7" (https://eval.in/441187)
[03:02:30] bnagy: 18>> RUBY_PATCHLEVEL
[03:02:31] ruboto: bnagy # => 358 (https://eval.in/441188)
[03:02:41] neohunter: with 358 it was working
[03:02:48] eam: I wonder if select! has the same performance regression as reject!
[03:03:39] bnagy: neohunter: can you patch the code?
[03:04:01] bnagy: just change blah.select! to blah = blah.select
[03:04:07] neohunter: I can monkey patch, but how i can know what file?
[03:04:15] neohunter: its an error raised by capistriano
[03:04:35] bnagy: grep for it
[03:04:40] dopie: has joined #ruby
[03:05:23] unclouded: has joined #ruby
[03:07:41] pwnd_nsfw: has joined #ruby
[03:09:14] krz: has joined #ruby
[03:10:04] braincrash: has joined #ruby
[03:10:40] iateadonut: has joined #ruby
[03:13:04] agent_white: has joined #ruby
[03:15:12] Soda: has joined #ruby
[03:15:37] qpls: has joined #ruby
[03:16:12] bmurt: has joined #ruby
[03:16:18] EminenceHC: has joined #ruby
[03:17:41] bklane: has joined #ruby
[03:18:58] hahuang65: has joined #ruby
[03:19:07] aaeron: has joined #ruby
[03:20:50] aaeron1: has joined #ruby
[03:23:51] `tim`: has joined #ruby
[03:24:37] bruno-: has joined #ruby
[03:25:43] robh71: has joined #ruby
[03:28:32] tkuchiki: has joined #ruby
[03:29:00] tkuchiki: has joined #ruby
[03:29:18] p0wn3d: has joined #ruby
[03:29:59] rickmasta: has joined #ruby
[03:30:15] gix: has joined #ruby
[03:31:09] baweaver: has joined #ruby
[03:32:00] dopieee: has joined #ruby
[03:33:02] arup_r: has joined #ruby
[03:33:18] lemur: has joined #ruby
[03:34:19] bmurt: has joined #ruby
[03:35:20] darkf: has joined #ruby
[03:36:43] pawnbox: has joined #ruby
[03:38:48] baweaver: has joined #ruby
[03:42:26] RegulationD: has joined #ruby
[03:43:23] jenrzzz: has joined #ruby
[03:43:29] Tempesta: has joined #ruby
[03:44:32] fedexo: has joined #ruby
[03:45:58] favadi: has joined #ruby
[03:46:42] ellisTAA: has joined #ruby
[03:47:34] htmldrum: has joined #ruby
[03:48:04] f3lp: has joined #ruby
[03:49:50] zly: has joined #ruby
[03:50:23] The_Phoenix: has joined #ruby
[03:50:26] baweaver: has joined #ruby
[03:53:17] mondayrain: has joined #ruby
[03:53:36] ramfjord: has joined #ruby
[03:55:07] baweaver: has joined #ruby
[03:55:58] p0wn3d: has joined #ruby
[03:56:59] Joufflu: evening gov'na
[03:57:05] zenguy_pc: has joined #ruby
[03:57:17] pwnd_nfsw: has joined #ruby
[03:57:18] workmad3_: has joined #ruby
[04:00:18] rickmasta: has joined #ruby
[04:01:05] zenguy_pc: has joined #ruby
[04:01:33] pawnbox: has joined #ruby
[04:06:41] tlarevo: has joined #ruby
[04:07:09] gambl0re: has joined #ruby
[04:10:23] jdawgaz: has joined #ruby
[04:12:29] agent_white: has joined #ruby
[04:12:46] rushed: has joined #ruby
[04:14:29] luckyme: has joined #ruby
[04:17:00] jenrzzz: has joined #ruby
[04:18:56] pawnbox: has joined #ruby
[04:19:04] Xiti: has joined #ruby
[04:23:23] astrobunny: has joined #ruby
[04:23:51] wldcordeiro: has joined #ruby
[04:23:56] rushed: has joined #ruby
[04:24:34] sargas: has joined #ruby
[04:24:47] adamos: has joined #ruby
[04:25:45] jamesaxl|2: has joined #ruby
[04:26:38] tkuchiki: has joined #ruby
[04:28:54] jun: has joined #ruby
[04:31:56] bayed: has joined #ruby
[04:34:01] bronson: has joined #ruby
[04:36:22] chouhoulis: has joined #ruby
[04:37:24] astrobunny: has joined #ruby
[04:38:46] Sou|cutter: http://ruby-doc.com/docs/ProgrammingRuby/html/ref_c_string.html#String.to_str indicates that Exception implements #to_str however AFAICT going back to 1.9.3 that does not appear to be true
[04:40:09] Sou|cutter: does this happen in some extension module or something? Or is this just something that was changed after writing (but still very very long ago)
[04:42:16] pawnbox: has joined #ruby
[04:42:27] lemur: has joined #ruby
[04:45:08] dikaio: has joined #ruby
[04:46:43] sanjayu: has joined #ruby
[04:47:47] woodruffw: has joined #ruby
[04:48:33] astrobunny: has joined #ruby
[04:49:45] xxneolithicxx: has joined #ruby
[04:50:52] rickmasta: has joined #ruby
[04:53:45] bnagy: that ref is from 1.6
[04:54:09] devoldmx: has joined #ruby
[04:56:12] eGGsha: has joined #ruby
[04:56:17] skweek: has joined #ruby
[04:59:49] Rollabunna: has joined #ruby
[05:01:17] perry: has joined #ruby
[05:01:17] perry: has joined #ruby
[05:01:17] Gustavo: has joined #ruby
[05:01:34] mary5030: has joined #ruby
[05:04:50] nofxx: has joined #ruby
[05:04:50] nofxx: has joined #ruby
[05:06:25] jenrzzz: has joined #ruby
[05:06:26] pawnbox: has joined #ruby
[05:07:57] iamninja_: has joined #ruby
[05:08:25] allomov: has joined #ruby
[05:09:00] tejasmanohar_: has joined #ruby
[05:11:51] luckyme: has joined #ruby
[05:12:26] skade: has joined #ruby
[05:12:46] skweek: has joined #ruby
[05:12:55] shoerain: has joined #ruby
[05:13:24] Kallis: has joined #ruby
[05:13:50] shoerain: i think my google-fu is weak, how would I find a drawing library for ruby? I'm ideally looking for something like Processing in Java or Quil in Clojure. Outputting to bitmap or png would be great...
[05:15:29] slayerjain: has joined #ruby
[05:17:33] tjbiddle: has joined #ruby
[05:18:00] Musashi007: has joined #ruby
[05:18:11] dhjondoh: has joined #ruby
[05:21:34] jenrzzz: has joined #ruby
[05:22:10] x-light: has joined #ruby
[05:23:23] nahtnam: has left #ruby: ()
[05:24:01] n008f4g_: has joined #ruby
[05:25:18] piotrj: has joined #ruby
[05:26:25] TomyLobo: has joined #ruby
[05:26:49] Anti-Pizza: has joined #ruby
[05:27:14] slayerjain: has joined #ruby
[05:30:16] vondruch: has joined #ruby
[05:32:24] bigbadbear: has joined #ruby
[05:32:33] pawnbox: has joined #ruby
[05:33:52] codenapper: has joined #ruby
[05:34:49] dathon: has joined #ruby
[05:34:54] bronson: has joined #ruby
[05:36:46] piotrj: has joined #ruby
[05:39:00] aganov: has joined #ruby
[05:40:21] sdrew: has joined #ruby
[05:40:25] yardenbar: has joined #ruby
[05:43:20] rickmasta: has joined #ruby
[05:45:27] workmad3_: has joined #ruby
[05:46:24] dionysus69: has joined #ruby
[05:46:35] charliesome: has joined #ruby
[05:48:14] Rutix: has joined #ruby
[05:48:15] Rutix: has joined #ruby
[05:51:02] emilkarl: has joined #ruby
[05:51:51] yfeldblum: has joined #ruby
[05:52:13] Cyther: has joined #ruby
[05:55:58] piotrj: has joined #ruby
[05:57:10] iamninja_: has joined #ruby
[05:58:10] lsmola: has joined #ruby
[06:02:05] Gustavo: has joined #ruby
[06:02:11] tjbiddle: has joined #ruby
[06:04:11] codecop: has joined #ruby
[06:04:28] amystephen: has joined #ruby
[06:04:31] firstdayonthejob: has joined #ruby
[06:04:43] pokmo: has left #ruby: ("ciao")
[06:08:03] vondruch: has joined #ruby
[06:08:34] closer: has joined #ruby
[06:08:53] eGGsha: has joined #ruby
[06:10:33] sanjayu: has joined #ruby
[06:11:56] ZucchiniZe: has joined #ruby
[06:12:02] riotjones: has joined #ruby
[06:14:10] andikr: has joined #ruby
[06:17:43] tjbiddle: has joined #ruby
[06:18:58] swgillespie: has joined #ruby
[06:22:01] st1gma: has joined #ruby
[06:24:47] existensil: has joined #ruby
[06:27:48] araujo_: has joined #ruby
[06:29:08] rbowlby: has joined #ruby
[06:30:54] Pathfinder: has joined #ruby
[06:32:48] Pumukel: has joined #ruby
[06:33:47] dikaio: has joined #ruby
[06:33:52] drewvanstone: has joined #ruby
[06:34:48] ndrei: has joined #ruby
[06:35:52] bronson: has joined #ruby
[06:37:14] relix: has joined #ruby
[06:41:08] ndrei: has joined #ruby
[06:41:15] rodfersou: has joined #ruby
[06:43:50] skeptics: has joined #ruby
[06:44:12] skeptics: I am new to ruby
[06:44:22] ZucchiniZe: its an awesome language
[06:44:26] rapha: indeed it is
[06:44:45] ZucchiniZe: any of you taken a look at elixir?
[06:44:57] skeptics: The question is arrived in my mind why should I have to learn Ruby?
[06:45:08] [k-: has joined #ruby
[06:45:17] rickmasta: has joined #ruby
[06:46:24] Spami: has joined #ruby
[06:47:16] [k-: do you have any other languages in mind?
[06:49:41] anisha: has joined #ruby
[06:50:46] last_staff: has joined #ruby
[06:50:59] nfk|laptop: has joined #ruby
[06:52:46] baweaver: You don't _have_ to do anything
[06:53:02] tagrudev: has joined #ruby
[06:53:29] baweaver: depends entirely on what you _want_ to do
[06:54:30] [k-: do you have any previous experience?
[06:55:47] xcesariox: has joined #ruby
[06:58:44] sarlalian: has joined #ruby
[06:59:35] TheHodge: has joined #ruby
[06:59:38] Gnomethrower: has joined #ruby
[06:59:38] Gnomethrower: has joined #ruby
[07:00:43] Rollabunna: has joined #ruby
[07:01:36] yfeldblum: has joined #ruby
[07:01:45] karapetyan: has joined #ruby
[07:01:51] burgestrand: has joined #ruby
[07:05:18] solars: has joined #ruby
[07:05:42] EminenceHC: has joined #ruby
[07:07:18] pawnbox: has joined #ruby
[07:07:20] brazenbraden: has joined #ruby
[07:08:58] piotrj: has joined #ruby
[07:10:59] SCHAAP137: has joined #ruby
[07:12:32] shevy: skeptics why perl
[07:13:19] devoldmx: has joined #ruby
[07:13:21] Gustavo: has joined #ruby
[07:13:40] mxrguspxrt: has joined #ruby
[07:15:43] mxrguspx_: has joined #ruby
[07:17:31] tomchapin: has joined #ruby
[07:18:50] arup_r: has joined #ruby
[07:19:29] Xeago: has joined #ruby
[07:22:26] skeptics: perl is good for makin hacks
[07:26:24] bruno-: has joined #ruby
[07:27:19] howdoi: has joined #ruby
[07:27:24] tomchapin: has joined #ruby
[07:27:28] Kendos-Kenlen: has joined #ruby
[07:29:44] allomov: has joined #ruby
[07:33:17] trautwein: has joined #ruby
[07:33:38] workmad3_: has joined #ruby
[07:36:49] bronson: has joined #ruby
[07:37:04] SylarRuby: has joined #ruby
[07:37:39] ruurd: has joined #ruby
[07:38:03] piotrj: has joined #ruby
[07:38:35] niko: has joined #ruby
[07:40:13] Hounddog: has joined #ruby
[07:41:33] charliesome: has joined #ruby
[07:43:50] RegulationD: has joined #ruby
[07:45:41] herbst: has joined #ruby
[07:49:08] piotrj: has joined #ruby
[07:50:23] cih: has joined #ruby
[07:51:00] freezevee: has joined #ruby
[07:51:56] sleetdrop: has joined #ruby
[08:02:28] joonty: has joined #ruby
[08:03:12] rdark: has joined #ruby
[08:03:16] pawnbox: has joined #ruby
[08:05:45] Xeago: has joined #ruby
[08:07:58] skade: has joined #ruby
[08:09:32] blaxter: has joined #ruby
[08:11:22] pyon: has joined #ruby
[08:12:19] Stan: has joined #ruby
[08:12:52] c0m0: has joined #ruby
[08:13:26] S_Walker: has joined #ruby
[08:14:06] gustav__: has joined #ruby
[08:14:12] devoldmx: has joined #ruby
[08:14:14] ruurd: has joined #ruby
[08:14:15] gagrio: has joined #ruby
[08:14:29] bestbrents: has joined #ruby
[08:15:42] shevy: https://github.com/ruby/ruby/blob/trunk/ChangeLog#L3
[08:15:44] Sp4rKy: has joined #ruby
[08:15:48] shevy: the path towards staticness commences
[08:18:10] charliesome: has joined #ruby
[08:19:26] arup_r: shevy: How did you reach to the changelog .. Were you reading Ruby source code ? :)
[08:20:02] unshadow: has joined #ruby
[08:20:08] burgestrand: has joined #ruby
[08:22:28] mikecmpbll: has joined #ruby
[08:23:16] Xeago: has joined #ruby
[08:23:52] fluchtreflex: has joined #ruby
[08:23:52] fluchtreflex: has joined #ruby
[08:24:00] charliesome: has joined #ruby
[08:25:29] Flying_Squirrel: has joined #ruby
[08:25:56] emilkarl: has joined #ruby
[08:26:29] shevy: arup_r I use it like a news section
[08:26:40] ryanlntn: has joined #ruby
[08:27:38] arup_r: ok... shevy ..
[08:29:56] haraoka: has joined #ruby
[08:30:34] oniMaker: has joined #ruby
[08:30:49] Kendos-Kenlen: has joined #ruby
[08:32:13] fluchtreflex: has joined #ruby
[08:32:14] fluchtreflex: has joined #ruby
[08:35:57] shevy: it's like a readers digest
[08:36:15] Xeago: has joined #ruby
[08:37:28] blaxter: has joined #ruby
[08:38:02] bronson: has joined #ruby
[08:40:32] Zai00: has joined #ruby
[08:40:46] auzty: has joined #ruby
[08:42:01] tuor: hi, when i have a if statement with only one line in it (like: if true; do_this; end) but it's to long to write it on one line (more the 80 letters), should I write it with "if ...;..;end" or "... \;if ..." ?
[08:42:12] sanjayu: has joined #ruby
[08:42:42] tobiasvl: why do you have to have it on one line?
[08:42:55] tobiasvl: and what do you mean by your second example? ;if ?
[08:43:12] marr: has joined #ruby
[08:43:18] shevy: if it is too long, chop it down
[08:43:30] Juanchito: has joined #ruby
[08:46:07] southpawlar: has joined #ruby
[08:46:46] parduse: has joined #ruby
[08:46:53] tuor: https://gist.github.com/anonymous/e6ba8f2ed251b4a4b6cf
[08:47:08] pawnbox: has joined #ruby
[08:47:09] tuor: It's just examples for what I meen.
[08:47:48] Balzrael: has joined #ruby
[08:48:18] jhass: tuor: you should extract it to a method or two then
[08:50:23] araujo: has joined #ruby
[08:50:27] tuor: This is a method from my code: https://gist.github.com/anonymous/3419030c49b780c29716
[08:50:36] sepp2k: has joined #ruby
[08:51:01] tuor: line 14 was to long for writing it like 11 or 12.
[08:51:12] workmad3_: has joined #ruby
[08:51:44] tuor: jhass, can you explain what you meen (with the new code example), I don't understand it.
[08:51:55] araujo: has joined #ruby
[08:51:55] ruboto: Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
[08:52:06] jhass: oh, you updated, nvm
[08:52:34] jhass: mmh, does that even hit 80 cols?
[08:52:43] jhass: my personal hard limit is more like 120 btw
[08:53:16] jhass: nope, longest is 78
[08:53:40] tuor: jhass, now it does: https://gist.github.com/anonymous/38fd228560c3eee6287b
[08:53:54] jenrzzz: has joined #ruby
[08:54:48] jhass: so personally I would keep it since my limit is 120 not 80, so I would even align the = and the if's of the other two lines to it
[08:55:00] tuor: the difference between the two pastes is what i meen. I would like to write like in the second one (on one line) but it's to long. So the question is: is it ok to write it like this: https://gist.github.com/anonymous/acdd9af77c53de966673
[08:55:13] jhass: but yeah, just break it into a regular if
[08:55:31] jhass: ah no, that's horrible
[08:55:44] jhass: do what you posted first, use a regular if
[08:55:50] tuor: jhass, OK. That was what I wanted to know. :)
[08:56:22] tuor: I was not focusing on aligning, but shure.
[08:56:25] leafybasil: has joined #ruby
[08:57:04] bruno-: has joined #ruby
[08:57:56] jhass: however you could also do something like def set_connection_option(options, field); @connection[field] = options[field] if better_name_for_whatever_check_key_string_does(options, field); end
[08:59:36] dhjondoh: has joined #ruby
[08:59:42] tvw: has joined #ruby
[09:01:34] Rollabunna: has joined #ruby
[09:02:28] jhass: tuor: http://paste.mrzyx.de/pfan00ti4 makes it less crowded
[09:03:47] alexherbo2: has joined #ruby
[09:04:16] yardenbar: has joined #ruby
[09:04:19] tuor: jhass, the other lines need to be in the first if statement to. (check_key_string is a method which checks if the param1 is a hash, if the key param2 exists and if the value of the key param2 is a not empty string.) I don't know how to call it... It's because options can be set or not and if they are set, they should be the correct datatype.
[09:05:31] jhass: and then does what? raise an error?
[09:06:31] ponga: has joined #ruby
[09:07:07] moeabdol: has joined #ruby
[09:07:32] chthon: has joined #ruby
[09:07:49] tuor: jhass, the complete class: https://gist.github.com/anonymous/2be41cd6f103611fc885
[09:08:24] jhass: recursive, with an e at the end
[09:08:38] piotrj: has joined #ruby
[09:09:44] Igorshp: has joined #ruby
[09:11:30] tuor: jhass, thx, it's changed.
[09:11:39] jhass: also connection with a single t btw
[09:12:10] jhass: so I'd strive for something like http://paste.mrzyx.de/p7pogod1y
[09:12:12] tuor: If there are any puts '...' remaining, there was just for testing stuff.
[09:13:39] workmad3_: has joined #ruby
[09:14:08] jhass: Hash.new -> {}
[09:14:18] tuor: jhass, I'll need a moment understanding what you did.
[09:14:24] jhass: mkdir_p does the existence check for you already
[09:15:04] jhass: I added a layer of abstraction to the method to make it easier to follow
[09:15:25] tuor: ah yes I see. looks nice.
[09:15:59] jhass: get_templates_list -> templates_list no get_ prefixes
[09:16:32] porfa: has joined #ruby
[09:16:36] jhass: https://gist.github.com/anonymous/2be41cd6f103611fc885#file-zabbixsync-rb-L235 just make that your default, it won't be evaluated if an argument is given
[09:16:44] leafybasil: has joined #ruby
[09:16:48] jhass: Array.new -> []
[09:17:03] shevy: a lambda!
[09:17:35] leafybasil: has joined #ruby
[09:17:38] jhass: calling a method that sets @templates_list every time it's called and then relying on @templates_list being set is quite horrible, just return the value from that method
[09:19:38] leafybasil: has joined #ruby
[09:20:20] arup_r: has joined #ruby
[09:22:05] piotrj: has joined #ruby
[09:22:17] ta: has joined #ruby
[09:22:54] tuor: jhass, ok the abstraction thing would be biger changes, so i begin with the other stuff. I'll be back.
[09:24:17] [k-: has joined #ruby
[09:24:23] DoubleMalt: has joined #ruby
[09:24:38] pepperbreath: has left #ruby: ()
[09:26:04] stamina: has joined #ruby
[09:26:38] Kendos-Kenlen: has joined #ruby
[09:27:19] codecop: has joined #ruby
[09:28:27] VaibhavRajput: has joined #ruby
[09:28:35] VaibhavRajput: what is the different between file open with 'w' and FILE:RDWR mode
[09:29:22] shevy: what is FILE:RDWR
[09:29:25] [k-: readwrite is w+, or r+, or maybe a+
[09:29:37] [k-: a+ is append though
[09:29:56] S_Walker: has joined #ruby
[09:30:02] shevy: I found that I need only either w+ or a+
[09:30:17] canton7: 'w' is File::WRONLY|File::TRUNC|File::CREAT, apparently
[09:30:21] drptbl: has joined #ruby
[09:30:29] canton7: 'r+' is File::RDWR
[09:31:05] slayerjain: has joined #ruby
[09:31:25] astrobunny: has joined #ruby
[09:31:29] VaibhavRajput: Where will I get more details about File::WRONLY|File::TRUNC|File::CREAT
[09:31:58] ZucchiniZe: never fully learned ruby
[09:32:03] ZucchiniZe: it is awesome
[09:33:42] jhass: VaibhavRajput: RDONLY open read only, WRONLY open write only, RDWR open for reading and writing, TRUNC truncate (=empty file), CREAT = create (create if not exists)
[09:33:49] stamina: has joined #ruby
[09:34:16] [k-: wronly: write only, trunc: truncate, creat: create
[09:34:38] [k-: oh you have already said it :(
[09:34:39] jhass: you're too slow
[09:35:13] VaibhavRajput: jhass, Thanks :)
[09:35:14] arup_r: VaibhavRajput: There you go : http://ruby-doc.org/core-2.0.0/File/Constants.html
[09:35:18] [k-: i didn't even caps the words
[09:36:30] jhass: VaibhavRajput: but most people just use r, w, a, r+, rb, wb, w+b
[09:36:39] adaedra: [k-: can't beat german efficiency.
[09:36:42] jhass: ab I guess
[09:37:19] jhass: r being the default, so you rarely see it in code actually
[09:37:23] burgestrand: has joined #ruby
[09:37:35] liquidmetal: has joined #ruby
[09:38:33] piotrj: has joined #ruby
[09:38:34] bronson: has joined #ruby
[09:41:11] lkba_: has joined #ruby
[09:41:17] [k-: i use w+
[09:41:27] iamninja_: has joined #ruby
[09:42:07] northfurr: has joined #ruby
[09:42:33] adaedra: I use what suits the situation.
[09:43:18] codecop: has joined #ruby
[09:43:22] jhass: adaedra: how dare you! being reasonable!
[09:44:06] ruurd: has joined #ruby
[09:45:04] RegulationD: has joined #ruby
[09:47:21] VaibhavRajput: I have multiple thread which is writing and reading into the same file. I wanted to truncate file before writing into it at the same time other thread can read it. I have added File::LOCK_EX. The issue which I am facing is if two thread tries to write into same file the thread truncate the file write it successfully but the second one will just prepend the content followed by first thread content. gist : https://gist.github.com/rajp
[09:47:21] VaibhavRajput: utvai/e8b940555d3dfc71a02b
[09:47:31] VaibhavRajput: gist https://gist.github.com/rajputvai/e8b940555d3dfc71a02b
[09:47:37] slayerjain: has joined #ruby
[09:50:39] emilkarl: has joined #ruby
[09:51:25] robbyoconnor: has joined #ruby
[09:51:32] drbrain: has joined #ruby
[09:51:58] rikkipitt: has joined #ruby
[09:53:03] Flying_Squirrel: has joined #ruby
[09:53:39] pawnbox: has joined #ruby
[09:55:10] jenrzzz: has joined #ruby
[09:57:39] tsujp: has joined #ruby
[09:57:59] bruno-: has joined #ruby
[09:59:01] k3asd`: has joined #ruby
[10:00:18] vF3hNGxc47h8: has joined #ruby
[10:02:13] lolmaus: has joined #ruby
[10:02:17] bigbadbear: has joined #ruby
[10:03:25] xxneolithicxx: has joined #ruby
[10:04:38] skade: has joined #ruby
[10:06:57] certainty: moin moin moin
[10:07:30] jhass: VaibhavRajput: wild guess, but seek to the start after obtaining the lock?
[10:07:32] JaReAx: has joined #ruby
[10:07:34] moeabdol: has joined #ruby
[10:07:56] CloCkWeRX: has joined #ruby
[10:08:02] jhass: or the end, rereading
[10:08:11] VaibhavRajput: jhass, can you please elaborate.
[10:08:34] beast: has joined #ruby
[10:09:05] piotrj: has joined #ruby
[10:09:08] jhass: f.seek(0, IO::SEEK_END)
[10:10:02] DoubleMalt: has joined #ruby
[10:10:29] drptbl: has joined #ruby
[10:11:35] Kero: has joined #ruby
[10:12:30] dmolina: has joined #ruby
[10:13:07] tuor: jhass, so i did some changes: https://gist.github.com/anonymous/b63c98f2f204fd75ce98 (I don't know how to show diff between 2 pastes....)
[10:13:26] jhass: tuor: you simply edit the first one
[10:13:30] jhass: then you get revisions with diff
[10:13:43] tuor: jhass, ah.
[10:14:00] jhass: I still don't like calling it check_...
[10:14:16] jhass: it's not an action, you ask them for a true/false thing
[10:14:58] devoldmx: has joined #ruby
[10:15:30] jhass: why do you assign @templates_list at all?
[10:17:56] tuor: jhass, better looking... https://gist.github.com/nod0n/e9db3cb04b4eb5557027/revisions
[10:18:13] adaedra: quit_rails: what are you doing
[10:18:32] tuor: jhass, i didn't change the names of all the methods because i want to rethink about how to do it and then directly rewrite with better names.
[10:18:45] tuor: I just want to do all the other stuff first.
[10:19:14] quit_rails: adaedra: nothing.. just bored.. :(
[10:19:43] adaedra: quit_rails: you do realize it's a bit annoying to have all your nick changes in all channels?
[10:19:53] rickmasta: has joined #ruby
[10:20:03] tuor: To assign to @templates_list comes with how I used it befor. I just didn't removed it (because I don't checked if it's realy changed every where)
[10:20:12] dravine: has joined #ruby
[10:20:13] quit_rails: adaedra: not aware of.. sorry
[10:20:26] ericjphillips: has joined #ruby
[10:20:27] shevy: tuor I found that this can happen in big projects
[10:20:39] quit_rails: I was just testing the command.. how it works..
[10:20:49] shevy: like when you end up with 20 @instance vars, then change a lot of stuff... suddenly you realize that you only need 15 of them at maximum after the rewrite
[10:22:36] Xeago: has joined #ruby
[10:22:39] tuor: ACTION is working on list_templates.
[10:22:59] tjbiddle: has joined #ruby
[10:24:59] drewvanstone: has joined #ruby
[10:28:01] tuor: jhass, so the list_templates is cleaned a little bit up: https://gist.github.com/nod0n/e9db3cb04b4eb5557027
[10:28:14] sanjayu: has joined #ruby
[10:28:35] darkf: has joined #ruby
[10:29:44] tuor: I'll have a breake and then try to rewrite the options stuff. Cu later. Thx for your help jhass! :)
[10:30:35] piotrj: has joined #ruby
[10:33:02] piotrj: has joined #ruby
[10:34:47] ruurd: has joined #ruby
[10:36:20] y_gick: has joined #ruby
[10:36:24] y_gick: ahhhhhhhhhhhhh
[10:36:31] y_gick: pinterest unveilled its API
[10:37:08] y_gick: goodbye headache with AJAX and reversing :)))
[10:37:46] [k-: copper later
[10:37:58] [k-: he wants to get poisoned???!
[10:39:30] bronson: has joined #ruby
[10:41:23] arup_r: has joined #ruby
[10:42:21] voker57: has joined #ruby
[10:43:24] sdothum: has joined #ruby
[10:43:57] alexherbo2: has joined #ruby
[10:44:25] AlexRussia: has joined #ruby
[10:49:30] Cyther_: has joined #ruby
[10:50:04] ndrei: has joined #ruby
[10:50:48] pawnbox: has joined #ruby
[10:54:54] keen___________0: has joined #ruby
[10:54:55] ruurd: has joined #ruby
[10:55:58] diegobiavati: has joined #ruby
[10:56:59] elfuego: has joined #ruby
[10:58:30] Anti-Pizza: has joined #ruby
[10:59:03] solocshaw: has joined #ruby
[11:01:27] psye: has joined #ruby
[11:01:38] davedev24: has joined #ruby
[11:01:50] relix_: has joined #ruby
[11:02:02] bruno-: has joined #ruby
[11:02:10] diegobiavati_: has joined #ruby
[11:02:16] DaniG2k: has joined #ruby
[11:02:29] Rollabunna: has joined #ruby
[11:06:29] nettoweb: has joined #ruby
[11:06:31] charliesome: has joined #ruby
[11:07:21] shevy: [k- less haskell, more ruby!
[11:07:52] Scripore: has joined #ruby
[11:07:54] phutchins1: has joined #ruby
[11:08:36] moeabdol: has joined #ruby
[11:08:58] tkuchiki: has joined #ruby
[11:09:40] psye: has joined #ruby
[11:10:11] FernandoBasso: has joined #ruby
[11:12:30] lkba: has joined #ruby
[11:12:58] varunwachaspati: has joined #ruby
[11:13:07] workmad3_: has joined #ruby
[11:13:24] last_staff: has joined #ruby
[11:15:04] but3k4: has joined #ruby
[11:15:10] piotrj: has joined #ruby
[11:17:12] bruno-: has joined #ruby
[11:17:46] Zai00: has joined #ruby
[11:19:07] burgestrand: has joined #ruby
[11:22:26] darkf: has joined #ruby
[11:25:15] [k-: I've not touched the computer, for longer than Ox0dea was gone
[11:25:20] InternetFriend: has joined #ruby
[11:25:39] pepperbreath: has joined #ruby
[11:26:47] jhass: so, every expression in Ruby has a value right?
[11:27:54] arturmartins: has joined #ruby
[11:28:35] but3k4: has joined #ruby
[11:29:11] emilkarl: has joined #ruby
[11:29:12] JaRe_Ax: has joined #ruby
[11:30:03] [k-: yes, an expression is not a statement
[11:30:10] syath: has joined #ruby
[11:30:40] cih: has joined #ruby
[11:32:01] jhass: which statement (in Ruby) is not an expression?
[11:32:15] jhass: besides __END__, if you want to call that a statement
[11:32:55] [k-: i don't know any examples
[11:33:05] ericjphillips: has joined #ruby
[11:33:25] [k-: maybe quickref has something?
[11:33:26] jhass: but you still claim there are any?
[11:34:57] quazimodo: has joined #ruby
[11:36:07] [k-: if i claimed there weren't any, that might be wrong too
[11:36:21] livcd: has joined #ruby
[11:36:22] allomov: has joined #ruby
[11:36:45] Xeago: has joined #ruby
[11:37:17] eam: jhass: well, there are all sorts of statements that aren't expressions (because they raise SyntaxError) right?
[11:39:06] jhass: well, syntactically valid of course
[11:39:37] eam: but it's syntactically valid to raise (and handle) SyntaxError in ruby because ruby is dynamic
[11:39:41] ldnunes: has joined #ruby
[11:39:58] eam: in some languages that's not the case
[11:44:06] dhjondoh: has joined #ruby
[11:44:26] [k-: maybe a raise is a statement
[11:44:42] jhass: &ri Kernel#raise
[11:44:42] `derpy: http://www.rubydoc.info/stdlib/core/Kernel#raise-instance_method
[11:45:18] jhass: but this brings us to my motivation
[11:45:37] jhass: raise (and Kernel#exit too) is a call, an expression. But what is its value?
[11:46:06] eam: exit! has no value
[11:46:22] eam: (to ruby)
[11:47:02] JDiPierro: has joined #ruby
[11:47:10] certainty: well any value i guess
[11:47:11] allomov: has joined #ruby
[11:47:30] [k-: bottom?
[11:47:47] certainty: technically it's bottom
[11:48:55] eam: who's bottom?
[11:49:01] favadi: has joined #ruby
[11:49:01] shevy: ACTION raises hand
[11:49:10] ruboto: shevy is the hound of baskerville (see http://irclog.whitequark.org/ruby/2015-08-13#13699759)
[11:49:20] jhass: ruboto thinks otherwise
[11:49:26] certainty: bottom is a computation that never completes successfully. See https://wiki.haskell.org/Bottom
[11:50:26] drptbl: has joined #ruby
[11:53:03] shevy: hmm is there a way to find out if a file is "binary or text file"? I need to do "cat input_file_here", but only if it is a text file, "cat foo.mp3" does not give me a lot of useful things
[11:53:50] jhass: file is pretty good in detecting ascii
[11:53:51] Cyther: has joined #ruby
[11:54:53] tsujp: has joined #ruby
[11:57:26] burgestrand: shevy: why only if it is a text file?
[11:58:06] shevy: because when I display it on the commandline, "cat foo.mp3" yields nothing useful whereas "cat foo.txt" would
[11:58:48] axiomatic_345: has joined #ruby
[11:58:57] burgestrand: Maybe foo.txt is just gibberish?
[11:59:46] p0wn3d: has joined #ruby
[11:59:49] burgestrand: How do you know?
[11:59:58] k3asd`: has joined #ruby
[12:00:05] shevy: do you store mp3 files in foo.txt or something?
[12:00:44] devoldmx: has joined #ruby
[12:01:11] burgestrand: Point being the extension is sufficient to know if it's printable?
[12:01:14] joonty: has joined #ruby
[12:01:20] shevy: of course
[12:02:45] burgestrand: shevy: You can find out if it's a binary or text file by looking at the extension, so only cat files that aren't mp3!
[12:03:01] prestorium: has joined #ruby
[12:03:13] shevy: that is insane
[12:03:30] burgestrand: So are platypuses.
[12:04:57] certainty: i like them
[12:05:08] Scripore: has joined #ruby
[12:06:28] bruno-: has joined #ruby
[12:06:58] konsolebox: has joined #ruby
[12:07:00] cih_: has joined #ruby
[12:07:18] _el_fer_: has joined #ruby
[12:07:44] konsolebox: has joined #ruby
[12:09:55] darkf: has joined #ruby
[12:10:39] dhjondoh: has joined #ruby
[12:11:04] platzhirsch: has joined #ruby
[12:11:32] tiredcat: has joined #ruby
[12:12:00] pawnbox: has joined #ruby
[12:12:01] OrbitalKitten: has joined #ruby
[12:12:44] amystephen: has joined #ruby
[12:12:45] rbennacer: has joined #ruby
[12:14:35] pawnbox: has joined #ruby
[12:15:47] shevy: fun note: http://help.collab.net/index.jsp?topic=/faq/svnbinary.html
[12:17:14] Jardayn: has joined #ruby
[12:22:57] Cyther_: has joined #ruby
[12:23:32] Flying_Squirrel: has joined #ruby
[12:24:02] axiomatic_345: has joined #ruby
[12:24:36] TvL2386: has joined #ruby
[12:26:19] cassioscabral: has joined #ruby
[12:26:26] DrCode: has joined #ruby
[12:27:43] asxbr: has joined #ruby
[12:28:15] oddmunds: shevy: so file(1)?
[12:28:33] The_Phoenix: has joined #ruby
[12:28:41] asxbr: has joined #ruby
[12:29:19] The_Phoenix: has joined #ruby
[12:30:19] The_Phoenix: has joined #ruby
[12:31:31] The_Phoenix: has joined #ruby
[12:31:42] favadi: has joined #ruby
[12:32:49] The_Phoenix: has joined #ruby
[12:33:19] relix: has joined #ruby
[12:33:58] but3k4_: has joined #ruby
[12:34:01] The_Phoenix: has joined #ruby
[12:37:31] Klamber|ext: has joined #ruby
[12:38:32] DoubleMalt: has joined #ruby
[12:39:16] shevy: oddmunds yeah
[12:39:58] tobiasvl: hey oddmunds
[12:40:28] Klamber|ext: Hey! I have a question about passing by values and references. I searched and found out that Ruby is pass by value. I can understand how that sometimes looks like pass by reference when you pass a object because you actually pass the "pointer" to a function. But is there a way to pass a variable to function and get a value back eg. pass by reference on variables. Or should I create a class just to hack around that ? (Ask if unclear)
[12:40:30] oddmunds: tobiasvl: heysways
[12:41:17] bronson: has joined #ruby
[12:41:46] pawnbox_: has joined #ruby
[12:42:30] Klamber|ext: I want my function modify a variable passed to it.
[12:43:12] jcromartie: has joined #ruby
[12:43:30] shevy: Klamber|ext isn't that the default? anyway, you should always be able to clone strings for a new string object via .dup
[12:43:49] llua: has left #ruby: ()
[12:43:56] shevy: >> def foo(i); i << 'world'; end; i = 'Hello '; foo(i); i
[12:43:57] ruboto: shevy # => "Hello world" (https://eval.in/441592)
[12:44:20] quazimodo: has joined #ruby
[12:44:22] workmad3_: has joined #ruby
[12:44:28] shevy: I still have not fully understood immutable strings
[12:44:42] [k-: like you don't with Unicode
[12:45:01] pheuko: has joined #ruby
[12:45:56] [k-: pass a variable to a function and get a value back?
[12:46:00] yokel: has joined #ruby
[12:46:56] Klamber|ext: [k-: For example... function returns some data, but I also pass a state parameter. I want to get the data returned by function and also read if state was changed.
[12:47:15] certainty: shevy: what's hard to understand about immutable strings? It's strings you can't mutate
[12:48:02] [k-: Klamber|ext: did you come from languages like haskell by any chance?
[12:48:15] roxtrongo: has joined #ruby
[12:48:57] [k-: or are you embracing functional programming in Ruby
[12:49:04] Klamber|ext: [k-: Nope. Just used to pointers and sutch.
[12:49:17] sdwrage: has joined #ruby
[12:49:36] adaedra: Klamber|ext: you can return multiple things in ruby, through an array.
[12:49:41] JaReAx: has joined #ruby
[12:49:46] nateberkopec: has joined #ruby
[12:49:56] Klamber|ext: adaedra: array seems pretty hakish..
[12:49:58] [k-: but that's generally not how you do things in Ruby
[12:50:02] adaedra: it's common here
[12:50:18] adaedra: and you can do `data, state = calc_data(state)`
[12:50:21] [k-: you could use a hash, or a struct
[12:50:51] Klamber|ext: Would a state object work ?
[12:51:04] Klamber|ext: I'll irb on it.. just a sec
[12:51:05] adaedra: It means you need to have a way of modifying the object in place.
[12:51:43] Xeago: has joined #ruby
[12:51:51] ndrei: has joined #ruby
[12:51:58] drewvanstone: has joined #ruby
[12:52:21] [k-: how would you know the state has changed if the original state changed under your belt?
[12:52:35] [k-: you won't be able to compare them
[12:52:48] jhass: Klamber|ext: who said it's pass by value? it's entirely pass by reference
[12:52:55] [k-: true, false would be enough
[12:53:03] atomical: has joined #ruby
[12:53:46] jhass: well or all variables are pointers and they're passed by value if that fits your model better
[12:53:52] jhass: but the objects don't get copied
[12:54:00] oddmunds: in elixir, it's common to always return tuples like {:ok, data} = calc_data
[12:54:02] certainty: i think that what he was trying to say
[12:54:15] rickmasta: has joined #ruby
[12:54:47] [k-: is that pattern matching on :ok?
[12:55:24] bruno-: has joined #ruby
[12:55:32] Klamber|ext: hm.. Maybe I was thinking like C on that.. In Ruby you can raise exceptions, can't you ?
[12:56:13] eam: certainty: exit! does complete successfully. But its side effect is that it terminates ruby and thus all values
[12:56:34] eam: it returns a non-ruby value to the parent process
[12:56:38] moeabdol: has joined #ruby
[12:57:53] Klamber|ext: Well in my case I tested that I made a class and passed that alongside my other stuff to function then it becomes pretty easy..
[12:58:02] Klamber|ext: I might go with that right now..
[12:58:34] Xeago: has joined #ruby
[12:59:13] certainty: eam: yes exit does. I was referring to raise
[12:59:17] jhass: Klamber|ext: that sounds kinda like all your other stuff should be inside that class
[12:59:17] decoponio: has joined #ruby
[12:59:38] jhass: or a couple of them
[13:00:40] [k-: we cant provide more help due to the lack of context so..
[13:00:54] bmurt: has joined #ruby
[13:01:28] devoldmx: has joined #ruby
[13:01:39] Klamber|ext: [k-: I understand. I was just asking if there is a way for the function to modify it's parameter so after function ends the parameter value changes remain.
[13:02:17] jhass: sorry but that wish demonstrates a severe lack of using OOP paradigms
[13:02:26] `tim`: has joined #ruby
[13:02:30] Klamber|ext: Like in other languages you can pass by reference or a pointer.
[13:02:42] Klamber|ext: jhass: That might be.
[13:03:11] [k-: it feels very awkward to me, does not fit in Ruby somehow
[13:03:14] jhass: hence the motivation for my "use more classes" statement
[13:03:25] Rollabunna: has joined #ruby
[13:03:33] porfa: has joined #ruby
[13:03:44] jhass: a class is not just a struct you pass a around
[13:03:45] skweek: has joined #ruby
[13:04:02] jhass: well, not limited to
[13:04:10] Klamber|ext: not saying so..
[13:04:33] jhass: but yeah, probably can't argue this properly without context
[13:05:49] InternetFriend: has joined #ruby
[13:05:52] phutchins1: has joined #ruby
[13:06:35] Axy: has joined #ruby
[13:07:10] Klamber|ext: For more context. I have a recursive function. I need to know if it's branches found something. There is always someting in the end of one branch. But as recursion starts to end it's cycles i want to know what branch had the thing i was searching. And to do that i thought i would passs a variable that gets changed to true or smth. So I would know after each recursive call if that branch is the link to the thing I'm looking for. That came out a
[13:07:52] adaedra: Return multiple things!
[13:08:26] pandaant: has joined #ruby
[13:08:31] Klamber|ext: adaedra: And is that the right use of OO ?
[13:08:46] jhass: IRC has a message length limit of 510 bytes, that includes your prefix, so count with about 450
[13:08:55] kobain: has joined #ruby
[13:09:03] adaedra: The current branch is not really to be saved into the object?
[13:09:23] jhass: one could argue it is since you're returning an object that's a composition of the values you care about
[13:09:33] SylarRuby: has joined #ruby
[13:09:44] Klamber|ext: Eash brancjh link needs to know if it's on the path to "happyness" :D
[13:09:56] jhass: build a tree?
[13:10:12] jhass: mh, or a linked list rather
[13:10:18] burgestrand: has joined #ruby
[13:10:22] Klamber|ext: I wish i had came out with that simple explanation. Yes a tree!
[13:10:56] jhass: so just build up an array of nodes that forms the path perhaps?
[13:11:30] Klamber|ext: Yes, pretty mutch.
[13:11:35] JDiPierro: has joined #ruby
[13:11:53] felixr: has joined #ruby
[13:11:54] Klamber|ext: But there is no need for the path to be saved in some different variable.
[13:11:57] jhass: so [node] + build_path(node)
[13:12:09] yorickpeterse: ergh, this idea of "MRI == not having to synchronize" is utterly broken
[13:12:23] yorickpeterse: e.g. seems concurrent-ruby also made that mistake
[13:12:55] whippythellama: has joined #ruby
[13:12:58] cisco: has joined #ruby
[13:13:14] jhass: then each_cons(2) == pairs with good links between them
[13:13:34] malconis: has joined #ruby
[13:13:36] shinnya: has joined #ruby
[13:13:45] nfk|laptop: has joined #ruby
[13:14:02] funkenstrahlen: hey, I got account.videos which returns a list of video objects. I know want to have a account.videos.contains for a video title which can be accessed by video.title
[13:14:07] funkenstrahlen: how can I do this in ruby syntax?
[13:14:08] pheuko: has joined #ruby
[13:14:09] noethics: has joined #ruby
[13:14:41] soc42: has joined #ruby
[13:14:57] jhass: funkenstrahlen: .select or .find {|video| video.title == title } ?
[13:15:12] jhass: your question isn't too clear
[13:15:26] favadi: has joined #ruby
[13:15:42] sgambino: has joined #ruby
[13:16:03] [k-_: has joined #ruby
[13:16:23] dirtyonekanobi: has joined #ruby
[13:16:24] Klamber|ext: jhass: I'll keep that each_cons thingy in mind. (Ruby is new for me)
[13:16:39] jhass: Klamber|ext: just yields each n consecutive items
[13:17:36] funkenstrahlen: jhass: I want something like your .find example but with a simple true or false answer for 'does it contain the video.title video element'
[13:17:46] jhass: funkenstrahlen: that's any?
[13:17:48] govg: has joined #ruby
[13:18:22] shevy: certainty yeah so the above code would not work as-is right?
[13:18:36] jhass: &ri Enumerable#any? @funkenstrahlen
[13:18:36] `derpy: funkenstrahlen: http://www.rubydoc.info/stdlib/core/Enumerable#any%3F-instance_method
[13:18:47] catphish_: has joined #ruby
[13:18:52] evanjs: has joined #ruby
[13:19:12] catphish_: kinda specific question, does anyone know how to make OpenSSL::SSL::SSLContext honor the cipher order you give it?
[13:20:09] moeabdol: has joined #ruby
[13:20:29] Pathfinder: has joined #ruby
[13:20:44] funkenstrahlen: jhass `derpy thank you guys. have it working
[13:20:52] jhass: ?guys funkenstrahlen
[13:20:52] ruboto: funkenstrahlen, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[13:21:08] jhass: adaedra: does `derpy feel like a guy?
[13:21:50] shevy: funkenstrahlen is a mighty nick... almost as mighty as platzhirsch, flughafen and Papierkorb ... we also used to have brotspinne
[13:21:54] casadei: has joined #ruby
[13:22:29] Klamber|ext: jhass: Coming back from smoke, I relized that but still a useful thingy..
[13:22:50] shevy: smoking lowers coding productivity!
[13:23:01] favadi: has joined #ruby
[13:23:08] certainty: coding lowers smoking productivity!
[13:23:40] jhass: productivity lowers smoking coding!
[13:23:48] ndrei: has joined #ruby
[13:24:15] Leef_: has joined #ruby
[13:24:16] adaedra: >> %w[smoking lowers coding productivity].shuffle
[13:24:17] ruboto: adaedra # => ["productivity", "smoking", "lowers", "coding"] (https://eval.in/441616)
[13:24:26] _el_fer_: has joined #ruby
[13:24:27] shevy: you coded yoda adaedra
[13:24:36] Igorshp: has joined #ruby
[13:24:38] adaedra: is it a valid sentence
[13:24:41] certainty: yoda never spoke in arrays
[13:24:46] krz: has joined #ruby
[13:24:46] rbennacer: has joined #ruby
[13:24:47] shevy: but in riddles!
[13:24:47] burgestrand: has joined #ruby
[13:24:47] imperator: has joined #ruby
[13:24:52] porfa: has joined #ruby
[13:25:05] lxsameer: has joined #ruby
[13:25:05] lxsameer: has joined #ruby
[13:25:09] `derpy: ACTION does the bot dance
[13:25:12] certainty: that was the riddler
[13:25:13] tno: has joined #ruby
[13:25:27] victortyau: has joined #ruby
[13:26:05] WajidKagzi: has joined #ruby
[13:26:22] Klamber|ext: Smoking is bad mkay..
[13:26:32] rbennacer: has joined #ruby
[13:27:04] WajidKagzi: could someone please help me with this problem
[13:27:06] WajidKagzi: https://eval.in/434487
[13:27:24] shevy: oh a divmod question
[13:27:27] shevy: jhass is a divmod expert
[13:27:46] WajidKagzi: i understand all of it except the a+b part at the last line
[13:27:58] shevy: ok what should the output be? of the p divmod(15.5, -3.5)
[13:28:07] shevy: let me fetch my irb calculator!!!
[13:28:15] WajidKagzi: well lets do divmod(6, 2)
[13:28:20] ericjphillips: has joined #ruby
[13:28:24] YankNYC: has joined #ruby
[13:28:24] WajidKagzi: answer should be [3, 0]
[13:28:29] WajidKagzi: based on the return statement
[13:28:40] WajidKagzi: and that is what it returns
[13:28:43] DrCode: has joined #ruby
[13:28:59] WajidKagzi: i just dont understand how a has a value of -2 at the end of the while loop
[13:29:43] [k-_: >> 15.5 / -3.5
[13:29:44] ruboto: [k-_ # => -4.428571428571429 (https://eval.in/441617)
[13:29:57] [k-_: i thought that was three :/
[13:29:58] jhass: WajidKagzi: the a -=b is still executed, when a becomes negative, the loop stops
[13:30:08] jhass: not before, when
[13:30:23] shevy: [k-_ hah I thought so too! ... negative numbers trick me
[13:30:48] WajidKagzi: so it still executes until the statement is not true
[13:31:02] [k-_: hm, 15/3 is 5
[13:31:04] jhass: yes, and the a+b simply reverses that last execution
[13:31:17] WajidKagzi: okie dokie, cool beans
[13:31:24] WajidKagzi: thank you awesome rubyists
[13:31:33] WajidKagzi: @jhass and @shevy
[13:31:51] shevy: yep, he was a divmod expert
[13:31:54] tkuchiki: has joined #ruby
[13:32:10] jhass: shevy: but it had nothing to do with divmod
[13:32:29] shevy: only a real divmod expert would be able to realize that
[13:33:19] elfuego: has joined #ruby
[13:33:27] spcmastertim: has joined #ruby
[13:34:31] Flying_Squirrel: has joined #ruby
[13:34:47] d10n-work: has joined #ruby
[13:36:02] mary5030: has joined #ruby
[13:38:15] cih: has joined #ruby
[13:39:30] valeri_ufo: has joined #ruby
[13:39:40] devdazed: has joined #ruby
[13:39:41] Xeago: has joined #ruby
[13:39:45] govg: has joined #ruby
[13:41:43] vF3hNGxc47h8: has joined #ruby
[13:42:11] bronson: has joined #ruby
[13:42:34] freerobby: has joined #ruby
[13:44:35] chipotle: has joined #ruby
[13:45:22] govg: has joined #ruby
[13:45:39] porfa: hmmmm is it possible to advance a line/step in pry ? how?
[13:45:50] umgrosscol: has joined #ruby
[13:46:36] RegulationD: has joined #ruby
[13:46:39] JDiPierro: has joined #ruby
[13:46:40] jhass: Porfa: you might also like pry-byebug & pry-stack_explorer
[13:46:49] beauby: has joined #ruby
[13:47:03] norm: has joined #ruby
[13:48:30] norm: i???ve got multiple sources in my Gemfile (https://gist.github.com/anonymous/ebe34b14394d050773c1). in this example, my_custom_gem has dependencies that need to be pulled from rubygems.org
[13:49:00] norm: but ???bundle install??? is complaining that it can???t find the dependencies in repo.example.com. it???s not going to the global repo
[13:49:13] ngscheurich: has joined #ruby
[13:49:14] norm: the docs imply that it should look at the global source. am i missing something?
[13:49:39] jhass: Norm: iirc you have to explicitly list them in the global section
[13:49:46] porfa: thank you for the suggestion jhass , checking it out now :D
[13:50:03] norm: jhass: hmm, that???s a bummer
[13:50:06] jhass: sounds cumbersome, but trying magic there made the resolution incredibly opaque and bug prone
[13:51:16] CloCkWeRX: has joined #ruby
[13:51:30] jhass: Norm: mmh, bundle help gemfile still claims it falls back to the global source though
[13:51:38] norm: jhass: yeah
[13:51:47] [k-_: there is also pry-timemachine i think
[13:51:47] jhass: might be a doc bug I guess
[13:51:55] norm: jhass: check out http://bundler.io/v1.9/man/gemfile.5.html#SOURCE-PRIORITY
[13:52:01] [k-_: what's the pry time thinf
[13:52:51] jhass: Norm: yeah I'm there
[13:53:03] [k-_: oh it's pry-timetravel
[13:53:33] yardenbar: has joined #ruby
[13:53:40] jhass: Norm: https://github.com/bundler/bundler/blob/master/CHANGELOG.md#180-2015-02-10
[13:53:54] jhass: and I can't spot an entry later reversing that change, mmh
[13:54:00] jhass: which version do you use?
[13:55:07] norm: 1.10.6 :)
[13:55:22] jhass: shrug, raise an issue
[13:55:39] jhass: and for now explicitly listing them global should work around
[13:55:39] norm: yep, will do. thanks
[13:58:16] favadi: has joined #ruby
[13:58:28] Xeago: has joined #ruby
[13:58:41] axiomatic_345: has joined #ruby
[13:59:04] jenrzzz: has joined #ruby
[13:59:59] dhollinger: has joined #ruby
[14:00:19] emilkarl: has joined #ruby
[14:00:50] Xeago: has joined #ruby
[14:02:09] betsoff: has joined #ruby
[14:02:15] devoldmx: has joined #ruby
[14:05:17] BTRE: has joined #ruby
[14:06:38] hashrocket: has joined #ruby
[14:06:51] theRoUS: suppose i want to create a gem that's subordinate to an existing namespace? specifically, there's already a 'gitolite' gem, but i want to port gitolite3's Gitolite::Easy to ruby.
[14:07:43] dorei: has joined #ruby
[14:09:12] theRoUS: is it acceptable practice to just lay claim to the Gitolite::Easy namespace (e.g., with 'bundle gem gitolite-easy') ?
[14:09:23] adaedra: I think so
[14:10:00] apeiros: theRoUS: IMO ask the author
[14:10:25] apeiros: theRoUS: also be prepared that the author (of gitolite) may override yours at any time
[14:11:03] theRoUS: apeiros: 's what i figured; contacting/coordinating with both would be polite :-)
[14:11:32] niftylettuce: has joined #ruby
[14:12:18] favadi: has joined #ruby
[14:12:18] unsymbol: has joined #ruby
[14:13:48] southpawlar: has joined #ruby
[14:14:02] nfk|laptop: has joined #ruby
[14:14:17] icmax: has joined #ruby
[14:14:25] icmax: has left #ruby: ()
[14:16:05] greenarrow: has joined #ruby
[14:18:22] andyrs: has joined #ruby
[14:19:59] cornerma1: has joined #ruby
[14:21:23] ta: has joined #ruby
[14:21:32] shevy: theRoUS should be trivial; I think you can check whether the Easy namespace exists, and if it does not, you can add to it, so you can guarantee that your modifications should not conflict with the default gitolite gem
[14:21:39] diegobiavati_: has joined #ruby
[14:21:42] diegobiavati: has joined #ruby
[14:22:23] Xeago: has joined #ruby
[14:22:33] mallu: has joined #ruby
[14:23:47] nateberkopec: has joined #ruby
[14:23:58] Siyfion: has joined #ruby
[14:24:47] newtonianb: has joined #ruby
[14:24:58] bruno-: has joined #ruby
[14:25:58] porfa: hey, I'm cross helping on this one, i just don't get much feedback in the selenium channel, and since it's a well known gem i might get my help here??? my question is: when i want to put text into a box i use .sendkeys, but it doesn't remove what's there, for that i have to .clear first.
[14:26:34] porfa: my real question is, can i actually .sendkeys BEFORE the existing text?
[14:27:03] porfa: i can put the existing text in a var, and send keys wtv + var, but I'm just wondering if there is another way
[14:27:35] gregf_: s/ajudando/posting/ ;)
[14:28:17] Anti-Pizza: has joined #ruby
[14:28:26] [k-_: that kind of thing is called prepending
[14:28:40] [k-_: you could look for synonyms
[14:29:05] shevy: well known gem hmm
[14:29:12] mghaig: has joined #ruby
[14:29:36] shevy: using variables to store stuff is good
[14:29:44] momomomomo: has joined #ruby
[14:29:50] FernandoBasso1: has joined #ruby
[14:29:55] dome22xl: has joined #ruby
[14:30:02] [k-_: that is ugly though
[14:30:30] noethics: has joined #ruby
[14:30:30] fastAndSlow: has joined #ruby
[14:30:31] mghaig: has left #ruby: ()
[14:31:32] dopie: has joined #ruby
[14:31:47] lolmaus_: has joined #ruby
[14:32:21] bigbadbear: has joined #ruby
[14:32:34] shevy: just call the variable _
[14:32:40] sanguisdex: has joined #ruby
[14:33:09] NeverDie: has joined #ruby
[14:33:27] imperator: has left #ruby: ("Leaving")
[14:34:02] cassioscabral: has joined #ruby
[14:34:29] tenderlove: has joined #ruby
[14:35:39] arup_r: has joined #ruby
[14:38:15] bruno-: has joined #ruby
[14:38:17] ericjphillips: has joined #ruby
[14:38:19] K1MOS: has joined #ruby
[14:38:53] varunwachaspati: has joined #ruby
[14:39:12] sanguisdex: has joined #ruby
[14:39:23] K1MOS: question in php I can do $var[hostname] = array('lastSeen' => $var, 'counter' => $var[$hostname]['counter'] + 1); how would i do that in ruby
[14:40:50] favadi: has joined #ruby
[14:40:52] apeiros: K1MOS: var[hostname] = {'last_seen' => var, 'counter' => var[hostname]['counter']+1}
[14:41:08] K1MOS: will that work in a while loop ?
[14:41:12] apeiros: though, if you have to ask this, you probably should consider reading a book before asking more questions
[14:41:31] apeiros: ok, definitively: read a book, or an online tutorial, or some other means of self-learning.
[14:41:39] K1MOS: I haven't touched ruby in about 3 years, so i'm rusty as all heck
[14:41:46] RegulationD: has joined #ruby
[14:42:09] apeiros: I gladly help with actual problems. But I don't want to teach you ruby.
[14:42:21] govg: has joined #ruby
[14:42:44] moeabdol: I wonder if any one has read "Rails 4 Test Prescriptions" by Noel Rappin?
[14:43:01] ruurd: has joined #ruby
[14:43:09] bronson: has joined #ruby
[14:43:09] apeiros: moeabdol: probably. likeliness of people over in #rubyonrails having read it is higher, though ;-)
[14:43:34] moeabdol: apeiros: already tried there...no luck :'(
[14:43:35] bruno-: has joined #ruby
[14:43:48] apeiros: moeabdol: well, what do you expect? it's a non-question.
[14:43:53] favadi: has joined #ruby
[14:43:54] apeiros: lots of "yes, me"?
[14:43:56] lolmaus: has joined #ruby
[14:44:20] BaroMeter: has joined #ruby
[14:44:49] moeabdol: apeiros: I was hoping to get a "was a great read" and ask about the code
[14:45:07] shevy: I did not read it \o/
[14:45:09] apeiros: then ask for whether somebody can recommend/disrecommend it
[14:45:31] apeiros: and/or if there's alternative books which can be recommended for <topic>
[14:46:15] moeabdol: apeiros: I already have the book, and read reviews about how good it "should" be
[14:46:25] icmax: has joined #ruby
[14:46:36] moeabdol: the thing is it seems like the book follows an example of one rails project
[14:46:43] ndrei: has joined #ruby
[14:46:58] moeabdol: and I want to follow the book
[14:47:34] moeabdol: and create a git repository of the project
[14:47:55] moeabdol: but I was wondering if the project can be diesected into different commits each being a chapter
[14:48:04] skweek: has joined #ruby
[14:48:10] icmax: What is a Mutex object used for?
[14:48:11] moeabdol: or different directories of chapters each has its own copy of the rails project
[14:48:19] moeabdol: I hope it makes sense!
[14:48:22] bruno-: has joined #ruby
[14:48:23] noethics: icmax, sychronization
[14:48:54] icmax: noethics: How does it work?
[14:49:11] apeiros: icmax: it blocks access for other threads
[14:49:26] apeiros: until the locking thread frees the lock again
[14:50:00] favadi: has joined #ruby
[14:50:05] Xeago: has joined #ruby
[14:50:29] noethics: note that mutexes aren't something specific to ruby
[14:50:36] noethics: you can find out "how they work" with a simple google search
[14:51:20] apeiros: moeabdol: since I don't have the book - no idea, sorry.
[14:51:36] icmax: noethics: Ok.
[14:51:36] moeabdol: apeiros: thanks anyways :)
[14:51:43] icmax: has left #ruby: ()
[14:52:02] agit0: has joined #ruby
[14:52:40] FrankD: has joined #ruby
[14:52:44] slawrence00: has joined #ruby
[14:52:52] sanguisdex: has joined #ruby
[14:53:11] OrbitalKitten: has joined #ruby
[14:54:32] ehth77: has joined #ruby
[14:54:45] spotted: has joined #ruby
[14:55:42] Klamber|ext: Hello, Deviad
[14:56:00] Deviad: I would like to know better how the whole thing of functions like .reverse! for example works
[14:56:04] cschneid_: has joined #ruby
[14:56:19] Deviad: like s.reverse! is accepted and it actually changes s
[14:56:31] Deviad: while for to_sym it does not work
[14:56:40] momomomomo: has joined #ruby
[14:56:51] shevy: it is mostly a convention for trailing !
[14:57:06] havenwood: has joined #ruby
[14:57:08] adaedra: methods ending by ! usually modify object in-place.
[14:57:22] apeiros: with to_sym, an additional limitation comes into play: strong typing
[14:57:30] apeiros: you can't change the class of an object in-place.
[14:57:31] Flying_Squirrel: has joined #ruby
[14:57:34] adaedra: when their counterpart without a ! will return a new, modified object, without modifying the origin.
[14:57:57] apeiros: and to_sym (except for Symbol#to_sym) returns an object of a different class. so that can't happen in-place.
[14:57:57] riotjones: has joined #ruby
[14:58:07] Deviad: OK I got it clear now
[14:58:41] Deviad: Ruby already does a great job considering that usually in other languages in case of arrays I can have only numbers or strings
[14:58:54] Deviad: Ruby accepts everything into an Array...
[14:59:02] bklane: has joined #ruby
[14:59:07] Deviad: you do not need to create new data structures like in java
[14:59:30] InternetFriend: has joined #ruby
[15:00:08] Deviad: I mean a new abstract data type
[15:00:15] shevy: java is like the business side of OOP
[15:00:17] cassioscabral: has joined #ruby
[15:00:22] adaedra: Ruby is dynamically typed, Deviad
[15:00:23] shevy: ruby is the artist side of OOP
[15:00:58] EminenceHC: has joined #ruby
[15:02:43] Deviad: At the moment I am learning ruby through codecademy.com however I would not dislike having a book for university students like those there are out there by Deitel for Java
[15:03:07] diegoviola: has joined #ruby
[15:03:59] TPBallbag: has joined #ruby
[15:04:13] Rollabunna: has joined #ruby
[15:04:27] renderful: has joined #ruby
[15:04:32] EminenceHC: has joined #ruby
[15:05:47] Deviad: Some of them are outdated, some of authors I dunno how much I can trust and if they teach me good programming principles...
[15:05:55] Deviad: some by authors*
[15:07:43] Zarthus: has joined #ruby
[15:08:20] southpawlar: has joined #ruby
[15:09:27] InternetFriend: has joined #ruby
[15:09:48] pipework: Deviad: There are books. Metaprogramming ruby, then The Well Grounded Rubyist, and mroe.
[15:09:59] piotrj: has joined #ruby
[15:11:26] havenwood: Deviad: The Second Edition of the Well-Grounded Rubyist is pretty recent.
[15:11:35] pipework: recent and decent!
[15:11:42] shevy: perl has secret operators: http://search.cpan.org/dist/perlsecret/lib/perlsecret.pod
[15:11:45] shevy: eam, did you know all of them?
[15:12:04] felixr: has joined #ruby
[15:12:13] shevy: Venus, Babycart and Inchworm. These make good interview questions.
[15:14:27] rpenguin: has joined #ruby
[15:14:39] rpenguin: has left #ruby: ()
[15:15:16] EminenceHC: has joined #ruby
[15:15:47] Deviad: Are there any open source projects for beginners that I could contribute to in order to improve my skills?
[15:16:10] chouhoulis: has joined #ruby
[15:16:26] momomomomo: has joined #ruby
[15:16:36] adaedra: Deviad: lots on GitHub.
[15:16:42] emilkarl: has joined #ruby
[15:16:56] chouhoulis: has joined #ruby
[15:17:01] pawnbox: has joined #ruby
[15:17:07] _djbkd: has joined #ruby
[15:17:25] _djbkd: has joined #ruby
[15:19:01] drewvanstone: has joined #ruby
[15:19:03] jobewan: has joined #ruby
[15:20:23] [k-_: you can help shevy with his enormous like of stuff
[15:20:33] [k-_: s/like/pile
[15:20:54] eam: shevy: yes, ruby has secret operators too
[15:21:32] cassioscabral: has joined #ruby
[15:21:34] [k-_: like what?
[15:22:21] TomyLobo: has joined #ruby
[15:23:24] bruno-: has joined #ruby
[15:25:13] dome22xl: It doesn' UFO's like the spaceship operator <=> but thats not exactly secret
[15:25:58] eam: [k-: well, a few are directly the same, like "bang bang"
[15:26:06] ruboto: eam # => true (https://eval.in/441666)
[15:26:13] [k-: those are secret??
[15:26:33] eam: [k-: not any more or less than in perl
[15:26:45] eam: this is just a list of usages that people gave names to
[15:27:47] eam: [*thing].each is probably one
[15:28:07] rippa: has joined #ruby
[15:29:25] dome22xl: each is a control scructure not and operator
[15:29:36] eam: dome22xl: right, and isn't part of it
[15:29:46] eam: it's there as an example of why you'd use the [*] operator
[15:29:56] eam: (with any iterator)
[15:30:00] spcmastertim: has joined #ruby
[15:30:51] dome22xl: Yes but operators are :===, :==, :<=>, :<, :<=, :>, :>= for example
[15:31:00] dome22xl: .each {|n| } is a scruture
[15:31:37] eam: dome22xl: I don't think you're following the point here
[15:31:55] eam: none of these "secret operators" are operators
[15:32:01] eam: and .each isn't what we're discussing anyway
[15:32:07] eGGsha: has joined #ruby
[15:32:31] catphish_: has left #ruby: ("Leaving")
[15:33:11] dome22xl: Well there all methods realy
[15:33:37] eam: in ruby, some operators are defined as methods, yes
[15:33:51] eam: that's an implementation detail
[15:33:53] rcvalle: has joined #ruby
[15:34:15] dome22xl: Yes are the are certains ones you can't override
[15:34:18] eam: and some operators are both methods and aren't methods, depending on particulars of syntax (like, positioning of whitespace)
[15:34:29] eam: it's really quite arbitrary
[15:34:47] ngscheurich: has joined #ruby
[15:35:19] dome22xl: see what your saying
[15:36:08] roshanavand: has joined #ruby
[15:36:19] davidhq: has joined #ruby
[15:36:29] bruno-: has joined #ruby
[15:36:33] [k-: ruby isn't too flexible though, no user defined operators, but that means codebases are much easier to work with
[15:37:10] thebastl: has joined #ruby
[15:37:18] Igorshp: has joined #ruby
[15:37:38] ericjphillips: has joined #ruby
[15:37:49] eam: I call this one the "negative four" operator:
[15:37:50] eam: >> 1-------------------------1
[15:37:52] ruboto: eam # => 0 (https://eval.in/441667)
[15:37:59] tiredcat: has joined #ruby
[15:38:22] [k-: >> 1---1
[15:38:23] ruboto: [k- # => 0 (https://eval.in/441668)
[15:38:43] [k-: i call this one, the negative three
[15:38:49] [k-: ha! beat that!
[15:39:08] eam: this is the "I hella agree" operator:
[15:39:10] eam: >> ++++++1
[15:39:11] ruboto: eam # => 1 (https://eval.in/441669)
[15:40:24] [k-: >> ++--+$$
[15:40:24] eam: ": :" could be an operator
[15:40:25] ruboto: [k- # => 10185 (https://eval.in/441670)
[15:40:33] eam: >> {a: :b}
[15:40:34] shevy: [k- hmm... my small projects don't really need any work ... and my big projects are either quite complicated, or in transition-phase of rewrites... nobody sane in mind wants to touch that until the code base is cleaner
[15:40:34] ruboto: eam # => {:a=>:b} (https://eval.in/441671)
[15:40:35] karapetyan: has joined #ruby
[15:40:54] eam: it's interesting that ruby requires whitespace between the ::
[15:41:47] symm-: has joined #ruby
[15:42:59] tiredcat: has joined #ruby
[15:44:03] bronson: has joined #ruby
[15:44:28] eam: I wonder why :%{123} doesn't work
[15:44:31] eam: seems like it ought to
[15:44:55] drewvanstone: has joined #ruby
[15:45:39] InternetFriend: has joined #ruby
[15:46:27] eam: >> % % % % % # the percent sign operator sequence
[15:46:28] ruboto: eam # => "%" (https://eval.in/441681)
[15:46:46] eam: >> % % % % % % % % # repeat as desired
[15:46:47] ruboto: eam # => "%" (https://eval.in/441682)
[15:47:09] eam: it's an operator of arbitrary length!
[15:47:19] benlieb: has joined #ruby
[15:47:24] [k-: >> /(?<_>.*)/=~??;_+_+_+_+_+_+_*$$
[15:47:25] shinnya: has joined #ruby
[15:47:25] ruboto: [k- # => "??????????????????????????????????????????????????????????????????????????????????????????????????? ...check link for more (https://eval.in/441684)
[15:47:42] eam: % does everything
[15:47:45] allcentury: has joined #ruby
[15:49:51] [Butch]: has joined #ruby
[15:50:11] diegobiavati: has joined #ruby
[15:51:07] pietr0: has joined #ruby
[15:51:27] [k-: >> /(?<_>.*)/=~??; "#{_}" '' "#{_}" '' "#{_}" '' "#{_}" '' "#{_}" '' * $$
[15:51:28] ruboto: [k- # => "??????????????????????????????????????????????????????????????????????????????????????????????????? ...check link for more (https://eval.in/441698)
[15:52:09] RxDx: has joined #ruby
[15:53:42] RxDx: please, is there anyway to POST/PUT and entity parameter name without the _attributes suffix? I mean.. why do I have to send beer_attributes {name: "foo"} if I receive beer {name: "bar"}?
[15:54:30] ericjphillips: has joined #ruby
[15:54:52] eam: >> %{#{%}#{%}#{%}#{%}#{%} -what- }}}}}}}}}}}
[15:54:53] ruboto: eam # => " -what- " (https://eval.in/441703)
[15:54:58] thebastl: has joined #ruby
[15:56:43] eam: 18>> ????::??
[15:56:44] ruboto: eam # => 58 (https://eval.in/441705)
[15:56:48] [k-: such mind trick
[15:56:54] [k-: very wow
[15:56:57] [k-: eam is best
[15:57:46] ruboto: apeiros # => ":" (https://eval.in/441706)
[15:57:48] ruboto: apeiros # => 58 (https://eval.in/441707)
[15:57:55] eam: apeiros: ;)
[15:57:57] [k-: %{ #{ (%} #stuff }) } }
[15:58:05] apeiros: eam: needs more !
[15:58:11] apeiros: and some %
[15:58:36] [k-: >> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!nil^nil
[15:58:36] gregf_: >> ":".ord
[15:58:37] ruboto: [k- # => false (https://eval.in/441709)
[15:58:37] ruboto: gregf_ # => 58 (https://eval.in/441709)
[15:58:46] platzhirsch: has left #ruby: ()
[15:58:49] Igorshp: has joined #ruby
[15:59:28] apeiros: >> !!%?%%??!!%:!!::%!??!
[15:59:29] ruboto: apeiros # => /tmp/execpad-2405e9993b90/source-2405e9993b90:2: warning: string literal in condition ...check link for more (https://eval.in/441710)
[15:59:39] apeiros: bah, stupid warning.
[15:59:41] eam: >> [????::??, !????::??, !????::?? - ????::??]
[15:59:42] ruboto: eam # => /tmp/execpad-08d76451920a/source-08d76451920a:2: warning: string literal in condition ...check link for more (https://eval.in/441711)
[15:59:45] eam: 18>> [????::??, !????::??, !????::?? - ????::??]
[15:59:45] apeiros: 18>> !!%?%%??!!%:!!::%!??!
[15:59:46] ruboto: eam # => [58, 63, 58] (https://eval.in/441713)
[15:59:46] ruboto: apeiros # => /tmp/execpad-7a7b7a385e2f/source-7a7b7a385e2f:2: warning: string literal in condition ...check link for more (https://eval.in/441713)
[15:59:56] apeiros: what? that warning existed in 1.8 already?
[15:59:59] A124: has joined #ruby
[16:00:08] eam: apeiros: it's not a string in 18
[16:00:22] p0wn3d: has joined #ruby
[16:00:23] apeiros: %?!!? is one ;-)
[16:00:26] Rollabunna: has joined #ruby
[16:00:47] eam: what I don't get is why !????::?? - ????::?? isn't 5
[16:01:11] eam: must be precedence I'm missing
[16:01:37] eam: is the minus drawing the second part into the else of the ternary?
[16:01:48] bricker: has joined #ruby
[16:01:48] eam: it must be
[16:01:53] apeiros: don't ask me, I try to avoid ambiguous precedence :D
[16:01:55] towski_: has joined #ruby
[16:02:02] adaedra: Never too much parenthesis.
[16:02:16] adaedra: ((((((((((Never.))))))))))
[16:02:22] cmoel: has joined #ruby
[16:02:51] MVPhelp: has joined #ruby
[16:02:58] devoldmx: has joined #ruby
[16:03:27] OrbitalKitten: has joined #ruby
[16:03:38] casadei: has joined #ruby
[16:04:16] amclain: has joined #ruby
[16:04:37] skweek: has joined #ruby
[16:05:00] [k-: https://eval.in/441719
[16:06:31] Soda: has joined #ruby
[16:08:19] bklane: has joined #ruby
[16:08:31] Guest683: has joined #ruby
[16:09:35] ksteck: has joined #ruby
[16:10:08] shevy: what is with this ugly characters
[16:10:39] [k-: https://eval.in/441722
[16:10:42] pipework: That's a bit judgemental for someone whose nick contains a y.
[16:11:14] dfockler: has joined #ruby
[16:11:25] [k-: ooooooo burn
[16:11:26] shevy: you have just become abyss's arch enemy!
[16:11:36] shevy: `derpy don't let this stand
[16:12:09] [k-: yorickpeterse surely wouldn't
[16:12:14] [k-: fight fight fight!
[16:12:28] momomomomo: has joined #ruby
[16:12:42] `derpy: Oh, don't mind me, I'm just a bot.
[16:13:08] sjums: has joined #ruby
[16:13:25] ecnalyr: has joined #ruby
[16:13:31] Klamber|ext: Heh! adaedra, I think I know what you meant by returning multible things now. Remembered seeing it on some intro page.. a,b = m() Now that's real neat!
[16:14:06] adaedra: >> a, b = "Hello, world".split(/[, ]/); [a, b]
[16:14:07] ruboto: adaedra # => ["Hello", ""] (https://eval.in/441723)
[16:14:14] [k-: can you do that with hashes?
[16:14:30] adaedra: that's a good question, [k-
[16:14:38] adaedra: >> a, b = { hello: "world" }
[16:14:39] ruboto: adaedra # => {:hello=>"world"} (https://eval.in/441724)
[16:14:48] adaedra: >> a, b = { hello: "world" }; [a, b]
[16:14:49] ruboto: adaedra # => [{:hello=>"world"}, nil] (https://eval.in/441725)
[16:15:16] EminenceHC: has joined #ruby
[16:15:23] adaedra: >> a, b = { hello: "world", bonjour: "le monde" }; [a, b]
[16:15:24] ruboto: adaedra # => [{:hello=>"world", :bonjour=>"le monde"}, nil] (https://eval.in/441726)
[16:15:35] adaedra: nope, hash is one and doesn't split.
[16:15:50] [k-: >> a, b = [*{ hello: "world", bonjour: "le monde" }]; [a, b]
[16:15:51] ruboto: [k- # => [[:hello, "world"], [:bonjour, "le monde"]] (https://eval.in/441727)
[16:15:55] VeryBewitching: has joined #ruby
[16:16:07] [k-: i only wanted the values though
[16:16:20] adaedra: wrong window
[16:16:25] adaedra: >> a, b = { hello: "world", bonjour: "le monde" }.values; [a, b]
[16:16:26] ruboto: adaedra # => ["world", "le monde"] (https://eval.in/441728)
[16:16:46] [k-: but that's so not nonalphanum
[16:17:15] diegobiavati_: has joined #ruby
[16:17:37] [k-: wrong window?
[16:18:16] drewvans1one: has joined #ruby
[16:18:59] nettoweb: has joined #ruby
[16:19:11] SCHAAP137: has joined #ruby
[16:19:55] SenpaiSilver: has joined #ruby
[16:19:57] ellisTAA: has joined #ruby
[16:20:35] flyinprogrammer: has joined #ruby
[16:22:29] joonty: has joined #ruby
[16:23:32] shevy: wrong cat?
[16:24:17] Shoutsid: has joined #ruby
[16:24:45] EminenceHC: has joined #ruby
[16:24:57] Shoutsid: has joined #ruby
[16:26:21] shevy: unicode cursing!
[16:26:54] eam: >> def f(x);x;end;"f(true)!f(not true)!f((not true))!f not true!f (not true)".split(?!).map { |exp| begin; eval exp; rescue Exception; "busted: "+exp;end }
[16:26:55] ruboto: eam # => [true, "busted: f(not true)", false, "busted: f not true", false] (https://eval.in/441732)
[16:27:01] ramfjord: has joined #ruby
[16:27:34] adaedra: I prefer cursing in French.
[16:27:43] adaedra: It's like wiping your ass with silk.
[16:28:00] p0wn3d: has joined #ruby
[16:28:03] piotrj: has joined #ruby
[16:28:04] eam: I prefer baby wipes
[16:28:39] momomomomo: has joined #ruby
[16:28:47] porfa: damn i came across something i've never done before, i'll try to put it into words the best i can, so someone might point me in the right direction. I have an array with strings, the number of strings is random. now, for each occurence in the array, i need to perform a comand the problem for me is that each comand i perform, must change every time acording to the number of the string inside the array, for ie:
[16:29:03] michaeldeol: has joined #ruby
[16:29:06] porfa: https://gist.github.com/anonymous/c850c1b24da267ce4f89
[16:29:31] agent_white: has joined #ruby
[16:29:43] agent_white: has left #ruby: ()
[16:29:54] agent_white: has joined #ruby
[16:30:30] hahuang61: has joined #ruby
[16:30:53] jds: has joined #ruby
[16:31:29] bricker: Porfa: loop with an index, eg stuff.each.with_index { ... }
[16:32:14] porfa: i guess this is a good time to learn this "index" thing
[16:32:41] dathon: has joined #ruby
[16:32:41] shevy: adaedra lol I will immortalize this quote in my IRC quotes database
[16:33:50] shevy: Porfa well, via that index you can usually avoid "for" loops entirely
[16:33:55] Xeago: has joined #ruby
[16:34:00] Maletor: has joined #ruby
[16:34:05] adaedra: shevy: why so? It's already here: http://www.imdb.com/title/tt0234215/quotes?ref_=tt_ql_3
[16:34:07] InternetFriend: has joined #ruby
[16:34:21] porfa: how will i change the number in the command i must perform?
[16:34:37] shevy: adaedra lol
[16:35:03] shevy: Porfa what kind of question is that... do you have the number stored in a variable
[16:35:08] adaedra: (But I do understand the whole quote :> )
[16:35:31] porfa: driver.find_element(:id, "f04_000***changinnumberhere***").send_keys(stuff[1])
[16:35:55] shevy: yeah so use a variable there Porfa
[16:35:56] eam: Porfa: number = 1234; string = "some stuff #{number}"
[16:35:57] [k-: Merovingian:??I love French wine, like I love the French language. I have sampled every language, French is my favorite. Fantastic language. Especially to curse with. Nom de dieu de putain de bordel de merde de saloperie de connard d'enculer ta m??re. It's like wiping your arse with silk. I love it.
[16:36:12] eam: Porfa: you can build strings out of other variables
[16:36:15] shevy: like eam just showed you \o/
[16:36:26] adaedra: Mh, there's a mistake in this quote though.
[16:36:27] [k-: wait, there was a ref?
[16:36:32] [k-: that didnt work in mobile!
[16:36:39] [k-: i had to search for it
[16:36:39] porfa: thank you, ill read something now! :)
[16:37:22] [k-: what does that french mean?
[16:37:48] eam: what does any french mean, really
[16:37:53] adaedra: I'm not sure it's really translatable
[16:38:01] adaedra: It's a long cursing
[16:38:07] adaedra: All you need to know
[16:38:08] Mojo_Nixon: has joined #ruby
[16:38:32] adaedra: And listen Lambert Wilson recite it perfectly.
[16:39:12] Mojo_Nixon: has joined #ruby
[16:39:15] adaedra: eam: shoot, you guessed. I speak nonsense all day. :(
[16:40:35] elfuego: has joined #ruby
[16:40:50] rbowlby: has joined #ruby
[16:40:53] cassioscabral: has joined #ruby
[16:41:56] quazimodo: has joined #ruby
[16:42:11] tkuchiki: has joined #ruby
[16:43:34] wldcordeiro: has joined #ruby
[16:44:01] cassioscabral: has joined #ruby
[16:44:58] bronson: has joined #ruby
[16:46:26] rushed: has joined #ruby
[16:50:06] casadei: has joined #ruby
[16:50:27] codecop: has joined #ruby
[16:50:48] shevy: le cursed baguette
[16:51:24] barhum2013: has joined #ruby
[16:53:06] Deviad: Just a question: why movies.delete(title.downcase!.to_sym) does not work while title = gets.chomp.downcase! works?
[16:53:33] Deviad: I am following the course on codecademy and I was trying out different things
[16:53:44] Deviad: cos I figured out they skipped this step at this point
[16:53:47] eam: Deviad: what does downcase! return?
[16:54:00] eam: (try comparing with just downcase)
[16:54:18] Deviad: it should return a string where all the letters are lowercaps
[16:54:39] eam: Deviad: does it?
[16:55:18] shevy: Deviad why did you note use .downcase.
[16:55:18] eam: (the difference between *should* and *does* is where problems arise, so if you're asking a question, start by testing your assumptions)
[16:55:35] Deviad: because I do not want to create a copy of an object
[16:56:04] snockerton: has joined #ruby
[16:56:11] eam: Deviad: methods with ! typically modify the receiver, so they don't necessarily need to return anything
[16:56:28] shevy: Deviad your operation above will return nil
[16:57:05] piotrj: has joined #ruby
[16:57:12] Shoutsid: has joined #ruby
[16:57:34] FernandoBasso: has joined #ruby
[16:57:51] Deviad: shevy, that's exactly what it does, but I do not understand the reason
[16:58:29] shevy: ok good though, you at least now know how to fix the problem :D
[16:58:32] Deviad: calling downcase before to_sym should be legit as I did not convert the string to a symbol yet
[16:58:57] asxbr: has joined #ruby
[17:00:09] shevy: only if you would return the string object
[17:00:11] poguez_: has joined #ruby
[17:00:16] mwlang: has joined #ruby
[17:01:32] jenrzzz: has joined #ruby
[17:01:35] firstdayonthejob: has joined #ruby
[17:01:43] m8: has joined #ruby
[17:02:14] dolemite_: has joined #ruby
[17:02:20] NeverDie: has joined #ruby
[17:03:03] dolemite_: has left #ruby: ("Leaving")
[17:03:19] eam: Deviad: downcase! does not always return a string
[17:03:26] eam: regular "downcase" does
[17:03:43] eam: Deviad: I know you're worried about making a copy -- you shouldn't be
[17:03:51] tkuchiki: has joined #ruby
[17:03:54] eam: ruby is not a language for efficiency
[17:04:19] Deviad: Hehe :D :D
[17:04:31] wallerdev: has joined #ruby
[17:04:43] Deviad: I will need to take this course on codecademy 3 times before to remember all the syntax and progress to rails
[17:05:20] sargas: has joined #ruby
[17:05:23] Deviad: I always try to use do in if
[17:05:25] dome22xl: has joined #ruby
[17:05:47] sargas: has joined #ruby
[17:07:06] gregf: has joined #ruby
[17:07:44] shevy: you can do .downcase!
[17:07:52] shevy: and then pass into movies.delete()
[17:07:56] porfa: hmmm nut = "OMG" puts 'driver.find_element(:id, "f04_000#{unt}").send_keys(stuff[#{nut}])'
[17:08:25] SylarRuby: has joined #ruby
[17:08:30] shevy: what the hell is this Porfa
[17:08:50] porfa: i want to print OMG but it's printing f04_000#{unt}
[17:09:08] porfa: sorry if the copy paste was out of way, it was just a line i though it was ok
[17:09:50] chrisja: has joined #ruby
[17:10:08] pwnd_nfsw: has joined #ruby
[17:10:15] InternetFriend: has joined #ruby
[17:10:32] shevy: no it is not the paste
[17:10:35] shevy: it is the content of the paste
[17:10:39] shevy: what is nut and why do you use unt
[17:10:57] porfa: sorry, its all meant to be nut, I'm just nut i guess
[17:11:22] shevy: you should just use a full var
[17:11:28] shevy: (:id, "f04_000#{unt}")
[17:11:32] shevy: (:id, nut)
[17:11:43] porfa: hmm i see, nice :)
[17:11:46] shevy: break things up into small chunks
[17:11:51] shevy: divide and conquer
[17:11:59] porfa: thank you again for showing me the way into the light ;_;
[17:12:11] shevy: that is not the way
[17:12:14] shevy: that is just one little baby step
[17:13:38] renderful: has joined #ruby
[17:14:20] banjara: has joined #ruby
[17:16:06] postmodern: has joined #ruby
[17:16:33] rippa: has joined #ruby
[17:17:03] rindolf: has joined #ruby
[17:17:24] petricore: has joined #ruby
[17:17:31] EminenceHC: has joined #ruby
[17:17:31] piotrj: has joined #ruby
[17:18:16] Jackneill: has joined #ruby
[17:18:17] cisco: has joined #ruby
[17:19:03] Hanmac: has joined #ruby
[17:19:12] cisco: has joined #ruby
[17:19:18] tfitts: has joined #ruby
[17:19:57] n008f4g_: has joined #ruby
[17:20:14] tejasmanohar: has joined #ruby
[17:22:37] tfitts: if I have [[1,2],[3,4],[5,2]] is there a single-line method that I can sum all of the first element, sum all of the second element, and then divide the resulting sum of the second by the first?
[17:22:55] platzhirsch: has joined #ruby
[17:24:59] wallerdev: probably, maybe show an example of the result you want
[17:25:08] rindolf: tfitts: does it have to be a single-line?
[17:25:39] Alayde: has joined #ruby
[17:25:58] tfitts: rindolf: I guess not, but if not I could obviously just assign the variable to an array and then var.collect(&:first).sum / var.collect(&:last).sum
[17:26:06] tfitts: array to a variable*
[17:26:14] davidhq: has joined #ruby
[17:26:48] SebastianThorn: has joined #ruby
[17:27:53] Oka: has joined #ruby
[17:27:59] larissa: has joined #ruby
[17:28:23] JDiPierro: has joined #ruby
[17:29:42] joonty: has joined #ruby
[17:29:52] wallerdev: reduce { |(a, b), (c, d)| [(a + c), (b + d)] }.reduce(:/)
[17:29:56] wallerdev: or somethin
[17:30:23] eam: all this work to avoid using two variables to sum
[17:30:34] eam: I'm having sympathy pains for the cpu that has to run these
[17:31:11] sargas: has joined #ruby
[17:31:24] havenwood: has joined #ruby
[17:33:08] theery: has joined #ruby
[17:33:19] porfa: I'm getting "#<Enumerator:0x000000023cbd68>" instead of the array value, how do i get the array value with array.each ?
[17:33:37] eam: but why are you using each, then?
[17:33:48] eam: why not just "array"
[17:34:13] porfa: "TypeError: no implicit conversion of Array into String"
[17:34:17] wallerdev: now you have me imagining someone doing x = [1, 2, 3].each.to_a
[17:34:27] porfa: I'm just learning arrays
[17:34:45] eam: Porfa: no problem, my question was in earnest
[17:34:57] eam: how are you using #each?
[17:35:06] tfitts: eam: I'm still working out how to do it fastest. I have 18000 records that I need to check revenue/profit on for the last month, of which only ~10% have sales in that last month
[17:35:07] porfa: puts det1 + entrada.to_a + det2 + det3 < i need to get the value each time like this
[17:35:26] wallerdev: single line doesnt mean fastest lol
[17:35:28] porfa: i had to chop down my strings to get the array value between them, and i can't get it in there
[17:35:35] tfitts: I'm testing a few different solutions
[17:35:57] cassioscabral: has joined #ruby
[17:36:16] wallerdev: just keep a running sum for each and divide at the end, should be fastest that way
[17:36:41] eam: tfitts: if efficiency is a concern, use two variables to hold each sum as you iterate once, and divide them at the end
[17:37:05] wallerdev: or write inline c
[17:37:20] eam: fast math, go for fortran
[17:37:26] govg: has joined #ruby
[17:37:53] karapetyan: has joined #ruby
[17:38:11] mghaig: has joined #ruby
[17:38:24] axiomatic_345: has joined #ruby
[17:39:13] mghaig: has joined #ruby
[17:39:17] rushed: has joined #ruby
[17:39:30] mghaig: has left #ruby: ()
[17:39:58] paulcsmith: has joined #ruby
[17:40:12] porfa: https://gist.github.com/anonymous/e6be61add3bc320d7bb7
[17:40:18] porfa: that's my gist!
[17:40:48] shevy: so you committed this bad code
[17:40:51] porfa: damn i got the names wrong again
[17:41:11] shevy: sort your nuts out mate
[17:41:30] shevy: btw, keep a consistent indent
[17:41:34] shevy: it will make spotting errors simpler
[17:42:04] porfa: why is it such a bad code?
[17:42:15] porfa: i guess it is because its not getting the job done, yeah
[17:42:29] jpfuentes2: has joined #ruby
[17:43:12] shevy: the indent is very strange
[17:43:20] evanjs_: has joined #ruby
[17:43:57] shevy: and the second half
[17:44:01] shevy: you can get rid of that and just use a method
[17:44:15] shevy: driver.find_element(:id,"add").click
[17:44:18] shevy: ^^^ always the same
[17:44:25] shevy: driver.find_element(:id, "f04_0001").send_keys(stuff[1])
[17:44:30] shevy: driver.find_element(:id, "f04_0002").send_keys(stuff[2])
[17:44:35] shevy: ^^^ repetition
[17:45:50] bronson: has joined #ruby
[17:46:01] shevy: Porfa http://pastie.org/10450592 don't use that, it just serves to illustrate
[17:46:39] davedev24: has joined #ruby
[17:47:37] ericjphillips: has joined #ruby
[17:48:02] piotrj: has joined #ruby
[17:48:35] FrankD: has joined #ruby
[17:50:12] porfa: shevy: i can read that code and i can understand what it does, it's beautifull
[17:51:07] info_is_good: has joined #ruby
[17:51:47] info_is_good: Hello, I'm trying to understand ruby's lambdas. How can I translate this, in JavaScript, to Ruby? (function(a){return function(b){return a+b}})(2)(3) -- outputs 5
[17:52:08] info_is_good: I've used the (lambda { ... }) syntax but got an error, unexpected '('
[17:53:27] camilasan: has joined #ruby
[17:55:22] apeiros: info_is_good: only that part of your code won't allow us to tell you where the syntax error is.
[17:55:49] dasher00: has joined #ruby
[17:56:38] baweaver: has joined #ruby
[17:56:49] info_is_good: apeiros: Okay, I've managed to get it to work (sorry). This is a Lambda Calculus ??? Ruby transmogrifier. I used the following syntax: (lambda { |a| (lambda { |b| a.call(a.call(a.call(b))) }) }).call((lambda { |a| (lambda { |b| a.call(a.call(a.call(b))) }) })).call(lambda { |a| a+1 }).call(0)
[17:56:53] dstarh: has joined #ruby
[17:57:06] info_is_good: Does it look alright? I.e., is the `.call` normal?
[17:57:06] DrCode: has joined #ruby
[17:57:15] jhass: >> ->(a) { ->(b) { a+b } }.(2).(3) # literal translation. Idiomatic ruby? nope, far away from it
[17:57:16] ruboto: jhass # => 5 (https://eval.in/441780)
[17:57:18] apeiros: .call is normal. but this isn't your example from above anymore?
[17:57:40] apeiros: .() which jhass just used is expanded to .call() btw.
[17:57:42] info_is_good: apeiros: it is another example, my bad. jhass that looks briefer, thanks
[17:58:00] Flying_Squirrel: has joined #ruby
[17:58:39] luckyme: has joined #ruby
[17:59:51] karapetyan: has joined #ruby
[17:59:58] Pathfinder_: has joined #ruby
[18:00:08] symm-: has joined #ruby
[18:00:31] anisha: has joined #ruby
[18:00:51] Shoutsid: has joined #ruby
[18:00:58] info_is_good: (->(a){(->(b){a.(a.(a.(b)))})}).((->(a){(->(b){a.(a.(a.(b)))})})).(->(a){a+1}).(0) works perfectly. This is multiplication of 3 by 3 using functions. Very clean syntax, I like it. I'll add a transmogrifer to ruby to github.com/maiavictor/caramel. Thank you.
[18:02:46] dravine_: has joined #ruby
[18:02:59] baweaver: has joined #ruby
[18:08:26] RxDx: has joined #ruby
[18:11:42] EminenceHC: has joined #ruby
[18:14:20] fastAndSlow: has joined #ruby
[18:14:27] RxDx: please, is there anyway to POST/PUT the entity parameter name (in json) without the _attributes suffix? I mean.. why do I have to send beer_attributes {name: "foo"} if I receive beer {name: "bar"}?
[18:15:28] baweaver: has joined #ruby
[18:15:31] prestorium: has joined #ruby
[18:15:34] diego2: has joined #ruby
[18:15:42] diego2: has joined #ruby
[18:15:44] bb010g: has joined #ruby
[18:16:03] Coldblackice: has joined #ruby
[18:16:10] dfockler: has joined #ruby
[18:16:57] InternetFriend: has joined #ruby
[18:17:05] apeiros: ?crosspost RxDx
[18:17:05] ruboto: RxDx, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[18:18:20] jenrzzz: has joined #ruby
[18:18:45] RxDx: apeiros, sorry
[18:20:00] tfitts: has joined #ruby
[18:20:29] ramfjord: has joined #ruby
[18:21:12] last_staff: has joined #ruby
[18:21:23] spider-mario: has joined #ruby
[18:22:41] stamina: has joined #ruby
[18:22:41] dionysus69: has joined #ruby
[18:23:20] NeverDie: has joined #ruby
[18:23:32] pawnbox: has joined #ruby
[18:24:29] aaeron: has joined #ruby
[18:25:49] InternetFriend: has joined #ruby
[18:26:19] leafybas_: has joined #ruby
[18:27:06] Zai00: has joined #ruby
[18:27:53] aaeron1: has joined #ruby
[18:28:23] funkenstrahlen: looks like rubydoc.info is down?
[18:29:32] pawnbox: has joined #ruby
[18:31:11] apt-get: has joined #ruby
[18:31:18] yqt: has joined #ruby
[18:32:18] gambl0re: has joined #ruby
[18:32:56] baweaver: has joined #ruby
[18:33:00] _djbkd: has joined #ruby
[18:34:14] renderful: has joined #ruby
[18:34:42] roxtrongo: has joined #ruby
[18:35:37] soulcake: has joined #ruby
[18:36:25] grill: has joined #ruby
[18:36:35] grill: what is the proper way to document methods in ruby
[18:36:49] soulcake: has joined #ruby
[18:38:06] wilbert: has joined #ruby
[18:39:21] pipework: grill: By writing methods that don't need documentation, and failing that, by using rdoc or yard and filling out as much as you can.
[18:39:25] kidoz: has joined #ruby
[18:39:58] havenwood: grill: The simplest, most readable code that possibly works.
[18:40:49] grill: good lord. what is this language? "we don't need documentation!"
[18:40:50] grill: has left #ruby: ()
[18:41:11] apeiros: scared 'em away
[18:41:20] pipework: I'd say that was for the better.
[18:41:38] pipework: Let them go on their journey and come back when they're ready to be enlightened.
[18:42:07] havenwood: I admit I like comments on things worth commenting on.
[18:42:42] pipework: "# Dear havenwood, I believe this method will be quite to your liking"
[18:42:48] havenwood: pipework: :)
[18:43:19] sargas: has joined #ruby
[18:43:21] Deviad: has joined #ruby
[18:43:26] cirenyc: has joined #ruby
[18:43:43] _el_fer_: has joined #ruby
[18:45:13] chouhoul_: has joined #ruby
[18:46:02] apeiros: I knew I had seen *!FUNKMASTAF@* before. prefixed from from yesterday???
[18:46:46] bronson: has joined #ruby
[18:50:39] EminenceHC: has joined #ruby
[18:51:02] yfeldblum: has joined #ruby
[18:53:01] roxtrongo: has joined #ruby
[18:53:16] ehth77: has left #ruby: ("WeeChat 1.2")
[18:53:59] devdazed: has joined #ruby
[18:54:45] unreal: has joined #ruby
[18:57:18] renderful: has joined #ruby
[18:58:55] Helheim: has joined #ruby
[18:59:04] InternetFriend: has joined #ruby
[18:59:57] kirun: has joined #ruby
[19:02:29] jackjackdripper: has joined #ruby
[19:03:28] Pathfinder__: has joined #ruby
[19:03:50] arooni: has joined #ruby
[19:04:22] uxp: has joined #ruby
[19:04:26] unreal_: has joined #ruby
[19:04:32] felixr: has joined #ruby
[19:05:15] mallu: has joined #ruby
[19:09:05] biesiad: has joined #ruby
[19:09:12] shinnya: has joined #ruby
[19:10:28] porfa: hello guys i need dire help ;_; i have do puts inside a loop, but it's printing the thing to the screen instead of the console
[19:10:38] pipework: Porfa: show us code
[19:10:48] evanjs: has joined #ruby
[19:11:58] ellisTAA: has joined #ruby
[19:12:01] polishdub: has joined #ruby
[19:12:45] axiomatic_345: has joined #ruby
[19:13:54] ruby-lang362: has joined #ruby
[19:14:27] biesiad: has left #ruby: ()
[19:14:50] ruby-lang362: ACTION slaps Guest67071 around a bit with a large fishbot
[19:15:14] diegobiavati: has joined #ruby
[19:17:56] duoi: has joined #ruby
[19:19:02] SenpaiSilver: has joined #ruby
[19:21:16] borodin_: has joined #ruby
[19:21:47] crdpink: has joined #ruby
[19:22:06] miah: has joined #ruby
[19:22:19] borodin_: probably obvious but I'm not getting it - does anyone know of a good page for "getting started with rbenv"? I am using puppet to install rbenv - it all worked, it even installed a ruby in /opt/rbenv/versions. But I can't figure out how to get rbenv to use this ruby.
[19:22:21] tvw: has joined #ruby
[19:23:00] baweaver: has joined #ruby
[19:23:26] borodin_: i.e. I created a directory and added a .ruby-version file with 2.2.3 in it. I cd there and type rbenv local and it says "rbenv: version `2.2.3' is not installed (set by /home/goob/test/ruby/.ruby-version)"
[19:23:30] Flying_Squirrel: has joined #ruby
[19:23:52] miah: https://github.com/sstephenson/rbenv#how-it-works
[19:23:54] tejasmanohar: anyone here use vagrant?
[19:24:04] tejasmanohar: i ran `vagrant init hashicorp/precise32 && vagrant up && vagrant ssh` ... then added some files etc but can't see my files in the host computer in the folder i ran those commands ^
[19:24:10] miah: tejasmanohar: try #vagrant
[19:24:12] tejasmanohar: trying to find out where it is O.o
[19:24:30] tejasmanohar: yea, seems unresponsive :\
[19:25:21] _djbkd: has joined #ruby
[19:25:55] skullcrasher: has joined #ruby
[19:26:16] _djbkd: has joined #ruby
[19:27:01] lolmaus: has joined #ruby
[19:28:01] ta: has joined #ruby
[19:28:16] crdpink2: has joined #ruby
[19:28:35] EminenceHC: has joined #ruby
[19:28:46] InternetFriend: has joined #ruby
[19:29:34] cih: has joined #ruby
[19:31:14] Xeago: has joined #ruby
[19:31:17] pwnd_nsfw: has joined #ruby
[19:31:21] jackjackdripper: has joined #ruby
[19:32:18] barhum2013: has joined #ruby
[19:32:34] evanjs: has joined #ruby
[19:33:19] synasyn: has joined #ruby
[19:34:35] jamesaxl: has joined #ruby
[19:34:36] borodin_: it's inserting the shims
[19:34:48] phreakocious: has joined #ruby
[19:34:56] borodin_: I'm missing how you tell rbenv which ruby to use, other than adding a .ruby-version file to every project
[19:35:05] borodin_: (which I'm doing but it isn't working
[19:35:05] shadoi: has joined #ruby
[19:35:59] aldodelgado: has joined #ruby
[19:36:20] Xeago: has joined #ruby
[19:36:32] phutchins1: has joined #ruby
[19:37:02] stamina: has joined #ruby
[19:37:15] synasyn: Hello, I am writing tests for a program calling AWS Ruby SDK v2. The calls to the AWS SDK are numerous and scattered everywhere. I would prefer to not mock the whole AWS SDK, as that would be very time consuming. I tried VCR, but it recorded the network delays and was very slow in testing. Is there any recommended libraries that would stub out the AWS SDK?
[19:37:29] synasyn: I did try monkey patching, but it is a slow and onerous process
[19:38:22] Nowaker: has left #ruby: ()
[19:38:55] dmolina: has joined #ruby
[19:39:11] Flying_Squirrel: has joined #ruby
[19:39:26] skade: has joined #ruby
[19:39:37] glenab: has joined #ruby
[19:39:53] baweaver: has joined #ruby
[19:40:12] jenrzzz: has joined #ruby
[19:46:47] woodruffw: ACTION test
[19:46:47] apeiros: test failed. please reboot.
[19:46:47] speakingcode: has joined #ruby
[19:46:48] diego2: has joined #ruby
[19:46:49] Zai00_: has joined #ruby
[19:46:49] mxrguspxrt: has joined #ruby
[19:46:57] arturmartins: has joined #ruby
[19:47:40] bronson: has joined #ruby
[19:47:47] renderful: has joined #ruby
[19:48:45] bruno-: has joined #ruby
[19:48:56] iamninja_: has joined #ruby
[19:49:03] skweek: has joined #ruby
[19:50:40] SylarRuby: has joined #ruby
[19:52:07] Zai00: has joined #ruby
[19:52:30] Zai00: has left #ruby: ()
[19:54:08] maikowblue: has joined #ruby
[19:54:10] Deviad: Does anyone know what is wrong with this:
[19:54:18] Deviad: my_array.each { |x| puts x ? x % 2 == 0 : puts ""
[19:54:34] leafybasil: has joined #ruby
[19:55:02] momomomomo: has joined #ruby
[19:55:14] BlkDynmt: has joined #ruby
[19:55:21] leafybasil: has joined #ruby
[19:55:29] biesiad: has joined #ruby
[19:57:41] barhum2013: has joined #ruby
[19:57:59] nfk: has joined #ruby
[19:58:05] hahuang61: has joined #ruby
[19:58:52] k3asd`: has joined #ruby
[19:59:44] devoldmx: has joined #ruby
[19:59:48] gusTester: has joined #ruby
[19:59:57] ngscheur1: has joined #ruby
[20:02:00] Deviad: my_array.each { |x| x.even? ? (puts x) : nil} ==> this is the right one
[20:02:02] Sou|cutter: probably the second puts?
[20:02:10] unreal: has joined #ruby
[20:02:21] yardenbar: has joined #ruby
[20:02:59] NeverDie: has joined #ruby
[20:03:03] jdawgaz: has joined #ruby
[20:03:07] Sou|cutter: the first version could print 2 empty lines for a falsy x
[20:03:46] Deviad: I was getting syntax errors from the compiler actually
[20:04:15] Sou|cutter: well read the errors to find out then?
[20:04:46] Sou|cutter: it's not very clearly written
[20:05:03] Deviad: It's just an exercise with ternary operators
[20:05:06] joonty: has joined #ruby
[20:05:07] Deviad: operator*
[20:05:18] peterhu: has joined #ruby
[20:05:29] Deviad: my_array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[20:05:29] Deviad: my_array.each { |x| x.even? ? (puts x) : nil}
[20:05:37] atomical_: has joined #ruby
[20:05:44] Deviad: It should produce as output the even numbers
[20:05:50] Deviad: in the array
[20:06:56] Sou|cutter: my_array.select(&:even?).each { |x| puts x }
[20:07:03] InternetFriend: has joined #ruby
[20:07:25] tkuchiki: has joined #ruby
[20:07:30] Sou|cutter: my_array.each { |x| puts x if x.even? }
[20:07:50] Deviad: Well, the goal of the exercise was to use the short if
[20:08:05] Deviad: and apply it to that case, now if this is a good practice I ignore it
[20:08:36] eam: Deviad: use parens () to force precedence
[20:09:03] nanoz: has joined #ruby
[20:10:29] momomomomo: has joined #ruby
[20:10:36] kaspergrubbe: has joined #ruby
[20:12:29] futilegames: has joined #ruby
[20:14:40] ghr: has joined #ruby
[20:15:19] timanema: has joined #ruby
[20:16:04] andyrs: has joined #ruby
[20:16:51] paulcsmith_: has joined #ruby
[20:17:20] dfockler: has joined #ruby
[20:17:44] mikeric: has joined #ruby
[20:20:25] xblade: has joined #ruby
[20:21:36] moeabdol1: has joined #ruby
[20:22:50] EminenceHC: has joined #ruby
[20:23:10] _djbkd: has joined #ruby
[20:23:14] havenwood: has joined #ruby
[20:23:17] karapetyan: has joined #ruby
[20:23:41] _djbkd: has joined #ruby
[20:26:17] sdwrage: has joined #ruby
[20:27:14] cball: has joined #ruby
[20:27:38] sankaber: has joined #ruby
[20:27:44] mikecmpbll: has joined #ruby
[20:28:20] axiomatic_345: has joined #ruby
[20:29:24] jsaak: has joined #ruby
[20:30:07] cih: has joined #ruby
[20:30:19] Alina-malina: has joined #ruby
[20:31:16] _aeris_: has joined #ruby
[20:32:17] hectortrope: has joined #ruby
[20:32:26] stamina: has joined #ruby
[20:32:39] STONECOLDDEVIN: has left #ruby: ()
[20:32:41] feoh: has joined #ruby
[20:32:53] n_blownapart: has joined #ruby
[20:33:00] feoh: Does anyone here happen to use robe mode for emacs for doing Ruby autocomplete?
[20:33:00] leafybas_: has joined #ruby
[20:33:13] feoh: Or know of a better way to do completion?
[20:34:05] rapha: has joined #ruby
[20:34:13] Pathfinder_: has joined #ruby
[20:35:49] futilegames: has left #ruby: ()
[20:36:09] dmolina1: has joined #ruby
[20:36:11] dravine_: has joined #ruby
[20:36:28] havenn: has joined #ruby
[20:36:56] feoh: has left #ruby: ("ERC (IRC client for Emacs 25.0.50.1)")
[20:37:45] evanjs: has joined #ruby
[20:38:44] kadoppe: has joined #ruby
[20:38:52] benlieb: has joined #ruby
[20:39:04] brazenbraden: such annoyance. much frustration. wow. any idea at all why i keep getting the error libruby.so cannot open mysql2.so? all should be here: https://gist.github.com/brazenbraden/b4ef6839ac81fdd42a4a
[20:40:00] sankaber: has joined #ruby
[20:40:38] ellisTAA: has joined #ruby
[20:40:47] phutchins1: has joined #ruby
[20:40:49] finisherr: has joined #ruby
[20:40:50] pwnd_nsfw: has joined #ruby
[20:41:23] porfa: can i offer to show my tithes for exchange of lil something?
[20:42:56] momomomomo: has joined #ruby
[20:43:31] cordovafan8: has joined #ruby
[20:43:36] bruno-: has joined #ruby
[20:44:06] cordovafan8: Hello. I'm looking for the default ruby error log file. Where might I find it? Even just the name of it would be great.
[20:46:12] bigbadbear: has joined #ruby
[20:46:15] sankaber: has joined #ruby
[20:47:10] bricker: cordovafan8: default output is STDERR
[20:47:34] Xeago: has joined #ruby
[20:49:09] cordovafan8: bricker: so if anything blows up it will show up in stderr? I guess everything went ok :)
[20:49:17] bricker: cordovafan8: yep :)
[20:49:32] nettoweb: has joined #ruby
[20:50:18] sankaber: has joined #ruby
[20:51:16] cordovafan8: has left #ruby: ()
[20:51:50] porfa: can anyone help me out? my data is printed on the screen, but i want it to be sent to the interpreter...
[20:51:51] porfa: https://gist.github.com/anonymous/e19cd23aaaea5048a2c1
[20:52:52] pipework: Porfa: Please avail yourself about what puts does.
[20:53:09] porfa: i knew i should have learned puts from an english blog
[20:54:39] porfa: pipework: ok, puts does a newline
[20:54:52] ngscheur1: has joined #ruby
[20:55:06] bronson: has joined #ruby
[20:55:23] blackmesa: has joined #ruby
[20:55:33] porfa: whats the problem? the thing is, the command that is commented ( puts driver.find_element(:id,"add").click ) actually works, i don't know why the other one doesnt
[20:55:34] ekleog: has joined #ruby
[20:56:10] pipework: Porfa: No, it does a lot more.
[20:56:14] speakingcode: has joined #ruby
[20:56:23] Papierkorb: is there a way to catch all ERRNO errors?
[20:56:25] spleeze: has joined #ruby
[20:56:27] solocshaw: has joined #ruby
[20:56:36] Papierkorb: Stuff like Errno::ENOENT
[20:56:38] pipework: Papierkorb: What have you tried?
[20:57:11] _djbkd: has joined #ruby
[20:57:14] Scripore: has joined #ruby
[20:57:15] Papierkorb: pipework: a plain rescue => err doesn't, iirc rescue Errno => .. didn't either
[20:57:30] pipework: Papierkorb: Did you try perhaps the whole constant?
[20:57:39] Papierkorb: rescuing from Errno::ENOENT works, but I want to catch all of them at once
[20:57:42] pipework: Errno is a namespace.
[20:57:57] pipework: To catch all of them you either need a list of all of them or you need a superclass of all them.
[20:58:00] pipework: Or superclasses.
[20:59:13] rushed: has joined #ruby
[20:59:46] yfeldblum: has joined #ruby
[21:00:15] hays: has joined #ruby
[21:01:04] Tuxero: has joined #ruby
[21:01:42] porfa: pipework: are you saying i shouldn't use puts?
[21:02:25] pipework: Porfa: I'm saying you should figure out what it does and why you're using it and how it affects what you're trying to accomplish.
[21:02:36] rhg1351: has joined #ruby
[21:03:03] porfa: "Prints each argument with a new line appended at the end"
[21:03:54] NeverDie: has joined #ruby
[21:04:06] hlolli: has joined #ruby
[21:04:08] ngscheur1: has joined #ruby
[21:04:08] pipework: Porfa: Have you looked at the return value of puts?
[21:04:27] porfa: pipework: but why one puts commands works and the other one doesn't?
[21:04:32] porfa: how do i do that?
[21:04:33] hlolli: has left #ruby: ("ERC (IRC client for Emacs 24.5.1)")
[21:04:51] pipework: Sorry, I mixed up gists.
[21:05:15] pipework: Porfa: https://gist.github.com/anonymous/e19cd23aaaea5048a2c1 that's you, I believe.
[21:05:36] porfa: yes pipework
[21:05:38] pipework: So, your problem is that in the #each call, the driver.find??? stuff doesn't seem to actually click anything?
[21:05:45] pipework: Even when it's not commented out.
[21:06:08] Kendos-Kenlen: has joined #ruby
[21:06:24] Papierkorb: pipework: https://gist.github.com/Papierkorb/8760197afbe7cb0e6773 For some reason this code still raises an Errno::ENOENT error instead of an 'InternalError'. Am I doing something wrong there?
[21:06:28] porfa: the line that is commented, it does everything it should, because for each $number it does that command, and the interpreter sends back "ok"
[21:06:56] pipework: When you say $number, what do you mean?
[21:07:10] porfa: but the one that is being built by vars, doesn't get sent to the interpreter, if i copy paste each one of them and enter them, they work, and "click" the things
[21:07:22] porfa: number = ALQDETALHESPB.count.to_i
[21:07:40] pipework: Ah, you shouldn't preface with $, because in ruby that means a global variable.
[21:08:08] tkuchiki: has joined #ruby
[21:08:37] otacon-: has joined #ruby
[21:08:58] pipework: Porfa: So when you say 'sent to the interpreter', what do you mean? You're printing out values to STDOUT, you're not sending them to the browser through the driver.
[21:09:10] axiomatic_345: has joined #ruby
[21:09:24] xcesariox: has joined #ruby
[21:09:33] porfa: this is sent to the interpreter --> puts driver.find_element(:id,"add").click
[21:09:52] porfa: how can i get the lines I'm generating sent to the interpreter pipework ?
[21:10:58] pipework: Porfa: Probably by looking for some methods you could call that let you send input through the driver.
[21:11:23] pipework: The 'puts' is just writing the result of the expressions to STDOUT, not to the browser.
[21:12:07] porfa: whats the difference between: puts driver.find_element(:id,"add").click
[21:12:16] porfa: and driver.find_element(:id, "f04_0001").send_keys(ALQDETALHESPB[1])
[21:12:21] pipework: Porfa: What I just explained
[21:12:35] pipework: Porfa: You may want to pick up a book that'll teach you ruby.
[21:12:43] pipework: Or something.
[21:13:35] havenwood: has joined #ruby
[21:16:49] GarethAdams: has joined #ruby
[21:17:35] tangentstorm: has joined #ruby
[21:18:00] greymeister: has joined #ruby
[21:18:37] pipework: Papierkorb: I don't know what's wrong with it. Are you sure, because `rescue SystemCallError => err` should get the exception
[21:19:07] stamina: has joined #ruby
[21:19:31] xybre: has joined #ruby
[21:20:34] tejasmanohar: has joined #ruby
[21:20:53] havenn: has joined #ruby
[21:21:32] NeverDie: has joined #ruby
[21:21:54] barhum2013: has joined #ruby
[21:22:19] atmosx: can you setup instance vars and make them accessible out of the initialize method?!
[21:23:09] giuseppesolinas: has joined #ruby
[21:23:15] giuseppesolinas_: has joined #ruby
[21:23:44] govg: has joined #ruby
[21:24:02] piotrj: has joined #ruby
[21:24:12] atmosx: no, I mean
[21:24:15] atmosx: set them outside init
[21:24:25] atmosx: and still make them acessible
[21:26:09] mikeric: has joined #ruby
[21:26:14] zenguy_pc: has joined #ruby
[21:26:24] FernandoBasso: has joined #ruby
[21:27:33] freerobby: has joined #ruby
[21:27:34] dfockler: hmm maybe not
[21:28:31] Psi-Jack: has left #ruby: ("Konversation terminated!")
[21:29:58] dfockler: atmosx: When you call initialize it destroys the values that were previously set in the instance var
[21:30:30] Papierkorb: pipework: aah it was also raised at another place
[21:33:12] pipework: Papierkorb: That'll do it!
[21:33:22] glennt: has joined #ruby
[21:33:54] dfockler: atmosx: scratch that, it defines the variables on whatever self is at the time, so they would get defined on the singleton_class
[21:34:12] atmosx: dfockler: I was talking with this guy on twitter and I just wanted to be sure.
[21:34:13] doddok: has joined #ruby
[21:34:55] opensource_ninja: has joined #ruby
[21:35:24] lxsameer: has joined #ruby
[21:39:07] bmurt: has joined #ruby
[21:43:05] mozzarella: has joined #ruby
[21:45:28] paulcsmith_: has joined #ruby
[21:45:41] baweaver: has joined #ruby
[21:48:59] platzhirsch: has left #ruby: ()
[21:49:20] jpfuentes2: has joined #ruby
[21:51:07] jgpawletko: has joined #ruby
[21:52:35] zendrix: has joined #ruby
[21:56:27] cjbottaro: has joined #ruby
[21:58:23] riceandbeans: has left #ruby: ()
[21:58:50] shevy: yo people
[21:58:53] shevy: how is your rubies
[21:58:54] gustav__: has joined #ruby
[21:59:02] shevy: is Porfa finally a guru
[21:59:13] porfa: ahhaah shevy
[21:59:17] Papierkorb: tons of them. expensive bastard.
[21:59:29] porfa: I'm dying with that loop, i've reached a new place, but far from done
[21:59:48] porfa: i can't now print the strings as i want them, but can't send them to the interpreter
[22:00:51] devoldmx: has joined #ruby
[22:01:27] bklane: has joined #ruby
[22:01:33] shevy: Papierkorb lol
[22:01:52] shevy: Porfa in ruby, you can always send stuff
[22:02:53] decoponio: has joined #ruby
[22:05:09] htmldrum: has joined #ruby
[22:05:26] rushed: has joined #ruby
[22:08:55] tkuchiki: has joined #ruby
[22:09:01] pythoninthegrass: has joined #ruby
[22:11:41] darix: https://www.youtube.com/watch?v=OMPfEXIlTVE
[22:14:06] havenwood: has joined #ruby
[22:15:19] failshell: has joined #ruby
[22:17:33] moeabdol2: has joined #ruby
[22:17:50] renderful: has joined #ruby
[22:18:53] rickmasta: has joined #ruby
[22:18:55] Mweshi: has joined #ruby
[22:19:25] bkxd: has joined #ruby
[22:20:04] xMopxShell: has joined #ruby
[22:20:41] cassioscabral: has joined #ruby
[22:21:41] bronson: has joined #ruby
[22:22:11] skweek: has joined #ruby
[22:22:53] michaeldeol: has joined #ruby
[22:23:29] hahuang61: has joined #ruby
[22:23:51] allomov: has joined #ruby
[22:25:27] dfockler: has joined #ruby
[22:27:19] Brin: has joined #ruby
[22:27:31] dmolina: has joined #ruby
[22:29:44] renderful: has joined #ruby
[22:31:25] yfeldblum: has joined #ruby
[22:31:41] machinewar: has joined #ruby
[22:34:51] vikaton: has joined #ruby
[22:35:45] chubdub: has joined #ruby
[22:41:05] jxv: has joined #ruby
[22:45:47] dome22xl: has joined #ruby
[22:46:57] casadei: has joined #ruby
[22:47:27] opensource_ninja: has joined #ruby
[22:48:10] charliesome: has joined #ruby
[22:48:59] Kendos-Kenlen: has joined #ruby
[22:49:10] rbowlby: has joined #ruby
[22:51:23] _djbkd: has joined #ruby
[22:51:29] malconis: has joined #ruby
[22:51:41] skade: has joined #ruby
[22:52:01] cmoel: has joined #ruby
[22:52:38] Xeago: has joined #ruby
[22:53:10] djbkd_: has joined #ruby
[22:53:53] yfeldblum: has joined #ruby
[22:54:29] WillAmes: has joined #ruby
[22:55:38] tkuchiki: has joined #ruby
[22:56:03] hahuang61: has joined #ruby
[22:57:58] araujo_: has joined #ruby
[22:59:27] northfurr: has joined #ruby
[22:59:49] michaeldeol: has joined #ruby
[23:01:22] casadei: has joined #ruby
[23:02:11] chipotle: has joined #ruby
[23:02:39] dramagods: has joined #ruby
[23:02:46] JimmyNeutron: has joined #ruby
[23:03:19] dfockler: How does Ruby gems know that it needs to install a C extension?
[23:03:54] michaeldeol: has joined #ruby
[23:04:06] dfockler: ahh the gemspec
[23:07:01] leafybasil: has joined #ruby
[23:07:21] aerozepplin: has joined #ruby
[23:08:00] jxv: has joined #ruby
[23:08:01] barhum2013: has joined #ruby
[23:08:17] Flying_Squirrel: has joined #ruby
[23:08:18] modern: has joined #ruby
[23:08:28] bklane: has joined #ruby
[23:09:02] baweaver: has joined #ruby
[23:09:20] `tim`: has joined #ruby
[23:09:30] porfa: has joined #ruby
[23:09:35] michaeldeol: has joined #ruby
[23:11:17] yfeldblum: has joined #ruby
[23:11:28] vdamewood: has joined #ruby
[23:12:26] odigity2: How do I write a method that takes any kind of args and passes them on to another method, so it's like the caller called the second method with the same args?
[23:12:38] odigity2: I've been experimenting with *args and **kwargs, and I can't quite figure it out.
[23:12:50] drbrain: odigity2: def outer(*a) inner(*a) end
[23:13:21] drbrain: if there are keyword args or block, you can add those with , **k, &b
[23:13:34] odigity2: drbrain, I tried that but I'm getting a TypeError: is not a symbol nor a string
[23:13:56] Ropeney: has joined #ruby
[23:13:57] adaedra: full code?
[23:14:35] adaedra: >> def inner(*a); p a; end; def outer(*a); inner *a; end; outer 1, 2, 3
[23:14:36] ruboto: adaedra # => [1, 2, 3] ...check link for more (https://eval.in/441869)
[23:14:44] odigity2: The error is happening on line 3:
[23:14:51] drbrain: thanks adaedra
[23:15:20] adaedra: drbrain: for what?
[23:15:26] odigity2: https://gist.github.com/odigity/d6340360e4aa48459197
[23:15:41] drbrain: adaedra: for the >>
[23:15:43] adaedra: odigity2: you just need the *args.
[23:15:53] adaedra: It will catch everything already.
[23:16:10] odigity2: FYI -- The inner function is defined as: def send(user:); end
[23:16:14] adaedra: >> def inner(*a); p a; end; def outer(*a); inner *a; end; outer 1, 2, 3, hello: :world
[23:16:17] ruboto: adaedra # => [1, 2, 3, {:hello=>:world}] ...check link for more (https://eval.in/441870)
[23:16:32] odigity2: I tried *args by itself, **kwargs by itself, and both together, and I always get that type error
[23:16:41] drbrain: odigity2: what are the arguments? for send, the first argument must be the method name you're sending to
[23:16:56] ellisTAA: i???m trying to set up a message feature, and i was wondering if has_many :conversations, as: :recipient, and has_many :conversations, as: :sender makes sense?
[23:16:57] odigity2: One of those two args are receiving a hash value, and it complains the hash is not a symbol or string
[23:17:08] adaedra: ?rails EllisTAA
[23:17:08] ruboto: EllisTAA, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[23:17:54] odigity2: drbrain, crap, do you think I'm running into issues with the native ruby .send() method? I'm not trying to call that, I'm trying to call my own send method (that has nothing to do with passing a message to an object, it's about sending mail)
[23:18:04] drbrain: I think that's the problem
[23:18:12] drbrain: try it without the wrapper first
[23:19:10] drbrain: mailer = ???; mailer.send your, real, arguments
[23:19:31] barhum2013: has joined #ruby
[23:19:42] odigity2: drbrain, nope -- I just replaced 'send' with 'foo' as the name for both the class and instance methods (the class method invokes the instance method), same error
[23:20:23] drbrain: then the send method on that class is probably ruby's send, not the method you think is send
[23:20:28] EminenceHC: has joined #ruby
[23:22:24] platzhirsch: has joined #ruby
[23:22:51] drbrain: you can call .method(:send).owner and .source_location on the instance to figure out which #send you're calling
[23:23:52] tkuchiki: has joined #ruby
[23:28:32] xybre: has joined #ruby
[23:29:58] chouhoulis: has joined #ruby
[23:30:36] tenderlo_: has joined #ruby
[23:30:40] `mrspock: has joined #ruby
[23:30:47] Keltia_: has joined #ruby
[23:30:58] `mrspock: has left #ruby: ()
[23:31:34] timmow: has joined #ruby
[23:32:00] nettoweb: has joined #ruby
[23:32:08] mikecmpbll: has joined #ruby
[23:32:23] yasu_: has joined #ruby
[23:32:24] Radar_: has joined #ruby
[23:32:47] porfa: shevy: https://gist.github.com/anonymous/ff8f164e5a0d549cc4ab
[23:32:54] porfa: better? :/
[23:32:56] maikowblue_: has joined #ruby
[23:33:00] kobain: has joined #ruby
[23:33:07] Jello_Raptor_: has joined #ruby
[23:33:09] tkuchiki: has joined #ruby
[23:33:11] ajafo: has joined #ruby
[23:33:20] loop3r: has joined #ruby
[23:33:27] sugardrunk: has joined #ruby
[23:33:29] Nilium: has joined #ruby
[23:33:33] veloutin: has joined #ruby
[23:33:39] vifino: has joined #ruby
[23:33:40] Raboo: has joined #ruby
[23:33:41] davidcelis: has joined #ruby
[23:33:46] Scroff: has joined #ruby
[23:33:47] stuartb: has joined #ruby
[23:33:51] ltd: has joined #ruby
[23:33:52] davidcelis: has joined #ruby
[23:33:55] perry: has joined #ruby
[23:33:55] perry: has joined #ruby
[23:33:56] bankair: has joined #ruby
[23:33:56] jxie: has joined #ruby
[23:33:59] tsunamie: has joined #ruby
[23:33:59] PDI: has joined #ruby
[23:33:59] shevy: your indent still seems inconsistent
[23:34:03] qpls: has joined #ruby
[23:34:03] yxhuvud: has joined #ruby
[23:34:06] DarthGandalf: has joined #ruby
[23:34:12] ndrei: has joined #ruby
[23:34:14] shevy: you should try to put things on the same expression-level on the same indent level
[23:34:19] joevandyk: has joined #ruby
[23:34:20] Esya|: has joined #ruby
[23:34:28] martinbjeldbak: has joined #ruby
[23:34:34] sluukkonen: has joined #ruby
[23:34:35] icedp: has joined #ruby
[23:34:36] benaiah: has joined #ruby
[23:34:42] wlanboy: has joined #ruby
[23:34:43] Prira: has joined #ruby
[23:34:44] vbatts|work: has joined #ruby
[23:34:49] russt: has joined #ruby
[23:34:50] kiper: has joined #ruby
[23:34:52] rmrrn: has joined #ruby
[23:34:52] rmrrn: has joined #ruby
[23:34:57] bradland: has joined #ruby
[23:35:02] Veejay: has joined #ruby
[23:35:06] marens: has joined #ruby
[23:35:06] marens: has joined #ruby
[23:35:12] mhenrixon: has joined #ruby
[23:37:04] charliesome: has joined #ruby
[23:40:10] ericjphillips: has joined #ruby
[23:40:19] stardiviner: has joined #ruby
[23:41:02] renanoronfle: has joined #ruby
[23:41:44] karapetyan: has joined #ruby
[23:42:24] porfa: https://gist.github.com/anonymous/204709baf66659761da5 better? still not working though
[23:42:31] p0wn3d: has joined #ruby
[23:43:21] clamstar: has joined #ruby
[23:44:33] Spami: has joined #ruby
[23:45:41] RobertBirnie: has joined #ruby
[23:46:30] CloCkWeRX: has joined #ruby
[23:46:37] devoldmx: has joined #ruby
[23:52:07] aaeron: has joined #ruby
[23:52:40] bmurt: has joined #ruby
[23:54:09] Rohanezio: has joined #ruby
[23:54:24] Rohanezio: Hey guys! I'm new to ruby and need some help if possible :)
[23:54:36] porfa: how can i get data from an array and turn it into a var?
[23:55:14] porfa: i want to run a loop and create vars for each element in the array
[23:57:05] porfa: is there a public log of this channel? i want to look at my lines in a couple of years
[23:58:49] adaedra: Porfa: see topic.
[23:58:51] adaedra: ?code Rohanezio
[23:58:52] ruboto: Rohanezio, We can't help you without your code, please post it to https://gist.github.com
[23:58:58] otacon-: guys, suppose we have 5 classes which share the same intialize method. is *this alone* enough justification to create a superclass?
[23:59:07] adaedra: ?anyone Rohanezio
[23:59:07] ruboto: Rohanezio, Just ask your question, if anyone has or can, they will respond.
[23:59:18] porfa: adaedra: nice
[23:59:23] michaeldeol: has joined #ruby
[23:59:29] rushed: has joined #ruby
[23:59:29] adaedra: otacon-: are these classes linked to each other?
[23:59:44] Rohanezio: Ok, so on a webpage, we have a scoreboard, and we need to split them apart so the two teams are seen as different columns instead of one huge column