« Back to channel list

#ruby - 06 July 2016

« Back 1 day Forward 1 day »
[00:00:18] mistermo_: has joined #ruby
[00:00:21] jhass: shevy: but then I'm also the only one to actually link to the actually official docs from time to time
[00:00:21] al2o3-cr: shevy: why'd you think docs suck?
[00:01:10] shevy: al2o3-cr a mix of everything, layout, content, style
[00:01:34] al2o3-cr: layout, style?
[00:02:11] al2o3-cr: i think it's pretty damn fine
[00:02:14] shevy: hmm let me find an example with devdoc
[00:03:00] shevy: http://devdocs.io/ruby~2.3/string versus http://ruby-doc.org/core-2.3.1/String.html
[00:03:16] al2o3-cr: that's devdocs
[00:03:34] al2o3-cr: my preference is the latter
[00:03:40] shevy: yeah. the devdocs variant looks a lot cleaner here
[00:04:07] shevy: ruby-doc has here on my screen like: 30% blank, 40% content, 30% blank
[00:05:22] shevy: I'll do screenshots
[00:06:32] JeanCarloMachado: has joined #ruby
[00:07:19] shevy: http://shevegen.square7.ch/devdocs-ruby.png versus http://shevegen.square7.ch/ruby-doc.png
[00:08:03] shevy: actually the second has a better drop-down middle list for the intralinks to the methods
[00:08:19] shevy: good design is hard!
[00:09:09] al2o3-cr: to much bloat in devdocs, that is all
[00:09:39] Bira: has joined #ruby
[00:09:41] arooni-mobile: has joined #ruby
[00:10:28] al2o3-cr: nothing in devdoc that isn't in ruby-doc
[00:10:51] gopz: has joined #ruby
[00:12:16] Beverage1: has joined #ruby
[00:12:39] al2o3-cr: besides the point
[00:14:14] flashpoint9: has joined #ruby
[00:14:37] al2o3-cr: shevy: say i was an object, i'd like to prepend all the good and extend all the shit
[00:15:32] KCmetro: has joined #ruby
[00:16:06] al2o3-cr: which is impossible in real life
[00:17:42] karapetyan: has joined #ruby
[00:18:23] gopz: When making a gem, do I put all of the public methods in "lib/<gem_name>.rb"?
[00:18:27] flashpoint9: I am doing Ruby Koans https://gist.github.com/JosephLeon/4a4b9f0240b00febf319515f5da5502c, Im not completely understanding the point of this exercise.
[00:18:42] CharlesN: has joined #ruby
[00:18:52] leea: so i'm learning how to use modules, and this one thing I'm reading says to make modules accept parameters that are already expected to be defined in classes that the modules are included in, is there a reason for this?
[00:19:39] leea: gopz I would say it depends
[00:19:42] flashpoint9: I think that hash = Hash.new([]) will make [] the default but im not understanding what the point is or why adding stuff to this hash always returns EVERYTHING
[00:19:48] kavanagh: has joined #ruby
[00:19:48] gopz: lees on what?
[00:20:38] al2o3-cr: flashpoint9: you're making it a default array
[00:21:02] leea: gopz what are you trying to do? I've seen some gems where the lib/<gem_name>.rb is just a file that includes other files, as to add better file organization
[00:21:19] leea: gopz this is just 1 example https://github.com/yatish27/linkedin-scraper/blob/master/lib/linkedin-scraper.rb
[00:21:22] flashpoint9: al2o3-cr: whats the point though, this exercise just confused me. Im lost on the purpose
[00:21:47] flashpoint9: I did pick up that im making the default value of the hash an array
[00:22:05] ghr: has joined #ruby
[00:22:11] pawnbox: has joined #ruby
[00:22:22] gopz: leea, yes that's what i'm wondering, I have also seen it used just to require files, but if i do something like `include <gem>` it is going to look for the methods it should include somewhere an my question is where is it looking
[00:22:25] UnKnOwN|: has joined #ruby
[00:22:27] shevy: al2o3-cr you only have to modify your DNA, then you can be a zebra or a turtle!
[00:22:28] flashpoint9: just dont see what its for, or why it always returns all values
[00:23:00] leea: can you rephrase what you wrote, I'm not quite sure I understand
[00:23:19] al2o3-cr: shevy: not in your lifetime :p
[00:23:28] flashpoint9: Found this http://stackoverflow.com/questions/9343680/how-does-shovel-operator-work-in-ruby-hashes
[00:23:42] cdg: has joined #ruby
[00:24:13] rkazak: has joined #ruby
[00:24:14] gopz: leea, yes, sorry that was not very clear, essentially I'm just wondering what `include <gem>` actually includes. Does it just include all public methods for every class that you require in `lib/<gem_name>`
[00:24:23] postmodern: has joined #ruby
[00:24:31] hahuang61: has joined #ruby
[00:24:32] al2o3-cr: flashpoint9: what you not grasping?
[00:24:34] openstruct: has joined #ruby
[00:24:41] leea: include or require?
[00:24:55] arooni-mobile: has joined #ruby
[00:25:01] flashpoint9: al2o3-cr: what good is this for?
[00:25:15] al2o3-cr: many things << flashpoint9
[00:26:18] al2o3-cr: flashpoint9: << is just appendind to an array or `push`
[00:26:32] al2o3-cr: plush me, never
[00:27:05] al2o3-cr: >> [1,2].push 0
[00:27:06] ruby[bot]: al2o3-cr: # => [1, 2, 0] (https://eval.in/600960)
[00:27:15] flashpoint9: Yes I know what the << is for, to get a value into an array, wait, so the array is the default value and the << is pushing values into the array, so calling anything on the hash defaults to that array?
[00:27:41] flashpoint9: and thats why calling any key returns the entire array?
[00:28:13] al2o3-cr: whey, hey :P
[00:28:56] flashpoint9: al2o3-cr: am I understanding it correctly or am I way off? I actually want to understand whats happening
[00:29:45] flashpoint9: Yea im pretty sure I understand now
[00:31:23] al2o3-cr: >> h = Hash.new(""); h[:a] << 87
[00:31:25] ruby[bot]: al2o3-cr: # => "W" (https://eval.in/600962)
[00:31:56] al2o3-cr: >> h = Hash.new([]); h[:a] << 1
[00:31:57] ruby[bot]: al2o3-cr: # => [1] (https://eval.in/600964)
[00:33:23] al2o3-cr: >> h = Hash.new(45); h[:a] += 90
[00:33:24] ruby[bot]: al2o3-cr: # => 135 (https://eval.in/600966)
[00:34:35] ghr: has joined #ruby
[00:35:14] gopz: has joined #ruby
[00:35:20] al2o3-cr: >> h = Hash.new({}); h[:a] = {a: 1}
[00:35:21] ruby[bot]: al2o3-cr: # => {:a=>1} (https://eval.in/600969)
[00:35:44] gopz: leea, 'include'
[00:36:30] al2o3-cr: h = {a: 1}; {c: 3, **h}
[00:36:34] al2o3-cr: >> h = {a: 1}; {c: 3, **h}
[00:36:35] ruby[bot]: al2o3-cr: # => {:c=>3, :a=>1} (https://eval.in/600970)
[00:36:53] al2o3-cr: >> h = {a: 1}; {c: 3, **h}.sort
[00:36:54] ruby[bot]: al2o3-cr: # => [[:a, 1], [:c, 3]] (https://eval.in/600971)
[00:37:04] UnKnOwN|: has joined #ruby
[00:37:30] flashpoint9: nice, copying all that
[00:39:53] al2o3-cr: flashpoint9: sometimes examples are better then explaining
[00:40:10] flashpoint9: yea Im studying them now, thanks again!
[00:41:08] al2o3-cr: flashpoint9: no worries, you'll like ruby :)
[00:41:52] calmchaos: has joined #ruby
[00:41:56] leea: gopz I thought you're supposed to require gems, right?
[00:42:14] leea: and include is for modules
[00:43:42] arescorpio: has joined #ruby
[00:44:28] tAn: has joined #ruby
[00:44:30] al2o3-cr: flashpoint9: anything you don't understand don't hesitate to ask
[00:45:05] arooni-mobile: has joined #ruby
[00:45:23] flashpoint9: al2o3-cr: Awesome thanks so much
[00:45:31] weaksauce: has joined #ruby
[00:45:50] gopz: leea, but then how do things like rspec just work without having to do something like "rspec.new.it 'does something'"
[00:45:51] al2o3-cr: if you don't ask you'll never know
[00:46:05] jhass: gopz: you don't commonly "include gems" (or more correct, a module they provide), that's just an (IMO anti-) pattern things like httparty made popular
[00:46:23] jhass: but not all that popular luckily
[00:46:39] gopz: jhass, I see, but then how do you define a mini dsl like rspec does
[00:46:52] jhass: rspec is another special case, there's actually a config setting for it to not add things to the toplevel
[00:47:06] ghr: has joined #ruby
[00:47:12] al2o3-cr: gopz: it's all in instance_eval :p
[00:47:26] jhass: and then the toplevel call indeed would become RSpec.describe
[00:47:40] jhass: in fact you can do that either way
[00:47:51] al2o3-cr: well almost
[00:49:13] jhass: gopz: I would recommend you try to define it inside something like MyGem.do_stuff do first, if you succeed that far we can talk about the best place to add do_stuff to, in which situations
[00:49:25] swills: has joined #ruby
[00:49:34] jhass: include at the toplevel is basically the same as class Object; include Foo; end;
[00:49:44] jhass: Kernel is another place
[00:49:59] allcentury: has joined #ruby
[00:50:08] gopz: jhass, I see, I will do this, thank you all
[00:50:12] leea: is this bad style for modules? https://gist.github.com/drwl/9d6dffff7a9e8aace0083ae288d377b0
[00:50:40] leea: the fact that it depends on the existence of instance variables for the classes/modules it gets included?
[00:50:48] al2o3-cr: >> class Object; def m; 42 end; {}.m
[00:50:49] ruby[bot]: al2o3-cr: # => /tmp/execpad-d7fe97f98122/source-d7fe97f98122:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/600972)
[00:51:02] al2o3-cr: >> class Object; def m; 42 end; "".m
[00:51:03] ruby[bot]: al2o3-cr: # => /tmp/execpad-2ccb6a46b24f/source-2ccb6a46b24f:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/600973)
[00:51:19] ohcibi: has joined #ruby
[00:51:46] jhass: leea: you can move the attr_accessor into the module, all it does is define methods
[00:52:45] leea: yeah i know, i was just wondering if it's bad style for module methods to rely on instance variables already defined. Because I'm following this ruby tutorial and it shows not to do this, in that finish would take a parameter instead of using @complete
[00:52:46] jhass: in general it can get hard to understand quickly, but it's not unseen or entirely unreasonable
[00:53:10] rickmasta: has joined #ruby
[00:53:23] blackmesa: has joined #ruby
[00:53:42] leea: following our conversation about singleton classes from last week, do included modules add their methods to that singleton class?
[00:54:11] jhass: no, they simply get inserted into .ancestors
[00:54:35] veduardo: has joined #ruby
[00:56:16] amincd: has joined #ruby
[00:56:25] wigust: has joined #ruby
[01:00:47] gopz: has joined #ruby
[01:03:24] mistermocha: has joined #ruby
[01:04:25] al2o3-cr: >> [Integer.superclass, Pointer.to_ptr(Integer.__id__*2)[16,8] = -Pointer.to_ptr(Fixnum.__id__*2), Integer.superclass]
[01:04:26] ekinmur: has joined #ruby
[01:04:26] ruby[bot]: al2o3-cr: # => uninitialized constant Pointer (NameError) ...check link for more (https://eval.in/600974)
[01:04:37] ghr: has joined #ruby
[01:05:15] al2o3-cr: >> require 'fiddle'; [Integer.superclass, Fiddle::Pointer.to_ptr(Integer.__id__*2)[16,8] = -Fiddle::Pointer.to_ptr(Fixnum.__id__*2), Integer.superclass]
[01:05:16] ruby[bot]: al2o3-cr: # => [Numeric, #<Fiddle::Pointer:0x411838f8 ptr=0x411838e0 size=0 free=0x000000>, Numeric] (https://eval.in/600975)
[01:06:24] al2o3-cr: good sandbox
[01:07:19] gopz: Another quick best practices question: If I have a gem that exposes some useful methods to work with certain text files, should the user be able to create a new instance of a class that accepts the files as arguments and returns some object that they can query, or should the user create a new instance for each text file and query that?
[01:07:34] zacts: has joined #ruby
[01:09:30] pawnbox: has joined #ruby
[01:10:42] gopz: so basically should it be m = MyGem.new and then do query_object1 = m.new('test.txt'), query_object2 = m.new("test1.txt") or query_object1 = MyGem.new("test.txt") query_object2 = MyGem.new("test2.txt")
[01:11:54] al2o3-cr: gopz: depends what you want to initialize your object with
[01:12:49] gopz: al2o3-cr the problem is I don't know what I want :/
[01:13:24] al2o3-cr: if you don't know, how is anyone else supposed to know?
[01:13:50] gopz: al2o3-cr well, each seems equally good to me right now so I was hoping someone could tell me which way is better
[01:14:04] Radar: gopz: What does querying look like?
[01:14:44] JeanCarloMachado: has joined #ruby
[01:14:56] gopz: Radar, query_object.non_stop_words, query_objects.non_stop_words(user: 'Gopz')
[01:15:09] gopz: basically just some NLP that you can do by user, by time, etc.
[01:15:22] Radar: gopz: Is that intentionally query_objects in the second example? intentionally a plural?
[01:15:37] gopz: Radar, sorry, no
[01:15:44] gopz: should by query_object
[01:16:03] Radar: gopz: Ok. For this case I would think it's fine to do MyGem.new and that returns a queryable object.
[01:16:26] gopz: Radar, thank you, what makes you say this?
[01:16:34] ekinmur: has joined #ruby
[01:16:47] FrontBog: has joined #ruby
[01:16:54] Radar: gopz: file = NLP::File.new("file.txt")
[01:16:58] Radar: file.stop_words
[01:17:02] Radar: seems fine?
[01:17:07] ghr: has joined #ruby
[01:17:22] KCmetro: has joined #ruby
[01:18:06] jmignault: has joined #ruby
[01:18:38] arooni-mobile: has joined #ruby
[01:19:18] Radar: I can't really foresee any problems with that syntax yet.
[01:19:30] FrontBog: has left #ruby: ()
[01:22:56] ascarter: has joined #ruby
[01:24:08] al2o3-cr: gopz: think about objects as (inanimate:animate: the human body as state i.e:- height, weight, big toes, little fingers; (can you humans swim0; if so how far and why; WHY can others swim further ??????
[01:24:09] arooni-mobile: has joined #ruby
[01:24:35] al2o3-cr: Radar: what, what?
[01:24:41] z3ndrag0n: has joined #ruby
[01:24:49] Radar: That did not make any sense to me.
[01:25:01] al2o3-cr: to me it did
[01:25:59] Ropeney: has joined #ruby
[01:26:20] jenrzzz: has joined #ruby
[01:26:20] jenrzzz: has joined #ruby
[01:26:37] al2o3-cr: Radar: can you get addicted to ruby?
[01:26:41] gopz: has joined #ruby
[01:27:04] ElFerna: has joined #ruby
[01:27:31] freerobby: has joined #ruby
[01:28:09] Rodya_: has joined #ruby
[01:29:11] ghr: has joined #ruby
[01:29:29] roamingdog: has joined #ruby
[01:30:04] Contigi: has joined #ruby
[01:30:06] al2o3-cr: what is underrated apparently
[01:30:24] kobain: has joined #ruby
[01:31:06] Radar: al2o3-cr: tbf it looked like something a markov chain spambot would generate
[01:31:09] leea: has joined #ruby
[01:31:37] shevy: lol big toes
[01:32:55] flashpoint9: has joined #ruby
[01:32:59] prestorium: has joined #ruby
[01:33:10] al2o3-cr: >> [97, 108, 50, 111, 51, 45, 99, 114].pack('U*')
[01:33:11] ruby[bot]: al2o3-cr: # => "al2o3-cr" (https://eval.in/600976)
[01:34:30] enterprisey: has joined #ruby
[01:34:40] CloCkWeRX: has joined #ruby
[01:36:50] al2o3-cr: i'm not that bad
[01:38:56] aryaching: has joined #ruby
[01:39:27] JoshGlzB_: has joined #ruby
[01:41:08] ghr: has joined #ruby
[01:43:43] al2o3-cr: >> require 'fiddle'; Fiddle::Pointer[Fiddle.dlwrap(RUBY_VERSION)][1] &= 8^0xFF; [[RUBY_VERSION].pack('p').unpack('j')[0], Fiddle.dlwrap(RUBY_VERSION)].reverse.inject :-
[01:43:44] ruby[bot]: al2o3-cr: # => 25755560 (https://eval.in/600977)
[01:47:05] JoshGlzBrk: has joined #ruby
[01:47:27] mistermocha: has joined #ruby
[01:47:44] nankyokusei: has joined #ruby
[01:48:30] ruby-lang106: has joined #ruby
[01:49:41] skweek: has joined #ruby
[01:49:42] chipotle: has joined #ruby
[01:51:51] mdih: has joined #ruby
[01:53:09] ghr: has joined #ruby
[01:53:14] KCmetro: has joined #ruby
[01:54:45] blackmesa: has joined #ruby
[02:01:34] mistermo_: has joined #ruby
[02:01:48] macsteps: has joined #ruby
[02:02:14] coffeecupp: has joined #ruby
[02:04:12] allcentury: has joined #ruby
[02:05:40] ghr: has joined #ruby
[02:06:17] rbennacer: has joined #ruby
[02:06:31] karapetyan: has joined #ruby
[02:08:05] chipotle: has joined #ruby
[02:08:14] `tim`: has joined #ruby
[02:09:35] TheWhip: has joined #ruby
[02:11:47] enterprisey: has joined #ruby
[02:13:54] CharlesN: has joined #ruby
[02:14:37] crdpink: has joined #ruby
[02:15:27] polll: has joined #ruby
[02:16:10] ghr: has joined #ruby
[02:17:26] chipotle: has joined #ruby
[02:17:51] pawnbox: has joined #ruby
[02:18:31] pdoherty: has joined #ruby
[02:20:51] mistermocha: has joined #ruby
[02:20:52] spiette: has joined #ruby
[02:21:29] davedev24: has joined #ruby
[02:22:00] arooni-mobile: has joined #ruby
[02:22:41] solocshaw: has joined #ruby
[02:23:17] jishankai: has joined #ruby
[02:23:31] Vingador: has joined #ruby
[02:24:05] coffeecupp: has joined #ruby
[02:25:17] hahuang61: has joined #ruby
[02:25:41] ghr: has joined #ruby
[02:29:48] akira616: has joined #ruby
[02:30:55] agentmeerkat: has joined #ruby
[02:31:23] RegulationD: has joined #ruby
[02:33:35] chouhoulis: has joined #ruby
[02:35:11] ghr: has joined #ruby
[02:35:20] LoneHermit: has joined #ruby
[02:38:40] benlieb: has joined #ruby
[02:39:11] coffeecupp: has joined #ruby
[02:40:41] Neobenedict: has joined #ruby
[02:42:31] interki: has joined #ruby
[02:44:15] SilverKey: has joined #ruby
[02:45:42] ghr: has joined #ruby
[02:46:30] tAn: has joined #ruby
[02:47:55] sarbs: has joined #ruby
[02:49:16] nando293921: has joined #ruby
[02:49:46] nando294021: has joined #ruby
[02:51:18] dasher^0_o: has joined #ruby
[02:52:23] hutch34: has joined #ruby
[02:52:49] calmchaos: has joined #ruby
[02:55:12] pragmatism: has joined #ruby
[02:55:13] leea: so i'm trying to implement a way to delete multiple objects given indices, I'm wondering if there is a better solution than this for checking that the input are valid indexes (indices & (1..@items.length).to_a) == indices
[02:55:44] ghr: has joined #ruby
[02:55:47] blackmesa: has joined #ruby
[02:59:50] leea: on stackoverflow i'm reading that it might be better to convert them into sets (?) http://stackoverflow.com/questions/699448/ruby-how-do-you-check-whether-a-range-contains-a-subset-of-another-range
[03:00:01] Devalo: has joined #ruby
[03:01:52] Radar: ?code leea
[03:01:52] ruby[bot]: leea: We can't help you without your code, please post it to https://gist.github.com
[03:02:12] mistermocha: has joined #ruby
[03:02:36] leea: https://gist.github.com/drwl/b6acdef40c0eea2c165e884c3a98afb6
[03:03:19] Xiti`: has joined #ruby
[03:03:30] zacts: has joined #ruby
[03:03:58] leea: i have to d/c but i will read responses from the chat log when i reconnect
[03:06:26] Radar: Seems a bit magical but I can't think of a better way to do it
[03:07:16] ghr: has joined #ruby
[03:10:10] mistermocha: has joined #ruby
[03:10:45] pawnbox: has joined #ruby
[03:12:37] LoneHermit: has joined #ruby
[03:13:40] mistermocha: has joined #ruby
[03:16:31] dc4: has joined #ruby
[03:16:37] gix: has joined #ruby
[03:16:50] ghr: has joined #ruby
[03:22:31] `tim`: has joined #ruby
[03:23:58] akira616: has joined #ruby
[03:26:14] ghr: has joined #ruby
[03:27:18] jaguarmagenta: has joined #ruby
[03:32:08] TheWhip: has joined #ruby
[03:33:50] charliesome: has joined #ruby
[03:35:45] ghr: has joined #ruby
[03:36:31] TheWhip: has joined #ruby
[03:38:33] wldcordeiro: has joined #ruby
[03:43:38] chipotle_: has joined #ruby
[03:43:38] djbkd: has joined #ruby
[03:44:58] astrobunny: has joined #ruby
[03:46:15] ghr: has joined #ruby
[03:46:39] max1: has joined #ruby
[03:48:37] nankyokusei: has joined #ruby
[03:51:55] arooni: has joined #ruby
[03:52:17] Devalo: has joined #ruby
[03:56:16] ghr: has joined #ruby
[03:58:54] blackmesa: has joined #ruby
[04:01:28] leea: has joined #ruby
[04:03:04] mistermocha: has joined #ruby
[04:03:11] duncannz: has joined #ruby
[04:04:36] duncannz: has joined #ruby
[04:05:11] duncannz: has joined #ruby
[04:06:12] duncannz: has joined #ruby
[04:06:46] ghr: has joined #ruby
[04:11:30] jaguarmagenta: has joined #ruby
[04:13:38] leea_: has joined #ruby
[04:15:30] kareeoleez: has joined #ruby
[04:16:17] ghr: has joined #ruby
[04:16:29] leea: has joined #ruby
[04:17:09] kareeoleez: has joined #ruby
[04:18:52] hk238: has joined #ruby
[04:25:59] arooni: has joined #ruby
[04:26:00] hahuang61: has joined #ruby
[04:26:47] ghr: has joined #ruby
[04:27:22] arooni-mobile: has joined #ruby
[04:28:53] LoneHerm_: has joined #ruby
[04:31:27] RegulationD: has joined #ruby
[04:32:07] arooni-mobile: has joined #ruby
[04:32:28] statelesscode: has joined #ruby
[04:33:21] Axsuul: has joined #ruby
[04:34:35] arooni-mobile: has joined #ruby
[04:34:47] xcesariox: has joined #ruby
[04:35:10] arooni-mobile: has left #ruby: ()
[04:35:49] okdas: has joined #ruby
[04:35:49] okdas: has joined #ruby
[04:36:48] ghr: has joined #ruby
[04:37:34] sneakerhax: has joined #ruby
[04:38:40] mistermocha: has joined #ruby
[04:39:01] mistermocha: has joined #ruby
[04:41:53] deecross: has joined #ruby
[04:41:53] mistermocha: has joined #ruby
[04:45:00] arooni: has joined #ruby
[04:46:52] ghr: has joined #ruby
[04:47:56] terminalrecluse: has joined #ruby
[04:49:53] nando293921: has joined #ruby
[04:51:32] aryaching: has joined #ruby
[04:51:47] Xeago_: has joined #ruby
[04:52:07] arooni-mobile: has joined #ruby
[04:52:36] arooni-mobile: has joined #ruby
[04:54:36] arooni-mobile: has joined #ruby
[04:55:15] arooni: has joined #ruby
[04:56:19] ghr: has joined #ruby
[04:57:46] dminuoso: has joined #ruby
[04:58:57] astrobunny: has joined #ruby
[05:00:19] blackmesa: has joined #ruby
[05:02:15] TheWhip: has joined #ruby
[05:02:47] ddffg: has joined #ruby
[05:02:50] TheWhip: has joined #ruby
[05:04:30] arooni-mobile: has joined #ruby
[05:05:06] arooni: has joined #ruby
[05:07:18] yfeldblum: has joined #ruby
[05:08:20] ghr: has joined #ruby
[05:08:28] pawnbox: has joined #ruby
[05:09:58] calmchaos: has joined #ruby
[05:14:27] voodoofish4301: has joined #ruby
[05:14:30] arooni-mobile: has joined #ruby
[05:16:01] LoneHerm_: has joined #ruby
[05:16:02] arooni: has joined #ruby
[05:17:50] ghr: has joined #ruby
[05:22:56] dennisvennink: has joined #ruby
[05:24:31] arooni-mobile: has joined #ruby
[05:25:34] arooni: has joined #ruby
[05:27:21] ghr: has joined #ruby
[05:27:53] jenrzzz: has joined #ruby
[05:27:53] jenrzzz: has joined #ruby
[05:28:08] Dimik: has joined #ruby
[05:28:21] calmchaos: has joined #ruby
[05:31:17] zacts: has joined #ruby
[05:32:34] RegulationD: has joined #ruby
[05:34:32] arooni-mobile: has joined #ruby
[05:36:02] arooni: has joined #ruby
[05:36:51] pawnbox: has joined #ruby
[05:37:53] hahuang61: has joined #ruby
[05:38:51] ghr: has joined #ruby
[05:39:21] TheWhip: has joined #ruby
[05:42:39] karapetyan: has joined #ruby
[05:43:24] calmchaos: has joined #ruby
[05:44:33] arooni-mobile: has joined #ruby
[05:46:02] arooni: has joined #ruby
[05:48:06] yardenbar: has joined #ruby
[05:48:52] ghr: has joined #ruby
[05:49:30] nankyokusei: has joined #ruby
[05:51:07] ledestin: has joined #ruby
[05:54:34] arooni-mobile: has joined #ruby
[05:56:02] arooni: has joined #ruby
[05:57:19] dminuoso: has joined #ruby
[06:01:22] ghr: has joined #ruby
[06:01:40] blackmesa: has joined #ruby
[06:02:08] kareeoleez: has joined #ruby
[06:02:45] Macaveli: has joined #ruby
[06:07:28] tubuliferous: has joined #ruby
[06:10:20] roshanavand: has joined #ruby
[06:10:28] tAn: has joined #ruby
[06:12:01] jenrzzz: has joined #ruby
[06:13:53] ghr: has joined #ruby
[06:14:16] Xeago_: has joined #ruby
[06:14:45] jgt1: has joined #ruby
[06:17:11] edwardly: has joined #ruby
[06:17:12] edwardly: has joined #ruby
[06:17:45] zacts: has joined #ruby
[06:19:28] sarbs: has joined #ruby
[06:24:23] KCmetro: has joined #ruby
[06:25:22] the_drow: has joined #ruby
[06:25:45] arooni: has joined #ruby
[06:26:40] dminuoso: has joined #ruby
[06:28:27] calmchaos: has joined #ruby
[06:28:54] ghr: has joined #ruby
[06:32:25] pawnbox: has joined #ruby
[06:34:37] the_drow: has joined #ruby
[06:35:23] tvw: has joined #ruby
[06:35:25] arooni: has joined #ruby
[06:36:58] AndyBotwin: has joined #ruby
[06:36:58] AndyBotwin: has joined #ruby
[06:37:46] pawnbox: has joined #ruby
[06:38:25] ghr: has joined #ruby
[06:40:44] calmchaos: has joined #ruby
[06:43:44] vuoto: has joined #ruby
[06:45:04] araujo: has joined #ruby
[06:45:24] arooni: has joined #ruby
[06:46:46] andikr: has joined #ruby
[06:47:55] ghr: has joined #ruby
[06:48:05] etehtsea: has joined #ruby
[06:49:30] nhhc: has joined #ruby
[06:51:20] guest56: has joined #ruby
[06:52:34] mark_66: has joined #ruby
[06:53:36] dminuoso: has joined #ruby
[06:55:25] arooni: has joined #ruby
[06:59:26] ghr: has joined #ruby
[06:59:26] Xeago_: has joined #ruby
[07:01:19] TomyWork: has joined #ruby
[07:03:06] blackmesa: has joined #ruby
[07:04:59] Chair: has joined #ruby
[07:05:25] arooni: has joined #ruby
[07:06:26] firstdayonthejob: has joined #ruby
[07:07:14] Abonec: has joined #ruby
[07:08:08] hutch34: has joined #ruby
[07:08:46] Hounddog: has joined #ruby
[07:09:03] deecross: has joined #ruby
[07:09:28] ghr: has joined #ruby
[07:10:01] jaiks: has joined #ruby
[07:10:10] aganov: has joined #ruby
[07:10:10] ur5us: has joined #ruby
[07:11:20] tAn: has joined #ruby
[07:12:43] jaiks: has joined #ruby
[07:13:38] aaeron: has joined #ruby
[07:14:57] arooni: has joined #ruby
[07:15:12] ledestin: has joined #ruby
[07:19:26] Coldblackice: has joined #ruby
[07:22:05] blaxter: has joined #ruby
[07:23:07] dagelf: yitsushi: why not rather have an auto reply if someone messages you while you're away... rather than spamming everyone's feed with nick changes
[07:23:46] dminuoso: dagelf: Or you can simply configure your IRC client to not tell you about name changes.
[07:23:50] yitsushi: hi, it strange. I turned off this functionality
[07:24:19] yitsushi: (but I don't see most of them becasue my client simlpy hides these messages
[07:24:47] dagelf: dminuoso: me and everyone else... yes. :-)
[07:24:57] ghr: has joined #ruby
[07:25:25] arooni: has joined #ruby
[07:26:01] yitsushi: dagelf: sorry, I hope now it's done.
[07:26:58] johnny56: has joined #ruby
[07:27:55] shevy: people notice it in the silence!
[07:28:49] antgel: has joined #ruby
[07:29:06] deecross: has joined #ruby
[07:29:42] dionysus69: has joined #ruby
[07:30:25] ramfjord: has joined #ruby
[07:30:26] Xeago_: has joined #ruby
[07:32:02] joonty: has joined #ruby
[07:32:41] colegatron: has joined #ruby
[07:33:17] RegulationD: has joined #ruby
[07:35:45] arooni: has joined #ruby
[07:38:32] blandflakes: has joined #ruby
[07:39:05] mistermo_: has joined #ruby
[07:39:30] calmchaos: has joined #ruby
[07:39:38] ngw: has joined #ruby
[07:40:14] Xeago_: has joined #ruby
[07:40:28] ghr: has joined #ruby
[07:43:09] mistermo_: has joined #ruby
[07:44:41] Xeago_: has joined #ruby
[07:45:43] arooni: has joined #ruby
[07:46:47] karapetyan: has joined #ruby
[07:49:13] multi_io: has joined #ruby
[07:49:58] ghr: has joined #ruby
[07:50:19] nankyokusei: has joined #ruby
[07:50:47] flughafen_: has joined #ruby
[07:51:09] karapetyan: has joined #ruby
[07:52:25] solene: has left #ruby: ("Killed buffer")
[07:53:42] Devalo: has joined #ruby
[07:55:25] blackmesa: has joined #ruby
[07:55:26] arooni: has joined #ruby
[07:58:33] Xeago_: has joined #ruby
[07:59:03] vdamewood: has joined #ruby
[07:59:23] jaguarmagenta: has joined #ruby
[07:59:53] Silthias1: has joined #ruby
[08:00:17] calmchaos: has joined #ruby
[08:00:42] UnKnOwN|: has joined #ruby
[08:02:30] pawnbox: has joined #ruby
[08:03:15] Xeago_: has joined #ruby
[08:03:54] CloCkWeRX: has joined #ruby
[08:03:55] mrmortondk: has joined #ruby
[08:05:25] arooni: has joined #ruby
[08:07:38] etehtsea: has joined #ruby
[08:08:07] calmchaos: has joined #ruby
[08:09:16] nofxx: has joined #ruby
[08:09:26] lxsameer: has joined #ruby
[08:10:07] vuoto_: has joined #ruby
[08:10:08] craigp: has joined #ruby
[08:10:49] hipertracker: has joined #ruby
[08:14:17] jenrzzz: has joined #ruby
[08:15:05] arooni: has joined #ruby
[08:15:13] hahuang61: has joined #ruby
[08:16:51] calmchaos: has joined #ruby
[08:17:20] unshadow: has joined #ruby
[08:17:23] Gooer: has joined #ruby
[08:20:31] helpa-bot: has joined #ruby
[08:20:52] dminuoso: has joined #ruby
[08:21:41] unshadow: Hi Guys, we are looking for a Ruby Developer (not ROR or WEB), working from another country is fine, also freelancers are ok too. http://www.safe-t.com/jobs/view/ruby-developer/ (I hope this is ok to post here)
[08:22:32] helpa: has joined #ruby
[08:22:39] joonty: has joined #ruby
[08:23:22] vuoto: has joined #ruby
[08:24:00] hck89: has joined #ruby
[08:24:19] charliesome: has joined #ruby
[08:24:48] arooni: has joined #ruby
[08:25:41] coffeecupp: has joined #ruby
[08:26:13] the_drow: has joined #ruby
[08:27:02] pawnbox: has joined #ruby
[08:27:48] stephan_: has joined #ruby
[08:28:58] karapetyan: has joined #ruby
[08:30:27] stephan_: hey, i want to include a class i got in a folder called "lib". i tried "require 'lib/someclass' but it didnt work
[08:30:45] igam: stephan_: I'd try just require 'someclass'
[08:31:41] jgrevich: has joined #ruby
[08:34:39] arooni: has joined #ruby
[08:35:03] stephan_: but how does ruby know where to look for 'someclass' if i got it in a subfolder?
[08:37:53] yfeldblum: has joined #ruby
[08:38:09] jhass: stephan_: ruby looks in $LOAD_PATH
[08:38:33] jhass: the ruby global that is, not the environment variable
[08:38:36] igam: stephan_: I guess that in the case of gems, there's a setup procedure that pushes all the lib directories in some search path. In the case of the bundler/setup.rc I see such lines: $:.unshift "#{path}/../#{ruby_engine}/#{ruby_version}/gems/rake-10.3.2/lib"
[08:39:00] jhass: igam: that looks terrible, where did you find that? :D
[08:39:16] igam: in bundler/setup.rb it's generated by bundle --standalone.
[08:39:21] stephan_: jhass, so if i got a "main file" where i require all my stuff i would have to set "$LOAD_PATH"?
[08:39:39] calmchaos: has joined #ruby
[08:39:40] jhass: stephan_: usually you have rubygems or bundler set the load path for you
[08:39:52] marr: has joined #ruby
[08:39:54] stephan_: i would like to fully understand it before trying bundler, which does some stuff i dont understand
[08:40:06] jhass: are you developing a gem?
[08:40:22] stephan_: just some stuff for myself
[08:40:36] igam: yes, the bundler is for specific cases, in general you would rather just install a gem. Eventually this is what I've done.
[08:40:37] stephan_: depends on the definition of "gem" ;)
[08:40:58] igam: (with the bundler, dragging the dependencies resulted in a bundle that was too big).
[08:41:09] jhass: well perhaps you can just go with ruby -Ilib bin/foo for now
[08:41:31] jhass: that's what I do when developing gems without bundler
[08:41:41] stephan_: hm... okay. or i will read up some documentation on developing an own gem
[08:41:49] jhass: when the gem is installed rubygems will add the lib folder to the load path
[08:42:32] stephan_: thanks so far
[08:43:18] jhass: that said $LOAD_PATH.unshift File.expand_path("../lib", __dir__) is not an unseen pattern in bin/foo's
[08:43:38] jhass: it just becomes redundant in the case of a gem when it's installed
[08:45:05] arooni: has joined #ruby
[08:45:40] Kedare: has joined #ruby
[08:45:40] DoubleMalt: has joined #ruby
[08:47:33] Xeago_: has joined #ruby
[08:47:58] stephan_: require_relative was what i was looking for ;)
[08:48:18] Xeago_: has joined #ruby
[08:48:32] Sashimi: has joined #ruby
[08:49:20] vuoto: has joined #ruby
[08:50:52] harfangk: has joined #ruby
[08:51:33] CloCkWeRX: has joined #ruby
[08:52:39] blackmesa: has joined #ruby
[08:53:29] colegatron: has joined #ruby
[08:55:25] arooni: has joined #ruby
[08:55:28] psmolen: has joined #ruby
[08:55:53] vuoto: has joined #ruby
[08:56:39] a1ph4g33k: has joined #ruby
[08:56:41] karapetyan: has joined #ruby
[08:57:05] vuoto: has joined #ruby
[08:59:25] Xeago_: has joined #ruby
[08:59:40] etehtsea: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[09:01:44] vuoto: has joined #ruby
[09:01:51] Nobun: has joined #ruby
[09:02:00] codecop: has joined #ruby
[09:03:11] karapetyan: has joined #ruby
[09:04:06] mark_66: has joined #ruby
[09:05:04] arooni: has joined #ruby
[09:05:28] karapetyan: has joined #ruby
[09:05:33] Omni: has joined #ruby
[09:07:13] karapetyan: has joined #ruby
[09:07:25] UserInneed: has joined #ruby
[09:07:51] KCmetro: has joined #ruby
[09:09:09] pawnbox: has joined #ruby
[09:09:13] KCmetro: has joined #ruby
[09:11:17] karapetyan: has joined #ruby
[09:13:30] KCmetro: has joined #ruby
[09:13:56] tAn: has joined #ruby
[09:14:01] karapetyan: has joined #ruby
[09:23:43] blackgoat: has joined #ruby
[09:24:43] arooni: has joined #ruby
[09:25:11] pawnbox: has joined #ruby
[09:25:40] Bugboy1028: has joined #ruby
[09:27:52] dtzuzu: has joined #ruby
[09:31:44] shtirlic: has joined #ruby
[09:34:10] RegulationD: has joined #ruby
[09:34:25] arooni: has joined #ruby
[09:35:21] Stan: has joined #ruby
[09:35:52] coffeecupp: has joined #ruby
[09:36:56] Ropeney: has joined #ruby
[09:39:41] vuoto: has joined #ruby
[09:40:55] Xeago_: has joined #ruby
[09:41:12] mkosaki: has joined #ruby
[09:42:58] shtirlic: has joined #ruby
[09:43:56] mistermocha: has joined #ruby
[09:44:25] arooni: has joined #ruby
[09:45:36] Ropeney: has joined #ruby
[09:49:37] tAn: has joined #ruby
[09:49:51] coffeecupp: has joined #ruby
[09:50:50] nankyokusei: has joined #ruby
[09:51:26] senayar: has joined #ruby
[09:52:06] Xeago_: has joined #ruby
[09:53:24] zyriuse: has joined #ruby
[09:55:05] arooni: has joined #ruby
[09:58:29] blackmesa: has joined #ruby
[09:59:33] shtirlic: has joined #ruby
[10:00:00] Timba-as: has joined #ruby
[10:00:11] jaguarmagenta: has joined #ruby
[10:01:13] tvw: has joined #ruby
[10:02:04] a1ph4g33k: has left #ruby: ("Leaving")
[10:02:26] a1ph4g33k: has joined #ruby
[10:03:04] Xeago_: has joined #ruby
[10:04:22] harfangk: has joined #ruby
[10:04:25] arooni: has joined #ruby
[10:04:54] LoneHerm_: has joined #ruby
[10:06:01] Sylario: has joined #ruby
[10:06:22] zyriuse: i would want to create a crawler with nokogiri but i wonder what is mutch better for parse web site between . parse web site directly, or aspirate web site and parse it ?
[10:07:01] Sylario: Does anyone know a gem that allow to do float to number in word in French?
[10:07:06] last_staff: has joined #ruby
[10:07:14] bruce_lee: has joined #ruby
[10:08:19] binaryplease1: has joined #ruby
[10:15:13] workmad3: has joined #ruby
[10:16:50] digneety: has joined #ruby
[10:20:37] Pupeno: has joined #ruby
[10:21:57] miskatonic: has joined #ruby
[10:23:05] maloik: has joined #ruby
[10:23:38] TheBrayn: sylario: the french number naming system is too complicated to be understood by a machine, we just aren't there yet
[10:24:39] Sylario: you probably even do not know the differencve between france and belgium/switzerland
[10:25:30] TheBrayn: I know the difference between the number names in france and the german part of switzerland
[10:27:55] nofxx: zyriuse, check spidr
[10:28:33] tao_: has joined #ruby
[10:29:42] nofxx: sylario, it's almost base 60 no? hehe...a friend tryed to teach me once... didn't learn
[10:30:12] Sylario: thereis a numberphile video about that
[10:30:35] nofxx: It's the pi girl? anyways, will check it out, thanks
[10:31:31] aryaching: has joined #ruby
[10:31:36] zacts: has joined #ruby
[10:31:58] flashpoint9: has joined #ruby
[10:34:02] arooni: has joined #ruby
[10:35:41] tAn: has joined #ruby
[10:35:44] apeiros: pi girl = vi hart?
[10:36:01] dminuoso: vi hart is still a thing?
[10:36:15] dminuoso: ACTION still has a hexaflexagon lying around
[10:36:36] dminuoso: A hexahexaflexagon I mean.
[10:36:42] Sylario: not vi hart, it's the guy thjat did vids for each chemical element
[10:38:33] mostlybadfly: has joined #ruby
[10:40:01] chip_: has joined #ruby
[10:42:09] gudekb: has joined #ruby
[10:42:49] GodFather: has joined #ruby
[10:44:07] arooni: has joined #ruby
[10:45:53] Azure: has joined #ruby
[10:47:22] c355E3B: has joined #ruby
[10:48:57] xue: has joined #ruby
[10:49:10] howdoi: has joined #ruby
[10:51:50] rodfersou: has joined #ruby
[10:52:31] allcentury: has joined #ruby
[10:52:47] CloCkWeRX: has joined #ruby
[10:52:57] Ponyo: has joined #ruby
[10:54:19] craigp: has joined #ruby
[10:54:27] arooni: has joined #ruby
[10:56:20] Ponyo: has joined #ruby
[10:57:39] aryaching_: has joined #ruby
[10:57:54] joonty: has joined #ruby
[10:58:45] Xeago_: has joined #ruby
[11:00:58] troulouliou_div2: has joined #ruby
[11:02:59] Xeago_: has joined #ruby
[11:03:45] Oclair: has joined #ruby
[11:04:05] arooni: has joined #ruby
[11:06:10] Xeago_: has joined #ruby
[11:12:41] last_staff: has joined #ruby
[11:13:44] hutch34: has joined #ruby
[11:14:50] freerobby: has joined #ruby
[11:18:46] colegatron: has joined #ruby
[11:19:09] johnmilton: has joined #ruby
[11:19:46] goeast: has joined #ruby
[11:19:57] JakFrist: has joined #ruby
[11:22:51] sdothum: has joined #ruby
[11:24:04] arooni: has joined #ruby
[11:25:02] UnKnOwN|: has joined #ruby
[11:25:38] yqt: has joined #ruby
[11:25:49] blackgoat: has joined #ruby
[11:27:27] harfangk: has joined #ruby
[11:30:33] KCmetro: has joined #ruby
[11:30:41] orakar: has joined #ruby
[11:33:10] orakar: I'm parsing logs and I want to remove certain entries. For instance, say my log is: "Foo\nName: foo\nProblem: oops\nDate: today\nBar\nName: bar\nProblem: oops\nDate: today\nHello World\nProblem: oops\nDate: today\n" and I want to remove the entry for 'Bar' and its subsequent lines (Name, Problem, and Date). What's the most Ruby way of doing that
[11:33:14] toretore: has joined #ruby
[11:33:39] colegatron: has joined #ruby
[11:34:06] ldnunes: has joined #ruby
[11:34:10] JeanCarloMachado: has joined #ruby
[11:34:25] arooni: has joined #ruby
[11:34:35] orakar: I was considering something like: split the string into lines, and if I encounter a line with 'Bar', I remove the next 3 lines (somehow)
[11:34:50] jhass: orakar: you could solve it with a flip-flop, but it might be easier to just gsub them out
[11:35:00] benlieb: has joined #ruby
[11:35:01] RegulationD: has joined #ruby
[11:35:22] dminuoso: jhass: a flip-flop! Haven't heard that in a while in Ruby. :)
[11:35:45] jhass: it's its steretypical usecase, yet nobody actually does use it for it :P
[11:36:53] orakar: jhass: so in this example it'd be something like mystring.gsub(/Bar\n\S+\n\S+\n\S+/, "") ?
[11:37:09] orakar: Assuming \S+ is the regex for matching any characters?
[11:37:50] swills: has joined #ruby
[11:38:31] jhass: mmh, well actually given the free form line the regex solution has to depend on something like the number of lines to remove, yeah
[11:38:56] jhass: in your example, you just forgot Name: for the Hello World entry ?
[11:39:02] sdothum: has joined #ruby
[11:39:13] orakar: jhass: oops, I did. Sorry
[11:40:17] pawnbox: has joined #ruby
[11:40:28] orakar: Thanks for your help, jhass :)
[11:40:53] hck89: has joined #ruby
[11:41:24] MissionCritical: has joined #ruby
[11:41:25] pandaant: has joined #ruby
[11:41:48] TvL2386: has joined #ruby
[11:42:21] TvL2386: hi guys! I'm trying to generate a soap_header with savon. According to the examples, it should look like the following: https://gist.github.com/TvL2386/aec0106ffe5b1fbfdd1e1685d0f0300b
[11:43:06] TvL2386: I don't know how to create it, because using Savon.client(soap_header: ......) I need to pass in some hash... The example just shows two strings...
[11:44:01] arooni: has joined #ruby
[11:44:45] Hanmac: has joined #ruby
[11:45:20] mistermocha: has joined #ruby
[11:46:16] hahuang65: has joined #ruby
[11:49:34] Kus: has joined #ruby
[11:49:52] deadnull: has joined #ruby
[11:51:17] tvw: has joined #ruby
[11:52:05] nankyokusei: has joined #ruby
[11:54:23] arooni: has joined #ruby
[11:54:30] pawnbox: has joined #ruby
[11:56:04] Vingador: has joined #ruby
[11:56:11] pawnbox: has joined #ruby
[11:58:55] nocco: has joined #ruby
[11:59:03] jhack: has joined #ruby
[11:59:04] Caelum: has joined #ruby
[12:00:53] jaguarmagenta: has joined #ruby
[12:01:38] Akuma: has joined #ruby
[12:02:20] pawnbox: has joined #ruby
[12:02:22] Pumukel: has joined #ruby
[12:03:26] diego1: has joined #ruby
[12:03:45] arooni: has joined #ruby
[12:03:50] benlieb: has joined #ruby
[12:04:33] CloCkWeRX: has joined #ruby
[12:05:50] goeast: hello Guys ! what is wrong with my code ? Why is it always printing the previous entry ?
[12:05:52] goeast: https://gist.github.com/go-east/ecca3548e9c6ec5481fafe6c19ad605c
[12:06:43] mdw: has joined #ruby
[12:06:49] tAn: has joined #ruby
[12:07:19] mdw: has joined #ruby
[12:07:20] codecop: has joined #ruby
[12:08:18] LoneHerm_: has joined #ruby
[12:09:02] TvL2386: goeast, because you are doing " puts add_students(input, array)" on line 17?
[12:09:03] Pupeno: has joined #ruby
[12:09:19] flashpoint9: has joined #ruby
[12:09:29] goeast: but it is only pushing into the array. I am not asking to print no ?
[12:09:40] goeast: ah "puts"
[12:09:50] TvL2386: yeah are printing the entire array :)
[12:10:00] TvL2386: becuase the #push returns the array itself
[12:10:08] TvL2386: which is printed yeah by puts
[12:10:17] Xeago_: has joined #ruby
[12:11:10] sdothum: has joined #ruby
[12:11:29] tknz: has joined #ruby
[12:12:30] karapetyan: has joined #ruby
[12:12:34] ldnunes_: has joined #ruby
[12:13:10] colegatron: has joined #ruby
[12:13:19] joonty: has joined #ruby
[12:15:07] MrBusiness2: has joined #ruby
[12:15:13] spiette: has joined #ruby
[12:15:41] pawnbox: has joined #ruby
[12:15:48] deecross: has joined #ruby
[12:17:38] jmignault: has joined #ruby
[12:18:13] kavanagh: has joined #ruby
[12:20:02] jenrzzz: has joined #ruby
[12:20:02] jenrzzz: has joined #ruby
[12:20:44] KCmetro: has joined #ruby
[12:23:10] KCmetro: has joined #ruby
[12:24:20] goeast: has joined #ruby
[12:24:51] SHyx0rmZ: has joined #ruby
[12:27:03] Coral: has joined #ruby
[12:28:40] troulouliou_div2: has joined #ruby
[12:28:56] swills: has joined #ruby
[12:29:47] roamingdog: has joined #ruby
[12:29:56] minimalism: has joined #ruby
[12:32:19] nadir: has joined #ruby
[12:32:46] enterprisey: has joined #ruby
[12:33:45] arooni: has joined #ruby
[12:34:26] lkba: has joined #ruby
[12:37:28] the_drow: has joined #ruby
[12:39:55] bkxd: has joined #ruby
[12:41:30] griffindy: has joined #ruby
[12:41:51] max1: has joined #ruby
[12:42:01] aupadhye: has joined #ruby
[12:43:44] arooni: has joined #ruby
[12:44:47] JakFrist: has joined #ruby
[12:45:04] nettoweb: has joined #ruby
[12:47:52] nocco: has joined #ruby
[12:48:21] charliesome: has joined #ruby
[12:48:42] Pupeno: has joined #ruby
[12:49:45] basex_: has joined #ruby
[12:50:20] tomphp: has joined #ruby
[12:53:44] arooni: has joined #ruby
[12:54:37] GinoManWorks: has joined #ruby
[12:55:04] aryaching: has joined #ruby
[12:55:04] l4v2: has joined #ruby
[12:57:52] charliesome: has joined #ruby
[12:58:07] aegis3121: has joined #ruby
[12:58:20] eljimmy: has joined #ruby
[12:58:43] KCmetro: has joined #ruby
[13:00:53] ekinmur: has joined #ruby
[13:01:33] ramortegui: has joined #ruby
[13:02:30] Silthias: has joined #ruby
[13:03:10] hck89: has joined #ruby
[13:03:44] arooni: has joined #ruby
[13:04:35] kareeole_: has joined #ruby
[13:06:48] Kus: has joined #ruby
[13:07:49] malconis: has joined #ruby
[13:09:20] LoneHermit: has joined #ruby
[13:09:47] Nobun1: has joined #ruby
[13:09:56] fmcgeough: has joined #ruby
[13:10:58] jgt2: has joined #ruby
[13:11:23] ChiefAlexander: has joined #ruby
[13:12:20] AlexRussia: has joined #ruby
[13:13:24] arooni: has joined #ruby
[13:14:38] hck89: has joined #ruby
[13:15:45] nocco: has joined #ruby
[13:21:14] tAn: has joined #ruby
[13:22:41] Dysp: has joined #ruby
[13:22:42] pawnbox: has joined #ruby
[13:22:45] arooni: has joined #ruby
[13:23:48] chouhoulis: has joined #ruby
[13:24:45] aegis3121: has joined #ruby
[13:27:06] mistermocha: has joined #ruby
[13:27:07] Dysp: Mjello. I have some code I am absolutely sure worked some time ago. I've spent the past hour trying to pinpoint the problem, but I just don't get it. https://gist.github.com/Dysp/f7acf6b0aedcc2abacaed6d4c48e1de0
[13:27:17] KCmetro: has joined #ruby
[13:27:46] schickung: has joined #ruby
[13:27:52] Dysp: And the correct object is passed into the function and the .map block is also working as it should
[13:28:08] mistermocha: has joined #ruby
[13:29:56] jhass: sheet contain's nil's. That's all there's to say
[13:31:10] blackmesa: has joined #ruby
[13:31:34] hutch34: has joined #ruby
[13:31:49] roamingdog: has joined #ruby
[13:32:03] Dysp: jhass: Okay. Thank you.
[13:32:05] Xeago_: has joined #ruby
[13:32:07] dminuoso: Dysp: # NoMethodError: undefined method `[]' for nil:NilClass means: you have code that somehow evaluates to nil[] - which gives you a NoMethodError because NilClass does not have that method.
[13:33:08] Dysp: I found the fucker.
[13:33:11] Dysp: JESUS CHRIST
[13:33:18] Dysp: Table was shifted one row down
[13:33:44] Ponyo: Hi there, is there a function similar to exec for functions?
[13:33:44] arooni: has joined #ruby
[13:34:19] dminuoso: Ponyo: Are you looking for .send ?
[13:34:29] `derpy: http://ruby-doc.org/stdlib-2.3.1/libdoc/socket/rdoc/BasicSocket.html#method-i-send
[13:34:31] GodFather: has joined #ruby
[13:34:37] dminuoso: Okay, bad example..
[13:34:47] dminuoso: &ri Object#send
[13:34:47] `derpy: http://ruby-doc.org/core-2.3.1/Object.html#method-i-send
[13:35:14] jhass: you mean Object#public_send, obviously
[13:35:27] Ponyo: dminuoso: I was thinking more like the system call
[13:35:36] jhass: ?xy Ponyo
[13:35:36] ruby[bot]: Ponyo: it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[13:35:55] RegulationD: has joined #ruby
[13:36:01] Ponyo: jhass: blah
[13:36:13] dminuoso: jhass: Strange. The only reason for me to use send is because I want to circumvent method visibility - guess that explains why I haven't heard about public_send. ;-)
[13:36:18] rbennacer: has joined #ruby
[13:36:33] dminuoso: Jokes aside, you are right. :S
[13:36:50] Pupeno: has joined #ruby
[13:36:50] Pupeno: has joined #ruby
[13:36:53] GodFather: has joined #ruby
[13:36:57] jhass: curious, IME 90% of all send usages are meant to be public_send's
[13:37:12] colegatron: has joined #ruby
[13:37:18] jgrevich: has joined #ruby
[13:37:21] machinewar: has joined #ruby
[13:37:35] jhass: Ponyo: well we're obviously not understanding what your problem is then, good luck!
[13:37:47] jrafanie: has joined #ruby
[13:38:20] agentmeerkat: has joined #ruby
[13:38:22] Ponyo: jhass: http://linux.die.net/man/3/exec I'd like something like this for a function instead of a process.
[13:38:24] ekinmur: has joined #ruby
[13:38:40] jhass: Ponyo: define function
[13:39:25] dminuoso: Oh I think I know what he wants!
[13:39:28] dminuoso: Ponyo: http://ruby-doc.org/stdlib-2.3.1/libdoc/fiddle/rdoc/Fiddle/Function.html#method-i-call
[13:39:35] dminuoso: ACTION grabs the popcorn
[13:40:09] jhass: hah, my current tendency is exec "/bin/sh -c 'source .foo; bar()'"
[13:40:14] swills: has joined #ruby
[13:40:17] Ponyo: jhass: http://hastebin.com/oqenugimel.rb
[13:40:37] hck89: has joined #ruby
[13:40:41] jhass: Ponyo: just remove the exec and it'll work
[13:40:48] jhass: the term you seek is "method call"
[13:40:52] floatingpoint: has joined #ruby
[13:40:54] shinnya: has joined #ruby
[13:40:54] Ponyo: Thank you :)
[13:41:15] dminuoso: jhass: Interestingly, my inintial response was quite on spot! :-)
[13:42:25] Ponyo: I don't think this is it either
[13:42:29] dminuoso: Also, in #rubyonrails I managed to fix 2 out of the last 3 problems without even knowing a) what the error message was and b) any useful error description!
[13:42:49] jhass: Ponyo: well, return a rather I guess
[13:43:10] Ponyo: ACTION sighs and walks away
[13:43:38] jhass: you're welcome :D
[13:43:44] arooni: has joined #ruby
[13:44:02] Ponyo: jhass: Thank you
[13:46:01] allcentury: has joined #ruby
[13:47:03] Nobun2: has joined #ruby
[13:48:33] blackmesa: has joined #ruby
[13:51:49] tAn: has joined #ruby
[13:52:17] allcentury: has joined #ruby
[13:52:36] nankyokusei: has joined #ruby
[13:53:37] pawnbox: has joined #ruby
[13:53:44] arooni: has joined #ruby
[13:54:56] macsteps: has joined #ruby
[13:55:06] JakFrist: has joined #ruby
[13:56:29] pawnbox: has joined #ruby
[13:59:06] mtkd: has joined #ruby
[13:59:20] braincrash: has joined #ruby
[13:59:33] edwardly: has joined #ruby
[13:59:33] edwardly: has joined #ruby
[14:00:57] `tim`: has joined #ruby
[14:02:05] failshell: has joined #ruby
[14:02:37] SilverKey: has joined #ruby
[14:03:23] arooni: has joined #ruby
[14:04:17] agit0: has joined #ruby
[14:04:29] stephan_: has joined #ruby
[14:12:45] braincrash: has joined #ruby
[14:12:50] arooni: has joined #ruby
[14:13:17] digneety: has joined #ruby
[14:15:57] DoubleMalt: has joined #ruby
[14:18:54] bigkevmcd: has joined #ruby
[14:19:22] slackbotgz: has joined #ruby
[14:20:43] Xeago_: has joined #ruby
[14:21:43] JakFrist: has joined #ruby
[14:22:44] arooni: has joined #ruby
[14:25:49] jhack: has joined #ruby
[14:26:13] SilverKey: has joined #ruby
[14:26:45] bdonnahue: has joined #ruby
[14:27:12] bdonnahue: hello. im trying to install the redminecrm plugin for redmine. i run bundle install and then rake but the rake fails
[14:27:13] bdonnahue: http://pastebin.com/pyANQXyE
[14:27:14] ruby[bot]: bdonnahue: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/611de4f52e8acd5e95790721e6c00209
[14:27:15] ruby[bot]: bdonnahue: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[14:27:18] bdonnahue: im not sure how to debug this
[14:27:20] bdonnahue: can anyone help me out
[14:27:53] jhass: bdonnahue: as I know redmine you have to edit the Gemfile
[14:27:53] Xeago_: has joined #ruby
[14:28:28] ChiefAlexander: has joined #ruby
[14:28:40] tubuliferous: has joined #ruby
[14:30:04] bdonnahue: jhass: edit the gemfile in what way?
[14:31:11] rbpeou: has joined #ruby
[14:31:23] xuin: has joined #ruby
[14:32:02] arooni: has joined #ruby
[14:32:13] jhass: I get no clear results on google, where are the installation instructions for "agilecrm"
[14:33:07] bdonnahue: https://www.redminecrm.com/projects/agile/pages/2
[14:33:15] bdonnahue: https://github.com/RCRM/redmine_agile
[14:33:21] xuin: do you know what I feel like doing sometimes? I feel like running down the street butt naked with a paint gun and paint all those god damn n...
[14:33:30] hutch34: has joined #ruby
[14:33:42] jhass: bdonnahue: bundle install --without development test went through without errors?
[14:33:58] bdonnahue: yes although it dindt look like it did much. i will paste the result
[14:34:00] jhass: !troll xuin
[14:34:00] ruby[bot]: +bbb $a:xuin$#ruby-banned xuin!*@*$#ruby-banned *!*@unaffiliated/xuin$#ruby-banned
[14:34:00] ruby[bot]: ruby[bot] kicked xuin: is a bannable offense, see http://ruby-community.com/pages/user_rules
[14:34:41] cdg: has joined #ruby
[14:34:59] prefix: has joined #ruby
[14:35:34] bdonnahue: https://gist.github.com/anonymous/1199f212a9322fcf06c3fcc77f135a65
[14:35:35] max1: has joined #ruby
[14:36:31] kies: has joined #ruby
[14:37:08] diegoviola: has joined #ruby
[14:38:33] hk238: has joined #ruby
[14:39:06] digitalfiz: has joined #ruby
[14:39:16] jhass: well I have no idea where the agile_data gem or file should come from. While working as root is a terrible habit, I also don't see any obvious mistake you made or any obvious mistake in their instructions. Given this is a commercial product you paid for, I would suggest you contact their support
[14:39:31] snath: has joined #ruby
[14:41:09] Xeago_: has joined #ruby
[14:42:53] dminuoso: has joined #ruby
[14:43:24] arooni: has joined #ruby
[14:46:32] SilverKey: has joined #ruby
[14:46:53] akira616: has joined #ruby
[14:52:09] jhack: has joined #ruby
[14:52:22] hutch34_: has joined #ruby
[14:52:44] arooni: has joined #ruby
[14:53:36] Dysp: I have an array [:x, :y, :z]. They represent attributes in another class. I want to access these attributes, but my method doesn't really work. Help.https://gist.github.com/Dysp/173b4c6676f929ec529bf209fb7014e7
[14:54:18] mostlybadfly: has joined #ruby
[14:54:35] Dysp: I do understand the error message, I just don't understand why "sym" doesn't pair with |sym| as I expect.
[14:54:49] jhass: Dysp: why don't you simply [ms_dif_nm, ms_dif_nms, ms_dif_nmpc, subject, mvc]
[14:54:50] ekinmur: has joined #ruby
[14:56:05] Dysp: I don't think I understand what you mean. I want a hash, because I am going to print the different values in an excel sheet. However the values that I want to print can vary (hence the array with symbol representing a settings array)
[14:56:39] Dysp: And I just pass an array of the values, then I cannot expect what is what.
[14:56:53] Dysp: If I am trying to access pr position in the array that is
[14:56:53] jhass: well I was going off your example of course
[14:57:03] Dysp: Sure, I understand
[14:57:09] jhass: which neither has dynamic set of keys nor hash
[14:57:50] jhass: given the limited scope of your question, the only answer is public_send then, whether it's a clean solution overall in your situation I can't tell
[14:57:57] rippa: has joined #ruby
[14:58:00] atomx: has joined #ruby
[14:58:26] Dysp: I don't ask you to evaluate whether the solution is good or not, I simply asked why I am getting the error I am getting :P
[14:58:54] TheWhip: has joined #ruby
[14:58:58] jhass: because you call the method sym on self, which does not exist
[14:58:59] Es0teric: has joined #ruby
[14:59:18] jhass: and that answer is a simple rephrasing of "NoMethodError: undefined method `sym' for #<Kincom:0x00000004227d98>"
[14:59:29] z3ndrag0n: has joined #ruby
[14:59:59] dennisvennink: has joined #ruby
[15:00:03] Dysp: Yes, but why am I calling "sym"?
[15:00:10] bigkevmcd: has joined #ruby
[15:00:34] Dysp: Isn't ...map { |sym| p sum} supposed to put whatever element map was invoked(correct use?) on?
[15:01:05] Dysp: I mean sym, not sum obviously
[15:02:42] arooni: has joined #ruby
[15:02:44] polishdub: has joined #ruby
[15:03:02] mistermocha: has joined #ruby
[15:03:05] Dysp: So if I did [:x, :y, :z].map { |sym| sym}, wouldn't it just return [:x, :y, :z]?
[15:03:32] Asher: has joined #ruby
[15:04:13] Dysp: So why isnt "sym" being replaced with whatever element there is in the array?
[15:04:16] grill: has joined #ruby
[15:04:29] jhass: because that's not how local variables work
[15:04:44] jhass: your code isn't a template in which local variables are replaced and then it's parsed again or something
[15:05:03] camonz: has joined #ruby
[15:05:48] Dysp: Well I do understand that there is something here I don't understand, otherwise it would work, obviously. So, how would you approach the problem I am trying to solve?
[15:06:10] ddffg: has joined #ruby
[15:06:18] Dysp: Which is basicly accessing instance variables of a class based on whatever symbols are passed in an array.
[15:06:19] jhass: if I extrapolate the surrounding stuff
[15:06:23] jhass: I would keep the data in a hash
[15:06:37] jhass: and keys.map {|key| @data[key] }
[15:06:56] aegis3121: has joined #ruby
[15:07:15] jhass: instead of flatting it out into individual instance variables when I'll never use them literally
[15:07:35] gregf_: Dysp: you can also use eval *runs*
[15:08:12] gregf_: like so, eval("self.#{method}")
[15:08:44] aryaching: has joined #ruby
[15:08:46] jhass: Dysp: ^ please ignore this. gregf_ is just making fun without properly marking it as such.
[15:08:53] atomx: has joined #ruby
[15:09:00] mdw: has joined #ruby
[15:09:35] jhass: gregf_: they're already confused about basic semantics, this is not helpful
[15:09:44] Dysp: I have an object(of Kincom) with instance variables. I need to extract those and print them. I am doing this in a module.
[15:09:59] Dysp: Exactly. Still confused about basic semantics.
[15:10:49] bogusdisk: has joined #ruby
[15:11:03] jhass: Dysp: to repeat myself: proper, extrapolated solution: don't flat your data out into instance variables, keep them in a hash. Or to repeat the earlier solution ignoring likely better design: use public_send
[15:11:13] karapetyan: has joined #ruby
[15:11:26] bdonnahue: jhass: will d othanks
[15:12:40] gregf_: jhass: sorry about that :|. yeah, i was confusing
[15:13:04] arooni: has joined #ruby
[15:13:25] gregf_: Dysp: class Foo; def initialize *args, **kwargs; kwargs.each { |k,v| instance_variable_set "@#{k}",v };end;end;f = Foo.new(a: 10, b: 20); p [:a,:b].map{ |sym| f.instance_variable_get("@#{sym}") } <= somethinglike this would help? *please format*
[15:13:41] leea: has joined #ruby
[15:13:47] gregf_: sorry, better ignore me. follow what jhass's suggested
[15:14:10] mattwashere: has joined #ruby
[15:14:22] Dysp: Thank you for the effort though :p
[15:14:39] Dysp: jhass: What do you exactly mean by flatting out my data?
[15:14:41] pawnbox: has joined #ruby
[15:15:16] Dysp: And what is wrong with using instance variables?
[15:15:25] Dysp: Moment, I will show you what my object looks like.
[15:18:26] ekinmur: has joined #ruby
[15:18:47] Dysp: https://gist.github.com/Dysp/2a9dde9013a02cd1e4866ce1f2639e7a
[15:18:54] Dysp: There. Tried to format it to be easier to see
[15:18:58] vuoto: has joined #ruby
[15:19:02] Dysp: That's an example of an instance
[15:20:08] tubuliferous: has joined #ruby
[15:20:52] daniel: has joined #ruby
[15:20:54] Xeago_: has joined #ruby
[15:21:25] jhass: Dysp: do you ever for example do _literally_ object.arm or self.arm or arm?
[15:22:09] sicn: hi guys, Ruby noob here (I bet this also ca
[15:22:23] sicn: uses some of you to freak out ;) )
[15:22:44] arooni: has joined #ruby
[15:22:46] sicn: I wonder if some of you know how to override a standalone method in a frameworks module
[15:23:03] sicn: i tried to monkey patch according to the usual explanations, but the method is simply not being called.
[15:23:16] Wildfyr: has joined #ruby
[15:23:19] jhass: which method do you try to replace and why?
[15:23:32] Dysp: Well, I am trying to learn and at the same time build an application, so I believe I will. The "arm" is a setting used to calculate whatever data is within the object and therefore extremely crucial. It changes depending on the "arm" used when the test was performed.
[15:23:53] jhass: Dysp: arm is just an example, I could have picked any other of your instance variables
[15:24:30] sicn: @jhass It's in the devise-saml-authentication framework. The framework seems to be missing a way to dynamically load attribute maps so I tried to simply monkey patch the "def attribute_map_for_environment"
[15:24:40] sicn: so it can load the attributes from a database table.
[15:25:19] jhass: https://rubygems.org/gems/devise_saml_authenticatable ?
[15:25:22] Dysp: jhass: Eventually I am thinking to serialize the whole object to a database.
[15:25:32] sicn: @jhass yes...
[15:25:49] allcentury: has joined #ruby
[15:26:00] sicn: @jhass. In fact, the latest "master"-version from github because the one on rubygems.org is missing some important features entirely, as such I am sort of using a "nightly"
[15:26:10] Flipez: has joined #ruby
[15:26:39] jhass: sicn: could you show your attempt in a gist?
[15:26:49] sicn: @jhass it's the method attribute_map_for_environment in the file https://github.com/apokalipto/devise_saml_authenticatable/blob/master/lib/devise_saml_authenticatable/model.rb
[15:27:00] sicn: @jhass sure, np
[15:27:16] Madplatypus: has joined #ruby
[15:28:00] Dysp: But I haven't gotten around to do that yet, though.
[15:28:11] z3ndrag0n: has joined #ruby
[15:28:14] jhass: Dysp: that only seems to be one more data point towards keeping the data in a hash being more sensible
[15:28:20] Devalo: has joined #ruby
[15:28:38] Dysp: Can you explain why that is?
[15:28:56] z3ndrag0n: has joined #ruby
[15:29:14] Dysp: I mean, why is serializing the whole object and then accessing instance variables/hashes bad?
[15:29:47] hipertracker: has joined #ruby
[15:29:52] jhass: https://p.jhass.eu/43.rb
[15:30:10] jhass: neither is generically good or bad
[15:30:47] Dysp: I have thought about doing that, actually. Haven't gotten around to it yet, though (pressure to provide actual data for the researcher).
[15:30:50] sicn: @jhass https://gist.github.com/anonymous/8e529e14e14477858bb67a9be06564f3
[15:31:03] jhass: but if your primary usecase is dynamically enumerating and accessing the data, flattening it out into instance variables opposed to keeping it in a datastructure made for it doesn't seem sensible
[15:31:51] Dysp: I get your point and I will note it down.
[15:32:09] jhass: sicn: that seems okay, perhaps it's loaded before the actual code? also did you try just defining def self.attribute_map_for_environment in your User (or whatever your Devise model is) model?
[15:32:10] arooni: has joined #ruby
[15:32:13] Dysp: But now I need to get these data ready for the researcher, before I refactor the whole program.
[15:32:30] jhass: Dysp: then third time, public_send
[15:32:36] jhass: or instance_variable_get
[15:32:38] Dysp: Haha, yes, I know! :P
[15:33:07] Dysp: I was just trying politely to end the discussion; one that taught me something and for one I am therefore grateful to have had.
[15:34:58] rbennacer: has joined #ruby
[15:35:08] sicn: @jhass hm, ok. do you care to explain what you mean by "it's loaded before the actual code"? Does the Ruby runtime not look at the code as a whole?
[15:36:20] sicn: @jhass and sorry if the question seems dumb, but i primarily work with precompiled languages, so the concept of things loading just by changing a file is new to me =)
[15:36:31] dionysus69: has joined #ruby
[15:36:39] jhass: sicn: it does but in a sequential manner, that is there's a not a semantic analysis phase, rather the code is parsed as its loaded and then run. class Foo; is essentially syntax sugar for Foo = Class.new, so all code and method definitions is itself just code that runs
[15:36:47] RegulationD: has joined #ruby
[15:37:10] watersoul: has joined #ruby
[15:37:37] jhass: imagine all your code is actually inside your main function/entry point and the object model is build at runtime through it
[15:37:46] jhass: that means order is relevant
[15:37:56] karapetyan: has joined #ruby
[15:38:11] sicn: @jhass ok, can i affect order? can i "boost" my monkey-patched method?
[15:38:14] jhass: def foo; 1; end; def foo; 2; end; is different from def foo; 2; end; def foo; 1; end
[15:38:43] jhass: yes, you just have to put it at the right place, namely after the file that defines the original was loaded
[15:38:56] karapetyan: has joined #ruby
[15:39:17] jhass: in a rails app that typically happens by the Bundler.require call in config/boot.rb or config/application.rb or whereever it was
[15:39:55] sicn: yes, it is a rails 4 app, i put this file in "services", kinda felt right ;)
[15:40:06] karapetyan: has joined #ruby
[15:40:35] jhass: not sure I agree :P
[15:40:52] brahman: has joined #ruby
[15:40:59] sicn: well, in reality, i dont agree either. it's not a service, but it didn't feel like a controller either =)
[15:41:03] jhass: most people put monkey patches in rails apps into config/initializers, config/application.rb or lib/ and load the libfile explicitly from either place
[15:41:42] sicn: oh ok, i will check, who knows, maybe its just that
[15:42:00] mistermocha: has joined #ruby
[15:42:11] watersoul_: has joined #ruby
[15:42:15] jhass: sicn: first of all I would try if defining it as class method on the User class doesn't shadow the original
[15:42:21] jhass: that would be the much saner solution in any case
[15:42:21] karapetyan: has joined #ruby
[15:42:38] brahman: I am using ruby to wrap the execution of a mono app. The script uses popen3 to opent the mono app. This mono app forks into multiple sub process' and my ruby script ends up waiting for the child pids to return, which they do not as they are daemons. Is there a way to tell popen3 not to wait for mono's child pids?
[15:42:39] sicn: @jhass i tried that, it doesn't seem to lead to desired result either =)
[15:42:45] arooni: has joined #ruby
[15:43:06] sicn: @jhass are files processed in alphabetical order?
[15:43:17] jhass: no, load order
[15:43:22] jhass: Rails hides a lot of this
[15:43:32] sicn: i.e. if i have a devise.rb in config/initializers, should i call the file "a_monkey_patch.rb" just to make sure it's loaded before?
[15:43:45] jhass: oh, config/initializers is in alphabetical order, yeah
[15:43:48] sicn: umm, sorry, e_monkey_patch.rb i meant...
[15:43:59] sicn: so its loaded after devise is initialized
[15:44:13] jhass: but it shouldn't matter since devise is loaded by the Bundler.require call
[15:44:21] jhass: happening well before any rails initializer
[15:44:41] sicn: alright, lets try it =)
[15:45:01] jhass: actually your file in app/services probably just was never loaded
[15:45:16] jhass: since Rails does it lazily when it encounters a missing constant
[15:45:34] jhass: http://guides.rubyonrails.org/autoloading_and_reloading_constants.html
[15:46:30] sicn: hm, same thing happens in config/initializers. Not being called, only the original method :(
[15:47:15] jhass: spring active?
[15:47:18] jhass: bin/spring stop
[15:47:24] sicn: does it matter that it is declared a private method? can they not be overridden?
[15:47:34] jhass: it shouldn't matter, no
[15:47:40] sicn: or "shadowed" rather
[15:48:04] jhass: for the monkey patch override or redefinition is the correct term
[15:48:24] jhass: I used shadowed earlier since it would define a new method further down the ancestry chain
[15:48:48] mattwashere: has joined #ruby
[15:50:00] Macaveli: has joined #ruby
[15:50:45] jhass: sicn: checked spring yet?
[15:50:45] hipertracker: has joined #ruby
[15:51:17] sicn: Java Spring, yes. Ruby Spring, no.
[15:51:37] jhass: sicn: I mean did you try to kill your appserver yet, ran bin/spring stop and then retried?
[15:51:40] sicn: As I said, mostly a C, Java, Kotlin, Objective C developer
[15:51:54] tubuliferous: has joined #ruby
[15:51:57] sicn: yeah, the server i killed several times
[15:51:59] jhass: config/initializers is only loaded as your rails app boots
[15:52:15] LuckyABA: has joined #ruby
[15:52:17] jhass: and spring is an application preloader, it keeps your rails app in memory
[15:52:24] arooni: has joined #ruby
[15:52:28] jhass: in the background
[15:52:31] ramfjord: has joined #ruby
[15:52:36] sicn: oh, that could explain a thing or two
[15:52:53] sicn: becomes some things started to work suddenly after i shut down my computer before going home
[15:53:13] sicn: could the app server stay in memory even though i stopped the server?
[15:53:30] tAn: has joined #ruby
[15:53:31] sicn: seems a bit odd
[15:53:32] jhass: well, technically that's not the correct way to put it, but yes
[15:53:38] jhass: as said, bin/spring stop
[15:53:51] sicn: running rails 4.0 though, no spring
[15:54:06] sicn: its just a piece of code that was dropped in my lap yesterday =)
[15:54:26] sicn: like: "you know how to code, maybe you know what to do with this" :D
[15:55:06] jhass: your rails version is pretty irrelevant to whether you have an application preloader like spring or spork running though
[15:55:22] bigkevmcd: has joined #ruby
[15:55:37] sicn: only have rake, rails and bundle as executables in the bin-folder
[15:55:46] sicn: when i start the server it tells me its WEBrick
[15:55:49] jhass: okay, and no mention of spring or spork in your Gemfile ?
[15:56:27] Hounddog: has joined #ruby
[15:56:31] crdpink: has joined #ruby
[15:56:34] sicn: unicorn and rubyracer
[15:56:40] sicn: spork-rails
[15:56:45] jhass: there we go
[15:56:46] flughafen_: has joined #ruby
[15:56:47] jhass: spork then
[15:56:51] jhass: basically the same thing
[15:57:11] jhass: bundle exec spork stop? I don't even remember
[15:57:22] SilverKey: has joined #ruby
[15:57:40] sicn: "Couldn't find any framework called stop" ;)
[15:57:47] sicn: same with spork stop
[15:58:10] sicn: let me just see what processes are running
[15:58:25] jhass: yeah, perhaps just killall ruby
[15:58:42] jhass: readme obviously doesn't hint how to kill it
[15:59:08] sicn: nah, nothing ruby running. checked killall -9 ruby already ;)
[16:00:20] jhass: idk, it actually doesn't even have an option to kill itself apparently
[16:00:21] mistermocha: has joined #ruby
[16:00:28] jhass: I guess I know why the community moved to spring :P
[16:00:36] jhass: anyway, let's assume that's not it yet
[16:00:43] Xeago_: has joined #ruby
[16:01:01] jhass: let's verify it's loaded/overwritten: do bin/rails console, inside check User.method(:attribute_map_for_environment).source_location
[16:01:16] sicn: alright. right now i am baffled by the fact that not even the original method is being called anymore... now that i retried a bunch of times, perhaps thats why my monkey patched file is not being called
[16:01:17] mattwashere: has joined #ruby
[16:01:41] sicn: (after killing everything ruby and restarting)
[16:01:47] sicn: perhaps thats the real issue...
[16:01:59] jhass: and Devise::Models::SamlAuthenticatable::ClassMethods.instance_method(:attribute_map_for_environment).source_location
[16:02:12] jaguarmagenta: has joined #ruby
[16:02:22] jhass: ah well yeah, if there's no call there's no call :P
[16:02:38] sicn: yeah, funny enough just 20 minutes ago it was called, last time i started the server
[16:02:41] arooni: has joined #ruby
[16:02:51] sicn: funny, perhaps there are other bugs in the "nightly" version of the framework :/
[16:03:25] amclain: has joined #ruby
[16:03:26] sicn: sucks that the stable version is missing dynamic configuration of some IdP-related stuff alltogether
[16:04:21] karapetyan: has joined #ruby
[16:04:33] jhass: the joys of enterprise authentication ::P
[16:05:40] sicn: yeah, well. it's a customer of ours that really wants to grow and their customers in turn really want SAML Authentication. I understand it, too bad that I haven't worked enough with Ruby and Rails before being tossed into this endevour ;)
[16:06:22] sicn: at least i got SAML authentication to work without a hitch, it's just the dynamic configuration of attribute mappings that gives me headaches now =)
[16:06:49] hutch34_: has joined #ruby
[16:06:55] jhass: hehe yeah, you do seem to be doing good for being at it for a day or so ;)
[16:06:55] sicn: so despite knowing literally nothing about Ruby or Rails I at least gathered enough knowledge about the framework and the language in the last 24 hours that I got some stuff to work =)
[16:07:41] sicn: well, love coding so i learn quite fast, but now it felt that i was stuck with this problem for several hours so i thought it doesn't hurt to ask =)
[16:07:55] seth_: has joined #ruby
[16:08:24] karapetyan: has joined #ruby
[16:08:32] calmchaos: has joined #ruby
[16:09:24] karapetyan: has joined #ruby
[16:09:52] mattwashere: has joined #ruby
[16:10:31] Peteykun: has joined #ruby
[16:11:04] karapetyan: has joined #ruby
[16:11:21] jgt2: has joined #ruby
[16:11:39] tvw: has joined #ruby
[16:11:44] bigkevmcd: has joined #ruby
[16:12:15] arooni: has joined #ruby
[16:12:18] kareeoleez: has joined #ruby
[16:12:25] sicn: so lets just start clean once more, maybe that baby is calling the method
[16:12:31] sicn: like it did a little while ago
[16:13:16] sicn: @jhass Is there something like "make clean" in Ruby ? just to clean any caches or so that might be breaking stuff?
[16:13:45] FastJack: has joined #ruby
[16:13:57] jhass: besides stuff like spring/spork there's nothing where code can be cached
[16:14:15] jhass: so nothing on disk, just in memory
[16:14:52] AndrewIsHere: has joined #ruby
[16:14:52] sicn: and indeed.......... now its being called
[16:15:09] sicn: my monkey patched method instead of the framework's original method
[16:15:14] chouhoulis: has joined #ruby
[16:16:25] jhass: yay, I guess
[16:16:29] sicn: oh the joy
[16:16:34] sicn: finally.
[16:16:47] sicn: so the config/initializers-move did the trick it seems
[16:16:59] SCHAAP137: has joined #ruby
[16:17:41] [Butch]: has joined #ruby
[16:18:04] jhass: seems plausible
[16:18:30] jhass: do read the the rails guide I linked earlier some time you want to fully understand why
[16:18:35] basex__: has joined #ruby
[16:19:25] sicn: now i can finally continue hook up my attribute mapper i built :) thanks for your help
[16:20:26] nettoweb: has joined #ruby
[16:20:43] sicn: and thanks, will check the guide
[16:20:50] aredridel: has joined #ruby
[16:21:00] _mak: has joined #ruby
[16:21:15] sicn: chances are i will be back in a while anyway ;) again, was fantastic advise, thanks =)
[16:21:40] _mak: is it possible to step(x) in a mysql results loop? eg: I want to loop through 3 rows at a time
[16:22:15] calmchaos: has joined #ruby
[16:22:23] arooni: has joined #ruby
[16:22:39] jhass: _mak: isn't it enumerable? just each_slice(3)
[16:23:08] jenrzzz: has joined #ruby
[16:23:27] smathy: has joined #ruby
[16:23:31] Hyuk: has joined #ruby
[16:24:17] karapetyan: has joined #ruby
[16:25:15] _mak: jhass: thanks mate!
[16:26:48] vuoto: has joined #ruby
[16:27:37] agent_white: has joined #ruby
[16:27:39] jgt2: has joined #ruby
[16:29:12] whathappens: has joined #ruby
[16:29:53] bigkevmcd: has joined #ruby
[16:29:57] SilverKey: has joined #ruby
[16:30:33] Ishido: has joined #ruby
[16:31:44] wldcordeiro: has joined #ruby
[16:31:45] mattwashere: has joined #ruby
[16:32:33] arooni: has joined #ruby
[16:34:37] AnoHito: has joined #ruby
[16:35:05] eljimmy: has joined #ruby
[16:35:21] wilbert: has joined #ruby
[16:35:28] milesmatthias: has joined #ruby
[16:36:30] davedev24: has joined #ruby
[16:36:33] mattwashere: has joined #ruby
[16:36:39] _mak: has left #ruby: ("..")
[16:37:21] KCmetro: has joined #ruby
[16:37:23] RegulationD: has joined #ruby
[16:38:11] karapetyan: has joined #ruby
[16:39:24] karapetyan: has joined #ruby
[16:39:35] colegatron: has joined #ruby
[16:41:20] jokke: has joined #ruby
[16:42:24] arooni: has joined #ruby
[16:45:29] tomchapin: has joined #ruby
[16:47:25] tomchapin: has joined #ruby
[16:47:25] flashpoint9: has joined #ruby
[16:48:45] milesmatthias: has joined #ruby
[16:49:17] rbennacer: has joined #ruby
[16:51:17] whathappens: has joined #ruby
[16:52:24] arooni: has joined #ruby
[16:52:54] yqt: has joined #ruby
[16:53:39] AndrewIsHere: has joined #ruby
[16:54:18] leea: has joined #ruby
[16:55:11] Gasher: has joined #ruby
[16:56:06] pilne: has joined #ruby
[16:56:16] thoraxe: has joined #ruby
[16:56:36] todd_dsm_wk: has joined #ruby
[16:57:20] BTRE: has joined #ruby
[16:58:26] qcqqnq: has joined #ruby
[16:59:25] sneakers: has joined #ruby
[16:59:32] nettoweb: has joined #ruby
[16:59:57] hipertracker: has joined #ruby
[17:02:00] arooni: has joined #ruby
[17:03:02] aibot: has joined #ruby
[17:03:10] tvw: has joined #ruby
[17:04:33] hosttor: has joined #ruby
[17:05:12] bweston92: has joined #ruby
[17:05:34] digneety: has joined #ruby
[17:05:35] stephan_: has joined #ruby
[17:05:46] sicn: has joined #ruby
[17:05:54] bluOxigen: has joined #ruby
[17:08:08] whathappens: has joined #ruby
[17:08:34] digneety: has joined #ruby
[17:09:02] Wildfyr: is there anyway to change dir in ruby
[17:09:18] shevy: Wildfyr via Dir.chdir if the dir exists
[17:09:28] Wildfyr: Dir.chdir works but as soon as the program exits you go back to the original dir
[17:09:34] sarbs: has joined #ruby
[17:09:41] Wildfyr: If it helps, I use linux
[17:10:29] arooni_: has joined #ruby
[17:10:40] shevy: yeah if you start it from a shell
[17:10:56] shevy: via kde3 dcop you could do so via ruby too for kde konsole
[17:11:16] shevy: what shell do you use by the way?
[17:11:31] amclain_: has joined #ruby
[17:12:30] baweaver: honestly I'd not change directories outside the context of the program, makes it harder to reuse later.
[17:12:43] baweaver: or pipe or do other things
[17:14:41] arooni: has joined #ruby
[17:14:48] havenwood: Wildfyr: How about something like?: Dir.chdir(dir_path) { exec ENV['SHELL'] or '/bin/sh' }
[17:14:49] macsteps: has joined #ruby
[17:14:53] ramfjord: has joined #ruby
[17:15:25] Wildfyr: havenwood: okay, giving it a try
[17:15:47] havenwood: whathappens: Good mornin'!
[17:16:46] Wildfyr: havenwood: thanks, it works
[17:18:21] aep-shoutlet: has joined #ruby
[17:18:24] rcvalle: has joined #ruby
[17:20:57] arooni-mobile: has joined #ruby
[17:21:03] replay: has joined #ruby
[17:22:32] cschneid_: has joined #ruby
[17:22:37] A124: Is there a way to have a global rescue for certain error and retry from the line that raised that error??
[17:22:43] Maletor: has joined #ruby
[17:22:49] cschneid_: is there a license string for gemspecs that is "proprietary" or similar?
[17:22:57] cschneid_: "custom, read license.md plz"
[17:23:48] A124: Or 'redo' in this sense. In my scope if I wrap everything one by one does not change a thing
[17:24:19] KCmetro: has joined #ruby
[17:25:20] stoopidmunkey: has joined #ruby
[17:25:29] havenwood: cschneid_: Just don't license it unless you actually want to license it in some way. You can just assert the copyright.
[17:25:49] cschneid_: we have a license.md file that's clear - somebody wants the gemspec flag marked.
[17:25:50] cdg: has joined #ruby
[17:25:50] SilverKey: has joined #ruby
[17:25:58] cschneid_: my guess is that they have an audit tool of some sort
[17:26:26] Pupeno: has joined #ruby
[17:26:30] cschneid_: I can stick "Proprietary" there, was just looking for a commonly used string, the way people standardized on "GPL-3" or "MIT" or whatever.
[17:26:36] shevy: A124 I think you have to wrap the code around begin/rescue or perhaps catch/throw; you can also use things such as Signal.trap('SIGINT') { exit } ... and I think there may even be a way for the dynamic global rescue you describe perhaps without wrapping it ... but I never thought about it much. I always end up using begin/rescue
[17:26:48] havenwood: A124: Put the `begin` before where you want to retry with the `retry` in your `rescue`, or is that not what you mean?
[17:26:59] KCmetro: has joined #ruby
[17:27:24] havenwood: cschneid_: Dunno if you'll find one you like, but you can see a list of the RubyGems license identifiers with: Gem::Licenses::IDENTIFIERS
[17:27:52] cschneid_: A124: I don't think you can rescue an exception that far away from the raising code, handle it, then restart the raising code. Part of raising exceptions is unwinding the stack, I think you'd lose all context as the exception propagates up, there wouldn't be something to restart
[17:28:19] cschneid_: A124: If it were a common pattern, you can look at the various retries libraries out there like https://github.com/ooyala/retries
[17:28:24] smathy: Yeah, you can only retry the block you're rescuing at.
[17:28:29] cschneid_: havenwood: cool, I'll look
[17:28:47] A124: havenwood well my case is database connection is crappy, and is used several times. And when timeout it should just wait, estabilish new connection and retry. So yeah, I guess then I have to wrap everything. Do not want to re-reun the rest of iteration.
[17:28:48] havenwood: cschneid_: I think just "All rights reserved" instead of a license though. No license.
[17:29:10] A124: cschneid_ Thanks
[17:29:24] cschneid_: havenwood: 2 distinct things. We have a License.md file in the repo, it's clear and what we want. But it's not open source unfortunately, and somebody is asking to mark our gemspec as such.
[17:29:26] havenwood: cschneid_: The absence of a license means unlicensed. I do see "Unlicense" in the RubyGems list but I'm not sure if it means what it says. :P
[17:29:38] Eiam_: has joined #ruby
[17:29:51] havenwood: cschneid_: Nope, don't use that. Haha.
[17:30:06] shevy: what's it do!
[17:30:15] agentmeerkat: has joined #ruby
[17:30:18] havenwood: "This is free and unencumbered software released into the public domain." <- not lack of a license
[17:30:31] shevy: too much license for a non-license!
[17:31:18] havenwood: cschneid_: I suggest: spec.licenses = []
[17:31:21] shevy: some of it I consider somewhat excessive... like attaching a license on stackoverflow by default for like a 3 lines method
[17:32:11] Es0teric: has joined #ruby
[17:32:17] havenwood: cschneid_: I'd just assert the copyright in the license.md. Then no license.
[17:32:32] KCmetro: has joined #ruby
[17:32:37] cschneid_: yeah, I'm going to ask why the original requester wants this, to guide the right solution
[17:32:55] cschneid_: just mildly surprised there's no "Go look elsewhere" string. Maybe I'll go make a rubygems issue too :)
[17:34:03] Devalo: has joined #ruby
[17:34:36] TomyLobo: has joined #ruby
[17:34:55] havenwood: cschneid_: I think licenses being an empty array might be the best way to say no license. But I see your point that an "All rights reserved" style license would be consistent.
[17:35:19] cschneid_: well, it seems to not fail building if I put arbitrary strings in `license=`, so I'll put "Proprietary" and move on.
[17:35:57] havenwood: cschneid_: Just be warned that someone could publish a "Proprietary" license that means unencumbered. :P
[17:36:09] evansbee: has joined #ruby
[17:36:09] cschneid_: s.license = "Proprietary (See License.md)"
[17:36:25] cschneid_: I don't think you can redefine legal terms like that. Judges wouldn't approve.
[17:36:25] havenwood: cschneid_: :-)
[17:36:52] karapetyan: has joined #ruby
[17:37:25] karapetyan: has joined #ruby
[17:38:43] 7YUABIM50: has joined #ruby
[17:40:32] RushPL: has joined #ruby
[17:40:59] arooni-mobile: has joined #ruby
[17:42:57] zacts: has joined #ruby
[17:43:41] matp: has joined #ruby
[17:44:32] deecross: has joined #ruby
[17:44:40] arooni-mobile: has joined #ruby
[17:46:28] milesmatthias: has joined #ruby
[17:46:43] ghr: has joined #ruby
[17:46:48] tubuliferous: has joined #ruby
[17:46:50] roamingdog: has joined #ruby
[17:48:05] KCmetro: has joined #ruby
[17:48:20] blackmesa: has joined #ruby
[17:48:55] Coldblackice: has joined #ruby
[17:50:09] akira616: has joined #ruby
[17:52:07] ascarter: has joined #ruby
[17:53:12] dfinninger: has joined #ruby
[17:53:34] sepp2k: has joined #ruby
[17:54:37] nankyokusei: has joined #ruby
[17:54:38] sebstrax: has joined #ruby
[17:54:41] arooni-mobile: has joined #ruby
[17:55:09] AndrewIsHere: has joined #ruby
[17:55:20] tAn: has joined #ruby
[17:55:22] JakFrist: has joined #ruby
[17:57:59] CloCkWeRX: has joined #ruby
[17:58:13] stephan_: has joined #ruby
[17:58:19] ghr: has joined #ruby
[17:59:59] agentmeerkat: has joined #ruby
[18:01:28] karapetyan: Hello, how to check method was passed as argument without calling it? https://repl.it/C9T4/1
[18:01:44] tokynet: has joined #ruby
[18:02:00] karapetyan: if method == false # always calling method (method).
[18:02:24] mattwashere: has joined #ruby
[18:02:24] jhass: karapetyan: you can't pass a method without calling it
[18:02:34] jhass: you can get an object that describes a method and pass that object
[18:02:54] jhass: you can pass the name of a method as symbol and call it with public_send
[18:03:09] jaguarmagenta: has joined #ruby
[18:03:17] jhass: but just writing the name of a method already calls it, always
[18:03:34] karapetyan: jhass: okay, thank you!
[18:03:39] Pupeno: has joined #ruby
[18:03:43] gregf: has joined #ruby
[18:04:42] arooni-mobile: has joined #ruby
[18:04:54] SilverKey: has joined #ruby
[18:11:05] hipertracker: has joined #ruby
[18:11:05] et09: has joined #ruby
[18:11:07] arooni-mobile: has joined #ruby
[18:11:11] et09: i have an array ['to_i','minutes']
[18:11:19] et09: how do i turn it into a proc which calls those two methods sequentiallyw on a value
[18:11:24] et09: or a lambda really
[18:11:45] Papierkorb: et09: Check out Array#inject and Object#public_send
[18:11:52] et09: ah brilliant, thanks
[18:13:26] et09: well the only thing is i don't want the proc to contain the array
[18:13:34] et09: i want it to just point directly to the methods
[18:13:40] et09: speed is kind of a concern
[18:13:54] karapetyan: has joined #ruby
[18:14:10] Papierkorb: If that's the case, why do you need to have it so dynamic?
[18:14:40] Papierkorb: You also can build the ruby calls from it and then #eval it
[18:14:43] arooni-mobile: has joined #ruby
[18:14:46] ghr: has joined #ruby
[18:14:50] bigkevmcd: has joined #ruby
[18:15:03] et09: it's an interesting story lol
[18:15:25] Papierkorb: Seriously ugly and don't recommend it yadda yadda, but: eval("lambda(x){ x.#{calls.join '.'} }")
[18:15:40] Gasher: has joined #ruby
[18:15:43] et09: calls is programmed-defined
[18:15:45] Papierkorb: err, lambda{|x|, but you get the idea
[18:15:46] et09: programmer*
[18:15:55] et09: so it's not the end of the world
[18:16:34] M-shine: has joined #ruby
[18:17:00] spider-mario: has joined #ruby
[18:17:18] karapetyan: has joined #ruby
[18:17:19] Papierkorb: et09: try the evil method above
[18:17:25] digneety: has joined #ruby
[18:19:11] last_staff: has joined #ruby
[18:21:40] et09: it works
[18:21:52] agit0: has joined #ruby
[18:23:14] dc4: has joined #ruby
[18:24:29] prestorium: has joined #ruby
[18:24:44] arooni-mobile: has joined #ruby
[18:25:44] yfeldblum: has joined #ruby
[18:25:59] symm-: has joined #ruby
[18:26:07] macsteps: has joined #ruby
[18:26:45] jhass: is that really any faster?
[18:27:07] jhass: I expect the two string allocs to be as expensive if not more expensive
[18:28:36] SilverKey: has joined #ruby
[18:28:51] ghr: has joined #ruby
[18:30:13] tAn: has joined #ruby
[18:30:40] Papierkorb: jhass: the idea would be to cache the Proc
[18:30:50] ascarter: has joined #ruby
[18:33:18] Papierkorb: if it weren't for that, i'd /expect/ it to be slower
[18:34:15] arooni-mobile: has joined #ruby
[18:35:37] M-Kodo: has joined #ruby
[18:35:54] moei: has joined #ruby
[18:36:23] leea: has joined #ruby
[18:36:55] postmodern: has joined #ruby
[18:37:56] platzhirsch: has joined #ruby
[18:38:15] ghr: has joined #ruby
[18:40:49] tubuliferous: has joined #ruby
[18:42:02] calmchaos: has joined #ruby
[18:42:13] digneety: has joined #ruby
[18:42:21] isberg: has joined #ruby
[18:43:11] jhass: dunno, tbh everything about this smells terrible
[18:43:45] flashpoint9: has joined #ruby
[18:44:16] arooni-mobile: has joined #ruby
[18:45:15] swills: has joined #ruby
[18:45:30] karapetyan: has joined #ruby
[18:45:47] mattwashere: has joined #ruby
[18:45:53] burgestrand: has joined #ruby
[18:46:06] burgestrand: has left #ruby: ()
[18:46:28] dopamean_: has joined #ruby
[18:46:34] mattwashere: has joined #ruby
[18:46:38] macsteps: has joined #ruby
[18:48:11] vuoto: has joined #ruby
[18:48:16] nullFxn: has joined #ruby
[18:49:11] nankyokusei: has joined #ruby
[18:49:49] todd_dsm_wk: Odd question, but I'm hoping to get a greater understanding of the state of JRuby. No distro seems to be supporting it very well. Is it too new? Is it dying? Just looking for developer observation here; nothing technical.
[18:50:16] ghr: has joined #ruby
[18:50:20] jhass: headius: ^
[18:50:46] headius: todd_dsm_wk: definitely not dying...we have hundreds or thousands of companies using it
[18:51:02] Papierkorb: todd_dsm_wk: There's #jruby, which at least up until two months ago, was far from dying, in fact, it was pretty active over there
[18:51:06] nullFxn: has joined #ruby
[18:51:20] todd_dsm_wk: headius: that's good to know.
[18:51:21] headius: Papierkorb: still very active most days
[18:51:27] Papierkorb: headius: thought as much :)
[18:51:45] headius: todd_dsm_wk: what distro?
[18:52:04] todd_dsm_wk: Papierkorb: I didn't really want to ask the JRuby people how it was doing. I figured the answer would support the movement :-)
[18:52:05] Papierkorb: I guess with JRuby it's a bit like many things (big?) companies use. You don't hear from it all the time if you're not invested into it, but it's alive and well
[18:52:16] headius: yeah that's a big part of it unfortunately
[18:52:21] todd_dsm_wk: headius: I've tried fedora, it flat sucked.
[18:52:42] headius: fedora should have up to date packages but I don't know who is maintaining them now
[18:52:43] Kus: has joined #ruby
[18:52:45] Dimik: has joined #ruby
[18:52:52] Papierkorb: todd_dsm_wk: ArchLinux has the recent jruby in its repository, works flawlessly
[18:53:04] todd_dsm_wk: Now I'm looking at debian, it has jruby 1.2 available but we need 1.7 which is in their "unstable" repo.
[18:53:15] headius: ugh, they're way behind then
[18:53:22] Papierkorb: Apart from that, you could use chruby+ruby-install to install it locally if you don't want to use the plain JAR yourself
[18:53:26] headius: 1.7 will EOL at end of year even
[18:53:59] headius: we'd be happy to publish debs and rpms with every release if someone contributed the right magic
[18:54:04] todd_dsm_wk: Papierkorb: maybe that's what I'm missing; I'm just a lowly sysadmin trying to make sense of this thing.
[18:54:17] arooni-mobile: has joined #ruby
[18:54:18] headius: we haven't thusfar because each distro's package maintainer insists on them doing their own
[18:54:26] headius: or they usually do
[18:54:38] Papierkorb: todd_dsm_wk: Ah. Yeah, so, most (all?) ruby version managers should have support for JRuby. You may have to install a JVM for it though.
[18:54:46] todd_dsm_wk: headius: I'd be willing to build the chip-in on building a .deb package.
[18:55:23] zacts: has joined #ruby
[18:55:24] headius: there is this which seems to be updated recently: https://github.com/jruby/jruby/wiki/JRubyDistributions
[18:56:18] todd_dsm_wk: Papierkorb: I have openjdk-8-jdk and openjdk-8-jre-headless installed. that seems to make the devs happy.
[18:56:39] burgestrand: has joined #ruby
[18:57:05] pdoherty: has joined #ruby
[18:57:25] burgestrand: has joined #ruby
[18:57:27] headius: you should only need headless but it doesn't matter
[18:57:29] todd_dsm_wk: headius: jeeze - windows is ahead here. that's got to be bad.
[18:57:39] headius: yeah we publish an installer for Windows
[18:57:55] headius: other packages would just be another artifact
[18:58:07] mattwashere: has joined #ruby
[18:59:24] banisterfiend: has joined #ruby
[18:59:38] rbennacer: has joined #ruby
[18:59:46] headius: todd_dsm_wk: if you think you can help us set up a .deb open an issue at bugs.jruby.org
[18:59:50] headius: I think it's worth doing
[19:00:13] mattwashere: has joined #ruby
[19:00:31] todd_dsm_wk: reading back, the 1.7 package will EOL at the end of this year?
[19:01:11] solocshaw: has joined #ruby
[19:01:55] todd_dsm_wk: headius: re: the .deb package - I've just emailed them today: debian-java@lists.debian.org to see what the process is for providing them with a package.
[19:02:06] Vingador: has joined #ruby
[19:02:25] todd_dsm_wk: I've installed the 1.2 version so I know where they *would* want everything to go.
[19:04:06] M-mistake: has joined #ruby
[19:04:18] arooni-mobile: has joined #ruby
[19:05:17] Es0teric: has joined #ruby
[19:05:39] calmchaos: has joined #ruby
[19:06:21] freerobby: has joined #ruby
[19:06:58] calmchaos: has joined #ruby
[19:07:00] arooni: has joined #ruby
[19:07:21] ghr: has joined #ruby
[19:07:23] todd_dsm_wk: Maybe I should be asking, if you guys were going to install jruby 1.7 what method would you use?
[19:08:22] postmodern: has joined #ruby
[19:08:30] polll: has joined #ruby
[19:08:30] mdw: has joined #ruby
[19:08:55] Papierkorb: jhass, et09: I was curios so I bench'd eval vs inject for this: https://gist.github.com/Papierkorb/c56c874ea4feac772b12fb62aa6eb080 (eval is ~5.1 times faster)
[19:09:38] Papierkorb: Though it would've been surprising if it were the other way round..
[19:10:22] headius: todd_dsm_wk: we usually recommend a Ruby switch (like rvm) or just unpacking tarball
[19:10:32] headius: the tarball we publish is a binary and should run anywhere there's a JVM
[19:10:40] Papierkorb: Readability-wise, I'm not sure if the #inject one is better.
[19:11:43] todd_dsm_wk: I think regardless of whatever distro, I'll just have to script out this install. If that's the best/most-supportable method then that's pretty much all I got left.
[19:12:14] todd_dsm_wk: what's the #inject one?
[19:12:16] headius: the tarball instructions are pretty simple, so it's up to you
[19:12:30] headius: unpack, put in bin, optionally install jruby-launcher for a native executable
[19:12:32] Papierkorb: todd_dsm_wk: Was not directed at you, sorry for the confusion
[19:12:37] headius: er put bin in PATH
[19:13:11] headius: bbiab...stop by #jruby if you have any other questions :-)
[19:14:18] havenwood: todd_dsm_wk: Here's how ruby-install installs the JRuby tarball: https://github.com/postmodern/ruby-install/blob/master/share/ruby-install/jruby/functions.sh
[19:14:19] arooni-mobile: has joined #ruby
[19:14:30] arooni: has joined #ruby
[19:14:39] blackmesa: has joined #ruby
[19:15:18] havenwood: todd_dsm_wk: You can fetch the latest JRuby checksums and install the most recent version with: ruby-install --latest jruby
[19:15:33] macsteps: has joined #ruby
[19:15:48] havenwood: todd_dsm_wk: Or it's indeed easy to do yourself since they package a nice precompiled tarball!
[19:15:50] todd_dsm_wk: havenwood: that seems easy enough to document/teach.
[19:16:10] codecop: has joined #ruby
[19:16:10] rbennacer: has joined #ruby
[19:16:35] todd_dsm_wk: I'm not really worried about me. I'm concerned with handing it off to a bunch of developers that love it but can't maintain it without my intervention.
[19:16:49] djbkd: has joined #ruby
[19:17:00] todd_dsm_wk: But this (ruby-install --latest jruby) looks great.
[19:17:35] shinnya: has joined #ruby
[19:17:49] dionysus70: has joined #ruby
[19:19:08] matp: has joined #ruby
[19:20:18] ghr: has joined #ruby
[19:20:28] havenwood: todd_dsm_wk: Installing with ruby-install and switching with chruby makes it dead simple, if that's all you need.
[19:20:57] havenwood: chruby will autodetect the ruby-install default installation location or you can tell it where to look
[19:21:18] havenwood: to switch to latest jruby for example: chruby jruby
[19:21:23] Frank: has joined #ruby
[19:21:43] Frank: has left #ruby: ("out")
[19:21:48] havenwood: todd_dsm_wk: chruby just puts the Ruby and gem bin/ in PATH and correctly sets other env vars like GEM_HOME, GEM_PATH, etc
[19:21:53] arthurl: has joined #ruby
[19:21:57] todd_dsm_wk: havenwood: I'm on with my dev right now. He knows what you're talking about :-)
[19:22:19] havenwood: todd_dsm_wk: :-)
[19:23:09] arthurl: hi guys- trying to understand if this is valid ternary operator syntax
[19:23:13] arthurl: var = (Rails.env.production? or Rails.env.studio?) ? "https://www.test1.com" : "https://test2.com"
[19:23:19] Xeago_: has joined #ruby
[19:24:02] Papierkorb: arthurl: looks fine
[19:24:19] arthurl: Papierkorb thank you sir
[19:24:20] arooni-mobile: has joined #ruby
[19:25:10] arooni: has joined #ruby
[19:25:54] havenwood: arthurl: `=` has a higher precedence than `or`
[19:26:09] pawnbox: has joined #ruby
[19:26:48] arthurl: havenwood are you saying the parentheses here don't matter? and/or that I should be using || instead?
[19:27:30] havenwood: arthurl: Yeah, you should be using the boolean or `||` instead.
[19:27:37] Papierkorb: arthurl: Prefer || and && in general, the precedence rules of 'and' and 'or' are probably unexpected
[19:27:49] Olipro: has joined #ruby
[19:27:50] havenwood: arthurl: The `and` and `or` are for flow control.
[19:28:48] havenwood: arthurl: What you have is like: Rails.env.studio? if Rails.env.production?
[19:28:54] havenwood: arthurl: You're really wanting a boolean expression.
[19:29:36] smathy: With the || you don't require parens.
[19:29:54] arthurl: i see- so for what i'm trying to do that syntax is wrong after all
[19:30:27] smathy: Not wrong, just not using the operators in an idiomatic way.
[19:31:04] arthurl: var = Rails.env.production? || Rails.env.studio? ? "https://www.test1.com" : "https://test2.com"
[19:31:39] arthurl: unless Rails.env.production? || Rails.env.studio?
[19:31:46] arthurl: cool thanks guys- i appreciate the help
[19:31:47] agentmeerkat: has joined #ruby
[19:31:57] havenwood: arthurl: Happy coding!
[19:32:02] rbennacer: has joined #ruby
[19:32:58] bogn: has joined #ruby
[19:33:09] arthurl: havenwood thanks - I'm a backend/devops guy that's taking a stab at ruby/ror
[19:33:52] havenwood: arthurl: If you didn't already know there's a #RubyOnRails channel too if you run into Rails-specific stuff.
[19:34:21] arooni-mobile: has joined #ruby
[19:34:28] ChiefAlexander: has joined #ruby
[19:34:29] arthurl: havenwood yup on there as well- very rarely post on irc as i try to google things to the best of my ability but sometimes you guys are way faster :)
[19:34:35] arooni: has joined #ruby
[19:35:32] JoshGlzBrk: has joined #ruby
[19:35:57] akira616: has joined #ruby
[19:36:20] tao_: has joined #ruby
[19:37:54] wigust: has joined #ruby
[19:38:48] GodFather: has joined #ruby
[19:39:03] wigust: has joined #ruby
[19:40:03] ascarter: has joined #ruby
[19:41:32] bogn: has joined #ruby
[19:41:46] A124: has joined #ruby
[19:41:55] solars: has joined #ruby
[19:42:56] rbennacer: has joined #ruby
[19:43:46] elifoster: has joined #ruby
[19:43:53] arooni-mobile: has joined #ruby
[19:43:59] kavanagh: has joined #ruby
[19:44:12] arooni: has joined #ruby
[19:45:17] ReK2: has joined #ruby
[19:45:17] ReK2: has joined #ruby
[19:45:49] ghr: has joined #ruby
[19:48:38] SilverKey: has joined #ruby
[19:48:39] Mattx: has joined #ruby
[19:50:12] ekinmur: has joined #ruby
[19:50:21] kirun: has joined #ruby
[19:51:05] al2o3-cr: has joined #ruby
[19:52:14] whathappens: has joined #ruby
[19:53:19] dhollinger: has joined #ruby
[19:53:23] todd_dsm_wk: havenwood: you were right, dead simple. I did noticed that it auto-pulled java-7-openjdk as well - slick.
[19:53:50] arooni-mobile: has joined #ruby
[19:54:17] arooni: has joined #ruby
[19:54:53] Pupeno: has joined #ruby
[19:54:53] Pupeno: has joined #ruby
[19:55:20] ghr: has joined #ruby
[19:57:09] rbennacer: has joined #ruby
[19:57:12] tjbiddle: has joined #ruby
[19:58:46] rbennacer: has joined #ruby
[19:59:46] mattwashere: has joined #ruby
[20:00:17] dtzuzu: has joined #ruby
[20:00:44] weaksauce: has joined #ruby
[20:02:13] mattwashere: has joined #ruby
[20:02:58] arooni: has joined #ruby
[20:03:22] arooni-mobile: has joined #ruby
[20:03:55] jaguarmagenta: has joined #ruby
[20:06:44] macsteps: has joined #ruby
[20:06:51] ghr: has joined #ruby
[20:07:13] roshanavand: has joined #ruby
[20:07:17] hutch34_: has joined #ruby
[20:07:20] ghr: has joined #ruby
[20:07:50] ghr: has joined #ruby
[20:08:24] ghr: has joined #ruby
[20:09:20] ghr: has joined #ruby
[20:09:26] jenrzzz: has joined #ruby
[20:09:42] vuoto: has joined #ruby
[20:09:45] artisangoose: has joined #ruby
[20:10:07] artisangoose: Anyone out there looking for a small project to work on? Need a small amount of Ruby code written.
[20:11:18] hck89: has joined #ruby
[20:11:50] arooni: has joined #ruby
[20:11:54] arooni-mobile: has joined #ruby
[20:12:44] Pupeno: has joined #ruby
[20:12:44] Pupeno: has joined #ruby
[20:13:33] pawnbox: has joined #ruby
[20:14:06] mistermocha: has joined #ruby
[20:14:13] LoneHermit: has joined #ruby
[20:14:22] workmad3: has joined #ruby
[20:14:42] dc4: has joined #ruby
[20:17:09] artisangoose: Anyone out there looking for a small project to work on? Need a small amount of Ruby code written.
[20:17:54] bogn1: has joined #ruby
[20:18:18] havenwood: artisangoose: Say more about the project? Someone might bite.
[20:18:22] Spami: has joined #ruby
[20:18:37] artisangoose: Simply need an omniauth plugin written for OpenProject that will allow SSO with GitLab https://www.openproject.org/open-source/development/create-omniauth-plugin/
[20:19:06] xue: has joined #ruby
[20:19:23] ghr: has joined #ruby
[20:19:59] pawnbox: has joined #ruby
[20:21:38] arthurl: Braintree::Configuration.environment = Rails.env == "production" || Rails.env == "studio" ? :production : :sandbox
[20:21:52] arthurl: anything wrong w/ that syntax?
[20:21:55] arooni-mobile: has joined #ruby
[20:22:14] zacstewart: has joined #ruby
[20:22:30] arooni: has joined #ruby
[20:24:21] nando293921: has joined #ruby
[20:24:37] smathy: Another common idiom in ruby when comparing the one thing to a number of options is to do: %w[production studio].include?(Rails.env) ? ....
[20:25:40] nettoweb: has joined #ruby
[20:25:50] bogn: has joined #ruby
[20:25:57] Pupeno: has joined #ruby
[20:27:21] zeroDi: has joined #ruby
[20:27:56] arthurl: smathy thanks taking a look at the %w documentation now
[20:28:34] smathy: arthurl, oh sorry, that's just ruby sugar for: ["production", "studio"]
[20:29:11] arthurl: can't hurt to know
[20:29:13] AngryBuzzy: has joined #ruby
[20:29:14] smathy: ...my point was to do `[a, b].include?(value)` instead of `value == a || value == b`
[20:29:21] ghr: has joined #ruby
[20:29:38] arooni-mobile: has joined #ruby
[20:29:42] arthurl: i see- that's cleaner for sure
[20:30:05] arthurl: thank you- the actual devs might feel threatened though :)
[20:30:07] jhass: I'm actually not sure I agree for just two values
[20:30:28] nogic: has joined #ruby
[20:31:15] nogic: has joined #ruby
[20:31:38] smathy: Yeah, six of one for me with two, this being list-ish would probably sway me.
[20:32:15] skade: has joined #ruby
[20:32:59] blackgoat: has joined #ruby
[20:33:03] todd_dsm_wk: havenwood: I gotta say - pretty slick. thanks again.
[20:33:08] spudowiar: has joined #ruby
[20:33:44] dc4: has joined #ruby
[20:34:49] bogn: has joined #ruby
[20:38:06] arooni-mobile: has joined #ruby
[20:39:20] mwlang: has joined #ruby
[20:40:15] hutch34_: has joined #ruby
[20:40:57] Gasher: has joined #ruby
[20:41:28] arooni: has joined #ruby
[20:43:15] bogn: has joined #ruby
[20:44:04] Blurr: has joined #ruby
[20:44:23] ghr: has joined #ruby
[20:46:42] postapocallyptic: has joined #ruby
[20:47:03] postapocallyptic: is there a channel for rails?
[20:47:11] smathy: #rubyonrails
[20:48:13] postapocallyptic: ruby is general app language and rails is for web right?
[20:48:30] postapocallyptic: or can rails be used to make pc apps too?
[20:48:45] jhass: not in a sensible manner
[20:50:08] Pupeno: has joined #ruby
[20:50:40] replay: has joined #ruby
[20:51:37] neanderslob: has joined #ruby
[20:52:12] yqt: has joined #ruby
[20:53:49] whathappens: has joined #ruby
[20:53:52] drbrain: although it has happened with a web view UI that talks HTTP to a server running on localhost
[20:53:53] ghr: has joined #ruby
[20:54:16] blackmesa: has joined #ruby
[20:55:17] ur5us: has joined #ruby
[20:56:03] digneety: has joined #ruby
[20:56:53] triangles: has joined #ruby
[20:59:49] skade: has joined #ruby
[21:03:04] Oclair_: has joined #ruby
[21:03:53] chouhoul_: has joined #ruby
[21:03:53] ghr: has joined #ruby
[21:07:19] akira616: lol what pc app was made with rails?
[21:07:54] akira616: i know apple uses Ember for iTunes stuff
[21:10:11] johnmilton: has joined #ruby
[21:10:39] drbrain: I don't recall, but it's similar to how the Slack app works, the server was local instead
[21:10:45] drbrain: it might have been a toolkit?
[21:10:47] jrabe: has joined #ruby
[21:12:05] loocash: has joined #ruby
[21:12:41] blackmesa: has joined #ruby
[21:12:42] artisangoose: Has anyone worked with OmniAuth?
[21:13:17] hxegon: what's the deal with Array#zip? blocks return nil?
[21:13:49] sdwrage: has joined #ruby
[21:13:54] ghr: has joined #ruby
[21:14:50] jnoob22: has joined #ruby
[21:15:25] LoneHerm_: has joined #ruby
[21:17:18] pawnbox: has joined #ruby
[21:17:42] davedev24: has joined #ruby
[21:17:50] tvw: has joined #ruby
[21:17:55] LoneHerm_: has joined #ruby
[21:19:11] swills: has joined #ruby
[21:24:41] burgestrand: has joined #ruby
[21:26:58] smathy: hxegon, I can't imagine any (good) use for that, side effect by design.
[21:27:17] johnmilton: has joined #ruby
[21:27:39] JeanCarloMachado: has joined #ruby
[21:28:28] ghr: has joined #ruby
[21:29:03] tubuliferous: has joined #ruby
[21:31:05] platzhirsch: has joined #ruby
[21:31:37] symm-: has joined #ruby
[21:31:57] zacstewart: has joined #ruby
[21:32:36] jooni: has joined #ruby
[21:32:51] elifoster: has joined #ruby
[21:33:23] SilverKey: has joined #ruby
[21:34:10] bruce_lee: has joined #ruby
[21:34:31] terrabl: has joined #ruby
[21:35:41] terrabl: Hey guys, how would I use gsub or sub to change this string {"gametitle"=>"FIFA"} into this {"gametitle"=>/FIFA/} I understand that gsub is global sub and I know that sub only does the first occurance so could I make it so sub does the 3rd and 4th occurances?
[21:35:59] hxegon: smathy: right? I #zip seems like a weird rough spot
[21:36:24] nettoweb: has joined #ruby
[21:36:28] shevy: terrabl that looks like a hash
[21:36:40] flashpoint9: has joined #ruby
[21:36:53] Jayson_Virissimo: has joined #ruby
[21:36:53] drbrain: terrabl: use => as an anchor to find the second set of "
[21:37:19] drbrain: terrabl: hint: http://rubular.com
[21:37:19] hxegon: positive look behind, but using a regex to perform hash operations is, uh, bad.
[21:37:35] terrabl: That's what I was thinking but could you further explain how to get to that using sub?
[21:37:40] Pupeno: has joined #ruby
[21:38:10] eljimmy: has joined #ruby
[21:38:10] smathy: ACTION is afraid what's going to happen next with that string - *cough* eval *sadpanda*
[21:38:26] ghr: has joined #ruby
[21:38:33] drbrain: ugh, hint failed, this is the right link: http://rubular.com/r/uQ54NpjbqX
[21:39:05] allcentury: has joined #ruby
[21:39:40] drbrain: terrabl: how do you match a " after => in regexp?
[21:40:19] terrabl: Yeah, i have never really worked with regex but I understand matching, just not replacing.
[21:40:21] smathy: ACTION loves the idea of a lookbehind for the string => ;)
[21:40:28] smathy: Wide spaceship.
[21:40:40] hxegon: terrabl: use capture groups
[21:40:43] hxegon: lol smathy
[21:40:54] drbrain: terrabl: if you know how to match then you're most of the way there
[21:41:42] hxegon: if this is a hash couldn't you just use Regex.new(hash['gametitle'])?
[21:41:46] drbrain: … I would approach this as let's wrap FIFA in different characters
[21:41:52] drbrain: hxegon: it's not a hash, it's a String
[21:41:57] wigust: has joined #ruby
[21:42:12] drbrain: hxegon: '{"gametitle"=>"FIFA"}' to '{"gametitle"=>/FIFA/}'
[21:42:16] hxegon: it looks like a hash shoved into a string
[21:42:27] smathy: (or maybe the REPL output ;)
[21:43:25] haxrbyte_: has joined #ruby
[21:44:16] wigust: has joined #ruby
[21:44:25] hxegon: I have an idea
[21:46:05] ketherah: has joined #ruby
[21:46:06] hxegon: have to test something
[21:46:11] hxegon: >> require 'json'
[21:46:12] ruby[bot]: hxegon: # => true (https://eval.in/601565)
[21:46:35] smathy: => isn't JSON
[21:46:37] apeiros: => ain't json
[21:46:59] apeiros: there's literal_parser which can handle the above. without eval.
[21:47:02] baweaver: >> this == 'json'
[21:47:03] ruby[bot]: baweaver: # => undefined local variable or method `this' for main:Object (NameError) ...check link for more (https://eval.in/601571)
[21:47:22] baweaver: ACTION grumbles
[21:47:25] soahccc: Hey guys. I have an odd problem and I just can't troubleshoot it... I use chruby (if that matters) and a ruby daemon (using daemons gem). The project used to run fine but now using daemon's "start" it fails while "run" still works... very odd I think: https://gist.github.com/2called-chaos/94e2fc50b3390749d025c65b65231d2d
[21:48:03] baweaver: does the user have httparty gem installed?
[21:48:12] baweaver: (*the user running the daemon)
[21:48:31] baweaver: https://gist.github.com/2called-chaos/94e2fc50b3390749d025c65b65231d2d#file-start-log-L9
[21:49:17] soahccc: baweaver: it uses bundler and bundles into vendor/bundle so yeah it is installed. also both "run" and "start" were ran by the same user
[21:49:19] johnmilton: has joined #ruby
[21:49:30] Blurr: has left #ruby: ("Leaving")
[21:50:01] hxegon: >> require 'json'; hash = JSON.parse('{"gametitle"=>"FIFA"}'.gsub('=>', ':')); hash['gametitle'] = Regexp.new(hash['gametitle']); hash
[21:50:02] ruby[bot]: hxegon: # => {"gametitle"=>/FIFA/} (https://eval.in/601573)
[21:50:52] calmchaos: has joined #ruby
[21:50:55] soahccc: I tried to debug it by printing some enviromental variables... They use the same ruby, etc. This is why I have no explanation of what is going south here
[21:52:23] hxegon: >> require 'json'; hash = JSON.parse('{"gametitle"=>"FIFA"}'.gsub('=>', ':')); hash['gametitle'] = Regexp.new(hash['gametitle']); hash.to_s # whoops
[21:52:24] ruby[bot]: hxegon: # => "{\"gametitle\"=>/FIFA/}" (https://eval.in/601574)
[21:52:31] isberg: has joined #ruby
[21:53:06] dikaio: has joined #ruby
[21:54:09] banisterfiend: has joined #ruby
[21:57:06] tAn: has joined #ruby
[21:57:36] cd-rum: has joined #ruby
[21:57:48] davedev24: has joined #ruby
[21:58:05] arthurl: why is it that my my 'irb' doesn't throw errors?
[21:58:08] skade: has joined #ruby
[21:58:23] arthurl: basically i'm just trying to write/test simple ruby code from irb on osx
[21:58:24] Gasher: has joined #ruby
[21:59:36] jhass: why should it?
[21:59:42] coffeecupp: has joined #ruby
[21:59:52] jhass: in other words what do you expect to throw an error?
[22:00:29] akira616: has left #ruby: ("Leaving")
[22:00:45] Guest43: has joined #ruby
[22:00:46] arthurl: i'd expect a shell to throw syntax errors?
[22:00:51] akira616: has joined #ruby
[22:01:07] jhass: I mean what do you enter
[22:01:13] Guest43: has joined #ruby
[22:01:17] jhass: make a screenshot or so
[22:01:18] arthurl: well like anything "adfasdf"
[22:01:23] arthurl: after i press enter
[22:01:47] jhass: you might have started an unfinished expression the line before
[22:02:11] toretore: arthurl: copy your irb session and paste on gist.github.com
[22:02:17] jhass: like if you type for foo in bar; do; and then stuff you don't get an error until you write done
[22:02:24] arthurl: ahh jhass that was it :)
[22:02:25] jhass: in your regular shell
[22:02:30] arthurl: rookie mistake..
[22:02:53] jhass: arthurl: notice how the prompt changes ;)
[22:02:57] arthurl: toretore jhass was right- i somehow started an expression and didn't end it
[22:03:26] ghr: has joined #ruby
[22:03:44] arthurl: you mean 004:0 to 005:1 for example?
[22:05:28] soahccc: baweaver: Oh man, I figured it out.. It was so subtle... It was a different instance. tst and test... These typos sometimes
[22:05:56] jhass: sounds like you need better variable names :P
[22:06:03] skade: has joined #ruby
[22:06:08] isberg: Is "&&" a reserved keyword in Ruby? I can't manage to override it like I can with ">>" and ">"
[22:06:25] jenrzzz: has joined #ruby
[22:06:25] jenrzzz: has joined #ruby
[22:06:26] jhass: isberg: yes, && is actually syntax and not a method call
[22:06:34] isberg: jhass Aha, thanks!
[22:06:46] isberg: I'll stick with &
[22:06:56] jhass: same for ||, and, or, if, unless, while, until, begin, rescue, def, class, module
[22:07:08] jhass: not I believe is rewritten to ! which is a method
[22:07:51] isberg: | and & works
[22:07:58] havenwood: isberg: http://docs.ruby-lang.org/en/2.3.0/keywords_rdoc.html
[22:08:12] LoneHerm_: has joined #ruby
[22:08:16] leea: has joined #ruby
[22:08:48] soahccc: jhass: you meant me with the variable names? It was the name of the instance/config
[22:09:08] jhass: then better name for that :P
[22:09:18] havenwood: isberg: http://www.zenspider.com/Languages/Ruby/QuickRef.html#reserved-words
[22:09:45] isberg: havenwood Thanks!
[22:09:59] jhass: havenwood is out secret factoid bot, in case anybody didn't notice yet
[22:10:38] soahccc: jhass: well "test" might not be the best name to name something but the problem was that I at some point must have started the process with a typo (tst) so that the daemon kept restarting growing a 186GB log file :D I was debugging the correct "test" one
[22:10:40] ur5us: has joined #ruby
[22:10:47] pawnbox: has joined #ruby
[22:10:48] havenwood: https://github.com/gioele/factoid#readme
[22:11:13] ascarter: has joined #ruby
[22:12:42] Mathuin: has joined #ruby
[22:14:24] skade: has joined #ruby
[22:14:53] Mathuin: I have identified a commit which has introduced a regression. The commit was on March 17, 2011, and fails when copying files to an NFS-mounted directory. I found the issue when building Ruby 2.3.1 but it's still in trunk today. What should I do?
[22:16:46] Oclair: has joined #ruby
[22:17:18] havenwood: Mathuin: See if you can find a related issue here: https://bugs.ruby-lang.org/projects/ruby-trunk/issues
[22:17:22] jhass: if there's a ticket on https://bugs.ruby-lang.org/ about it, mention it there, else open a new one
[22:17:34] jhass: I'm just too slow for the factoid bot :(
[22:17:51] mkosaki: has joined #ruby
[22:19:56] nankyokusei: has joined #ruby
[22:20:36] Mathuin: The actual problem is with File.open(), which appears to be in io.c if I understand correctly.
[22:21:14] Mathuin: How hard is it to generate a C traceback instead of a Ruby traceback when an error comes up?
[22:21:58] rodfersou: has joined #ruby
[22:22:23] xlegoman: has joined #ruby
[22:22:27] ghr: has joined #ruby
[22:27:19] ensyde__: has joined #ruby
[22:28:16] Kerea: has joined #ruby
[22:29:49] dikaio: has joined #ruby
[22:30:58] bogn: has joined #ruby
[22:31:07] jrabe: has joined #ruby
[22:31:12] davedev24: has joined #ruby
[22:32:00] ghr: has joined #ruby
[22:32:47] ur5us: has joined #ruby
[22:33:03] zacstewart: has joined #ruby
[22:33:26] Mathuin: I think that question was poorly formed. I apologize. The Ruby traceback includes 'Permission denied @ rb_sysopen' which points at rb_sysopen (io.c:5424 in master) but the only failure path I see in that function is rb_sys_fail_path, which doesn't seem to include an error.
[22:33:49] haxrbyte: has joined #ruby
[22:33:52] zenlot6: has joined #ruby
[22:34:03] Mathuin: I thought a C traceback might tell me whether it failed in rb_sysopen or rb_sysopen_internal or rb_thread_call_without_gvl or somewhere else down the rabbit hole.
[22:35:34] n90b0jjf: has joined #ruby
[22:37:07] eam: Mathuin: it's pretty easy, just attach gdb and break on whatever function you like
[22:37:50] eam: you could also try using something to trace system calls and look for any that fail
[22:38:02] eam: assuming it's an error bubbling up from a call and not something else
[22:38:56] Mathuin: eam: okay, for gdb I'll probably have to recompile with debug enabled or something, so I'll try strace first.
[22:39:10] postmodern: has joined #ruby
[22:39:14] skade: has joined #ruby
[22:39:19] bdonnahue: has left #ruby: ()
[22:41:50] ReK2GnULinuX: has joined #ruby
[22:43:25] spectra: has joined #ruby
[22:43:46] darix: Mathuin: permission denied sounds like you arent allowed to open the file?
[22:43:58] ghr: has joined #ruby
[22:44:12] darix: so it probably bubbled up from some open() call.
[22:44:30] AlexRussia: has joined #ruby
[22:45:18] Mathuin: darix: File.open() to be precise. I do have permission to open the file, it's just that File.open() calls that include modes fail on NFS for some reason while File.open() calls without succeed.
[22:45:22] karapetyan: has joined #ruby
[22:46:01] eam: I've run into similar
[22:46:10] Mathuin: https://github.com/ruby/ruby/commit/c7837ed8d3ec3a74382927df7c2fae19862b78ea changed the implementation of copy_file to use the mode, which breaks stuff.
[22:46:54] darix: Mathuin: can you run with: strace -Ff -s 1024 ruby /path/to/rubyscript.rb
[22:47:21] Mathuin: darix: it shows up for me when I run 'rbenv build 2.3.1' but I am working on a simpler working example.
[22:48:04] Mathuin: https://github.com/rubygems/rubygems/issues/1161 is the same issue in rubygems, with a fix -- but it's a better idea to actually fix File.open().
[22:49:29] macsteps: has joined #ruby
[22:50:14] pawnbox: has joined #ruby
[22:50:45] darix: Mathuin: zenspider replied to you
[22:51:05] Mathuin: Oooh! Thanks for telling me.
[22:52:13] ur5us: has joined #ruby
[22:53:02] tubuliferous: has joined #ruby
[22:56:43] Mathuin: Updated the system gems, which installed rubygems 2.6.6. Rerunning 'rbenv install' (not 'rbenv build', that doesn't exist) to see what happens next.
[22:58:27] coffeecupp: has joined #ruby
[22:58:46] Hobogrammer: has joined #ruby
[22:59:04] SilverKey: has joined #ruby
[23:00:57] aryaching: has joined #ruby
[23:02:59] ghr: has joined #ruby
[23:03:27] Mathuin: Same problem with 2.2.1 :-(
[23:03:36] Mathuin: And 2.3.1 of course, nothing in rubygems changing will change that.
[23:03:56] n90b0jjf: has joined #ruby
[23:04:29] JeanCarloMachado: has joined #ruby
[23:05:25] mistermocha: has joined #ruby
[23:06:47] Xeago_: has joined #ruby
[23:08:03] RegulationD: has joined #ruby
[23:08:36] darix: i am so happy to be on opensuse. thy just have packages for 2.2 and 2.3
[23:08:38] AndrewIsHere: has joined #ruby
[23:08:59] Mathuin: I confess I am hopelessly spoiled by Python's virtualenv.
[23:09:55] Mathuin: The benefits of package-specific installs trump the costs of package-specific script execution.
[23:10:05] Mathuin: Alas rbenv folks disagree.
[23:10:40] mtkd: has joined #ruby
[23:13:26] flashpoint9: has joined #ruby
[23:13:51] rkazak: has joined #ruby
[23:14:36] n90b0jjf: has joined #ruby
[23:14:36] johnny56_: has joined #ruby
[23:14:59] ghr: has joined #ruby
[23:16:30] skade: has joined #ruby
[23:17:39] isberg: Any suggestions on how to decrease the start up time for Ruby? Is crystal-lang.org the way to go, or any other suggestions?
[23:18:06] cdg: has joined #ruby
[23:19:25] havenwood: isberg: ruby -e "0" 0.04s user 0.01s system 78% cpu 0.067 total
[23:19:42] pawnbox: has joined #ruby
[23:19:48] havenwood: isberg: How slow is your Ruby startup??
[23:20:13] darix: time ruby --disable=gems -e '0'
[23:20:18] havenwood: isberg: If you want fast, Crystal is generally a good way to go.
[23:20:19] isberg: I'm currently having some scripts in my bash prompt
[23:20:25] havenwood: ruby --disable=gems -e '0' 0.01s user 0.01s system 51% cpu 0.020 total
[23:20:37] Renich: has joined #ruby
[23:20:41] isberg: They run on each command, which is starting to get slow
[23:21:02] darix: isberg: you could e.g. cache the output of the ruby script and refresh the cache event based
[23:21:14] darix: (with an event different "draw prompt")
[23:22:10] isberg: That would work, but is hoping for a less hacky one :)
[23:23:00] unreal: has joined #ruby
[23:23:03] darix: isberg: for me "only run than needed" is the real solution.
[23:23:28] isberg: s/then/when?
[23:23:56] isberg: That won't solve my problem :)
[23:24:13] isberg: To be more correct, it will solve it, but then I've a new one
[23:24:47] shevy: this is how it should be
[23:24:47] havenwood: ./0 0.00s user 0.00s system 34% cpu 0.014 total
[23:24:54] cd-rum_: has joined #ruby
[23:25:23] isberg: shevy What should be?
[23:25:30] Renich: has joined #ruby
[23:25:32] shevy: isberg that you solve one problem and then you have a new one!
[23:25:41] shevy: you won't win speed contests with ruby
[23:26:17] havenwood: shevy: here are some fun ones: https://github.com/kostya/benchmarks
[23:26:19] darix: isberg: what does the ruby script do anyway?
[23:26:55] shevy: havenwood cool... ruby scores decently well on ... uhm ... Base64!
[23:27:27] shevy: what is "Ruby Topaz"? Don't think I have read that before
[23:27:42] darix: shevy: ruby on pypy?
[23:27:48] havenwood: shevy: jruby-dev-truffle-graal ftw: http://jruby.org/bench9000/
[23:27:49] havenwood: shevy: RPython implementation of Ruby
[23:27:52] isberg: shevy In this case it calculates git stats
[23:28:23] darix: isberg: so you might even be slowed down by git
[23:28:26] darix: not ruby itself
[23:28:32] darix: cache the result
[23:28:55] havenwood: shevy: 30+ times faster is fast
[23:29:40] isberg: darix It's fast in bash
[23:29:48] PlasmaStar: has joined #ruby
[23:30:07] isberg: darix --disable=gems increased the speed x 3
[23:30:10] isberg: Awesome, thanks!
[23:30:20] shevy: some slow gems!
[23:30:35] roamingdog: has joined #ruby
[23:30:47] isberg: With gems it's about 10 times faster
[23:32:03] shevy: now this would be cool
[23:32:08] shevy: a ruby to crystal converter
[23:32:11] isberg: darix Expiring caches is not something I would work with
[23:32:36] isberg: Should be fairly easy to implement as it is now
[23:35:02] zacstewart: has joined #ruby
[23:40:35] pawnbox: has joined #ruby
[23:41:17] isberg: Should be fairly easy to implement as it is now
[23:42:00] ghr: has joined #ruby
[23:43:25] pdoherty: has joined #ruby
[23:44:14] karapetyan: has joined #ruby
[23:44:53] cdg: has joined #ruby
[23:48:15] cdg: has joined #ruby
[23:50:47] koooge: has joined #ruby
[23:51:31] ghr: has joined #ruby
[23:54:45] charliesome: has joined #ruby
[23:54:54] stardiviner: has joined #ruby
[23:55:19] basex: has joined #ruby