« Back to channel list

#ruby - 13 January 2016

« Back 1 day Forward 1 day »
[00:00:05] chimche: has joined #ruby
[00:01:26] dlitvak: has joined #ruby
[00:02:06] ajf-: has joined #ruby
[00:03:39] mary5030: has joined #ruby
[00:04:04] bubbys: has joined #ruby
[00:04:31] underplank: has joined #ruby
[00:06:13] hannelita: has joined #ruby
[00:07:00] froome: has joined #ruby
[00:08:48] zotherstupidguy: has joined #ruby
[00:09:03] hahuang65: has joined #ruby
[00:09:11] ympeg: has joined #ruby
[00:09:20] zotherstupidguy: whats a good ruby webserver for handling big uploads? and why?
[00:09:32] froome: I'm getting an error when I try to pass a variable containing a URL to open(), but no error when passing the same URL directly, any insight on this? http://pastebin.com/TSyfsMpp
[00:09:33] ruby[bot]: froome: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/7364ab24072d3ee947d2
[00:09:34] ruby[bot]: froome: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[00:09:47] Prominent: has joined #ruby
[00:09:47] Ox0dea: Calm down, bots!
[00:10:28] apeiros: .mute helpa !P should disable pastebin message
[00:10:29] ruby[bot]: +qqqq $a:helpa Radar!*@* helpa!*@* *!*@162.243.140.224
[00:10:55] froome: https://gist.github.com/7364ab24072d3ee947d2
[00:11:05] apeiros: -qq Radar!*@* *!*@162.243.140.224
[00:11:21] apeiros: whoops? whota thunked they run on the same machine :D
[00:11:25] apeiros: -o apeiros
[00:12:14] Ox0dea: froome: Check that that header actually contains an appropriate value.
[00:12:30] zotherstupidguy: froome print the variable before using it to see it
[00:13:11] shevy: awww ruboto versus helpa, another round of epic bot battle
[00:13:26] zotherstupidguy: helpa is quicker
[00:13:28] apeiros: ya, Radar unmuted it a tad too early
[00:13:34] shevy: oh wait... who is ruby[bot]
[00:14:10] zotherstupidguy: guys, server of choice when dealing with file uploads?
[00:14:11] apeiros: shevy: it's the usurper of ruboto
[00:14:36] weemsledeux: has joined #ruby
[00:15:16] zotherstupidguy: i found this to be pretty good resource on the subject, https://www.nateberkopec.com/2015/07/29/scaling-ruby-apps-to-1000-rpm.html
[00:15:30] froome: Ox0dea: zotherstupidguy: imgofme2 and imgofme3 are equal
[00:15:52] willv: has joined #ruby
[00:17:38] atomical_: has joined #ruby
[00:18:19] zotherstupidguy: uri = URI.parse("http://www.ruby-lang.org/en/")
[00:18:23] j416: has joined #ruby
[00:18:32] sfr^: has joined #ruby
[00:18:39] guacamole: has joined #ruby
[00:19:05] underplank: has joined #ruby
[00:19:53] zotherstupidguy: froome i would check http://ruby-doc.org/stdlib-2.3.0/libdoc/open-uri/rdoc/OpenURI.html
[00:19:57] zotherstupidguy: hope that helps
[00:19:59] al2o3-cr: >> require('uri'); URI("https://ruby-lang.org/en").host
[00:20:01] ruby[bot]: al2o3-cr: # => "ruby-lang.org" (https://eval.in/501371)
[00:20:31] al2o3-cr: >> RUBY_VERSION
[00:20:33] ruby[bot]: al2o3-cr: # => "2.3.0" (https://eval.in/501373)
[00:21:51] underplank: has joined #ruby
[00:22:45] froome: zotherstupidguy: Ox0dea: https://gist.github.com/anonymous/8aa1431f9f76e000c631
[00:23:23] dlitvak_: has joined #ruby
[00:23:54] p337rB: has joined #ruby
[00:25:13] pawnbox: has joined #ruby
[00:25:32] sfr^: has joined #ruby
[00:25:45] zotherstupidguy: >> def leet s; s.tr! 'aeiost', '431057'; p s end; leet "al2o3-cr is elite"
[00:25:47] ruby[bot]: zotherstupidguy: # => "4l203-cr 15 3l173" ...check link for more (https://eval.in/501376)
[00:27:11] al2o3-cr: >> RubyVM::InstructionSequence.compile_option.keys.grep /frozen/
[00:27:12] ruby[bot]: al2o3-cr: # => [:frozen_string_literal, :debug_frozen_string_literal] (https://eval.in/501377)
[00:27:14] underplank: has joined #ruby
[00:27:25] makenoise: has joined #ruby
[00:27:46] zotherstupidguy: froome your gist, shows an array and a string, they are not the same!
[00:29:16] cajone: has joined #ruby
[00:29:17] zotherstupidguy: froome try imgofme2[0].to_s maybe that works for you!!
[00:30:11] baweaver: has joined #ruby
[00:31:04] zotherstupidguy: froome try imgofme2*"" looks cooler :)
[00:31:29] froome: zotherstupidguy: doh! thanks!
[00:34:22] makenoise: has joined #ruby
[00:35:56] scottschecter: has joined #ruby
[00:39:18] kies^: has joined #ruby
[00:40:33] sfr^: has joined #ruby
[00:41:01] programmerq: has joined #ruby
[00:42:10] Rodya_: has joined #ruby
[00:42:36] northfurr: has joined #ruby
[00:44:33] sfr^: has joined #ruby
[00:44:58] guacamole: has joined #ruby
[00:45:22] gizless: has joined #ruby
[00:48:28] Kallis: has joined #ruby
[00:48:29] Scripore: has joined #ruby
[00:48:34] sfr^: has joined #ruby
[00:49:06] mrmargolis: has joined #ruby
[00:49:06] mfb2: has joined #ruby
[00:51:31] guacamole: has joined #ruby
[00:51:52] mfb2_: has joined #ruby
[00:52:27] hannelita: has joined #ruby
[00:52:36] sfr^: has joined #ruby
[00:52:38] jenrzzz: has joined #ruby
[00:53:43] dlitvak: has joined #ruby
[00:54:34] sfr^: has joined #ruby
[00:55:26] underplank: has joined #ruby
[00:56:56] atomical: has joined #ruby
[00:58:33] sfr^: has joined #ruby
[00:59:31] allcentury: has joined #ruby
[01:02:02] chimche: has joined #ruby
[01:04:27] certainty: has joined #ruby
[01:04:55] underplank: has joined #ruby
[01:05:33] Mirry: has joined #ruby
[01:06:02] papercode: has joined #ruby
[01:08:13] dlitvak_: has joined #ruby
[01:08:33] KnownSyntax: has joined #ruby
[01:08:35] KnownSyntax: has joined #ruby
[01:10:09] iateadonut: has joined #ruby
[01:10:36] sfr^: has joined #ruby
[01:13:15] northfurr: has joined #ruby
[01:13:52] sfr^: has joined #ruby
[01:14:16] TomPeed: has joined #ruby
[01:14:22] jenrzzz: has joined #ruby
[01:16:41] cdg: has joined #ruby
[01:20:26] chipotle: has joined #ruby
[01:21:17] dstarh: has joined #ruby
[01:21:36] shpoont: has joined #ruby
[01:21:52] programmerq: has joined #ruby
[01:21:53] nerfando: has joined #ruby
[01:22:55] DLSteve: has joined #ruby
[01:23:30] dlitvak: has joined #ruby
[01:24:39] sfr^: has joined #ruby
[01:29:58] asmodlol: has joined #ruby
[01:33:40] blt: has joined #ruby
[01:33:41] weaksauce: has joined #ruby
[01:35:40] bluOxigen: has joined #ruby
[01:36:27] ledestin: has joined #ruby
[01:37:32] RobertBirnie: has joined #ruby
[01:38:21] jamw: has joined #ruby
[01:42:24] janebootydoe: has joined #ruby
[01:43:17] growGROW: has joined #ruby
[01:43:20] Rodya_: has joined #ruby
[01:43:28] griffindy: has joined #ruby
[01:48:00] DLSteve: has joined #ruby
[01:49:42] kobain: has joined #ruby
[01:50:32] sfr^: has joined #ruby
[01:50:40] bkxd: has joined #ruby
[01:52:04] ruby-lang727: has joined #ruby
[01:53:46] chimche: has joined #ruby
[01:56:15] arescorpio: has joined #ruby
[01:58:26] Mirry: has joined #ruby
[01:58:29] baweaver: has joined #ruby
[01:59:01] sfr^: has joined #ruby
[01:59:18] loatbac: has joined #ruby
[02:00:32] loatbac: anyone here use any neat gems?
[02:00:33] TomPeed: has joined #ruby
[02:00:54] neanderslob: has joined #ruby
[02:00:55] al2o3-cr: loatbac: snowman gem is awesome
[02:01:06] loatbac: whats it do
[02:01:19] Ox0dea: loatbac: https://rubygems.org/gems/unicode_snowman
[02:02:08] hannelita: has joined #ruby
[02:02:31] loatbac: i like tree pretty well https://rubygems.org/gems/tree
[02:03:00] loatbac: i'm pretty new to ruby though, don't know too many gems
[02:03:34] Ox0dea: $ gem search | wc -l
[02:03:43] Ox0dea: loatbac: There's only, like, a couple thousand.
[02:03:53] loatbac: yes tons of them
[02:04:03] Ox0dea: >> require 'prime'; 111373.prime?
[02:04:04] ruby[bot]: Ox0dea: # => true (https://eval.in/501398)
[02:04:07] loatbac: i've played around a bit with gosu and shoes
[02:04:12] loatbac: good for guis
[02:04:19] blt: has joined #ruby
[02:05:05] al2o3-cr: the rainbow gem is pretty cool :p
[02:06:04] Ox0dea: `lolcat` uses ruby-paint nowadays.
[02:06:08] Ox0dea: Maybe it always did.
[02:06:25] freerobby: has joined #ruby
[02:06:50] Ox0dea: Er, it's just called paint.
[02:07:17] al2o3-cr: where is turtle that should be stdib
[02:07:23] allcentury: has joined #ruby
[02:07:59] brendan-: has joined #ruby
[02:08:04] Ox0dea: al2o3-cr: https://rubygems.org/gems/salamander
[02:08:12] Ox0dea: Salamander > turtle.
[02:09:14] loatbac: anyone here switched from another language?
[02:09:55] hahuang65: has joined #ruby
[02:10:05] al2o3-cr: loatbac: have you?
[02:10:13] Ox0dea: loatbac: If you're here to let somebody else make up your mind, choose Ruby. :P
[02:10:16] loatbac: nah not really
[02:10:18] havenwood: has joined #ruby
[02:10:26] loatbac: i've fiddled around with some others
[02:10:32] loatbac: but not really used them a lot
[02:10:44] al2o3-cr: loatbac: what you fiddled in?
[02:10:50] loatbac: i kinda want to learn python as well, but i still think ruby will be better
[02:10:56] loatbac: i tried to do java
[02:11:07] loatbac: and i played a bit with lua and c++
[02:11:15] al2o3-cr: Lua is gooodddd
[02:11:38] Moosashi: has joined #ruby
[02:11:49] yeticry: has joined #ruby
[02:12:02] al2o3-cr: loatbac: but ruby is better (but i'm biased) :P
[02:12:20] loatbac: lua is pretty fast isn't it?
[02:12:26] Ox0dea: JavaScript is faster.
[02:12:27] KineticX: has joined #ruby
[02:13:09] al2o3-cr: javascript is the turbo charged (believe)
[02:14:09] loatbac: what ide or text editor do you guys use?
[02:14:19] al2o3-cr: loatbac: pico
[02:14:21] mostlybadfly: has joined #ruby
[02:14:56] colegatron: has joined #ruby
[02:14:56] al2o3-cr: and vim when i can get out of it
[02:15:35] loatbac: i did the tutorial for vim but havent used it for anything since then
[02:15:44] loatbac: its pretty neat
[02:15:55] al2o3-cr: nah vim's cool
[02:16:29] al2o3-cr: just use what you feel comfortable with
[02:16:39] mdih: has joined #ruby
[02:16:47] mahk: has joined #ruby
[02:17:10] loatbac: i've been using textmate, just a basic text editor with syntax highlighting for various languages
[02:17:13] pik: has joined #ruby
[02:17:27] al2o3-cr: happy days :)
[02:17:45] jud: has joined #ruby
[02:19:03] al2o3-cr: loatbac: i use pencil and paper
[02:19:21] weemsledeux: has joined #ruby
[02:20:39] Ox0dea: I use a butterfly.
[02:20:56] Ox0dea: !xkcd 378
[02:20:59] Ox0dea: apeiros plz
[02:23:09] loatbac: ( ???? ???? ????)
[02:23:17] al2o3-cr: !fact add butterfly https://xkcd.com/378/
[02:23:40] Ox0dea: !fact add xkcd %d https://xkcd.com/%d/
[02:24:22] al2o3-cr: Ox0dea: Isn't that limnoria?
[02:24:37] Ox0dea: al2o3-cr: Could be anything.
[02:25:00] al2o3-cr: Seems to ring a bell :P
[02:26:17] shevy: I timetravel in order to write code
[02:26:51] al2o3-cr: now that could be anything :P
[02:28:21] chimche: has joined #ruby
[02:31:51] robbyoconnor: has joined #ruby
[02:31:56] robbyoconnor: has joined #ruby
[02:32:05] derailed: has joined #ruby
[02:35:55] ferz_: has joined #ruby
[02:37:49] ferz_: has joined #ruby
[02:38:13] tenderlove: has joined #ruby
[02:39:06] cpup: has joined #ruby
[02:39:26] ferz_: has joined #ruby
[02:41:08] dn5: has joined #ruby
[02:41:23] dn5: Yo guys.. I stuck again, check out this gist: https://gist.github.com/dn5/6e5cda4328b0a9d2dc78
[02:41:42] dn5: Code doesn't work for second JSON example
[02:42:04] dn5: Maybe Ox0dea, you could give me a hint
[02:42:49] Ox0dea: dn5: Sure. The block you give Hash#each receives two arguments.
[02:43:12] Ox0dea: Since you're only declaring one (`child`), it's receiving both.
[02:44:02] Ox0dea: >> result = nil; {a: 1, b: 2}.each { |child| result = child }; result
[02:44:04] ruby[bot]: Ox0dea: # => [:b, 2] (https://eval.in/501404)
[02:44:44] Bloomer: has joined #ruby
[02:45:28] dn5: Eh.. I still can't wrap my head around it. So does it actually have to separate each here for a particular key or?
[02:45:34] chimche: has joined #ruby
[02:45:43] jamw: has joined #ruby
[02:45:58] akem: has joined #ruby
[02:46:10] Ox0dea: dn5: You should declare your block to take two parameters (`key` and `value` are great names here) and proceed accordingly.
[02:46:51] Ox0dea: DATA 1 is an array of hashes, DATA 2 is just a hash.
[02:47:10] Ox0dea: You won't be able to apply the exact same algorithm; they're just differently structured data.
[02:47:36] gm987: has joined #ruby
[02:47:51] nfk|laptop: has joined #ruby
[02:48:30] dn5: ahh.. makes sense. now I'm either thinking about writing another function but first detect if it's array of hashes or a hash.. But I'm pretty sure there is more faster and common way
[02:48:51] gm987: has left #ruby: ()
[02:49:52] pawnbox: has joined #ruby
[02:50:03] Ox0dea: dn5: If you want to "array-ify" some random object, just use it as an argument to Kernel#Array.
[02:50:18] Ox0dea: >> [Array(1), Array([1])]
[02:50:19] ruby[bot]: Ox0dea: # => [[1], [1]] (https://eval.in/501406)
[02:50:24] al2o3-cr: dn5: if your using ruby 2.3 you could do hash.dig(:release, :version)
[02:50:42] Ox0dea: dn5: You want Kernel#Array, not Hash#dig.
[02:50:57] al2o3-cr: on the second one i mean sorry
[02:51:22] dn5: Ox0dea, never heard of Kernel#Array. Let me check the docs
[02:51:36] dn5: al2o3-cr, I'm on 1.9.3
[02:51:42] Ox0dea: http://i.imgur.com/Ufbr5ej.gif
[02:51:45] nfk|laptop: is that even supported?
[02:51:48] chimche1: has joined #ruby
[02:52:14] Ox0dea: dn5: Upgrade that corpse forthwith!
[02:52:15] nfk|laptop: dn5, upgrade your ruby installation to at least 2.0
[02:52:49] dn5: I'm just experimenting guys
[02:52:51] nfk|laptop: the differences between 1.9 and 2.0 iirc are annoying enough that you'll not want to port stuff later on
[02:52:53] Ropeney: has joined #ruby
[02:52:55] Ox0dea: Experiment better.
[02:53:09] nfk|laptop: where did you even get something that old? some ancient windows binary?
[02:53:11] Ox0dea: 19>> %i[symbol arrays]
[02:53:12] ruby[bot]: Ox0dea: # => /tmp/execpad-6ca6c4af6901/source-6ca6c4af6901:2: unknown type of %string ...check link for more (https://eval.in/501407)
[02:53:45] karapetyan: has joined #ruby
[02:53:52] _Tariq: has joined #ruby
[02:54:43] dn5: nfk|laptop, Ox0dea yep :/ gonna update it
[02:55:05] sleetdrop_: has joined #ruby
[02:55:08] _Tariq: I want to know of any legal software license that would allow me to link to it instead of copying and pasting the whole text
[02:55:11] _Tariq: of the license
[02:55:29] _Tariq: Just a simple software license for code snippets, in case somebody believes they can't use it
[02:55:33] sleetdrop: has joined #ruby
[02:55:33] nfk|laptop: _Tariq, the license is what you write
[02:56:08] Ox0dea: _Tariq: Are your snippets that amazing?
[02:56:08] nfk|laptop: _Tariq, for pastebin or publication?
[02:56:15] Ox0dea: nfk|laptop: For Gists.
[02:56:17] nfk|laptop: Ox0dea, beware of them
[02:56:34] _Tariq: Yeah, for gists usually
[02:56:38] nfk|laptop: Ox0dea, i really don't have brain cells for tsukoming that
[02:56:49] nfk|laptop: _Tariq, are you in US of A?
[02:57:21] nfk|laptop: then say I _Tariq hereby release this code into public domain.
[02:57:23] nfk|laptop: maybe add year
[02:57:32] nfk|laptop: if you totally don't care what happens to them
[02:57:42] _Tariq: That could work. A crayon license.
[02:57:43] Ox0dea: But then French people won't be able to use it.
[02:57:53] Ox0dea: France doesn't observe public domain.
[02:58:06] nfk|laptop: Ox0dea, i thought that matters to french citizens
[02:58:10] nfk|laptop: also that's why i asked about us of a
[02:58:24] Ox0dea: To be clear, we're talking about licensing Gists.
[02:58:28] Ox0dea: Which is retarded.
[02:58:37] nfk|laptop: pretty much everywhere else you can't relinquish your author rights or whatever they're called into public domain yourself
[02:59:14] nfk|laptop: Ox0dea, but are you sure that US public domain is copyrighted in EU?
[02:59:20] jamw: has joined #ruby
[02:59:29] Ox0dea: Where did I say as much?
[02:59:39] nfk|laptop: [04:57] <Ox0dea> But then French people won't be able to use it.
[03:00:37] ajf-: has joined #ruby
[03:00:48] fatih: has joined #ruby
[03:00:55] fatih: Hi everyone
[03:01:10] nfk|laptop: _Tariq, anyway, to give a more complete answer (IANAL, ya ken) you can also say that they can do whatever or just put it under ISC license which is what i use
[03:01:30] nfk|laptop: for stuff i want to publish and don't care what happens to it
[03:02:04] krz: has joined #ruby
[03:02:32] fatih: I'm looking for a book which aims for programmers who knows already 1-2 languages very well
[03:02:47] _Tariq: nfk|laptop: Got it
[03:02:57] _Tariq: So I will just find some way to handle it
[03:02:57] fatih: Is there any recommendation? It shouldn't be a book that teaches programming from ground
[03:03:09] northfurr: has joined #ruby
[03:03:20] fatih: I'm new to Ruby and would like to have something that teaches the basics in a short time
[03:03:21] _Tariq: Ox0dea: The only reason I'm worried about licensing Gists is that I want people to use my code but am afraid they might think a few lines of code is copyrightable
[03:03:35] nfk|laptop: fatih, if you know any language really well, just dive in?
[03:03:36] _Tariq: and thus will be deterred from using my code
[03:04:15] nfk|laptop: al2o3-cr, i do actually sometimes get that feeling to
[03:04:17] fatih: a book helps you to show the most important part in a very dense way, there is a reason for it
[03:04:22] nfk|laptop: though i try my best to shrug it off
[03:04:31] nfk|laptop: and i'm talking from the perspective of user there
[03:04:50] al2o3-cr: this is a joke right?
[03:04:54] nfk|laptop: fatih, ruby koans
[03:05:10] certainty: has joined #ruby
[03:05:11] nfk|laptop: al2o3-cr, make of it whatever you want, if it makes you laugh, good for you
[03:05:38] nfk|laptop: fatih, there's also codeschool rails course which is how i started before moving on to koans
[03:05:49] _Tariq: fatih: RubyMonk is also a good course as well
[03:05:55] bronson: has joined #ruby
[03:06:00] _Tariq: Try also Ruby's Codecademy class as well
[03:06:13] fatih: Ok looking into it, thanks a lot for the suggestions
[03:06:17] bkxd: has joined #ruby
[03:06:20] nfk|laptop: oh, not rails but ruby course at codeschool
[03:06:42] dopie: has joined #ruby
[03:06:45] _Tariq: Also, "The Well Grounded Rubyist" and "Learn to Program"
[03:06:50] nfk|laptop: their rails for zombies course is more famous but you always start with pure ruby
[03:06:51] _Tariq: are two books that focus on Ruby.
[03:07:08] nfk|laptop: yeah, ruby has really good books
[03:07:10] _Tariq: Well-Grounded Rubyist is a bit more technical so if you already have experience in other languages, you'll like it
[03:07:24] _Tariq: I have also heard of the Pickaxe book, but I never read it.
[03:07:24] nfk|laptop: meanwhile python has some crazy nice irc community
[03:07:40] nfk|laptop: and python has bindings to almost everything but ruby (probably)
[03:07:43] _Tariq: Is there any way to copy the irc chat and paste it into a book?
[03:07:54] djbkd_: has joined #ruby
[03:08:05] nfk|laptop: hopefully not
[03:08:18] DanielI: has joined #ruby
[03:08:20] nfk|laptop: but i'm sure nsa has perfected the art of it anyway
[03:08:23] al2o3-cr: _Tariq: why would you wanna do that?
[03:08:30] _Tariq: al2o3-cr: It's a joke
[03:08:45] al2o3-cr: Oh, it's you the joker
[03:08:47] _Tariq: A jokey suggestion by which python might be able to have a good book like the Ruby community
[03:08:55] _Tariq: al2o3-cr: Yeah, I guess my jokes aren't that good.
[03:09:00] _Tariq: well, that joke.
[03:09:08] _Tariq: The other license nonsense wasn't a joke.
[03:09:18] _Tariq: But...er...that's a bit offtopic.
[03:10:22] mloveless: has joined #ruby
[03:10:29] nfk|laptop: _Tariq, anyway, be sure your license is not as long or longer than the actual code
[03:10:35] nfk|laptop: if it is, make it sorter
[03:11:08] nfk|laptop: or just skip it entirely, hopefully whoever decides to borrow a line or two knows how to adapt it to their code
[03:11:13] mloveless: has left #ruby: ()
[03:11:43] _Tariq: Yeah, ISC seems to be a good fit for me. Only 120 words.
[03:11:48] nfk|laptop: and even if they didn't unless it has some really weird stuff like granny_achings_special_variable no one will be able to prove it's not original code anyway
[03:11:58] nfk|laptop: _Tariq, still long in my books
[03:12:10] _Tariq: Yeah, there really needs to be something even simpler.
[03:12:23] al2o3-cr: _Tariq: Willing to share the code?
[03:12:29] nfk|laptop: dwtfyw licence
[03:12:59] _Tariq: al2o3-cr: Sure, I can do that
[03:13:12] _Tariq: At least the code that got me kinda upset
[03:13:16] nfk|laptop: al2o3-cr, are you hoping it's a code to select the best license out there?
[03:13:22] al2o3-cr: _Tariq: Link?
[03:13:27] lacuna: has joined #ruby
[03:13:28] lacuna: has joined #ruby
[03:13:35] hxegon: has joined #ruby
[03:13:46] _Tariq: https://github.com/tra38/rps
[03:13:59] _Tariq: This was a long time ago, but this code has annoyed me to no end
[03:14:38] _Tariq: 183 words for the code, 173 words for the MIT license.
[03:14:49] nfk|laptop: _Tariq, you are missing the point, every file must have a preamble, at least classically
[03:15:06] nfk|laptop: i'm really not sure any license applies if you don't specify it in the file
[03:15:27] _Tariq: I thought if it's in the README or there is a license file
[03:15:29] _Tariq: that's it.
[03:15:37] _Tariq: it applies all over the code unless specifically mentioned not
[03:15:59] _Tariq: Here's another gist: https://gist.github.com/tra38/cf8226a55c5a49531f57
[03:16:12] nfk|laptop: IANAL but i'm suspecting that stuff is technically (at least by the EU style copyright law) under a proprietary license
[03:16:41] _Tariq: er, which stuff?
[03:17:10] juddey: has joined #ruby
[03:17:29] _Tariq: UNLICENSE: 199 words, Code (excluding the paragraphs array): 49 words
[03:17:47] nfk|laptop: _Tariq, you do not need to put the full license text in every file but normally you'd have a small or not so small preamble that states year, author(s), copyright holder (not sure about order there) and usually on another line the license name at least or or something.
[03:18:15] _Tariq: This is going to annoying fast.
[03:18:23] _Tariq: Especially because I have already created a lot of repos
[03:18:32] _Tariq: with files that do not have that preamble.
[03:19:05] nfk|laptop: _Tariq, there, see this as an example https://github.com/mpv-player/mpv/blob/master/video/vdpau.c
[03:19:26] havenwood: >> Gem::Licenses::IDENTIFIERS
[03:19:28] ruby[bot]: havenwood: # => ["0BSD", "AAL", "ADSL", "AFL-1.1", "AFL-1.2", "AFL-2.0", "AFL-2.1", "AFL-3.0", "AGPL-1.0", "AGPL-3.0 ...check link for more (https://eval.in/501408)
[03:19:29] nfk|laptop: i just picked a random file from the best multi-platform video player
[03:19:45] northfurr: has joined #ruby
[03:19:57] pawnbox: has joined #ruby
[03:20:27] nfk|laptop: _Tariq, i don't think it's that important
[03:20:45] nfk|laptop: for one, i can't imagine anyone wanting to reuse or even finding your code, sorry
[03:20:55] _Tariq: ...yeah, that is true
[03:21:05] _Tariq: But just in case, you know.
[03:21:09] _Tariq: Always handling edge cases.
[03:22:24] nfk|laptop: then you get to write a ruby script to relicense your code and push the new versions
[03:22:56] _Tariq: ...oh dear.
[03:24:01] nfk|laptop: it will be the most useful code you have written so far, probably, and a good practice
[03:24:08] Ox0dea: nfk|laptop: http://ruby.sadi.st/Flay.html
[03:24:25] Ox0dea: Regarding Granny's variable.
[03:24:26] nfk|laptop: and once you get to it you'll find it will have taken much less time than you expected as long as you KISS
[03:24:28] Moosashi: has joined #ruby
[03:25:38] nfk|laptop: Ox0dea, i was being a bit sarcastic there
[03:27:04] nfk|laptop: Ox0dea, i seriously do not think you can prove anything from just few lines
[03:27:05] dn5: Ox0dea, I may found the way how to deal with the problem I wrote. On first example, the hash.count returns 2, while on second, it always return 1. I just need to rewrite a function for the second data example
[03:28:13] Ox0dea: >> {a: 1}.size # dn5
[03:28:14] ruby[bot]: Ox0dea: # => 1 (https://eval.in/501409)
[03:28:15] nbdy: has joined #ruby
[03:28:28] Ox0dea: It's returning the number of key-value pairs.
[03:28:39] Ox0dea: You want Kernel#Array, my friend.
[03:29:19] nfk|laptop: like if i had foos.map! { |nfk_special_sauce| nfk_special_sauce++ } and someone re-used it with just different identifier in place of foos it would be very indemnifying but otherwise it's as generic as they come
[03:29:40] dn5: Ox0dea, It will work. The second example always return one "release"
[03:30:12] Ox0dea: dn5: But don't you want to treat it like all the other results?
[03:30:24] psye: has joined #ruby
[03:32:13] dn5: Ox0dea: I don't have to. I just need the output it in the same "style" as first example. But I need to figure out how to do hash.each for a single hash and not array of hashes
[03:33:10] dopie: has joined #ruby
[03:33:45] nfk|laptop: dn5, countless ways, the worst is by using [*array]
[03:33:54] jbrhbr: has joined #ruby
[03:34:20] nfk|laptop: the best is to write your code in a way that you never have to "solve" such issues
[03:34:50] dn5: Ic.. it's still experimenting.
[03:34:53] nfk|laptop: note that while it works you are unpacking an array within an array which is at best brain-dead
[03:35:49] Ox0dea: dn5: https://eval.in/501412
[03:35:56] UtkarshRay: has joined #ruby
[03:36:04] Ox0dea: I called it `foo`; you're calling it `hash`. Do you see the problem?
[03:36:31] Ox0dea: nfk|laptop: Then why does Kernel#Array exist?
[03:36:47] Ox0dea: `Array(foo) == [*foo]` for all `foo`.
[03:37:06] nfk|laptop: i have no idea what Kernel even is for
[03:37:28] Ox0dea: Then you should stop offering "advice".
[03:37:32] nfk|laptop: the only kernels i know are linux kernel and kernel functions both of which i have fuzzy experience with
[03:37:57] dn5: Ox0dea, ah that make sense man
[03:38:30] dstarh: has joined #ruby
[03:38:39] dn5: much more sense
[03:38:44] Ox0dea: dn5: Your first snippet does indeed work just fine for an array of hashes.
[03:39:01] Ox0dea: So instead of rewriting it, just convert your single hash to a one-element array containing it.
[03:39:05] Ox0dea: Via Kernel#Array.
[03:39:13] davedev24: has joined #ruby
[03:39:42] dn5: which I guess is not supported in my old version of ruby from what I've seen in docs
[03:39:51] Ox0dea: 19>> Array(1)
[03:40:06] ruby[bot]: Ox0dea: # => [1] (https://eval.in/501416)
[03:40:24] dn5: Ah, that type of array. It's a normal array
[03:40:47] Ox0dea: Array is a class, but there is also a method with the same name.
[03:40:50] northfurr: has joined #ruby
[03:41:40] dn5: i'm not clear with my head in 5am
[03:42:09] Ox0dea: dn5: The Array method will convert its argument to an Array (the class) unless the argument was already an array.
[03:42:34] hakunin: has joined #ruby
[03:43:05] dn5: So Array(the_hash) if I'm correct
[03:43:15] Ox0dea: Except that name is terrible.
[03:43:20] Ox0dea: Because sometimes it'll be an array of hashes.
[03:43:33] dn5: It's not in code, just saying
[03:43:40] dn5: Okay, great. Let me try it
[03:43:56] kalopsian: has joined #ruby
[03:44:32] felixdd: has joined #ruby
[03:44:56] Rodya_: has joined #ruby
[03:46:03] sankaber: has joined #ruby
[03:46:12] konsolebox: has joined #ruby
[03:46:58] konsolebox: has joined #ruby
[03:47:03] dn5: Getting [] can't convert String into Integer again
[03:47:33] dn5: Ox0dea, should I .each through newly created Array(hash)?
[03:47:45] konsolebox: has joined #ruby
[03:47:49] mfb2: has joined #ruby
[03:48:19] konsolebox: has joined #ruby
[03:48:58] konsolebox: has joined #ruby
[03:50:07] Ox0dea: dn5: https://eval.in/501422
[03:50:59] Ox0dea: Turns out Kernel#Array separates a Hash argument into key-value pairs. :(
[03:51:03] swgillespie: has joined #ruby
[03:51:28] dn5: I was just checking it out
[03:51:29] radgeRayden_: has joined #ruby
[03:51:48] usershell: has joined #ruby
[03:52:34] Ox0dea: That breaks the generality in the case that you've already got an array of actual hashes, so you have to resort to wrapping it explicitly.
[03:52:37] Ox0dea: Which is kinda lame.
[03:53:02] dn5: My ruby knowledge is lame so what's the matter :p
[03:54:11] Ox0dea: For what it's worth, you're getting that error because you're trying to index into an Array with a String, which is crazy-talk.
[03:54:18] Ox0dea: >> []['foo'] rescue $!
[03:54:19] ruby[bot]: Ox0dea: # => #<TypeError: no implicit conversion of String into Integer> (https://eval.in/501424)
[03:54:30] hxegon: has joined #ruby
[03:56:00] dn5: Ox0dea, ah, ic
[03:58:29] dn5: Ok, no error, but no results either.
[03:58:53] janebootydoe: has joined #ruby
[03:58:56] dn5: hash.each do |child| puts "v" + child[0]['version'].to_s end
[04:00:20] dn5: hash.each do |child| puts "v" + child[0]['release']['version'].to_s end
[04:00:26] dn5: no error, but no result
[04:00:33] dn5: welp, I'll keep trying :p
[04:03:31] hannelita: has joined #ruby
[04:04:08] kies^: has joined #ruby
[04:04:33] jamw: has joined #ruby
[04:04:56] Ox0dea: dn5: Because I don't want you to be stuck on something so silly: https://eval.in/501425
[04:05:21] Ox0dea: Your choice of `child` as the parameter was unnecessarily confusing.
[04:06:10] dn5: Ox0dea, thanks man, you da real MVP. But I just finished my version
[04:06:27] Ox0dea: May I see?
[04:06:54] bkxd: has joined #ruby
[04:07:20] astrobun_: has joined #ruby
[04:07:45] dn5: It's a dirty hack. I add brackets around "release" { { release } } and the old version worked fine with the second example of data too
[04:08:05] bronson: has joined #ruby
[04:08:45] atomical: has joined #ruby
[04:10:37] braincrash: has joined #ruby
[04:10:37] hahuang65: has joined #ruby
[04:11:30] choke: has joined #ruby
[04:11:39] northfurr: has joined #ruby
[04:12:21] zast: has joined #ruby
[04:12:23] nixmaniack: has joined #ruby
[04:12:24] nixmaniack: has joined #ruby
[04:17:28] nfk|laptop: now i remember why ruby sometimes drives me crazy, how do i assign a reference to object or is ruby too functional for that?
[04:18:07] Ox0dea: nfk|laptop: What kind of object?
[04:18:21] speaking1ode: has joined #ruby
[04:18:25] nfk|laptop: an instance to a custom class
[04:18:40] nfk|laptop: like foo.bars = all_bars.sample 10
[04:19:01] jenrzzz: has joined #ruby
[04:19:12] nfk|laptop: and then when i do all_bars.map! { 42 } i expect that...
[04:19:15] hakunin: has joined #ruby
[04:19:18] nfk|laptop: that was dumb
[04:19:27] kp666: has joined #ruby
[04:19:29] nfk|laptop: never mind me
[04:19:39] bronson: has joined #ruby
[04:19:53] astrobun_: has joined #ruby
[04:19:55] nfk|laptop: clearly i'm too tired, night
[04:20:06] dn5: me too.. night
[04:20:07] Ox0dea: Ruby's collection types are already references, but there's always #__id__ and ObjectSpace._id2ref if you really need something crazy.
[04:20:12] dn5: Ox0dea, g'night
[04:20:15] lacuna: has joined #ruby
[04:20:16] Ox0dea: Night, dn5.
[04:20:25] dn5: and thanks btw
[04:20:30] Ox0dea: My pleasure.
[04:20:31] kp666: has joined #ruby
[04:20:31] ozzloy: has joined #ruby
[04:20:31] ozzloy: has joined #ruby
[04:20:40] tenderlove: has joined #ruby
[04:21:19] nfk|laptop: Ox0dea, yeah, when i rewrote the test code to actually do the right thing it worked as expected
[04:21:32] nfk|laptop: that however makes me wonder what happens in case of threading
[04:22:14] Ox0dea: I'm convinced you're a buzzword machine.
[04:22:16] pawnbox: has joined #ruby
[04:22:20] djbkd: has joined #ruby
[04:23:17] tenderlove: has joined #ruby
[04:23:34] User458764: has joined #ruby
[04:24:37] bmalum: has joined #ruby
[04:25:00] houhoulis: has joined #ruby
[04:26:43] jamw: has joined #ruby
[04:27:42] moei: has joined #ruby
[04:27:44] cornerma1: has joined #ruby
[04:28:19] Xiti: has joined #ruby
[04:31:30] astrobun_: has joined #ruby
[04:32:02] djellemah_: has joined #ruby
[04:32:42] djbkd: has joined #ruby
[04:32:49] UtkarshRay: has joined #ruby
[04:33:09] nixmaniack: has joined #ruby
[04:35:41] Scripore: has joined #ruby
[04:36:59] djbkd_: has joined #ruby
[04:40:34] hxegon: has joined #ruby
[04:40:54] yfeldblum: has joined #ruby
[04:41:17] JohnT: has joined #ruby
[04:41:41] pawnbox: has joined #ruby
[04:42:46] kies: has joined #ruby
[04:44:12] rkazak: has joined #ruby
[04:44:36] alphaatom: has joined #ruby
[04:45:39] bobajett: has joined #ruby
[04:46:14] nbdy: has joined #ruby
[04:46:21] bobajett: I need help with naming convention. What should I call a method that does this: def xxx_foo( resource ); foo = get_foo( resource ); if !foo: foo = make_foo(); save(foo); return foo
[04:47:06] bobajett: where Im mapping get_foo() and save_foo() to getting and saving the resource to a DB.
[04:47:41] arup_r: has joined #ruby
[04:48:49] cpup: has joined #ruby
[04:49:04] mary5030: has joined #ruby
[04:49:24] mfb2: has joined #ruby
[04:50:08] jbrhbr: has joined #ruby
[04:52:30] nixmaniack: has joined #ruby
[04:57:58] krz: has joined #ruby
[04:58:16] tmtwd: has joined #ruby
[05:01:40] jbrhbr: has joined #ruby
[05:02:35] gix: has joined #ruby
[05:02:36] kt2: has joined #ruby
[05:03:18] nixmaniack: has joined #ruby
[05:03:34] dopie: has joined #ruby
[05:04:24] hannelita: has joined #ruby
[05:05:06] astrobun_: has joined #ruby
[05:05:29] vdamewood: has joined #ruby
[05:05:53] certainty: has joined #ruby
[05:07:46] sankaber: has joined #ruby
[05:08:26] ohaibbq: has joined #ruby
[05:08:55] guacamole: has joined #ruby
[05:09:23] pawnbox: has joined #ruby
[05:09:49] kies^: has joined #ruby
[05:10:09] mary5030_: has joined #ruby
[05:10:24] hxegon: has joined #ruby
[05:13:25] hahuang65: has joined #ruby
[05:15:19] Cohedrin: has joined #ruby
[05:17:36] mostlybadfly: has joined #ruby
[05:17:55] bmalum: has joined #ruby
[05:19:19] n00bDev: has joined #ruby
[05:19:29] pik: has joined #ruby
[05:21:05] dopie: has joined #ruby
[05:21:05] darkf: has joined #ruby
[05:23:13] atomical: has joined #ruby
[05:25:30] QpQ4: has joined #ruby
[05:27:25] nixmaniack: has joined #ruby
[05:28:02] astrobun_: has joined #ruby
[05:29:08] n1x: has joined #ruby
[05:35:05] JohnT: has joined #ruby
[05:35:14] smactive: Can anyone help me with rspec shared example?
[05:35:34] smactive: I expect it_behaves_like to fail
[05:39:10] krz: has joined #ruby
[05:40:08] User458764: has joined #ruby
[05:40:20] Rodya_: has joined #ruby
[05:42:02] jenrzzz: has joined #ruby
[05:42:11] sigurding: has joined #ruby
[05:51:52] ponga: has joined #ruby
[05:54:59] norc_: has joined #ruby
[05:55:17] norc_: has left #ruby: ()
[05:55:45] norc: has joined #ruby
[05:56:29] norc: Good morning folks
[05:57:49] yfeldblum: has joined #ruby
[06:00:34] ruby-lang995: has joined #ruby
[06:01:04] ruby-lang995: can someone help me on this ruby code in codepen.io
[06:01:12] ruby-lang995: its a few lines of code that need debugging
[06:01:13] ruby-lang995: http://codepen.io/shihanrehman/pen/JGJpmV?editors=101
[06:01:29] ruby-lang995: i believe the code is right but it is not showing up in the window
[06:02:02] terminalrecluse: has joined #ruby
[06:02:51] ruby-lang995: is anyoen there
[06:03:25] norc: ruby-lang995: I think you may be in the wrong channel.
[06:04:24] norc: ruby-lang995: While I would really like ruby methods to be first class objects, I think you are looking for ##javascript.
[06:04:33] dionysus69: has joined #ruby
[06:05:28] hannelita: has joined #ruby
[06:07:40] bkxd: has joined #ruby
[06:08:14] llfwf33: has joined #ruby
[06:08:25] hahuang61: has joined #ruby
[06:08:33] twistedpixels: has joined #ruby
[06:08:52] twistedpixels: has joined #ruby
[06:09:17] llfwf33: has joined #ruby
[06:13:41] usershell: has joined #ruby
[06:19:18] sneakerhax: has joined #ruby
[06:21:22] ur5us: has joined #ruby
[06:22:19] sigurding: has joined #ruby
[06:25:44] sarkis: has joined #ruby
[06:26:51] djbkd: has joined #ruby
[06:27:58] last_staff: has joined #ruby
[06:28:24] argentdrake: has joined #ruby
[06:28:31] fantasticsid: has joined #ruby
[06:29:09] a1ph4g33k: has joined #ruby
[06:29:17] naftilos76: has joined #ruby
[06:29:43] argentdrake: Hello fellow Ruby smiths. I was hoping someone could help me out. I have alot of experience programming so I'm not a newby :) I need to learn rails asap due to bossman's orders. Anyone know where I could pick up ruby so I can get started on rails asap?
[06:30:07] karapetyan: has joined #ruby
[06:30:52] ascarter: has joined #ruby
[06:31:45] a1ph4g33k: argentdrake: You can hit one of the Rails courses on Udemy ... if you stick at it, should only take a few days to bang through the entire course. Or you could go with PragStudio.
[06:32:10] dagda1: has joined #ruby
[06:32:12] a1ph4g33k: argentdrake: Third option ... codeschool.com
[06:32:18] weemsledeux: has joined #ruby
[06:33:43] davedev24: has joined #ruby
[06:33:56] djbkd: has joined #ruby
[06:34:01] norc: has joined #ruby
[06:34:31] alyssadaemon: has joined #ruby
[06:35:17] chouhoul_: has joined #ruby
[06:35:39] last_staff: has joined #ruby
[06:35:40] Cohedrin: agentdrake: 2 things, one #rubyonrails is what you're looking for probably
[06:35:49] sarkis: has joined #ruby
[06:36:15] Cohedrin: but if you have programming experience I would just recommend making an app or something
[06:36:22] Cohedrin: rails is really intuitive, along with ruby
[06:36:39] Cohedrin: if you just start making something and google the parts you need you should have a decent understanding pretty quick
[06:37:12] norc: You should really not start with Ruby on Rails if you are new to Ruby.
[06:39:03] alyssadaemon: RoR will trap you into certain ways that aren???t really ???ruby??? like anything in the activesupport gem
[06:39:55] cscheib: argentdrake: michael hartl's book is free online... or what a1ph4g33k said. Since it's for work, it may be beneficial to sign up for a paid course that allows you to ask questions from a teacher, whether it's instructor led or not
[06:40:07] aganov: has joined #ruby
[06:40:12] northfurr: has joined #ruby
[06:40:37] bronson: has joined #ruby
[06:41:18] Rodya_: has joined #ruby
[06:41:21] znz_jp: has joined #ruby
[06:41:47] fantasti`: has joined #ruby
[06:42:08] Cohedrin: norc: he said he needs to learn rails for his job
[06:42:22] norc: Cohedrin: Even more important to start off with plain Ruby then.
[06:42:28] Cohedrin: why do you say so?
[06:42:49] argentdrake: Thanks for the answers guys
[06:42:54] Xeago: has joined #ruby
[06:43:03] argentdrake: a1ph4g33k: Any of those courses you highly reccomend?
[06:43:18] astrobun_: has joined #ruby
[06:43:20] JohnT: has joined #ruby
[06:43:20] Cohedrin: micheal hartls is pretty popular
[06:43:24] rkazak: has joined #ruby
[06:43:42] Cohedrin: its a very simple to read but detailed book
[06:43:48] alyssadaemon: Cohedrin: I agree with norc, they need to start with basic Ruby. Get the base language first.
[06:43:53] Cohedrin: it walks you through making an entire app
[06:43:55] cscheib: the Hartl book is free, but you can pay for videos and such
[06:44:10] norc: Cohedrin: Rails users dont even understand how mixins work, how method dispatch works, how Enumerable works.
[06:44:23] norc: Those who dont start off learning Ruby first anyway.
[06:44:33] Cohedrin: fair enough, but why do they need to?
[06:44:51] cscheib: the Hartl book starts with a no-ruby-knowledge assumption, iirc
[06:44:55] norc: Cohedrin: They will just see all these Rails things as magic. They will not understand how to debug, how to make changes.
[06:45:32] norc: And Rails has a pretty huge load of magical things that you need to understand first. Like Rails autoloading magic, or how Rails implements concerns.
[06:45:34] Cohedrin: I guess I can see that, but I think as they work on it they'll begin to understand them
[06:45:56] sarkis: has joined #ruby
[06:46:12] cscheib: starting with Ruby first doesn't magically bang that knowledge into your head either
[06:46:15] Cohedrin: I can see where you're coming from, but I don't those reasons alone are enough to say "don't do any rails until you have a full understanding of ruby"
[06:46:35] Cohedrin: I don't really see the argument here, those are all things you pick up as you go along
[06:46:46] cscheib: there's a lot of "magic" that you have to figure out as you learn Ruby as well
[06:47:12] norc: cscheib: Honestly all the magic disappeared when I first visited https://github.com/ruby/ruby
[06:47:26] norc: Quirks remain, but there is nothing magical anymore.
[06:47:50] Cohedrin: that same logic could be applied to the rails repo
[06:47:52] claw: has joined #ruby
[06:48:00] norc: A lot of things become much easier to understand if you dont think in terms of "instance methods" and "class methods" for example. Ruby has only class methods.
[06:48:14] Cohedrin: "all the magic went away once I read the entirety of the source code"
[06:48:21] norc: Not the entirety.
[06:48:34] norc: I just look it up regularly to understand Ruby features.
[06:48:55] cscheib: sure, if you have a solid programming background
[06:50:15] cscheib: but, still, it's not always apparent what's going on from source.
[06:50:19] a1ph4g33k: argentdrake: You get the best return on codeschool.com
[06:50:40] norc: cscheib: Just take my example about "instance" and "class methods"
[06:51:37] TomyLobo: has joined #ruby
[06:51:47] Rinalds: has joined #ruby
[06:51:57] a1ph4g33k: argentdrake: CodeSchool has a whole Ruby class path, including Ruby, Rails, and a set of testing ( both general ruby & rails ) courses.
[06:52:05] cscheib: I'd agree with a1ph4g33k - start there in addition to the Hartl book
[06:52:30] Cohedrin: +1 for hartl
[06:52:54] norc: cscheib: I have just seen too many people in #rubyonrails asking questions like "How do I create a non activerecord model" - which is just a result from not understanding what they are really doing.
[06:53:09] jamw: has joined #ruby
[06:53:48] cscheib: norc: which is honestly mostly a benefit of the language - you get up and running quickly, and worry about the details later
[06:53:55] Ox0dea: <norc> ... I would really like ruby methods to be first class objects...
[06:53:57] Ox0dea: https://eval.in/501472
[06:54:01] Ox0dea: I did a naughty.
[06:54:12] jamw: has joined #ruby
[06:54:14] Ox0dea: It could be pushed so much furthe rtoo.
[06:54:14] cscheib: it's also a negative of the language
[06:54:21] cscheib: but, that comes later.
[06:54:36] Ox0dea: I suspect binding_of_caller could be used to introduce the auto-curried methods as locals. :P
[06:54:41] ascarter: has joined #ruby
[06:54:46] cscheib: some people learn by peeling away layers, rather than ingesting everything all at once
[06:55:04] symm-: has joined #ruby
[06:55:17] cscheib: anyway,they've heard both sides :P
[06:55:24] arup_r: has joined #ruby
[06:56:04] sarkis: has joined #ruby
[06:57:52] norc: Ox0dea: What is this ArgumentError about?
[06:58:19] Ox0dea: norc: It's the Exception that gets raised in the case of an arity mismatch.
[06:59:14] akash_: has joined #ruby
[06:59:40] akash_: Hi Can anyone help me regarding ruby on rails?
[06:59:51] norc: Ox0dea: Oh okay. That took me a second to understand. Ugly hack, nice feature.
[06:59:51] Ox0dea: Smells funny.
[06:59:55] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[06:59:56] bougyman: that's a #rubyonrails channel for that
[07:00:06] Ox0dea: I bet they know.
[07:00:33] bougyman: we should rename this channel to #rubynotrails
[07:00:44] norc: Ox0dea: That suddenly explains why this only works for arity != 0 :-)
[07:00:50] Ox0dea: norc: Indeed. :P
[07:01:00] Ox0dea: All sorts of methods already do something slightly fancy with no arguments.
[07:01:13] Ox0dea: >> [1,2,3].map
[07:01:14] ruby[bot]: Ox0dea: # => #<Enumerator: [1, 2, 3]:map> (https://eval.in/501478)
[07:01:49] kerunaru: has joined #ruby
[07:02:03] akash_: ys rails @cscheib
[07:02:04] lxsameer: has joined #ruby
[07:02:39] Ox0dea: ?rails akash_
[07:02:40] ruby[bot]: akash_: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[07:02:49] norc: Ox0dea: You should probably do some testing of method(m).arity against args
[07:03:07] norc: Ox0dea: Because you might somehow trigger ArgumentError for some other reason
[07:03:13] Ox0dea: norc: Er, what comparison, though?
[07:03:16] akash_: How can i join #RubyOnRails?
[07:03:18] norc: idk honestly
[07:03:23] Ox0dea: norc: That's the tricky bit.
[07:03:24] akash_: I am new to this site
[07:03:27] Ox0dea: Lots of arity -1 methods.
[07:03:35] norc: Ox0dea: Wait! We have the solution now.
[07:05:02] wldcordeiro: has joined #ruby
[07:06:10] sarkis: has joined #ruby
[07:06:23] norc: Ox0dea: Wouldn't m_arity < 0 ? args.length >= m_arity : args.length == m_arity be enough to verify arity match?
[07:06:40] certainty: has joined #ruby
[07:07:14] Ox0dea: Certainly not >=, but that looks about right otherwise.
[07:07:27] norc: Why not?
[07:07:31] hannelita: has joined #ruby
[07:07:36] akash_: In my application, there is a messaging system(not real time) where users can send messages to other users. Now I want to add blocking feature so that users can block other usres to avoid messages from those users. How can I do this?
[07:07:44] norc: Oh it is n-1
[07:07:45] Ox0dea: norc: Extraneous arguments should be an error?
[07:08:00] norc: Ox0dea: Negative arity means variable arguments.
[07:08:02] Cohedrin: akash_ is this rails or ruby
[07:08:05] Ox0dea: norc: I know.
[07:08:10] Ox0dea: Oh, I see now.
[07:08:46] Ox0dea: Well, -1 arity means any number of arguments; other negatives indicate how many are optional.
[07:09:27] Ox0dea: >> def foo a, b = 1, c = 2; end; method(:foo).arity
[07:09:28] ruby[bot]: Ox0dea: # => -2 (https://eval.in/501480)
[07:10:02] norc: "For Ruby methods that take a variable number of arguments, returns -n-1, where n is the number of required arguments"
[07:10:21] clauswitt: has joined #ruby
[07:10:29] yardenbar: has joined #ruby
[07:10:29] Ox0dea: Yeah, that.
[07:11:02] norc: m_arity < 0 ? args.length > m_arity.abs : args.length == m_arity
[07:11:35] arup_r: has joined #ruby
[07:11:59] Ox0dea: I do wish C methods would say more about their parameters.
[07:12:14] Ox0dea: >> ''.method(:gsub).parameters
[07:12:15] ruby[bot]: Ox0dea: # => [[:rest]] (https://eval.in/501481)
[07:12:16] Ox0dea: Gee, thanks.
[07:12:26] solars: has joined #ruby
[07:12:33] norc: C method. That expression just does not pass my parser in my brain.
[07:13:11] norc: Oh that you mean.
[07:13:27] Ox0dea: Methods implemented in C.
[07:14:24] Ox0dea: TracePoint calls the event "c_call", but, well, what's being called if not a method?
[07:14:55] norc: Ever since I started learning about grammars and parsing, I suddenly realised that - aside from the written language - Japanese language should be fairly easy to learn.
[07:15:10] Ox0dea: How do you figure?
[07:15:19] Ox0dea: (I've tried twice now. :/)
[07:15:26] norc: Japanese uses agglutination in their grammar.
[07:15:41] norc: Which is extremely systematic.
[07:16:07] Ox0dea: Language is pretty systematic in general, really.
[07:16:19] sarkis: has joined #ruby
[07:16:35] norc: Ox0dea: The issue is just inflection which can be pretty nasty to learn.
[07:16:39] solars: has joined #ruby
[07:16:49] norc: Especially when you have languages like German where half your vocabulary is just irregular.
[07:17:17] norc: And then you add grammatical gender into the mix, and you have a language that you cannot learn flawlessly if you are not born with it.
[07:17:20] scepticulous: has joined #ruby
[07:18:05] Ox0dea: Relevant: https://web.archive.org/web/20150720182618/http://pinker.wjh.harvard.edu/articles/media/2000_03_landfall.html
[07:18:13] howdoi: has joined #ruby
[07:18:19] certainty: has joined #ruby
[07:18:21] tagrudev: has joined #ruby
[07:18:35] Ox0dea: > [N]o mere mortal has ever "flown out" to center field.
[07:18:39] sandstrom: has joined #ruby
[07:19:40] gagrio: has joined #ruby
[07:20:37] Ox0dea: norc: I do think properly immersing oneself in the surrounding culture can get you extremely close to native fluency, but that's not an easily done thing.
[07:20:53] MissionCritical: has joined #ruby
[07:21:21] tjbiddle: has joined #ruby
[07:22:25] norc: Ox0dea: Absolutely. However even the best immersed foreigner I will notice immediately when he repeatedly mixes up the grammatical gender of words.
[07:22:45] norc: It is just something that has nothing to do with culture, and things like that really do impact the fluency.
[07:23:10] norc: English is rather simple in comparison. :-)
[07:23:29] n00bDev: has joined #ruby
[07:23:57] Ox0dea: norc: Grammatical gender is such a dumb idea; what's the benefit that we find it in so many languages?
[07:24:58] norc: Ox0dea: I have no idea. It becomes even more confusing when you use a word like "M??dchen" which is German for girl. Of course that word is not feminine, but neuter.
[07:25:02] norc: It really is dumb.
[07:25:19] Ox0dea: It's because gender applies to the word itself, not what it describes.
[07:25:29] Ox0dea: Which is indeed incredibly stupid.
[07:25:52] norc: Exactly. I mean in Latin it kind of is fine because you can see the grammatical gender most of the time just looking at the suffix.
[07:26:10] codecop: has joined #ruby
[07:26:10] norc: But in German that only works *sometimes*.
[07:26:29] sarkis: has joined #ruby
[07:27:09] norc: Though I have a general recipe for non native speakers. I always tell them to use "neuter" if in doubt. It sounds least awkward even if wrong.. :-)
[07:27:12] Ox0dea: How quickly did you pick up on the intended interpretation of "Otokari", then? :)
[07:27:34] norc: Come again?
[07:28:19] Ox0dea: It's what I called the refinement?
[07:28:56] Ox0dea: https://eval.in/501472
[07:29:43] norc: I have not yet.
[07:29:51] JohnT: has joined #ruby
[07:29:56] norc: My Japanese vocabulary has a length of 0 currently.
[07:29:58] Ox0dea: It's pseudo-Japanese for "auto-curry". :P
[07:30:05] x86_: has joined #ruby
[07:30:09] norc: Haha that is hilarious.
[07:30:32] Ox0dea: Related: how hard would it be to make `endddddd` a valid way to close that monstrosity?
[07:30:43] norc: I guess that is one of the downsides of being a German native speaker. I read that with German pronunciation in mind, so it never occured to me.
[07:31:02] norc: Extremely simple.
[07:31:03] Ox0dea: norc: But you've been inside insns.def!
[07:31:09] norc: You mean parse.y
[07:31:22] Ox0dea: I meant as exposure to Japanese.
[07:31:26] andikr: has joined #ruby
[07:31:42] chipotle: has joined #ruby
[07:31:51] x86_: has joined #ruby
[07:32:06] norc: Thanks for reminding me of that torturous experience.
[07:32:15] Ox0dea: I have fun every time I go. :P
[07:32:31] norc: I meant the Japanese exposure part.
[07:32:35] Ox0dea: Ah, right.
[07:32:35] bithon: has joined #ruby
[07:32:58] norc: Yesterday I discovered that I need to get into touch with jruby folks more.
[07:33:15] norc: There is plenty of English speaking folks with high knowledge of Ruby internals. :-)
[07:33:26] Ox0dea: It's true.
[07:33:39] tagrudev: has joined #ruby
[07:34:48] Ox0dea: That's not to say you'll be diverting your interest away from KRI?
[07:36:22] norc: Absolutely not. I find Java to be one of the more disgusting languages around.
[07:36:34] sarkis: has joined #ruby
[07:37:03] Ox0dea: If Ruby ever did get /end+/, we could say it has infinitely many keywords. :P
[07:37:52] gagrio_: has joined #ruby
[07:38:08] firstdayonthejob: has joined #ruby
[07:38:55] norc: That should be fairly trivial to hack into parse.y I reckon.
[07:39:35] Ox0dea: >> def end()end
[07:39:36] ruby[bot]: Ox0dea: # => :end (https://eval.in/501514)
[07:39:53] ruby[bot]: norc: # => "q" (https://eval.in/501515)
[07:40:19] norc: I never gave any thought to what ?a actually did.
[07:40:33] ruby[bot]: Ox0dea: # => "\xF8" (https://eval.in/501516)
[07:41:15] Ox0dea: >> ?\C-j # This one's a little more recognizable.
[07:41:16] ruby[bot]: Ox0dea: # => "\n" (https://eval.in/501517)
[07:41:26] dtordable: has left #ruby: ()
[07:42:20] Rodya_: has joined #ruby
[07:42:28] Ox0dea: norc: You know Ruby has C's juxtaposition-is-concatenation semantics, yeah?
[07:43:10] aufi: has joined #ruby
[07:43:37] norc: Ox0dea: I have managed to avoid dealing with strings in C for 26 years. Don't stop me now.
[07:45:53] Ox0dea: >> ['a''b', ?a'b', begin; eval("'a'?b"); rescue SyntaxError; :oops end] # norc
[07:45:54] ruby[bot]: Ox0dea: # => ["ab", "ab", :oops] (https://eval.in/501520)
[07:45:56] x86_: has joined #ruby
[07:46:18] Ox0dea: It's not a bug either, just... a necessary asymmetry.
[07:46:40] sarkis: has joined #ruby
[07:46:55] norc: Ox0dea: What do you mean by juxtaposition here though?
[07:47:48] Ox0dea: norc: Squishin' 'em together.
[07:47:50] llfwf33: has joined #ruby
[07:48:02] norc: That must happen in the compiler somewhere.
[07:48:26] Ox0dea: Almost definitely the parser.
[07:49:32] norc: Ox0dea: Whops yeah parser.
[07:49:41] Ox0dea: literal_concat()
[07:49:54] norc: Was looking at the lexer there and was confusing things.
[07:50:21] auzty: has joined #ruby
[07:50:28] ur5us: has joined #ruby
[07:51:12] x86_: has joined #ruby
[07:51:14] dseitz: has joined #ruby
[07:51:40] tjbiddle: has joined #ruby
[07:51:48] lacuna: has joined #ruby
[07:52:07] llfwf33: has joined #ruby
[07:53:38] norc: Ox0dea: There is just some syntax parts that feel weird. ? or `` are some of them.
[07:54:00] DirtyFInn: has joined #ruby
[07:54:15] Ox0dea: I like `` and would be sad to see them go.
[07:54:23] Ox0dea: And ? is good for golf.
[07:54:26] norc: Just use %x{} already
[07:54:51] norc: ``have this nasty business of being hard to type on some keyboard layouts.
[07:55:08] Ox0dea: That's not Ruby's fault.
[07:55:10] norc: Especially when you are on a Mac where you just cannot reasonably disable dead keys.
[07:56:18] norc: I was actually wondering the other day whether I could have Klingon characters in my name. But I cannot be sure that our registry office has UTF8 capable software.. and having the clerk figuring out how to even get those characters into the software would be a PITA:
[07:56:38] Ox0dea: That is next-level masochism.
[07:56:52] sarkis: has joined #ruby
[07:56:58] Nilium: Today I learned that Klingon has a unicode range..
[07:57:08] Ox0dea: Tengwar too!
[07:57:22] Ox0dea: Er, no, still just a proposal.
[07:57:38] bronson: has joined #ruby
[07:57:57] norc: >> ?_?_:_
[07:57:58] ruby[bot]: norc: # => /tmp/execpad-da29bd1fa295/source-da29bd1fa295:2: syntax error, unexpected tSYMBEG, expecting keyword ...check link for more (https://eval.in/501525)
[07:58:12] Nilium: Ah, no, Klingon's not actually officially in
[07:58:21] norc: That is interesting.. That executes fine on my pry.
[07:58:31] norc: Or it does not.
[07:58:32] Nilium: Turns out the private ??? symbol my Mac has is in the Klingon range
[07:58:38] norc: Which makes sense nevemrind.
[07:58:45] norc: >> ?1?1:1
[07:58:46] ta: has joined #ruby
[07:58:46] ruby[bot]: norc: # => /tmp/execpad-651b65e6cad8/source-651b65e6cad8:2: warning: string literal in condition ...check link for more (https://eval.in/501527)
[08:00:10] phinary: has joined #ruby
[08:00:15] mousier: has joined #ruby
[08:00:15] Nilium: So, short answer is that your registry office even if it has UTF8-capable software cannot input Klingon unless you use the "pIqaD" form
[08:00:36] norc: Ox0dea: Ok Im suddenly confused again. This looks like a weird quirk from the parser - ?1?1:1 should not parse imo.
[08:01:11] Ox0dea: norc: Seems fine to me.
[08:01:44] Ox0dea: You're using a "character literal" as the driver of a ternary expression.
[08:02:11] User458764: has joined #ruby
[08:02:22] norc: Ox0dea: https://github.com/ruby/ruby/blob/trunk/parse.y#L3925
[08:02:25] norc: That line explains why.
[08:02:33] lubekpl: has joined #ruby
[08:02:39] norc: The concatenation only works if the RHS is a string1.
[08:03:13] Ox0dea: And indeed it couldn't work the other way.
[08:03:55] mgorbach: has joined #ruby
[08:04:22] Ox0dea: At least, I don't see how the parser could disambiguate `"a"?b` in the general case.
[08:05:05] norc: Ox0dea: Fairly simply.. it is a lookahead parser? :-)
[08:05:15] Ox0dea: Fair enough.
[08:05:38] Ox0dea: I incorrectly assumed that ternary expressions and Symbol arguments in method calls would conflict.
[08:06:12] Ox0dea: Which is something that does happen, but it wouldn't here.
[08:07:01] sarkis: has joined #ruby
[08:07:39] norc: Nilium: Thank you. It would be embarrassing to accidentally end up with a ??? in my name on my ID card.
[08:07:52] konsolebox: has joined #ruby
[08:08:10] Ox0dea: The proper orthography is "UTF-8-capable", isn't it?
[08:08:14] Ox0dea: That looks very strange.
[08:08:15] hannelita: has joined #ruby
[08:08:32] bkxd: has joined #ruby
[08:09:20] roshanavand: has joined #ruby
[08:09:30] Ox0dea: Also, we say "arity-2"; does Ruby's having negative arities make "arity--1" the proper way to write that?
[08:10:18] pawnbox: has joined #ruby
[08:11:17] Ox0dea: Troll fodder for ##English, then. ^_^
[08:11:38] norc: Ox0dea: That channel has become mostly useless ever since the old folks left.
[08:11:49] norc: There used to be actually knowledgable people in there.
[08:12:03] Ox0dea: I have no trouble believing that. :<
[08:17:08] sarkis: has joined #ruby
[08:17:50] norc: Ox0dea: I remember once venting steam about my confusion regarding the pronunciation of the word "conscience". The next 30 minutes I got a linguistical lecture about how English changed over the past 300 years.
[08:17:59] karapetyan: has joined #ruby
[08:18:13] mark2: has joined #ruby
[08:18:37] Bloomer: has joined #ruby
[08:18:58] Ox0dea: norc: And, well, did such a digression come to explain the word's pronunciation? :P
[08:19:20] colegatron: has joined #ruby
[08:20:31] norc: Ox0dea: Oh absolutely, though admittedly I cannot recall much of that conversation anymore.
[08:21:13] TomyWork: has joined #ruby
[08:21:43] Ox0dea: "Science", "conscience", and "prescience" all end differently.
[08:21:48] Ox0dea: This language, I swear.
[08:22:00] sunya7a: has joined #ruby
[08:22:25] adaedra: And that's why I'm awful at spoken English.
[08:22:29] adaedra: Greetings, everyone.
[08:22:53] Ox0dea: norc: http://www.etni.org.il/farside/potato.htm
[08:23:56] mary5030: has joined #ruby
[08:23:57] Ox0dea: adaedra: What's the French analog for "well met"?
[08:23:58] Dimik: has joined #ruby
[08:24:49] Ox0dea: s/well met/mucho gusto/, if that clarifies anything.
[08:25:14] antgel: has joined #ruby
[08:25:29] existensil: has joined #ruby
[08:25:49] astrobun_: has joined #ruby
[08:27:17] sarkis: has joined #ruby
[08:29:27] adaedra: Ox0dea: sample?
[08:29:59] Ox0dea: adaedra: I was going to use it on you just then.
[08:30:22] Ox0dea: It's basically "pleasure seeing you here".
[08:33:19] ta: has joined #ruby
[08:34:04] tvw: has joined #ruby
[08:34:11] skade: has joined #ruby
[08:34:44] shevy: bon appetite
[08:35:01] TheAnachron: has joined #ruby
[08:35:06] certainty: has joined #ruby
[08:35:11] edwardly: has joined #ruby
[08:35:11] edwardly: has joined #ruby
[08:35:37] einarj: has joined #ruby
[08:40:55] atomical: has joined #ruby
[08:41:38] pawnbox: has joined #ruby
[08:42:33] tvw: has joined #ruby
[08:43:04] Rodya_: has joined #ruby
[08:43:38] curses: has joined #ruby
[08:46:00] Hounddog: has joined #ruby
[08:46:24] shredding: has joined #ruby
[08:47:52] arup_r: has joined #ruby
[08:49:05] sandstrom: has joined #ruby
[08:50:05] Xeago: has joined #ruby
[08:50:20] nettoweb: has joined #ruby
[08:51:02] Anderson69s: has joined #ruby
[08:52:32] User458764: has joined #ruby
[08:54:20] hannelita: has joined #ruby
[08:55:59] greg: has joined #ruby
[08:57:20] smactive: has joined #ruby
[08:57:27] sarkis: has joined #ruby
[09:01:30] rdark: has joined #ruby
[09:01:36] lipoqil: has joined #ruby
[09:04:08] edwinvdgraaf: has joined #ruby
[09:04:27] ympeg: has joined #ruby
[09:04:55] davedev24: has joined #ruby
[09:05:26] Domaldel: has joined #ruby
[09:07:46] sarkis: has joined #ruby
[09:09:19] bkxd: has joined #ruby
[09:09:26] mgorbach: has joined #ruby
[09:11:25] juddey: has joined #ruby
[09:11:47] astrobun_: has joined #ruby
[09:12:31] drptbl: has joined #ruby
[09:14:56] tesuji_: has joined #ruby
[09:15:37] jamw: has joined #ruby
[09:16:10] AimlessRAven: has joined #ruby
[09:16:31] AimlessRAven: can someone help me with this method https://gist.github.com/anonymous/4b7eb0f1a8efaa7cde6a
[09:16:42] AimlessRAven: i wanna transform to hash, to get created_at and status
[09:16:51] AimlessRAven: for example if i make @order.test.each do |s| and type s.time this gibe me undefined method `time' for #<Hash:0x007f5570574050>
[09:17:20] Bloomer: has joined #ruby
[09:17:23] adaedra: ?crosspost
[09:17:23] ruby[bot]: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[09:17:55] sarkis: has joined #ruby
[09:20:00] chussenot: has joined #ruby
[09:20:49] huyderman: has joined #ruby
[09:21:00] dEPy: has joined #ruby
[09:22:15] blaxter: has joined #ruby
[09:23:04] argentdrake: has joined #ruby
[09:23:29] blarghlarghl: has left #ruby: ()
[09:24:20] djbkd: has joined #ruby
[09:24:49] huyderman: has joined #ruby
[09:25:03] usershell: has joined #ruby
[09:25:09] pawnbox: has joined #ruby
[09:26:22] sftrabbit: has joined #ruby
[09:26:54] solars: has joined #ruby
[09:28:02] solocshaw: has joined #ruby
[09:28:03] sarkis: has joined #ruby
[09:31:15] BTRE: has joined #ruby
[09:31:25] Xeago: has joined #ruby
[09:33:13] ta: has joined #ruby
[09:34:01] UtkarshRay: has joined #ruby
[09:36:01] sigurding: has joined #ruby
[09:40:09] LiquidInsect: has joined #ruby
[09:40:52] Gadgetoid: has joined #ruby
[09:43:18] oddmunds: AimlessRaven: replace s.time with s['time']
[09:43:38] ljarvis: >> RUBY_VERSION
[09:43:39] ruby[bot]: ljarvis: # => "2.3.0" (https://eval.in/501567)
[09:43:42] stamina: has joined #ruby
[09:43:50] d0nn1e: has joined #ruby
[09:43:51] Rodya_: has joined #ruby
[09:43:59] bluOxigen_: has joined #ruby
[09:44:13] ruby-lang094: has joined #ruby
[09:46:19] toretore: has joined #ruby
[09:48:24] tAn: has joined #ruby
[09:48:42] blackmesa: has joined #ruby
[09:48:50] ta: has joined #ruby
[09:49:19] TheEyeOfTheTruth: has joined #ruby
[09:51:12] blaxter: has joined #ruby
[09:51:29] Ox0dea: >> RubyVM::InstructionSequence.compile_option = {frozen_string_literal: true}; eval "'foo'.frozen?"
[09:51:30] ruby[bot]: Ox0dea: # => true (https://eval.in/501575)
[09:53:45] nerfando: has joined #ruby
[09:54:59] DoubleMalt: has joined #ruby
[09:55:54] huyderman: has joined #ruby
[09:56:43] Arie: has joined #ruby
[09:57:34] ta: has joined #ruby
[09:58:19] sarkis: has joined #ruby
[10:00:36] dwfait: has joined #ruby
[10:02:42] f4cl3y: has joined #ruby
[10:03:07] pandaant: has joined #ruby
[10:06:17] dlitvak: has joined #ruby
[10:06:25] chussenot: has joined #ruby
[10:07:28] rodfersou: has joined #ruby
[10:09:28] CatMartyn: has joined #ruby
[10:10:20] Arie: hey guys, so im using Middlemanapp for my templating system, and apparently it shows the error "ERROR -- : exception while processing events: invalid byte sequence in UTF-8 Backtrace:" whenever im including this file https://gist.github.com/arie741/c3dbe601328e87991867
[10:10:28] Arie: anybody have any ideas why? im stuck here
[10:10:38] dlitvak_: has joined #ruby
[10:11:24] Jackneill: has joined #ruby
[10:11:40] sftrabbit: has joined #ruby
[10:14:41] Insti: has joined #ruby
[10:14:57] Ox0dea: Arie: Blame J??rn Zaefferer: https://git.io/vzZnk
[10:15:29] Ox0dea: Much better.
[10:15:36] Ox0dea: Mojibake is cruise control for quality.
[10:17:20] arup_r: has joined #ruby
[10:17:30] drptbl: has joined #ruby
[10:17:37] marr: has joined #ruby
[10:18:00] User458764: has joined #ruby
[10:18:13] Arie: Ox0dea: so i need some validation or some sort before i use the file? im a total noob here.
[10:18:26] certainty: has joined #ruby
[10:18:27] adaedra: You need to fix the encoding issue.
[10:18:34] sarkis: has joined #ruby
[10:19:01] terminalrecluse: has joined #ruby
[10:19:43] Arie: adaedra: what is the encoding issue and how do i fix it? sorry im very noob at this
[10:20:07] adaedra: Arie: look at the line Ox0dea linked to you. Does the name looks ok to you?
[10:20:56] pawnbox: has joined #ruby
[10:24:38] Arie: adaedra: well, is it not ok? if so i dont get it. Is it because it's using unreadable characters and the middleman can't parse it somehow?
[10:25:14] Arie: adaedra: i just tried changing the name but it doesn't solve it lol
[10:26:54] Arie: adaedra: maybe they're others that i missed? im checking them one by one right now
[10:27:56] Ox0dea: Arie: The only other non-ASCII characters in the file are the two copyright symbols.
[10:28:53] Ox0dea: Protip: let the computer do things "one by one".
[10:28:54] norc: 759 examples, 0 failures, 5 pending
[10:29:02] norc: After a major refacotr.
[10:29:06] norc: This feels good. :-)
[10:32:28] djbkd: has joined #ruby
[10:34:33] Arie: adaedra: It just worked! you're my hero, thanks man!
[10:34:57] Arie: Ox0dea: thank you too i just saved some grey hair on this lol
[10:34:59] adaedra: Ox0dea did all the work, tbh.
[10:35:53] chussenot: has joined #ruby
[10:37:12] tAn: has joined #ruby
[10:38:03] norc: https://gist.github.com/apeiros/39acc5b486f932403638
[10:38:12] norc: Is such a wonderful document for fixing encoding issues. :-)
[10:38:51] sarkis: has joined #ruby
[10:39:45] gagrio: has joined #ruby
[10:40:01] bkxd: has joined #ruby
[10:41:21] dlitvak: has joined #ruby
[10:43:28] robbyoconnor: has joined #ruby
[10:44:13] Ox0dea: charlock_holmes > rchardet
[10:44:17] Ox0dea: If only in name.
[10:44:48] Rodya_: has joined #ruby
[10:48:12] PedramT: has joined #ruby
[10:49:10] sarkis: has joined #ruby
[10:51:13] chrisarcand: has joined #ruby
[10:51:55] jschmid: has joined #ruby
[10:53:54] karapetyan: has joined #ruby
[10:55:24] snowy: has joined #ruby
[10:57:04] chussenot: has joined #ruby
[10:58:50] usershell: has joined #ruby
[10:59:14] sarkis: has joined #ruby
[10:59:58] akkmaxon: has joined #ruby
[11:05:23] avelldiroll: has joined #ruby
[11:09:24] sarkis: has joined #ruby
[11:09:25] PedramT: has joined #ruby
[11:09:32] sdothum: has joined #ruby
[11:09:53] stryek: has joined #ruby
[11:09:54] justinmcp: has joined #ruby
[11:09:58] tinnvec: has joined #ruby
[11:10:26] User458764: has joined #ruby
[11:10:29] lacuna: has joined #ruby
[11:10:34] Lewix: has joined #ruby
[11:12:36] iamayam: has joined #ruby
[11:12:49] dlitvak_: has joined #ruby
[11:12:51] FernandoBasso1: has joined #ruby
[11:12:51] ghormoon: has joined #ruby
[11:13:29] nirix: has joined #ruby
[11:13:31] viperman: has joined #ruby
[11:16:42] jamw: has joined #ruby
[11:19:28] benjohn: has joined #ruby
[11:19:29] sarkis: has joined #ruby
[11:23:17] xet7: has joined #ruby
[11:24:17] chussenot: has joined #ruby
[11:25:24] Jibbits: has joined #ruby
[11:25:48] Jibbits: Hey guys, I have a little problem which I can't seem to find a good solution to
[11:27:19] GeorgesLeYeti: has joined #ruby
[11:27:29] Jibbits: I need to work with binary data using a string buffer, which means I need to use String#byteslice instead of String#slice. The problem is, I need to remove the bytes that I read from the beginning of the buffer, but there is no String#byteslice! and String#slice! will not handle arbitary bytes reliably
[11:27:40] hayden_: has joined #ruby
[11:27:52] pik: has joined #ruby
[11:28:12] Jibbits: Even if I had to perform a second operation to remove the bytes from the beginning of the buffer, I can't seem to find any method which can accomplish that
[11:28:45] Ox0dea: Jibbits: How come you're not working with bytes instead?
[11:29:09] Ox0dea: Wanting to destructively slice bytes would seem to indicate that something has gone awry.
[11:29:42] sarkis: has joined #ruby
[11:29:53] Jibbits: Ox0dea: I have been up until today, but I need to use unpack to read various different values (especially for protobuf deserialization) and it's really inefficient to have to pack the byte array to a string every time that I need to unpack values
[11:30:08] PedramT: has joined #ruby
[11:30:52] Jibbits: The go-to method for reading values from a byte buffer in ruby is String#unpack, it seems that reimplementing unpack's functionality to work with a byte array would require a lot of work
[11:31:03] GeorgesLeYeti: Is there any already made methods to compare 2 array in order to know if an array A contain at least 1 element of an array B. For example : A = [ 'a', 'b','c'] // B= ['a', 'd'] // A.include?(B) => true and if B=['d','z'] if return false
[11:31:29] yfeldblum: has joined #ruby
[11:31:49] adaedra: You can use an intersection
[11:31:50] Ox0dea: Jibbits: I would imagine it would. If you're not liable to get into encoding trouble, String#[] can be used destructively.
[11:32:31] adaedra: >> [%w[a b c] & %w[a d], %w[a b c] & %w[d z]]
[11:32:33] ruby[bot]: adaedra: # => [["a"], []] (https://eval.in/501606)
[11:32:42] Jibbits: Ox0dea: Won't String#slice! randomly break with arbitary bytes even if the string is forced to 'binary' encoding?
[11:32:58] Ox0dea: Jibbits: It shouldn't.
[11:33:10] Jibbits: I'm fairly sure I remember running into that exact issue in the past, which is why I ended up rewriting the buffer using a byte array in the first place
[11:33:59] Ox0dea: >> (0..255).map(&:chr).join.b.valid_encoding? # Jibbits
[11:34:01] ruby[bot]: Ox0dea: # => true (https://eval.in/501612)
[11:34:01] Jibbits: Encoding is definitely not an issue, since it is a byte buffer, with encoding forced to 'binary', where encoding is needed for strings, the encoding is done after the string has been sliced from the byte buffer
[11:34:05] ph1n4ry: has joined #ruby
[11:34:08] Ox0dea: See above.
[11:34:19] Ox0dea: All bytes are valid in the 'binary' encoding.
[11:34:44] Jibbits: I hope you're right, and I somehow managed to screw up in the past (which was well over a year ago)
[11:34:52] Ox0dea: I mean, I'm showing you code?
[11:35:12] Jibbits: Since this application is already in production use, and having it randomly fail due to a specific sequence of bytes would be rather serious
[11:35:49] Jibbits: I see what you are saying, but that doesn't exactly test String#slice! against every possible byte combination
[11:36:50] Ox0dea: >> bs = (0..255).map(&:chr); bs.product(bs).all? { |a, b| (a + b).b.valid_encoding? } # Jibbits
[11:36:51] ruby[bot]: Ox0dea: # => true (https://eval.in/501620)
[11:36:55] Ox0dea: There it is for every bigram.
[11:37:02] Ox0dea: You're free to try it for trigrams on your machine. :P
[11:37:47] Jibbits: Alright thanks, I'll reimplement using slice! and hope for the best
[11:37:52] ta: has joined #ruby
[11:38:21] PedramT: has joined #ruby
[11:38:40] ruby[bot]: Ox0dea: I don't know anything about hope
[11:39:45] Ox0dea: Jibbits: You agree to indemnify and hold me harmless for any damages, but I can more or less assure you that the problem will not be an invalid byte sequence in a binary-encoded string.
[11:39:50] sarkis: has joined #ruby
[11:40:29] Ox0dea: It's, like, definitionally nonsensical.
[11:40:56] bkxd: has joined #ruby
[11:41:53] Jibbits: Ok, thanks again
[11:42:05] FernandoBasso1: has joined #ruby
[11:42:27] blackgoat: has joined #ruby
[11:42:28] AimlessRAven: has joined #ruby
[11:42:42] AimlessRAven: hi all, i have https://gist.github.com/anonymous/2b0e2745db26d734b005 this method that return me array
[11:42:47] AimlessRAven: how to refactory to return me hash ?
[11:43:23] Ox0dea: Have mercy.
[11:44:00] Jibbits: AImlessRaven: Is that a trick question?
[11:44:27] kp666: has joined #ruby
[11:44:39] PedramT: has joined #ruby
[11:44:47] AimlessRAven: i work on that all day ..
[11:44:56] AimlessRAven: i suggest to not use map..
[11:45:07] Ox0dea: #map is the best method.
[11:45:19] AimlessRAven: okey, but map return me array
[11:45:23] AimlessRAven: i wanna return me hash ;)
[11:45:32] Rodya_: has joined #ruby
[11:45:40] Ox0dea: AImlessRaven: #to_h.
[11:45:56] Ox0dea: >> [[:a, 1], [:b, 2]].to_h
[11:46:01] ruby[bot]: Ox0dea: # => {:a=>1, :b=>2} (https://eval.in/501624)
[11:46:06] Ox0dea: You have to have an array of key-value pairs, of course.
[11:47:40] Jibbits: I thought he was talking about the outer array, where the hash is very clearly wrapped in an array :P
[11:47:59] AimlessRAven: Ox0dea: undefined method `to_h' for "pending":String
[11:48:34] joonty: has joined #ruby
[11:49:10] AimlessRAven: i wanna create array of hashes and evry hash to have key=time..val=1.12.205/ and key=label val=status
[11:49:17] ph1nary: has joined #ruby
[11:49:28] Ox0dea: AImlessRaven: This is #ruby.
[11:49:58] Ox0dea: Jibbits: I confess to having tried to understand their description of the problem rather than the code. :P
[11:49:59] sarkis: has joined #ruby
[11:50:28] Jibbits: Ox0dea: So if the string is forced to binary encoding, does #bytesize still need to be used instead of #size?
[11:50:37] Ox0dea: Jibbits: No.
[11:50:46] Jibbits: Good to know
[11:51:03] Ox0dea: There are considerable benefits to not having to deal with encoding.
[11:52:30] Jibbits: Am I correct that every string which needs to be appended to the buffer needs to first have binary encoding forced?
[11:52:42] Ox0dea: That wouldn't be unwise.
[11:53:01] Ox0dea: You could just as well set the default internal encoding, but that might play havoc with other parts of your system.
[11:53:36] Jibbits: Yeah, I have default encoding set to utf-8 to avoid having to deal with all kinds of other encoding issues
[11:54:21] Ox0dea: >> b = ''.b; s = 'foo'; b << s; [b.encoding, s.encoding] # Jibbits
[11:54:22] ruby[bot]: Ox0dea: # => [#<Encoding:ASCII-8BIT>, #<Encoding:UTF-8>] (https://eval.in/501629)
[11:57:12] Ishido: has joined #ruby
[11:57:20] bruce__lee: has joined #ruby
[11:57:23] zotherstupidguy: has joined #ruby
[11:59:33] dlitvak: has joined #ruby
[12:00:04] sarkis: has joined #ruby
[12:00:45] Xeago: has joined #ruby
[12:00:48] FooMunki: has joined #ruby
[12:00:55] davedev24: has joined #ruby
[12:01:19] Jibbits: I have decreased deserialization overhead significantly, which will make a big difference now that some packets could be over 1MB, compared to the largest being around 1KB before today
[12:01:31] sepp2k: has joined #ruby
[12:01:42] d0lph1n98: has joined #ruby
[12:02:18] djbkd: has joined #ruby
[12:02:37] Ox0dea: Those are massive packets!
[12:03:27] Jibbits: Most 500KB packets are not even long enough to log a time warning anymore (less than 1ms), where they could take over 50ms before
[12:03:47] chrisarcand: has joined #ruby
[12:04:14] Jibbits: I decided that using my efficient binary protocol channel would be a better idea than making a separate connection for binary blob transfers
[12:04:22] Jibbits: Especially since they will be fairly frequent
[12:05:12] usershell: has joined #ruby
[12:05:23] Ox0dea: You rolled your own, then?
[12:05:39] Jibbits: I roll my own everything
[12:05:49] Ox0dea: Famous last words.
[12:05:59] Ox0dea: AImlessRaven: https://eval.in/501634
[12:06:05] Jibbits: I am using the beefcake protobuf library, but I have needed to make a bunch of monkeypatches
[12:06:05] cgfbee: has joined #ruby
[12:06:16] platzhirsch: has joined #ruby
[12:06:19] Ox0dea: That's for when you hate that most of Hash's Enumerable methods don't return Hashes.
[12:06:26] Jibbits: Packet headers are custom built though, tiny packets don't even require protobuf
[12:06:29] edwinvdgraaf: has joined #ruby
[12:06:36] dlitvak: has joined #ruby
[12:06:41] prestorium: has joined #ruby
[12:06:49] TheBrayn: has joined #ruby
[12:07:30] lucasb: has joined #ruby
[12:07:38] Jibbits: Ox0dea: I've been using ruby for network related stuff for about 8 years now, I'd say that I'm fairly confident that rolling my own everything works out pretty well
[12:08:04] Ox0dea: I certainly won't try to stop you.
[12:09:52] abra0: has joined #ruby
[12:10:10] edwinvdgraaf: has joined #ruby
[12:10:18] sarkis: has joined #ruby
[12:11:02] tagrudev: has joined #ruby
[12:14:00] sftrabbit: has joined #ruby
[12:15:19] Affix: has joined #ruby
[12:18:05] cgfbee: has joined #ruby
[12:21:02] certainty: has joined #ruby
[12:21:57] lucasb: Ox0dea: I saw that Otokari paste of yours. Is that partially applied methods?
[12:22:43] Ox0dea: lucasb: Currying and partial application are slightly different things. Ruby uses the wrong name, so I followed suit. :P
[12:23:10] c355E3B: has joined #ruby
[12:23:30] Ox0dea: >> def foo a, b, c; a + b + c; end; curried = method(:foo).curry; curried.call(1, 2).call(3)
[12:23:31] ruby[bot]: Ox0dea: # => 6 (https://eval.in/501640)
[12:23:58] Ox0dea: If it were *properly* curried, we wouldn't be able to fold in more than one argument at a time.
[12:24:26] hannelita: has joined #ruby
[12:24:53] Ox0dea: Long story short: yeah. :)
[12:24:57] chrisarcand: has joined #ruby
[12:25:43] Xeago: has joined #ruby
[12:25:50] dlitvak: has joined #ruby
[12:25:56] lucasb: ah, ok. In that strict mathematical sense, currying only allows one-arg. but most of the time currying and partial application are interchangeable terms :) (or maybe I'm wrong)
[12:26:49] lucasb: Ox0dea: but anyway, just wanted to say you look very knowledgeable. I'll start paying attention to everything you post :)
[12:26:55] daivyk: has joined #ruby
[12:26:56] Ox0dea: Please don't.
[12:27:04] lucasb: the real question is: how many years have you been playing with ruby?
[12:28:18] Outlastsheep: has joined #ruby
[12:29:43] CloCkWeRX: has joined #ruby
[12:29:52] duckpuppy: has joined #ruby
[12:32:23] karapetyan: has joined #ruby
[12:34:08] apeiros: I guess method.partially_apply just didn't have the same ring to it as .curry? :D
[12:35:05] smactive: has joined #ruby
[12:35:25] gregf: has joined #ruby
[12:36:18] adaedra: ACTION curries apeiros 
[12:36:27] ljarvis: ACTION is hungry
[12:36:32] adaedra: Then go eat?
[12:36:36] apeiros: ACTION applies adaedra partially
[12:36:41] sftrabbit: has joined #ruby
[12:36:41] Ox0dea: Alternatively, methods could've been partially applicable by default, and you'd use () if you wanted to invoke its 0-arity form.
[12:36:47] Ox0dea: Damn you, optional parentheses!
[12:36:51] Ox0dea: (And bless you too.)
[12:36:56] ljarvis: no dont bless them
[12:37:13] bronson: has joined #ruby
[12:37:14] Ox0dea: I've never so loved and hated a thing at the same time.
[12:37:15] kies^: has joined #ruby
[12:37:27] adaedra: yeah, I feel like I feel a bit of that.
[12:37:31] pdoherty: has joined #ruby
[12:37:37] ljarvis: my hate:love ratio is 9:1
[12:38:13] gbgdev: has joined #ruby
[12:38:20] tuxillo: has joined #ruby
[12:38:54] tuxillo: is it possible to get env variables from another user different than the one you're running the process with?
[12:39:05] adaedra: env variables are per-process.
[12:39:15] chipotle: has joined #ruby
[12:39:17] Ox0dea: And accessible via procfs on Linux.
[12:39:24] Ox0dea: And elseways elsewhere.
[12:39:24] tuxillo: yes I know, so I was thinking in some sort of popen or suchlike
[12:39:34] dionysus69: has joined #ruby
[12:39:36] ruby[bot]: 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
[12:39:49] vikas027: has joined #ruby
[12:40:15] Ox0dea: You're running Sun?!
[12:41:19] roshanav_: has joined #ruby
[12:41:25] ajf-: has joined #ruby
[12:41:30] ICantCook: has joined #ruby
[12:41:31] Ox0dea: CTCP don't lie.
[12:41:43] Ox0dea: Anyway, you should be able to read /proc/$PID/environ.
[12:41:50] kalopsian: has joined #ruby
[12:42:13] adaedra: can != should, remember.
[12:42:30] adaedra: tuxillo: what if you tell us what you're trying to do, in the big picture
[12:42:34] lucasb: hm, what if running something like my_env_var = `su -c 'echo $MY_ENV_VAR' someuser` ?
[12:42:58] Ox0dea: lucasb: Environment variables are per-process.
[12:43:06] blackmesa: has joined #ruby
[12:43:18] pawnbox: has joined #ruby
[12:43:19] chussenot: has joined #ruby
[12:43:28] lucasb: well, su would spawn a new bash process, wouldn't it?
[12:43:35] tuxillo: adaedra: I believe my question is very specific. a ruby script runs as root and relies on su to run certain commands (using popen4)
[12:44:07] tuxillo: adaedra: but now I need to determine something which is specified in a user's env
[12:44:15] tuxillo: (in this case ORACLE_HOME)
[12:44:16] millerti: has joined #ruby
[12:44:20] adaedra: a user has technically no env.
[12:44:29] Ox0dea: adaedra: One of us has to say it again.
[12:44:38] adaedra: is $ORACLE_HOME the same as $HOME?
[12:44:47] adaedra: I feel like it's something you can guess somehow else.
[12:45:35] tuxillo: well yeah, you can always read the shell profiles but that kills their evaluation (which is complex)
[12:45:45] adaedra: But if you really want to see how the env is initialized when running under su, just run env.
[12:45:49] adaedra: And parse the output.
[12:46:06] dlitvak: has joined #ruby
[12:46:12] tuxillo: yeah, I know. I was wondering if there was something else that could be used :)
[12:46:18] Rodya_: has joined #ruby
[12:46:32] adaedra: If it's $HOME, just use getpwent and friends.
[12:46:39] Jibbits: Ox0dea: There is a very good reason why I roll my own everything whenever possible by the way. I always end up having to debug/profile the gems which I do use at some point, and fix issues myself
[12:47:14] FernandoBasso: has joined #ruby
[12:47:24] tuxillo: no, it's not $HOME
[12:47:39] Ox0dea: Jibbits: Hey, I'm all for it, mate. It's just... reinvent the wheel only that you would improve it, y'know?
[12:47:40] tuxillo: I'll use env, then
[12:48:22] karapetyan: has joined #ruby
[12:48:36] tuxillo: adaedra: thanks
[12:48:45] Jibbits: Sure, I'm all for improving existing implementations, but it's often not worth the effort. There are a lot of really horrid libraries out there, written my talented developers who clearly don't know much about Ruby
[12:49:00] pawnbox: has joined #ruby
[12:49:21] Ox0dea: It's hard to pin down idiomaticity in Ruby, but I know how you mean.
[12:49:27] Jibbits: Looks like these large packets have now introduced a lot of GC overhead, which is a big issue. I'm not very familiar with the Ruby 2.2 GC, so I'm not sure what the best course of action will be
[12:49:49] Jibbits: I'm getting fairly frequent GC pauses of up to ~500ms
[12:49:59] Ox0dea: Yikes. Profilin' time.
[12:50:25] Jibbits: Well I'm already profiling with some simple timing logic, and GC count checks
[12:50:32] weemsledeux: has joined #ruby
[12:50:36] Jibbits: A profiler isn't really going to help solve this
[12:50:37] moei: has joined #ruby
[12:50:43] darkf: has joined #ruby
[12:50:46] Ox0dea: Er, a good one will show you your hotspots.
[12:50:47] Xeago: has joined #ruby
[12:50:56] Jibbits: Perhaps I need to reuse a string buffer for all the large packets and data blobs
[12:51:23] Ox0dea: Slicing into and out of a large string is invariably going to end up moving lots of memory around.
[12:51:26] apeiros: Jibbits: there's some articles about how to tune the GC
[12:51:29] Jibbits: The overhead isn't in my code, I can see that the slow down is being used by GC runs
[12:53:13] symbol: has joined #ruby
[12:53:18] symbol: I'm parsing a CSV and keep getting a `invalid byte sequence in UTF-8` despite the file being UTF-8. I imagine there's a bad byte somewhere in the CSV. Is there any way to get Ruby to tell me which line?
[12:53:31] symbol: Or am I better of using regex to find the offending line? It's a largggggge csv.
[12:53:41] Jibbits: apeiros: Do you really think that tuning the GC could help here, or should I attempt to pool buffers rather?
[12:54:42] Sp4rKy: Hi, any ruby wrapper for pdftk still maintained ?
[12:54:54] apeiros: depends a bit on what viable solutions are for you. tuning the GC can help "moving around" the problem so it happens at a time when it's not an issue (such as in a webserver between requests)
[12:55:21] Jibbits: Oh, that isn't going to help me, this is a long running reactor application
[12:55:34] apeiros: symbol: one-off solution? or general solution?
[12:55:43] symbol: apeiros: Either or really.
[12:55:52] symbol: one-off for this case.
[12:55:55] aupadhye: has joined #ruby
[12:56:12] apeiros: symbol: one-off: open the file binary, read line by line, force_encode the line to utf-8 and use .valid_encoding? to check whether it is the offending line.
[12:56:15] snowy: has joined #ruby
[12:56:30] symbol: Ah, gotcha.
[12:56:33] apeiros: once you know the line, you'll see whether it is easy or hard to fix it
[12:56:53] ta: has joined #ruby
[12:57:08] apeiros: I'd do it in pry (or irb)
[12:58:07] symbol: Awesome, thank you apeiros
[12:58:08] apeiros: I think one day I'll write a tiny gem to support finding broken sequences in supposedly utf-8 files??? it can be done fairly easily???
[12:58:17] dlitvak_: has joined #ruby
[12:58:25] adaedra: once you've done with your current workload? :p
[12:58:36] apeiros: correct. hence around 2023
[12:58:47] Jibbits: It looks like almost all of this GC overhead is occurring in one or more gems, as soon as I stop pushing these binary blobs into the database, the largest GC spike goes from 500ms to 8ms
[12:58:50] apeiros: when utf-8 is old stuff and we use qutf (qubit-utf)
[12:59:15] apeiros: Jibbits: using an orm?
[12:59:37] varunwachaspati: has joined #ruby
[12:59:52] queden: has joined #ruby
[13:00:09] tuxillo: later guys, thanks!
[13:00:21] queden: hi. I trying to run my first tests (sharetribe app) but launching zeus fails: pi@raspberrypi:~ $ zeus /usr/local/rvm/gems/ruby-2.1.2/gems/zeus-0.15.1/build/zeus-linux-386: 1: /usr/local/rvm/gems/ruby-2.1.2/gems/zeus-0.15.1/build/zeus-linux-386: Syntax error: "(" unexpected
[13:00:43] sftrabbit: has joined #ruby
[13:00:44] Jibbits: This overhead is not related to the ORM, only writes are being based via the driver, all data is cached in memory at start up forever
[13:00:50] tuxillo: has left #ruby: ()
[13:01:25] karapetyan: has joined #ruby
[13:01:26] lubekpl: has joined #ruby
[13:01:45] karapetyan: has joined #ruby
[13:02:21] skade: has joined #ruby
[13:02:38] allcentury: has joined #ruby
[13:03:18] pawnbox_: has joined #ruby
[13:04:33] sigurding: has joined #ruby
[13:05:17] prestorium: has joined #ruby
[13:06:35] bkxd: has joined #ruby
[13:07:00] AimlessRAven: has joined #ruby
[13:07:03] AimlessRAven: how to create many hashesh with each on this method https://gist.github.com/anonymous/a4daac8852601b7ed4a4
[13:07:13] arup_r: has joined #ruby
[13:07:58] adaedra: It's not because you don't get an answer in 15 seconds in #RubyOnRails that you should come here copy/paste your question.
[13:08:50] AimlessRAven: because no one help me in ror
[13:09:02] apeiros: ?crosspost AimlessRaven
[13:09:03] ruby[bot]: AimlessRaven: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
[13:09:16] adaedra: There isn't even 2 minutes between your two questions. Give it some time.
[13:09:41] adaedra: Also, I will replace here the advice you already got: learn ruby properly before going Rails, it helps.
[13:10:14] lucasb: AimlessRaven: you want a array containing one hash for each key=>value pair in the original hash?
[13:11:02] apeiros: adaedra: they did actually ask ~15min ago the first time in rails
[13:11:04] arup_r: has joined #ruby
[13:11:10] apeiros: of course, cross-post rules still apply
[13:11:19] adaedra: yeah, I'm looking at that
[13:13:24] AimlessRAven: lucasb: i wanna my array contain many hashes with time and label keys and values
[13:13:40] queden: is something wrong with my zeus installation? Or is it related to the ruby code? Did I miss a step?
[13:14:16] apeiros: AimlessRaven: many.times do array.push a_hash end
[13:14:25] synthroid: has joined #ruby
[13:16:25] vikas027: Hello All, I have this (https://dpaste.de/9mW4) content in a variable. How can I do something like echo $var | grep plugin | grep gitlab in ruby. Forgive my ignorance, I am new to ruby.
[13:16:52] PedramT: has joined #ruby
[13:17:28] chussenot: has joined #ruby
[13:17:31] jamw: has joined #ruby
[13:18:21] certainty: has joined #ruby
[13:18:33] Jibbits: Looks like the ruby mongo driver is just insanely inefficient with GC when inserting large byte arrays
[13:20:47] apeiros: yorickpeterse, where are you when you're needed?!?
[13:21:06] asmodlol: has joined #ruby
[13:21:10] lucasb: vikas027: maybe var.split("\n").grep(/plugin/).grep(/gitlab/); but seems like you would prefer to parse a XML, no?
[13:21:28] Jibbits: It'll probably be a lot less trouble to scrap the idea of storing 100KB - 1MB binary blobs in the database and just use flat files
[13:21:48] apeiros: Jibbits: or use a proper database - as in: not mongo
[13:21:58] Jibbits: I really would have liked to use mongo through, the database is definitely fast and efficient enough to handle these blobs, the ruby driver not so much
[13:22:11] Jibbits: There is really nothing wrong with mongo
[13:22:25] vikas027: lucasb: thanks for the idea of parsing XML. Let me Google that how to do that in ruby :)
[13:22:28] apeiros: the general consensus in this channel begs to differ :)
[13:22:36] adaedra: vikas027: with a regex.
[13:22:38] adaedra: ACTION flees
[13:22:54] adaedra: ( vikas027 note that this was a joke. Don't do that. )
[13:23:13] apeiros: vikas027: nokogiri or oga
[13:23:20] vikas027: adaedra: Oh :) sorry couldn't digest that
[13:23:21] chipotle: has joined #ruby
[13:23:35] Jibbits: I've been using mongo for almost all the applications I build for about 6 years now. Although I don't use usually use it for binary blobs, it's far faster than any SQL database
[13:23:55] apeiros: Jibbits: I doubt that
[13:24:13] apeiros: ACTION needs a stronger word than doubt
[13:24:23] apeiros: I don't believe that
[13:24:33] adaedra: Ox0dea has a "I don't believe you" gif for these cases.
[13:24:34] Jibbits: Out of interest sake, what are your main issues with mongo?
[13:24:54] Jibbits: I've used it more than enough to know what it is capable of, and how to workaround some of it's limitations
[13:25:08] apeiros: that almost every time when somebody says "oh, we don't need a schema for this", they're mistaken.
[13:25:21] Jibbits: I've also imported massive datasets from mongo to postgres, which tooks forever, and ended up running much much slower
[13:25:46] Jibbits: There are very few use cases where I would want to use anything other than mongo these days
[13:25:47] apeiros: and that for almost all workloads they end up with, an RDBMS is better suited
[13:26:51] jaymeproni: has joined #ruby
[13:26:54] Jibbits: I build write-heavy applications, which do little to no reading from a database, that is where mongo really shines
[13:27:27] bruce__lee: has joined #ruby
[13:27:48] usershell: has joined #ruby
[13:28:07] ljarvis: where is rescue defined in the mri source?
[13:28:11] dlitvak: has joined #ruby
[13:28:55] jyuan: has joined #ruby
[13:29:48] aryaching: has joined #ruby
[13:31:35] Ox0dea: ljarvis: It's a keyword?
[13:32:15] Ox0dea: "Defined" just isn't the right word.
[13:32:22] ljarvis: forgive me
[13:32:43] Ox0dea: I'd like to help.
[13:33:02] yorickpeterse: apeiros: what?
[13:33:55] yorickpeterse: "There is really nothing wrong with mongo" this is false
[13:34:05] yorickpeterse: and I base that on using MongoDB for 2,5 years in production
[13:34:42] yorickpeterse: also Mongo doesn't really do anything that's better at storing a blob than say PostgreSQL
[13:35:34] yorickpeterse: Today there should literally be no reason to ever use MongoDB unless you don't actually use your data
[13:36:12] kalopsian: has joined #ruby
[13:36:51] apeiros: I could imagine that in a write-only usage, postgres' tendency to do things correctly might get in the way.
[13:36:54] ljarvis: for anyone who cares i was looking for rb_rescue/rb_rescue2 in eval.c
[13:37:24] yorickpeterse: apeiros: either you do it correctly and it slows down, or you disregard ACID and have to deal with all those problems
[13:37:27] bronson: has joined #ruby
[13:37:33] apeiros: yorickpeterse: of course
[13:37:57] apeiros: I basically said that you can gain performance at the cost of correctness. and I wouldn't be surprised if mongo does that.
[13:38:13] yorickpeterse: IIRC by default the drivers now use strong consistency
[13:38:25] chipotle: has joined #ruby
[13:38:53] apeiros: especially given that they've been shown to actually do that
[13:39:08] roshanavand: has joined #ruby
[13:40:02] Guest11: has joined #ruby
[13:40:03] Guest11_: has joined #ruby
[13:40:04] apeiros: adaedra: bordering on. databases are part of the ruby ecosystem.
[13:40:31] ljarvis: mongo shouldn't even be part of the database ecosystem
[13:40:49] yorickpeterse: I think we should stop calling it a database and instead call it a dumpster
[13:41:00] Guest11: has joined #ruby
[13:41:02] yorickpeterse: because it's not too bad at stuffing shit in it and never getting it out in a reasonable way
[13:41:05] ljarvis: yeah, and the collectors could come at any time
[13:43:04] yorickpeterse: also check out my sick Grafana dashboard
[13:43:10] dlitvak_: has joined #ruby
[13:43:24] yorickpeterse: http://downloads.yorickpeterse.com/images/controller_ovewview.png
[13:43:30] yorickpeterse: that's coming in GitLab, well the code at least
[13:43:36] yorickpeterse: the dashboards may/may not be also available at some point
[13:43:48] ddv: looks sick yorickpeterse
[13:44:38] yorickpeterse: now I'm just trying to hunt down a fkn memory leak of about 250MB
[13:44:38] Guest11: has joined #ruby
[13:45:43] mfb2: has joined #ruby
[13:45:46] cpup: has joined #ruby
[13:46:12] rkazak: has joined #ruby
[13:47:18] Rodya_: has joined #ruby
[13:49:44] aryaching_: has joined #ruby
[13:50:52] Snowy_: has joined #ruby
[13:51:14] yorickpeterse: apparently ~530MB is being allocated over the span of 20 minutes
[13:51:31] dorei: has joined #ruby
[13:52:06] roshanavand: has joined #ruby
[13:53:25] Bloomer: has joined #ruby
[13:56:21] lipoqil: has joined #ruby
[13:56:54] al2o3-cr: has joined #ruby
[13:58:34] dlitvak: has joined #ruby
[14:04:20] davedev24: has joined #ruby
[14:05:09] yorickpeterse: Yeah it was a typo
[14:05:40] victortyau: has joined #ruby
[14:06:50] synthroid: has joined #ruby
[14:07:01] dlitvak: has joined #ruby
[14:07:17] bkxd: has joined #ruby
[14:08:10] adaedra: ljarvis is in typo review-mode today
[14:08:16] shevy: dutch don't like the r
[14:08:36] roshanavand: has joined #ruby
[14:08:42] sgambino: has joined #ruby
[14:09:29] ta0: has joined #ruby
[14:12:35] blackmesa: has joined #ruby
[14:14:22] cdg: has joined #ruby
[14:14:24] ramortegui: has joined #ruby
[14:14:28] sftrabbit: has joined #ruby
[14:14:43] cdg: has joined #ruby
[14:14:48] TomPeed: has joined #ruby
[14:16:28] jokke: has joined #ruby
[14:17:22] gregf: has joined #ruby
[14:17:33] dlitvak: has joined #ruby
[14:17:51] aegis3121: has joined #ruby
[14:18:26] RaceCondition: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[14:18:48] tvw: has joined #ruby
[14:19:18] jokke: has joined #ruby
[14:20:50] workmad3: has joined #ruby
[14:21:02] colegatron: has joined #ruby
[14:21:11] ddv: is ljarvis making friends again?
[14:21:13] chussenot: has joined #ruby
[14:22:35] sdwrage: has joined #ruby
[14:22:37] jokke: has joined #ruby
[14:23:13] bmalum: has joined #ruby
[14:24:14] jas02: has joined #ruby
[14:24:50] mfb2: has joined #ruby
[14:24:55] sankaber: has joined #ruby
[14:28:40] iateadonut: has joined #ruby
[14:29:50] snowy: has joined #ruby
[14:30:52] User458764: has joined #ruby
[14:31:10] freerobby: has joined #ruby
[14:31:32] Ropeney: has joined #ruby
[14:36:24] jgpawletko: has joined #ruby
[14:37:21] razorgfx: has joined #ruby
[14:38:40] casadei: has joined #ruby
[14:38:55] roshanavand: has joined #ruby
[14:39:05] grill: has joined #ruby
[14:39:28] RaceCondition: has joined #ruby
[14:39:29] govg: has joined #ruby
[14:39:38] mrmargolis: has joined #ruby
[14:40:49] malconis: has joined #ruby
[14:40:49] kalopsian: has joined #ruby
[14:42:42] symbol: has joined #ruby
[14:44:22] lacuna: has joined #ruby
[14:44:37] platzhirsch: has left #ruby: ()
[14:45:48] jschmid: has joined #ruby
[14:47:41] treehug88: has joined #ruby
[14:47:43] chouhoulis: has joined #ruby
[14:49:37] razorgfx: has joined #ruby
[14:50:12] jschmid: has joined #ruby
[14:50:13] B1n4r10: has joined #ruby
[14:52:46] arup_r: has joined #ruby
[14:53:40] dlitvak: has joined #ruby
[14:53:48] ror15: has joined #ruby
[14:58:07] rippa: has joined #ruby
[14:59:29] sarkis: has joined #ruby
[14:59:46] mfb2: has joined #ruby
[15:00:25] The_Phoenix: has joined #ruby
[15:00:51] lacuna: has joined #ruby
[15:01:16] decoponio: has joined #ruby
[15:01:47] j416: has joined #ruby
[15:02:33] atomical_: has joined #ruby
[15:03:50] FernandoBasso: has joined #ruby
[15:04:35] asmodlol: has joined #ruby
[15:04:37] Haris: has joined #ruby
[15:04:37] JakFrist: has joined #ruby
[15:04:40] Haris: hello all
[15:05:34] TheHodge: has joined #ruby
[15:06:14] chussenot: has joined #ruby
[15:07:01] willv: has joined #ruby
[15:07:10] hxegon: has joined #ruby
[15:07:41] malconis: has joined #ruby
[15:07:52] DarthBane: has joined #ruby
[15:08:00] loatbac: has joined #ruby
[15:08:05] Haris: I'm getting the error msg --> /usr/local/rvm/gems/ruby-2.2.3/gems/i18n-0.7.0/lib/i18n.rb:284:in `enforce_available_locales!': :en is not a valid locale (I18n::InvalidLocale) <-- how do I enable english language ? do I have to download a dep for language ?
[15:08:09] ta0: has joined #ruby
[15:10:30] Haris: I have this line --> I18n.available_locales = [:pt] <-- and then this line --> I18n.default_locale = :pt <-- in my code. How do I add en to the first line ?
[15:11:16] Haris: how does one concatenate values for a variable in ruby
[15:12:28] asmodlol: has joined #ruby
[15:12:58] shevy: Haris what does this question mean
[15:14:08] Haris: I18n is a library, most probably. I have a ruby based app "catarse". its config has enforce_available_locales set somewhere. which is raising error because, english is not present in list of available locales
[15:14:33] dionysus69: has joined #ruby
[15:15:20] sumark: has joined #ruby
[15:15:25] Haris: https://marcclifton.wordpress.com/2013/07/26/getting-catarse-to-build-and-run/
[15:15:37] unreal: has joined #ruby
[15:15:48] filipe_: has joined #ruby
[15:15:49] filipe_: has left #ruby: ()
[15:16:00] Haris: under heading "Change the Locale"
[15:16:32] tomaz_b: has joined #ruby
[15:17:20] Haris: I was asking, if I could add english to the list of available locales
[15:17:45] Haris: by installing some dependency (ruby based lib), that I might have missed
[15:17:56] chipotle: has joined #ruby
[15:18:02] dstarh: has joined #ruby
[15:18:15] jamw: has joined #ruby
[15:18:36] arup_r: has joined #ruby
[15:19:36] ddv: catarse? :p
[15:19:48] gbgdev: has joined #ruby
[15:20:13] Haris: I18n.available_locales = [:pt]
[15:20:33] Haris: how do I concatenate another option for english language to this variable ?
[15:20:51] Haris: like this --> I18n.available_locales = [:pt,:en] <-- ?
[15:21:30] lucasb: [:pt] << :en
[15:21:39] filipe_: has joined #ruby
[15:21:50] Haris: please come again
[15:22:03] Haris: it has suport for pt. I have .rb files for en and other languages. its just doesn't have en listed in that variable mentioned above
[15:22:53] lucasb: [:pt].push(:en)
[15:24:00] kam270: has joined #ruby
[15:26:51] cpup: has joined #ruby
[15:27:10] shevy: Haris does this strange gem not have instructions in how to append new entries?
[15:27:33] Haris: no idea. I'm new to ruby and rails ...
[15:27:42] Haris: not new to programming though
[15:27:56] tjohnson: has joined #ruby
[15:28:01] shevy: I am looking at its github page right now https://github.com/svenfuchs/i18n
[15:29:21] shevy: I am seeing they set it in that test file
[15:29:22] shevy: test/test_helper.rb: I18n.available_locales = nil
[15:29:36] Haris: wait, please
[15:29:41] shevy: Haris if it is just an Array, then you can use <<
[15:29:47] yardenbar: has joined #ruby
[15:29:59] shevy: I18n.available_locales << :en
[15:30:21] shevy: I can't find their docu :)
[15:30:28] lucasb: http://www.rubydoc.info/gems/i18n
[15:31:02] shevy: "Returns an array of locales for which translations are available."
[15:31:09] shevy: "Unless you explicitely set these through I18n.available_locales= the call will be delegated to the backend."
[15:31:17] shevy: so guess that's the official way anyway
[15:31:42] chriscoffee: has joined #ruby
[15:32:14] mrtomme: has joined #ruby
[15:32:52] dlitvak: has joined #ruby
[15:34:02] mchu: has joined #ruby
[15:35:14] sftrabbit: has joined #ruby
[15:35:16] Haris: has joined #ruby
[15:35:16] Haris: has joined #ruby
[15:36:24] Jardayn: has joined #ruby
[15:37:09] lucasb: enum.each(&method(:foo)) works like {|x| foo(x) } right? but what if want {|x| foo(*x) } is there any other way?
[15:37:31] lucasb: ie, I want to unpack that array as an argument list
[15:37:45] gerard0: has joined #ruby
[15:38:06] FooMunki: has joined #ruby
[15:38:19] lucasb: adaedra --verbose
[15:38:29] adaedra: er, misread two times in a row
[15:38:41] adaedra: so yes, &method(:foo) => { |x| foo(x) }
[15:39:07] adaedra: you can't splat, tho.
[15:39:29] lucasb: hm, ok, was just a detail anyway. thanks, adaedra.
[15:40:11] usershell: has joined #ruby
[15:40:37] lxsameer: has joined #ruby
[15:40:38] lxsameer: has joined #ruby
[15:42:18] sftrabbit: has joined #ruby
[15:42:27] chussenot: has joined #ruby
[15:45:49] chadhs: has joined #ruby
[15:46:03] dc1: has joined #ruby
[15:46:24] sarkis: has joined #ruby
[15:46:31] asmodlol: has joined #ruby
[15:49:36] dhollinger: has joined #ruby
[15:50:03] Haris: fixed that one
[15:50:09] Haris: replaced pt with en
[15:50:52] chouhoul_: has joined #ruby
[15:52:34] chouhoulis: has joined #ruby
[15:56:09] platzhirsch: has joined #ruby
[15:56:47] willv: has joined #ruby
[16:01:25] dlitvak_: has joined #ruby
[16:01:54] pawnbox: has joined #ruby
[16:02:25] scepticulous: has joined #ruby
[16:02:28] rodolfowtf: has joined #ruby
[16:02:35] tagrudev: has joined #ruby
[16:02:46] pawnbox: has joined #ruby
[16:03:43] slawrence00: has joined #ruby
[16:03:56] cschneid_: has joined #ruby
[16:04:07] aryaching: has joined #ruby
[16:05:11] scepticulous: has joined #ruby
[16:07:11] dlitvak: has joined #ruby
[16:08:17] bkxd: has joined #ruby
[16:08:20] d10n-work: has joined #ruby
[16:08:27] legohead_: has joined #ruby
[16:09:34] legohead_: Hey, I'm using simple_form to try and get the user's d.o.b with three text inputs like so: [dd] [mm] [yyyy] is it possible to do this using simple_form?
[16:09:37] hannelita: has joined #ruby
[16:11:09] Firoot73: has joined #ruby
[16:12:15] B1n4r10: has joined #ruby
[16:12:43] pdoherty: has joined #ruby
[16:12:52] smactive: has joined #ruby
[16:12:54] kalopsian: has joined #ruby
[16:13:08] ldnunes: has joined #ruby
[16:13:56] jbrhbr: has joined #ruby
[16:14:16] mark2: has left #ruby: ("PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PART #nethunter :PONG :rajaniemi.freenode.net")
[16:14:19] dlitvak: has joined #ruby
[16:16:22] KineticX: has joined #ruby
[16:16:31] chouhoul_: has joined #ruby
[16:17:04] bronson: has joined #ruby
[16:18:15] akkmaxon: has joined #ruby
[16:19:14] Frem: has joined #ruby
[16:19:29] legohead_: has left #ruby: ()
[16:21:00] terminalrecluse: has joined #ruby
[16:21:57] leksster: has joined #ruby
[16:24:39] certainty: has joined #ruby
[16:24:43] chouhoulis: has joined #ruby
[16:24:44] havenwood: lego, ah gone already
[16:25:36] wldcordeiro: has joined #ruby
[16:28:38] ror15: has joined #ruby
[16:29:04] Pisuke: has joined #ruby
[16:30:24] arup_r: has joined #ruby
[16:30:35] aegis3121: has joined #ruby
[16:30:35] cschneid_: if I have a regex literal inline with my code: f =~ /foo/, is that any performance difference than f =~ MY_REGEX, where MY_REGEX=/foo/.freeze ?
[16:30:46] cschneid_: does the first reconstruct the regex each time through the function?
[16:32:02] shevy: cschneid_ good question... I actually did not know that .freeze was possible at all
[16:32:16] cschneid_: well, it's just an object - that's unlikely to be interesting .
[16:32:45] cschneid_: what I was wonder is if the regex literal in a function (in a tight loop even, in my case) gets constructed once at parse time, or over and over, each time it gets called.
[16:33:01] aegis3121: cschneid_ my gut instinct is that, yes, it would re-instantiate the object each time. But I could be mistaken. If you're worried about time, Benchmark may offer some answers.
[16:33:13] cschneid_: I'd guess that if the regex was /#{myvar}/, there'd be no way to precompile it..
[16:35:38] shinnya: has joined #ruby
[16:36:33] ljarvis: cschneid_: if it's used mroe than one, you should use a constant.. but not really just for performance reasons
[16:36:48] cschneid_: well, it's used at only one point in the source code. Just inside a loop
[16:37:44] ljarvis: and it's crucial for your code to be performant?
[16:37:59] ljarvis: i ask because this is a bit of an over-optimisation imo
[16:38:20] cschneid_: https://gist.github.com/cschneid/0bcf9498f60665c65bf5 is the results. Ever so slightly different
[16:38:50] dcunit3d: has joined #ruby
[16:38:57] cschneid_: ljarvis: working on a new-relic competitor, and trying to squeeze as much performance out of the agent that we put in other people's apps. :)
[16:39:13] asmodlol: has joined #ruby
[16:39:44] cschneid_: I didn't think this was a big deal, but was curious, and didn't know
[16:40:15] mistermocha: has joined #ruby
[16:40:54] bkxd: has joined #ruby
[16:40:54] ljarvis: yeah I don't *think* ruby will do much optimisation for the literal. But I don't know for sure. The difference is mostly superfluous (and you'd probably gain an extra 1/10th of a second by using =~ instead of #match) but the fact you're benchmarking it tells me you already have a hold on things
[16:41:18] podman: has joined #ruby
[16:42:46] shevy: sweet 1/10 second optimizations
[16:43:09] User458764: has joined #ruby
[16:43:10] ljarvis: https://gist.github.com/leejarvis/9f8c7b96a32e019a3cf8
[16:44:25] aegis3121: 1/10th of a second...for ten million.
[16:45:03] lucasb: I didn't know =~ would be faster than #match, interesting
[16:45:29] aegis3121: It was slower, actually, from ljarvis (unless I can't read)
[16:45:44] aegis3121: constant match = 136, constant squiggly = 138
[16:45:49] ljarvis: that was an assumption, the ips result shows they're about the same and if anything it's slightly slower than match with a precompiled regexp
[16:46:06] adaedra: and the difference between `string =~ regex` and `regex =~ string`? :p
[16:46:22] speaking1ode: has joined #ruby
[16:46:45] ljarvis: i thought not using match might remove some object allocations and perhaps method call overhead
[16:47:21] ljarvis: (assuming $& is applied lazily?)
[16:48:51] lkba: has joined #ruby
[16:48:51] bkxd: has joined #ruby
[16:49:55] usershell: has joined #ruby
[16:52:11] rakm: has joined #ruby
[16:53:13] cschneid_: Crazy - in 1.9.3, the behavior is flipped, the literal is ~5% faster
[16:53:31] cschneid_: probably the Constant lookup is slower?
[16:54:02] atomical: has joined #ruby
[16:55:29] psye: has joined #ruby
[16:55:56] [Butch]: has joined #ruby
[16:56:43] Macaveli: has joined #ruby
[16:56:45] workmad3: has joined #ruby
[16:57:01] psye: has joined #ruby
[16:57:11] polishdub: has joined #ruby
[16:57:12] hxegon: Looking for something lighter weight than rspec. Recommendations for minitest vs Test::Unit?
[16:57:29] joonty: has joined #ruby
[16:57:33] ljarvis: hxegon: minitest is essentially the test::unit replacement
[16:57:56] ljarvis: and it's in stdlib, so I would recommend minitest
[16:59:50] hxegon: ljarvis thanks. having a hard time finding discourse with google.
[17:00:04] adaedra: I went from rspec to minitest and everything was awesome.
[17:00:09] ph1nary: has joined #ruby
[17:00:23] atomical_: has joined #ruby
[17:00:30] kalopsian: has joined #ruby
[17:00:32] renderful: has joined #ruby
[17:00:46] lacuna: has joined #ruby
[17:01:19] hxegon: adaedra yeah, kind of getting the feeling rspec is not the framework I should have started on.
[17:01:32] hxegon: want to see what's on the other side of the hill
[17:03:28] freerobby: has joined #ruby
[17:03:56] adaedra: on the other side of the hill, I dunno; on the hill, there's a fool.
[17:03:57] lacuna: has joined #ruby
[17:03:57] lacuna: has joined #ruby
[17:04:52] domgetter: has joined #ruby
[17:04:59] preyalone: has joined #ruby
[17:05:13] synthroid: has joined #ruby
[17:05:14] amclain: has joined #ruby
[17:05:55] mikecmpbll: has joined #ruby
[17:06:11] atomical: has joined #ruby
[17:06:35] TomyLobo: has joined #ruby
[17:07:17] dlitvak: has joined #ruby
[17:08:17] symbol: has joined #ruby
[17:08:32] mikecmpbll: this is a bit obscure, but is there a way to get the line number that I'm writing to when using something like log = Logger.new('/some/file'); log.debug("some message")
[17:09:02] mikecmpbll: i'd like to store the line number so when I generate an email i can include a reference to the log file for further info.
[17:09:55] toretore: just add a unique identifier to the line
[17:10:17] mikecmpbll: derp, that would be the smart thing.
[17:10:20] sigurding: has joined #ruby
[17:11:51] alphaatom: has joined #ruby
[17:11:55] dionysus69: has joined #ruby
[17:12:04] blackmesa: has joined #ruby
[17:13:02] shevy: like "# Here be dragons"
[17:13:45] KineticX: has joined #ruby
[17:13:53] greenhat: has joined #ruby
[17:15:52] f0ster: has joined #ruby
[17:19:03] jamw: has joined #ruby
[17:22:07] underplank: has joined #ruby
[17:23:17] JoshL: has joined #ruby
[17:23:47] bricker: has joined #ruby
[17:24:03] domgetter: mikecmpbll: You should also be able to use __LINE__
[17:24:25] domgetter: note the double underscore, and mind that it returns a number, not a string
[17:25:17] ljarvis: that's not what mikecmpbll meant
[17:25:30] ljarvis: he meant the current line of the log file being written go
[17:25:33] babblebre: has joined #ruby
[17:26:11] domgetter: oooh "that I'm writing to". got it
[17:27:09] mistermocha: has joined #ruby
[17:27:48] rodferso1: has joined #ruby
[17:29:00] RobertBirnie: has joined #ruby
[17:29:15] northfurr: has joined #ruby
[17:29:59] shadeslayer: has joined #ruby
[17:30:55] chrisarcand: has joined #ruby
[17:32:58] nerfando: has joined #ruby
[17:33:03] JakFrist: has joined #ruby
[17:33:57] mfb2: has joined #ruby
[17:34:04] nerfando: has joined #ruby
[17:34:31] loatbac: has joined #ruby
[17:35:05] symm-: has joined #ruby
[17:35:09] michaellewis: has joined #ruby
[17:35:51] momomomomo: has joined #ruby
[17:35:52] tim_s007: has joined #ruby
[17:36:11] michaellewis: so what should i download
[17:36:31] workmad3: everything?
[17:36:40] usershell: has joined #ruby
[17:36:46] michaellewis: 2938745038247569384765239487
[17:38:27] loatbac: so, anyone here use gosu?
[17:38:50] sandstrom: Is there a word/term for && || (logical operator), but is there a shorter word?
[17:39:14] domgetter: loadtbac: I've used it, what's your question?
[17:39:21] havenwood: andand and oror, or you mean single term for the pair?
[17:39:58] loatbac: just curious
[17:40:17] loatbac: i've used it a little bit
[17:41:48] bronson: has joined #ruby
[17:42:04] loatbac: has left #ruby: ()
[17:43:23] arthurix: has joined #ruby
[17:44:08] finisherr: has joined #ruby
[17:45:25] sepp2k: has joined #ruby
[17:45:56] arthurix: has joined #ruby
[17:47:03] underplank: has joined #ruby
[17:49:12] rodfersou: has joined #ruby
[17:49:44] bkxd: has joined #ruby
[17:52:06] underplank: has joined #ruby
[17:53:30] loatbac: has joined #ruby
[17:54:15] blackwhitejewish: has joined #ruby
[17:54:16] dlitvak: has joined #ruby
[17:55:08] ascarter: has joined #ruby
[17:55:34] ror15: has joined #ruby
[17:56:49] aibot: has joined #ruby
[17:57:04] loatbac: has left #ruby: ()
[17:57:10] blackwhitejewish: underplank y u quit
[17:57:16] momomomomo: has joined #ruby
[17:57:22] blackwhitejewish: has left #ruby: ()
[17:58:50] aibot: has joined #ruby
[17:59:01] JohnT: has joined #ruby
[17:59:59] bronson: has joined #ruby
[18:00:11] rodfersou: has joined #ruby
[18:00:53] aibot: has joined #ruby
[18:01:09] bronson: has joined #ruby
[18:02:48] radgeRayden__: has joined #ruby
[18:02:52] nfk|laptop: has joined #ruby
[18:03:17] lacuna: has joined #ruby
[18:03:58] guacamole: has joined #ruby
[18:06:09] roshanav_: has joined #ruby
[18:06:41] rrichardsr3: has joined #ruby
[18:09:23] shadoi: has joined #ruby
[18:10:04] swgillespie: has joined #ruby
[18:10:09] kireevco: has joined #ruby
[18:10:10] deeprave: has joined #ruby
[18:10:10] halfdan: has joined #ruby
[18:10:12] jabreity__: has joined #ruby
[18:10:16] jmcc______: has joined #ruby
[18:10:24] ramblinpeck: has joined #ruby
[18:10:25] mikolalysenko: has joined #ruby
[18:10:32] jxf: has joined #ruby
[18:10:32] thesheff17: has joined #ruby
[18:10:37] sigurding: has joined #ruby
[18:11:04] joonty: has joined #ruby
[18:11:12] gbgdev: has joined #ruby
[18:11:36] elliottcable: has joined #ruby
[18:11:37] duckpuppy: has joined #ruby
[18:11:40] kellabyte: has joined #ruby
[18:11:59] B1n4r10: has joined #ruby
[18:12:52] chipotle: has joined #ruby
[18:12:54] hayden_: has joined #ruby
[18:13:20] Eleeleth: has joined #ruby
[18:13:23] FernandoBasso1: has joined #ruby
[18:13:46] Ebok: has joined #ruby
[18:14:07] lucasb: I'm trying to create a generic Pair object. tried to search the ecosystem, but I think this may be too simple to exists as a gem. Can someone review and say what could improve it? I didn't even tested it yet. https://eval.in/private/ebd79b84ad5fdc
[18:14:42] p0wn3d: has joined #ruby
[18:14:44] chrisseaton: has joined #ruby
[18:14:52] jbrhbr: has joined #ruby
[18:15:09] machty: has joined #ruby
[18:15:29] bove: has joined #ruby
[18:15:52] im0b: has joined #ruby
[18:15:53] tjohnson: has joined #ruby
[18:15:55] akitada: has joined #ruby
[18:16:05] ziyadb: has joined #ruby
[18:16:08] pmarreck: has joined #ruby
[18:16:11] Heero: has joined #ruby
[18:16:26] firstdayonthejob: has joined #ruby
[18:17:07] jxs_: has joined #ruby
[18:17:09] countryHick: has joined #ruby
[18:17:15] Lloyd: has joined #ruby
[18:17:32] benlakey: has joined #ruby
[18:17:42] podman: has joined #ruby
[18:17:45] avdi: has joined #ruby
[18:17:55] cbetta: has joined #ruby
[18:17:56] d10n-work: has joined #ruby
[18:17:56] acadavid: has joined #ruby
[18:17:59] Guest85414______: has joined #ruby
[18:18:01] jpinnix_______: has joined #ruby
[18:18:03] TheHodge: has joined #ruby
[18:18:07] skmp: has joined #ruby
[18:18:07] mroth: has joined #ruby
[18:18:09] tomaw_: has joined #ruby
[18:18:11] howdoi: has joined #ruby
[18:18:13] adambeynon: has joined #ruby
[18:18:19] apipkin: has joined #ruby
[18:18:19] PhilK: has joined #ruby
[18:18:22] huddy: has joined #ruby
[18:18:23] jmhmccr: has joined #ruby
[18:18:25] amitchellbullard: has joined #ruby
[18:18:25] andersh: has joined #ruby
[18:18:26] Frem: has joined #ruby
[18:18:28] glowcoil: has joined #ruby
[18:18:28] frode15243: has joined #ruby
[18:18:29] jeregrine: has joined #ruby
[18:18:36] lipoqil: has joined #ruby
[18:18:37] bestie: has joined #ruby
[18:18:38] CihanKaygusuz: has joined #ruby
[18:18:41] jevs: has joined #ruby
[18:18:48] charles81: has joined #ruby
[18:18:50] golgaroth: has joined #ruby
[18:18:56] ckrailo: has joined #ruby
[18:18:58] MiracleBlue__: has joined #ruby
[18:18:59] akahn: has joined #ruby
[18:19:00] Carella: has joined #ruby
[18:19:03] shelling__: has joined #ruby
[18:19:09] rflot: has joined #ruby
[18:19:09] djbender: has joined #ruby
[18:19:12] zzak_: has joined #ruby
[18:19:15] deimos: has joined #ruby
[18:19:16] M-shine: has joined #ruby
[18:19:25] lacuna: has joined #ruby
[18:19:25] lacuna: has joined #ruby
[18:19:26] dopie: has joined #ruby
[18:19:27] knowtheory: has joined #ruby
[18:19:36] c355E3B: has joined #ruby
[18:19:37] Carella: Why can't I find to_i method like this `String.methods.grep /to_i/`?
[18:19:50] bjeanes: has joined #ruby
[18:19:50] ljarvis: carella: instance_methods
[18:19:56] jord: has joined #ruby
[18:19:57] Carella: oh, thanks
[18:20:00] cstrahan: has joined #ruby
[18:20:04] manveru: has joined #ruby
[18:20:06] avahey: has joined #ruby
[18:20:07] twodayslate: has joined #ruby
[18:20:13] schaary: has joined #ruby
[18:20:18] braderhart: has joined #ruby
[18:20:20] bcavileer_: has joined #ruby
[18:20:20] lancetw: has joined #ruby
[18:20:23] ljarvis: lucasb: review should come after your tests, really
[18:20:35] bluOxigen: has joined #ruby
[18:20:36] aegis3121: has joined #ruby
[18:20:39] vcoinminer_: has joined #ruby
[18:20:40] DukeDave: has joined #ruby
[18:21:04] ljarvis: lucasb: but one thing to point out is that your each method doesn't really make a whole lot of sense
[18:21:07] bruce__lee: has joined #ruby
[18:21:07] pfg: has joined #ruby
[18:21:09] justinweiss: has joined #ruby
[18:21:09] danzilio: has joined #ruby
[18:21:27] ELCALOR: has joined #ruby
[18:21:46] lucasb: ljarvis: I'll learn how to write some tests, thanks
[18:22:03] jlyndon: has joined #ruby
[18:22:03] joaomdmoura__: has joined #ruby
[18:22:07] lucasb: the each method is supposed to just iterate 2 times, yielding key and value
[18:22:22] mrmargol_: has joined #ruby
[18:22:23] ljarvis: why not yield key, value ?
[18:22:35] HashNuke: has joined #ruby
[18:23:01] yo61: has joined #ruby
[18:23:08] alxndr: has joined #ruby
[18:23:12] tonini: has joined #ruby
[18:23:14] rfv: has joined #ruby
[18:23:15] lucasb: then there's no need to iterate at all, since the one can access the key and value already, without using each
[18:23:16] ljarvis: i mean, it's not really enumerberable I guess, I dont really see why you'd enumerate a pair but I guess you'll want the other methods
[18:23:21] ljarvis: I'd just use enum_for(:each)
[18:23:22] iamdevnul: has joined #ruby
[18:23:23] ljarvis: or something
[18:23:56] spastorino: has joined #ruby
[18:24:00] zipkid: has joined #ruby
[18:24:34] guacamole: has joined #ruby
[18:24:35] ljarvis: your pairs_from methods can just be written as enum.map { |*args| Pair.new(*args) } I think
[18:24:40] lucasb: ljarvis: hm, yes. using enum_for(:to_a) would do the same thing. maybe I created each just to get the sugar of Enumerable
[18:24:54] dmr8: has joined #ruby
[18:24:57] cardoni: has joined #ruby
[18:25:20] daxroc: has joined #ruby
[18:25:20] certainty: has joined #ruby
[18:25:34] ljarvis: also I would recommend avoiding using "and" and "or"
[18:25:39] ljarvis: use && abd || instead
[18:25:44] preyalone: has joined #ruby
[18:26:03] pizzaops: has joined #ruby
[18:26:17] err_ok: has joined #ruby
[18:26:32] tejasmanohar: has joined #ruby
[18:26:35] platzhirsch: has left #ruby: ()
[18:26:42] Arcaire: has joined #ruby
[18:27:04] cbednarski: has joined #ruby
[18:27:29] nomadicoder: has joined #ruby
[18:27:44] lucasb: that pairs_from_enum methods should really be Hash#to_pairs and Array or Enumerable #to_pairs, but I'll leave at that for now. I still didn't practice how to use module refinements
[18:28:03] djbkd: has joined #ruby
[18:28:16] User458764: has joined #ruby
[18:29:02] lucasb: ljarvis: but, ok. I liked what you said. I'll take into consideration. thank you very much!
[18:29:26] sideshowcoder: has joined #ruby
[18:29:48] colstrom: has joined #ruby
[18:29:50] bttf: has joined #ruby
[18:30:08] jhill_: has joined #ruby
[18:30:13] gmci: has joined #ruby
[18:30:18] frankS2: has joined #ruby
[18:30:53] zrl: has joined #ruby
[18:30:54] mrsolo: has joined #ruby
[18:31:09] slayerjain: has joined #ruby
[18:31:10] AdamMeghji: has joined #ruby
[18:31:30] boxrick1: has joined #ruby
[18:31:35] S01780_: has joined #ruby
[18:32:16] angiebadillo: has joined #ruby
[18:32:16] troter______: has joined #ruby
[18:32:36] norc: has joined #ruby
[18:32:46] Dimik: has joined #ruby
[18:32:48] rdark: has joined #ruby
[18:33:20] babblebre: has joined #ruby
[18:33:25] nb_bez___: has joined #ruby
[18:33:36] acalewin: has joined #ruby
[18:34:47] mikecmpbll: has joined #ruby
[18:35:06] rodfersou: has joined #ruby
[18:35:06] ht__: has joined #ruby
[18:35:42] Macaveli: has joined #ruby
[18:35:52] Cihan: has joined #ruby
[18:36:30] dlitvak: has joined #ruby
[18:36:51] Guest4184____: has joined #ruby
[18:37:15] momomomomo: has joined #ruby
[18:37:33] spider-mario: has joined #ruby
[18:37:46] kalopsian: has joined #ruby
[18:38:27] blaxter: has joined #ruby
[18:38:56] steffkes: has joined #ruby
[18:38:57] steffkes: has joined #ruby
[18:39:55] peeja: has joined #ruby
[18:40:00] ggherdov: has joined #ruby
[18:40:01] sftrabbit: has joined #ruby
[18:45:22] JohnT: has joined #ruby
[18:45:27] lapide_viridi: has joined #ruby
[18:45:35] mchu: has joined #ruby
[18:46:11] JakFrist: has joined #ruby
[18:47:11] freerobby: has joined #ruby
[18:47:23] ht__: has joined #ruby
[18:48:08] guacamole: has joined #ruby
[18:49:06] nfk|laptop: has joined #ruby
[18:50:20] baweaver: has joined #ruby
[18:51:00] nettoweb: has joined #ruby
[18:51:05] craysiii: has joined #ruby
[18:51:24] edwinvdgraaf: has joined #ruby
[18:51:42] craysiii: has joined #ruby
[18:53:19] dlitvak: has joined #ruby
[18:53:20] aibot: has joined #ruby
[18:55:41] Xeago: has joined #ruby
[18:56:12] guacamole: has joined #ruby
[18:56:35] chrisarcand: has joined #ruby
[18:56:49] choke: has joined #ruby
[18:58:43] harai54: has joined #ruby
[19:01:47] haraigo: has joined #ruby
[19:05:26] bkxd: has joined #ruby
[19:05:29] radgeRayden_: has joined #ruby
[19:06:25] lapide_viridi: has joined #ruby
[19:07:17] rodferso1: has joined #ruby
[19:08:34] Melpaws: has joined #ruby
[19:11:36] nerfando: has joined #ruby
[19:12:26] binaryplease: has joined #ruby
[19:13:04] ror15: I'm testing a gets.chomp function. I'm trying to not require input while running the test. How do I do this?
[19:13:22] ror15: Their channel is sleeping
[19:13:38] northfurr: has joined #ruby
[19:14:30] jbrhbr: you might be able to just stub out gets on object, like `allow(Object).to receive(:gets)`
[19:15:01] baweaver: has joined #ruby
[19:15:22] northfurr: has joined #ruby
[19:15:41] roshanavand: has joined #ruby
[19:15:48] Papierkorb: adding on jbrhbr, make the stub return the input: allow(the_instance).to receive(:gets).and_return "The Input Here\n"
[19:15:53] jbrhbr: i'm not sure what the best practice is here, although in my experience the kind of program where i'd use something like gets (usually one-off hacks) is not the kind of program that i would be writing tests for
[19:16:02] Papierkorb: Oh, no, actually use expect: expect(the_instance).to receive(:gets).and_return "The Input Here\n"
[19:16:17] jbrhbr: depends on if he wants to make sure it's called, but yeah
[19:16:38] Papierkorb: But then, I'd make the function receive a string argument instead of reading directly off $stdin
[19:17:06] ror15: stub is deprecated on 3.1.7 and I'm not sure how to use mocks
[19:17:20] jbrhbr: we just wrote the code for you
[19:17:21] Papierkorb: ror15: Like jbrhbr and I wrote
[19:17:25] stannard_: has joined #ruby
[19:17:42] Melpaws: struggling with some arrays. I need to find a way to clean up my nested array based on either elements or match . Pretty much need either element [1] of each array removed or to remove the 'First Shift - 7AM' element. : gist : https://gist.github.com/dylnnlsn/3aafbb171004554bae3f
[19:17:47] Melpaws: any suggestions?
[19:18:09] Melpaws: i cannot get reject or delete_if to work for some reason
[19:19:17] tomaz_b: has joined #ruby
[19:19:48] jamw: has joined #ruby
[19:20:39] bb010g: has joined #ruby
[19:21:38] toretore: Melpaws, define more precisely what you want to do
[19:22:10] symm-: has joined #ruby
[19:22:19] Melpaws: ultimately, remove any 'First Shift - 7AM' from the array.
[19:22:33] ror15: jbrhbr: You're right, I'm just using rspec to play with a simple ruby program. Thanks and Papierkorb
[19:22:36] bmalum: has joined #ruby
[19:23:01] blackwhitejewish: has joined #ruby
[19:23:28] blackwhitejewish: 3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333
[19:23:33] ruby[bot]: to call for ops use the !ops command. You can find a list of channel staff on http://ruby-community.com/pages/irc_staff
[19:23:38] ruboto: fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, jhass, sevenseacat, miah, workmad3, Havenn, Radar, Coraline, slyphon, zenspider, rubyhacker1, drbrain, baweaver, ljarvis, Aria, Adaedra, ruby[bot]
[19:23:39] blackwhitejewish: 132222222231213213213123123123321213213231231231321321123123123
[19:23:47] adaedra: !ban blackwhitejewish !P Good bye
[19:23:50] ChanServ: +b blackwhitejewish!*@*
[19:23:51] ChanServ: ChanServ kicked blackwhitejewish: Good bye
[19:23:51] jackjackdripper: has joined #ruby
[19:23:51] ruby[bot]: -b blackwhitejewish!*@*
[19:23:58] adaedra: thanks, toretore
[19:24:16] blackwhitejewish: has joined #ruby
[19:24:17] ChanServ: +b blackwhitejewish!*@*
[19:24:17] ChanServ: ChanServ kicked blackwhitejewish: Good bye
[19:24:17] ruby[bot]: -b blackwhitejewish!*@*
[19:24:41] adaedra: apeiros: is it normal it removes the +b so soon?
[19:24:42] blackwhitejewish: has joined #ruby
[19:24:42] ChanServ: +b blackwhitejewish!*@*
[19:24:42] ChanServ: ChanServ kicked blackwhitejewish: Good bye
[19:24:42] ruby[bot]: -b blackwhitejewish!*@*
[19:24:47] toretore: Melpaws, more precisely than that. this is how to solve programming problems; the difficult part is articulating what it is you want to do
[19:24:58] stamina: has joined #ruby
[19:25:04] adaedra: +b blackwhitejewish!*@*
[19:25:05] ruby[bot]: -b blackwhitejewish!*@*
[19:25:08] jhass: apeiros: well, that's spammy
[19:25:33] willv: has joined #ruby
[19:25:34] toretore: Melpaws, the way you phrase it can be interpreted in more than one way: 1) remove the second element from each array 2) remove objects that match "First Shift - 7AM" from each array
[19:25:42] adaedra: -o adaedra
[19:26:01] jhass: .troll blackwhitejewish
[19:26:08] jhass: still not I guess
[19:26:39] chrisarcand: has joined #ruby
[19:26:46] camilasan: has joined #ruby
[19:27:19] Carella: Melpaws, .map {|a| a.reject {|s| s == "First Shift - 7AM"}}
[19:28:34] baweaver: has joined #ruby
[19:28:35] Papierkorb: Melpaws, carella, or even shorter: the_array.map{|a| a - [ 'First Shift - 7AM' ]}
[19:28:37] Melpaws: ah . thanks carella. That did the trick .
[19:29:11] Carella: Papierkorb, thanks, that's better
[19:29:34] hxegon: Melpaws carella Papierkorb ['First Shift - 7AM', 'everything else'] - ['First Shift - 7 AM']
[19:29:58] dlitvak: has joined #ruby
[19:30:30] Carella: '7AM' vs '7 AM'
[19:31:00] hxegon: nvm, didn't see the nested part.
[19:32:19] arup_r: has joined #ruby
[19:33:16] kerunaru: has joined #ruby
[19:34:02] B1n4r10: has joined #ruby
[19:34:14] rusy: has joined #ruby
[19:34:27] rusy: hello, someone used sqlite3-ruby?
[19:34:42] zeroDivisible: has joined #ruby
[19:35:30] ruby[bot]: Just ask your question, if anyone has or can, they will respond.
[19:36:02] rusy: ok, how can I bind to a ? parameter with delete?
[19:36:26] cdg: has joined #ruby
[19:36:29] rusy: i do it like db.execute("DELETE FROM table_name WHERE some_id = ?", someId)
[19:36:48] rusy: but this throws bind or column index out of range
[19:37:08] rusy: and there's literally nothing on the internet about this, not even in the official docs (for ruby)
[19:38:04] blackmesa: has joined #ruby
[19:38:07] Mon_Ouie: Well that wouldn't belong on the official docs of Ruby since sqlite3-ruby is not a part of stdlib/core
[19:38:38] rusy: no I mean't info for the ruby sqlite driver
[19:38:52] rusy: obviously there wouldn't be documentation for a third party lib, duh
[19:39:15] Mon_Ouie: http://www.rubydoc.info/github/luislavena/sqlite3-ruby/SQLite3/Database#execute-instance_method ?
[19:39:23] DoubleMalt: has joined #ruby
[19:40:11] rusy: correct, I'm passing it like in the example :)
[19:40:34] rusy: question is why it doesn't work, I use it the same way in other queries but with delete it doesn't seem to bind correctly
[19:40:47] rusy: and I'm sure the names of the columns are correct and so is the parameter.
[19:40:56] Psyq: has joined #ruby
[19:41:08] choke: has joined #ruby
[19:41:17] mchu: has joined #ruby
[19:41:34] roshanavand: has joined #ruby
[19:41:46] Mon_Ouie: Haven't used this gem recently, but according to this you're supposed to pass bind parameters as an array rather than as multiple arguments
[19:43:07] rusy: yeah I'm passing it as an array
[19:43:15] rusy: for e.g if I bind 3, I pass [3]
[19:43:22] ht__: has joined #ruby
[19:43:36] aegis3121: has joined #ruby
[19:43:37] Krazypoloc: has left #ruby: ()
[19:43:47] Mon_Ouie: Oh, okay then, I thought someId would be 3 and not an array containing 3
[19:43:50] momomomomo: has joined #ruby
[19:44:05] programm1: has joined #ruby
[19:46:17] rusy: god knows :)
[19:46:24] rusy: I'm just going to sit and beg for it to work
[19:46:35] rusy: ty anyway
[19:46:47] karapetyan: has joined #ruby
[19:51:46] ldnunes_: has joined #ruby
[19:53:57] atomical_: has joined #ruby
[19:54:08] mchu: hi. is anyone familiar w/ the ??? serialized_accessor :config, ??? ? i can???t seem to find anything on it in google
[19:55:20] troulouliou_dev: has joined #ruby
[19:56:25] edwinvdg_: has joined #ruby
[20:01:35] atomical: has joined #ruby
[20:01:58] karapetyan: has joined #ruby
[20:02:13] momomomomo: has joined #ruby
[20:02:14] programm1: has joined #ruby
[20:04:10] TheEyeOfTheTruth: has joined #ruby
[20:07:17] bruce__lee: has joined #ruby
[20:07:53] FernandoBasso: has joined #ruby
[20:10:30] karapetyan: has joined #ruby
[20:12:09] joonty: has joined #ruby
[20:13:19] choke: afternoon everyone
[20:14:20] uris: has joined #ruby
[20:16:21] domgetter: good morning
[20:18:14] colegatron: has joined #ruby
[20:19:01] stannard: has joined #ruby
[20:19:21] last_staff: has joined #ruby
[20:19:57] Xeago: has joined #ruby
[20:21:02] sandstrom: has joined #ruby
[20:22:00] casadei_: has joined #ruby
[20:22:11] baweaver: has joined #ruby
[20:23:23] tvsutton: has joined #ruby
[20:26:06] certainty: has joined #ruby
[20:26:18] edwinvdgraaf: has joined #ruby
[20:28:22] tvsutton: I have a general Rake question: I'm working on a project with a very large Rakefile and it makes branching/merging problematic because many changes go into a single file. I was looking at splitting it up using simply the "rakelib/foo.rake" pattern. Does this method have any disadvantages for simply splitting up our tasks into files more logically?
[20:29:23] ht__: has joined #ruby
[20:30:12] Xeago_: has joined #ruby
[20:30:55] ixti: has joined #ruby
[20:32:14] DoubleMalt: has joined #ruby
[20:33:06] ta: has joined #ruby
[20:34:28] baweaver: has joined #ruby
[20:36:04] atomical: has joined #ruby
[20:36:49] pdoherty: has joined #ruby
[20:37:33] kadoppe: has joined #ruby
[20:38:07] who42: has joined #ruby
[20:38:31] Cohedrin: has joined #ruby
[20:38:51] pawnbox: has joined #ruby
[20:39:39] ellisTAA: has joined #ruby
[20:39:55] ellisTAA: is peer to peer the same as distributed computing?
[20:40:06] ellisTAA: or is it a type of DC
[20:40:52] rodfersou: has joined #ruby
[20:41:01] _Tariq: has joined #ruby
[20:41:08] wldcordeiro: has joined #ruby
[20:41:25] stamina: has joined #ruby
[20:41:27] _Tariq: I am getting the error "undefined local variable or method `define_instance_method'" inside of my initialize method
[20:41:36] agentmeerkat: has joined #ruby
[20:41:37] _Tariq: what should I do to define an instance method?
[20:41:47] roshanavand: has joined #ruby
[20:42:17] jeff_laplante: has joined #ruby
[20:42:39] baweaver: has joined #ruby
[20:43:02] Radar: _Tariq: Show us your code please?
[20:43:07] _Tariq: ACTION sighs
[20:43:12] Xeago: has joined #ruby
[20:43:15] Radar: _Tariq: I don't know what this define_instance_method method is that you're talking about.
[20:43:43] _Tariq: https://gist.github.com/tra38/20bea744a037c6619f60
[20:44:06] _Tariq: basically, I want to feed into the class a data_hash, and then have each key in that hash gets turned into a method
[20:44:11] blackmesa: has joined #ruby
[20:44:32] _Tariq: that can then be called on
[20:44:40] toretore: use method_missing
[20:44:58] _Tariq: is method_missing a bit discouraged?
[20:44:59] Radar: _Tariq: there is no such thing as "define_instance_method" in Ruby. Perhaps you're thinking of "define_method"?
[20:45:39] _Tariq: I was afraid that define_method would only create class methods
[20:45:44] _Tariq: not methods only local to the instance
[20:46:05] toretore: it creates instance methods on the class it is called
[20:46:10] _Tariq: Ah, got it
[20:46:36] willv: has joined #ruby
[20:46:38] _Tariq: self.class.send(:define_method, :key) { value }
[20:46:42] aegis3121: So....It looks like they're supposed to be reader, right?
[20:46:44] _Tariq: that is what I had to write out, but it works.
[20:46:56] _Tariq: They are supposed to be readers
[20:47:02] toretore: no, that's not correct _Tariq
[20:47:22] aegis3121: You're not setting the iVar, but if you set iVars with those values they would be readers
[20:47:28] aegis3121: they're...close.
[20:47:58] dlitvak: has joined #ruby
[20:47:59] Radar: https://gist.github.com/radar/ea263abd49a18f90a694
[20:48:00] Radar: This is how I would do it.
[20:48:15] Radar: assuming "name" and "address" are in the data_hash
[20:48:38] freerobby: has joined #ruby
[20:48:57] _Tariq: Yeah this does look cool
[20:49:02] _Tariq: However, I don't know what might be in that data_hash
[20:49:11] _Tariq: so I guess I'll use a more generic approach
[20:49:14] _Tariq: but I really like this
[20:49:43] aegis3121: https://gist.github.com/jon2992/7cc8aacad9f36f1c598b
[20:49:47] aegis3121: something like taht might be similar
[20:50:00] Radar: aegis3121: neat
[20:50:02] binaryplease: has joined #ruby
[20:50:06] _Tariq: yep. This will work.
[20:50:48] freerobby1: has joined #ruby
[20:50:50] _Tariq: Thanks aegis3121
[20:50:52] ta: has joined #ruby
[20:51:12] bkxd: has joined #ruby
[20:51:41] blackgoat: has joined #ruby
[20:51:49] skade: has joined #ruby
[20:51:50] freerobby: has joined #ruby
[20:51:52] ziyadb: has joined #ruby
[20:52:59] sdothum: has joined #ruby
[20:53:59] snowy: has joined #ruby
[20:55:17] aegis3121: has joined #ruby
[20:55:42] guacamole: has joined #ruby
[20:56:43] roshanavand: has joined #ruby
[20:57:13] djbkd: has joined #ruby
[20:58:01] snowy: has joined #ruby
[20:58:59] mary5030_: has joined #ruby
[20:59:00] willv: has joined #ruby
[20:59:07] karapetyan: has joined #ruby
[20:59:12] synthroid: has joined #ruby
[20:59:31] guacamole: has joined #ruby
[20:59:50] mary5030_: has joined #ruby
[21:00:00] dasilvacontin: has joined #ruby
[21:01:08] dasilvacontin: Hi! ruby n00b here. How can I do "obj.prop?.each { |n| puts n }" so that each only tries to be executed if obj has prop defined?
[21:01:13] firstdayonthejob: has joined #ruby
[21:01:37] dasilvacontin: Can I do it in a single line?
[21:01:55] Dimik: has joined #ruby
[21:02:19] dasilvacontin: Getting "undefined method `presets?' for #<Hash:0x007fa97b093658> (NoMethodError)". I guess it's trying to access a prop called `presets?` in the object
[21:02:28] dasilvacontin: When I just wanted to do an existence check
[21:02:28] livcd: does ruby have something similar ? http://wheel.readthedocs.org/en/latest/
[21:02:33] Xeago_: has joined #ruby
[21:02:34] mchu: has joined #ruby
[21:03:47] last_staff: has joined #ruby
[21:05:23] edwinvdgraaf: has joined #ruby
[21:07:04] drbrain: livcd: ruby only has one package system, RubyGems
[21:07:51] lucasb: dasilvacontin: try obj.prop&.each {} (only in ruby 2.3)
[21:08:56] Dimik: has joined #ruby
[21:09:45] dasilvacontin: lucasb: Okay, I'll give it a try, thanks!
[21:10:37] gheegh: has joined #ruby
[21:10:41] havenwood: livcd: And RubyGems ships with Ruby!
[21:11:16] pwnd_nsfw: has joined #ruby
[21:12:36] gbgdev: has joined #ruby
[21:15:13] ror15: has joined #ruby
[21:15:42] dpg1: has joined #ruby
[21:16:28] Emmanuel_Chanel: has joined #ruby
[21:17:09] Emmanuel_Chanel: has joined #ruby
[21:17:27] ellisTAA: has joined #ruby
[21:20:33] jamw: has joined #ruby
[21:21:11] lannonbr: has joined #ruby
[21:25:15] dlitvak: has joined #ruby
[21:25:15] davedev24: has joined #ruby
[21:25:47] hxegon: has joined #ruby
[21:26:04] hannelita: has joined #ruby
[21:28:04] dostoyevsky: has joined #ruby
[21:28:36] dostoyevsky: Is it ok to ask rails questions here? #rails doesn't exist though...
[21:28:51] havenwood: .rails dostoyevsky
[21:28:54] ruby[bot]: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[21:29:01] havenwood: dostoyevsky: it's #rubyonrails
[21:29:16] dopie: has joined #ruby
[21:29:20] ItSANgo: has joined #ruby
[21:29:21] dostoyevsky: havenwood: thx!
[21:29:39] baweaver: has joined #ruby
[21:29:48] dasilvacontin: lucasb: worked perfectly, though I'm worried about making users have ruby 2.3
[21:31:12] karapetyan: has joined #ruby
[21:31:18] lucasb: dasilvacontin: yeah, ruby 2.3 is still very recent
[21:31:59] dasilvacontin: lucasb: probably I won't use it then, though it's very nice to know about it, thanks :)
[21:31:59] Jello_Raptor: has joined #ruby
[21:32:10] dasilvacontin: lucasb: what's the best alternative, use `and`?
[21:32:33] dasilvacontin: obj.prop and obj.prop.each ...
[21:32:59] Jello_Raptor: has joined #ruby
[21:33:16] lucasb: dasilvacontin: maybe that might work. to be honest I really dunno. maybe someone more experienced here in the channel can tell you.
[21:34:06] tvw: has joined #ruby
[21:34:33] ur5us: has joined #ruby
[21:35:22] dasilvacontin: lucasb: yep, it does work. I'll go with that, thanks :)
[21:37:20] baweaver: has joined #ruby
[21:37:59] yfeldblum: has joined #ruby
[21:38:18] karapetyan: has joined #ruby
[21:40:37] djbkd: has joined #ruby
[21:42:03] karapetyan: has joined #ruby
[21:43:34] dlitvak: has joined #ruby
[21:43:49] nfk|laptop: has joined #ruby
[21:44:34] lucasb: inside class Foo, I'm repeating a lot of Foo.some_method. but this will cause problems when the class is subclassed. Other languages have something like __class__ or __CLASS__ for this. In ruby, self.class.some_method is the accepted idiom for this?
[21:45:57] lucasb: in other words, I want a token that means "the current class in scope"
[21:46:23] dcunit3d: has joined #ruby
[21:47:06] guacamole: has joined #ruby
[21:48:15] lucasb: but inside instance methods, self is the object, not the class
[21:48:24] adaedra: or self.class, in instance methods (don't know how it reacts in modules tho)
[21:48:36] jbrhbr: has joined #ruby
[21:49:02] lucasb: ok, I just wanted to confirm that was the right thing. thanks, adaedra
[21:49:12] jgt: has joined #ruby
[21:50:29] davedev24: has joined #ruby
[21:51:24] aspire: has joined #ruby
[21:51:49] tomchapin: has joined #ruby
[21:52:09] atomical_: has joined #ruby
[21:52:45] tockitj: has joined #ruby
[21:53:09] mchu: has joined #ruby
[21:55:24] ht__: has joined #ruby
[21:56:38] edwinvdgraaf: has joined #ruby
[21:56:40] roshanavand: has joined #ruby
[21:58:42] choke: has joined #ruby
[22:01:17] imperator: has joined #ruby
[22:01:26] gbgdev: has joined #ruby
[22:01:26] dede: has joined #ruby
[22:01:35] bmalum: has joined #ruby
[22:01:40] imperator: i'm spacing, is there a version of delete_if that returns the rejected items instead of the final object?
[22:01:48] blackmesa: has joined #ruby
[22:02:43] edwinvdgraaf: has joined #ruby
[22:02:49] hahuang65: has joined #ruby
[22:03:28] FooMunki: has joined #ruby
[22:03:31] hahuang65: has joined #ruby
[22:03:51] lucasb: imperator: are you interested only in the rejected items, or you also want the side effects of removing them from the array?
[22:03:55] grill: yo. do instance vars percolate down to child contexts in rspec?
[22:05:45] smactive: has joined #ruby
[22:08:08] djbkd_: has joined #ruby
[22:08:49] mclong: has joined #ruby
[22:09:05] Radar: grill: fo' real dawg
[22:09:33] Guest38: has joined #ruby
[22:09:37] Radar: grill: Apologies. Yes they do percolate down.
[22:09:42] Radar: (my homie)
[22:09:53] Radar: ((I interpret "yo" as like real OG type shit))
[22:09:58] hahuang65: has joined #ruby
[22:10:13] Radar: shevy: WHAT UP
[22:10:25] shevy: I think you overwhelmed grill there!
[22:10:26] jbrhbr: it's really not that slangy
[22:10:36] atomical: has joined #ruby
[22:10:47] grill: old people still think it's slangy
[22:10:57] shevy: at what point is someone old
[22:10:59] jbrhbr: i'm getting old :(
[22:11:14] dlitvak: has joined #ruby
[22:11:21] shevy: jbrhbr perhaps you are right before the age threshold!
[22:11:36] imperator: lucasb, i also want the side effects
[22:11:41] choke: has joined #ruby
[22:11:42] aegis3121: has joined #ruby
[22:13:02] grill: anyway, i have a before before block where i set an instance var (e.g. @first_file = "/blah"). later on, in a child context's before block, i call FileUtils.touch(@first_file), which promptly comes back with a "can't convert nil into string" error. what gives?
[22:13:20] aegis3121: o___O my first instinct is...don't use an iVar
[22:13:45] aegis3121: http://betterspecs.org/#let
[22:14:11] hahuang65: has joined #ruby
[22:14:19] grill: does let actually allow the var to retain its value across contexts?
[22:14:26] Radar: grill: real code please
[22:14:30] hxegon: has joined #ruby
[22:15:10] shevy: grill you must initialize the @ivar in question to a value
[22:15:21] lucasb: imperator: one way is to previously generate an array with all the elements you want removed, then remove them from the original array
[22:15:32] grill: shevy @first_file = "/blah"
[22:15:46] imperator: lucasb, i was hoping for a single method to do it all :)
[22:15:53] shevy: grill then the error would not be nil
[22:15:53] Radar: grill: Steps to reproduce the problem with code, please.
[22:16:06] aegis3121: grill: https://gist.github.com/jon2992/de6489659e14f467fadc
[22:16:27] lucasb: imperator: sorry, I'm not aware of a method that does this in a single step. maybe others here can help.
[22:16:40] babblebre: has joined #ruby
[22:18:08] lucasb: imperator: remove_elems = orig_array.reject {...}; orig_array = orig_array - remove_elems
[22:18:29] pawnbox: has joined #ruby
[22:18:36] jbrhbr: reject! returns the ones where it was rejected and nil otherwise
[22:18:38] jbrhbr: pretty sure
[22:19:01] edwinvdgraaf: has joined #ruby
[22:19:04] Ox0dea: jbrhbr: #reject! is an alias for #delete_if.
[22:19:09] aegis3121: imperator would http://ruby-doc.org/core-2.3.0/Enumerable.html#method-i-partition
[22:19:11] Radar: >> [1,2,3].reject! { |a| a == 1 }
[22:19:12] ruby[bot]: Radar: # => [2, 3] (https://eval.in/501797)
[22:19:14] bnagy: imperator: how about partition?
[22:19:21] aegis3121: bnagy woo! same page
[22:19:25] Radar: +1 for partition
[22:19:40] Ox0dea: Well, never mind.
[22:19:41] jbrhbr: i think that's misleading
[22:19:43] aegis3121: >> [1, 2, 3, 4].partition { |a| a == 1 }
[22:19:44] ruby[bot]: aegis3121: # => [[1], [2, 3, 4]] (https://eval.in/501798)
[22:19:44] willv: has joined #ruby
[22:20:04] jbrhbr: >> l = [1, 2, 3, 4]; bads = l.reject! { |e| e == 2 || e == 4 }; bads
[22:20:06] ruby[bot]: jbrhbr: # => [1, 3] (https://eval.in/501799)
[22:20:06] Ox0dea: Er, no, yeah, #reject! and #delete_if amount to the same thing.
[22:20:16] Radar: >> rejected, good = [1, 2, 3, 4].partition { |a| a == 1 }
[22:20:19] lucasb: imperator: remove_elems, orig_array = orig_array.partition {|x| x.good? }
[22:20:21] ruby[bot]: Radar: # => [[1], [2, 3, 4]] (https://eval.in/501800)
[22:20:30] Radar: then rejected would be [1] and good would be [2,3,4]
[22:20:31] jbrhbr: ah nm it's the opposite of what he wants once again, sorry
[22:21:11] atomical_: has joined #ruby
[22:22:13] imperator: lucasb, that will work, thanks!
[22:22:23] imperator: bnagy, aegis3121 thanks
[22:23:02] terminalrecluse: has joined #ruby
[22:23:43] Ox0dea: >> a = [1,2,3,4]; ret = (_, a = a.partition(&:even?))[0]; [ret, a] # imperator
[22:23:44] ruby[bot]: Ox0dea: # => [[2, 4], [1, 3]] (https://eval.in/501801)
[22:24:00] Ox0dea: That's crazy, though.
[22:24:21] jbrhbr: :p i knew it was just a matter of time!
[22:25:15] Ox0dea: #reject! should totally return the rejected elements. :/
[22:26:06] jbrhbr: would be more useful for sure, it's redundant the current way
[22:26:20] mistermocha: has joined #ruby
[22:26:43] roshanavand: has joined #ruby
[22:27:29] dopie: has joined #ruby
[22:27:40] lucasb: I like that methods return self, but in this case I'll have to agree. Even more since #reject! returns nil when it doesn't find anything to remove.
[22:27:46] nerium: has joined #ruby
[22:28:23] lucasb: (I mean, I agree that #reject! should return the rejected ones)
[22:29:19] Ox0dea: It would be objectively more useful, and those wanting the current behavior could `tap(&:reject!)`.
[22:29:33] jbrhbr: i got bit by that 'returns nil' behavior yesterday actually
[22:30:07] bnagy: oic internally redundant, I thought you meant redundancy with reject/reject!
[22:30:19] jbrhbr: i did some console tests to make sure it returned the array it had modified, but in my test i had a block body which actually found something. so the last line of my method was `l.reject! ???`
[22:30:35] jbrhbr: but in my actual code, the block never rejected anything, so it was returning nil. took me a while to realize wtf was going on there
[22:30:41] baweaver: has joined #ruby
[22:30:53] lucasb: yeah, conditionally return either self or nil doesn't make much sense :)
[22:31:29] mistermocha: has joined #ruby
[22:32:15] bmalum: has joined #ruby
[22:32:59] RahulT: has joined #ruby
[22:33:21] guacamole: has joined #ruby
[22:33:46] RahulT: has left #ruby: ()
[22:34:00] Limix: has joined #ruby
[22:34:03] edwinvdgraaf: has joined #ruby
[22:34:03] Ox0dea: Unless you're using bang methods in conditionals, which is the intended use case.
[22:34:23] Ox0dea: Regarding their nil-returning semantics, at any rate.
[22:34:29] RahulT: has joined #ruby
[22:34:40] agent_white: has joined #ruby
[22:38:13] B1n4r10: has joined #ruby
[22:38:25] bnagy: you'd need to keep the nil return, but returning the removed items in this case does seem to make sense :\
[22:39:05] bnagy: select! returns what it selected...
[22:40:06] grill: aegis3121 you aren't supposed to use variables defined with let inside before blocks...
[22:40:14] Ox0dea: bnagy: Well, it returns `self`, which amounts to the same thing.
[22:40:33] aegis3121: grill: any particular reason why not?
[22:41:05] grill: http://hastebin.com/avadojunub.vbs
[22:41:06] janebootydoe: has joined #ruby
[22:41:33] tvw: has joined #ruby
[22:42:01] edwinvdgraaf: has joined #ruby
[22:42:21] aegis3121: Mm. I've never messed with before(:context), we typically just do before(:each)
[22:43:40] grill: here's an example snippet http://hastebin.com/ekavasifuv.rb
[22:43:54] zenlot1: has joined #ruby
[22:43:58] aegis3121: Your first block is missing a do?
[22:44:34] aegis3121: these are iVars, yea?
[22:45:06] aegis3121: Wouldn't you need to refer to them as such? expect {Transfer.files_changed?(nil, nil, @flags) } ?
[22:45:21] grill: yeah scratch that. sec
[22:45:42] kerunaru: has joined #ruby
[22:47:08] chipotle: has joined #ruby
[22:48:16] grill: good lord
[22:48:19] grill: it was the missing do
[22:48:41] grill: i HATE it when i do that
[22:48:47] aegis3121: Those little things. always the best.
[22:48:51] Radar: grill: look what happens when you show your REAL code: MAGIC
[22:49:05] Radar: I hope we've all learned a valuable lesson today.
[22:49:17] grill: thanks for rubbing it in
[22:50:11] ellisTAA: has joined #ruby
[22:51:56] atomical: has joined #ruby
[22:52:14] bkxd: has joined #ruby
[22:53:20] antgel: has joined #ruby
[22:53:32] edwinvdgraaf: has joined #ruby
[22:54:00] Psyq: has joined #ruby
[22:54:33] agent_white: has left #ruby: ()
[22:55:16] roshanavand: has joined #ruby
[22:56:12] nfk|laptop: has joined #ruby
[22:56:13] northfurr: has joined #ruby
[22:56:27] edwinvdgraaf: has joined #ruby
[22:58:41] pawnbox: has joined #ruby
[22:58:51] theery: has joined #ruby
[22:59:33] rrichardsr3: has joined #ruby
[22:59:33] northfurr: has joined #ruby
[22:59:44] edwinvdgraaf: has joined #ruby
[23:01:20] solocshaw: has joined #ruby
[23:01:33] dopie: has joined #ruby
[23:02:02] mary5030: has joined #ruby
[23:02:47] baweaver: has joined #ruby
[23:02:53] rikai: has joined #ruby
[23:03:01] nwhirschfeld: has joined #ruby
[23:03:45] yqt: has joined #ruby
[23:05:35] edwinvdgraaf: has joined #ruby
[23:05:42] Ropeney: has joined #ruby
[23:06:54] duper: has joined #ruby
[23:07:52] dopie: has joined #ruby
[23:08:57] benlieb: has joined #ruby
[23:09:16] gigetoo: has joined #ruby
[23:09:35] baweaver: has joined #ruby
[23:14:50] atomical_: has joined #ruby
[23:15:17] Seich: has joined #ruby
[23:15:28] chadwtaylor: has joined #ruby
[23:16:19] edwinvdgraaf: has joined #ruby
[23:16:37] snockerton: has joined #ruby
[23:17:04] thumpba: has joined #ruby
[23:17:10] edwinvdgraaf: has joined #ruby
[23:17:39] guacamole: has joined #ruby
[23:18:37] al2o3-cr: has joined #ruby
[23:19:56] Maletor: has joined #ruby
[23:21:05] mistermocha: has joined #ruby
[23:21:06] vishwa: has joined #ruby
[23:21:16] jamw: has joined #ruby
[23:21:45] vishwa: Guys, is it possible to do something like a.equals? 5 then puts a
[23:22:07] aegis3121: so...print a if it equals 5?
[23:22:08] wldcordeiro: has joined #ruby
[23:22:24] aegis3121: I would wager an `if` is what you want
[23:22:32] vishwa: Basically a.equals? something? then do x
[23:22:33] linduxed: has joined #ruby
[23:22:39] vishwa: More in a ruby-ic method
[23:22:44] SHyx0rmZ: has joined #ruby
[23:22:49] vishwa: That's why I'm not doing if
[23:23:55] vishwa: I remember something vaguely like that on rubymonks but I can't find it
[23:23:59] aegis3121: >> a = 5; print a if a == 5
[23:24:01] ruby[bot]: aegis3121: # => 5nil (https://eval.in/501813)
[23:24:18] edwinvdgraaf: has joined #ruby
[23:26:03] vishwa: aegis3121: That worked
[23:26:10] vishwa: Is there a wat to add an else condition?
[23:26:21] momomomomo: has joined #ruby
[23:26:40] aegis3121: Sounds like a great option for Ternaries: http://stackoverflow.com/questions/4252936/how-do-i-use-the-conditional-operator-in-ruby
[23:26:51] RobertBirnie: has joined #ruby
[23:27:12] vishwa: aegis3121: Exactamundo
[23:28:43] yqt: has joined #ruby
[23:31:48] robbyoconnor: has joined #ruby
[23:31:56] robbyoconnor: has joined #ruby
[23:36:46] jackcom: has joined #ruby
[23:37:50] Axsuul: has joined #ruby
[23:38:59] dionysus69: has joined #ruby
[23:39:10] shevy: ack! foreign language!!!
[23:39:26] m1dnight_: has joined #ruby
[23:40:14] snowy: has joined #ruby
[23:42:22] drocsid: has joined #ruby
[23:43:26] drocsid: I created ruby rvm generated wrappers to start cron jobs. Something happened. Now I'm unable to create them. I'm getting Warning! PATH is not properly set up, '/usr/local/rvm/gems/ruby-2.2.1/bin' is not at first place....
[23:43:29] ixti: has joined #ruby
[23:44:48] drocsid: I checked my path, I see /usr/local/rvm/gems/ruby-2.2.1/bin is the second entry. Why does it have to be the first? I also tried the rvm get stable --auto-dotfiles reccomendation
[23:45:14] northfurr: has joined #ruby
[23:47:10] astrofog: has joined #ruby
[23:48:16] atomical: has joined #ruby
[23:48:59] pipework: shevy: wakka wakka, nanu nanu.
[23:50:08] Log1x: has joined #ruby
[23:50:15] bb010g: has joined #ruby
[23:50:30] B1n4r10: has joined #ruby
[23:50:45] bahar: has joined #ruby
[23:50:45] bahar: has joined #ruby
[23:51:13] drocsid: really why does /usr/local/rvm/gems/ruby-2.2.1/bin have to be the first PATH entry...
[23:51:30] pipework: drocsid: local-first
[23:51:38] pipework: You installed as system, right?
[23:52:40] bkxd: has joined #ruby
[23:52:47] ixti: has joined #ruby
[23:55:28] binaryplease: has joined #ruby
[23:57:46] xet7: has joined #ruby
[23:59:46] atomical_: has joined #ruby
[23:59:55] pawnbox: has joined #ruby