« Back to channel list

#ruby - 07 May 2018

« Back 1 day Forward 1 day »
[00:01:50] dipnlik: has joined #ruby
[00:03:43] ged: has joined #ruby
[00:18:18] alfiemax: has joined #ruby
[00:21:34] bmurt: has joined #ruby
[00:27:09] conta: has joined #ruby
[00:28:06] hinbody: has joined #ruby
[00:28:08] AJA4350: has joined #ruby
[00:28:14] hinbody: has left #ruby: ()
[00:29:18] jenrzzz: has joined #ruby
[00:29:18] jenrzzz: has joined #ruby
[00:33:40] yxhuvud: has joined #ruby
[00:35:04] Pisuke: has joined #ruby
[00:39:50] alfiemax: has joined #ruby
[01:15:02] GodFather: has joined #ruby
[01:19:17] conta: has joined #ruby
[01:21:03] wald0: has joined #ruby
[01:22:49] alfiemax: has joined #ruby
[01:32:20] yxhuvud: has joined #ruby
[01:40:30] dinfuehr: has joined #ruby
[01:45:47] amar: has joined #ruby
[01:48:17] conta: has joined #ruby
[01:52:31] alfiemax: has joined #ruby
[01:52:37] amar: has joined #ruby
[01:53:02] dr3wo: has joined #ruby
[01:57:44] gizmore|2: has joined #ruby
[01:57:58] qyliss: has joined #ruby
[02:14:41] Puffball: has joined #ruby
[02:15:11] alfiemax: has joined #ruby
[02:18:12] amar: has joined #ruby
[02:19:53] anisha_: has joined #ruby
[02:26:31] yxhuvud: has joined #ruby
[02:26:46] conta: has joined #ruby
[02:28:49] arescorpio: has joined #ruby
[02:40:50] kapil___: has joined #ruby
[02:43:33] Haradani: has joined #ruby
[02:46:15] alfiemax: has joined #ruby
[02:51:50] Ethan: has joined #ruby
[02:54:01] sauvin_: has joined #ruby
[02:57:53] yxhuvud: has joined #ruby
[03:00:09] cadillac_: has joined #ruby
[03:06:51] jamesaxl: has joined #ruby
[03:13:31] conta: has joined #ruby
[03:17:03] govg: has joined #ruby
[03:31:40] ciscam: has joined #ruby
[03:37:30] alfiemax: has joined #ruby
[03:47:03] alfiemax: has joined #ruby
[03:52:45] gix-: has joined #ruby
[03:54:42] conta: has joined #ruby
[04:11:19] roamingdog: has joined #ruby
[04:12:04] roamingdog: has joined #ruby
[04:12:54] roamingdog: has joined #ruby
[04:13:40] roamingdog: has joined #ruby
[04:31:15] jeen: has joined #ruby
[04:31:51] apeiros: has joined #ruby
[04:34:10] Defenestrate: has joined #ruby
[04:34:10] Defenestrate: has joined #ruby
[04:42:44] zautomata3: has joined #ruby
[04:43:50] konsolebox: has joined #ruby
[04:45:11] Defenestrate: has joined #ruby
[04:45:11] Defenestrate: has joined #ruby
[04:46:16] Defenestrate: has joined #ruby
[04:48:39] c0ncealed1: has joined #ruby
[04:54:19] Jeena: has joined #ruby
[05:00:45] alex``: has joined #ruby
[05:04:38] jeen__: has joined #ruby
[05:07:53] conta: has joined #ruby
[05:13:17] reber: has joined #ruby
[05:21:37] SuperLag: has joined #ruby
[05:28:58] conta: has joined #ruby
[05:30:04] roamingdog: has joined #ruby
[05:46:15] Asher: has joined #ruby
[05:46:51] aupadhye: has joined #ruby
[05:50:59] ur5us: has joined #ruby
[05:53:19] ur5us: has joined #ruby
[05:54:07] jeen__: has joined #ruby
[05:59:54] eckhardt: has joined #ruby
[06:03:58] clemens3_: has joined #ruby
[06:04:11] woodruffw: has joined #ruby
[06:04:11] woodruffw: has joined #ruby
[06:05:36] RyanMcCoskrie: has joined #ruby
[06:06:16] konsolebox: has joined #ruby
[06:06:41] RyanMcCoskrie: has joined #ruby
[06:09:24] mondongo: has joined #ruby
[06:09:31] alfiemax: has joined #ruby
[06:09:39] kies^: has joined #ruby
[06:17:35] kapil___: has joined #ruby
[06:20:17] amar: has joined #ruby
[06:29:22] Jeena: has joined #ruby
[06:29:28] conta: has joined #ruby
[06:30:18] ciscam: has joined #ruby
[06:37:37] jeen__: has joined #ruby
[06:39:43] biberu: has joined #ruby
[06:41:08] sinduck: has joined #ruby
[06:42:54] schneider-: has joined #ruby
[06:57:28] clemens3_: has joined #ruby
[06:59:52] andikr: has joined #ruby
[07:00:21] Asher: has joined #ruby
[07:05:08] tAn: has joined #ruby
[07:07:29] venmx: has joined #ruby
[07:11:35] suukim: has joined #ruby
[07:19:35] bipul: has joined #ruby
[07:20:37] bipul: Hi, I would like to know? How ruby gem is different from rvm(ruby version management) ?
[07:21:49] vondruch: has joined #ruby
[07:23:28] claudiuinberlin: has joined #ruby
[07:24:52] vondruch: has joined #ruby
[07:28:57] dionysus69: has joined #ruby
[07:30:28] dminuoso: bipul: gem does not manage ruby versions itself sadly
[07:30:55] schleppel: has joined #ruby
[07:31:03] dminuoso: bipul: rvm is for switching entire ruby versions (say between 2.5.1, 2.4.4 and 2.3.7) while gem is for packaging ruby libraries and managing dependencies.
[07:31:39] dminuoso: bipul: If you don't have a good reason to use rvm I recommend to use chruby for version switching instead.
[07:32:47] zautomata3: has joined #ruby
[07:33:05] alfiemax: has joined #ruby
[07:33:53] schneider-: has joined #ruby
[07:38:19] bipul: dminuoso, So it required both gem and bundler to manage ruby version?
[07:38:26] tvw: has joined #ruby
[07:39:17] dminuoso: bipul: `gem` is a library/format to bundle ruby programs/libraries. It also brings `gem` the executable that allows installing packages and their dependencies.
[07:39:31] dminuoso: bipul: `bundle` is a program that manages gem sandboxes for programs
[07:39:49] dminuoso: bipul: `rvm/rbenv/chruby` are programs that switches between ruby versions.
[07:40:45] bipul: okay, great. I wish i could find diagram to see how rubygem , bundle and rvm works together with each other.
[07:41:01] bipul: To run ruby application.
[07:41:12] dminuoso: bipul: You don't need rvm at all.
[07:41:31] dminuoso: bipul: rvm/rbenv/chruby are only useful if you have some projects that need one Ruby version, while others need another.
[07:41:51] bipul: okay. dminuoso Thank you very much.
[07:42:01] dminuoso: bipul: bundler uses rubygems for you.
[07:42:17] dminuoso: bipul: so the regular way for a bundler project would be: `bundle exec ...`
[07:42:20] bipul: gem and rubygems both are same? right?
[07:43:12] schneider-: has joined #ruby
[07:43:13] dminuoso: bipul: Okay so for more correctness: RubyGems is the name of the entire project. It consists of a format called `gem`, and brings a command line tool also called `gem`.
[07:43:41] yohji: has joined #ruby
[07:43:45] ur5us: has joined #ruby
[07:45:04] dminuoso: bipul: gem is basically similar to npm or apt-get maybe.
[07:48:12] ellcs: has joined #ruby
[07:52:33] schneider-: has joined #ruby
[07:53:17] burgestrand: has joined #ruby
[07:56:03] Raboo: has joined #ruby
[07:56:23] jenrzzz: has joined #ruby
[07:56:23] jenrzzz: has joined #ruby
[08:01:52] schneider-: has joined #ruby
[08:02:50] tomphp: has joined #ruby
[08:05:16] mlkkk: has joined #ruby
[08:05:57] sysvalve: has joined #ruby
[08:08:16] conta: has joined #ruby
[08:11:08] schneider-: has joined #ruby
[08:14:37] Guest54361: has joined #ruby
[08:17:35] s2013: has joined #ruby
[08:19:24] rahul_bajaj: has joined #ruby
[08:20:27] schneider-: has joined #ruby
[08:21:04] amar: has joined #ruby
[08:21:40] galeido: has joined #ruby
[08:21:40] galeido: has joined #ruby
[08:22:23] dminuoso: tbuehlmann: Sometimes I ponder what this guy does all day long
[08:26:15] nowhere_man: has joined #ruby
[08:29:54] schneider-: has joined #ruby
[08:30:56] venmx: has joined #ruby
[08:31:17] qyliss: has joined #ruby
[08:34:38] marr: has joined #ruby
[08:39:16] schneider-: has joined #ruby
[08:40:28] karapetyan: has joined #ruby
[08:48:36] schneider-: has joined #ruby
[08:56:35] burgestrand: has joined #ruby
[08:57:24] drale2k_: has joined #ruby
[08:57:50] schneider-: has joined #ruby
[08:58:59] ur5us: has joined #ruby
[09:05:59] mhoungbo1: has joined #ruby
[09:08:17] sameerynho: has joined #ruby
[09:11:13] drale2k_: has joined #ruby
[09:15:47] roamingdog: has joined #ruby
[09:18:29] tomphp: has joined #ruby
[09:21:21] tomphp: has joined #ruby
[09:22:24] InfinityFye: has joined #ruby
[09:32:07] karapetyan: has joined #ruby
[09:32:11] InfinityFye: has left #ruby: ("Leaving")
[09:34:43] guille-moe: has joined #ruby
[09:41:23] RoneDreamer: has joined #ruby
[09:41:48] tomphp: has joined #ruby
[09:42:17] mhoungbo1: has joined #ruby
[09:59:25] kapil___: has joined #ruby
[10:05:17] rabajaj: has joined #ruby
[10:07:03] cadillac_: has joined #ruby
[10:09:58] rahul_bajaj: has joined #ruby
[10:10:07] za1b1tsu: has joined #ruby
[10:12:30] ur5us: has joined #ruby
[10:16:59] rabajaj: has joined #ruby
[10:22:03] amar: has joined #ruby
[10:23:41] conta: has joined #ruby
[10:32:10] alfiemax: has joined #ruby
[10:34:49] alfiemax: has joined #ruby
[10:36:34] howdoi: has joined #ruby
[10:37:10] conta: has joined #ruby
[10:41:22] roamingdog: has joined #ruby
[10:54:51] shantanoo: has joined #ruby
[10:55:29] shantanoo: hi, is there a way to find out whether the given string is ascii only or unicode?
[10:56:30] ciscam: has joined #ruby
[10:56:48] burgestrand: >> "Hello".ascii_only?
[10:56:49] ruby[bot]: Burgestrand: # => true (https://eval.in/1000429)
[10:56:57] burgestrand: >> "Åland".ascii_only?
[10:56:58] ruby[bot]: Burgestrand: # => false (https://eval.in/1000430)
[10:57:26] alfiemax: has joined #ruby
[10:57:33] shantanoo: thanks. i was looking at is_utf8? and it was always returning true...
[11:03:00] jottr: has joined #ruby
[11:09:59] GingerWho: has joined #ruby
[11:16:40] Cavallari: has joined #ruby
[11:17:07] mostlybadfly: has joined #ruby
[11:18:06] amar: has joined #ruby
[11:19:45] Cavallari: has joined #ruby
[11:20:53] alfiemax_: has joined #ruby
[11:21:35] AJA4350: has joined #ruby
[11:22:45] rabajaj: has joined #ruby
[11:25:17] amar: has joined #ruby
[11:27:35] shantanoo: has joined #ruby
[11:27:55] jottr: has joined #ruby
[11:28:01] yohji: has joined #ruby
[11:28:18] zautomata: has joined #ruby
[11:30:23] ldnunes: has joined #ruby
[11:31:22] dminuoso: > is7BitAscii = -> c { c < 128 }; "Hällo".codepoints.all?(&is7BitAscii)
[11:31:27] dminuoso: >> is7BitAscii = -> c { c < 128 }; "Hällo".codepoints.all?(&is7BitAscii)
[11:31:28] ruby[bot]: dminuoso: # => false (https://eval.in/1000472)
[11:31:33] dminuoso: >> is7BitAscii = -> c { c < 128 }; "Hello".codepoints.all?(&is7BitAscii)
[11:31:34] ruby[bot]: dminuoso: # => true (https://eval.in/1000473)
[11:36:38] rabajaj: has joined #ruby
[11:39:34] shantano1: has joined #ruby
[11:46:39] anjen: has joined #ruby
[11:46:50] S007: has joined #ruby
[11:50:40] rabajaj: has joined #ruby
[11:51:41] nowhere_man: has joined #ruby
[11:53:49] VladGh: has joined #ruby
[11:54:30] samosaphile: has joined #ruby
[11:57:14] mhoungbo1: has joined #ruby
[11:59:41] amatas: has joined #ruby
[12:00:01] rabajaj: has joined #ruby
[12:00:17] synthroid: has joined #ruby
[12:00:51] inerthia: has joined #ruby
[12:06:07] meadmoon: has joined #ruby
[12:13:47] VladGh: has joined #ruby
[12:15:32] KeyJoo: has joined #ruby
[12:15:46] rkazak: has joined #ruby
[12:16:18] burgestrand: has joined #ruby
[12:18:31] rabajaj: has joined #ruby
[12:20:37] rabajaj: has joined #ruby
[12:25:36] dipnlik: has joined #ruby
[12:28:18] mhoungbo1: has joined #ruby
[12:29:37] VladGh: has joined #ruby
[12:32:42] johnny56: has joined #ruby
[12:34:16] clemens3_: has joined #ruby
[12:34:24] rabajaj: has joined #ruby
[12:40:32] aufi: has joined #ruby
[12:43:34] bmurt: has joined #ruby
[12:43:53] Psybur: has joined #ruby
[12:44:52] johnny56: has joined #ruby
[12:46:25] jottr: has joined #ruby
[12:47:17] Psybur_: has joined #ruby
[12:53:02] jeffreylevesque: has joined #ruby
[12:54:52] jcalla: has joined #ruby
[13:00:25] Asher: has joined #ruby
[13:01:09] Tempesta_: has joined #ruby
[13:01:31] ipee: has joined #ruby
[13:02:26] amar_: has joined #ruby
[13:02:35] roamingd_: has joined #ruby
[13:02:35] schneider1: has joined #ruby
[13:02:59] musl: has joined #ruby
[13:04:46] argoneus_: has joined #ruby
[13:04:50] moeSizlak: has joined #ruby
[13:04:52] rheddry: has joined #ruby
[13:04:58] noizex: has joined #ruby
[13:05:12] moeSizlak: if you have 2 versions of a gem installed, and 'require' the gem, which one will it use?
[13:05:42] konsolebox_: has joined #ruby
[13:05:48] ule_: has joined #ruby
[13:05:48] DEac-_: has joined #ruby
[13:06:00] genta0: has joined #ruby
[13:06:03] izaac_: has joined #ruby
[13:06:13] ccooke_: has joined #ruby
[13:06:21] reaVer_: has joined #ruby
[13:06:30] pabst: has joined #ruby
[13:06:33] kiki_lam1: has joined #ruby
[13:07:36] Tempesta_: has joined #ruby
[13:07:49] jottr: has joined #ruby
[13:07:52] mjolnird: has joined #ruby
[13:09:01] j0bk_: has joined #ruby
[13:09:03] agit0: has joined #ruby
[13:09:15] dyyylan: has joined #ruby
[13:09:19] Scientz: has joined #ruby
[13:09:21] chridal_: has joined #ruby
[13:09:24] inoperable_: has joined #ruby
[13:09:27] fuxx: has joined #ruby
[13:09:30] ianmalcolm_: has joined #ruby
[13:09:30] Liothen-: has joined #ruby
[13:09:33] nielsk_: has joined #ruby
[13:09:34] elementaru_: has joined #ruby
[13:09:35] sirecote_: has joined #ruby
[13:09:36] spk_: has joined #ruby
[13:09:36] m27frogy_: has joined #ruby
[13:09:44] thejoecarroll_: has joined #ruby
[13:09:48] cyberRodent_: has joined #ruby
[13:10:03] vinothvkr_: has joined #ruby
[13:10:03] starship: has joined #ruby
[13:10:35] syndikate_: has joined #ruby
[13:11:12] chridal: has joined #ruby
[13:11:13] jpterry_: has joined #ruby
[13:11:40] dminuoso: moeSizlak: If you actually care, use #gem (e.g. gem "foo", "=1.2.3"; require 'foo')
[13:11:43] dminuoso: moeSizlak: Or use bundler.
[13:11:55] moeSizlak: will it default to newest otherwise?
[13:12:18] vondruch: has joined #ruby
[13:12:21] dminuoso: moeSizlak: I have never cared. If it matters to you, use bundler or pin like I asid.
[13:12:36] infernix: has joined #ruby
[13:12:55] Psybur: has joined #ruby
[13:14:29] burgestrand: has joined #ruby
[13:15:25] cyberg: has joined #ruby
[13:16:03] Lyubo1: has joined #ruby
[13:16:08] ciscam: has joined #ruby
[13:16:50] vondruch: has joined #ruby
[13:17:24] samosaphile: has left #ruby: ()
[13:17:26] kies^: has joined #ruby
[13:17:34] Arahael: has joined #ruby
[13:17:52] gizmore|2: has joined #ruby
[13:18:35] JoL1hAHN: has joined #ruby
[13:18:43] dionysus69: has joined #ruby
[13:18:51] amelliaa: has joined #ruby
[13:19:32] linduxed: has joined #ruby
[13:19:57] eb0t: has joined #ruby
[13:25:55] DTZUZO: has joined #ruby
[13:26:48] ule: has joined #ruby
[13:27:16] alfiemax: has joined #ruby
[13:29:42] tomphp: has joined #ruby
[13:29:47] k0mpa: has joined #ruby
[13:29:48] jcalla: has joined #ruby
[13:34:40] alfiemax: has joined #ruby
[13:35:34] donofrio: has joined #ruby
[13:38:52] jeffreylevesque: has joined #ruby
[13:40:09] suukim: has joined #ruby
[13:40:41] amatas: has joined #ruby
[13:40:42] burgestrand: has joined #ruby
[13:41:20] AJA4350: has joined #ruby
[13:42:56] amatas: has joined #ruby
[13:44:06] amatas: has joined #ruby
[13:46:16] GodFather: has joined #ruby
[13:48:34] Emmanuel_Chanel: has joined #ruby
[13:48:46] QCF: has joined #ruby
[13:49:00] gnufied: has joined #ruby
[13:49:28] ecnelises: has joined #ruby
[13:52:55] oleo: has joined #ruby
[13:53:44] joast: has joined #ruby
[13:57:11] kurko_: has joined #ruby
[13:57:39] amatas: has joined #ruby
[13:57:40] jeffreylevesque: has joined #ruby
[13:58:01] marr: has joined #ruby
[13:59:07] alfiemax: has joined #ruby
[14:00:20] j0bk: has joined #ruby
[14:04:15] vdl: has joined #ruby
[14:06:14] jeffreylevesque: has joined #ruby
[14:09:58] jeffreylevesque: has joined #ruby
[14:11:19] claudiuinberlin: has joined #ruby
[14:11:28] mozzarella: has joined #ruby
[14:11:54] inerthia: has joined #ruby
[14:14:32] amatas: has joined #ruby
[14:16:40] chouhoulis: has joined #ruby
[14:17:15] samosaphile: has joined #ruby
[14:18:07] jeffreylevesque: has joined #ruby
[14:18:38] Tempesta: has joined #ruby
[14:21:25] IanMalcolm: has joined #ruby
[14:22:48] tomphp: has joined #ruby
[14:24:44] alfiemax: has joined #ruby
[14:24:47] pskosinski: has joined #ruby
[14:26:46] shantanoo: has joined #ruby
[14:27:12] RedNifre: has joined #ruby
[14:32:23] synthroid: has joined #ruby
[14:32:34] chouhoulis: has joined #ruby
[14:38:59] za1b1tsu: has joined #ruby
[14:40:06] nicesignal: has joined #ruby
[14:44:54] mhoungbo1: has joined #ruby
[14:46:57] Asher: has joined #ruby
[14:54:46] zxq2: if you're working with a library whose behavior wrt exceptions is poorly documented and may even change in the future, is it okay to catch all exceptions when calling a method, e.g.: recuse => e ...
[14:56:31] Cork: zxq2: i question if you should use a lib that doesn't have a stable structure for there exceptions...
[14:56:33] cschneid_: has joined #ruby
[14:56:43] Cork: exceptions shouldn't change more then rarely in a project...
[14:56:55] moeSizlak: has left #ruby: ("Leaving")
[14:56:59] rippa: has joined #ruby
[14:57:14] havenwood: zxq2: When no class is specified after `rescue` it'll rescue StandardError.
[14:57:33] tdy: has joined #ruby
[14:58:29] zxq2: yes i understand that
[14:58:47] havenwood: zxq2: StandardError is a reasonable thing to rescue.
[14:59:08] zxq2: does it subsume library defined exceptions?
[14:59:13] mhoungbo1: has joined #ruby
[14:59:31] havenwood: zxq2: if they inherit from StandardError, which is common practice
[14:59:36] havenwood: https://go.gliffy.com/go/publish/5152080
[15:00:00] nettie: has joined #ruby
[15:01:39] kurko_: has joined #ruby
[15:02:14] zxq2: cork, fair point. i'm referring to openssl. i'
[15:02:50] zxq2: ve found bugs in the bindings already and the documentation is vague.
[15:05:45] bmurt: has joined #ruby
[15:07:49] rahul_bajaj: has joined #ruby
[15:08:47] GodFather: has joined #ruby
[15:08:57] amar: has joined #ruby
[15:09:01] Cork: zxq2: ya, exceptions in openssl is special :)
[15:15:13] govg: has joined #ruby
[15:19:05] CrazyEddy: has joined #ruby
[15:20:56] synthroid: has joined #ruby
[15:25:11] coderphive: has joined #ruby
[15:25:30] alfiemax: has joined #ruby
[15:26:49] nowhere_man: has joined #ruby
[15:28:23] hays_: has joined #ruby
[15:28:23] hays_: has joined #ruby
[15:29:10] rahul_bajaj: has joined #ruby
[15:29:48] yohji: has joined #ruby
[15:40:09] konsolebox: has joined #ruby
[15:40:16] cagomez: has joined #ruby
[15:40:28] jcarl43: has joined #ruby
[15:44:23] cagomez: has joined #ruby
[15:45:23] konsolebox: has joined #ruby
[15:49:32] mhoungbo1: has joined #ruby
[15:49:50] dionysus69: has joined #ruby
[15:50:14] dr3wo: has joined #ruby
[15:52:43] bmurt: has joined #ruby
[15:54:57] shantanoo: has joined #ruby
[15:55:14] eckhardt: has joined #ruby
[15:55:42] shantanoo: has joined #ruby
[15:57:35] howdoi: has joined #ruby
[15:59:18] apeiros_: has joined #ruby
[16:00:58] KeyJoo: has joined #ruby
[16:03:49] conta: has joined #ruby
[16:06:14] ciscam: has joined #ruby
[16:09:12] Quentinius: has joined #ruby
[16:09:13] vovs03: has joined #ruby
[16:09:26] bmurt: has joined #ruby
[16:11:10] jenrzzz: has joined #ruby
[16:11:59] jcalla: has joined #ruby
[16:13:19] cthulchu: has joined #ruby
[16:21:36] cthu|: has joined #ruby
[16:22:12] schneider1: has joined #ruby
[16:23:46] jamiejackson: has joined #ruby
[16:30:57] cliluw: has joined #ruby
[16:32:39] GodFather: has joined #ruby
[16:33:25] dipnlik: has joined #ruby
[16:35:07] ldnunes: has joined #ruby
[16:36:59] chris349: has joined #ruby
[16:42:46] n0m4d1c: has joined #ruby
[16:45:03] Mike11: has joined #ruby
[16:47:29] Exagone313: has joined #ruby
[16:49:20] ccrow: has joined #ruby
[16:50:54] agent_white: has joined #ruby
[16:52:28] nitric: has joined #ruby
[16:53:35] eckhardt: has joined #ruby
[16:55:11] psychicist__: has joined #ruby
[16:56:01] sanscoeur: has joined #ruby
[16:58:06] clemens3_: has joined #ruby
[17:03:39] Ryzokuken: has joined #ruby
[17:06:19] Emmanuel_Chanel: has joined #ruby
[17:07:10] alfiemax: has joined #ruby
[17:07:53] schneider1: has joined #ruby
[17:12:46] ccrow: has joined #ruby
[17:17:09] schneider1: has joined #ruby
[17:17:49] kurko_: has joined #ruby
[17:23:06] za1b1tsu: Hello, is ruby suitable for bash scripting?
[17:23:54] tobiasvl: za1b1tsu: what do you mean by "suitable for bash scripting"?
[17:24:15] tobiasvl: bash is its own language
[17:24:28] za1b1tsu: bash scripts
[17:24:58] tobiasvl: bash scripts are written in bash
[17:25:06] za1b1tsu: automated tasks that can be done in bash but you really should not
[17:25:06] tobiasvl: what am I not understanding here
[17:25:27] tobiasvl: ok, so just "scripts"?
[17:25:30] tobiasvl: then yes, sure
[17:26:09] za1b1tsu: I mean shell scripts
[17:26:28] schneider1: has joined #ruby
[17:26:36] dminuoso: I regularly write Haskell code that generates Ruby code to do meta programming to generate bash scripts
[17:27:14] cagomez: has joined #ruby
[17:27:57] Liothen: has joined #ruby
[17:27:57] Liothen: has joined #ruby
[17:29:46] za1b1tsu: sorry for the mixed terminlogy, what I ment to say was shell scripts and I see a lot of people recommending python for shells scripts. And if I know ruby, was wondering if I could use it instead.
[17:30:00] konsolebox: za1b1tsu: a bash script is a shell script that works in bash. ruby runs ruby scripts. and a ruby script is not a shell script. learn basic meaning of terms. also, the command-line interface or the terminal is not "bash".
[17:30:10] konsolebox: za1b1tsu: a python script is also not a shell script.
[17:30:28] SeepingN: has joined #ruby
[17:32:37] za1b1tsu: konsolebox: so let me reprhase, use ruby for scripts to perform shell operations so I can automate different tasks in the shell
[17:33:25] BTRE: has joined #ruby
[17:35:46] konsolebox: za1b1tsu: if tasks are too complicated to be written with a bash/shell script, you can choose to write a ruby script. or if you're a purist you can just write a ruby script.
[17:35:49] schneider1: has joined #ruby
[17:38:32] za1b1tsu: konsolebox: I see, well python is mentioned a lot for writing these type of tasks and was curios if you guys still prefer to use ruby for this or use something else.
[17:41:39] bmurt: has joined #ruby
[17:42:15] eckhardt: has joined #ruby
[17:43:35] konsolebox: za1b1tsu: python is more popular that i can say. and ruby in my opinion has steeper learning curve. python may also have better library support. but when it comes to ease of composing code in general, i'll always favor Ruby.
[17:43:41] alfiemax: has joined #ruby
[17:44:01] gizmore: ruby is almost flawless.... sadly activerecord sucks
[17:44:27] za1b1tsu: gizmore: wish it was used in game development :(
[17:44:58] gizmore: za1b1tsu: wanna see a game of mine? …/join #shadowlamb
[17:45:06] schneider1: has joined #ruby
[17:45:15] roamingdog: has joined #ruby
[17:45:32] Immune: has joined #ruby
[17:46:26] miah: has joined #ruby
[17:49:01] gizmore: i got a better approach than activerecord/activebar
[17:49:41] gizmore: rails is like 6/10
[17:52:15] BTRE: has joined #ruby
[17:52:42] mhoungbo1: has joined #ruby
[17:53:40] cagomez: how do I create an object that responds to anything with an empty string?
[17:53:44] alfiemax: has joined #ruby
[17:54:24] schneider1: has joined #ruby
[17:55:23] Asher: has joined #ruby
[17:55:44] dminuoso: &ri method_missing
[17:55:54] gizmore: cagomez: http://php.net/manual/en/language.oop5.magic.php
[17:57:06] gizmore: <?=eval(eval("['a'=>'echo sandwich'])['a'])?>
[17:57:07] nitric_: has joined #ruby
[17:57:34] gizmore: warning... assuming constant sandwich?
[17:57:47] dminuoso: Oh yeah. eval is quite good.
[17:58:07] gizmore: i use eval everywhere... so users can customize the app
[17:58:46] qyliss: has left #ruby: ("WeeChat 2.1")
[17:59:02] gizmore: a customer once got hacked by DRI and Fairlight.. they made a beautiful index.php intro for they
[17:59:07] gizmore: (kiddings)
[17:59:07] clemens3_: has joined #ruby
[17:59:15] dminuoso: class OnlyString; eval(%[def method_missing(*_); eval("\"\""); end]); end
[17:59:17] dminuoso: Something like this.
[18:00:52] CrazyEddy: has joined #ruby
[18:03:45] schneider1: has joined #ruby
[18:06:10] tomphp: has joined #ruby
[18:10:09] mhoungbo1: has joined #ruby
[18:11:13] nadir: has joined #ruby
[18:13:07] schneider1: has joined #ruby
[18:13:58] Lytol: has joined #ruby
[18:15:21] Asher: has joined #ruby
[18:18:11] orbyt_: has joined #ruby
[18:18:29] nowhere_man: has joined #ruby
[18:18:36] alfiemax: has joined #ruby
[18:22:23] schneider1: has joined #ruby
[18:27:50] n0m4d1c: has joined #ruby
[18:31:39] schneider1: has joined #ruby
[18:31:49] nima_m_: has joined #ruby
[18:32:06] KeyJoo: has joined #ruby
[18:32:11] Eiam: has joined #ruby
[18:32:51] c_nick: has joined #ruby
[18:36:37] nima_m_: has joined #ruby
[18:40:59] schneider1: has joined #ruby
[18:42:11] weaksauce: has joined #ruby
[18:42:16] guille-moe: has joined #ruby
[18:43:51] alfiemax: has joined #ruby
[18:46:49] nima_m_: has joined #ruby
[18:50:23] schneider1: has joined #ruby
[18:50:41] dionysus69: has joined #ruby
[18:51:39] mhoungbo1: has joined #ruby
[18:52:47] orbyt_: has joined #ruby
[18:53:47] quobo: has joined #ruby
[18:54:26] c_nick: has joined #ruby
[18:56:22] z64: heya dminuoso. if i've been following right, you've been getting into haskell yeah? would you have any sage words for a rubyists approach to haskell? i understand its best to take a blank canvas to it, i'm just struggling to find it as engaging to dive into as ruby was.
[18:58:37] lunarkitty7: has joined #ruby
[18:59:08] oleo: has joined #ruby
[18:59:42] schneider1: has joined #ruby
[19:00:11] alfiemax: has joined #ruby
[19:00:25] Asher: has joined #ruby
[19:02:07] mhoungbo1: has joined #ruby
[19:03:07] oleo: has joined #ruby
[19:04:52] tycoon177: does anyone here know of an alternative gem to rubyzip? we've been running into the same issue outlined here https://github.com/rubyzip/rubyzip/issues/249. Basically, *sometimes* the zip files generated by rubyzip can't be opened by the default archive utility on osx. I checked and all of the file names are unique. That was mentioned as a possible cause on that issue thread
[19:06:35] bmurt: has joined #ruby
[19:07:24] gizmore: tycoon177: an alternative might be to use an external program like zip
[19:08:28] nowhere_man: has joined #ruby
[19:08:55] tycoon177: gizmore: i might look into doing that. Thanks! I was just wanting to make sure that I wasn't just missing another gem. I tried searching but didn't find anything
[19:08:57] schneider1: has joined #ruby
[19:09:46] gizmore: tycoon177: yeah... never had problems zipping with ruby.... doubt there is more than 1 zip lib
[19:11:59] hph^: has joined #ruby
[19:18:17] schneider1: has joined #ruby
[19:18:25] guille-moe: has joined #ruby
[19:18:34] tipyn: has joined #ruby
[19:22:54] jottr: has joined #ruby
[19:23:44] bmurt: has joined #ruby
[19:24:41] oleo: has joined #ruby
[19:27:02] dminuoso: z64: Hard to say. For how long have you been learning Haskell?
[19:27:41] schneider1: has joined #ruby
[19:28:12] mondongo: has joined #ruby
[19:28:42] z64: dminuoso: i've been picking it up/down for maybe a year. its been a bucket list thing for longer. i've always been more of a static typing / compiled lang guy, so haskells world of purity / type safety is super intriguing
[19:29:44] cschneid_: has joined #ruby
[19:30:42] Asher: has joined #ruby
[19:31:26] z64: i feel like what i need is like to take a class or something. i always wind up with way too many questions when i dive in than would be reasonable to dump onto someone for free.. lmao
[19:31:34] tomphp: has joined #ruby
[19:32:19] agent_white: has joined #ruby
[19:32:29] dminuoso: z64: The #haskell channel here on freenode is incredibly active and helpful. They can also point you to a lot of resources (from academic papers to books, or even some great free learning things)
[19:33:03] dminuoso: z64: But at the end you basically need to solve problems and write programs with it to get comfortable with it. Or perhaps Haskell just isn't your thing.
[19:33:52] z64: yeah i think thats the thing really. i need something practical to *do* with it beyond academic exercises, and its tough finding something when i could immediately do it in another lang i already know
[19:34:19] dminuoso: z64: What reasons do you want to learn Haskell for?
[19:34:26] samosaphile: i don't understand this obsession with haskell/function programming at all. I can't think of anything built with haskell that I've ever used
[19:35:44] samosaphile: yet I've come across so many articles randomly searching for stuff about how to apply haskell/functional programming principles to x/y/z languages
[19:36:25] n0m4d1c: has joined #ruby
[19:37:02] phaul: has joined #ruby
[19:37:17] z64: dminuoso: compile time safety and strong typing is super valuable to me, in the kinds of bugs it eliminates from runtime entirely. and haskell seems to accomplish it in such a detailed, frighteningly interesting way lol.
[19:38:03] dminuoso: z64: Haskell goes way beyond "strong typing" in that you have an advanced type system in which can express so many things.
[19:38:04] z64: it just seems like a tool i would exercise a lot, if i could grasp it :) lol
[19:38:14] dionysus69: has joined #ruby
[19:38:49] oleo: has joined #ruby
[19:40:46] miah: has joined #ruby
[19:43:28] orbyt_: has joined #ruby
[19:44:43] dminuoso: z64: If you're solving problems in your comfort zone you will not expand knowledge.
[19:45:28] Eiam: just follow along with the #haskell guide
[19:45:30] Eiam: I think its CS194
[19:45:44] Eiam: as a ruby person who did that course, it was fun and #haskell was very helpful. I didn't have any issues
[19:46:03] dminuoso: CIS194 is highly regarded by a lot of folks in there indeed :)
[19:47:05] dminuoso: z64: Learning requires accepting that it will take time, but it's an investment for the future. Me personally I just started solving typical day to day problems in Haskell.
[19:47:32] dminuoso: I've reached the point where the grand majority of "Hey I quickly need a program to do some data transformation" is just as quickly written in Haskell
[19:47:44] Eiam: z64: I did it to poke at Haskell and see what the fuss was about. I had fun, then I went back to mostly writing ruby but trying to be uhm, better about it?
[19:48:23] dminuoso: I think no matter whether you will stick to Haskell or not, it will make you a better programmer because it will teach you so many clean ways to think about problems and solve them.
[19:48:50] z64: dminuoso: yeah, i totally get that:) i tried cis194 a long time ago, i'll have to revisit it with gusto. and yeah, thats another reason why i was interested, from stories like those that i've heard ^^
[19:48:57] piixal: has joined #ruby
[19:50:54] dminuoso: z64: The main thing to keep in mind is that a lot of the "traditional languages" are rather similar copies of another.
[19:51:19] dminuoso: So switching from say Python to Ruby doesn't really change how you are thinking, because the languages are basically the same with just some visual changes here and oddities there.
[19:51:29] cschneid_: has joined #ruby
[19:52:18] dminuoso: But when you then pick up say.. Lisp, Prolog, Haskell, Idris or SML - you will notice that your "pattern recipes" stop working because you're toying around with different concepts
[19:52:51] dminuoso: Which is why these languages may seem so difficult to pick up compared to other languages, because they actually _are_ different.
[19:54:03] tfitts: has joined #ruby
[19:54:08] cadillac_: has joined #ruby
[19:56:26] z64: right, exactly. hard to leave those "at the door", haha
[19:56:45] dionysus69: has joined #ruby
[19:57:11] Eiam: thats why its called learning =0
[19:57:38] plujon: has joined #ruby
[19:59:40] sanscoeur: has joined #ruby
[20:01:07] TinkerT: has joined #ruby
[20:01:12] z64: well, i gotta fly. thanks for the words guys :)! have a good one
[20:03:00] piixal: has joined #ruby
[20:04:44] kapil___: i want to strip last "_id" from a string
[20:04:46] tipyn: has joined #ruby
[20:05:05] dminuoso: kapil___: Then do that.
[20:05:29] Zarthus: I want a million euros.
[20:06:11] kapil___: dminuoso: is there a function for it?
[20:06:18] dminuoso: kapil___: What have you tried?
[20:08:56] kapil___: `a.gsub("_id", "") if a.last(3) == "_id"
[20:09:46] dminuoso: kapil___: What is the if condition supposed to accomplish?
[20:09:48] Asher: has joined #ruby
[20:10:16] dminuoso: > a = "_id_bar_id"; a.gsub("_id", "") if a.last(3) == "_id"
[20:10:18] dminuoso: >> a = "_id_bar_id"; a.gsub("_id", "") if a.last(3) == "_id"
[20:10:19] ruby[bot]: dminuoso: # => undefined method `last' for "_id_bar_id":String (NoMethodError) ...check link for more (https://eval.in/1000648)
[20:10:25] kapil___: dminuoso: thanks
[20:10:40] konsolebox: >> "abc_id".dup.gsub(/_id$/, "")
[20:10:41] ruby[bot]: konsolebox: # => "abc" (https://eval.in/1000649)
[20:10:54] Quentinius: has joined #ruby
[20:10:55] dminuoso: kapil___: What makes you think .last(3) exists?
[20:11:00] dminuoso: konsolebox: Don't spoonfeed please.
[20:11:03] dminuoso: Especially not for kapil___.
[20:11:28] kapil___: i want to bu sure that _id is removed if at end
[20:12:02] konsolebox: dminuoso: it wasn't. i corrected/enhanced his method.
[20:12:41] kapil___: konsolebox: thanks a lot
[20:13:10] dminuoso: konsolebox: You allowed him to do what he has been doing for a year now. Drop into the channel and ask the most basic questions in hopes of people telling him how its done.
[20:14:34] konsolebox: dminuoso: what was your plan then?
[20:18:50] kapil___: konsolebox: how to also check if last 3 characters is "_id" true or false?
[20:20:00] konsolebox: kapil___: you already have the regex. you just need to apply regex comparison to the string.
[20:20:05] piixal: has joined #ruby
[20:20:22] konsolebox: the other method is to use the substring function.
[20:20:33] konsolebox: which i don't always try to remember
[20:20:46] konsolebox: kapil___: but in this case i don't see why you still need to check it
[20:21:00] kapil___: no i have other case
[20:21:31] kapil___: konsolebox: ok i will compare regex
[20:22:10] sanscoeur: has joined #ruby
[20:25:44] bauruine: has joined #ruby
[20:25:53] orbyt_: has joined #ruby
[20:28:09] roamingdog: has joined #ruby
[20:31:11] sina: has joined #ruby
[20:31:46] minimalism: has joined #ruby
[20:33:01] tvw: has joined #ruby
[20:35:47] synthroid: has joined #ruby
[20:40:04] kurko_: has joined #ruby
[20:42:02] tipyn: has joined #ruby
[20:42:26] drale2k_: has joined #ruby
[20:44:05] donofrio_: has joined #ruby
[20:44:19] fyrril2: has joined #ruby
[20:45:35] fribmendes: has joined #ruby
[20:45:35] DTZUZO_: has joined #ruby
[20:45:39] lesce_: has joined #ruby
[20:45:39] raggi_: has joined #ruby
[20:45:42] mroth_: has joined #ruby
[20:45:57] Kilobyte22: has joined #ruby
[20:45:57] arcturiaen_: has joined #ruby
[20:46:05] mr-robert_: has joined #ruby
[20:46:05] Nucky: has joined #ruby
[20:46:07] tfittsy: has joined #ruby
[20:46:08] bweston92-: has joined #ruby
[20:46:17] Chew_: has joined #ruby
[20:46:33] Iambchop_: has joined #ruby
[20:46:48] [diecast]_: has joined #ruby
[20:46:50] HalcyonicStorm__: has joined #ruby
[20:47:21] Yxhvd: has joined #ruby
[20:47:28] webhat_: has joined #ruby
[20:47:34] voker57_: has joined #ruby
[20:47:39] kentnl: has joined #ruby
[20:47:42] justinmcp_: has joined #ruby
[20:48:24] sunya7a__: has joined #ruby
[20:48:36] marens_: has joined #ruby
[20:48:37] marens_: has joined #ruby
[20:48:42] JDeen: has joined #ruby
[20:49:16] stairmast0r: has joined #ruby
[20:51:45] rawburtz: has joined #ruby
[20:51:46] sspreitzer: has joined #ruby
[20:51:46] sspreitzer: has joined #ruby
[20:51:51] mistym-: has joined #ruby
[20:52:10] hfp__work: has joined #ruby
[20:52:55] tomphp: has joined #ruby
[20:53:25] soahccc^: has joined #ruby
[20:53:54] hph^: has joined #ruby
[20:53:58] Brak____________: has joined #ruby
[20:54:03] tpendragon: has joined #ruby
[20:54:12] clampy: has joined #ruby
[20:54:14] hph^: has joined #ruby
[20:54:24] ccrow: has joined #ruby
[20:55:08] Liothen: has joined #ruby
[20:55:09] Liothen: has joined #ruby
[20:56:07] kriskropd: has joined #ruby
[20:56:38] tipyn: has joined #ruby
[20:56:46] dionysus69: has joined #ruby
[20:57:31] turt2live: has joined #ruby
[20:57:49] hph^: has joined #ruby
[20:58:22] hph^: has joined #ruby
[20:58:23] Lyubo1: has joined #ruby
[20:58:31] ciscam: has joined #ruby
[20:58:37] chridal: has joined #ruby
[20:58:44] hph^: has joined #ruby
[20:59:06] hph^: has joined #ruby
[20:59:12] Scient: has joined #ruby
[20:59:28] cyberRodent: has joined #ruby
[20:59:29] hph^: has joined #ruby
[20:59:51] hph^: has joined #ruby
[21:00:14] hph^: has joined #ruby
[21:01:06] hph^: has joined #ruby
[21:01:26] hph^: has joined #ruby
[21:01:49] hph^: has joined #ruby
[21:02:09] hph^: has joined #ruby
[21:02:19] tipyn: has joined #ruby
[21:02:37] hph^: has joined #ruby
[21:03:03] hph^: has joined #ruby
[21:03:25] hph^: has joined #ruby
[21:03:33] apeiros: !fixcon hph^
[21:03:33] ruby[bot]: +bb hph^!*@*$#ruby-fix-your-connection *!*@ip72-195-187-57.mc.at.cox.net$#ruby-fix-your-connection
[21:05:03] cschneid_: has joined #ruby
[21:07:58] dminuoso: ACTION hands apeiros a weechat
[21:08:03] dminuoso: Here try this
[21:08:15] apeiros: why? is it dangerous to be out there alone?
[21:08:37] apeiros: ACTION goes off to find a shield
[21:08:42] pwnd_nsfw: has joined #ruby
[21:10:09] gil_: has joined #ruby
[21:10:10] gil_: has joined #ruby
[21:11:10] Azure: has joined #ruby
[21:13:29] jenrzzz: has joined #ruby
[21:13:51] jordanm: has joined #ruby
[21:14:11] ccrow: has joined #ruby
[21:14:18] Eiam: dminuoso: so https://xkcd.com/1988/ in practice basically? =)
[21:20:51] agent_white: has joined #ruby
[21:23:57] ur5us: has joined #ruby
[21:24:38] garyserj: havenwood: thanks
[21:27:49] garyserj: Why is it that when I do myFile=File.open("blah.txt","rb"); myFile.gets It interprets the new line. The myFile.gets shows the first line. Whereas isn't "rb" meant to be read-only, and binary. And wouldn't binary mean don't interpret new line? http://ruby-doc.org/core-2.5.0/IO.html#method-c-new "binary file mode Suppresses EOL <-> CRLF conversion on Windows"
[21:28:36] Azure|dc: has joined #ruby
[21:31:05] jordanm: garyserj: "b" is essentially no-op on non-windows
[21:31:14] Eiam: hah that was my question
[21:31:22] Eiam: "whats it mean to be binary when you are .txt"
[21:31:51] garyserj: Eiam: extension is irrelevant. and if a file is plain text it's still possible to read it as one reads a binary file
[21:32:02] garyserj: File.open isn't about executing instructions
[21:32:26] Eiam: yes it may be possible but that doesn't mean thats what ruby has done...
[21:32:52] Eiam: i could easily see a bug report that says "check magic header before opening files and ignore if the type doesn't match" or something
[21:32:53] Eiam: ACTION shrugs
[21:32:57] garyserj: jordanm: so on unix it leaves \n as \n and in windows it converts \r\n to \n. ?
[21:33:04] jordanm: all files are binary in *nix, regardless if the content is "text"
[21:33:20] jordanm: garyserj: on unix, "b" does literally nothing at all
[21:33:33] garyserj: yeah, thanks
[21:33:43] jordanm: it does some kind of conversion on windows if you don't use it, but I am not sure exactly what
[21:34:52] garyserj: yeah, \r\n to \n if you don't use it
[21:35:08] jordanm: using "b" on windows should cause it to match the behavior of other operating systems (with or without "b")
[21:35:23] Miron: has joined #ruby
[21:35:25] cats: has joined #ruby
[21:36:16] pilne: has joined #ruby
[21:36:27] garyserj: it looks like 'b' on windows (and presumably unix), does nothing. But the default is in windows when ruby reads a file it converts \r\n to \n
[21:36:45] garyserj: and 'b' leaves the file as it is so stops ruby doing that conversion.
[21:37:41] garyserj: if I wanted to treat new lines not as new lines but just as characters I suppose I could use .read instead of .open
[21:38:49] orbyt_: has joined #ruby
[21:41:07] jamiejackson: has joined #ruby
[21:41:53] Yzguy: has joined #ruby
[21:43:47] alfiemax: has joined #ruby
[21:47:09] mhoungbo1: has joined #ruby
[21:49:39] eam: jordanm: garyserj: that is not true - text/binary influences the character encoding of strings read from a file
[21:50:34] eam: this can be enormously important -- I once had a (unix) ruby script which went from hours of runtime to seconds after changing to binary
[21:51:11] jeffreylevesque: has joined #ruby
[21:56:41] rkazak: has joined #ruby
[22:01:55] n0m4d1c: has joined #ruby
[22:02:32] n0m4d1c: has joined #ruby
[22:04:15] Bonjourm8: has joined #ruby
[22:05:34] Yzguy: has joined #ruby
[22:23:02] apeiros: has joined #ruby
[22:27:09] gizmore: do small gems need a gemfile or is gemspec enough?
[22:33:53] jeen__: has joined #ruby
[22:38:55] baweaver: I just add everything to the gemspec on most of my smaller gems.
[22:40:13] Jeena: has joined #ruby
[22:42:38] za1b1tsu: has joined #ruby
[22:44:37] mhoungbo1: has joined #ruby
[22:46:23] emilford: has joined #ruby
[22:46:54] jeen__: has joined #ruby
[22:49:12] garyserj: eam: do you have any practical example that shows that 'b' interprets the encoding differently?
[22:49:45] Sembei: has joined #ruby
[22:50:22] Bonjourm8: has joined #ruby
[22:52:45] tipyn: has joined #ruby
[22:55:25] nettie: has joined #ruby
[22:55:39] jnollette: has joined #ruby
[22:56:14] garyserj: I've noticed that "rb" can show an encoding of ASCII-8BIT and "r" can show it as CP850 but I don't see a difference.. and CP850 is a subset of ASCII-8BIT. Also one can specify an encoding e.g. myFile=File.open("blah.a","r:ASCII-8BIT") or myFile=File.open("blah.a","r:CP850") or myFile=File.open("blah.a","rb:ASCII-8BIT") or myFile=File.open("blah.a","rb:CP850") so when it even reports the same
[22:56:14] garyserj: encoding as specified then one can be even more sure that the 'b' or lack thereof is not influencing the encoding.
[22:56:40] garyserj: a=myFile.gets; a.encoding.name
[22:59:19] lupine: http://ruby-doc.org/core-2.5.0/IO.html#method-c-new clearly documents the differences
[22:59:31] lupine: > Suppresses EOL <-> CRLF conversion on Windows. And sets external encoding to ASCII-8BIT unless explicitly specified.
[23:01:37] Haradani: has joined #ruby
[23:02:13] Eiam: has joined #ruby
[23:04:07] jenrzzz: has joined #ruby
[23:04:15] apeiros: has joined #ruby
[23:07:30] eam: garyserj: the difference is that a string will have indices access of O(n) instead of O(1) if the string uses a variable width encoding like UTF-8
[23:07:53] eam: many unix systems (most every linux system) will default to UTF-8 encoding
[23:09:29] eam: you can reproduce this by reading in a reasonably sized string, say 10MB or so
[23:09:46] GodFather: has joined #ruby
[23:10:07] eam: and then 10000.times { s[2**23] }
[23:10:29] eam: with a fixed character size and O(1) indexing, the above will complete almost instantly
[23:10:47] eam: but if you do this when the string has a variable width encoding it will take a reeeeallly long time
[23:12:15] kevinburke: has joined #ruby
[23:12:17] tipyn: has joined #ruby
[23:13:50] eam: worse, depending on the encoding, you may find yourself addressing the incorrect data because ruby strings have character semantics rather than byte semantics
[23:18:45] Yzguy: has joined #ruby
[23:20:20] roamingdog: has joined #ruby
[23:20:43] za1b1tsu: has joined #ruby
[23:25:59] MzrE: has joined #ruby
[23:31:50] jenrzzz: has joined #ruby
[23:31:51] jenrzzz: has joined #ruby
[23:43:59] ellcs: has joined #ruby