« Back to channel list

#ruby - 07 February 2018

« Back 1 day Forward 1 day »
[00:02:11] lele: has joined #ruby
[00:15:39] chouhoulis: has joined #ruby
[00:16:59] BH23: has joined #ruby
[00:18:12] fmccann: has joined #ruby
[00:20:43] guacamole: has joined #ruby
[00:20:43] guacamole: has joined #ruby
[00:23:05] bmurt: has joined #ruby
[00:23:29] ledestin: has joined #ruby
[00:24:08] n0m4d1c: has joined #ruby
[00:25:48] snath: has joined #ruby
[00:30:22] chouhoulis: has joined #ruby
[00:32:50] lele: has joined #ruby
[00:39:37] bmurt: has joined #ruby
[00:39:42] coops: has joined #ruby
[00:43:25] lele: has joined #ruby
[00:44:36] alfiemax: has joined #ruby
[00:47:42] erciccione_[m]: has joined #ruby
[00:47:58] cschneid: has joined #ruby
[00:50:05] n0m4d1c: has joined #ruby
[00:50:13] kapil___: has joined #ruby
[00:52:19] cdg: has joined #ruby
[00:52:34] vichib: has joined #ruby
[01:08:24] Radar: What's the technical name for things like %i, %W, %r?
[01:08:31] Radar: It's _not_ sigils
[01:11:20] havenwood: Radar: general delimited syntax
[01:11:29] havenwood: or general delimited input
[01:11:58] bigblind: has joined #ruby
[01:12:41] Giphy[m]: has joined #ruby
[01:12:41] jonjits[m]: has joined #ruby
[01:12:41] turt2live: has joined #ruby
[01:12:41] Hanma[m]: has joined #ruby
[01:12:41] Tagami[m]: has joined #ruby
[01:12:41] redlegion[m]: has joined #ruby
[01:12:41] KevinMGranger: has joined #ruby
[01:12:41] aviraldg: has joined #ruby
[01:12:41] haylon: has joined #ruby
[01:12:41] velu_aon[m]: has joined #ruby
[01:12:41] torarne: has joined #ruby
[01:12:43] havenwood: I don't hear anyone call it that though.
[01:12:47] zalipuha[m]: has joined #ruby
[01:12:48] itmerc[m]: has joined #ruby
[01:12:48] dizzy1or5[m]: has joined #ruby
[01:12:49] gokul_mr[m]: has joined #ruby
[01:12:50] Matt[m]1: has joined #ruby
[01:15:34] lele: has joined #ruby
[01:17:16] coops: The Ruby documentation calls them "percent strings" confusingly
[01:17:36] coops: although I guess that is what they are in a literal sense when reading the code
[01:17:53] coops: http://ruby-doc.org/core-2.0.0/doc/syntax/literals_rdoc.html#label-Percent+Strings
[01:18:29] coops: I'd probably go with percent literals or percent literal shorthand if I were writing a book on 'em or something.
[01:21:25] mikecmpbll: has joined #ruby
[01:21:43] vutral|kali: has joined #ruby
[01:21:43] vutral|kali: has joined #ruby
[01:22:01] veduardo: has joined #ruby
[01:22:25] lele: has joined #ruby
[01:26:11] milardovich: has joined #ruby
[01:28:03] cagomez: has joined #ruby
[01:28:28] mtkd: has joined #ruby
[01:29:04] milardovich: has joined #ruby
[01:33:31] lele: has joined #ruby
[01:34:17] apparition: has joined #ruby
[01:34:41] guacamole: has joined #ruby
[01:34:41] guacamole: has joined #ruby
[01:39:21] milardovich: has joined #ruby
[01:42:27] orbyt_: has joined #ruby
[01:44:07] nowhereman_: has joined #ruby
[01:45:57] workmad3: has joined #ruby
[01:46:46] t0m: has joined #ruby
[01:48:15] guacamole: has joined #ruby
[01:48:15] guacamole: has joined #ruby
[01:58:54] arescorpio: has joined #ruby
[02:00:21] Barrt: has joined #ruby
[02:01:47] lele: has joined #ruby
[02:12:22] alfiemax: has joined #ruby
[02:13:54] milardovich: has joined #ruby
[02:14:46] cschneid: has joined #ruby
[02:19:06] lele: has joined #ruby
[02:19:43] cadillac_: has joined #ruby
[02:22:58] notnebd: has joined #ruby
[02:24:43] Killerkiwi: has joined #ruby
[02:28:58] jasonr: has joined #ruby
[02:29:16] jasonr: class Test
[02:29:16] jasonr: @text = "Hello World"
[02:29:16] jasonr: a = Test.new
[02:29:16] jasonr: puts a.text # how does this work?
[02:30:27] havenwood: jason_: NoMethodError: undefined method `text' for #<Test:...>
[02:31:24] havenwood: jason_: That wouldn't work, since instance variables are internal only unless you expose an external interface for them via a method.
[02:31:47] jasonr: only methods are external ?
[02:32:21] baweaver: Also you should probably use gist
[02:32:24] ruby[bot]: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
[02:32:41] lele: has joined #ruby
[02:32:48] pastorinni: has joined #ruby
[02:34:46] havenwood: jason_: This is an example of exposing an instance variable with a method (using attr shorthand): https://gist.github.com/havenwood/334c36172db000fe0ed0f99f4f9a037a
[02:35:21] havenwood: jason_: Show us a gist of what you have if you're having trouble getting your code working.
[02:37:55] jasonr: https://gist.github.com/Killerkiwi2005/6d7fc533068796f7edcd70240f44071b .. thats a lot of boiler plate for a property
[02:41:04] baweaver: You should see other languages
[02:43:25] jasonr: well c# is public string FirstName { get; set; } = "Jane";
[02:43:32] jasonr: pyhon is pretty simple
[02:43:52] orbyt_: has joined #ruby
[02:43:55] jasonr: nm thanks for the help
[02:44:15] Jameser: has joined #ruby
[02:48:35] Jameser: has joined #ruby
[02:48:40] shinnya: has joined #ruby
[03:00:09] Jameser: has joined #ruby
[03:00:16] cadillac_: has joined #ruby
[03:00:28] m27frogy: has joined #ruby
[03:06:24] alfiemax: has joined #ruby
[03:06:52] Mrgoose2: has joined #ruby
[03:07:10] xcesariox: has joined #ruby
[03:07:43] alfiemax_: has joined #ruby
[03:14:25] justinfaler: has joined #ruby
[03:15:04] justinfaler: has joined #ruby
[03:17:31] za1b1tsu: has joined #ruby
[03:18:24] Fezzler: has joined #ruby
[03:26:47] codinghabit: has joined #ruby
[03:30:27] dviola: has joined #ruby
[03:31:46] zautomata1: has joined #ruby
[03:32:20] mtkd: has joined #ruby
[03:38:37] d^sh: has joined #ruby
[03:40:08] darkhanb: has joined #ruby
[03:40:45] pastorinni: has joined #ruby
[03:54:06] Radar: Thanks havenwood :) I will go with "literals"
[03:56:17] ahrs: has joined #ruby
[04:02:53] milardovich: has joined #ruby
[04:10:31] drewmcmillan: has joined #ruby
[04:16:17] gix: has joined #ruby
[04:17:48] howdoi: has joined #ruby
[04:19:15] alfiemax_: has joined #ruby
[04:24:20] dgoodlad: has joined #ruby
[04:25:14] trautwein: has joined #ruby
[04:26:35] xcesariox: has joined #ruby
[04:50:24] xcesariox: has joined #ruby
[04:59:43] claw: has joined #ruby
[05:20:06] xcesariox: has joined #ruby
[05:20:30] _aeris_: has joined #ruby
[05:20:58] d5sx43: has joined #ruby
[05:23:35] pastorinni: has joined #ruby
[05:23:52] Nilium: has joined #ruby
[05:24:22] d5sx43: has joined #ruby
[05:25:15] d5sx43: has joined #ruby
[05:27:49] anisha: has joined #ruby
[05:31:37] Tempesta: has joined #ruby
[05:40:19] Hanma[m]: has joined #ruby
[05:43:12] jaruga: has joined #ruby
[05:44:52] kapil___: has joined #ruby
[05:47:38] workmad3: has joined #ruby
[05:47:43] elphe: has joined #ruby
[05:51:10] wilbert: has joined #ruby
[05:51:30] milardovich: has joined #ruby
[05:55:50] xcesariox: has joined #ruby
[06:00:44] itmerc[m]: has joined #ruby
[06:01:44] redlegion[m]: has joined #ruby
[06:03:04] jonjits[m]: has joined #ruby
[06:03:26] torarne: has joined #ruby
[06:10:52] Dimik: has joined #ruby
[06:13:43] Tagami[m]: has joined #ruby
[06:18:58] pastorinni: has joined #ruby
[06:19:59] erciccione_[m]: has joined #ruby
[06:20:28] Matt[m]1: has joined #ruby
[06:21:03] KevinMGranger: has joined #ruby
[06:21:44] aviraldg: has joined #ruby
[06:22:54] turt2live: has joined #ruby
[06:23:57] dizzy1or5[m]: has joined #ruby
[06:23:57] ptx0: has joined #ruby
[06:23:59] velu_aon[m]: has joined #ruby
[06:25:08] marmorkreb: has joined #ruby
[06:25:30] zalipuha[m]: has joined #ruby
[06:25:59] haylon: has joined #ruby
[06:26:23] gokul_mr[m]: has joined #ruby
[06:26:38] nadir: has joined #ruby
[06:27:17] Giphy[m]: has joined #ruby
[06:29:30] hahuang65: has joined #ruby
[06:41:41] LocaMocha: has joined #ruby
[06:43:17] hahuang65: has joined #ruby
[06:43:31] Ishido: has joined #ruby
[06:44:49] alex``: has joined #ruby
[06:44:54] schneide_: has joined #ruby
[06:47:54] milardovich: has joined #ruby
[06:49:44] elphe: has joined #ruby
[06:50:30] tvw: has joined #ruby
[06:51:15] xcesariox: has joined #ruby
[06:51:21] ptx0: has joined #ruby
[06:52:08] alfiemax: has joined #ruby
[07:00:19] JoshS: has joined #ruby
[07:06:18] apeiros: has joined #ruby
[07:07:21] hahuang65: has joined #ruby
[07:19:41] hahuang65: has joined #ruby
[07:28:23] andikr: has joined #ruby
[07:30:45] xcesariox: has joined #ruby
[07:30:47] aufi: has joined #ruby
[07:30:52] dionysus69: has joined #ruby
[07:35:28] hahuang65: has joined #ruby
[07:43:21] sbr_: has joined #ruby
[07:44:44] conta: has joined #ruby
[07:45:16] hahuang65: has joined #ruby
[07:47:54] bousquet: has joined #ruby
[07:48:48] amatas: has joined #ruby
[07:52:22] tAn: has joined #ruby
[07:53:40] Lyubo1: has joined #ruby
[07:55:53] DoubleMalt: has joined #ruby
[07:58:35] lele: has joined #ruby
[08:01:19] apeiros: has joined #ruby
[08:05:02] schneide_: has joined #ruby
[08:05:33] hahuang65: has joined #ruby
[08:08:12] TomyWork: has joined #ruby
[08:15:48] clemens3: has joined #ruby
[08:15:54] konsolebox: has joined #ruby
[08:17:03] schneide_: has joined #ruby
[08:17:05] Mortomes|Work: has joined #ruby
[08:23:07] yohji: has joined #ruby
[08:24:43] hfp_work: has joined #ruby
[08:25:31] orbyt_: has joined #ruby
[08:29:04] claudiuinberlin: has joined #ruby
[08:36:02] devil_tux: has joined #ruby
[08:36:08] tAn: has joined #ruby
[08:36:09] milardovich: has joined #ruby
[08:36:10] hahuang65: has joined #ruby
[08:39:16] konsolebox: has joined #ruby
[08:40:37] dionysus69: has joined #ruby
[08:40:52] TomyWork: has joined #ruby
[08:42:55] burgestrand: has joined #ruby
[08:43:21] rabajaj: has joined #ruby
[08:43:31] mark_66: has joined #ruby
[08:50:24] Strepsils: has joined #ruby
[08:52:32] aupadhye: has joined #ruby
[09:01:57] drewmcmillan: has joined #ruby
[09:02:07] yohji: has joined #ruby
[09:02:26] VladGh_: has joined #ruby
[09:04:25] RougeR: has joined #ruby
[09:10:49] konsolebox: has joined #ruby
[09:11:56] tomphp: has joined #ruby
[09:15:08] sina: has joined #ruby
[09:15:37] alfiemax: has joined #ruby
[09:17:06] huyderman: has joined #ruby
[09:18:03] tomphp: has joined #ruby
[09:20:18] guille-moe: has joined #ruby
[09:24:33] schneide_: has joined #ruby
[09:25:27] justinfaler: has joined #ruby
[09:26:30] konsolebox: has joined #ruby
[09:26:59] mikecmpbll: has joined #ruby
[09:28:17] tomphp: has joined #ruby
[09:32:27] kapil___: has joined #ruby
[09:37:28] hahuang65: has joined #ruby
[09:41:03] Serpent7776: has joined #ruby
[09:42:50] tomphp: has joined #ruby
[09:46:25] mtkd: has joined #ruby
[09:46:36] jaruga: has joined #ruby
[09:48:33] Azure|dc: has joined #ruby
[09:48:47] alfiemax_: has joined #ruby
[09:49:17] workmad3: has joined #ruby
[09:56:33] drewmcmillan: has joined #ruby
[09:59:15] Beams: has joined #ruby
[09:59:19] elphe: has joined #ruby
[10:00:35] ikaji_xu: has joined #ruby
[10:01:28] tomphp: has joined #ruby
[10:04:17] mikecmpb_: has joined #ruby
[10:09:10] schneide_: has joined #ruby
[10:15:56] alfiemax: has joined #ruby
[10:16:22] elphe: has joined #ruby
[10:18:52] conta: has joined #ruby
[10:24:16] milardovich: has joined #ruby
[10:27:20] marr: has joined #ruby
[10:27:35] conta: has joined #ruby
[10:27:58] jokke: has joined #ruby
[10:28:22] jokke: is it possible to do lookups on a set/hash just with the hash of a contained element?
[10:28:56] canton7: I'd guess not, as multiple elements may have the same hash, so the set/hash needs to do equality on the element itself as well
[10:29:37] apeiros: plain ruby does not expose that. and as canton7 just elaborated, you could only test for the bucket to exist, not the element.
[10:30:15] dminuoso: jokke: set/hash basically do exactly that already. They are just abstractions around a hash table.
[10:30:47] jokke: i'm trying to figure out how to implement an array, which dedups the elements. i need to be able to access the elements by index so set is not an option because << with an existing element does nothing
[10:31:38] apeiros: jokke: what do you mean by dedup? it only contains the element once, or only references it once?
[10:31:58] jokke: references it once
[10:32:05] jokke: well that's not a problem
[10:32:14] apeiros: I think that's pointless then
[10:32:22] jokke: references arent' big
[10:32:26] jokke: the data is
[10:32:35] apeiros: yes. and arrays already only hold references.
[10:32:47] apeiros: or did you think ruby copies objects when you add them to an array?
[10:32:57] apeiros: x = large_obj; [x,x,x,x] # only contains 4 references to the same object
[10:33:00] jokke: no you're absolutely right
[10:33:04] jokke: of course
[10:33:23] dminuoso: ACTION smells the topic of missing referential transparency coming up
[10:33:44] apeiros: jokke: unless you try to do something like:
[10:33:56] apeiros: x = large_obj; [x.dup, x.dup, x.dup, x.dup]
[10:34:21] dminuoso: And it just happened.
[10:34:24] apeiros: then "deduplicating" might make sense. but IMO dangerous unless your deduped objects are frozen/immutable
[10:34:55] dminuoso: apeiros: And even then they are different from another.
[10:35:04] dminuoso: By being able to observe the internal id, you can tell them apart still.
[10:35:21] dminuoso: So you could trivially construct a program whose semantics change if you dedup such an array.
[10:35:32] apeiros: it becomes a domain specific question
[10:35:44] apeiros: and yes, that
[10:35:59] jokke: alright, so lets say i have a data structure that implement #hash, how would i keep track of all existing elements and if i were to create an equal element, how would i get the reference of the element i created before
[10:36:44] dminuoso: jokke: Are we talking in C or in Ruby?
[10:37:21] apeiros: jokke: you might be interested into WeakRef/WeakHash
[10:37:34] hahuang65: has joined #ruby
[10:39:23] dminuoso: jokke: You just override #== to have some domain specific value identity and use a Hash?
[10:39:48] tjbp: has joined #ruby
[10:39:49] dminuoso: That way you could do some foo[bar] ||= bar
[10:39:57] apeiros: ACTION afk for about 2h
[10:40:04] jokke: that sounds about right
[10:40:30] dminuoso: *value equality
[10:40:46] Jameser: has joined #ruby
[10:41:05] dminuoso: jokke: At that point you might as well use `Set` I guess
[10:41:29] jokke: dminuoso:no i can't
[10:41:50] dminuoso: Interesting, compare_by_identity is a cool thing.
[10:41:52] jokke: because i will need to add it to an array
[10:42:05] jokke: so something like objects = (foo[bar] ||= bar)
[10:42:14] jokke: objects <<
[10:42:29] jokke: so i can access it by index
[10:42:31] dminuoso: jokke: I see what you are on about.
[10:42:41] dminuoso: jokke: Would you be willing to accept a small native extension?
[10:42:53] apeiros: ACTION repeats weakref/weakhash
[10:43:02] apeiros: IMO no native extension needed
[10:43:17] jokke: apeiros: i don't follow. I looked at the docs, but i don't see the connection
[10:43:42] Jameser: has joined #ruby
[10:43:47] dminuoso: apeiros: Im not sure how they help either.
[10:43:59] ldnunes: has joined #ruby
[10:44:31] dminuoso: jokke: You know, Matrix covered this topic before. Right now you are noticing that there's something wrong with Ruby, but you dont know what.
[10:45:02] jokke: well i don't know if there's something wrong with ruby per-se
[10:45:19] jokke: it's easy enough to implement a DeduppedArray based on what we discussed
[10:50:00] jasoncx: has joined #ruby
[10:50:25] apeiros: jokke/dminuoso I'll show in ~2h. gtg.
[10:50:59] apeiros: the problem if you don't use weakref is that you potentially create godobjects (never gc'ed objects because you keep them in your dedup "registry")
[10:51:53] cabotto: has joined #ruby
[10:53:03] alfiemax: has joined #ruby
[10:54:59] elphe: has joined #ruby
[11:03:34] doublemalt_: has joined #ruby
[11:10:20] justinfaler: has joined #ruby
[11:10:34] dinfuehr: has joined #ruby
[11:13:04] apparition: has joined #ruby
[11:18:19] schneide_: has joined #ruby
[11:19:57] drewmcmillan: Ive got `match = /e.addLabels\("([^"]*)"\)/.match(page.driver.html)`
[11:20:09] drewmcmillan: I cant get the inner bit, it only returns the whole match
[11:22:16] burgestrand: >> "This is the string"[/is (\w+)/, 1]
[11:22:17] ruby[bot]: Burgestrand: # => "is" (https://eval.in/951563)
[11:23:02] burgestrand: >> "This is the string"[/\bis (\w+)/, 1]
[11:23:03] ruby[bot]: Burgestrand: # => "the" (https://eval.in/951564)
[11:24:32] drewmcmillan: dm btw got it
[11:32:19] alfiemax: has joined #ruby
[11:33:01] RougeR: has joined #ruby
[11:33:01] RougeR: has joined #ruby
[11:36:58] jshjsh: has joined #ruby
[11:37:03] hahuang65: has joined #ruby
[11:38:26] roshanavand: has joined #ruby
[11:42:23] sonOfRa: has joined #ruby
[11:43:02] alfiemax: has joined #ruby
[11:43:54] mikecmpbll: has joined #ruby
[11:43:59] schneide_: has joined #ruby
[11:46:10] Mia: has joined #ruby
[11:46:47] SebastianThorn: has joined #ruby
[11:50:06] workmad3: has joined #ruby
[11:51:03] justinfaler: has joined #ruby
[11:51:46] elphe: has joined #ruby
[11:53:14] cadillac_: has joined #ruby
[11:56:34] schneide_: has joined #ruby
[11:58:02] guardian: has joined #ruby
[12:07:40] elphe: has joined #ruby
[12:08:04] Jameser: has joined #ruby
[12:12:38] milardovich: has joined #ruby
[12:15:07] dinfuehr: has joined #ruby
[12:16:44] yohji: has joined #ruby
[12:20:29] roshanavand: has joined #ruby
[12:23:02] guardian: has joined #ruby
[12:23:11] schneide_: has joined #ruby
[12:23:35] al2o3-cr: has joined #ruby
[12:24:30] alfiemax: has joined #ruby
[12:24:55] GotHyper: has joined #ruby
[12:30:39] gregf_: has joined #ruby
[12:30:54] ochurlaud: has joined #ruby
[12:32:02] cdg: has joined #ruby
[12:33:03] ochurlaud: Hi, I get this error :Bundler::GemRequireError: There was an error while trying to load the gem 'redmine_extensions'. Gem Load Error is: undefined method `require_dependency' for main:Object
[12:33:39] justinfaler: has joined #ruby
[12:33:52] guardian: has joined #ruby
[12:34:01] ochurlaud: It seems that the problem is related to the require_dependency that is not defined. I found that it's brought by active_support, which is available
[12:35:12] John_Ivan: has joined #ruby
[12:35:12] John_Ivan: has joined #ruby
[12:36:01] jottr: has joined #ruby
[12:38:53] hahuang65: has joined #ruby
[12:39:19] konsolebox: has joined #ruby
[12:40:33] brendan-: has joined #ruby
[12:40:44] goatish: has joined #ruby
[12:43:09] nadir: has joined #ruby
[12:44:11] alfiemax_: has joined #ruby
[12:51:33] apeiros_: has joined #ruby
[12:53:34] burgestrand: has joined #ruby
[12:53:45] alex``: has joined #ruby
[12:54:49] konsolebox: has joined #ruby
[13:02:36] stormpack: has joined #ruby
[13:10:02] bmurt: has joined #ruby
[13:11:09] Guest16002: has joined #ruby
[13:11:50] banisterfiend: has joined #ruby
[13:11:56] apeiros: jokke: solved your problem?
[13:13:06] dminuoso: apeiros: Even if not, Im curious about your proposed solution.
[13:13:12] dminuoso: Or rather.. even if so!
[13:13:54] apeiros: dminuoso: mainly a weakref registry to run the deduplication over. you'd pass in whatever object you want deduped, it looks it up in its weakhash and returns the deduped if available.
[13:14:24] apeiros: through weakref you avoid your registry "uplifting" those objects to god-objects
[13:14:52] dminuoso: I see what you mean
[13:15:01] dminuoso: apeiros: And what if those objects go poof?
[13:15:22] dminuoso: How does a WeakRef behave if the object was claimed by the GC?
[13:15:26] apeiros: then they get gc'ed and your weakhash won't return them
[13:15:42] apeiros: weakref_alive?
[13:16:16] justinfaler: has joined #ruby
[13:16:21] apeiros: so the bit of logic you need to implement is: compact your hash, test whether weakref is alive upon returning, store new object if no entry is there or entry is dead
[13:16:30] apeiros: (not necessarily in that order :D)
[13:16:43] dminuoso: Or you know.. pick a language with intrinsic immutability.. then you dont need to act as if two kind of equal objects are equal :D
[13:16:43] apeiros: I think I'd implement compacting on write accesses
[13:17:09] apeiros: those languages don't necessarily guarantee deduplication either, though
[13:17:26] dminuoso: No but they can do it transparently behind the scenes and be correct.
[13:18:40] dminuoso: apeiros: And for general interactions its not uncommon to represent lists as RB trees for example under the hood.
[13:19:01] dminuoso: (It's kind of necessary to make mutation of a single element in a large array not backfire)
[13:19:27] apeiros: so they alter basic assumptions of runtimes?
[13:19:45] dminuoso: apeiros: what assumptions would that be?
[13:20:10] apeiros: I mean I expect array push/pop to be O(1), inserting in the middle to be O(n). both don't hold if it's really an RB tree
[13:20:17] apeiros: (iirc both would be logn)
[13:20:55] damonf: has joined #ruby
[13:21:14] dminuoso: apeiros: Right. It's O(log n) for mutation and access, and O(1) for appending and removing.
[13:21:32] dminuoso: apeiros: Though you usually pick relatively broad trees, making it log32 n for example.
[13:21:47] apeiros: huh? do I misremember? rbtrees are logn for add/remove, no?
[13:21:56] shinnya: has joined #ruby
[13:22:36] dminuoso: apeiros: only worst case.
[13:22:51] dminuoso: apeiros: also its not about mutating the actual tree.
[13:22:56] dminuoso: apeiros: the main idea comes from structural sharing.
[13:23:10] apeiros: "only worst case" isn't exactly how O notation works
[13:24:25] apeiros: also in log32(x) the base is a factor ;-) (log(a)/log(b) = logb(a))
[13:24:38] apeiros: i.e. eliminated in O notation
[13:25:18] dminuoso: apeiros: In the end it's O(1) for appending or removing from the end because of structural sharing.
[13:25:37] dminuoso: You dont actually mutate the tree in place. You just create a new node at the top, that shares some of the old versoin.
[13:25:39] cabotto: has joined #ruby
[13:25:59] govg: has joined #ruby
[13:26:21] apeiros: that makes no sense though
[13:26:31] apeiros: if you always append at the top, your tree becomes unbalanced
[13:26:57] apeiros: i.e. at some point you have to restructure your tree (my terminology may be lacking, it's been over a decade)
[13:27:08] banisterfiend: has joined #ruby
[13:27:37] dminuoso: apeiros: Mmm, probably not RB trees in this case then.
[13:27:56] apeiros: all trees. a linear structure isn't a tree anymore :D
[13:28:11] dminuoso: apeiros: If its not balancing then you dont.
[13:28:33] dminuoso: apeiros: https://image.slidesharecdn.com/clojurescriptintroduction-150823120942-lva1-app6892/95/clojurescript-introduction-13-638.jpg?cb=1440331893
[13:28:50] dminuoso: apeiros: the bottom most row is the actual "list", everything on top is just internal stuff.
[13:29:05] apeiros: iirc not all tree structures require to be balanced, yes. but all require some sort of structure in order to retain their properties. otherwise they become "abartig" (bastardized?)
[13:29:06] dminuoso: Now "appending" means you reference branches from the other tree.
[13:30:29] dminuoso: apeiros: And the reason that appending is O(1), is because you just create a new node with two children. One pointing to the old copy, and one pointing to the new element
[13:30:51] dminuoso: or rather a new tree with two children. one points at the old tree, and the other points at the new element.
[13:30:58] dminuoso: that is constant.
[13:32:49] apeiros: well, even if. some operations will necessarily not hold the promises of an array's complexities.
[13:35:06] John_Ivan: has joined #ruby
[13:35:06] John_Ivan: has joined #ruby
[13:35:13] dminuoso: ACTION sighs
[13:35:15] dminuoso: uninitialized constant OCIError
[13:36:35] Sylario: has joined #ruby
[13:36:40] hahuang65: has joined #ruby
[13:36:50] marmorkreb: has joined #ruby
[13:37:06] dminuoso: apeiros: Do you have any idea why code reload is not triggering on my cell views anymore?
[13:37:22] dminuoso: Changes in ruby files are picked up, but changes to my cell slim files not.
[13:37:42] dminuoso: Dont even know how to debug this.
[13:37:58] oetjenj: has joined #ruby
[13:42:16] tomphp: has joined #ruby
[13:43:25] ferox: has joined #ruby
[13:44:11] sonOfRa: has joined #ruby
[13:44:15] nowhere_man: has joined #ruby
[13:46:15] apeiros: dminuoso: rails? no idea. I try to stay away as far as possible from rails interna
[13:46:32] dminuoso: All I did was do this high sierra upgrade... =/
[13:48:07] tomphp: has joined #ruby
[13:50:05] tcopeland: has joined #ruby
[13:51:00] workmad3: has joined #ruby
[13:51:30] marmorkreb: has joined #ruby
[13:52:06] oetjenj: has joined #ruby
[13:55:22] justinfaler: has joined #ruby
[13:56:18] cschneid: has joined #ruby
[14:00:00] mikecmpbll: ugh, this issue is twisting my melon.
[14:00:28] mikecmpbll: hash.key?(obj) => false
[14:00:34] mikecmpbll: hash.keys.first == obj => true
[14:00:42] milardovich: has joined #ruby
[14:00:53] apeiros: == and eql? are not the same
[14:00:56] apeiros: >> 1.0 == 1
[14:00:57] ruby[bot]: apeiros: # => true (https://eval.in/951633)
[14:01:02] apeiros: >> 1.0.eql?(1)
[14:01:03] ruby[bot]: apeiros: # => false (https://eval.in/951634)
[14:01:34] jcalla: has joined #ruby
[14:01:36] apeiros: i.e., == is "comparative equality". and 1.0 <=> 1 # => 0, therefore 1.0 == 1
[14:02:00] mikecmpbll: sorry, hash.keys.first.eql?(obj) => true
[14:02:02] mikecmpbll: it's an activerecord obj so the methods are actually the same.
[14:02:16] apeiros: did you mutate your key?
[14:02:25] mikecmpbll: between the two debugs? no
[14:02:28] apeiros: what gives hash.rehash.key?(obj) ?
[14:02:50] apeiros: also broken #hash implementation could cause this
[14:03:02] apeiros: i.e. a.eql?(b) # => true, but a.hash == b.hash # => false
[14:03:13] mikecmpbll: let me check both them
[14:03:25] mikecmpbll: hash.rehash.key?(obj) => true
[14:03:33] apeiros: that means it's been mutated
[14:04:00] apeiros: don't use mutable hash keys ;-)
[14:04:15] mikecmpbll: no idea what's mutating it.
[14:04:32] apeiros: freeze it and see
[14:04:58] apeiros: might have to manually "deep" freeze it
[14:05:56] apeiros: depending on what you do, you can also just switch your hash to use object identity
[14:06:05] apeiros: then eql? and hash no longer matter
[14:06:26] apeiros: Hash#compare_by_identity
[14:06:34] cabotto: has joined #ruby
[14:06:36] alfiemax: has joined #ruby
[14:06:44] jokke: apeiros: yeah i did it like this: https://p.jokke.space/xzL/
[14:06:58] jokke: not sure why i write dedup with double p :D
[14:07:15] jokke: ignore the Vertex class
[14:07:23] apeiros: jokke: yepp, that means you have god-objects now.
[14:07:36] jokke: apeiros: yeah
[14:08:04] jokke: apeiros: but it's for parsing close to millions of lines of highly duplicated data
[14:09:44] yonahw: has joined #ruby
[14:09:48] apeiros: jokke: your eql? is broken
[14:10:03] apeiros: there's a reason you have to implement both, #hash *and* #eql?
[14:10:26] cabotto: has joined #ruby
[14:10:29] jokke: hash defines the bucket
[14:10:33] jokke: not equality
[14:10:50] apeiros: and your #hash impl is brittle
[14:11:14] apeiros: an obj with @a = 1, @b = 2 will produce the same hash as one with @x = 1 and @z = 2
[14:11:14] cdg: has joined #ruby
[14:12:28] cdg: has joined #ruby
[14:13:00] mikecmpbll: <3 apeiros. thanks, would've taken me forever to get there!
[14:13:06] apeiros: IMO do something like: def _dedup_data; {klass: self.class.name, **instance_variables.map { |n| [n, instance_variable_get(n)] }.to_h}; end
[14:13:13] cdg: has joined #ruby
[14:13:14] apeiros: and then implement both hash and eql in terms of it
[14:13:37] marmorkreb: has joined #ruby
[14:13:56] apeiros: (_dedup_data.hash, and _dedup_data.eql?(other._dedup_data) - perfect opportunity for `protected` btw., which is rare enough :D)
[14:14:16] dminuoso: I dont even know what protected does.
[14:14:20] dminuoso: Never seen it anywhere.
[14:14:26] apeiros: it protects you!
[14:14:32] dminuoso: From myself?
[14:14:45] apeiros: no idea. but the name says so!
[14:14:55] apeiros: it means only objects of the same class can call it
[14:15:11] dminuoso: Surely I can bypass that with .send
[14:15:15] dminuoso: If not, I have a Fiddle waiting.
[14:15:23] jasonr: has joined #ruby
[14:17:44] coops: has joined #ruby
[14:19:01] gnufied: has joined #ruby
[14:20:34] cdg_: has joined #ruby
[14:22:34] tomphp: has joined #ruby
[14:23:21] alfiemax: has joined #ruby
[14:26:20] brendan-: has joined #ruby
[14:29:37] justinfaler: has joined #ruby
[14:32:11] gnufied: has joined #ruby
[14:32:13] _aeris_: has joined #ruby
[14:35:18] tomphp: has joined #ruby
[14:36:56] cschneid: has joined #ruby
[14:38:05] doublemalt_: has joined #ruby
[14:38:39] oetjenj: has joined #ruby
[14:39:38] hahuang65: has joined #ruby
[14:45:35] za1b1tsu: has joined #ruby
[14:52:35] cabotto: has joined #ruby
[14:53:06] tomphp: has joined #ruby
[14:59:23] LastWhisper____: has joined #ruby
[15:04:05] cadillac_: has joined #ruby
[15:05:11] krawchyk: has joined #ruby
[15:06:07] alfiemax: has joined #ruby
[15:07:51] oetjenj: has joined #ruby
[15:07:53] justinfaler: has joined #ruby
[15:09:40] tomphp: has joined #ruby
[15:12:41] cschneid: has joined #ruby
[15:13:21] moei: has joined #ruby
[15:13:49] rabajaj: has joined #ruby
[15:16:53] schneide_: has joined #ruby
[15:19:00] tomphp: has joined #ruby
[15:19:12] schneide_: has joined #ruby
[15:20:01] yohji: has joined #ruby
[15:21:51] Rapture: has joined #ruby
[15:22:09] cabotto: has joined #ruby
[15:23:09] jokke: apeiros: https://p.jokke.space/2pJAt9/
[15:24:20] apeiros: partially. your memoizing of the results means it'll break when an object is mutated.
[15:24:32] dminuoso: Who mutates anyway.
[15:24:33] jokke: it won't be
[15:24:40] dminuoso: jokke: Is ivar sufficient? What about constants?
[15:24:58] jokke: can i assign constants in methods?
[15:25:24] jokke: FOO ||= 'bar' won't really work, will it :P
[15:28:38] jokke: can i somehow auto-freeze every object that's being initialized of a class that implements Dedupable
[15:28:56] dminuoso: jokke: Mmm, well it'd have to be about constants in each objects singleton class.
[15:29:03] dminuoso: Since constants reside in classes/modules.
[15:29:26] dminuoso: Kind of depends on how generally applicable you want your module to work.
[15:29:59] dminuoso: And I have not seen constants in an objects singleton class to be abused as instance variable yet..
[15:32:57] damonf: has joined #ruby
[15:33:31] hahuang65: has joined #ruby
[15:37:34] John_Ivan: has joined #ruby
[15:37:34] John_Ivan: has joined #ruby
[15:38:27] tomphp: has joined #ruby
[15:39:03] deathwishdave: has joined #ruby
[15:39:26] aguestuser: has joined #ruby
[15:39:41] oleo: has joined #ruby
[15:43:37] aguestuser: has joined #ruby
[15:46:11] oetjenj: has joined #ruby
[15:47:38] pastorinni: has joined #ruby
[15:48:14] jordanm: has joined #ruby
[15:49:28] marmorkreb: has joined #ruby
[15:49:32] justinfaler: has joined #ruby
[15:50:00] milardovich: has joined #ruby
[15:51:48] workmad3: has joined #ruby
[15:53:02] rippa: has joined #ruby
[15:54:07] nowhere_man: has joined #ruby
[15:54:16] jrafanie: has joined #ruby
[16:02:37] cschneid: has joined #ruby
[16:03:31] schneide_: has joined #ruby
[16:06:57] schneide_: has joined #ruby
[16:08:16] troys: has joined #ruby
[16:09:47] AJA4350: has joined #ruby
[16:20:48] yohji: has joined #ruby
[16:21:21] zautomata: has joined #ruby
[16:21:38] Olipro: has joined #ruby
[16:21:47] zautomata: has joined #ruby
[16:22:06] damon: has joined #ruby
[16:22:09] krawchyk: has joined #ruby
[16:23:47] workmad3: has joined #ruby
[16:24:27] justinfaler: has joined #ruby
[16:26:46] tomphp: has joined #ruby
[16:28:13] apeiros_: has joined #ruby
[16:28:47] alfiemax: has joined #ruby
[16:31:45] _aeris_: has joined #ruby
[16:33:28] bigblind: has joined #ruby
[16:37:30] hahuang65: has joined #ruby
[16:39:48] dionysus69: has joined #ruby
[16:47:36] rrutkowski: has joined #ruby
[16:48:49] jaruga_: has joined #ruby
[16:51:36] rrutkowski: has joined #ruby
[16:52:34] oetjenj: has joined #ruby
[16:54:54] cdg: has joined #ruby
[16:55:53] conta: has joined #ruby
[17:00:18] tomeaton17: has joined #ruby
[17:01:24] cdg: has joined #ruby
[17:01:41] tomeaton17: I don't work with ruby, but trying to install an old codebase on new hardware. Running bundle install errors on the eventmachine install, which is required by em-http-request, but is also installed on its on in the Gemfile. When I install gem install eventmachine manually it works with version 1.2.5, but when it tries to install version 1.0.3 due to the dependcy it fails. How do I get it to install version
[17:01:53] hfp_work: has joined #ruby
[17:02:06] justinfaler: has joined #ruby
[17:02:19] cdg: has joined #ruby
[17:03:00] cdg_: has joined #ruby
[17:05:52] UKn0Me: has joined #ruby
[17:10:52] bigblind: has joined #ruby
[17:14:36] nowhereman_: has joined #ruby
[17:19:43] jamesaxl: has joined #ruby
[17:21:48] guacamole: has joined #ruby
[17:21:48] guacamole: has joined #ruby
[17:23:21] Rebus: has joined #ruby
[17:24:48] oetjenj: has joined #ruby
[17:25:11] Rebus: Good Eveninn. I was wondering whether it is possible to deconstruct an array of hashes while iterating it, e.g. [ { :a :b } ].each do |k,v| . Unfortunately this does not seem to work. Someone have a suggestion.
[17:26:11] eam: Rebus: you want to iterate each pair?
[17:27:02] raynold: has joined #ruby
[17:27:15] Rebus: eam: yes. I can do that with an array of arrays but unfortunately not with an array of hashes :-/
[17:27:30] eam: #each_pair will iterate pairs
[17:28:43] darkhanb: has joined #ruby
[17:29:47] n13z: has joined #ruby
[17:30:42] ur5us: has joined #ruby
[17:33:26] LastWhisper____: has joined #ruby
[17:34:13] hahuang65: has joined #ruby
[17:34:40] Rebus: eam: this seems to work on hashes only, but i have an array of hashes over which i want to iterate
[17:38:06] milardovich: has joined #ruby
[17:38:23] eam: Rebus: I think I'm not understanding what you want to do
[17:40:21] shinnya: has joined #ruby
[17:40:49] Rebus: eam: So I can do something like this [ [a,b], [c,d] ].each { |k,v| puts "#{k} = #{v}" }. But not [ {a: b}, {c: d} ].each { |k,v| puts "#{k} = #{v}" } and I was wondering If there is a way without having to resort to a second loop
[17:42:10] anisha: has joined #ruby
[17:42:17] doublemalt_: has joined #ruby
[17:42:17] bigblind: has joined #ruby
[17:46:48] justinfaler: has joined #ruby
[17:47:50] stormpack: has joined #ruby
[17:48:15] snath: has joined #ruby
[17:48:20] tvw: has joined #ruby
[17:49:16] zigzig: @Rebus, you could convert the hash to pairs first: [ { a: 1, b: 2}, { a: 3, b: 4} ].map(&:to_a).each { |(pair1, pair2)| ... }
[17:50:35] milardovich: has joined #ruby
[17:50:39] ur5us: has joined #ruby
[17:51:25] ledestin: has joined #ruby
[17:51:55] hahuang65: has joined #ruby
[17:52:26] yohji: has joined #ruby
[17:54:16] dviola: has joined #ruby
[17:58:14] miskatonic: has joined #ruby
[17:58:15] Rebus: zigzig: That did the trick. Thanks.
[17:58:34] Rebus: Though I had to tune it a little: [ {a: 'b'}, {c: 'd'} ].map(&:to_a).flatten(1).each { |k,v| puts "#{k} = #{v}" }
[17:59:05] Rebus: otherwise I get an array of arrays of arrays and that ends up in k
[18:00:28] sanscoeur: has joined #ruby
[18:01:01] apeiros_: honestly, I'd just nest two each'es
[18:01:14] apeiros_: ary.each do |hash| hash.each do |k,v| … end; end
[18:01:16] dviola: has joined #ruby
[18:02:43] alfiemax: has joined #ruby
[18:03:26] Rebus: I did but then wondered why it did not work the same way as with an array of arrays - seems there is some magic hidden beneath the array class I'll have to dig up to find an answer to that
[18:04:42] bigblind: has joined #ruby
[18:06:41] apeiros_: {a: 'b'} does not expand to [:a, 'b'] but to [[:a, 'b']]
[18:10:55] ramfjord: has joined #ruby
[18:15:52] eckhardt: has joined #ruby
[18:16:48] white_lilies: has joined #ruby
[18:17:38] apeiros: though that's actually the less important reason. the more important reason is that ruby can splat arrays, and even automatically does that under certain circumstances. it doesn't splat hashes, though
[18:17:48] guacamole: has joined #ruby
[18:17:48] guacamole: has joined #ruby
[18:19:51] Asher: has joined #ruby
[18:20:42] [Butch]: has joined #ruby
[18:24:02] clemens3: has joined #ruby
[18:24:25] chouhoulis: has joined #ruby
[18:25:04] drewmcmillan: has joined #ruby
[18:26:19] ur5us: has joined #ruby
[18:26:24] justinfaler: has joined #ruby
[18:26:56] KeyJoo: has joined #ruby
[18:29:15] Rebus: it can with ** though. I just doesn't do so automatically :-/
[18:30:59] zigzig: has joined #ruby
[18:34:47] quobo: has joined #ruby
[18:36:39] bigblind: has joined #ruby
[18:37:14] Lytol: has joined #ruby
[18:39:14] claudiuinberlin: has joined #ruby
[18:46:10] jeffreylevesque: has joined #ruby
[18:46:35] za1b1tsu: has joined #ruby
[18:47:09] TomyLobo: has joined #ruby
[18:49:09] lxsameer: has joined #ruby
[18:50:23] dextrey: has joined #ruby
[18:53:27] kies: has joined #ruby
[18:54:06] workmad3: has joined #ruby
[18:54:58] Papierkorb: has joined #ruby
[19:00:20] goatish: has joined #ruby
[19:03:54] vutral|kali: has joined #ruby
[19:03:55] vutral|kali: has joined #ruby
[19:05:32] justinfaler: has joined #ruby
[19:05:36] hfp_work: has joined #ruby
[19:07:57] Papierkorb: has left #ruby: ("Konversation terminated!")
[19:18:01] ramfjord: has joined #ruby
[19:22:39] tomphp: has joined #ruby
[19:25:38] Cthulu201: has joined #ruby
[19:25:45] cdg: has joined #ruby
[19:28:33] ramfjord: has joined #ruby
[19:30:16] guacamole: has joined #ruby
[19:30:16] guacamole: has joined #ruby
[19:34:37] ramfjord: has joined #ruby
[19:34:40] white_lilies: has joined #ruby
[19:37:46] schneide_: has joined #ruby
[19:39:48] jcalla: has joined #ruby
[19:40:33] ramfjord: has joined #ruby
[19:43:44] ldepandis: has joined #ruby
[19:45:12] justinfaler: has joined #ruby
[19:46:34] ramfjord: has joined #ruby
[19:50:15] TvL2386_: has joined #ruby
[19:52:40] mtkd: has joined #ruby
[19:59:47] guacamole: has joined #ruby
[20:00:03] guacamole: has joined #ruby
[20:00:46] anisha: has joined #ruby
[20:02:32] banisterfiend: has joined #ruby
[20:04:31] rwb: has joined #ruby
[20:06:49] graft: anyone played around with the OpenSSL class much?
[20:06:50] bigblind: has joined #ruby
[20:07:14] Dimik: has joined #ruby
[20:07:28] graft: i'm trying to use OpenSSL::PKey.read(File.read(filename)) but it doesn't seem to work - meanwhile, OpenSSL::PKey::RSA.new(File.read(filename)) works fine
[20:08:02] graft: i get the error 'no start line', which i don't understand
[20:09:46] troulouliou_div2: has joined #ruby
[20:10:16] ecuanaso: has joined #ruby
[20:10:33] krawchyk: has joined #ruby
[20:13:04] atchoum: has joined #ruby
[20:13:41] jamesaxl: has joined #ruby
[20:18:05] nowhere_man: has joined #ruby
[20:21:29] banisterfiend: has joined #ruby
[20:22:12] justinfaler: has joined #ruby
[20:24:20] jasoncx: has joined #ruby
[20:26:34] elphe: has joined #ruby
[20:31:08] guacamole: has joined #ruby
[20:31:08] guacamole: has joined #ruby
[20:31:52] haylon: has joined #ruby
[20:32:22] banisterfiend: has joined #ruby
[20:33:33] milardovich: has joined #ruby
[20:36:06] cdg: has joined #ruby
[20:36:41] cdg: has joined #ruby
[20:37:01] jamesaxl: has joined #ruby
[20:38:59] guacamole: has joined #ruby
[20:38:59] guacamole: has joined #ruby
[20:39:07] eckhardt: has joined #ruby
[20:42:05] sergio_101: has joined #ruby
[20:43:08] c0ncealed: has joined #ruby
[20:45:04] milardovich: has joined #ruby
[20:46:54] pastorinni: has joined #ruby
[20:49:25] SuperLag: has joined #ruby
[20:53:36] banisterfiend: has joined #ruby
[20:53:39] woodruffw: has joined #ruby
[20:53:40] woodruffw: has joined #ruby
[20:53:40] nowhere_man: has joined #ruby
[20:59:39] x77686d: has joined #ruby
[21:00:20] d^sh: has joined #ruby
[21:00:30] _haylon: has joined #ruby
[21:01:14] atchoum: has joined #ruby
[21:03:33] brendan-: has joined #ruby
[21:07:59] milardovich: has joined #ruby
[21:14:30] schneide_: has joined #ruby
[21:14:33] amirite: has joined #ruby
[21:14:49] tomphp: has joined #ruby
[21:15:42] RougeR: has joined #ruby
[21:15:42] RougeR: has joined #ruby
[21:15:43] erlend: has joined #ruby
[21:15:58] amirite: I've got a string "\xfb", if I print it I see the byte as I expect to (a weird non-ascii character). What I want to know is how do I go from '\xfb' to "\xfb", because I'm trying to concatenante "\x" with the hex code and have it interpreted to the intended encoded character
[21:16:32] amirite: if i try to gsub(/(..)/, '\x\1') I end up with a literal string, but I need that \1 capture escaped into the \x
[21:19:38] workmad3: has joined #ruby
[21:20:41] havenwood: >> "fbff".scan(/../).map(&:hex).map(&:chr).join
[21:20:42] ruby[bot]: havenwood: # => "\xFB\xFF" (https://eval.in/951917)
[21:21:21] fmccann: has joined #ruby
[21:23:16] havenwood: >> ["fbff"].pack("H*")
[21:23:17] ruby[bot]: havenwood: # => "\xFB\xFF" (https://eval.in/951918)
[21:23:35] graft: wow, pack, forgot all about that
[21:28:17] aintno_sunshine: has joined #ruby
[21:29:28] jasonr: has joined #ruby
[21:29:53] ramfjord: has joined #ruby
[21:35:05] n0m4d1c: has joined #ruby
[21:36:56] Vapez: has joined #ruby
[21:37:58] weathermaker: has joined #ruby
[21:42:53] McSoFake: has joined #ruby
[21:45:33] white_lilies: has joined #ruby
[21:47:35] Emmanuel_Chanel: has joined #ruby
[21:47:45] jasoncx: has joined #ruby
[21:48:26] justache: has left #ruby: ()
[21:49:56] minimalism: has joined #ruby
[21:52:12] white_lilies: has joined #ruby
[21:54:44] mrshark: has joined #ruby
[21:55:14] mrshark: This is definitely more of a rails question, but does anyone know how to identify what file sprockets will resolve a `require` to?
[21:55:28] mrshark: Been googling around for quite a while and have yet to find anything
[21:57:29] mtkd: has joined #ruby
[21:59:38] jasonr: has joined #ruby
[22:03:11] angrywombat: has joined #ruby
[22:03:32] angrywombat: has left #ruby: ()
[22:06:10] mrshark: has left #ruby: ()
[22:07:39] bigblind: has joined #ruby
[22:09:55] x77686d: has joined #ruby
[22:13:56] nowhere_man: has joined #ruby
[22:14:31] tAn: has joined #ruby
[22:15:28] x77686d: has joined #ruby
[22:21:01] workmad3: has joined #ruby
[22:22:03] white_lilies: has joined #ruby
[22:22:05] RougeT430: has joined #ruby
[22:22:57] banisterfiend: has joined #ruby
[22:23:32] n0m4d1c: has joined #ruby
[22:24:02] justinfaler: has joined #ruby
[22:24:29] jeffreylevesque: has joined #ruby
[22:33:02] jokke: has joined #ruby
[22:41:56] chouhoulis: has joined #ruby
[22:45:00] npgm: has joined #ruby
[22:45:26] PaulCapestany: has joined #ruby
[22:45:41] FrostCandy: has joined #ruby
[22:46:18] swills: has joined #ruby
[22:47:42] guacamole: has joined #ruby
[22:47:42] guacamole: has joined #ruby
[22:52:34] nchambers: i have a bundle of ca certificates written in PEM format to a file. Is there an easy way to turn each of these certificates into an array of OpenSSL::X509::Certificate objects?
[22:54:38] graft: you probably have to split the strings
[22:56:11] nchambers: im hoping to avoid that, so im keeping it as a backup plan
[22:56:30] graft: maybe split on /(?<=-----)\n(?=-----)/
[22:56:42] graft: or some such
[22:58:29] graft: if you're hoping for an openssl method i don't think there is one
[23:01:56] nchambers: split it is then
[23:03:49] jottr: has joined #ruby
[23:09:08] nowhereman_: has joined #ruby
[23:11:06] hahuang61: has joined #ruby
[23:12:09] eckhardt: huh i didn't know about Array#pack. That is slick.
[23:13:38] mniip: has joined #ruby
[23:13:46] cdg: has joined #ruby
[23:15:11] drewmcmillan: has joined #ruby
[23:15:42] jrafanie: has joined #ruby
[23:21:39] orbyt_: has joined #ruby
[23:30:53] xcyclist: has joined #ruby
[23:31:41] xcyclist: I am trying http://sciruby.com/blog/2014/08/23/nyaplot-interactive-plots-generateor-with-ruby/, and I wonder if there is any reasonably simple way to have the output go to a separate window while running this from a terminal, as I am a vi guy.
[23:38:31] tcopeland: has joined #ruby
[23:39:34] xcyclist: I would really like a general purpose plotter that I can get jpg, png, pdf and ps files out of, if not others.
[23:42:48] white_lilies: has joined #ruby
[23:43:32] xcyclist: Looks like gruff does it. That and gnuplot will probably keep me satisfied. However, as nyaplot is part of sciruby, and sciruby is presumably trying to be like the science stuff in python, it would be nice to be able to do that from a terminal.
[23:48:30] snath: has joined #ruby
[23:49:44] cdg: has joined #ruby
[23:52:22] amirite: has joined #ruby
[23:52:38] x77686d_: has joined #ruby
[23:55:22] chet: has joined #ruby
[23:57:10] justache: has joined #ruby
[23:57:52] chet: Hi, am a RoR newbie, our webserver is behind a rev proxy and after authentication, the redirect url is that of the webserver instead of the rev proxy ip. am looking for help in fixing this.