« Back to channel list

#ruby - 07 March 2016

« Back 1 day Forward 1 day »
[00:05:51] chouhoulis: has joined #ruby
[00:05:53] jeanlinux: has joined #ruby
[00:10:44] pawnbox: has joined #ruby
[00:14:40] shellie_: has joined #ruby
[00:19:17] arlek: has joined #ruby
[00:19:45] LoneHerm_: has joined #ruby
[00:19:46] chouhoulis: has joined #ruby
[00:19:48] TomyLobo: has joined #ruby
[00:23:01] pibby: has joined #ruby
[00:29:27] bry4n: has joined #ruby
[00:29:43] jyaworski: has joined #ruby
[00:30:27] tristanp: has joined #ruby
[00:31:15] idefine: has joined #ruby
[00:31:46] pawnbox: has joined #ruby
[00:34:31] gregf: has joined #ruby
[00:34:59] CloCkWeRX: has joined #ruby
[00:37:53] freerobby: has joined #ruby
[00:42:11] jinette: has joined #ruby
[00:42:51] rmulligan: has joined #ruby
[00:43:10] idefine: has joined #ruby
[00:43:36] bob434: has joined #ruby
[00:46:08] Rodya_: has joined #ruby
[00:46:26] rizenine: has joined #ruby
[00:47:00] jinette: hello everyone, I am trying to tweak a site that is a Ruby on Rails app that is mostly based on SCSS, amazon_flex_pay gem, and a bit of CoffeeScript. it suggested heroku for deployment, so I've been using it since this morning. but I got stuck with adding some font files to embed in the site. after hours of css-focused wrestling, I was hinted that the font files might not have been on heroku at all. I am new to all this. could you help me know what
[00:47:00] jinette: the problem here could be, and how I could solve it?
[00:51:00] Musashi007: has joined #ruby
[00:51:43] bob434: has joined #ruby
[00:51:45] InternetFriend: has joined #ruby
[00:53:01] nanoz: has joined #ruby
[00:53:23] ur5us: has joined #ruby
[00:53:27] idefine: has joined #ruby
[00:53:36] ur5us: has joined #ruby
[00:54:32] tonyynot: has joined #ruby
[00:56:01] duckpuppy: has joined #ruby
[00:57:07] sondr3: has joined #ruby
[00:57:32] freerobby: has joined #ruby
[00:58:08] darkxploit: has joined #ruby
[00:59:45] eregi: has joined #ruby
[01:01:23] lvn: has joined #ruby
[01:03:23] hgl: has joined #ruby
[01:04:34] idefine: has joined #ruby
[01:10:15] jeanlinux: has joined #ruby
[01:12:54] arescorpio: has joined #ruby
[01:17:12] idefine: has joined #ruby
[01:20:55] godzillaenlacasa: has joined #ruby
[01:21:29] pawnbox: has joined #ruby
[01:26:16] mattwildig: has joined #ruby
[01:28:29] havenwood: jinette: I think font files tend to not get included in the asset pipeline. I'd suggest checking with the #rubyonrails channel.
[01:28:59] chipotle: has joined #ruby
[01:29:07] mattwildig: has left #ruby: ()
[01:30:07] jinette: havenwood, sure, I would go join there. do you mean I might not be able to add them at all?
[01:30:43] havenwood: jinette: I vaguely recall you can append additional specific fonts or font file types in your Rails config.
[01:31:16] havenwood: jinette: The #rubyonrails channel is probably the best place to ask how.
[01:31:20] Guest34101: has joined #ruby
[01:32:29] havenwood: jinette: Something like: config.assets.precompile += %w[.svg .ttf]
[01:33:53] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[01:34:31] synthroid: has joined #ruby
[01:36:24] ebbflowgo: has joined #ruby
[01:36:44] havenwood: jinette: https://gist.github.com/anotheruiguy/7379570
[01:37:04] rmulligan: has joined #ruby
[01:39:16] jinette: havenwood, seems a great link, thank you!! 'The problem is, simply adding a fonts directory isn't picked up by the pipeline.' this is what didnt work in my case, either
[01:40:21] jinette: havent tried yet, but seems just what I needed
[01:41:20] hgl: has joined #ruby
[01:42:48] A124: has joined #ruby
[01:43:11] TinkerTyper: has joined #ruby
[01:44:05] sp4rrow: has joined #ruby
[01:44:13] d0nn1e: has joined #ruby
[01:45:43] tungd: has joined #ruby
[01:46:47] InternetFriend: has joined #ruby
[01:47:01] Rodya_: has joined #ruby
[01:47:04] djbkd: has joined #ruby
[01:51:34] baweaver: has joined #ruby
[01:55:51] eregi: has joined #ruby
[01:56:29] stannard: has joined #ruby
[01:57:46] lyoshajapan: has joined #ruby
[02:00:11] tungd: has joined #ruby
[02:01:24] pawnbox: has joined #ruby
[02:04:05] Rodya_: has joined #ruby
[02:04:12] jinette: has left #ruby: ("Leaving")
[02:04:48] winfli_: has joined #ruby
[02:09:06] braincrash: has joined #ruby
[02:16:40] crowell: has joined #ruby
[02:18:17] cdg: has joined #ruby
[02:18:48] InternetFriend: has joined #ruby
[02:20:13] S1kx: has joined #ruby
[02:20:32] dubek: has joined #ruby
[02:25:13] darkf: has joined #ruby
[02:29:20] tungd: has joined #ruby
[02:30:03] jenrzzz: has joined #ruby
[02:31:06] rmulligan: has joined #ruby
[02:34:57] chipotle: has joined #ruby
[02:35:02] nando293921: has joined #ruby
[02:35:56] shevy: does anyone know why .delete() does not accept Regexp as input?
[02:41:24] circ-user-53WM5: has joined #ruby
[02:41:37] S1kx: has joined #ruby
[02:45:11] Radar: shevy: in what context?
[02:45:29] norc_: has joined #ruby
[02:49:11] havenwood: >> 'TIMTOWTDI'.delete 'a-zA-Z', '^aeiouAEIOU'
[02:49:12] ruby[bot]: havenwood: # => "IOI" (https://eval.in/531504)
[02:50:29] baweaver: has joined #ruby
[02:51:12] shevy: Radar for instance when rejecting numbers
[02:51:24] havenwood: shevy: What's the receiver?
[02:51:37] havenwood: shevy: String, Hash, Array, other?
[02:51:40] shevy: havenwood well, user input in a String
[02:54:15] tristanp: has joined #ruby
[02:54:39] havenwood: hackeron_: Regexp match per char with the intersection of its optional arg Regexp deleted sounds interesting - but the per-char thing is odd.
[02:54:45] havenwood: hackeron_: sorry MT
[02:56:41] havenwood: shevy: String#delete has been about globbing. How would the details work with Regexp? Is it worth proposing?
[02:56:41] chouhoulis: has joined #ruby
[02:58:01] duckpuppy: has joined #ruby
[02:58:05] charliesome: has joined #ruby
[02:58:18] diego2: has joined #ruby
[02:58:56] sondr3: has joined #ruby
[02:58:59] havenwood: >> class String; alias old_delete delete; def delete arg; if arg.is_a?(String); old_delete(arg); else; self.gsub(arg, ''); end; end; end
[02:59:00] ruby[bot]: havenwood: # => :delete (https://eval.in/531505)
[02:59:04] havenwood: class String; alias old_delete delete; def delete arg; if arg.is_a?(String); old_delete(arg); else; self.gsub(arg, ''); end; end; end
[02:59:35] diego2: has joined #ruby
[02:59:59] havenwood: but yeah, second optional arg
[03:00:09] havenwood: have to decide how that'd work
[03:00:45] havenwood: (didn't mean to paste twice, silly code, relocating)
[03:04:41] shevy: havenwood well I just used .gsub but I was wondering why .delete does not want regexes
[03:04:55] duckpuppy: has joined #ruby
[03:05:15] A124: has joined #ruby
[03:05:25] shevy: havenwood yeah, perhaps there is a reason why it does not accept regexes. I don't want to suggest to ruby-core when it is likely to not get accepted anyway
[03:13:35] cbw: has joined #ruby
[03:14:20] cbw: has joined #ruby
[03:15:37] cbw: has joined #ruby
[03:16:15] havenwood: shevy: the historical method takes globs for first and second arguments. Maybe there should be a String#scan_v, then it could function for the second arg of the Regexp version.
[03:18:01] havenwood: shevy: but yeah, I get wanting to feed it regex
[03:19:11] havenwood: shevy: gsub
[03:19:22] CloCkWeRX: has joined #ruby
[03:19:51] havenwood: shevy: now String#scan_v is one to propose. :D
[03:20:43] havenwood: inversed scan
[03:21:27] InternetFriend: has joined #ruby
[03:21:30] shevy: verbose scan!
[03:21:33] arlek: has joined #ruby
[03:21:43] shevy: notice the cute little v ... :D
[03:21:46] pawnbox: has joined #ruby
[03:22:15] havenwood: shevy: http://ruby-doc.org/core-2.3.0/Enumerable.html#method-i-grep_v
[03:23:24] havenwood: shevy: -v, --invert-match
[03:23:38] havenwood: "Invert the sense of matching, to select non-matching lines. (-v is specified by POSIX.)"
[03:24:02] shevy: verbose!!!
[03:24:06] peteyg: has joined #ruby
[03:24:27] havenwood: shevy: -V, --version
[03:24:32] havenwood: "Print the version number of grep to the standard output stream. This version number should be included in all bug reports."
[03:24:33] shevy: you mean like in "ruby -V" :D
[03:24:43] havenwood: shevy: Ruby uses lowercase -v
[03:25:16] rmulligan: has joined #ruby
[03:26:28] havenwood: shevy: The GNU coding standards require --help and --version but don't require that the short form be either -v or -V, afaik.
[03:26:45] havenwood: shevy: verbose, version, other, it varies
[03:28:15] havenwood: shevy: also --asign, --vanilla-operation, --version-control, --vgrind and --volume as standard options
[03:28:35] havenwood: shevy: https://www.gnu.org/prep/standards/html_node/Option-Table.html#Option-Table
[03:28:39] havenwood: shevy: https://www.gnu.org/prep/standards/html_node/Command_002dLine-Interfaces.html
[03:28:40] jeanlinux: has joined #ruby
[03:29:44] shevy: oh my god that's a lot of long options
[03:30:06] shevy: did some poor person go through all of these!
[03:30:13] havenwood: shevy: When you create a command line tool, that's the place to look to make sure you choose an existing option if applicable.
[03:31:30] havenwood: shevy: Considering submitting a new --latest option for updating metadata without updating the tool itself.
[03:32:28] ivanskie_: has joined #ruby
[03:32:31] Cyrus: has joined #ruby
[03:32:47] pawnbox: has joined #ruby
[03:35:22] Rodya_: has joined #ruby
[03:37:28] meunierd: has joined #ruby
[03:38:03] IrishGringo: has joined #ruby
[03:38:35] hgl: has joined #ruby
[03:42:57] lyoshajapan: has joined #ruby
[03:43:20] nisstyre: has joined #ruby
[03:43:41] tjbiddle: has joined #ruby
[03:43:42] howdoi: has joined #ruby
[03:43:55] paatalaBhairavi: has joined #ruby
[03:45:26] lyoshajapan: has joined #ruby
[03:53:08] DmitryBochkarev: has joined #ruby
[03:54:43] uglybandersnatch: has joined #ruby
[03:57:13] idefine: has joined #ruby
[03:57:55] justbleed: has joined #ruby
[03:59:21] abucha: has joined #ruby
[03:59:58] zacts: hi rubyists
[04:00:34] pwnd_nsfw`: has joined #ruby
[04:01:01] tungd: has joined #ruby
[04:02:30] shevy: yo zacts the tacts
[04:04:23] ledestin: has joined #ruby
[04:04:29] pawnbox: has joined #ruby
[04:04:51] blackmesa: has joined #ruby
[04:05:36] krz: has joined #ruby
[04:06:01] j416: has joined #ruby
[04:08:02] abucha: has joined #ruby
[04:08:17] tristanp: has joined #ruby
[04:08:17] Limix: has joined #ruby
[04:10:40] gix: has joined #ruby
[04:10:48] mallu: has joined #ruby
[04:11:21] mallu: has joined #ruby
[04:14:30] abucha_: has joined #ruby
[04:17:24] braincrash: has joined #ruby
[04:18:09] llua: has left #ruby: ()
[04:18:23] llua: has joined #ruby
[04:19:14] baweaver: has joined #ruby
[04:19:23] rmulligan: has joined #ruby
[04:19:37] LoneHerm_: has joined #ruby
[04:23:47] tvon: has joined #ruby
[04:24:02] cmckee: has joined #ruby
[04:30:04] jeanlinux: has joined #ruby
[04:30:15] BtcBen: has joined #ruby
[04:35:22] dx: has joined #ruby
[04:36:39] Rodya_: has joined #ruby
[04:40:43] treaki_: has joined #ruby
[04:47:37] BTRE: has joined #ruby
[04:47:46] dx: hi. i have some commandline tools like t or jekyll installed, and every time a major ruby upgrade happens (like 2.2->2.3) running their binaries breaks with Gem::LoadError
[04:48:44] dx: am i doing something wrong or is this the intended behavior? i see the directories are versioned...
[04:50:00] adgtl: has joined #ruby
[04:51:59] UtkarshRay: has joined #ruby
[04:54:02] shevy: what is the specific error
[04:54:03] eregi: has joined #ruby
[04:55:04] dx: http://dump.dequis.org/1z20o.txt
[04:55:30] shevy: hmm so the executable is called "t" ?
[04:55:51] dx: yeah. also the name of the gem. jekyll does the same thing
[04:56:07] shevy: ok I see it now https://rubygems.org/gems/t
[04:57:13] shevy: I just did a "gem install t"
[04:57:47] shevy: running "t" from the commandline, shows the options fine: https://gist.github.com/shevegen/be5f17077e41743df68c
[04:58:09] shevy: dx so whatever it is on your system, the t gem could not be found
[04:58:10] dx: the problem is that i had it installed for 2.2 (and also for 2.1, and for 2.0, and for 1.9), and every single time that a major ruby version was released i got that error and had to reinstall it
[04:58:25] dx: the same thing for other gems that i stopped using it
[04:58:34] shevy: yeah, the gems are usually installed in a directory for the respective ruby version
[04:58:53] dx: so, is this pain in the ass the intended behavior?
[04:58:55] shevy: for instance, I have ruby 2.3.0p0 and my gem dir is at: /Programs/Ruby/Current/lib/ruby/gems/2.3.0
[04:59:07] dx: is there anything that can be done to make this suck less?
[04:59:10] shevy: dx well, all gems are also kept locally in that directory
[04:59:15] shevy: collect all gems
[04:59:20] shevy: gem install ./*.gem
[04:59:45] dx: gotta catch em all
[04:59:52] dx: how do i do that step?
[04:59:54] shevy: yes, they are all in the cache/ subdirectory too
[05:00:14] shevy: well locate that cache/ subdirectory first of your older ruby version
[05:00:25] shevy: mine is at /Programs/Ruby/Current/lib/ruby/gems/2.3.0/cache/
[05:00:31] dx: neat, that helps
[05:00:45] shevy: 53 gems are there; I also keep a local copy of all gems that I use... about 300 gems or so
[05:01:14] shevy: btw, if you do not need to compile anything, you could possibly even just do a cp -rv (recursive copy) and it should work... but using .gem files is probably easier and more reliable
[05:01:58] dx: sadly compiling is needed http://dump.dequis.org/HpYv5.txt
[05:02:24] dx: but this did the job "gem install ~/.gem/ruby/2.2.0/cache/*.gem"
[05:02:28] dx: thanks!
[05:03:08] shevy: t works now?
[05:05:38] blackmesa: has joined #ruby
[05:05:40] lyoshajapan: has joined #ruby
[05:06:55] safe: has joined #ruby
[05:07:21] meunierd: has joined #ruby
[05:09:14] dx: yep all good now
[05:09:56] pawnbox: has joined #ruby
[05:12:02] deuxclique: has joined #ruby
[05:12:14] Guest34101: has joined #ruby
[05:13:29] rmulligan: has joined #ruby
[05:14:03] DmitryBochkarev: has joined #ruby
[05:15:55] uglybandersnatch: has joined #ruby
[05:16:08] DmitryBochkarev: has joined #ruby
[05:17:12] duncannz: has joined #ruby
[05:18:34] elifoster: has joined #ruby
[05:20:06] lyoshajapan: has joined #ruby
[05:23:17] thegunbuster: has joined #ruby
[05:23:37] mistym: has joined #ruby
[05:23:44] lyoshajapan: has joined #ruby
[05:25:04] ICantCook: has joined #ruby
[05:27:17] hk238: has joined #ruby
[05:27:44] djbkd: has joined #ruby
[05:27:59] adgtl: has joined #ruby
[05:28:00] adgtl: has joined #ruby
[05:34:05] dkk: has joined #ruby
[05:36:49] dkk: i have an array a = [1, 2.0, 2] and i want to get the index of 2 using a.index(2) but i returns 1. Is there any way to get different indexes for 2 and 2.0??
[05:38:10] Rodya_: has joined #ruby
[05:38:19] [ace]: a.index {|x| x.eql? 2 }
[05:38:25] [ace]: >> a.index {|x| x.eql? 2.0 }
[05:38:57] [ace]: not sure if it should be eql? or equal?, but you get the idea
[05:39:01] uglybandersnatch: has joined #ruby
[05:40:18] charliesome: has joined #ruby
[05:41:28] dkk: yes, will there be any efficiency losses or gains using this instead of a.index(2) ? I suppose a.index(2) also iterates over all the items and a.index {|x| x.eql? 2 } is also doing the same??
[05:46:33] Zggb: has joined #ruby
[05:47:44] colegatron: has joined #ruby
[05:52:32] baweaver: has joined #ruby
[05:52:45] pawnbox: has joined #ruby
[05:57:35] InternetFriend: has joined #ruby
[05:57:47] eregi: has joined #ruby
[06:01:53] baweaver: has joined #ruby
[06:06:24] blackmesa: has joined #ruby
[06:07:38] rmulligan: has joined #ruby
[06:07:41] ur5us: has joined #ruby
[06:07:58] LoneHermit: has joined #ruby
[06:08:08] meunierd: has joined #ruby
[06:10:40] jwang: has joined #ruby
[06:11:00] system64: has joined #ruby
[06:11:36] kirillzh: has joined #ruby
[06:14:53] astrobun_: has joined #ruby
[06:17:46] tjbiddle: has joined #ruby
[06:17:58] kirillzh: Is there a way to check if string contains hours and minutes using Time or Date parser? For example "2016-03-13" doesn't contains hours and minutes whereas "2016-03-13 10:00AM" does.
[06:18:00] Moosashi: has joined #ruby
[06:18:10] skade: has joined #ruby
[06:18:19] kirillzh: doesn't contain*
[06:21:49] ArtursL: has joined #ruby
[06:23:35] ArtursL: has joined #ruby
[06:27:12] x77686d: has joined #ruby
[06:27:26] atmosx: has joined #ruby
[06:28:43] chouhoulis: has joined #ruby
[06:28:56] rickmasta: has joined #ruby
[06:29:24] elifoster: has joined #ruby
[06:31:35] jeanlinux: has joined #ruby
[06:33:18] Guest34101: has joined #ruby
[06:33:54] ur5us: has joined #ruby
[06:34:39] bluOxigen: has joined #ruby
[06:35:01] tAn: has joined #ruby
[06:35:38] ArtursL: has joined #ruby
[06:37:58] ArtursL: has joined #ruby
[06:40:39] Rodya_: has joined #ruby
[06:42:06] scepticulous: has joined #ruby
[06:44:07] lyoshajapan: has joined #ruby
[06:49:31] skade: has joined #ruby
[06:50:43] supplication: has joined #ruby
[06:52:24] eregi: has joined #ruby
[06:53:26] elifoster: has joined #ruby
[06:54:56] rippa: has joined #ruby
[06:55:29] scepticulous: has joined #ruby
[06:55:46] ponga: has joined #ruby
[06:56:45] aufi: has joined #ruby
[06:57:26] skade: has joined #ruby
[06:58:33] eregi: has joined #ruby
[06:59:35] vF3hNGxc47h8: has joined #ruby
[07:01:10] nfk: has joined #ruby
[07:01:47] rmulligan: has joined #ruby
[07:08:25] blackmesa: has joined #ruby
[07:09:45] aufi: has joined #ruby
[07:10:25] x77686d: has joined #ruby
[07:10:37] nerium: has joined #ruby
[07:10:51] the_drow: has joined #ruby
[07:11:32] SenpaiSilver_: has joined #ruby
[07:13:08] SenpaiSilver_: has joined #ruby
[07:13:56] LoneHerm_: has joined #ruby
[07:14:10] kohvihoor: has joined #ruby
[07:15:02] SenpaiSilver_: has joined #ruby
[07:16:57] SenpaiSilver_: has joined #ruby
[07:17:51] sandstrom: has joined #ruby
[07:19:01] SenpaiSilver_: has joined #ruby
[07:19:33] dionysus69: has joined #ruby
[07:19:53] Xeago: has joined #ruby
[07:22:12] jameswatling: has joined #ruby
[07:25:28] solars: has joined #ruby
[07:25:42] firstdayonthejob: has joined #ruby
[07:26:28] djbkd: has joined #ruby
[07:27:05] idletask: has joined #ruby
[07:28:21] jas02: has joined #ruby
[07:29:39] chouhoulis: has joined #ruby
[07:31:10] kgirthofer: has joined #ruby
[07:31:46] Moosashi: has joined #ruby
[07:34:09] DmitryBochkarev: has joined #ruby
[07:35:06] aganov: has joined #ruby
[07:38:16] charlemagne: has joined #ruby
[07:38:32] lyoshajapan: has joined #ruby
[07:38:53] TomyLobo: has joined #ruby
[07:40:01] steffkes: has joined #ruby
[07:40:39] andikr: has joined #ruby
[07:41:41] Rodya_: has joined #ruby
[07:43:52] last_staff: has joined #ruby
[07:46:16] solocshaw: has joined #ruby
[07:47:12] baweaver: has joined #ruby
[07:48:32] eregi: has joined #ruby
[07:49:22] djbkd: has joined #ruby
[07:49:55] idletask: Ox0dea: are you here?
[07:49:56] ziyadb: has joined #ruby
[07:52:50] siaW: has joined #ruby
[07:54:18] rkazak: has joined #ruby
[07:54:42] jaruga: has joined #ruby
[07:55:52] pawnbox: has joined #ruby
[07:55:52] rmulligan: has joined #ruby
[07:55:58] lxsameer: has joined #ruby
[07:57:44] charlemagne: has joined #ruby
[07:58:20] armyriad: has joined #ruby
[08:00:32] scepticulous: has joined #ruby
[08:02:05] skade: has joined #ruby
[08:02:56] danjam: has joined #ruby
[08:03:31] tAn: has joined #ruby
[08:03:46] Guest34101: has joined #ruby
[08:04:03] biberu: has joined #ruby
[08:05:34] flughafen: hello everybody
[08:07:58] SCHAAP137: has joined #ruby
[08:08:10] mfaeh: has joined #ruby
[08:09:14] blackmesa: has joined #ruby
[08:10:19] meunierd: has joined #ruby
[08:10:43] T7rees: has joined #ruby
[08:11:32] rickmasta: has joined #ruby
[08:12:55] Couch: has joined #ruby
[08:14:05] sandstrom: has joined #ruby
[08:15:07] Mia: has joined #ruby
[08:17:41] vondruch: has joined #ruby
[08:17:55] TTilus: has joined #ruby
[08:19:29] psmolen: has joined #ruby
[08:21:12] moeabdol4: has joined #ruby
[08:21:50] godzillaenlacasa: has joined #ruby
[08:22:28] moeabdol: has joined #ruby
[08:25:00] mondok: has joined #ruby
[08:27:11] shredding: has joined #ruby
[08:27:16] mts_forever: has joined #ruby
[08:29:13] mts_forever: in ROR context , setting a mongoid model class with rails g model .... I get "field" keywords, where can I find documentation on this keyword?
[08:30:05] antgel: has joined #ruby
[08:30:32] tobiasvl: mts_forever: on #rubyonrails
[08:30:34] chouhoulis: has joined #ruby
[08:30:59] jhass: and in the mongoid docs of course
[08:31:42] hs366: has joined #ruby
[08:32:59] anisha: has joined #ruby
[08:33:00] roshanavand: has joined #ruby
[08:33:29] jeanlinux: has joined #ruby
[08:33:45] baweaver: has joined #ruby
[08:33:45] lyoshajapan: has joined #ruby
[08:33:56] Mon_Ouie: has joined #ruby
[08:34:29] moeabdol1: has joined #ruby
[08:34:36] SenpaiSilver_: has joined #ruby
[08:35:30] jaruga: has joined #ruby
[08:38:46] charlemagne: has joined #ruby
[08:38:49] kam270: has joined #ruby
[08:39:45] thevaliantx: has joined #ruby
[08:40:56] tulak: has joined #ruby
[08:41:20] thevaliantx: i am trying to get Ruby installed on Linux Mint 17, and two problems. #1 when I install the ruby package it's just 1.9.x ... #2 when I install using internet tutorials (ie, rvm), as root since sudo apt-get install is needed, nothing sticks. as soon as i close the terminal and re-open the terminal and run rvm it says that it's not found.
[08:42:30] Rodya_: has joined #ruby
[08:43:37] Moosashi: has joined #ruby
[08:43:47] siaw_: has joined #ruby
[08:44:39] jbrhbr: has joined #ruby
[08:45:38] jhass: you shouldn't install RVM as root, it's a lot harder to use in that mode
[08:45:46] jhass: do you have a /usr/local/rvm already?
[08:46:13] Hanmac: thevaliantx: #1 check the software packages for newer ruby ... it should have packages for the 2.* too, you can switch them with update-alternative #2 if you add install rvm as user from https://rvm.io/rvm/install you need to add it to your .bash_profile as seen there
[08:46:50] diver_dv: has joined #ruby
[08:47:02] Hanmac: jhass: it depends, i use rvm as root, and it does work as it should too
[08:47:31] jhass: yes but there are a few more loops to jump through which IME are too confusing to newcomers
[08:48:54] thevaliantx: jhass i have no idea. the tutorial i was using said nothing about switching out of root after running the sudo apt-get install commands.
[08:49:18] eregi: has joined #ruby
[08:49:26] Macaveli: has joined #ruby
[08:49:27] jhass: weird tutorial to make you run any at all, RVM does that for you
[08:49:53] jhass: but just check whether that directory exists please?
[08:50:00] pawnbox: has joined #ruby
[08:50:01] rmulligan: has joined #ruby
[08:50:15] thevaliantx: https://www.computersnyou.com/4235/setup-ruby-rails-development-environment-linux-mint/
[08:50:20] thevaliantx: checking now, jhass
[08:50:54] thevaliantx: jhass there is a /usr/local/rvm
[08:51:55] jhass: yeah okay throw that tutorial away and let's purge that and get you back to a clean state
[08:52:06] jhass: https://rvm.io/support/troubleshooting run the commands from the second to last entry please
[08:52:44] apeiros: that tutorial doesn't seem to tell you to install rvm as root.
[08:53:15] thevaliantx: apeiros: correct, but it never told me to switch out of root after running the apt-get commands, either. that's where the confusion was.
[08:53:28] apeiros: thevaliantx: it never told you to use root to do apt-get either
[08:53:32] apeiros: it told you to use sudo
[08:53:58] mikhael_k33hl: has joined #ruby
[08:54:17] thevaliantx: apeiros: i typed "sudo apt-get install..."
[08:54:36] mikhael_k33hl: WHen using the attr_accessor, attr_reader, and attr_writer, how do I determine what kind of variables are set for it or is it automatically considered an instance variable?
[08:54:42] apeiros: yes, that's a) not the same as being root and b) drops the elevated privileges right after that call
[08:54:54] kp666: has joined #ruby
[08:54:55] ramfjord: has joined #ruby
[08:55:00] thevaliantx: apeiros: okay. getting off track here.
[08:55:05] jhass: mikhael_k33hl: always instance variables
[08:55:22] mikhael_k33hl: jhass, oh okay thanks
[08:56:11] jhass: thevaliantx: ping back when you purged RVM using above guide
[08:56:32] thevaliantx: jhass i'm not sure which command i should start with. "rvm get head"?
[08:56:45] apeiros: thevaliantx: it's difficult to help you if what you say you did is not what you actually did.
[08:56:45] jhass: thevaliantx: the second to last entry on the page I linked you
[08:56:59] apeiros: ACTION afk, jhass got you covered
[08:56:59] jhass: all the commands there
[08:58:42] rdark: has joined #ruby
[08:59:23] thevaliantx: jhass okay. ran the commands and then ran rvm ... no rvm found
[08:59:27] pawnbox: has joined #ruby
[08:59:43] jhass: we just purged all traces of it, quite expected, don't you think?
[08:59:51] pawnbox: has joined #ruby
[08:59:54] jhass: close your terminal emulator and get a new one please
[09:00:19] jhass: as your normal working user, not as root, not prepending sudo, run gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
[09:00:22] mrknip: has joined #ruby
[09:00:59] thevaliantx: okay. complete
[09:01:27] jhass: as your normal working user, not as root, not prepending sudo, run \curl -sSL https://get.rvm.io | bash -s latest
[09:02:28] thevaliantx: okay. completed.
[09:02:45] tesuji: has joined #ruby
[09:03:12] terlar: has joined #ruby
[09:03:16] jhass: good, now go to your terminal emulators settings and there configure it use a login shell
[09:03:17] thevaliantx: am i the only in here up at 4am?
[09:05:20] tvw: has joined #ruby
[09:05:38] darkxploit: has joined #ruby
[09:06:04] thevaliantx: i don't see an option in LXTerminal to configure that. xterm doesn't have any options
[09:06:29] jhass: https://rvm.io/integration/lxterminal
[09:06:48] f4cl3y: has joined #ruby
[09:07:15] igam: has joined #ruby
[09:07:24] Moosashi: has joined #ruby
[09:07:27] Ropeney: has joined #ruby
[09:07:34] araujo: has joined #ruby
[09:08:15] charlemagne: has joined #ruby
[09:09:36] codecop: has joined #ruby
[09:09:38] codecop_: has joined #ruby
[09:09:50] jenrzzz: has joined #ruby
[09:09:57] blackmesa: has joined #ruby
[09:09:59] thevaliantx: jhass thanks. i ran the first step on that page for configuring lxterminal. it suggested i might have to log out of the session and back in.
[09:10:32] jhass: silly system, but okay
[09:11:04] adaedra: Greetings.
[09:11:16] apeiros: bonjour adaedra
[09:12:19] drptbl: has joined #ruby
[09:12:33] jhass: thevaliantx: so after having done that, check what rvm current reports, if it says system run rvm install 2.3.0 (still not as root or using sudo, but if that asks you for your sudo password, give it)
[09:12:41] vondruch: has joined #ruby
[09:12:46] n008f4g_: has joined #ruby
[09:13:07] jeanlinux: has joined #ruby
[09:13:26] _main_: has joined #ruby
[09:14:01] thevaliantx: jhass ... said system ... no password required.
[09:14:12] Xeago: has joined #ruby
[09:14:33] DoubleMalt: has joined #ruby
[09:14:42] jhass: once that's through run rvm use --default 2.3.0 and check rvm current again
[09:15:46] charlemagne: has joined #ruby
[09:16:39] idletask: Yay, I can actually parse pretty complex expressions now
[09:17:08] thevaliantx: no woman can conquer you now :)
[09:17:22] moeabdol: has joined #ruby
[09:18:49] the_drow: has joined #ruby
[09:19:00] thevaliantx: idletask: feel free to throw tomatoes, but that was intended for you :)
[09:19:12] nocontrol: has joined #ruby
[09:19:33] thevaliantx: jhass: rvm current shows it running ruby-2.3.0
[09:19:43] jhass: congratulations, that's all
[09:20:19] thevaliantx: wow. thank you very much :) is it gems that i need to install for modules? i read about something called "shoes" today.
[09:20:44] snowy: has joined #ruby
[09:20:44] jhass: simply run gem install shoes4 (I think that was the last active one)
[09:21:07] jhass: again, no sudo, no root
[09:21:27] thevaliantx: says shoes4 not found in repository
[09:22:26] nocontrol: I am receiving a string by an http request which is in this form https://gist.github.com/anonymous/4e67261b71df6aa7e554. When I am try to parse it, ruby sees it as a String and not a Hash. Is there any way I could parse it or am I thinking completely wrong ?
[09:23:07] baweaver: http://www.copterlabs.com/json-what-it-is-how-it-works-how-to-use-it/
[09:23:14] baweaver: nocontrol: ^
[09:23:24] baweaver: Then just look up JSON in Ruby.
[09:23:29] adac: has joined #ruby
[09:23:39] mark2: has joined #ruby
[09:23:47] nocontrol: baweaver: I know how to use json, but I am receiving a string by an http request
[09:24:02] nocontrol: baweaver: do you suggest to convert it to json format ?
[09:25:36] svkurowski: has joined #ruby
[09:26:34] thevaliantx: the exercises i've been doing in python are here => http://www.ling.gu.se/~lager/python_exercises.html
[09:26:35] Anderson69s_Deb: has joined #ruby
[09:26:48] thevaliantx: they might be useful to beginner ruby programmers
[09:27:33] thevaliantx: that's what i'm going to use to help me learn ruby. if anyone knows of other programming exercises sites i'd love to hear about htem
[09:28:54] jhass: thevaliantx: exercism.io is nice, once you know the basic syntax that is
[09:30:08] jhass: nocontrol: that is json, just parse it
[09:32:35] chouhoulis: has joined #ruby
[09:35:05] drptbl: has joined #ruby
[09:35:16] jenrzzz: has joined #ruby
[09:35:49] scepticulous: has joined #ruby
[09:37:13] marr: has joined #ruby
[09:40:29] mfaeh: has joined #ruby
[09:40:41] marr: has joined #ruby
[09:41:18] scepticulous: has joined #ruby
[09:41:36] Xeago: has joined #ruby
[09:41:55] Xeago: has joined #ruby
[09:42:39] konsolebox: has joined #ruby
[09:43:25] romain_t: has joined #ruby
[09:44:06] duderonomy: has joined #ruby
[09:44:11] rmulligan: has joined #ruby
[09:46:14] ramfjord: has joined #ruby
[09:50:30] eregi: has joined #ruby
[09:51:09] sandstrom: has joined #ruby
[09:57:11] ferr: has joined #ruby
[09:57:25] uglybandersnatch: has joined #ruby
[09:59:53] Mon_Ouie: has joined #ruby
[09:59:58] ensyde__: has joined #ruby
[10:06:31] aryaching: has joined #ruby
[10:07:33] sandstrom: has joined #ruby
[10:07:55] thevaliantx: thanks for the help, jhass. going to bed (5am here)
[10:08:32] lipoqil: has joined #ruby
[10:08:55] gregf_: >> require "json"; JSON.parse(%|{"192.168.1.2":true,"192.168.1.3":true,"192.168.1.7":false,"192.168.1.1":true}|).select{|_,v| v }.keys
[10:08:56] ruby[bot]: gregf_: # => ["192.168.1.2", "192.168.1.3", "192.168.1.1"] (https://eval.in/531702)
[10:09:19] gregf_: ^^ nocontrol # you need to have more control :|
[10:09:40] nocontrol: gregf_: I believe I got something
[10:09:52] nocontrol: gregf_: thank you
[10:09:58] gregf_: dont wish *begs*
[10:10:43] blackmesa: has joined #ruby
[10:11:03] meunierd: has joined #ruby
[10:11:25] dgncn: has joined #ruby
[10:14:47] BSaboia: has joined #ruby
[10:20:34] joonty: has joined #ruby
[10:24:53] MyMind: has joined #ruby
[10:25:10] pandaant: has joined #ruby
[10:27:54] blackmesa: has joined #ruby
[10:28:01] tulak: has joined #ruby
[10:28:55] binaryplease: has joined #ruby
[10:33:20] chouhoulis: has joined #ruby
[10:33:24] futilegames: has joined #ruby
[10:38:18] rmulligan: has joined #ruby
[10:39:24] blackms: has joined #ruby
[10:42:59] FooMunki: has joined #ruby
[10:43:18] Ishido: has joined #ruby
[10:44:03] Rodya_: has joined #ruby
[10:45:21] baweaver: has joined #ruby
[10:45:54] workmad3: has joined #ruby
[10:46:37] sandstrom: has joined #ruby
[10:49:06] SenpaiSilver_: has joined #ruby
[10:49:40] xue: has joined #ruby
[10:49:43] sandstrom: has joined #ruby
[10:51:16] eregi: has joined #ruby
[10:53:18] sandstrom: has joined #ruby
[10:56:21] aryaching: has joined #ruby
[10:57:17] skakri: has joined #ruby
[10:58:15] jenrzzz: has joined #ruby
[10:58:26] Tempesta: has joined #ruby
[11:03:49] zipace: has joined #ruby
[11:05:23] InternetFriend: has joined #ruby
[11:05:50] Ropeney: has joined #ruby
[11:06:35] mfaeh: has joined #ruby
[11:07:05] joonty: has joined #ruby
[11:10:56] rabbel: has joined #ruby
[11:11:18] rabbel: has left #ruby: ()
[11:12:26] charlemagne: has joined #ruby
[11:14:09] chocoelho: has joined #ruby
[11:16:30] ziyadb: has joined #ruby
[11:16:55] rodfersou: has joined #ruby
[11:25:06] volty: has joined #ruby
[11:25:45] ldnunes: has joined #ruby
[11:30:02] ziprar: has joined #ruby
[11:30:38] DmitryBochkarev: has joined #ruby
[11:31:11] c355E3B: has joined #ruby
[11:31:22] bluOxigen_: has joined #ruby
[11:32:27] rmulligan: has joined #ruby
[11:34:06] chouhoulis: has joined #ruby
[11:34:17] jottr: has joined #ruby
[11:36:36] maner: has joined #ruby
[11:36:39] e4xit: has joined #ruby
[11:36:50] fsapo: has joined #ruby
[11:39:17] paatalaBhairavi: has joined #ruby
[11:42:20] Patrezze: has joined #ruby
[11:45:51] Rodya_: has joined #ruby
[11:47:14] charliesome: has joined #ruby
[11:50:54] but3k4: has joined #ruby
[11:52:02] eregi: has joined #ruby
[11:53:04] arlek: has joined #ruby
[11:54:12] drptbl: has joined #ruby
[11:59:56] sdothum: has joined #ruby
[12:00:01] skade: has joined #ruby
[12:01:54] evidex: has joined #ruby
[12:01:55] Merry__: has joined #ruby
[12:03:53] darkxploit: has joined #ruby
[12:06:13] Pathfinder: has joined #ruby
[12:07:24] bweston92: has joined #ruby
[12:08:34] binaryplease: has joined #ruby
[12:09:21] aeontech: has joined #ruby
[12:11:52] meunierd: has joined #ruby
[12:14:06] mfaeh: has joined #ruby
[12:17:40] antgel: has joined #ruby
[12:19:16] tungd: has joined #ruby
[12:19:53] johnmilton: has joined #ruby
[12:25:36] joonty: has joined #ruby
[12:26:35] rmulligan: has joined #ruby
[12:27:15] siaW: has joined #ruby
[12:28:10] Shaboum: has joined #ruby
[12:28:17] lyoshajapan: has joined #ruby
[12:29:08] stannard: has joined #ruby
[12:30:14] blackmesa: has joined #ruby
[12:31:00] Gasher: has joined #ruby
[12:31:27] jeanlinux: has joined #ruby
[12:31:38] kobain: has joined #ruby
[12:32:47] kirun: has joined #ruby
[12:33:14] armyriad: has joined #ruby
[12:34:54] scepticulous: has joined #ruby
[12:34:57] chouhoulis: has joined #ruby
[12:35:12] tulak_: has joined #ruby
[12:36:45] sgambino: has joined #ruby
[12:43:29] SCHAAP137: has joined #ruby
[12:43:42] nettoweb: has joined #ruby
[12:47:26] Rodya_: has joined #ruby
[12:47:41] tungd: has joined #ruby
[12:48:46] BSaboia: has joined #ruby
[12:50:19] Sp4rKy: has joined #ruby
[12:52:48] eregi: has joined #ruby
[12:54:03] augcesar: has joined #ruby
[12:55:42] shredding: has joined #ruby
[12:57:58] quaristice: has joined #ruby
[12:58:14] sandstrom: has joined #ruby
[12:59:56] tristanp_: has joined #ruby
[13:03:21] joonty: has joined #ruby
[13:05:55] siaW: has joined #ruby
[13:06:42] swills: has joined #ruby
[13:07:45] blackmesa: has joined #ruby
[13:09:11] stannard: has joined #ruby
[13:09:16] aryaching: has joined #ruby
[13:10:16] evidex: has joined #ruby
[13:12:17] the_drow: has joined #ruby
[13:15:11] CloCkWeRX: has joined #ruby
[13:15:47] synthroid: has joined #ruby
[13:17:56] mfaeh: has joined #ruby
[13:19:03] gbgdev: has joined #ruby
[13:20:42] rmulligan: has joined #ruby
[13:22:50] brunto: has joined #ruby
[13:25:55] Gasher: has joined #ruby
[13:26:07] krz: has joined #ruby
[13:26:54] mostlybadfly: has joined #ruby
[13:28:23] optimus__: has joined #ruby
[13:28:55] shanemcd: has joined #ruby
[13:29:05] freerobby: has joined #ruby
[13:30:30] Xeago: has joined #ruby
[13:31:43] optimus__: has left #ruby: ()
[13:31:51] marr: has joined #ruby
[13:32:15] shanemcd: has joined #ruby
[13:32:16] justbleed: has joined #ruby
[13:35:41] chouhoulis: has joined #ruby
[13:39:30] tungd: has joined #ruby
[13:40:10] InternetFriend: has joined #ruby
[13:40:33] ESpiney: has joined #ruby
[13:42:59] stannard: has joined #ruby
[13:44:54] bry4n: has joined #ruby
[13:46:13] sandstrom: has joined #ruby
[13:46:56] mfaeh: has joined #ruby
[13:48:54] Rodya_: has joined #ruby
[13:49:11] cajone: has left #ruby: ()
[13:50:33] nanoz: has joined #ruby
[13:52:26] cajone: has joined #ruby
[13:53:33] eregi: has joined #ruby
[13:55:54] decoponio: has joined #ruby
[13:56:38] czerasz: has joined #ruby
[13:57:21] aryaching: has joined #ruby
[13:57:36] ramortegui: has joined #ruby
[13:58:04] tulak: has joined #ruby
[14:00:32] failshell: has joined #ruby
[14:03:49] Pisuke: has joined #ruby
[14:03:51] dede: has joined #ruby
[14:05:17] pawnbox: has joined #ruby
[14:06:19] swills: has joined #ruby
[14:06:37] freerobby: has joined #ruby
[14:07:24] chipotle: has joined #ruby
[14:07:27] idle_task: has joined #ruby
[14:09:32] djcp: has joined #ruby
[14:09:43] nerium: has joined #ruby
[14:09:52] Hammy_Work: has joined #ruby
[14:10:06] duckpuppy: has joined #ruby
[14:10:12] failshell: has joined #ruby
[14:11:01] sepp2k: has joined #ruby
[14:12:01] moos3: has joined #ruby
[14:14:52] rmulligan: has joined #ruby
[14:18:08] sgambino: has joined #ruby
[14:20:24] idefine: has joined #ruby
[14:21:00] czerasz: has joined #ruby
[14:21:13] aegis3121: has joined #ruby
[14:21:28] siaW: has joined #ruby
[14:22:31] roshanavand: has joined #ruby
[14:24:18] volty: has joined #ruby
[14:24:35] binaryplease: has joined #ruby
[14:25:02] binaryplease: has joined #ruby
[14:25:53] malconis: has joined #ruby
[14:26:52] chouhoulis: has joined #ruby
[14:29:59] sandstrom: has joined #ruby
[14:32:44] chouhoulis: has joined #ruby
[14:36:19] konsolebox: has joined #ruby
[14:38:15] quaristice: has joined #ruby
[14:38:28] moss: has joined #ruby
[14:39:23] bmalum: has joined #ruby
[14:39:46] scepticulous: has joined #ruby
[14:40:10] fmcgeough: has joined #ruby
[14:40:58] BrunoSaboia: has joined #ruby
[14:42:47] DmitryBochkarev: has joined #ruby
[14:43:24] StyXman: has joined #ruby
[14:44:50] jeanlinux: has joined #ruby
[14:47:13] baweaver: has joined #ruby
[14:47:34] bry4n: has joined #ruby
[14:48:32] StyXman: I'm trying to install a gem for which I already have most of the deps installed in the system (via my distro's packages), but even with --minimal-deps, it tries to install ffi-yajl-2.2.3 (which it is on the versoin 2.2.0-1+b3 on the system). my question is how can I figure out if the gem I'm trying to install is asking for 2.2.3 specifically or is it ignoring/not finding the one in the system. this is the wh
[14:48:38] StyXman: ole command I'm using: gem install ...
[14:48:41] StyXman: ... --install-dir $HOME/local/lib/ruby --minimal-deps knife-draw
[14:48:42] StyXman: this one: gem install --install-dir $HOME/local/lib/ruby --minimal-deps knife-draw
[14:48:44] cmckee: has joined #ruby
[14:48:45] aegis3121: has joined #ruby
[14:50:22] Rodya_: has joined #ruby
[14:51:23] aryaching: has joined #ruby
[14:52:17] agent_white: has joined #ruby
[14:52:19] adaedra: StyXman: inspect the file gemspec. What's the gem?
[14:52:35] nfk: has joined #ruby
[14:52:36] adaedra: ah, didn't see it
[14:53:26] adaedra: knife-draw depends on chef which depends on ffi-yajl ~> 2.2
[14:53:31] trosborn: has joined #ruby
[14:54:21] eregi: has joined #ruby
[14:54:32] lyoshajapan: has joined #ruby
[14:54:34] darix: well ~> 2.2 does allow 2.2.0
[14:54:44] adaedra: It's the b3 that tickles me
[14:54:58] tAn: has joined #ruby
[14:54:59] haylon: has joined #ruby
[14:55:03] darix: StyXman: you want --conservative
[14:55:12] adaedra: I wonder if it's the gem version or some sort of debian-added version number
[14:55:13] stannard: has joined #ruby
[14:55:20] darix: adaedra: notice the "-" in the name ... that is release tag of the distro
[14:58:13] nicnilov: has joined #ruby
[14:58:50] stannard: has joined #ruby
[14:59:07] StyXman: but che is installed
[14:59:18] StyXman: darix: --conservative did a similar thing too
[15:00:14] darix: StyXman: well... is the debian chef package installed via "gem"?
[15:00:26] darix: as in the .deb also has all the gem metadata files?
[15:00:34] darix: if not ... gem does not see your installed chef
[15:00:35] StyXman: it should, I guess
[15:00:37] StyXman: let me see
[15:00:46] darix: neither your installed ffi-yajl
[15:00:53] darix: so it will need to pull it again
[15:01:05] StyXman: this? /usr/share/rubygems-integration/all/specifications/chef-12.3.0.gemspec
[15:01:14] darix: main reason why on opensuse i force all ruby libraries to go via gems
[15:01:15] StyXman: (sorry, I'm rather new to ruby, as you can see)
[15:01:32] StyXman: so probably is not finsding it becasue of the path?
[15:01:49] griffindy: has joined #ruby
[15:02:06] darix: gem search --local
[15:02:31] StyXman: chef (12.3.0)
[15:02:32] StyXman: chef-zero (4.5.0)
[15:02:47] StyXman: wat about the other one...
[15:02:59] babblebre: has joined #ruby
[15:03:04] StyXman: ffi-yajl (2.2.0)
[15:03:46] idefine: has joined #ruby
[15:03:58] dopamean_: has joined #ruby
[15:04:10] whippythellama: has joined #ruby
[15:04:12] IrishGringo: has joined #ruby
[15:04:41] HalcyonicStorm: has joined #ruby
[15:05:18] Takumo: Hi all, anyone recently had issues with openssl on ruby-2.0.0-p353 (via RVM)
[15:05:40] ruby[bot]: Just ask your question, if anyone has or can, they will respond.
[15:05:51] n008f4g_: has joined #ruby
[15:06:11] Takumo: jhass: that *is* my question.
[15:06:39] jhass: okay, then my personal answer is no, as I don't use RVM
[15:06:43] jhass: why the survey?
[15:07:00] shevy: I don't use RVM either! and neither 2.0.0-p353!!!
[15:07:14] Takumo: Because I've started having issues and wanted to know if it was an actual issue or an issue with my setup
[15:07:23] shevy: what openssl do you use?
[15:07:41] Takumo: currently on 1.0.2g
[15:07:44] jhass: we probably could answer that directly if we knew the issue...
[15:07:54] shevy: wow that is recent
[15:08:20] shevy: I am on 1.0.2e right now
[15:08:24] Takumo: well my issue is that now I can't recompile 2.0.0-p353 on rvm. "Target 'build-ext' failed" when running the main build
[15:08:59] rmulligan: has joined #ruby
[15:09:01] StyXman: did it gave any reasons?
[15:09:04] Takumo: shevy: seems it, full output is "OpenSSL 1.0.2g 1 Mar 2016"
[15:09:09] mfaeh: has joined #ruby
[15:11:35] Takumo: otherwise its time to move this app to 2.2.2
[15:11:57] eurialo: has joined #ruby
[15:12:06] bry4n: has joined #ruby
[15:12:44] Takumo: StyXman: http://ix.io/pzE that's the full output
[15:12:44] shanemcd: has joined #ruby
[15:13:11] Takumo: oh wait there's a p643, lets try that! derp
[15:13:47] x77686d: has joined #ruby
[15:15:09] havenwood: Takumo: It is time to upgrade, since 2.0 is past end-of-life! 2.2 or 2.3 is a good idea since 2.1 goes into maintenance mode this month.
[15:15:22] aeontech: has joined #ruby
[15:15:31] havenwood: "We highly recommend that you upgrade to Ruby 2.3 or 2.2 as soon as possible."
[15:15:38] havenwood: https://www.ruby-lang.org/en/news/2016/02/24/support-plan-of-ruby-2-0-0-and-2-1/
[15:16:05] havenwood: *security maintenance mode
[15:16:06] Takumo: havenwood: I know, its just that I kinda need to get 2.0 working on my machine until I can test the app against 2.2 before redeploying
[15:16:19] havenwood: Takumo: aha!
[15:17:02] Takumo: don't want to suddently be like "Here's a patch obtw it now needs to run on ruby-2.3"
[15:17:11] havenwood: Watch the last patch level version of Ruby go poof: ruby-install --latest
[15:17:25] sandstrom: has joined #ruby
[15:18:44] tvon: has joined #ruby
[15:19:16] idefine: has joined #ruby
[15:19:31] jhass: I guess the sslv3 removal patch wasn't backported to 2.0 anymore?
[15:19:54] jhass: we still didn't see the real error so it's only guesswork if that's the issue of course
[15:20:18] StyXman: has left #ruby: ()
[15:20:27] volty: has left #ruby: ("Konversation terminated!")
[15:20:39] stannard: has joined #ruby
[15:21:09] jhass: but if the guess is right, you can try if https://github.com/ruby/ruby/commit/801e1fe46d83c856844ba18ae4751478c59af0d1.diff applies to 2.0 still
[15:21:40] Takumo: jhass: I don't see the real error either, that's all the output I've got... I'm sorta gietting
[15:22:18] B1n4r10: has joined #ruby
[15:22:18] statelesscode: has joined #ruby
[15:22:49] Jardayn: has joined #ruby
[15:22:53] axl_: has joined #ruby
[15:22:57] jhass: sorry if I doubt that
[15:23:11] jhass: fairly confident it'd at least point you to a log
[15:23:31] Takumo: nope, that's literally all it printed to stdout and stderr
[15:24:47] jhass: havenwood: ^ how do we make RVM more verbose?
[15:25:42] dEPy: has joined #ruby
[15:25:55] jhass: actually if that's the case, how do you even knew it's openssl that's causing issues?
[15:26:29] lyoshajapan: has joined #ruby
[15:26:42] mallu: has joined #ruby
[15:27:54] crystal77: has joined #ruby
[15:29:40] moeabdol: has joined #ruby
[15:30:14] Mon_Ouie: has joined #ruby
[15:30:28] shevy: good programmers need not debug!
[15:31:14] adaedra: ah, here's shevy and the misplaced quote.
[15:31:16] mary5030: has joined #ruby
[15:31:41] jhass: where would that be well placed?
[15:31:47] jhass: besides the trash can
[15:32:16] Rodya_: has joined #ruby
[15:32:38] mary5030: has joined #ruby
[15:34:21] idefine: has joined #ruby
[15:34:26] poguez_: has joined #ruby
[15:34:37] amargherio: has joined #ruby
[15:34:53] stannard: has joined #ruby
[15:37:27] papachan: has joined #ruby
[15:37:44] havenwood: papachan: hi
[15:38:02] papachan: i am on archlinux. and we received a new upgrade with openssl and bundle install start to complain about ssl
[15:38:17] papachan: now we want to install some ruby version and it start to fail
[15:38:27] papachan: we are using ruby-build with rbenv
[15:38:27] Takumo: papachan: I'm having the exact same issue!
[15:38:32] Takumo: but on rvm
[15:38:50] vishwa: has joined #ruby
[15:38:59] havenwood: papachan: rbenv's ruby-build actually ships with it's own openssl instead of using the package manager's
[15:39:16] terlar: has joined #ruby
[15:39:28] red_horned_rihno: has joined #ruby
[15:39:38] binaryplease: has joined #ruby
[15:39:55] Takumo: is rbenv preverred over RVM these days?
[15:40:00] atmosx: has joined #ruby
[15:40:03] havenwood: papachan: The 2.3.0 definition for example downloads openssl-1.0.2g: https://github.com/rbenv/ruby-build/blob/master/share/ruby-build/2.3.0#L1
[15:40:10] Takumo: I've been using RVM for so long I don't know if something's superceeded it
[15:40:11] gbgdev: has joined #ruby
[15:40:34] jhass: Takumo: I prefer rbenv the least. a small and often recommended setup these days is chruby & ruby-install
[15:40:38] havenwood: Takumo: I think most folk around here will point you to chruby/ruby-install but they're all in wide use.
[15:41:18] diegoviola: has joined #ruby
[15:41:44] papachan: havenwood: so we hace to use openssl-1.0.2g in that case?
[15:41:56] tuelz: I would point you to getting a home server and having a VM for each version of ruby, but I'm a terrible person
[15:42:07] eregi: has joined #ruby
[15:42:32] Takumo: tuelz: nah, custom chruby thing which spins up ec2 instances and runs there
[15:42:40] havenwood: papachan: The ruby-build tool hardcodes openssl and relies on you to install other deps. You could try using ruby-install to install for rbenv (it will build against your package manager openssl): https://github.com/postmodern/ruby-install#integration
[15:42:43] Takumo: or docker...
[15:42:57] tuelz: Takumo: but but they might have a free tier and I want them to waste money...
[15:43:09] havenwood: papachan: Or there may be a ruby-build flag to specify openssl, I dunno. AFAIK they always hardcode.
[15:43:36] papachan: havenwood: is there already a github issue to see how people resolve it?
[15:44:28] Takumo: tuelz: default to i2.8xlarge
[15:45:07] havenwood: papachan: I don't follow ruby-build issues, but they're here: https://github.com/rbenv/ruby-build/issues
[15:46:35] havenwood: papachan: Maybe gist the full error you're getting?
[15:46:43] havenwood: papachan: I'm curious.
[15:46:49] mfaeh: has joined #ruby
[15:47:47] rindolf: has joined #ruby
[15:47:54] rindolf: Hi all. Sup?
[15:48:08] Xiti: has joined #ruby
[15:48:14] papachan: havenwood: sure
[15:48:17] zast: has joined #ruby
[15:48:17] havenwood: rindolf: good mornin'
[15:48:38] rindolf: havenwood: top of the localtime()!
[15:48:45] rindolf: havenwood: sup?
[15:48:53] dhollinger: has joined #ruby
[15:49:12] Pathfinder: has joined #ruby
[15:51:07] papachan: http://sprunge.us/TYVB
[15:51:18] Xiti: has joined #ruby
[15:51:42] papachan: sorry my desktop manage spanish log
[15:51:51] shevy: Zorro-desktop!
[15:52:10] cmckee: has joined #ruby
[15:52:54] axisys: has joined #ruby
[15:53:30] idefine: has joined #ruby
[15:53:30] jhass: papachan: apply https://github.com/ruby/ruby/commit/801e1fe46d83c856844ba18ae4751478c59af0d1.diff as a patch
[15:53:35] havenwood: papachan: Ah, 2.2.3, OSSL_SSL_METHOD_ENTRY(SSLv3). Try with Ruby 2.2.4.
[15:53:47] jhass: or just upgrade to 2.2.4, yeah
[15:53:48] havenwood: papachan: Or ^
[15:55:15] sepp2k: has joined #ruby
[15:55:16] uglybandersnatch: has joined #ruby
[15:55:43] idefine_: has joined #ruby
[15:56:28] hxegon: has joined #ruby
[15:57:24] haylon: has joined #ruby
[15:58:48] stannard: has joined #ruby
[16:01:24] fostertheweb: has joined #ruby
[16:02:31] kappy: has joined #ruby
[16:02:46] |ifei5g00d: has joined #ruby
[16:03:06] rmulligan: has joined #ruby
[16:04:30] shredding: has joined #ruby
[16:05:14] Es0teric: has joined #ruby
[16:07:00] rkazak: has joined #ruby
[16:07:15] scepticulous: has joined #ruby
[16:07:17] papachan: it work with 2.2.4
[16:08:21] LastWhisper____: has joined #ruby
[16:08:32] sandstrom: has joined #ruby
[16:09:12] havenwood: papachan: nice
[16:09:26] LastWhisper____: hey guys, i wrote a script that compares some computed values to an array of values... but since my list of values I'm iterating over is near ~6 million, I was wondering if I can do anything different that speed up the process?
[16:09:38] LastWhisper____: I'm comparing it this way: elsif !(KNOWN_HASHES.include? digested) && counter <= NUM_OF_TRIES
[16:10:02] `derpy: http://ruby-doc.org/stdlib-2.3.0/libdoc/set/rdoc/Set.html
[16:10:05] jhass: LastWhisper____: ^
[16:10:10] shanemcd: has joined #ruby
[16:10:57] LastWhisper____: so I would declare KNOWN_HASHES as a set, and then to compare just do KNOWN_HASHES.subset? digested
[16:11:31] troulouliou_div2: has joined #ruby
[16:11:55] jhass: still include?, but using a set makes include? O(1) instead of O(n)
[16:12:12] LastWhisper____: thank you jhass
[16:12:15] eregi: has joined #ruby
[16:12:20] LastWhisper____: I'll report back with the speed difference :D
[16:12:29] elifoster: has joined #ruby
[16:12:49] jhass: if that's still too slow port it to Crystal :P
[16:13:11] Takumo: Well I upgrade to 2.2.4 but I'm getting the following error: ruby: symbol lookup error: /home/leo/development/projects/ke-api/vendor/ruby/2.2.0/gems/tiny_tds-0.6.2/lib/tiny_tds/tiny_tds.so: undefined symbol: rb_thread_blocking_region
[16:13:31] Takumo: is this something which is known to have changed in ruby? (rb_thread_blocking_region)
[16:13:47] chouhoulis: has joined #ruby
[16:14:11] LastWhisper____: jhass you're blowing my mind. I had no idea about Crystal
[16:14:47] jhass: Takumo: https://github.com/rails-sqlserver/tiny_tds/issues/176#issuecomment-72776282
[16:14:53] AlexRussia: has joined #ruby
[16:15:10] nerium: has joined #ruby
[16:19:07] Rodya_: has joined #ruby
[16:19:43] Jardayn_two: has joined #ruby
[16:19:50] Tricon: has joined #ruby
[16:20:20] LastWhisper____: jhass: Time it took = 1.495285
[16:20:24] LastWhisper____: original was: Time it took = 4.415288
[16:22:17] jmignault: has joined #ruby
[16:22:34] shinnya: has joined #ruby
[16:23:04] rcvalle: has joined #ruby
[16:23:27] tomchapin: has joined #ruby
[16:23:29] sucks: has joined #ruby
[16:24:10] cmckee: has joined #ruby
[16:24:30] LastWhisper____: Do you use crystal-lang ?
[16:25:06] LastWhisper____: can you import general c libraries? such as the sha256 encryption stuff?
[16:26:41] jhass: kinda, you can link against them but atm you still have to write the binding by hand
[16:26:49] jhass: which is pretty easy otoh
[16:27:03] Takumo: lol there's too many awesome languages now :(
[16:27:08] jhass: btw sha256 is a digest/hash algorithm, not encryption
[16:28:08] LastWhisper____: i'll have to read through the docs tonight
[16:28:08] KensoDev: has joined #ruby
[16:28:17] LastWhisper____: this looks like a refreshing thing to learn
[16:28:51] jhass: LastWhisper____: https://carc.in/#/r/tuv
[16:28:58] tvon: has joined #ruby
[16:29:09] LastWhisper____: -_- that's how easy it is lol
[16:29:27] jhass: well, basic OpenSSL binding is in stdlib ;)
[16:30:03] LastWhisper____: Maybe I'll bump up my "tonight" plan to lunch today to get this ported over to Crystal
[16:30:06] LastWhisper____: to see the time difference
[16:31:01] Takumo: so Crystal is a fully compiled language with a ruby-like syntax?
[16:31:02] mfaeh: has joined #ruby
[16:31:47] adaedra: I think they even have their own channel.
[16:32:38] Takumo: I imagine they do... im sorta niterested but also there's too many other languages I'm trying to do projects in like Golang and Clojure
[16:34:48] davejlong: has joined #ruby
[16:34:51] x77686d: With Ruby 2.2.4 I seem to be seeing exponential slowdown with string[n] = "x", as n grows. Is this a known problem?
[16:35:13] x77686d: I don't see it with 1.9.3
[16:35:23] Hammy_Work: has joined #ruby
[16:35:26] shevy: come to 2.3.0 and be a happier person
[16:35:34] niksrc: has joined #ruby
[16:36:01] Rodya_: has joined #ruby
[16:36:02] cdg: has joined #ruby
[16:37:31] Dragooon: has joined #ruby
[16:39:03] symm-: has joined #ruby
[16:39:55] Mon_Ouie: Exponential? Not linear in n? (since the whole string needs to be iterated over if the encoding is something like UTF-8)
[16:41:02] zack6849: has joined #ruby
[16:41:02] zack6849: has joined #ruby
[16:41:55] cpup: has joined #ruby
[16:42:40] hxegon: how do I split a hash into an array of hashes? google/docs aren't cooperating today :\
[16:43:47] hxegon: nvm, just remembered hash includes Enumerable, so has #group_by
[16:43:47] jhass: .group_by ? the question is kind of vague
[16:43:57] rippa: has joined #ruby
[16:44:11] hxegon: I got it, thanks jhass
[16:44:20] x77686d: Mon_Ouie: Ah, probably an encoding issue!
[16:47:29] idefine: has joined #ruby
[16:47:55] LastWhisper____: jhass random question: I currently have a loop that runs 100k times, where i sha256 the keyword, and then after it's digested, I check the array (now a set), to see if it matches. Would it be more efficient to create a set of the 100k digested ones, and then verify after the keyword has been looped 100k times?
[16:48:36] jhass: I'd expect that to be slower since you need to allocate the array/set for the 100k
[16:48:47] baweaver: has joined #ruby
[16:49:45] Macaveli: has joined #ruby
[16:51:27] fedexo: has joined #ruby
[16:51:53] ramfjord: has joined #ruby
[16:51:57] eurialo: has joined #ruby
[16:52:11] nanoz: has joined #ruby
[16:52:12] nettoweb: has joined #ruby
[16:54:35] tvon: has joined #ruby
[16:54:37] freerobby: has joined #ruby
[16:55:32] Don_John: has joined #ruby
[16:56:45] synthroid: has joined #ruby
[16:56:45] shanemcd: has joined #ruby
[16:57:15] rmulligan: has joined #ruby
[16:58:31] ljames: has joined #ruby
[16:58:55] LoneHerm_: has joined #ruby
[16:59:09] x77686d: Mon_Ouie: I see the same slowdown with 'ruby -E US-ASCII:US-ASCII ...'
[16:59:43] marxarelli: has joined #ruby
[17:00:59] KensoDev: has joined #ruby
[17:01:35] amclain: has joined #ruby
[17:02:57] dx: has left #ruby: ()
[17:03:50] terminalrecluse: has joined #ruby
[17:04:53] arthurix_: has joined #ruby
[17:06:29] Xeago: has joined #ruby
[17:07:28] jyaworski: has joined #ruby
[17:09:36] kies: has joined #ruby
[17:10:26] idefine: has joined #ruby
[17:11:22] x77686d: I'd be curious to hear comments on https://gist.github.com/x77686d/be8027586f24428d0cee -- I see exponential behavior with string[n] = "x" as n grows, even with US-ASCII encoding.
[17:11:54] idletask: Ox0dea: I've made quite some strides in the parsing; after all, it's not that hard
[17:12:13] idletask: It's just a matter of decluttering the language grammars
[17:12:54] B1n4r10: has joined #ruby
[17:15:04] eregi: has joined #ruby
[17:16:22] sandstrom: has joined #ruby
[17:17:15] idefine: has joined #ruby
[17:18:00] Alayde: has joined #ruby
[17:18:01] skade: has joined #ruby
[17:18:45] Peteykun: has joined #ruby
[17:19:04] Alayde: has left #ruby: ()
[17:20:38] justbleed: has joined #ruby
[17:21:04] rkazak: has joined #ruby
[17:22:15] FooMunki: has joined #ruby
[17:22:25] chouhoulis: has joined #ruby
[17:23:20] crystal77: has joined #ruby
[17:23:50] Rodya_: has joined #ruby
[17:25:14] Guest38: has joined #ruby
[17:25:38] shanemcd: has joined #ruby
[17:27:20] vF3hNGxc47h8: has joined #ruby
[17:27:28] pietr0: has joined #ruby
[17:27:33] mostlybadfly: has joined #ruby
[17:28:00] Maletor: has joined #ruby
[17:30:05] workmad3: x77686d: looking at it, I'm pretty sure you accidentally introduced an O(n^2) aspect into your test... `string[n]` is O(n), and you're repeating that n times for your input, so your test for n is doing n lookups of O(n) for a total test run of O(n^2) time
[17:31:33] apeiros: workmad3: with 1byte=1char encodings like us-ascii string[n] should be O(1)
[17:32:28] mclong: has joined #ruby
[17:32:41] apeiros: weird code style to put |i| on the next line
[17:32:42] workmad3: apeiros: ah, true...
[17:33:53] apeiros: and I was actually pretty sure they optimized for that. might be that they only do for binary, though.
[17:33:55] marr: has joined #ruby
[17:34:01] apeiros: would be bad, though
[17:34:24] cpup: has joined #ruby
[17:34:58] sneakerhax: has joined #ruby
[17:35:21] apeiros: but reading that gist I'm not quite sure why x77686d thinks it was exponential
[17:35:32] MarcWebe1: has joined #ruby
[17:35:38] apeiros: linear from 1000=0.6s would be 10_000=6s, 100_000=60s
[17:35:43] SCHAAP137: has joined #ruby
[17:36:01] workmad3: yeah... I only see linear once each string is accessed the same number of times (and going from the end of the string) :) https://gist.github.com/workmad3/fb2f6f5b3459858a5e7f
[17:36:05] apeiros: but it's faster than that. probably due to things like call-site caching
[17:36:07] MarcWebe1: Which PDF library supports spot colors and is suitable for creating print media thus has basic table support and similar?
[17:36:14] snockerton: has joined #ruby
[17:36:25] workmad3: I also only see linear once the string is over a certain size
[17:36:34] apeiros: ah, I see, I read it wrong. it's two args for outer/inner loop.
[17:36:58] apeiros: uh, what? outer/inner loop *plus* string size
[17:37:44] nobitanobi: has joined #ruby
[17:38:21] apeiros: hm, gotta take a look at that again when I took a shower and recovered a bit from training
[17:38:32] ramfjord: has joined #ruby
[17:38:51] czerasz: has joined #ruby
[17:39:34] apeiros: the difference between ruby 1.9 and 2.2 with the same arguments is certainly suspicious
[17:39:52] fostertheweb: has joined #ruby
[17:40:13] lxsameer: has joined #ruby
[17:40:17] apeiros: ACTION checks something
[17:40:52] apeiros: x77686d: -E does NOT affect string literals
[17:41:08] apeiros: those are still utf-8 in 2.2.4
[17:41:28] apeiros: so you're not testing String#[] with an US-ASCII string but with a UTF-8 string
[17:41:52] apeiros: you can verify by adding `p string.encoding` after line 57 in your gist
[17:41:55] apeiros: ACTION afk
[17:42:11] apeiros: /nick apeiros|mysterysolver
[17:42:31] workmad3: apeiros: that drops the times, but I still see linear increases in time
[17:42:42] dkk: has joined #ruby
[17:43:42] dkk: i have an array a=[1,2,2.0] and i want to get the index of 2.0. Doing a.index(2.0) returns 1. How to fix this?
[17:44:12] workmad3: apeiros: when you're back, just updated my gist with a modified benchmark showing times after re-encoding strings as ASCII :)
[17:44:27] Kryptonical: has joined #ruby
[17:45:02] sucks: has joined #ruby
[17:45:35] tenderlove: has joined #ruby
[17:48:59] fostertheweb: has joined #ruby
[17:50:19] LastWhisper____: has joined #ruby
[17:50:31] sandstrom: has joined #ruby
[17:50:34] olspookishmagus: has joined #ruby
[17:51:17] Kryptonical: has joined #ruby
[17:51:22] rmulligan: has joined #ruby
[17:51:39] mclong: has joined #ruby
[17:52:10] davejlong: has joined #ruby
[17:52:17] gregf_: dkk: prolly do a value.to_s =~ /2.0/?
[17:52:42] davejlong: has joined #ruby
[17:53:08] gregf_: >> a=[1,2,2.0];search = "2.0"; p a.each_with_index.select { |v,i| v.to_s =~ /#{search}/ }.map(&:first) # like that?
[17:53:09] ruby[bot]: gregf_: # => [2.0] ...check link for more (https://eval.in/532133)
[17:53:10] fostertheweb: has joined #ruby
[17:53:39] davejlong: has joined #ruby
[17:54:04] dkk: gregf_: will a.index{|x| x.eql? 2.0} work?
[17:54:21] jhass: dkk: I expect so, looks better
[17:54:32] gregf_: dkk: well jhass says that a terrible idea *mine*
[17:54:53] davejlong: has joined #ruby
[17:54:57] gregf_: a=[1,2,2.0]; a.index{|x| x.eql? 2.0}
[17:55:00] gregf_: >> a=[1,2,2.0]; a.index{|x| x.eql? 2.0}
[17:55:01] ruby[bot]: gregf_: # => 2 (https://eval.in/532137)
[17:55:02] tvon: has joined #ruby
[17:55:28] gregf_: dkk: doesn't ... apparently :|
[17:55:32] davejlong: has joined #ruby
[17:55:56] jackjackdripper: has joined #ruby
[17:56:27] VeryBewitching: has joined #ruby
[17:56:40] davejlong: has joined #ruby
[17:56:58] gregf_: oh my bad.... it does *ignore me*
[17:57:01] dkk: gregf_ isn’t it working?
[17:57:12] gregf_: ;) *bulls eye*
[17:57:26] Kryptonical: has joined #ruby
[17:57:33] jhass: dkk: equal? then
[17:57:45] davejlong: has joined #ruby
[17:57:56] jhass: >> [1, 2, 2.0].index {|n| n.equal? 2.0 }
[17:57:57] ruby[bot]: jhass: # => nil (https://eval.in/532141)
[17:58:40] davejlong: has joined #ruby
[17:58:45] jhass: eh nvm, eql? did work
[17:58:47] jhass: kinda dizzy here
[17:59:15] davejlong: has joined #ruby
[18:00:14] davejlong: has joined #ruby
[18:00:34] cwarner: has joined #ruby
[18:00:42] LoneHerm_: has joined #ruby
[18:01:08] davejlong: has joined #ruby
[18:01:14] binaryplease: has joined #ruby
[18:01:39] ravster: has joined #ruby
[18:02:06] cwarner: I'm trying to understand how recursive functions in ruby work with varirables and the stack.. if you call a recursive function how does ruby handle external vars from that function.. I'm looking at an example where it keeps the scope of that var on the stack
[18:02:09] davejlong: has joined #ruby
[18:02:28] ravster: I would like my binstubs to not specify the ruby version (2.3 in my case). I can't find a flag on the binstubs command to do something like this. Right now the binstubs start with the magic comment '#!/usr/bin/env ruby2.3'. I would like it to be just 'ruby'. Is there a way to do this without manually changing the binstubs?
[18:02:53] cwarner: ehhh let me just look
[18:03:11] davejlong: has joined #ruby
[18:03:17] djbkd: has joined #ruby
[18:03:39] jhass: "the binstub command"?
[18:04:18] davejlong: has joined #ruby
[18:04:27] jhass: cwarner: I don't quite follow, it probably doesn't do anything like that
[18:04:32] x77686d: apeiros: I was away for a bit. Thanks for those thoughts.
[18:05:11] davejlong: has joined #ruby
[18:05:16] ravster: jhass: 'bundle binstubs gem-name' - http://bundler.io/v1.11/bundle_binstubs.html
[18:05:34] aegis3121: has joined #ruby
[18:05:59] djbkd: has joined #ruby
[18:06:00] davejlong: has joined #ruby
[18:06:53] dkk: jhass: What does it mean when a function returns two values?
[18:07:08] davejlong: has joined #ruby
[18:08:06] davejlong: has joined #ruby
[18:08:27] gregf_: cwarner: do you mean something alond these lines: https://gist.github.com/anonymous/32b4c2b016ec7921bb82
[18:08:38] gregf_: s/alond/along/
[18:08:47] chevdor: has joined #ruby
[18:08:47] davejlong: has joined #ruby
[18:09:21] jhass: dkk: it returns an array
[18:09:34] cwarner: gregf_: hrmm yes
[18:09:34] moeabdol1: has joined #ruby
[18:10:03] gregf_: cwarner: well, i managed to trick you :).. the function gets called once i guess :|
[18:10:07] davejlong: has joined #ruby
[18:10:15] cwarner: so basically I have to explicitly terminate
[18:10:43] dkk: jhass: will this also return an array? a.index{|x| x.equal? 2}
[18:10:45] davejlong: has joined #ruby
[18:10:56] ochkoffein: has joined #ruby
[18:10:58] chevdor: hello, I dont have much experience with ruby. I am trying to run a ‘bundle install’ which fails telling me that recog needs ruby 2.1. I have ruby 2.3… gem install recog works all fine. I found an older ruby 2.0.x on my system in /usr/bin. I removed it and symlinked to ruby 2.3. What can I check to move on ?
[18:11:46] cwarner: ok so make static, explicitly terminate
[18:11:50] kies: has joined #ruby
[18:11:53] davejlong: has joined #ruby
[18:12:18] shinnya: has joined #ruby
[18:12:29] shevy: chevdor that's quite annoying if bundler tells you that you must use an older ruby version
[18:12:46] shanemcd: has joined #ruby
[18:12:47] davejlong: has joined #ruby
[18:13:08] n008f4g_: has joined #ruby
[18:13:09] steffkes: has joined #ruby
[18:13:12] chevdor: shevy: what I confusing is that it tells me that I need 2.1 or above and I have 2.3 which, if my math is correct, should be ok :)
[18:13:58] davejlong: has joined #ruby
[18:14:17] shevy: well, it's bundler
[18:14:21] shevy: 2 + 2 is sometimes 5
[18:14:32] davejlong: has joined #ruby
[18:14:51] chevdor: shevy: any idea how I can fix that? Is there a cache to cleanup ? I did run a gem cleanup already
[18:15:00] scepticulous: has joined #ruby
[18:15:12] gregf_: cwarner: https://gist.github.com/anonymous/a63b531bb9c3d6c4e81f <== something like that i guess :| *gtg*
[18:15:24] shevy: chevdor no idea sorry
[18:15:33] zack6849: has joined #ruby
[18:15:33] zack6849: has joined #ruby
[18:15:37] davejlong: has joined #ruby
[18:15:39] ruby[bot]: dkk: Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
[18:15:39] chevdor: shevy: ok, no problem. Thanks for your input.
[18:16:23] davejlong: has joined #ruby
[18:16:45] idletask: Ox0dea: ping
[18:17:00] cwarner: gregf_: mmmmmm I guess my use case is more simple but I get it..
[18:17:10] jhass: ravster: https://github.com/bundler/bundler/blob/master/lib/bundler/templates/Executable#L1
[18:17:21] gregf_: cwarner: if i may ask, what is your usecase like?
[18:17:25] jhass: so bundle config shebang should you allow to override it
[18:17:26] ixti: has joined #ruby
[18:17:36] apeiros: workmad3: I <3 .b
[18:17:38] davejlong: has joined #ruby
[18:17:41] apeiros: easy and quick
[18:17:56] apeiros: f.ex. " ".b * 100
[18:18:07] LastWhisper____: has joined #ruby
[18:18:37] ohaibbq: has joined #ruby
[18:18:39] idefine: has joined #ruby
[18:19:04] fostertheweb: has joined #ruby
[18:19:30] davejlong: has joined #ruby
[18:19:43] cwarner: gregf_: in the specific case it's a simple recursive function that checks a the type of param passed and does some work.. but as a call it back it keeps the value types from the previous scope so even though we check type it doesn't stop.. pretty simple stuff I don't have to really care about pushing on the stack really
[18:19:44] rikkipitt: has joined #ruby
[18:20:10] davejlong: has joined #ruby
[18:20:50] blackgoat: has joined #ruby
[18:20:56] hahuang65: has joined #ruby
[18:21:11] davejlong: has joined #ruby
[18:21:25] lwu__: has joined #ruby
[18:21:42] blackmesa: has joined #ruby
[18:21:53] ramfjord: has joined #ruby
[18:22:09] davejlong: has joined #ruby
[18:22:19] x77686d: Re string encodings, is there a simple way to say "I want all strings to be US-ASCII?"
[18:22:19] gregf_: hrm.. looks slightly complicated :|...but possible ;)... not sure about recursion tho.. could be solved without it... possibly
[18:22:20] joonty: has joined #ruby
[18:22:47] cwarner: gregf_: naaa shouldn't be what i will do is just make the pass param static and try that.. infact let me see here
[18:23:06] workmad3: apeiros: nice :) still seeing some linear increases though
[18:23:08] davejlong: has joined #ruby
[18:23:34] BrunoSaboia: has joined #ruby
[18:23:45] workmad3: x77686d: if you want string literals to be ascii, you can add `# encoding: US-ASCII` at the top of your source file(s)
[18:23:57] apeiros: workmad3: hm. hmmm. that's bad.
[18:24:10] apeiros: I haven't actually read your gist until yet.
[18:24:35] apeiros: you always do 1000 lookups and only the stringsize varies, right? so the expected time should be always the same?
[18:24:50] apeiros: I meant 10_000 lookups
[18:25:02] davejlong: has joined #ruby
[18:25:02] idletask: x77686d: do you realize that there is no such thing as "ASCII strings" to begin with?
[18:25:14] workmad3: apeiros: yeah
[18:25:25] cpup: has joined #ruby
[18:25:27] workmad3: apeiros: oh wow... adding an encoding comment suddenly drops the time :/
[18:25:32] vdamewood: has joined #ruby
[18:25:40] konsolebox: has joined #ruby
[18:25:44] x77686d: tell me more re "no such thing as 'ASCII strings'" :)
[18:25:48] idletask: apeiros: by the way, any comments on my post you read?
[18:25:56] cwarner: yeah a static var and a return.. straight
[18:26:02] apeiros: idletask: nothing beyond what I already said
[18:26:02] arlek: has joined #ruby
[18:26:08] davejlong: has joined #ruby
[18:26:10] apeiros: idletask: us-ascii encoded strings in ruby are binary
[18:26:16] tvon: has joined #ruby
[18:26:18] idletask: x77686d: text, and their byte representation, are two separate things
[18:26:26] gizmore: has joined #ruby
[18:26:35] davejlong: has joined #ruby
[18:26:41] apeiros: and while I'm not fond of the name it's somewhat instructive in that the lower 7 bits are to be interpreted/presented as ascii
[18:27:26] idletask: apeiros: it depends on the encoding of your _source file_ to begin with, in most languages; and, if I'm not mistaken, including Ruby
[18:27:51] shanemcd: has joined #ruby
[18:28:09] apeiros: idletask: ruby assumes a source file to be utf-8 unless you tell it otherwise. and it will accordingly set the encoding attribute.
[18:28:39] apeiros: but of course you can mislabel the encoding just like from any other source
[18:28:50] idletask: OK, I haven't tested, but what happens if you _do_ declare at the beginning of your .rb file, that "# encoding: US-ASCII", that your editor saves in UTF-8 and that your string literal is "Mémé dans les orties" (note the 'é')?
[18:28:51] apeiros: and using escapes, you can write strings in other encodings
[18:29:05] idletask: 'é' is not even _representable_ in ASCII
[18:29:57] apeiros: idletask: oh wait, I confused us-ascii and ascii-8bit
[18:30:04] apeiros: with us-ascii you probably get a conversion error
[18:30:19] apeiros: you can try, though :)
[18:30:21] idletask: Even though this is a Ruby room, I can tell what happens in Java... And what happens is that in Java, strings are stored in class files independently of the encoding of your source files
[18:30:46] stunder001: has joined #ruby
[18:31:00] apeiros: in ruby, strings are always stored as a bytearray
[18:31:09] idletask: It is therefore the role of the compiler to figure out all this, and this is the file.encoding property
[18:31:20] idletask: apeiros: in Java, ultimately, this is also the case
[18:31:40] idletask: In fact, in class files, string constants are stored in what is called "modified UTF"
[18:31:48] idletask: (rather ugly; it happens that it works)
[18:31:53] apeiros: idletask: actually, I revert my previous statement
[18:32:03] aeontech: has joined #ruby
[18:32:05] apeiros: you won't get an encoding error
[18:32:19] apeiros: ruby doesn't care whether the byte array is valid with regards to the encoding
[18:32:36] apeiros: you'll only get an error once you try to perform anything on it which requires character representation of the data
[18:32:49] apeiros: >> "\xff".b.force_encoding('us-ascii') # works just fine
[18:32:50] ruby[bot]: apeiros: # => "\xFF" (https://eval.in/532170)
[18:33:01] apeiros: >> "\xff".b.force_encoding('us-ascii').valid_encoding? # but ruby knows it's not valid
[18:33:02] ruby[bot]: apeiros: # => false (https://eval.in/532172)
[18:33:11] shanemcd: has joined #ruby
[18:33:21] apeiros: this is useful as it means you can still salvage the data
[18:33:30] idletask: Yeah, I see that
[18:33:51] apeiros: >> x = "\xff".b.force_encoding('us-ascii'); x = x.force_encoding('binary') unless x.valid_encoding?; x
[18:33:52] ruby[bot]: apeiros: # => "\xFF" (https://eval.in/532173)
[18:34:17] apeiros: sorry, I'm still a bit exhausted from training and catching on slowly :)
[18:34:24] idletask: >>0x1f4ae.to_s.force_encoding("us-ascii")
[18:34:25] ruby[bot]: idletask: # => "128174" (https://eval.in/532175)
[18:34:32] idefine: has joined #ruby
[18:34:44] idletask: OK, I'm doing something wrong
[18:34:51] apeiros: force_encoding does not perform any operation on the bytearray. it only changes the encoding attribute.
[18:35:03] idletask: >>0x1f4ae.to_s
[18:35:04] ruby[bot]: idletask: # => "128174" (https://eval.in/532176)
[18:35:30] idletask: OK, given an int which is a code point, how do I get its "string" representation?
[18:35:46] apeiros: >> 255.chr('us-ascii')
[18:35:47] ruby[bot]: apeiros: # => invalid codepoint 0xFF in US-ASCII (RangeError) ...check link for more (https://eval.in/532177)
[18:35:53] apeiros: >> 67.chr('us-ascii')
[18:35:54] ruby[bot]: apeiros: # => "C" (https://eval.in/532178)
[18:36:01] apeiros: I guess that's what you expected?
[18:36:15] IrishGringo: has joined #ruby
[18:36:31] apeiros: >> 127881.chr('utf-8')
[18:36:32] ruby[bot]: apeiros: # => "🎉" (https://eval.in/532179)
[18:36:35] idletask: >>0x1f4a9.chr("us-ascii")
[18:36:36] ruby[bot]: idletask: # => 128169 out of char range (RangeError) ...check link for more (https://eval.in/532180)
[18:36:49] idletask: >>0x1f4a9.chr("utf8")
[18:36:49] idefine: has joined #ruby
[18:36:50] ruby[bot]: idletask: # => unknown encoding name - utf8 (ArgumentError) ...check link for more (https://eval.in/532181)
[18:36:56] idletask: >>0x1f4a9.chr("utf-8")
[18:36:57] ruby[bot]: idletask: # => "💩" (https://eval.in/532182)
[18:37:07] idletask: My favorite code point
[18:37:41] idletask: OK, so .chr does mean in fact any Unicode glyph
[18:37:50] apeiros: it means codepoint
[18:38:03] idletask: Strange name though
[18:38:08] neohunter: has joined #ruby
[18:38:11] apeiros: for most encodings thats 1:1 the binary value
[18:38:19] idletask: I'd have called it, I don't know, as_codepoint?
[18:38:30] apeiros: well, I think the method is older than unicode :)
[18:38:33] idletask: Yes, but not all
[18:38:36] Es0teric: has joined #ruby
[18:38:39] idletask: Older than _Unicode_?
[18:38:46] apeiros: it is definitively older than encodings in ruby
[18:38:46] idletask: When was Ruby born?
[18:38:56] idletask: Waaay after Java, right?
[18:39:14] apeiros: about a year or two after java
[18:39:27] apeiros: somewhen between 1993 and 1995 iirc
[18:39:34] idletask: Well, by the time Java was born, Unicode was already born
[18:39:37] apeiros: ok, unicode is older
[18:39:58] Vile`: has joined #ruby
[18:39:59] bluOxigen: has joined #ruby
[18:40:00] apeiros: but it's older than utf-8 :)
[18:40:04] idletask: OK, a little history lesson here, maybe that explains things for ruby as well :)
[18:40:06] tristanp: has joined #ruby
[18:40:37] ravster: jhass: thanks, that link helps.
[18:40:43] apeiros: re history lessen: up until ruby 1.9, ruby didn't know about encodings
[18:40:58] apeiros: *lesson even
[18:41:03] idletask: Java was born when Unicode already existed (and UTF-8 too, by the way); and at this time, Unicode only defined code points below what is now known as the BMP, ie code points less than, or equal to, U+FFFF
[18:41:37] idletask: As a result, Java's char is an unsigned, 16bit integer (and the only unsigned primitive in Java)
[18:41:49] apeiros: idletask: um, wikipedia shows rfc2044 as oldest rfc and that's from 1996
[18:41:51] idletask: But since then Unicode has defined code points outside U+FFFF
[18:42:09] idletask: apeiros: that is about the time when Java was born
[18:42:20] idletask: In fact it was born a litte earlier than that
[18:42:20] ASTP001: has joined #ruby
[18:42:33] apeiros: WP says 1995
[18:42:39] apeiros: ruby is 1995 too btw.
[18:42:39] idletask: But anyway, as time went, Unicode defined code points greater than U+FFFF
[18:42:45] ASTP001: has left #ruby: ()
[18:42:49] fostertheweb: has joined #ruby
[18:42:59] idletask: As a result, char couldn't fit anymore; the result? Code points outside the BMP take two chars
[18:43:07] idletask: And a char is now a UTF-16 code unit
[18:43:42] idletask: I guess that Ruby's chr name bears a somewhat resemblant history
[18:44:04] apeiros: well, I guess .chr is simply a bad abbreviation for char
[18:44:14] apeiros: (which in turn is of course an abbreviation of character)
[18:44:30] idletask: Yep... Just as char in Java is now misnamed
[18:44:33] Limix: has joined #ruby
[18:44:59] mclong: has joined #ruby
[18:45:31] rmulligan: has joined #ruby
[18:45:34] apeiros: how'd it be misnamed? just because java needs 2 chars for a single codepoint?
[18:45:42] ruby-lang291: has joined #ruby
[18:45:46] idletask: At first it was supposed to be a primitive to hold a code point
[18:45:51] idletask: Now it cannot do so anymore
[18:46:02] apeiros: that single codepoint is still a single character
[18:46:11] apeiros: java's capabilities are irrelevant to that
[18:46:11] idletask: Not for code points outside the BMP
[18:46:40] apeiros: you're arguing that 💩 is not a single character?
[18:47:20] chouhoul_: has joined #ruby
[18:49:33] Es0teric: has joined #ruby
[18:49:52] idletask: I am arguing that while it is a single Unicode code point, it is not an atomic entity with regards to Java
[18:50:07] apeiros: as said, java's capabilities are irrelevant outside of java
[18:50:08] cantaberry: has joined #ruby
[18:50:28] gbgdev: has joined #ruby
[18:50:44] apeiros: and for a method called "character", what matters is whether its result is a character.
[18:51:11] apeiros: the better venue to call it a misnomer would IMO be - what was their name again - surrogates, I think?
[18:51:26] shanemcd: has joined #ruby
[18:51:28] apeiros: where you use multiple codepoints to form a single character, iirc only in D normalization
[18:52:46] chouhoulis: has joined #ruby
[18:52:50] jottr: has joined #ruby
[18:54:20] idletask: Erm, no, for a single glyph there is only ever a single code point :p
[18:54:59] apeiros: idletask: wrong
[18:55:25] apeiros: >> "ä".unpack("U*")
[18:55:26] ruby[bot]: apeiros: # => [97, 776] (https://eval.in/532186)
[18:55:35] apeiros: two codepoints. one character.
[18:55:45] apeiros: note that "ä" != "ä"
[18:55:57] diego3: has joined #ruby
[18:56:17] apeiros: see https://en.wikipedia.org/wiki/Unicode_equivalence
[18:56:35] Cohedrin: has joined #ruby
[18:57:03] diego3: has joined #ruby
[18:57:48] SenpaiSilver: has joined #ruby
[18:59:32] Vile`: has joined #ruby
[19:01:18] codecop: has joined #ruby
[19:01:19] codecop_: has joined #ruby
[19:01:44] shanemcd: has joined #ruby
[19:02:08] ArtursL: has joined #ruby
[19:03:09] djbkd: has joined #ruby
[19:04:47] djbkd: has joined #ruby
[19:05:41] SenpaiSilver: has joined #ruby
[19:05:44] kknight: has joined #ruby
[19:06:09] tvon: has joined #ruby
[19:07:04] jmignault: has joined #ruby
[19:10:13] fostertheweb: has joined #ruby
[19:10:37] Musashi007: has joined #ruby
[19:11:50] aegis3121: has joined #ruby
[19:11:55] shanemcd: has joined #ruby
[19:12:28] dostoyevsky: Not sure if that works yet :)
[19:12:42] idefine: has joined #ruby
[19:12:56] dostoyevsky: I do not get why we need symbols like this in unicode, though
[19:15:33] rdark: has joined #ruby
[19:15:36] eregi_: has joined #ruby
[19:16:16] baweaver: has joined #ruby
[19:17:10] Sigma00: because someone thought it'd be neat to have a standard for emojis
[19:17:20] Sigma00: and other people agreed
[19:17:39] djbkd: has joined #ruby
[19:18:37] zeroDivisible: has joined #ruby
[19:20:12] sp4rrow: has joined #ruby
[19:20:52] _djbkd: has joined #ruby
[19:21:23] _djbkd: has joined #ruby
[19:21:53] shanemcd: has joined #ruby
[19:22:35] Abrin_AWAY: has joined #ruby
[19:23:09] adaedra: dostoyevsky: I totally see that.
[19:23:23] dopie: has joined #ruby
[19:24:19] adaedra: !👟 could be a good alias for !kick.
[19:24:50] xpt: I have Rakefile that is spawning test cases for me. I have this Rakefile http://sprunge.us/RbGj, when i run rake test sometimes I get this output: http://sprunge.us/KFaJ (very same output as running rake test with tests directory empty). How can I debug what is the problem?
[19:25:02] xpt: When i run `rake test` again it's back to normal
[19:25:47] Mattx: has joined #ruby
[19:25:56] zack6849: has joined #ruby
[19:25:56] zack6849: has joined #ruby
[19:26:59] Mattx: has left #ruby: ()
[19:28:05] Es0teric: has joined #ruby
[19:28:30] intrigueD: has joined #ruby
[19:28:46] i: has joined #ruby
[19:28:52] baweaver: has joined #ruby
[19:29:20] fostertheweb: has joined #ruby
[19:29:53] cpup: has joined #ruby
[19:29:56] dopie: has joined #ruby
[19:30:16] chouhoulis: has joined #ruby
[19:31:47] ivanskie: has joined #ruby
[19:32:14] shanemcd: has joined #ruby
[19:32:39] lvn: has joined #ruby
[19:33:04] Rasi: has joined #ruby
[19:33:53] lyoshajapan: has joined #ruby
[19:34:04] idefine: has joined #ruby
[19:34:07] n1colas: has joined #ruby
[19:34:20] solocshaw1: has joined #ruby
[19:34:59] tjohnson: has joined #ruby
[19:38:06] aeontech: has joined #ruby
[19:39:38] rmulligan: has joined #ruby
[19:41:49] eregi: has joined #ruby
[19:48:36] shanemcd: has joined #ruby
[19:49:29] Somelauw: has joined #ruby
[19:50:17] idefine: has joined #ruby
[19:50:45] spider-mario: has joined #ruby
[19:51:18] inoic: has joined #ruby
[19:51:36] Somelauw: I have a script that does require 'optionparser', doing em search optionparser says OptionParser (0.5.1), running gem install --local OptionParser says ERROR: Could not find a valid gem 'OptionParser' (>= 0) in any repository
[19:51:49] friendofkiwi: has joined #ruby
[19:52:11] Somelauw: what's wrong?
[19:52:13] aeontech: has joined #ruby
[19:52:48] lyoshajapan: has joined #ruby
[19:53:07] friendofkiwi: has left #ruby: ()
[19:54:01] xpt: Somelauw: try gem install --remote OptionParser
[19:54:31] xpt: or simply gem install OptionParser
[19:54:39] Somelauw: what does that do
[19:55:11] Somelauw: i'm not going to install in system directories
[19:55:15] e4xit: has left #ruby: ()
[19:55:35] Yiota: has joined #ruby
[19:55:43] idefine: has joined #ruby
[19:55:52] Somelauw: --remote tries /var/lib/gems
[19:56:04] Somelauw: why is it that this package won't install with --local?
[19:57:06] uglybandersnatch: has joined #ruby
[19:57:09] djbkd: has joined #ruby
[19:57:13] StyXman: has joined #ruby
[19:57:15] xpt: Somelauw: --local means that gem is trying to locate gem on your LOCAL repository. --remote says that it looks for in "on the internet".
[19:57:37] StyXman: I'm using Riper to read chef files. why this doesn't work?
[19:57:39] StyXman: irb(main):002:0> Ripper.parse (IO.read ('roles/spike-01.rb'))
[19:57:46] xpt: Somelauw: You want to use '-i' parameter
[19:58:00] xpt: Somelauw: try reading output of 'gem help install'
[19:58:35] idefine: has joined #ruby
[19:58:42] firstdayonthejob: has joined #ruby
[19:59:27] asd: has joined #ruby
[19:59:52] gatman: has joined #ruby
[20:01:58] Somelauw: xpt: the correct one is --user-install
[20:02:06] Somelauw: I was confused with --local
[20:02:17] Somelauw: because .local is a sane location for such sort of thing
[20:02:20] cwarner: has left #ruby: ()
[20:03:27] Somelauw: still I'm getting the following error: /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -
[20:03:29] Somelauw: - optionparser (LoadError)
[20:03:31] Somelauw: from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
[20:04:52] mary5030: has joined #ruby
[20:04:54] Sammitch: has joined #ruby
[20:05:04] rikkipitt: has joined #ruby
[20:05:10] Rasi: has joined #ruby
[20:06:54] Sammitch: so when using the Mysql2 gem, prepared statements, and passing a string containing hex-encoded binary data destined for a VARCHAR column it appears that somewhere between the `execute()` and the actual query the data is being converted from a hex string to an integer.
[20:10:06] freerobby: has joined #ruby
[20:11:17] pawnbox: has joined #ruby
[20:12:15] eregi: has joined #ruby
[20:12:24] jeanlinux: has joined #ruby
[20:13:23] robbyoconnor: has joined #ruby
[20:13:44] swills: has joined #ruby
[20:13:56] sp4rrow: has joined #ruby
[20:14:08] copperb0lt: has joined #ruby
[20:16:36] gbgdev: has joined #ruby
[20:16:59] fostertheweb: has joined #ruby
[20:17:14] eregi: has joined #ruby
[20:17:49] sandstrom: has joined #ruby
[20:17:56] robbyoconnor: has joined #ruby
[20:19:50] Xeago: has joined #ruby
[20:20:41] aegis3121: has joined #ruby
[20:22:55] aeon_: has joined #ruby
[20:23:12] lyoshajapan: has joined #ruby
[20:23:17] joonty: has joined #ruby
[20:23:50] mdw: has joined #ruby
[20:25:49] gizmore: has joined #ruby
[20:27:17] KensoDev: has joined #ruby
[20:27:37] KensoDev: has joined #ruby
[20:28:07] paul98: has joined #ruby
[20:28:50] inoic: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[20:29:38] nicoulaj: has joined #ruby
[20:30:57] Maletor: has joined #ruby
[20:32:04] lyoshajapan: has joined #ruby
[20:32:11] Cesarecf: has joined #ruby
[20:32:14] aldodelgado: has joined #ruby
[20:32:54] nando293921: has joined #ruby
[20:33:43] rmulligan: has joined #ruby
[20:34:15] bronson: has joined #ruby
[20:34:51] stunder001: has joined #ruby
[20:35:15] eurialo: has joined #ruby
[20:35:31] Es0teric: has joined #ruby
[20:36:06] Es0teric: has joined #ruby
[20:36:27] djbkd: has joined #ruby
[20:36:56] Es0teric: has joined #ruby
[20:37:41] Es0teric: has joined #ruby
[20:37:44] Rodya_: has joined #ruby
[20:38:07] blackmesa: has joined #ruby
[20:38:26] Es0teric: has joined #ruby
[20:39:11] Es0teric: has joined #ruby
[20:40:23] nobitanobi: has joined #ruby
[20:40:25] last_staff: has joined #ruby
[20:40:44] yqt: has joined #ruby
[20:40:51] sp4rrow: has joined #ruby
[20:41:10] pawnbox: has joined #ruby
[20:41:15] xpt: Somelauw: on my environment i have no GEM_HOME so my home directory is default.
[20:41:58] aeontech: has joined #ruby
[20:42:16] xpt: seems like you messed something with require statement
[20:43:13] Ox0dea: Somelauw: OptionParser is part of the standard library.
[20:43:19] Ox0dea: >> require 'optparse'; OptionParser
[20:43:21] ruby[bot]: Ox0dea: # => OptionParser (https://eval.in/532207)
[20:44:21] baweaver: has joined #ruby
[20:44:46] binaryplease1: has joined #ruby
[20:45:59] skade: has joined #ruby
[20:46:32] stunder001: has joined #ruby
[20:46:56] one63: has joined #ruby
[20:48:59] x77686d: has joined #ruby
[20:50:08] shanemcd: has joined #ruby
[20:51:08] baweaver: has joined #ruby
[20:54:01] one63: has left #ruby: ()
[20:55:21] copperb0lt: has left #ruby: ("WeeChat 1.4")
[20:56:29] uglybandersnatch: has joined #ruby
[20:56:30] arlek: has joined #ruby
[20:56:39] the_drow: has joined #ruby
[20:57:11] DmitryBochkarev: has joined #ruby
[20:57:49] B1n4r10: has joined #ruby
[20:58:16] Jardayn_two: has joined #ruby
[20:59:45] idefine: has joined #ruby
[20:59:50] tulak: has joined #ruby
[20:59:51] Sammitch: cool beans. I used the wrong variable name in my execute statment so instead of doing literally *anything* sane relating to an undefined or nil variable it appears to have used god-knows-what from god-knows-where
[21:00:40] griffindy: has joined #ruby
[21:01:12] ixti: has joined #ruby
[21:01:26] ahammond: has joined #ruby
[21:01:47] gypsydave5: has joined #ruby
[21:01:52] rindolf: has joined #ruby
[21:01:57] ahammond: In python, I can say foo.get(key, default). What is the ruby equivilant?
[21:02:11] Radar: proof plz
[21:02:46] Radar: ahammond: foo.fetch(key, default)
[21:02:56] ahammond: Thanks @Radar
[21:02:57] adaedra: ahammond: better explain what it does, not everyone here knows python.
[21:02:57] bakedb: has joined #ruby
[21:03:35] Radar: adaedra: I think I have a pretty good idea. ahammond: it gets the key if it exists, otherwise returns a default value?
[21:03:49] ahammond: yup, exactly that.
[21:03:52] BSaboia: has joined #ruby
[21:04:04] adaedra: Radar: I suspected it too, but it's better with a full explanation.
[21:04:12] Radar: adaedra: agree
[21:04:56] xpt: so it's like ${foo:=default} in shell?
[21:05:10] BSaboia: has joined #ruby
[21:05:33] HdInThKld: has joined #ruby
[21:08:47] lyoshajapan: has joined #ruby
[21:08:52] Rodya_: has joined #ruby
[21:09:19] cippaciong: has joined #ruby
[21:09:23] Somelauw: Is there anyone here why does understand how gems work?
[21:09:31] ruby[bot]: Just ask your question, if anyone has or can, they will respond.
[21:09:50] ivanskie: has joined #ruby
[21:09:54] Sammitch: Radar: I'll see if I can whip up a self-contained example.
[21:10:15] fostertheweb: has joined #ruby
[21:11:10] djbkd: has joined #ruby
[21:11:25] ziyadb: has joined #ruby
[21:12:07] mondok: has joined #ruby
[21:12:30] the_drow: has joined #ruby
[21:14:17] skade: has joined #ruby
[21:14:23] Es0teric: has joined #ruby
[21:15:29] mary5030: has joined #ruby
[21:15:30] Somelauw: has left #ruby: ("WeeChat 1.4")
[21:16:12] Musashi007: has joined #ruby
[21:16:43] baweaver: has joined #ruby
[21:17:16] Moosashi: has joined #ruby
[21:17:56] cippaciong: Hello, I'm fiddling a bit the bson gem and I started creating a simple, one line, document. When I try to "puts" the document though, which should be in hex format, some of its hex codes are replaced by the corresponding ascii chars
[21:17:56] FooMunki: has joined #ruby
[21:18:02] cippaciong: Is there a way to prevent this?
[21:18:58] djbkd: has joined #ruby
[21:19:35] djbkd: has joined #ruby
[21:20:04] Don_John: has joined #ruby
[21:20:25] yuung: has joined #ruby
[21:21:01] pawnbox: has joined #ruby
[21:21:06] StyXman: has left #ruby: ()
[21:24:04] Sammitch: Radar: https://gist.github.com/wrossmann/3f69532cdade2aa6c979
[21:24:14] intrigueD: has joined #ruby
[21:25:27] idefine: has joined #ruby
[21:27:43] HdInThKld: has left #ruby: ()
[21:27:50] rmulligan: has joined #ruby
[21:28:02] skade: has joined #ruby
[21:28:09] LastWhisper____: has joined #ruby
[21:28:15] weaksauce: Sammitch puts hash.class
[21:28:54] BrunoSaboia: has joined #ruby
[21:28:55] Sammitch: weaksauce: the terrible hashing method is not something I have control over, nor the problem at hand.
[21:29:33] Sammitch: oh wait, I see what you're getting at
[21:30:09] Sammitch: weaksauce: Fixnum
[21:31:16] Sammitch: so `hash` is... what? a random global constant?
[21:31:55] weaksauce: it's the hash of the Object instance
[21:32:05] sandstrom: has joined #ruby
[21:32:22] weaksauce: self.class == Object ; self.hash == hash
[21:32:25] snockerton1: has joined #ruby
[21:32:30] Sammitch: why is that even a thing?!
[21:32:50] adaedra: why is what even a thing
[21:32:56] snockerton1: has joined #ruby
[21:32:57] weaksauce: it's just a method on Object instances
[21:33:14] veduardo: has joined #ruby
[21:34:15] weaksauce: Sammitch you just got unlucky and passed in a misspelled function name
[21:34:15] snockerton: has joined #ruby
[21:34:36] aeontech: has joined #ruby
[21:34:39] weaksauce: not sure there is a way to prevent that other than automated testing
[21:34:41] adaedra: Sammitch: you have to remember that you are ALWAYS in the context of some object.
[21:35:03] Sammitch: I am trying to contain my disdain for this language's syntax, and it is currently causing me actual PHYSICAL DISTRESS
[21:35:35] tubbo: Sammitch: grow up
[21:35:36] weaksauce: Sammitch it's pretty elegant once you get past the learning curve
[21:35:55] tubbo: i get physically distressed at all programming so i have no room to talk
[21:36:13] Sammitch: the fact that you can call methods without braces and the scopes have virtually no distinction
[21:36:41] nobitanobi: has joined #ruby
[21:37:22] LoneHerm_: has joined #ruby
[21:37:46] weaksauce: > the scopes have virtually no distinction?
[21:38:22] veduardo: has joined #ruby
[21:38:29] ItSANgo: has joined #ruby
[21:38:32] Sammitch: how is someone supposed to distinguish betwee local and object scope, say when calling a particularly-named variable like 'hash'
[21:38:48] tubbo: Sammitch: you actually called a particuarly-named method called `hash`. not a variable.
[21:38:49] WIN_: has joined #ruby
[21:39:17] Sammitch: tubbo: and how am I supposed to know that I called a method rather than a variable?
[21:39:18] tubbo: in ruby it's harder to make that distinction, but in general it's encouraged to make use of method calls that return values rather than saving values off into local variables.
[21:39:29] yuung: has joined #ruby
[21:39:39] apeiros: Sammitch: did you assign to a local variable named hash? no? ok, not an lvar.
[21:39:47] baweaver: ACTION scratches head
[21:39:54] hangelo: has joined #ruby
[21:40:05] apeiros: and knowing your current local scope should be trivial. if not, your local lexical scope is too long.
[21:40:05] adaedra: You usually have scopes small enough to be able to see what are your variables, yeah.
[21:40:16] tubbo: Sammitch: from syntax alone? you can't always make that distinction. but in the way that ruby is canonically written, you don't have to know that information all the time.
[21:40:30] tubbo: Sammitch: just like when you're in any dynamic language, you don't need to know where exactly in RAM each object is being stored.
[21:40:39] tubbo: or in most dynamic languages, what type the object is
[21:41:00] edev: has joined #ruby
[21:41:21] edev: hey all, is there a way that I can force gem to only install from one source via command line?
[21:41:30] apeiros: Sammitch: and while you've been bitten by this now, from experience it is *exceedingly rare* that you get bitten by lvars & methods looking the same.
[21:41:38] edev: im trying with gem install --source http://x.y.z.a/rubygems $gem_name, but it still tries to query rubygems
[21:41:39] weaksauce: Sammitch eloquent ruby is a great book if you are interested in learning the idioms
[21:41:54] edev: behind a firewall that blocks rubygems.org, so it just hangs until it times out.
[21:42:20] adaedra: _dev: if you're never going to use rubygems, you can remove the source, I guess.
[21:42:30] skade: has joined #ruby
[21:42:53] edev: Unfortunately, removing the source for some reason still tries to reach to rubygems
[21:42:57] edev: I'm not really sure why.
[21:43:10] railsForDaiz: has joined #ruby
[21:43:19] tubbo: _dev: because rubygems installs default gem source configuration to https://rubygems.org and it is A BITCH to get it out :D
[21:43:36] tubbo: _dev: unfortunately rubygems assumes you have a public internet connection :(
[21:43:46] Sammitch: apeiros: IMHO it should not simply be "rare" it should be *impossible*. I know that complaining about language syntax is more or less pissing in the wind, but... [incoherent rant comprised of mostly expletives]
[21:43:53] robbyoconnor: has joined #ruby
[21:44:31] WIN_: has left #ruby: ("Leaving")
[21:44:58] adaedra: I hope you're just angry because of a stupid error (we all do those, they're all maddening) and not just come here to rant endlessly about Ruby.
[21:45:30] ruby[bot]: -b AndroUser123!*@*$#ruby-banned
[21:45:32] tubbo: just python things :D
[21:45:33] apeiros: Sammitch: yeah, no. writing bugs is always possible in all languages in all possible and impossible ways.
[21:45:38] apeiros: so no, you won't get that wish granted.
[21:46:04] cippaciong: _dev I don't know if it would work and it's kind of hacky, but what about trying to resolve rubygems.org as x.y.z.a through the hosts file?
[21:46:19] apeiros: and it's just a matter of where you're coming from which decides what venues to introduce bugs one considers acceptable
[21:46:19] tubbo: python is way better for that kind of thing but the language itself isn't as expressive. it just looks ugly comparatively, but in many cases python can be easier to grok immediately.
[21:46:33] tubbo: like i'm not even a python dev and i've contributed to Sick-Beard as well as written ableton live remote scripts. it can't be THAT hard ;)
[21:46:46] adaedra: tssk tssk tssk, we're not going into language wars.
[21:47:00] weaksauce: python is nice. ruby is nice. end.
[21:47:10] adaedra: Thank you.
[21:48:15] kknight: has joined #ruby
[21:51:13] machty_: what comparison operator does Ruby use for group_by?
[21:51:30] apeiros: machty_: it's based on Hash, so .hash and .eql?
[21:51:47] lyoshajapan: has joined #ruby
[21:51:51] apeiros: and I suspect that's in the documentation ;-)
[21:51:53] machty_: wow really, ok i'll try that
[21:52:04] machty_: i assumed <=> or ==
[21:52:14] apeiros: that'd be quite slow
[21:52:26] apeiros: as it'd have to compare with all groups
[21:52:37] trinaldi: has joined #ruby
[21:53:56] apeiros: machty_: well, it returns a Hash with the group_by result as keys. and Hash says "Two objects refer to the same hash key when their hash value is identical and the two objects are eql? to each other."
[21:55:00] jenrzzz: has joined #ruby
[21:55:07] machty_: apeiros: wahoo i got it!
[21:56:16] joonty: has joined #ruby
[21:56:19] krobzaur: has joined #ruby
[21:57:01] idefine: has joined #ruby
[21:57:22] Prominent: has joined #ruby
[21:58:03] justbleed: has joined #ruby
[22:00:57] pawnbox: has joined #ruby
[22:00:58] ivanskie_work: has joined #ruby
[22:02:21] gizless: has joined #ruby
[22:02:47] maletor_: has joined #ruby
[22:03:27] robbyoconnor: has joined #ruby
[22:03:35] ivanskie_work_: has joined #ruby
[22:06:02] shadoi: has joined #ruby
[22:07:24] siaW: has joined #ruby
[22:08:31] LastWhisper____: has joined #ruby
[22:08:41] openstruct: has joined #ruby
[22:10:50] stunder001: has joined #ruby
[22:11:11] floatingpoint: has joined #ruby
[22:11:34] floatingpoint: does LoadError output any information about the error in question, and if so, how can I access said information?
[22:12:50] jhass: >> require "foo"
[22:12:51] ruby[bot]: jhass: # => cannot load such file -- foo (LoadError) ...check link for more (https://eval.in/532217)
[22:12:55] apeiros: floatingpoint: like all exceptions it has .message and .backtrace
[22:12:56] jhass: normally it's right in the message
[22:13:00] apeiros: what else are you looking for?
[22:14:00] baweaver: has joined #ruby
[22:14:12] ruby[bot]: It's popcorn time! 🍿🍿🍿
[22:14:25] Radar: oh I was scrolled up :(
[22:14:32] idefine: has joined #ruby
[22:15:01] Ox0dea: floatingpoint: LoadError#path
[22:15:13] Ox0dea: >> begin; require 'foo'; rescue LoadError => e; e.path; end
[22:15:14] ruby[bot]: Ox0dea: # => "foo" (https://eval.in/532218)
[22:15:19] blackgoat: has joined #ruby
[22:15:26] yuung: has joined #ruby
[22:15:54] olspookishmagus: has joined #ruby
[22:17:56] idefine_: has joined #ruby
[22:18:29] rattatmatt: has joined #ruby
[22:19:01] Wicaeed: has joined #ruby
[22:19:35] Sammitch: has left #ruby: ()
[22:19:52] Xeago: has joined #ruby
[22:21:14] tAn: has joined #ruby
[22:21:15] pookie_: has joined #ruby
[22:22:05] rmulligan: has joined #ruby
[22:22:11] idefine: has joined #ruby
[22:22:34] idefine: has joined #ruby
[22:23:33] eurialo: has joined #ruby
[22:23:56] openstruct: has joined #ruby
[22:24:16] ivanskie_work_: has joined #ruby
[22:24:44] gizmore: has joined #ruby
[22:26:05] tAn: has joined #ruby
[22:27:49] siaW: has joined #ruby
[22:28:14] baweaver: You can log out any time you like, but you can never leave.
[22:28:55] adaedra: *cue guitar solo*
[22:29:09] siaW: hello friends
[22:29:18] Ox0dea: Hi, siaw. <3
[22:29:28] siaW: i have a text file that i want to iterate each line and pick ONLY emails from each line
[22:29:32] siaW: this is what i got so far
[22:29:36] siaW: https://gist.github.com/siaw23/5ce84f7eb3eb931d1bd4
[22:29:41] Radar: Sounds bad
[22:29:42] siaW: obviously it’s not working
[22:29:48] Radar: siaw: That is not a regex that matches all email addresses.
[22:29:59] siaW: Radar: how come?
[22:30:18] Radar: siaw: here you go http://emailregex.com/
[22:30:41] siaW: i picked that regex from that site
[22:30:49] pawnbox: has joined #ruby
[22:30:57] Radar: Which one?
[22:31:04] siaW: Ruby (simpler version)
[22:31:17] Radar: Show us the text file?
[22:32:18] siaW: Radar: here https://gist.github.com/siaw23/5ce84f7eb3eb931d1bd4#file-textfile-txt
[22:32:35] Radar: It's CSV.
[22:32:50] Radar: So parse it with the CSV stdlib package?
[22:33:02] A124: has joined #ruby
[22:33:17] uglybandersnatch: has joined #ruby
[22:33:28] snockerton1: has joined #ruby
[22:33:37] siaW: if the content is a txt
[22:33:43] siaW: regex shouldn’t care right?
[22:33:49] trosborn: has joined #ruby
[22:34:02] siaW: it should still be able to pick the email from the line of text
[22:34:07] snockerton: has joined #ruby
[22:34:32] snockerton: has joined #ruby
[22:34:49] jhass: that it's possible to solve the problem, doesn't make it the right tool
[22:34:58] jenrzzz_: has joined #ruby
[22:35:03] jhass: parse it as CSV
[22:35:03] tonyynot: has joined #ruby
[22:35:13] chipotle: has joined #ruby
[22:35:32] snockerton: has joined #ruby
[22:36:02] siaW: always looking for shorter ways :p
[22:38:59] CloCkWeRX: has joined #ruby
[22:39:27] skade: has joined #ruby
[22:39:52] jenrzzz: has joined #ruby
[22:40:11] apeiros: siaw: parsing it as csv is quite likely the shortest way which is still correct
[22:40:35] zenlot: has joined #ruby
[22:40:40] apeiros: CSV.read(file).to_a.transpose.first # might work, depends a bit on what CSV.read returns. don't know by heart.
[22:40:59] Radar: siaw: Parse it as a CSV.
[22:40:59] gizless: has joined #ruby
[22:41:31] apeiros: tell me if you can get it shorter than ^
[22:41:41] apeiros: from CSV.read docs it seems to be correct.
[22:42:02] siaW: well it’s working
[22:42:06] siaW: buuuuuut
[22:42:20] siaW: what if i wanted the first 2 values of the csv fiel?
[22:42:30] justbleed: has joined #ruby
[22:42:41] apeiros: then you use your knowledge about coding and adapt the code.
[22:42:51] Radar: siaw: https://gist.github.com/radar/4466683303b86d1bee8b
[22:42:57] Radar: siaw: please stop being lazy
[22:42:58] hahuang65: has joined #ruby
[22:43:14] Radar: siaw: If you want the emails and the first names well I'm sure you can figure out how to do that with the gist I just made for you.
[22:43:19] Radar: ps my paypal is radarlistener@gmail.com
[22:43:30] siaW: easy now
[22:43:37] siaW: paypal email
[22:43:40] siaW: hahahahaaaaa
[22:43:54] Radar: Consider it a "laziness tax"
[22:44:39] idefine: has joined #ruby
[22:45:33] tvon: has joined #ruby
[22:46:04] gizmore: has joined #ruby
[22:46:50] siaW: if it only it worked :p
[22:46:53] siaW: it’s not
[22:47:08] griffindy: has joined #ruby
[22:47:08] Radar: ?didntwork
[22:47:08] ruby[bot]: What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
[22:48:08] Rodya_: has joined #ruby
[22:48:08] Ox0dea: The second one. I ran `rvm implode` and it must've been in one of its literal moods.
[22:48:33] Ox0dea: Is there some sort of rollback mechanism for un-exploding my computer?
[22:49:22] siaW: Radar: i’m trying to get the email and first name of each line, is this wrong?
[22:49:37] Radar: siaw: Is what wrong?
[22:49:41] Radar: That you are trying to do that?
[22:49:42] idletask: Ox0dea: fwiw, I am 40% done in parsing full Ruby expressions; tokenization still bears wrong names, however (that is my belief)
[22:49:48] siaW: Radar: https://gist.github.com/siaw23/5ce84f7eb3eb931d1bd4#file-ruby-rb
[22:49:51] siaW: was getting link
[22:50:00] Radar: Yes it is wrong
[22:50:04] Radar: Try to figure it out for yourself for 15 mins
[22:50:18] idefine: has joined #ruby
[22:51:27] shanemcd: has joined #ruby
[22:51:55] baweaver: has joined #ruby
[22:52:31] lemur: has joined #ruby
[22:52:52] siaW: already did
[22:53:02] mlehrer: has joined #ruby
[22:53:24] siaW: this works https://gist.github.com/siaw23/5ce84f7eb3eb931d1bd4#file-ruby-rb
[22:53:57] snockerton: has joined #ruby
[22:54:02] hahuang61: has joined #ruby
[22:54:07] Radar: Issue is now that you'll need to pick all the odd elements to get the email addresses, and even elements to get the first names
[22:54:15] Radar: you can probably do a better job than that if you apply yourself
[22:54:52] robbyoconnor: has joined #ruby
[22:55:05] Ox0dea: idletask: Well done, I suppose. :)
[22:55:27] Ox0dea: Are you using the exact same tokens as defined in parse.y?
[22:57:08] ledestin: has joined #ruby
[22:57:34] vdamewood: has joined #ruby
[22:57:52] mdw: has joined #ruby
[22:58:12] Nahra: has joined #ruby
[22:58:50] Moosashi: has joined #ruby
[22:59:35] idletask: Ox0dea: given that I don't know that "parse.y" you are talking about, my guess would be no :p
[22:59:49] idletask: Note that I did save that BNF representation of Ruby you pointed to
[23:00:07] Ox0dea: Ah, well, those would be the same tokens, then, yeah.
[23:00:10] idletask: Is that what you referred to?
[23:00:29] Ox0dea: More or less.
[23:00:42] Ox0dea: This is parse.y: https://github.com/ruby/ruby/blob/trunk/parse.y
[23:01:04] Ox0dea: The BNF I linked was generated from that Bison grammar.
[23:01:21] moeabdol2: has joined #ruby
[23:01:23] idletask: OK, then no, definitely not that
[23:01:35] idletask: My grammars are more... Let's say... Practical
[23:01:35] pawnbox: has joined #ruby
[23:02:09] Ox0dea: I'm not sure I follow.
[23:02:16] trosborn: has joined #ruby
[23:03:29] idletask: Although this one is incomplete, you may have a feel of where I'm heading at: https://github.com/litesolutions/sonar-ruby/blob/master/sonar-ruby-ast/src/main/java/es/litesolutions/sonar/ruby/grammar/ExpressionGrammar.java
[23:03:30] djbkd: has joined #ruby
[23:03:52] idletask: And, for reference: https://github.com/litesolutions/sonar-ruby/blob/master/sonar-ruby-ast/src/main/java/es/litesolutions/sonar/ruby/tokens/BinaryOps.java
[23:04:16] idefine: has joined #ruby
[23:04:17] idletask: SonarQube's API requires that ungodly syntax
[23:05:49] idletask: Well, anyway, the "state of the art" plugin at the moment is at https://github.com/litesolutions/sonar-ruby; by the end of the week there will be a basic plugin running
[23:05:59] idletask: But the advantage is that the desing is fully extensible
[23:06:27] idletask: So, as I go, I'll find more stuff that I don't parse, add tokens, grammar rules, and parser rules
[23:07:48] Ox0dea: Sounds good. Kudos for not reaching for XML in the interests of extensibility. :P
[23:09:32] idletask: XML is like violence; it doesn't work? Just use more
[23:10:00] idletask: After all, I _am_ the author of the current JSON Schema IETF drafts, so I stay away from XML as far as I can :p
[23:10:23] mwlang: has joined #ruby
[23:10:36] ensyde_: has joined #ruby
[23:11:08] idefine: has joined #ruby
[23:11:16] Wicaeed: In a case statement, if a value is matched more than once, which value is returned by the statement, the first instance of the match, or the last?
[23:11:35] idletask: Wicaeed: the first -- that would be logical
[23:11:44] Ox0dea: Wicaeed: Aye, first match wins.
[23:11:56] stunder001: has joined #ruby
[23:11:59] idletask: (wait, can you have boolean expressions with "case" in ruby?)
[23:11:59] Wicaeed: Makes sense :)
[23:12:28] Ox0dea: Wicaeed: https://eval.in/532226
[23:12:52] Ox0dea: I could conceive of an argument for matching the most specific rather than the first, but that's hard to pin down.
[23:13:54] lyoshajapan: has joined #ruby
[23:14:47] gizless: has joined #ruby
[23:14:54] Ox0dea: idletask: `case` tries each clause's #=== method against the "subject" and evaluates the body of the first one for which that evaluation returns truthy.
[23:15:26] Ox0dea: #=== has a useful custom definition on several classes, to include Class, Regexp, and Proc.
[23:16:14] rmulligan: has joined #ruby
[23:17:48] idletask: Ox0dea: I was misled; in fact, ruby's case/when is what I thought was switch/case in other languages
[23:17:52] idletask: It appears not
[23:17:59] Ox0dea: It is, it's just much better. :)
[23:18:05] idletask: Meh, I still have a s*load to learn
[23:18:12] siaW: if i have an array how to i print each pair on a line?
[23:18:13] Ox0dea: Ruby is a massive language.
[23:18:27] idletask: Yup, and much older than I thought at first
[23:18:34] idletask: In fact, it's nearly as old as Java
[23:18:42] idletask: And that is saying something in 2016
[23:18:44] baweaver: has joined #ruby
[23:19:01] idletask: I'm going to enjoy learning it, I think!
[23:19:29] idletask: Java and Ruby were both born in 1995
[23:19:32] Ox0dea: Well, if it's "saying something", I'm not sure what.
[23:19:56] idletask: It means that it has a history behind it, and that history has influenced the language
[23:20:10] shadeslayer: has joined #ruby
[23:20:13] BtcBen: has joined #ruby
[23:20:18] Ox0dea: That sounds like a tautology, frankly.
[23:20:20] stunder001: has joined #ruby
[23:21:11] Ox0dea: Loads of languages use "chr" and "ord" as and where appropriate, irrespective of their age.
[23:21:12] idletask: Ruby, like Java, was born at a time where Unicode didn't define code points outside the BMP
[23:21:37] idletask: Had it been born after this period, would that function be named chr?
[23:21:48] Ox0dea: Er, why not?
[23:22:05] Ox0dea: It's short for "character", and Ruby has long been okay with the fact that "characters" can be constructed from more than one byte.
[23:22:06] idletask: It would have been named glyph -- and org, codepoint
[23:22:32] idletask: You seem to be mixing code points with byte representation
[23:23:02] Ox0dea: Yes, I guess I see how you mean now, but #glyph would still be kinda surprising.
[23:23:21] Ox0dea: Every codepoint maps to an individual character, no?
[23:23:38] Ox0dea: So why would Fixnum#glyph be the more appropriate name?
[23:23:57] idletask: In fact, Unicode goes even further than that and calls glyphs "graphemes"
[23:24:09] idletask: Because glyphs are visual representations
[23:24:30] idletask: What you see in your editor, in fac
[23:24:48] idletask: Anyway, enough with that
[23:24:57] idletask: All I know is that I'm going to enjoy that
[23:24:57] Canar: Technically correct.
[23:25:01] Canar: The best kind of correct! <3
[23:25:07] railsFor_: has joined #ruby
[23:25:46] idletask: I love learning new languages
[23:25:58] idletask: And parsing them to boot, it's heaven :p
[23:26:39] n008f4g_: has joined #ruby
[23:27:48] idletask: But I want to get that language plugin to a useful state
[23:28:53] KliKK: has joined #ruby
[23:30:16] but3k4: has joined #ruby
[23:31:54] pawnbox: has joined #ruby
[23:33:27] djbkd: has joined #ruby
[23:33:50] LuckyRawApe: has joined #ruby
[23:34:09] djbkd: has joined #ruby
[23:35:02] idefine: has joined #ruby
[23:37:16] Alayde: has joined #ruby
[23:37:21] BSaboia: has joined #ruby
[23:37:28] idefine: has joined #ruby
[23:37:30] Alayde: has left #ruby: ()
[23:39:30] Musashi007: has joined #ruby
[23:39:48] charliesome: has joined #ruby
[23:40:49] LuckyRawApe: has left #ruby: ("WeeChat 1.4")
[23:44:46] uglybandersnatch: has joined #ruby
[23:46:35] idefine: has joined #ruby
[23:48:24] trosborn: has joined #ruby
[23:48:37] brunto: has joined #ruby
[23:48:38] brunto: has joined #ruby
[23:50:20] astrobun_: has joined #ruby
[23:52:40] idefine: has joined #ruby
[23:53:15] elifoster: has joined #ruby
[23:54:20] shanemcd: has joined #ruby
[23:59:45] cdg: has joined #ruby