« Back to channel list

#ruby - 25 May 2015

« Back 1 day Forward 1 day »
[00:01:04] swgillespie: has joined #ruby
[00:01:53] sevenseacat: has joined #ruby
[00:02:24] charliesome: has joined #ruby
[00:02:55] ChanServ: -b sushimonster!*@*
[00:10:14] ellisTAA: has joined #ruby
[00:10:38] ellisTAA: can anyone tell me why im getting this error message https://gist.github.com/anonymous/7054c31531a9afa5a82b#file-gistfile2-txt-L1
[00:11:43] Radar: Here is your problem: https://gist.github.com/anonymous/7054c31531a9afa5a82b#file-gistfile1-txt-L26-L30
[00:11:50] Radar: ACTION has lead the horse to water
[00:12:11] Radar: EllisTAA: What is the point of Array.new(1) there?
[00:12:23] Radar: Why do you need Array.new(1) { ... } there?
[00:12:36] ellisTAA: to put them into an array
[00:12:56] ellisTAA: do i put them into arrays?
[00:13:09] Radar: EllisTAA: What happens when you put a debugger (binding.pry) after line 30 and then look at what the students array looks like?
[00:13:14] Radar: You might need to require pry first
[00:14:05] ddarkpassenger: has joined #ruby
[00:14:07] Radar: >> students = []; students << Array.new(1) { "foo" }
[00:14:09] ruboto: Radar # => [["foo"]] (https://eval.in/369295)
[00:14:12] Radar: EllisTAA: ^
[00:14:24] Radar: EllisTAA: Does that look like the array that you want?
[00:14:33] ellisTAA: yeah that???s the array i want
[00:14:57] Radar: Do you really want a two-dimensional array?
[00:14:59] Radar: >> students = []; students << "foo"
[00:15:02] ruboto: Radar # => ["foo"] (https://eval.in/369296)
[00:15:05] Radar: Or do you want a 1-dimensional array?
[00:15:20] ellisTAA: let me double check
[00:15:34] ellisTAA: god damnit i think ur right ahah
[00:15:38] ellisTAA: i misread the assignment
[00:16:05] doublemalt_: has joined #ruby
[00:16:27] sinequanon: has joined #ruby
[00:18:09] ellisTAA: thanks radar
[00:18:42] dfockler: has joined #ruby
[00:18:53] Spami: has joined #ruby
[00:18:55] platzhirsch: has left #ruby: ()
[00:19:45] CloCkWeRX: has joined #ruby
[00:20:30] bb010g: has joined #ruby
[00:20:45] pwattstbd: has joined #ruby
[00:21:26] keen___________: has joined #ruby
[00:21:45] shuber_: has joined #ruby
[00:22:37] blandflakes: has joined #ruby
[00:23:12] ellisTAA: has joined #ruby
[00:25:35] Takle: has joined #ruby
[00:25:53] zotherstupidguy: has joined #ruby
[00:26:39] narcan: has joined #ruby
[00:26:39] bronson: has joined #ruby
[00:27:50] robustus: has joined #ruby
[00:27:57] cirn0: has joined #ruby
[00:29:11] zreisman: has joined #ruby
[00:29:57] Oog: has joined #ruby
[00:30:53] ellisTAA: is there a way to get a loop to return -1 if something isnt found in a data structure besides saying return -1
[00:31:54] sevenseacat: this sounds like something un-rubyish
[00:32:48] ellisTAA: ok just checking
[00:33:02] sevenseacat: what are you trying to do and why do you want to return -1
[00:33:04] Radar: Why are you returning -1?
[00:33:08] Radar: Are you checking that the value is -1?
[00:34:26] pocketprotector: has joined #ruby
[00:38:34] nettoweb: has joined #ruby
[00:39:33] Scripore: has joined #ruby
[00:48:49] sevenseacat: has joined #ruby
[00:50:30] jerius: has joined #ruby
[00:54:49] wolfleemeta____: has joined #ruby
[00:56:28] Limix: has joined #ruby
[00:56:40] julieeharshaw: has joined #ruby
[00:57:13] mfranzwa: has joined #ruby
[00:58:39] psye: has joined #ruby
[00:58:58] wolfleemeta_____: has joined #ruby
[01:00:04] wolfleemeta_____: has joined #ruby
[01:01:39] MichaelGreeves: has joined #ruby
[01:01:49] MichaelGreeves: hi what's wrong with my code? http://repl.it/pUy
[01:02:03] nettoweb: has joined #ruby
[01:02:25] bronson: has joined #ruby
[01:02:50] GriffinHeart: has joined #ruby
[01:03:01] blandflakes: has joined #ruby
[01:03:28] wolfleemeta_____: has joined #ruby
[01:05:09] longfeet: has joined #ruby
[01:05:18] fabrice31: has joined #ruby
[01:06:26] iwishiwerearobot: has joined #ruby
[01:07:39] Pisuke: has joined #ruby
[01:07:48] MichaelGreeves: here's an updated version
[01:07:48] MichaelGreeves: http://repl.it/pUy/1
[01:08:22] KrzaQ: has joined #ruby
[01:12:40] Brozo: has joined #ruby
[01:13:54] bronson: has joined #ruby
[01:14:44] Radar: repl.it isn't loading for me
[01:14:49] Radar: !gist please
[01:14:49] helpa: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[01:14:57] Radar: https://gist.github.com
[01:16:23] sankaber: has joined #ruby
[01:16:24] xxneolithicxx: has joined #ruby
[01:17:21] konsolebox: has joined #ruby
[01:17:31] MichaelGreeves: Radar: https://gist.github.com/Aryan1488/45da12d6d6e18af4c86f
[01:17:34] MichaelGreeves: thank you so much for the help :)
[01:17:42] Radar: !ban MichaelGreeves
[01:17:42] helpa: Radar, you should ban the person highlighted, signed Radar.
[01:18:03] MichaelGreeves: why isn't the code running?
[01:18:15] Radar: +b MichaelGreeves!*@*
[01:18:17] Radar: Radar kicked MichaelGreeves: thanks
[01:19:19] Akagi201: has joined #ruby
[01:20:17] nettoweb: has joined #ruby
[01:20:31] Radar: !ban MichaelGreeves #ruby Racist troll
[01:20:31] helpa: Radar, you should ban the person highlighted, signed Radar.
[01:21:22] Aeyrix: Nowthatswhaticalledgy.gif
[01:21:32] Radar: !ban MichaelGreeves !T 1d Racist troll
[01:21:32] helpa: Radar, you should ban the person highlighted, signed Radar.
[01:21:33] ruboto: Radar, could not find a matching user for "MichaelGreeves"
[01:21:39] Radar: Ok, so that works.
[01:21:53] Aeyrix: Radar: If I write a plugin that browses to any gist, searches for terms such as that, and then automatically bans the user, can we use it? :v
[01:22:00] Aeyrix: Any gist linked *
[01:22:14] Radar: Aeyrix: It doesn't seem to happen that much?
[01:22:25] jstanton: has joined #ruby
[01:22:31] Aeyrix: Recently I've seen at least a few episodes of razor sharp edge per day.
[01:22:55] Radar: -b MichaelGreeves!*@*
[01:23:19] shuber_: has joined #ruby
[01:23:38] Radar: I don't get the reference.
[01:23:47] Aeyrix: ... what reference?
[01:23:54] Radar: "razor sharp edge per day."
[01:24:03] Aeyrix: People such as Greeves
[01:24:16] Aeyrix: 1+ times daily, last few days.
[01:24:21] Radar: [citation needed]
[01:24:26] Aeyrix: [1] My logs.
[01:24:36] Radar: http://logs.ryanbigg.com/ruby?date=2015-05-24
[01:24:47] Aeyrix: o wait my bad
[01:24:50] Aeyrix: that's including #postgres
[01:24:59] nso95: has joined #ruby
[01:25:04] Aeyrix: One of them literally went from here to #postgres and said the same shit.
[01:25:04] Radar: One day before that, 2.
[01:25:25] Radar: Day before that also 2.
[01:25:28] tkuchiki: has joined #ruby
[01:25:37] Aeyrix: So... 1+ per day?
[01:25:49] Aeyrix: That's what I said yo.
[01:26:01] Aeyrix: <Aeyrix> 1+ times daily, last few days.
[01:26:05] Radar: They don't always gist code
[01:26:11] Aeyrix: It can do both.
[01:26:41] Aeyrix: Also is there a site / mailing list for the ruby/rails meetup in Melb?
[01:26:47] Radar: You mean it can parse natural language and tell if people are being idiots?
[01:26:48] Aeyrix: I have 2much going on and forgot the date already.
[01:26:53] Radar: Aeyrix: This Wednesday night.
[01:27:09] Aeyrix: I'll talk about parsing natural language and how to tell if people are being idiots.
[01:27:19] Aeyrix: Such as being able to search for keywords such as the blatantly obvious in that Gist.
[01:27:19] Radar: Aeyrix: http://www.meetup.com/Ruby-On-Rails-Oceania-Melbourne/events/220772391/
[01:27:31] Aeyrix: >Richmond
[01:27:34] Aeyrix: is that area even safe
[01:27:43] Aeyrix: every time I go past it looks like even the vandalisers have tapped out
[01:27:55] Radar: It's inner city. It's safe.
[01:28:14] sevenseacat: its not like its Footscray or anything.
[01:28:16] Aeyrix: S'alright, my fedora will protect me either way.
[01:28:21] Aeyrix: Oh wow shots fired.
[01:28:26] Aeyrix: ACTION lives out that way.
[01:28:34] sevenseacat: I grew up in Footscray. I'm allowed.
[01:28:34] Scripore: has joined #ruby
[01:28:44] Aeyrix: It's not a horrible area. Just a lot of VU students.
[01:29:25] Rubie: has joined #ruby
[01:30:18] arescorpio: has joined #ruby
[01:30:19] DerisiveLogic: has joined #ruby
[01:30:46] DerisiveLogic: has joined #ruby
[01:31:32] Aeyrix: Radar: do i have to bring some minerals as a sacrifice or what?
[01:31:38] Aeyrix: s/sacrifice/offering
[01:33:52] Radar: Aeyrix: Bring your body.
[01:34:16] Aeyrix: You'll probably recognise me immediately like
[01:34:23] Aeyrix: "That's that guy who does nothing but shittalk in #ruby."
[01:34:41] Brozo: has joined #ruby
[01:34:43] sevenseacat: that pommy bastard eh
[01:34:56] Aeyrix: I tend to hide my accent around people I don't know.
[01:35:44] nettoweb: has joined #ruby
[01:35:46] Aeyrix: Years of being taunted for it at public schools has taught me the art of sounding like I rode a kangaroo to wherever I am and have four cork hats in my swag.
[01:36:11] Radar: I get told I am much nicer in person than on the internet.
[01:36:50] sevenseacat: I'm a lot quieter in person.
[01:37:25] cirn0: has joined #ruby
[01:39:02] DynamicMetaFlow: has joined #ruby
[01:39:38] rickmasta: has joined #ruby
[01:40:09] nettoweb: has joined #ruby
[01:42:03] juanpaucar: has joined #ruby
[01:42:57] nettoweb: has joined #ruby
[01:43:12] darkf: has joined #ruby
[01:43:12] shuber_: has joined #ruby
[01:43:50] Aeyrix: I get told I'm not the person I am on the Internet.
[01:43:58] Aeyrix: Mainly because I can't shitpost verbally.
[01:44:49] EasyCo: has joined #ruby
[01:45:10] tubuliferous: has joined #ruby
[01:46:10] TheNet: has joined #ruby
[01:47:21] tyfighter: has joined #ruby
[01:47:38] umgrosscol: has joined #ruby
[01:50:00] baweaver: Aeyrix: I tend to make up a new accent around people I don't know
[01:50:20] Aeyrix: baweaver: Hmm?
[01:50:27] baweaver: earlier post
[01:50:35] baweaver: 18:34 Aeyrix: I tend to hide my accent around people I don't know.
[01:50:50] Aeyrix: Different accent for different people?
[01:50:55] Aeyrix: like some people think you're from SF, some from TX?
[01:51:00] baweaver: I like to mix it up on occasion
[01:51:39] ellisTAA: why is this returning nothing?? https://gist.github.com/ellismarte/c05f625641053865cdac#file-ornage-rb-L48
[01:51:41] Aeyrix: I'm not v. good with accents.
[01:51:57] sinequanon: has joined #ruby
[01:52:31] baweaver: >> puts 1;# EllisTAA:
[01:52:32] ruboto: baweaver # => 1 ...check link for more (https://eval.in/369302)
[01:52:36] sevenseacat: EllisTAA: where are you setting @number_of_oranges
[01:52:44] baweaver: nevermind, anyways
[01:52:51] baweaver: puts returns nil
[01:53:03] sevenseacat: or do you mean the actual method returns nothing?
[01:53:13] sevenseacat: the actual pick_an_orange! method
[01:53:28] ellisTAA: i set it when i initialize
[01:53:37] ellisTAA: and then change the value when method age! is called
[01:53:51] baweaver: that and you have an end and that's not in a method
[01:54:07] sevenseacat: didnt even see that
[01:54:13] sevenseacat: yay for dodgy indentation
[01:54:28] sevenseacat: that line never gets hit
[01:54:28] bruno-: has joined #ruby
[01:54:38] baweaver: that, and you have a lot of odd returns in there
[01:54:49] baweaver: if x return true else return false end
[01:54:55] baweaver: is the same as just flat out saying x
[01:55:09] ellisTAA: lol i thought that end was for the unless ...
[01:55:18] baweaver: postfix, nope
[01:55:19] Aeyrix: https://twitter.com/SidusNova/status/601299912471412737/photo/1
[01:55:37] baweaver: even then, that'd lack an end if it were true
[01:55:57] sevenseacat: i want this book.... crystals for business success. got it.
[01:56:29] ellisTAA: i???ve got to get better at syyntax 0_o
[01:56:41] Aeyrix: I'm gonna add a finding to my reports in future.
[01:56:50] Aeyrix: "Malachite not used in antivirus solutions on endpoint devices."
[01:57:06] Aeyrix: Critical risk.
[01:57:19] havenwood: has joined #ruby
[01:57:35] baweaver: ohai havenwood
[01:57:44] havenwood: baweaver: \o
[01:57:52] baweaver: how's the weekend?
[01:58:32] havenwood: how's yours going?
[01:58:51] baweaver: Helping a friend get moved in to SF, other than that hacking around with some Scala
[01:59:05] havenwood: sevenseacat: weekinterbetween
[01:59:15] Aeyrix: ACTION sighs at you people having a rest day.
[01:59:53] rodfersou: has joined #ruby
[02:02:27] fedexo: has joined #ruby
[02:04:32] TheNet: has joined #ruby
[02:10:47] pontiki: hah, i spent 8 hours working on a sunday
[02:11:00] pontiki: i'll likely be spending another 8+ tomorrow, a purported holiday
[02:11:07] pontiki: at least i get to bill
[02:19:42] sriking007: has joined #ruby
[02:21:10] mjuszczak: has joined #ruby
[02:24:44] troulouliou_dev: has joined #ruby
[02:24:51] that1guy: has joined #ruby
[02:25:39] einarj: has joined #ruby
[02:29:07] ellisTAA: what is the point of this method? http://ruby-doc.org/core-2.2.0/Method.html#method-i-5B-5D
[02:30:16] nettoweb: has joined #ruby
[02:30:44] Coraline: EllisTAA: dynamically adding a method to an object.
[02:31:49] turtil: has joined #ruby
[02:32:18] irobevjodu: has joined #ruby
[02:32:24] ellisTAA: has joined #ruby
[02:32:30] ellisTAA: coraline: ty
[02:32:35] Coraline: Sure thing!
[02:32:43] sevenseacat: well no, dynamically getting a reference to a method
[02:33:00] DuoSRX: has joined #ruby
[02:33:00] ellisTAA: so m is set to 12 and we create it with .method(:+) which allows us to change its value by calling it?
[02:33:01] sevenseacat: so it can be called, inspected, etc.
[02:33:32] sevenseacat: no, m is a reference to the + method on the fixnum 12
[02:33:41] Coraline: Sorry I was wrong
[02:34:02] nettoweb_: has joined #ruby
[02:34:15] sevenseacat: so you can call that method with m.call(3), which is the same as 12 + 3
[02:34:21] lessless: has joined #ruby
[02:34:51] ellisTAA: why is + in a string
[02:35:31] ellisTAA: i never see that method used
[02:36:23] ellisTAA: what is the point of cloning a method?
[02:36:33] sevenseacat: EllisTAA: well you're only learning the basics of ruby, you're not looking at metaprogramming yet
[02:36:33] tjbiddle: has joined #ruby
[02:37:26] ellisTAA: what websites should i be reading in order to become a programmer
[02:37:40] MrBeardy: you should be reading code
[02:38:04] MrBeardy: look at gem code to see how certain things are used, you'll learn a lot more from example than documentation
[02:38:41] sevenseacat: you should be reading code and writing code
[02:38:50] ellisTAA: mrbeardy: cool ty
[02:39:02] Oog_: has joined #ruby
[02:40:57] MrBeardy: just a clarification, by "gem code" I meant source code for gems (https://rubygems.org/gems)
[02:41:21] ellisTAA: so i can just find that on github right?
[02:41:58] MrBeardy: most have a link to their official source code, but as long as you install the gem with "gem install <name>", you'll have access to the distributed source in your gem folder
[02:42:29] Oog: has joined #ruby
[02:42:34] ellisTAA: cool how do i access the gem folder? via text editor? or do i have to find the folder on my comp?
[02:44:13] MrBeardy: you can find information by running "gem environment" in the command line
[02:44:28] MrBeardy: it'll list where gems are installed under the "GEM PATHS" heading
[02:45:05] sevenseacat: you can also use `gem open gemname` which will open the gem in your default $EDITOR
[02:46:17] MrBeardy: that's pretty cool, I don't get that luxury using a VM though :(
[02:48:01] ellisTAA: when u go in to read the sourccode, what is your approach? do u always read the readme first? what???s the important stuff?
[02:48:37] umgrosscol: has joined #ruby
[02:49:22] Coraline: I generally look over the classes first to get a sense of how it's organized, then I trace the workflows.
[02:49:50] _blizzy_: has joined #ruby
[02:50:57] bb010g: has joined #ruby
[02:53:08] pipework: sevenseacat: hi
[02:53:16] sevenseacat: pipework: happy monday! \o/
[02:53:24] pipework: sevenseacat: it's Sunday!
[02:53:30] sevenseacat: pipework: stop living in the past, man!
[02:53:31] pipework: sevenseacat: Happy Memorial day though
[02:53:34] tjbiddle: has joined #ruby
[02:53:43] pipework: sevenseacat: Stop it with the spoilers, you future-person
[02:53:44] sevenseacat: pipework: what does Memorial Day commemmorate?
[02:53:45] ellisTAA: coraline: ty i will write that down
[02:53:52] ddarkpassenger: has joined #ruby
[02:53:52] ellisTAA: so i heard the liskov principle means the base class (i think that means subclass) should be able to use the class???s blueprint w/o the class knowing about the sublcass? can someone help me udnerstand what this means
[02:53:56] fabrice31: has joined #ruby
[02:54:06] pipework: sevenseacat: The dead!
[02:54:18] pipework: sevenseacat: Specifically, those who have died in service to the great nation of twinkies.
[02:54:47] sevenseacat: if I had a twinkie, I would eat it in honour of them.
[02:55:02] sevenseacat: ACTION knows a twinkie is some sort of sugary junk food
[02:55:06] ellisTAA: coraline: what does it mean to trace the workflows?
[02:55:08] iwishiwerearobot: has joined #ruby
[02:55:15] pipework: sevenseacat: If you had a twinkie, you'd probably make more money. har har har. :(
[02:55:42] sevenseacat: i shouldn't be laughing at that but I am -_-
[02:56:04] Oog: has joined #ruby
[02:56:05] pipework: I laugh to stop myself from crying.
[02:56:18] pipework: Until I cry from laughing too hard, and then I just feel silly.
[02:57:04] wildroman2: has joined #ruby
[02:57:42] robbyoconnor: has joined #ruby
[02:59:09] dseitz: has joined #ruby
[02:59:46] Coraline: EllisTAA: like see how the gem is invoked and follow the commands through
[02:59:58] ellisTAA: coraline: gotcha
[03:00:56] bronson: has joined #ruby
[03:02:47] greenbagels: has joined #ruby
[03:03:58] mjuszczak: has joined #ruby
[03:05:38] slucx: has joined #ruby
[03:07:34] jenrzzz: has joined #ruby
[03:09:07] that1guy: has joined #ruby
[03:10:53] Coraline: Note to self: don't answer programming questions when you've had a lot of wine
[03:12:30] pontiki: or have a lot more wine before you answer them
[03:13:46] n_blownapart: has joined #ruby
[03:14:02] sent1nel: has joined #ruby
[03:17:38] dopie: has joined #ruby
[03:20:11] ddarkpassenger: has joined #ruby
[03:20:59] HotCoder: has joined #ruby
[03:23:13] mary5030: has joined #ruby
[03:24:27] Dakuan: has joined #ruby
[03:25:00] braincrash: has joined #ruby
[03:25:38] _blizzy_: has joined #ruby
[03:25:58] neanderslob: has joined #ruby
[03:27:27] redhands: has joined #ruby
[03:29:03] zreisman: has joined #ruby
[03:29:12] irobevjodu: has joined #ruby
[03:29:43] Rubie: has joined #ruby
[03:30:56] irobevjodu: has left #ruby: ()
[03:31:00] juanpaucar: has joined #ruby
[03:33:13] cibs: has joined #ruby
[03:33:58] tubuliferous: has joined #ruby
[03:35:50] irobevjodu: has joined #ruby
[03:36:35] bronson: has joined #ruby
[03:38:19] tyfighter: has joined #ruby
[03:39:22] mary5030: has joined #ruby
[03:39:55] speakingcode: has joined #ruby
[03:43:05] Yzguy: has joined #ruby
[03:43:20] Yzguy: has left #ruby: ()
[03:43:21] Yzguy: has joined #ruby
[03:44:14] shuber_: has joined #ruby
[03:45:57] ZergCoder: has joined #ruby
[03:48:48] ZergCoder: Can someone help me out with a noob problem? https://gist.github.com/anonymous/abbb31f19d0de81dba20
[03:48:59] shevy: a zergling!
[03:49:00] shevy: kill them!
[03:49:24] ZergCoder: new to ruby, I'm trying to append to a file without overwriting the previous info
[03:49:34] shevy: you must use mode
[03:49:38] sevenseacat: i believe you want a different mode
[03:49:40] shevy: 'a' or 'a+' for append it should be
[03:49:44] sevenseacat: is it a for appending?
[03:49:48] ZergCoder: oh instead of "w"?
[03:49:56] shevy: yes 'w' will or should overwrite
[03:50:01] ZergCoder: thanks guys
[03:50:17] shevy: here is table http://stackoverflow.com/questions/3682359/what-are-the-ruby-file-open-modes-and-options
[03:50:35] sevenseacat: ACTION upvotes answer
[03:50:45] shevy: ACTION upvotes cats
[03:54:56] doublemalt_: has joined #ruby
[03:57:15] djbkd: has joined #ruby
[03:59:16] horsecowdog: has joined #ruby
[03:59:43] al2o3-cr: anyone here know cinch?
[04:00:00] helpa: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[04:00:05] Radar: argh wrong channel
[04:00:26] Radar: al2o3-cr: Don't ask has anyone used. Just ask your question.
[04:00:28] baweaver: has joined #ruby
[04:00:49] Radar: FWIW, I built my own library for that: https://github.com/radar/summer
[04:01:12] Oog: has joined #ruby
[04:01:32] al2o3-cr: I want to know if m.reply = reply to channel | m.user.nick = nick who send message | m.user.send = send user private message
[04:01:50] al2o3-cr: Radar: oh thanks i'll take a look :)
[04:02:03] Aleva: has joined #ruby
[04:03:16] al2o3-cr: really just messing around as i've never used cinch before
[04:04:48] al2o3-cr: Radar: hey looks good didn't know about summer
[04:05:37] jack_rabbit: has joined #ruby
[04:07:44] Aeyrix: tfw pipework never woke up and helped me
[04:08:22] shevy: what a lazy pipework that is
[04:08:47] al2o3-cr: Radar: is handle_xxx like if you wanted to hange 315 => end of /WHO list?
[04:08:51] jack_rabbit: has joined #ruby
[04:08:54] Radar: al2o3-cr: yes
[04:08:58] Musashi007: has joined #ruby
[04:09:12] ellisTAA: has joined #ruby
[04:11:00] Deele: has joined #ruby
[04:13:14] n3b: has joined #ruby
[04:17:25] nahtnam: has joined #ruby
[04:17:27] irobevjodu: has left #ruby: ()
[04:18:13] al2o3-cr: Radar: could you give me a simple config example?
[04:18:25] Radar: al2o3-cr: look in https://github.com/radar/railsbot
[04:18:37] al2o3-cr: Radar: ok thanks :)
[04:20:51] Rubie: has joined #ruby
[04:21:22] Oog: has joined #ruby
[04:21:44] zotherstupidguy: has joined #ruby
[04:21:45] zotherstupidguy2: has joined #ruby
[04:22:35] zotherstupidguy2: has left #ruby: ()
[04:25:49] Kricir: has joined #ruby
[04:27:18] jack_rabbit_: has joined #ruby
[04:27:48] al2o3-cr: Radar: if i'm using ssl where do you specify the port or does it take care of that?
[04:28:16] krz: has joined #ruby
[04:28:24] jack_rabbit_: has joined #ruby
[04:28:24] Radar: al2o3-cr: https://github.com/radar/summer/blob/master/lib/summer.rb#L59-L60
[04:28:38] Radar: al2o3-cr: Where port is configured as part of Bot.new("irc.freenode.net", "4447")
[04:29:19] al2o3-cr: yeah I see now cheers
[04:29:30] vivekananda: has joined #ruby
[04:29:45] Musashi007: has joined #ruby
[04:30:36] Oog: has joined #ruby
[04:30:39] jack_rabbit_: has joined #ruby
[04:31:57] jack_rabbit_: has left #ruby: ()
[04:37:56] ych_: has joined #ruby
[04:39:16] n3b: has joined #ruby
[04:40:15] irobevjod: has joined #ruby
[04:41:06] jack_rabbit: has joined #ruby
[04:42:57] Musashi007: has joined #ruby
[04:42:58] fabrice31: has joined #ruby
[04:43:43] sent1nel: has joined #ruby
[04:44:03] iwishiwerearobot: has joined #ruby
[04:45:57] tkuchiki: has joined #ruby
[04:48:02] CalvinnHobbes: has joined #ruby
[04:52:32] ellisTAA: i ran gem install pry then i ran pry and my terminal said -bash: pry: command not found
[04:53:14] sevenseacat: do the docs say you can do that?
[04:54:04] ellisTAA: it says it on their website
[04:54:46] ellisTAA: http://pryrepl.org/
[04:55:20] shuber_: has joined #ruby
[04:55:35] sevenseacat: so you can - works here
[04:55:45] sevenseacat: did pry install correctly?
[04:57:01] sevenseacat: then i wonder why it doesnt work <_<
[04:57:33] ellisTAA: so i ran it again and it said Successfully installed pry-0.10.1
[04:57:34] ellisTAA: Parsing documentation for pry-0.10.1
[04:57:35] ellisTAA: 1 gem installed
[04:57:45] ellisTAA: but when i run pry -v it says command not found
[04:57:53] ellisTAA: do i need to make gems available or something?
[05:00:03] sevenseacat: what command isnt found?
[05:00:29] sevenseacat: you didnt install it ina different gemset or something?
[05:00:37] ellisTAA: so i run gem install pry, it says gem installed, then i run pry and it says not found
[05:00:47] ellisTAA: i???m not sure??? how can i figure that out?
[05:01:06] sevenseacat: well if you're running the commands one after the other, then the answer is no
[05:01:51] Tux_007__: has joined #ruby
[05:02:10] Coraline: Could be a path issue maybe?
[05:02:15] Coraline: try which pry
[05:02:17] ellisTAA: i think i messed something up ??? is it possible to just clear my ruby and rails folders or something
[05:02:31] ellisTAA: which pry returned nothing
[05:02:33] ellisTAA: just a blank line
[05:02:39] Coraline: Then it's not in your path.
[05:03:07] ellisTAA: how can i get in the right path?
[05:03:09] Coraline: That's curious
[05:03:16] Coraline: Try opening a new Terminal window and trying again
[05:03:43] ellisTAA: ERROR: While executing gem ... (Errno::EACCES)
[05:03:43] ellisTAA: Permission denied - /Users/Ellis/.rbenv/versions/2.0.0-p481/lib/ruby/gems/2.0.0/gems/pry-0.10.1/CHANGELOG.md
[05:03:54] MrBeardy: run rbenv rehash
[05:04:08] MrBeardy: then try running pry
[05:04:32] ellisTAA: what does rehash do
[05:04:41] MrBeardy: https://github.com/sstephenson/rbenv#rbenv-rehash
[05:05:47] ellisTAA: :\ https://gist.github.com/ellismarte/103dc30bf648b854c076
[05:08:34] MrBeardy: try adding /usr/local/bin to your path: export PATH=$PATH:/usr/local/bin
[05:08:36] ellisTAA: so i found pry in my gems folder ??? it looks like a i have 2 folders ???. called 2.0.0
[05:09:04] ellisTAA: is it possible i installed 2.0.0 twice and computer is getting confused?
[05:12:34] tagrudev: has joined #ruby
[05:13:19] ellisTAA: so in my .rbenv folder i have a versions folder that only has one version 2.0.0-p481, does that refer to ruby or a version of rbenv?
[05:15:51] ellisTAA: so when i click on that version folder, then on lib, then on ruby, there is a folder clled 2.0.0, then a folder called gems which contains a folder called 2.0.0 ???. pry is in the second 2.0.0 folder but not the first ???
[05:16:41] tubuliferous: has joined #ruby
[05:16:55] MrBeardy: the first is just for ruby source, the second is for gems
[05:17:06] MrBeardy: well, the second inside the gems/ folder, that is
[05:17:30] ellisTAA: ok i think i need to change my gem path ??? i think that???s what u were saying. how do i do that?
[05:17:37] chinmay_dd: has joined #ruby
[05:17:42] MrBeardy: you shouldn't need to change your gem path, everything seems fine
[05:17:50] ellisTAA: then what???s wrong
[05:17:52] MrBeardy: EllisTAA: cd into /usr/local/bin and see if you see a pry executable, then echo $PATH and make sure /usr/local/bin is in your path
[05:18:44] tyfighter: has joined #ruby
[05:19:48] juanpaucar: has joined #ruby
[05:20:25] ravenreborn: has joined #ruby
[05:20:57] ellisTAA: i did that and this is what i got /usr/local/bin:/usr/local/sbin:~/bin:/Users/Ellis/.rbenv/bin:/Users/Ellis/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/ImageMagick/bin
[05:22:37] Aeyrix: https://xkcd.com/837/
[05:22:46] tubuliferous_: has joined #ruby
[05:22:54] Aeyrix: wrong channel
[05:23:32] shevy: #ruby is the right channel
[05:24:06] shevy: I am comparing #ruby to #nim
[05:24:17] shevy: on #nim they begin to remind me of #haskell
[05:24:28] shevy: so perhaps that's one thing that ruby lacks here - the complex metadiscussions
[05:25:22] jbomo: has left #ruby: ()
[05:25:23] irobevjodu: has joined #ruby
[05:25:40] ellisTAA: why isn???t pry in my usr/local/bin folder?
[05:26:51] MrBeardy: I was just assuming it should have been in there since that's where mine was, but for you it may be in /Users/Ellis/.rbenv/bin, since you're using rbenv
[05:27:54] kp666: has joined #ruby
[05:28:21] cirn0: has joined #ruby
[05:29:11] ellisTAA: mrbeardy: i don???t have a .rbenv/bin folder, my .rbenv folder only has a shims and versions folder
[05:29:41] sandelius: has joined #ruby
[05:29:52] MrBeardy: just out of interest, can you try running rbenv exec pry and see if that works
[05:29:59] ellisTAA: oh but in versions > 2.0.0 > bin there is a pry executable
[05:30:11] ellisTAA: k ill run it
[05:31:14] ellisTAA: didn???t work, it looks like it is looking for the gem in a folder that doesn???t really contain anything
[05:31:56] bruno-: has joined #ruby
[05:31:58] sandelius: has joined #ruby
[05:32:47] mjuszczak: has joined #ruby
[05:35:24] cirn0: has joined #ruby
[05:37:39] x44x45x41x4E: has joined #ruby
[05:38:21] Ropeney: has joined #ruby
[05:41:36] aganov: has joined #ruby
[05:43:55] hsps_: has joined #ruby
[05:44:34] jenrzzz: has joined #ruby
[05:45:27] dfockler: has joined #ruby
[05:45:32] Rubie: has joined #ruby
[05:45:42] mjuszczak: has joined #ruby
[05:46:33] Scripore: has joined #ruby
[05:49:45] carneiro: has joined #ruby
[05:49:46] Oog: has joined #ruby
[05:50:42] shevy: welcome to rbenv!
[05:56:56] arturaz: has joined #ruby
[05:57:48] shuber_: has joined #ruby
[05:58:20] xxneolithicxx: https://gist.github.com/anonymous/d77964bf7325fc5efccb
[05:58:49] xxneolithicxx: has anyone seen this error before, i get it on two different ruby versions with different rubygems versions
[05:58:54] JohnBat26: has joined #ruby
[05:59:12] shuber_: has joined #ruby
[06:06:46] werelivinginthef: has joined #ruby
[06:07:25] _JohnBat26_: has joined #ruby
[06:11:13] shuber_: has joined #ruby
[06:13:07] ICantCook: has joined #ruby
[06:13:25] zotherstupidguy: has joined #ruby
[06:13:26] zotherstupidguy1: has joined #ruby
[06:14:08] sent1nel: has joined #ruby
[06:16:12] krz: has joined #ruby
[06:17:34] zotherstupidguy: has joined #ruby
[06:17:50] kp666: has joined #ruby
[06:18:41] ramfjord: has joined #ruby
[06:19:14] arietis: has joined #ruby
[06:22:16] Limix: has joined #ruby
[06:25:15] selu: has joined #ruby
[06:26:38] GriffinHeart: has joined #ruby
[06:30:00] ahmetkapikiran: has joined #ruby
[06:30:37] zotherstupidguy: has joined #ruby
[06:31:37] fabrice31: has joined #ruby
[06:31:55] Neomex: has joined #ruby
[06:32:44] bruno-: has joined #ruby
[06:32:47] iwishiwerearobot: has joined #ruby
[06:33:11] dopie: has joined #ruby
[06:34:26] asmodlol: has joined #ruby
[06:34:59] djbkd: has joined #ruby
[06:35:27] Musashi007: has joined #ruby
[06:36:10] wildroman2: has joined #ruby
[06:39:50] bigmac: has joined #ruby
[06:39:51] al2o3-cr: oops wrong buffer
[06:40:00] Aeyrix: ebonics: oh lol
[06:40:03] Aeyrix: i knew i recognised your name
[06:45:55] Oog: has joined #ruby
[06:47:19] haxrbyte_: has joined #ruby
[06:50:18] Kricir: has joined #ruby
[06:52:07] craigp: has joined #ruby
[06:56:03] cina: has joined #ruby
[06:56:59] kaspernj: has joined #ruby
[06:57:15] arup_r: has joined #ruby
[06:57:58] cina: question regarding compression -- I have been compressing a file stream using Zlib::GzipWriter, but Windows XP doesn't recognize GZIP, is there an alternative compression method (e.g. ZIP) in with good Ruby support that hopefully Windows XP understands?
[06:58:14] kp666: has joined #ruby
[06:58:26] haxrbyte: has joined #ruby
[06:59:47] haxrbyte_: has joined #ruby
[07:00:12] pengin: has joined #ruby
[07:00:30] ahmetkapikiran: has joined #ruby
[07:03:28] xxneolithicxx: hmm so i figured out for my above issue is that my monkey patch for Gem::Specification is wrong, since if i remove it completely I can then build the gem
[07:04:05] xxneolithicxx: any ideas what the correct way to monkey patch that class would be?
[07:05:02] xxneolithicxx: Im trying to add the methods to this: https://github.com/rubygems/rubygems/blob/master/lib/rubygems/specification.rb#L38
[07:05:04] mengu: has joined #ruby
[07:05:05] mengu: has joined #ruby
[07:05:51] Takle: has joined #ruby
[07:07:37] wildroman2: has joined #ruby
[07:07:42] haxrbyte: has joined #ruby
[07:08:42] juanpaucar: has joined #ruby
[07:11:33] tubuliferous_: has joined #ruby
[07:14:50] nvll: has joined #ruby
[07:16:03] ravenreborn: has joined #ruby
[07:16:57] unshadow: has joined #ruby
[07:18:18] dumdedum: has joined #ruby
[07:18:29] n008f4g_: has joined #ruby
[07:18:41] Juanchito: has joined #ruby
[07:18:45] ponga: has joined #ruby
[07:20:59] arietis: has joined #ruby
[07:21:52] zotherstupidguy: has joined #ruby
[07:22:17] sina: has joined #ruby
[07:22:30] anisha: has joined #ruby
[07:23:03] towski_: has joined #ruby
[07:24:00] User458764: has joined #ruby
[07:31:00] tesuji: has joined #ruby
[07:32:34] Hanmac: has joined #ruby
[07:32:59] antgel: has joined #ruby
[07:34:08] arup_r: has joined #ruby
[07:35:20] bigkevmcd: has joined #ruby
[07:35:37] sandelius: has joined #ruby
[07:36:39] arup_r: Does anybody have idea on this? http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/433475 This is a small demonstration of a practical applications.....
[07:40:50] arup_r: adaedra: o/
[07:42:39] dumdedum: has joined #ruby
[07:43:39] sent1nel: has joined #ruby
[07:45:11] gagrio: has joined #ruby
[07:46:57] PierreRambaud: has joined #ruby
[07:47:59] codecop: has joined #ruby
[07:48:02] codecop_: has joined #ruby
[07:49:35] wildroman2: has joined #ruby
[07:49:55] Papierkorb: has joined #ruby
[07:51:02] kp666: has joined #ruby
[07:51:36] colorisco: has joined #ruby
[07:52:08] kp666: has joined #ruby
[07:54:39] arup_r1: has joined #ruby
[07:55:14] mercerist: has joined #ruby
[07:55:51] mathie: has joined #ruby
[07:56:09] iamninja: has joined #ruby
[07:56:13] arup_r__: has joined #ruby
[07:56:55] arup_r: has joined #ruby
[07:57:05] ebonics: arup_r_, why are you using threads in the first place if you want it to be synchronous
[07:57:23] arup_r: ebonics: good question..
[07:57:52] arup_r: the app is a Rails app.. where users requests are served using threads.....
[07:58:08] ebonics: arup_r, if you must, http://ruby-doc.org/core-2.2.0/Mutex.html
[07:59:20] last_staff: has joined #ruby
[07:59:53] ebonics: arup_r, but if you're making your rails app block you know that it will take a long time for people to get a response
[08:04:39] arup_r: ebonics: each user request is composed of multiple tasks(fetch from FTP, unzip, import to db, export from db as a csv using a business logic query, and then email, clean tables) .. so when N requests will come,, I want N req to queue.. and service them one by one.
[08:04:59] arup_r: suckerpuch is dong it async way... with multiple threads
[08:05:01] ebonics: arup_r, then you need a queue
[08:05:14] adaedra: queuing HTTP requests?
[08:05:14] ebonics: arup_r, consider beanstalkd
[08:05:22] ebonics: you queue it on beanstalk for example
[08:05:23] adaedra: you'll hit timeout
[08:06:52] ebonics: arup_r, or you can use a db queue.. but that's suboptimal
[08:07:12] ebonics: beanstalk is your best choice imo
[08:07:14] arup_r: ebonics: I have a class Userrquest which will wrap all other tasks as I said inside the object.. and submit the UserRequest objects.......
[08:07:31] arup_r: let me see beanstalk..
[08:07:58] ebonics: arup_r, so serialize it, store it in redis and then when you're ready to process it pop it out
[08:10:59] Beoran_: has joined #ruby
[08:11:13] arup_r: ebonics: didn't get you what to serialize
[08:12:26] arup_r1: has joined #ruby
[08:12:52] arup_r1: Am I visible ?
[08:12:58] arup_r1: I hv network issue here
[08:13:10] attlasbot: has joined #ruby
[08:13:32] arup_r1: so serialize it ... what to serialize ?
[08:13:41] arup_r1: I didn't get ths
[08:15:20] ebonics: arup_r_, you said you had a UserRequest object?
[08:16:06] arup_r1: That object will wrap other tasks objects........ which I had mentioned..
[08:16:16] arup_r1: so serializing how it helps.
[08:16:28] ebonics: it's better to decouple all your tasks instead of wrap them
[08:16:34] ebonics: you can have multiple queues for all different tasks
[08:16:36] arup_r1: Just asking..
[08:17:16] krz: has joined #ruby
[08:17:21] arup_r1: but.. tasks for each object oN has to be performed synchronously..... like T1..Tn order..
[08:17:34] ebonics: ok then keep them wrapped
[08:17:50] arup_r1: When O1 is processing.. then no the other Oi should start....
[08:18:12] ebonics: userrequest -> serialize -> redis.put(jobid, reqobj) -> beanstalk.put(jobid)
[08:18:15] arup_r1: because resources can't be shared as per current situation
[08:18:36] arup_r1: let me think it.
[08:20:24] fabrice31: has joined #ruby
[08:21:35] iwishiwerearobot: has joined #ruby
[08:23:29] arup_r1: ebonics: Why it is good over a normal Ruby stdlib Queue ? Asking for knowledge.
[08:23:39] arup_r1: I meant beanstalk
[08:23:53] ebonics: arup_r_, because if you use ruby then you need to put more strain on your http server
[08:24:29] ebonics: you just push it to the queue and then finish the http request
[08:24:32] ebonics: and process it on the backend
[08:24:49] arup_r1: ok.. beanstalk does serial processing.. right ..?
[08:24:58] ebonics: serial processing?
[08:25:09] arup_r1: synchronous I meant
[08:25:18] ebonics: it has many options
[08:25:27] arup_r1: No 2 jons will interfare each other..
[08:25:36] arup_r1: one job at a time ?
[08:25:44] ebonics: you can make it a pull queue
[08:25:50] cirn0: has joined #ruby
[08:25:57] ebonics: you will have a separate application for processing out of beanstalk
[08:26:13] ebonics: so your http server will push it to beanstalk
[08:26:21] arup_r1: No.. for now synchronous processing is enough.
[08:27:05] ebonics: your http server will push the task to beanstalk, then your other app will pull it from beanstalk and process them one at a time
[08:28:25] chinmay_dd: has joined #ruby
[08:28:38] arup_r1: from controller action I need to submit UserRequest object to Redis.. like you said userrequest -> serialize -> redis.put(jobid, reqobj) -> beanstalk.put(jobid)
[08:28:58] ebonics: thats all your http will do
[08:29:06] arup_r1: last question... may I ?
[08:29:45] arup_r1: Why redis? not directly submitting to beanstalk
[08:30:07] ebonics: you can do that if you want, but beanstalk is not meant to store data
[08:31:25] ebonics: like i would encode my userrequest into json, put it into redis
[08:31:42] ebonics: then on the worker beanstalk will pass me the job id, redis.get(jobid), and you will get your json
[08:31:57] ebonics: instead of having to process the beanstalk response and parse it
[08:32:39] ebonics: if your server is shit then go ahead and put it all in beanstalk
[08:32:48] ebonics: but for max scalability you want to decouple that
[08:33:24] arup_r1: so.. ebonics:
[08:33:55] terlar: has joined #ruby
[08:34:20] Alina-malina: has joined #ruby
[08:34:32] arup_r1: using a loop { } I will get data from Redis and inser those into beanstalk.. right?
[08:35:18] ebonics: beanstalk holds only your job id
[08:35:31] ebonics: redis holds your userrequest, and use the jobid as the key
[08:35:59] ebonics: so you say hey beanstalk give me another job to do
[08:36:08] ebonics: and its like ok, do this job..
[08:36:17] ebonics: so then you say hey redis i need the data for this job, bro
[08:36:25] ebonics: then you do whatever you want
[08:37:19] arup_r1: hehe.. cool.. still confused.. :/ wait a minute.. let me have a cup of tea
[08:37:22] ebonics: probably i would not use any loops
[08:37:45] ebonics: i would have only 2 cases where i need to ask for a new job from beanstalk
[08:38:04] ebonics: a) on a new http request and b) after i finished a job
[08:39:01] ebonics: in the case that there is currently no jobs, you could just send the job info directly to your worker
[08:39:13] arup_r1: I am confused Redis knows jobids.. how redis will ask to give job id from beanstalk
[08:39:32] ebonics: do you know what a map is
[08:39:42] arup_r1: ebonics: can you give some sample code.. If I see code.. I will understand the communications..
[08:40:06] decoponio: has joined #ruby
[08:40:07] arup_r1: yes, Array#map
[08:41:31] DLSteve: has joined #ruby
[08:43:01] ebonics: arup_r_, https://dpaste.de/jE69
[08:43:24] kp666: has joined #ruby
[08:43:38] jmhmccr: has joined #ruby
[08:43:42] arup_r1: ebonics: thanks ..let me see.. Internet is too slow here
[08:44:17] arup_r1: ebonics: thanks.. got the idea
[08:44:46] ebonics: arup_r_, np gl
[08:45:51] arup_r1: Now,, need to check if ActiveJob allows mutile backgrouns backend settings.. I already used suckerpunch ...
[08:46:00] arup_r1: multiple**
[08:46:36] ebonics: arup_r_, this looks exactly like what you need
[08:47:00] arup_r1: Need to integrate with ActiveJob is Rails..
[08:47:10] arup_r1: looking for the port.. reading the guide
[08:47:19] ebonics: i dont use rails sry
[08:47:39] arup_r1: thanks for the ideas although
[08:47:52] ebonics: i use that pattern i gave you for every service basically
[08:48:24] ebonics: except ive never had a case where it needs to be processed in order, except for with games
[08:48:32] ebonics: usually i just get lazy and user iron.io for my queue
[08:49:17] c0m0: has joined #ruby
[08:53:15] arup_r1: ebonics: thanks.. again.. heading for lunch..
[08:57:46] juanpaucar: has joined #ruby
[08:57:50] Dakuan: has joined #ruby
[08:58:38] lxsameer: has joined #ruby
[08:58:47] despai: has joined #ruby
[08:59:26] lidenskap: has joined #ruby
[09:00:15] lkba: has joined #ruby
[09:00:21] tubuliferous: has joined #ruby
[09:02:59] Spami: has joined #ruby
[09:04:27] mtakkman: has joined #ruby
[09:06:22] quimrstorres: has joined #ruby
[09:07:14] ki0: has joined #ruby
[09:09:15] cibs: has joined #ruby
[09:18:14] Spami: has joined #ruby
[09:21:23] platzhirsch: has joined #ruby
[09:21:56] daxroc: Anyone know a library for creating ISO images win/linux ?
[09:22:16] hectortrope: has joined #ruby
[09:23:19] gauke: has joined #ruby
[09:25:30] khebbie: has joined #ruby
[09:25:51] hectortrope: has joined #ruby
[09:29:07] Alina-malina: has joined #ruby
[09:30:44] shuber_: has joined #ruby
[09:31:17] rippa: has joined #ruby
[09:34:06] zly: has joined #ruby
[09:38:51] lidenskap: has joined #ruby
[09:39:21] Sarchasm: has joined #ruby
[09:41:33] exadeci: has joined #ruby
[09:42:57] lidenskap: has joined #ruby
[09:43:38] iamninja: has joined #ruby
[09:46:19] lidenskap: has joined #ruby
[09:48:45] doublemalt_: has joined #ruby
[09:49:44] marr: has joined #ruby
[09:52:10] bruno-: has joined #ruby
[09:52:41] lidenskap: has joined #ruby
[09:53:13] lordkryss: has joined #ruby
[09:53:55] einarj: has joined #ruby
[09:55:21] charliesome: has joined #ruby
[09:58:12] Sarchasm: has joined #ruby
[09:58:56] charliesome: has joined #ruby
[09:59:31] serivich: has joined #ruby
[09:59:55] alphaatom: has joined #ruby
[10:09:08] fabrice31: has joined #ruby
[10:10:20] iwishiwerearobot: has joined #ruby
[10:10:46] centrx: has joined #ruby
[10:13:16] sandelius: has joined #ruby
[10:14:00] nichtdiebohne: has joined #ruby
[10:15:12] Outlastsheep: has joined #ruby
[10:16:33] Outlastsheep: Hi, I have a quick question. I have an array containing multiple objects. And I need to invoke those objects' methods. What would be the syntax for invoking method 'mth' on object 'obj' inside of array 'arr' (With the index of '1' if one wants to be picky)
[10:17:10] MrBeardy: arr[1].call("mth")?
[10:17:15] adaedra: you want to invoke for each object or only one object at given index?
[10:17:39] Outlastsheep: Only one object of a given index.
[10:17:47] adaedra: arr[1].mth
[10:17:56] Outlastsheep: Gotcha, thanks.
[10:18:14] adaedra: Array#[] just return the object on which you can do what you want
[10:18:46] startupality: has joined #ruby
[10:18:53] SouL_|_: has joined #ruby
[10:18:57] Outlastsheep: Got it, thanks ^^
[10:20:27] rickmasta: has joined #ruby
[10:20:33] workmad3: has joined #ruby
[10:24:18] arup_r: has joined #ruby
[10:25:08] tenseiten: has joined #ruby
[10:28:09] djellemah: has joined #ruby
[10:29:59] Leef_: has joined #ruby
[10:30:14] bronson: has joined #ruby
[10:31:45] mengu: has joined #ruby
[10:31:45] mengu: has joined #ruby
[10:31:53] shuber_: has joined #ruby
[10:33:00] CloCkWeRX: has left #ruby: ()
[10:38:52] sevenseacat: has joined #ruby
[10:39:54] eightyeights: has joined #ruby
[10:41:32] Aswebb_: has joined #ruby
[10:46:29] juanpaucar: has joined #ruby
[10:46:59] lkba_: has joined #ruby
[10:49:09] tubuliferous: has joined #ruby
[10:49:25] spider-mario: has joined #ruby
[10:49:54] rodfersou: has joined #ruby
[10:50:18] Takle_: has joined #ruby
[10:51:37] phale: has joined #ruby
[10:51:40] rodferso1: has joined #ruby
[10:52:01] rodfersou: has joined #ruby
[10:53:14] sdothum: has joined #ruby
[10:55:18] Pathfinder: has joined #ruby
[10:55:48] lxsameer: has joined #ruby
[10:56:30] phale: has left #ruby: ("Leaving")
[10:56:31] nszceta: has joined #ruby
[10:58:23] dorei: has joined #ruby
[11:07:26] j416: has joined #ruby
[11:09:07] charliesome: has joined #ruby
[11:09:31] dain: has joined #ruby
[11:11:45] antgel: has joined #ruby
[11:12:16] DevastatingDave: has joined #ruby
[11:13:07] sdothum: has joined #ruby
[11:13:31] bruno-: has joined #ruby
[11:14:07] platzhirsch: has joined #ruby
[11:15:48] chthon: has joined #ruby
[11:16:27] edwinvdgraaf: has joined #ruby
[11:16:31] dumdedum: has joined #ruby
[11:19:11] gattuso: has joined #ruby
[11:20:08] gattuso: it's possible to download the rubygems.org index of all ruby gems?
[11:20:27] bkxd: has joined #ruby
[11:20:33] gattuso: i'm trying with the apis but they give me only scoped searches
[11:20:55] OrbitalKitten: has joined #ruby
[11:22:26] _blizzy_: has joined #ruby
[11:23:09] jhass: gattuso: http://rubygems.org/latest_specs.4.8.gz
[11:23:32] alphaatom: has joined #ruby
[11:23:46] mengu: has joined #ruby
[11:23:53] jhass: gunzip, Gem.read_binary "latest_specs.4.8"
[11:24:44] alphaatom: has joined #ruby
[11:27:06] n008f4g_: has joined #ruby
[11:28:51] eightyeights: has joined #ruby
[11:29:00] yh__: has joined #ruby
[11:30:23] JamesBrink: has joined #ruby
[11:31:08] bronson: has joined #ruby
[11:31:12] Deele: has joined #ruby
[11:31:55] JamesBrink: has joined #ruby
[11:33:00] gattuso: jhass: thank you
[11:33:20] jpfuentes2: has joined #ruby
[11:33:25] shuber_: has joined #ruby
[11:39:27] startupality: has joined #ruby
[11:44:40] davedev24_: has joined #ruby
[11:46:12] bkxd: has joined #ruby
[11:47:00] Ropeney: has joined #ruby
[11:49:23] JohnBat26: has joined #ruby
[11:52:09] ldnunes: has joined #ruby
[11:55:00] jtoy: has joined #ruby
[11:55:24] edwinvdgraaf: has joined #ruby
[11:56:22] xehbit: has joined #ruby
[11:58:06] fabrice31: has joined #ruby
[11:58:08] roshanavand: has joined #ruby
[11:58:16] Guest35510: could anybody give me a what the operator '<<-' does? I am using in thor for long descriptions "long_desc <<-LONGDESC blablabl LONGDESC". '<<' looks like it is coming from something called singleton classes, but I don't know what the rest does.
[11:58:38] Guest35510: just one or two words to search for would be helpful
[11:58:55] jhass: Guest35510: in this instance it's called heredoc
[11:59:07] jhass: and it's a variant of the string literals
[11:59:07] iwishiwerearobot: has joined #ruby
[11:59:15] jhass: so not an operator
[11:59:41] stoffus: has joined #ruby
[11:59:46] jhass: http://ruby-doc.org/core-2.2.2/doc/syntax/literals_rdoc.html#label-Here+Documents
[11:59:55] Guest35510: so all inbetween LONGDESC goes into the long_desc class
[12:00:11] dorei: has joined #ruby
[12:00:15] Guest35510: nice.. thanks. That will help me to get on.
[12:00:19] bruno-: has joined #ruby
[12:00:25] MrBeardy: it gets converted into a string
[12:00:33] nszceta: has joined #ruby
[12:00:36] jhass: yes, LONGDESC is just a marker
[12:01:02] jhass: well, and technically it's not converted, it already is a string
[12:01:07] Guest35510: great. thanks. That was a bit hard to find myself ;)
[12:01:15] chinmay_dd: has joined #ruby
[12:01:48] juanpaucar: has joined #ruby
[12:01:53] MrBeardy: yeah I guess that's true, ruby would just interpret it all as a string
[12:03:29] arup_r: What is syntac sugar to create Ruby string.. I know %q and %Q.. another is ______ ?
[12:03:43] arup_r: I am not able to remember and google as well
[12:04:11] roshanavand: has joined #ruby
[12:04:38] MrBeardy: %[] and %{} too?
[12:04:40] jhass: %, %q, %Q, ", ', <<HERE are all I know
[12:04:43] roshanavand: has joined #ruby
[12:04:58] arup_r: yes oinly `%`..
[12:05:00] but3k4: has joined #ruby
[12:05:02] arup_r: thanks jhass
[12:05:07] jhass: well, percent literals take almost anything as delimiter
[12:05:14] jhass: listing them all would be tedious
[12:05:29] jhass: >> %abbbba
[12:05:30] ruboto: jhass # => /tmp/execpad-43e46452c52d/source-43e46452c52d:2: unknown type of %string ...check link for more (https://eval.in/369524)
[12:05:37] jhass: well, almost :P
[12:05:39] jhass: >> %qabbbba
[12:05:40] ruboto: jhass # => /tmp/execpad-3cc8efbe62ab/source-3cc8efbe62ab:2: unknown type of %string ...check link for more (https://eval.in/369526)
[12:05:51] jhass: mmh, really thought that works :P
[12:06:14] MrBeardy: maybe any non-alphanumeric character
[12:06:27] MrBeardy: only ever thought they worked with [] and {} though, thanks for the info
[12:06:57] rdark: has joined #ruby
[12:07:00] jhass: "You may use most other non-alphanumeric characters for percent string delimiters" yeah I guess
[12:07:44] jhass: >> %q foo # this one works at least
[12:07:45] ruboto: jhass # => "foo" (https://eval.in/369531)
[12:10:48] Scripore: has joined #ruby
[12:12:47] edwinvdgraaf: has joined #ruby
[12:13:18] forgot: has joined #ruby
[12:13:46] forgot: how to install a gem like foreman as standalone script?
[12:13:57] jhass: gem install foreman
[12:14:22] forgot: i want to contain its dependencies
[12:15:01] alphaatom: has joined #ruby
[12:15:39] phutchins: has joined #ruby
[12:15:40] jhass: echo "source 'https://rubygems.org'; gem 'foreman' > Gemfile; bundle install --standalone perhaps
[12:15:57] jhass: + wrapper to load it
[12:16:30] forgot: sounds like a correct direction. thanks
[12:17:16] forgot: ultimately im looking for a pipsi(https://github.com/mitsuhiko/pipsi) for ruby gems
[12:17:29] gagrio: has joined #ruby
[12:20:32] jhass: could just bundle install --path vendor/bundle; bundle binstubs foo and add that bin/ to the path
[12:20:46] mrmargolis: has joined #ruby
[12:26:02] Akagi201: has joined #ruby
[12:26:30] banister: has joined #ruby
[12:27:33] roshanavand: has left #ruby: ()
[12:27:51] Akagi201_: has joined #ruby
[12:29:09] forgot: jhass: bundle install --standalone --binstubs works perfectly. thx!
[12:30:07] Rollabunna: has joined #ruby
[12:30:15] bronson: has joined #ruby
[12:31:28] bmalum: has joined #ruby
[12:31:44] aryaching: has joined #ruby
[12:32:39] alphaatom: has joined #ruby
[12:33:54] alphaatom: has joined #ruby
[12:34:35] shuber_: has joined #ruby
[12:34:49] despai: has joined #ruby
[12:37:47] Zamyatin: has joined #ruby
[12:37:57] tubuliferous: has joined #ruby
[12:38:13] forgot: jhass: is it possible to make the stub works when linked to ~/.local/bin? modify PATH for every single gem seems not cool
[12:40:38] jhass: it doesn't?
[12:40:42] Scripore: has joined #ruby
[12:41:54] forgot: jhass: the stub uses path like '../bundle' which might be confused when executed from symbol link
[12:43:36] jhass: try, it puts that into a File.expand_path ;)
[12:44:01] forgot: /Users/user/.local/bin/foreman:12:in `load': cannot load such file -- /Users/user/.local/bundle/ruby/2.0.0/gems/foreman-0.78.0/bin/foreman (LoadError)
[12:45:01] forgot: ~/.local/bundle doesn't exist because the real file is at ~/.local/ruby-bundles/foreman/bundle
[12:45:31] jhass: I really expected __FILE__ resolved symlinks
[12:46:12] stef204: has joined #ruby
[12:47:41] zotherstupidguy: has joined #ruby
[12:48:09] forgot: found a duct tape here: http://marklunds.com/articles/one/384
[12:48:22] DEA7TH: has joined #ruby
[12:49:08] jhass: interestingly __dir__ does
[12:49:40] jhass: so if you're on Ruby 2+ (and you should), __dir__ should work
[12:50:33] ChoiKyuSang_: has joined #ruby
[12:50:33] Lingo: strange that they decided not to let __FILE__ have the same behaviour, would've been a good opportunity.
[12:50:53] fella5s: has joined #ruby
[12:50:57] Scripore: has joined #ruby
[12:51:12] jhass: I guess __FILE__ is very old and it slipped back then and never got changed for backwards compatibility
[12:51:50] forgot: im on ruby2.0.0, is there a problem?
[12:52:39] Lingo: I mean 2.0 would have been a good opportunity for a backwards incompatible fix :)
[12:52:54] forgot: imho __FILE__ shouldn't do magic
[12:53:40] forgot: the resolving should be done by bundler generated stub
[12:54:04] Lingo: then neither should __dir__, but that being introduced later, it seems like the magic is actually preferred
[12:54:39] jhass: so you can edit the stub to take out one .. in the expand calls and use __dir__ instead of __FILE__
[12:54:45] jhass: should be two simple sed's
[12:55:17] forgot: that should work
[12:56:21] forgot: im kinda surprised that there isn't an existing solution for isolated script installation
[12:57:30] jhass: there probably is
[12:57:40] jhass: one someones github somewhere ;P
[12:59:51] ChoiKyuSang: has joined #ruby
[13:01:33] roshanavand: has joined #ruby
[13:01:44] tris: has joined #ruby
[13:03:37] arup_r: has joined #ruby
[13:07:08] pengin: has joined #ruby
[13:07:44] bonhoeffer_: has joined #ruby
[13:08:38] workmad3: has joined #ruby
[13:09:57] segfalt: has joined #ruby
[13:10:19] sinkensabe: has joined #ruby
[13:11:00] jusa: has joined #ruby
[13:11:47] lavros: has joined #ruby
[13:12:17] vivekananda: has joined #ruby
[13:12:27] einarj: has joined #ruby
[13:12:37] Musashi007: has joined #ruby
[13:16:26] startupality: has joined #ruby
[13:18:28] quimrstorres: has joined #ruby
[13:18:45] Deck`: has joined #ruby
[13:18:46] pwattstbd: has joined #ruby
[13:19:41] edwinvdgraaf: has joined #ruby
[13:19:49] ZergCoder: has joined #ruby
[13:23:27] HotCoder: has joined #ruby
[13:28:26] quimrstorres: has joined #ruby
[13:31:09] simpyll: has joined #ruby
[13:31:23] bronson: has joined #ruby
[13:31:46] yqt: has joined #ruby
[13:32:36] vdamewood: has joined #ruby
[13:35:01] simpyll: has joined #ruby
[13:35:58] shuber_: has joined #ruby
[13:38:14] Musashi007: has joined #ruby
[13:42:00] krz: has joined #ruby
[13:44:31] dopie: has joined #ruby
[13:46:38] gagrio: has joined #ruby
[13:46:51] fabrice31: has joined #ruby
[13:47:57] iwishiwerearobot: has joined #ruby
[13:49:54] dumdedum: has joined #ruby
[13:50:42] CustosLimen: has joined #ruby
[13:51:19] Akagi201: has joined #ruby
[13:54:04] WajidKagzi: has joined #ruby
[13:55:09] quimrstorres: has joined #ruby
[13:56:05] Scripore: has joined #ruby
[13:56:38] bruno-_: has joined #ruby
[13:57:22] _blizzy_: has joined #ruby
[13:57:36] olafurgud: has joined #ruby
[13:58:43] Goldfish: has joined #ruby
[13:59:28] olafurgud: has left #ruby: ()
[13:59:45] startupality: has joined #ruby
[13:59:57] pandaant: has joined #ruby
[14:01:58] michael_mbp: has joined #ruby
[14:02:11] kobain: has joined #ruby
[14:09:12] failshell: has joined #ruby
[14:09:33] mrmargolis: has joined #ruby
[14:10:24] failshell: im reading logs from stdin. one event is split in 4 lines. what would be a good way to read those through $stdin.each and merge the 4 lines together?
[14:10:38] failshell: considering i can't change the upstream app sending logs
[14:12:39] ixti: has joined #ruby
[14:13:33] jhass: $stdin.each_slice(4) perhaps
[14:14:56] Drewch: has joined #ruby
[14:15:14] Neomex: has joined #ruby
[14:15:33] Lingo: failshell: if these 4-line events are mixed with 1-line events, you could use an Enumerator instance directly. Just take 3 lines at a time when you recognize the 4-line event from it's first line?
[14:15:33] failshell: jhass: looking into it
[14:16:14] jhass: or for the mixed case, if you want to go a bit obscure, use a flip-flop
[14:16:35] Lingo: finally, a use case! haha
[14:16:49] failshell: didnt know that each_slice method. neat.
[14:17:11] failshell: it's almost what i need. sometimes there's 5 lines.
[14:17:26] [k-: has joined #ruby
[14:17:27] failshell: s a special place in hell for the people who came up with those logs
[14:17:45] haxrbyte: has joined #ruby
[14:18:31] Lingo: maybe you could use #scan / #grep ?
[14:19:14] Lingo: i can never which belongs to which
[14:20:23] failshell: i thought about reading stdin and adding that into a buffer. then read the buffer and remove each computed lines from it
[14:20:48] failshell: which i think i won't have a choice. because every few events, a line with a timestamp is added. which messes each_slice(4)
[14:22:01] startupality: has joined #ruby
[14:23:09] quimrstorres: has joined #ruby
[14:23:43] Akuma: has joined #ruby
[14:24:26] fella5s: has joined #ruby
[14:26:24] Outlastsheep: Hello again. I'm kinda new to ruby (I've only recently started my very first project with the language) and I wanted to ask if someone would be willing to look over my code and provide feedback.
[14:26:39] ChoiKyuSang_: has joined #ruby
[14:26:45] tubuliferous: has joined #ruby
[14:27:00] jhass: failshell: slice_before or slice_after might be what you want then
[14:27:12] jhass: less obscure version of what a flip flop would do
[14:27:20] jhass: albeit slightly less efficient
[14:27:26] Outlastsheep: I have a pastebin with the code right here: http://pastebin.com/A77WecsY if anyone is willing to look over it and provide general feedback/tips, I'd appreciate it ^^
[14:27:27] ruboto: Outlastsheep, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/8bc7a2c5f43b40dbb727
[14:27:27] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[14:27:54] Outlastsheep: Huh, that is neat.
[14:29:20] jhass: Outlastsheep: let's start with the superficial style things: Ruby community standard is 2 spaces for indentation, avoid abbreviating identifiers, address, port, user, hostname and so on, write it all out
[14:29:52] jhass: for example I have no idea what isc would stand for, and you in half a year will neither
[14:30:38] startupality: has joined #ruby
[14:30:46] Outlastsheep: jhass: I've grown used to using TABS for indentation, I'll note it down. I'll also work on spelling out the full variable names.
[14:31:01] Outlastsheep: Anything else that catches your attention?
[14:31:22] zotherstupidguy: has joined #ruby
[14:31:42] jhass: you don't need self. in all your usecases, it's implicit. You don't need self. to disambiguate assignments, self.foo = bar and foo = bar would be different things
[14:31:44] failshell: those tabs make your code unreadable
[14:32:28] gusto: has joined #ruby
[14:32:28] Outlastsheep: Hmm okay, gotcha.
[14:32:50] jhass: don't put a space between the method name and the parens, def send(command, flags, message) or def send command, flags, message
[14:33:15] failshell: jhass: slice_after would be nice if i had a 'static' input. but with $stdin, i doubt that's gonna work well
[14:33:19] jhass: on a personal note I'm allergic to a , not followed by a space :P
[14:33:27] failshell: Outlastsheep: might wanna run rubocop against your code too. good linting tool.
[14:33:39] Outlastsheep: failshell: what's it do exactly?
[14:33:39] jhass: meh, I hate rubocops defaults
[14:33:54] failshell: jhass: true but once tuned, its decent
[14:34:02] Outlastsheep: jhass: but doesn't that boil down to the distinct style someone writes their programs in in the end?
[14:34:03] jhass: yeah, but that makes me not suggest it
[14:34:37] workmad3: has joined #ruby
[14:34:41] failshell: Outlastsheep: if you're not going to publish your code, or no one else will work in it, doesn't matter. otherwise, you better follow the ruby conventions
[14:34:56] jhass: Outlastsheep: if you read a lot of ruby code you'll notice that 95% will follow what I said so far
[14:35:08] Outlastsheep: failshell: I'm not going to publish it. I was more hoping to hear something about what jhass said about using 'self' too much.
[14:35:16] Outlastsheep: s/too much/incorrectly
[14:35:32] failshell: well see, now others are reading it ;p
[14:35:33] jhass: no, it's not incorrect, it's simply unnecessary
[14:35:51] Outlastsheep: Apologies if I was unclair by not stating I was looking for feedback on the workings of the program/the overall effectivity of the code.
[14:35:55] jhass: self.some_method and some_method are the same
[14:36:04] jhass: >> self.puts "foo"
[14:36:05] ruboto: jhass # => private method `puts' called for main:Object (NoMethodError) ...check link for more (https://eval.in/369634)
[14:36:10] jhass: well, almost ;P
[14:36:35] shuber_: has joined #ruby
[14:36:41] [k-: Omg the indentation
[14:36:49] jhass: Outlastsheep: use "string #{interpolation}" over "string "+concatenation
[14:37:17] ChoiKyuSang: has joined #ruby
[14:39:05] jhass: you could reuse the match for the PONG message
[14:39:16] rickmasta: has joined #ruby
[14:39:23] nszceta: has joined #ruby
[14:39:24] Outlastsheep: Ah, please tell me how. That was the biggest thing I had problems with.
[14:39:33] TheHodge: has joined #ruby
[14:39:39] jhass: match = @receive.match(/PING :(.+)/); if match; pong(match[1])
[14:40:13] Outlastsheep: Okay, got it.
[14:40:48] nszceta_: has joined #ruby
[14:41:28] jhass: the duplication in listen and connect will probably resolve itself once you have to restructure everything to support more features
[14:41:44] jhass: I'll also skip all the edge cases in the IRC protocol you don't handle
[14:42:06] [k-: or, pong str.sub("PING", "PONG) if str.startWith("PING :")
[14:42:26] jhass: startWith is python, no? :P
[14:42:36] [k-: Ruby has it I'm sure
[14:42:42] jhass: start_with?
[14:42:57] Outlastsheep: Even if Ruby doesn't have it, you can just match str for the first 6 characters being 'PING :'
[14:43:17] [k-: >> "ABC".startWith("A")
[14:43:18] ruboto: [k- # => undefined method `startWith' for "ABC":String (NoMethodError) ...check link for more (https://eval.in/369642)
[14:43:23] jhass: start_with?
[14:43:47] [k-: Lol, I forgot ruby uses snake case
[14:43:58] [k-: Forgotten all conventions \o/
[14:44:09] Outlastsheep: jhass: thank you so much for your feedback ^^
[14:44:13] MrBeardy: >> "".start_with? ""
[14:44:14] ruboto: MrBeardy # => true (https://eval.in/369643)
[14:44:16] phale: has joined #ruby
[14:47:20] jhass: Outlastsheep: btw I guess you know cinch
[14:47:36] pontiki: has joined #ruby
[14:47:48] phale: probably some ruby shill
[14:47:51] coderhs: has joined #ruby
[14:47:54] jhass: https://github.com/cinchrb/cinch
[14:48:20] phale: you guys are superior to me
[14:48:57] Outlastsheep: jhass: if I were to be honest, I prefer programming my bots from scratch myself :P
[14:48:57] dfockler: has joined #ruby
[14:49:06] Outlastsheep: But thanks for the tip.
[14:49:19] MrBeardy: read the code, gain inspiration to do it the right way
[14:49:25] phale: has left #ruby: ("Leaving")
[14:49:59] jhass: implementing IRC properly is hard, just saying
[14:50:19] jhass: parsing MODE is an art in itself
[14:50:19] simpyll: has joined #ruby
[14:51:20] Outlastsheep: Not really cx At least, in my previous experiences with IRC bots.
[14:51:34] Outlastsheep: But I don't code for a job or anything yet. At the moment it's really just for fun.
[14:52:04] adaedra: For science!
[14:52:06] simpyll: has joined #ruby
[14:52:07] MrBeardy: all fun and games until your bot lets people rm -rf /
[14:52:16] jhass: for starters things like you waiting for the first PING instead of RPL_WELCOME is abusing an implementation detail of a particular server implementation
[14:52:29] bmalum: has joined #ruby
[14:52:46] Outlastsheep: jhass: come again?
[14:53:18] jhass: the signal that you successfully connected is RPL_WELCOME (3something I don't memorized that)
[14:53:39] DEA7TH: has joined #ruby
[14:53:44] jhass: unrealircd does a ping already as part of the authentication dance for example
[14:53:47] gagrio: has joined #ruby
[14:54:10] Outlastsheep: I know about the signals (Although I have no idea where I receive those.)
[14:54:34] ta: has joined #ruby
[14:54:49] Outlastsheep: Also, I need to leave in about 6 mins.
[14:54:54] jhass: aha, with signal I meant "sign", "indicator"
[14:55:02] tesuji: has joined #ruby
[14:55:09] jhass: it's a regular command, there's nothing like signal in IRC terminology
[14:56:20] Outlastsheep: I'm aware of that. My problem is though. I've read RFC 2812, and it states responses like RPL_WELCOME, but I have no idea where to parse them, or where they even come form.
[14:56:50] jhass: it's numeric codes
[14:57:14] jhass: https://github.com/jhass/DeBot/blob/master/irc/src/irc/message.cr#L55
[14:58:18] Outlastsheep: I'll have a look at that, jhass.
[14:58:21] apeiros: jhass: CAP negotiation can happen before 001, though
[14:58:44] Outlastsheep: But I need to go now, looking at the time.
[14:58:47] jhass: I'd consider that part of the authentication dance
[14:59:00] gambl0re: has joined #ruby
[14:59:23] apeiros: sadly it isn't iirc. irc isn't lock-step. CAP & RPL_WELCOME can interleave.
[14:59:28] sinkensabe: has joined #ruby
[14:59:39] shevy: ALL POWER TO CAPS!
[15:00:28] websoftwarez: has joined #ruby
[15:00:42] jhass: how's butler going btw? :P
[15:00:57] apeiros: I've been doing everything but working :<
[15:01:14] apeiros: at least I read some asimov again (helping my wife with her work)
[15:01:30] websoftwarez: has joined #ruby
[15:01:36] yh__: has joined #ruby
[15:02:18] tyfighter: has joined #ruby
[15:02:41] apeiros: and I haven't even played any games this week-end. it's a shame.
[15:03:53] _seanc_: has joined #ruby
[15:04:22] jenrzzz: has joined #ruby
[15:04:48] dopie: has joined #ruby
[15:06:11] apeiros: shevy: isaac asimov. famous sci fi author
[15:08:21] sonOfRa: has joined #ruby
[15:10:10] shevy: ah that guy
[15:10:35] shevy: I think I read some of his books (or perhaps not) when I was young.... if there are some six legged animals that is...
[15:12:18] pdoherty: has joined #ruby
[15:12:35] rickmasta: has joined #ruby
[15:12:39] someword: has joined #ruby
[15:13:29] someword: has joined #ruby
[15:13:31] sinkensabe: has joined #ruby
[15:13:33] Takle: has joined #ruby
[15:13:41] tjbiddle: has joined #ruby
[15:14:03] someword: has joined #ruby
[15:14:06] nateberkopec: has joined #ruby
[15:15:02] shevy: (<G C A T> X~ <G C A T> X~ <G C A T>).grep({$_ eq .flip}).map({BioInfo::Seq::DNA.new(id=>$_,sequence=>$_).translate})>>.say
[15:15:07] shevy: is this perl... hmmmmm
[15:15:25] shevy: oh... perl 6 perhaps?
[15:15:43] mrchris: has joined #ruby
[15:15:59] sonOfRa: has joined #ruby
[15:17:13] coderhs: has joined #ruby
[15:17:41] Akuma: has joined #ruby
[15:19:33] JamesBrink: has joined #ruby
[15:19:51] gagrio: has joined #ruby
[15:20:06] bronson: has joined #ruby
[15:20:51] yh__: has joined #ruby
[15:22:01] glcx: has joined #ruby
[15:23:14] alex88: has joined #ruby
[15:23:28] michael_mbp: has joined #ruby
[15:24:34] zotherstupidguy: are ruby dsls candidate to a markovchains demo like the one here http://charlesleifer.com/blog/building-markov-chain-irc-bot-python-and-redis/
[15:25:26] DerisiveLogic: has joined #ruby
[15:25:57] zotherstupidguy: can we teach a bot to write in a ruby dsl synatx?
[15:28:08] zotherstupidguy: thats a funny one http://kingjamesprogramming.tumblr.com/
[15:28:16] jhass: maybe, I'd expect it to be harder though since natural language syntax is a lot more tolerable
[15:29:36] zotherstupidguy: jhass i take that you never saw it done before?
[15:29:54] jhass: yes, not that that means much
[15:31:20] casadei: has joined #ruby
[15:32:01] SouL_|_: has joined #ruby
[15:32:41] coderhs: has joined #ruby
[15:33:36] multiscan: has joined #ruby
[15:34:23] chinmay__: has joined #ruby
[15:35:39] fabrice31: has joined #ruby
[15:35:54] havenwood: has joined #ruby
[15:36:40] iwishiwerearobot: has joined #ruby
[15:36:48] shevy: people use haskell for that!
[15:36:55] jstanton: has joined #ruby
[15:37:35] shuber_: has joined #ruby
[15:39:40] that1guy: has joined #ruby
[15:40:32] zotherstupidguy: shevy for markovchains/
[15:40:50] speakingcode: has joined #ruby
[15:41:53] zotherstupidguy: i heard of a startup that takes your freinds chatting logs and after they die, they make a bot of that as if they are alive and chatting with you, i suppose they are using markovchains for that!
[15:43:23] zotherstupidguy: can markovchains be use to write a thesis?
[15:43:23] ixti: has joined #ruby
[15:44:36] jhass: it already was
[15:45:28] nfk|laptop: has joined #ruby
[15:46:23] aryaching_: has joined #ruby
[15:46:46] Channel6: has joined #ruby
[15:47:03] zotherstupidguy: a link for a thesis or uni assigment written via a markovchain bot or in collbration with it
[15:48:07] Maletor: has joined #ruby
[15:48:13] jhass: http://pdos.csail.mit.edu/scigen/ here's one as a service
[15:48:25] zotherstupidguy: jhass i love the internet
[15:49:23] coderhs: has joined #ruby
[15:52:21] Nathandim: has joined #ruby
[15:56:00] jbomo: has joined #ruby
[15:56:02] aspiers: has joined #ruby
[15:58:07] ta: has joined #ruby
[15:58:28] mrmargolis: has joined #ruby
[16:05:33] jenrzzz: has joined #ruby
[16:08:58] startupality: has joined #ruby
[16:09:28] someword: has joined #ruby
[16:11:52] sankaber: has joined #ruby
[16:15:33] tubuliferous: has joined #ruby
[16:16:44] Xiti: has joined #ruby
[16:17:43] konsolebox: has joined #ruby
[16:19:01] bronson: has joined #ruby
[16:23:40] sent1nel: has joined #ruby
[16:24:11] nettoweb: has joined #ruby
[16:24:42] bootstrappm: has joined #ruby
[16:27:07] ArchRogem: has joined #ruby
[16:27:48] thiagovsk: has joined #ruby
[16:29:21] Spami: has joined #ruby
[16:29:29] zotherstupidguy: bootstrappm you failed the turing test.
[16:29:46] Scripore: has joined #ruby
[16:29:53] bootstrappm: no idea what that's a reference to
[16:30:29] jhass: nothing, the turing test determines whether the other side appears to be human
[16:30:31] zotherstupidguy: bootstrappm http://en.wikipedia.org/wiki/Turing_test
[16:30:35] bootstrappm: aside from the turing test, obvs
[16:30:51] Rubie: has joined #ruby
[16:30:56] zotherstupidguy: bootstrappm hi :)
[16:32:39] xehbit: has joined #ruby
[16:32:50] BTRE: has joined #ruby
[16:32:55] ravenreborn: has joined #ruby
[16:33:39] xehbit: has joined #ruby
[16:36:40] n008f4g_: has joined #ruby
[16:39:04] shuber_: has joined #ruby
[16:39:58] segfalt: has joined #ruby
[16:41:18] bmurt: has joined #ruby
[16:42:37] Dakuan: has joined #ruby
[16:42:47] multiscan: has joined #ruby
[16:44:41] bmalum: has joined #ruby
[16:44:56] shevy: .kind_of?(String) is the same as .is_a?(String) right? I am looking at some ancient code here, 2001 era
[16:45:31] bootstrappm: I'd say check inheritance shevy
[16:45:57] bootstrappm: think kind_of? might check if it is an instance of that class or a descendant of that class
[16:46:42] varunwachaspati: has joined #ruby
[16:46:46] quimrstorres: has joined #ruby
[16:46:50] varunwachaspati_: has joined #ruby
[16:47:24] workmad3: has joined #ruby
[16:47:32] havenwood: shevy: https://github.com/ruby/ruby/blob/trunk/object.c#L3347-L3348
[16:47:52] havenwood: shevy: https://github.com/ruby/ruby/blob/trunk/object.c#L613-L648
[16:48:04] shevy: I guess that link to the source answered that in a brilliant way!
[16:48:38] shevy: I shall replace all .kind_of? lines I find with .is_a?
[16:48:38] bootstrappm: also, this http://stackoverflow.com/questions/3893278/ruby-kind-of-vs-instance-of-vs-is-a
[16:48:48] shevy: simply because .is_a? is shorter
[16:49:02] shevy: that .kind_of?(String) is part of the old ruby cgi module btw
[16:49:08] bootstrappm: kind_of? == is_a? != instance_of?
[16:49:12] shevy: taht code has many other oddities
[16:49:35] shevy: def escapeHTML
[16:49:44] shevy: @@accept_charset = 'UTF-8' unless defined?(@@accept_charset)
[16:50:58] shevy: case $1.encode(Encoding::US_ASCII)
[16:51:02] einarj: has joined #ruby
[16:52:03] antgel: has joined #ruby
[16:52:13] shevy: I really think it would be a good idea to modularize the whole ruby stdlib
[16:52:23] shevy: if only to more easily deprecate old stuff or include new stuff
[16:53:14] tuelz: has joined #ruby
[16:53:27] lidenskap: has joined #ruby
[16:54:26] shevy: https://bugs.ruby-lang.org/projects/ruby/wiki/Contributors
[16:54:30] shevy: funny what I am finding
[16:54:39] shevy: William Webber (wew) * committer
[16:54:49] shevy: that guy like single-handedly wrote the rdoc-docu for the ruby cgi part
[16:55:47] zotherstupidguy: ACTION hails wew
[16:55:58] aelovikov: has joined #ruby
[16:56:24] fedexo: has joined #ruby
[16:56:30] tuelz: ACTION follows the crowd
[16:56:50] pontiki: we are all humbled
[16:57:20] shevy: pontiki is funny
[16:57:35] pontiki: i'm being quite serious tho
[16:57:40] shevy: well some people on the committer list are no longer about :(
[16:57:57] tuelz: well it is memorial day and I don't care too much to remember the poor people that died killing other poor people
[16:57:57] shevy: why the lukky stiff (why), Jim Weirich (jim)
[16:58:05] shevy: (Notice that the page wrote "lukky stiff" hehe...)
[16:58:07] tuelz: so why not memorialize ruby peoplez
[16:58:23] shevy: tuelz yeah!
[16:58:28] multiscan: has joined #ruby
[16:58:31] shevy: ruby heroes
[16:58:45] shevy: I don't know most of these actually
[16:59:02] pontiki: i've never committed or contributed anything
[16:59:13] pontiki: i'm deeply in debt
[16:59:30] tuelz: I bitched on the rails issue list once - that's the closest I've been to contributing to anything ruby related
[17:00:07] zotherstupidguy: i love the ruby irc channel
[17:00:11] rodferso1: has joined #ruby
[17:00:44] tuelz: zotherstupidguy: I want whatever happy pills your on.
[17:00:56] zotherstupidguy: tuelz try aikido
[17:01:15] tuelz: zotherstupidguy: pills take less effort
[17:01:45] shevy: I am actually learning new things by reading that code
[17:01:49] shevy: body = Tempfile.new('CGI', encoding: Encoding::ASCII_8BIT)
[17:01:55] shevy: never seen encoding: passed to tempfile before
[17:01:58] tuelz: all joking aside, camping does it for me - pills are for concentration, backpacking unwinds me
[17:02:25] zotherstupidguy: tuelz where you live?
[17:02:30] ndrei: has joined #ruby
[17:02:32] zotherstupidguy: or rather where you camp?
[17:02:35] tuelz: north alabama USA
[17:02:52] zotherstupidguy: whats the alabama song?
[17:02:57] tuelz: I typically hike ~10 mile into william bankhead national forest
[17:03:11] tuelz: sweet home alabama? by lynard skynard
[17:03:35] tuelz: haha yeah it's weird how international that song is
[17:03:49] tuelz: I've heard it in every country I've visited in the americas on vacation
[17:04:05] tuelz: mexico/brazil/honduras err panama I think?
[17:04:18] tuelz: clubs love it for some reason
[17:04:36] bootstrappm: people still using Camping?
[17:04:42] tuelz: bootstrappm: zing!
[17:05:22] tuelz: nah, I like the dull pain of hiking rather than the adrenaline filled pain of climbing
[17:05:29] tuelz: adrenaline isn't my thing
[17:05:43] zotherstupidguy: tuelz i like how you roll
[17:06:05] Neomex: has joined #ruby
[17:06:17] jenrzzz: has joined #ruby
[17:07:09] tuelz: haha, most people like me because I'm easy going and anti-social - which means the few social interactions I have I just have to put on my mr. social pants for small periods of times and then ignore phone calls until they forget I exist
[17:07:12] lessless: has joined #ruby
[17:07:33] tuelz: they remember me as being a 'nice guy' and I get to skip showers more often
[17:07:38] zotherstupidguy: the world is infinitely better precisely because of people like you who are easy going and anti-social =)
[17:07:50] ndrei: has joined #ruby
[17:08:10] tuelz: haha, thanks for building up my ego. I'd say the world isn't worse because of me, but better because of people like you
[17:08:22] bootstrappm: you know what makes the world worse? car alarms that won't stop going off
[17:08:27] tuelz: I'm not too ambitious so I'm okay as long as I don't make things around me worse
[17:08:31] shevy: truly anti social people DO NOT USE IRC
[17:08:44] tuelz: bootstrappm: good news I got pissed at my truck and literaly ripped the horn out.
[17:08:47] shevy: ohhh tuelz
[17:08:50] shevy: you so remind me now of dudedudeman
[17:09:10] tuelz: I hope that's not a bad thing?
[17:09:12] OrbitalKitten: has joined #ruby
[17:09:12] shevy: his nick always is a dead give-away
[17:09:17] zotherstupidguy: shevy got a good memory, dudedudeman wasnt here for quit sometime!
[17:09:19] irobevjodu: has joined #ruby
[17:09:29] shevy: well you wrote "not too ambitious"; one could write "lazy"; or "energy efficient"
[17:09:32] bootstrappm: dudedueman was here like friday hahah
[17:09:38] shevy: like those sloths you know?
[17:09:42] bootstrappm: hahaha energy efficient
[17:09:42] tuelz: I see him on all the time
[17:10:07] shevy: zotherstupidguy yeah perhaps he is hibernating in reallife now and has no time for IRC
[17:10:26] pontiki: i only have time for irc when i am hibernating
[17:10:33] tuelz: I'm super lazy. Nothing material motivates me so it's REALLY hard to do work for money. I honestly can't work for people I'm not friends with because the only thing that keeps me going is trying to fulfill their ambitions
[17:10:44] tuelz: if I wasn't married I would 100% never work a full time job
[17:11:04] tuelz: but my wife deserves a comfortable life, so I take pills and get most of my work done
[17:11:19] tuelz: she's happy, so I'm happy
[17:11:28] void: has joined #ruby
[17:11:53] zotherstupidguy: its nice to be apprecaited
[17:12:10] arescorpio: has joined #ruby
[17:12:27] void: 907.times do puts "hello"
[17:12:31] tuelz: it really is. It's weird for me though, because I feel weird when I'm being appreciated, but I notice a huge mood drop when I'm not needed
[17:13:00] void: hi tuelz
[17:13:13] jhass: void: you say hello to yourself? how odd
[17:13:21] pontiki: usually, when someone tells me they appreciate me, they've just shat on something and i've had to clean it up
[17:13:24] neohunter: how i can ser a constant in a class? I want to change the USER_AGENT in XMLRPC::Client
[17:13:24] tuelz: jhass: you don't? How strange.
[17:13:28] neohunter: http://docs.ruby-lang.org/en/1.9.3/XMLRPC/Client.html
[17:13:40] void: void that :)
[17:13:42] shevy: pontiki I appreciate you as a cat
[17:13:45] aelovikov: hey, does anybody knows how to get current role from executing task in capistrano?
[17:13:49] neohunter: I'm not sure if this is the right way to go
[17:13:49] neohunter: XMLRPC::Client::USER_AGENT = 'Test Agent'
[17:13:54] pontiki: see what i mean?
[17:14:48] tuelz: neohunter: is your end goal to set the user agent?
[17:14:58] lidenskap: has joined #ruby
[17:15:39] jhass: neohunter: https://github.com/ruby/ruby/blob/trunk/lib/xmlrpc/client.rb#L454
[17:15:40] Akagi201: has joined #ruby
[17:16:32] jhass: neohunter: https://github.com/ruby/ruby/blob/trunk/lib/xmlrpc/client.rb#L197
[17:16:35] tuelz: omniref: you trying to be sneaky with a new name?
[17:16:52] jhass: I suggest you override the User-Agent header that way instead of changing the constant
[17:17:32] rkazak: has joined #ruby
[17:17:43] tuelz: indeed, neohunter, people reading your code won't expect you to have overridden a constant being set in the lib
[17:18:23] neohunter: jhass how i can change that constant?
[17:18:29] neohunter: XMLRPC::Client::http_header_extra doesnt work
[17:18:33] neohunter: or do I need to open the class?
[17:18:41] jhass: no, did you see my second link?
[17:18:43] tuelz: it's not a constant, it's an attr
[17:18:48] noobQ: has joined #ruby
[17:19:59] neohunter: tuelz soryr im really novice, so i need to instanciate the object and next change, right?
[17:20:43] tuelz: neohunter: no worries, I'm a novice too, I don't even know how to set the var without playing around with the object because I double guess myself so much
[17:21:33] tuelz: but it looks like it's specifically giving you that ivar to use as a config type option. Set that ivar and it will use it, else it will use the default constant
[17:22:06] neohunter: So it would be like x.http_header_extra["User-Agent"] = 'My User Agent'
[17:22:14] neohunter: x being a XMLRPC::client.new
[17:22:50] tuelz: neohunter: have you tried?
[17:22:57] bmurt: has joined #ruby
[17:23:04] bootstrappm: I wonder, do people leave IRC once they get to a certain level of mastery?
[17:23:13] tuelz: bootstrappm: in my experience, no
[17:23:15] jhass: well, it's initialized to nil, so extra = {"User-Agent" => "Your user agent"}
[17:23:36] neohunter: tuelz, yes... gives this error NoMethodError: You have a nil object when you didn't expect it!
[17:23:38] tuelz: bootstrappm: take jhass, here. He obviously gets off to answering hard questions because he's pretty damn skilled with ruby
[17:23:53] jhass: bootstrappm: we got #ruby-pro ;)
[17:24:04] tuelz: invite only?
[17:24:16] bootstrappm: ahhh nice jhass!
[17:24:17] neohunter: tuelz: seems like x.http_header_extra is nil :P
[17:24:28] jhass: tuelz: no, anybody can listen
[17:24:31] fabrice31: has joined #ruby
[17:24:35] tuelz: jhass: cool, I'm seeing that now
[17:24:49] tuelz: jhass: I'll have to idle around for a while and see if I learn some stuff
[17:24:49] jhass: it's kinda dead atm, don't expect much
[17:25:15] failshell: has joined #ruby
[17:25:24] vdamewood: has joined #ruby
[17:25:28] iwishiwerearobot: has joined #ruby
[17:25:32] mtakkman: has joined #ruby
[17:25:50] tuelz: neohunter: I would expect that to work, so I'll need to see code to further debug (code and stack trace)
[17:25:52] serivich: has joined #ruby
[17:26:19] neohunter: that class on initilaize method have this @http_header_extra = nil
[17:26:32] neohunter: may is expecting a string
[17:26:40] jhass: no, it's expecting a hash
[17:26:41] nfk|laptop: has joined #ruby
[17:26:47] jhass: you just have to set a hash
[17:26:47] jenrzzz: has joined #ruby
[17:27:02] jhass: x.http_headers_extra = {...}
[17:27:22] tomeara: has joined #ruby
[17:27:53] sinkensabe: has joined #ruby
[17:28:01] shuber_: has joined #ruby
[17:29:54] bigmac: has joined #ruby
[17:30:02] nubyruby: has joined #ruby
[17:30:43] banister: has joined #ruby
[17:31:09] neohunter: got it, yes thanks
[17:31:57] ramfjord: has joined #ruby
[17:33:14] tuelz: I wish minitest had as much dogma as rspec. Minitest is so nice to use, but not many people seem to write decent tests with it.
[17:33:30] ndrei: has joined #ruby
[17:33:50] tuelz: with rspec I feel like they've done a good job slapping peoples hands until they write tests the 'right' way
[17:34:44] arietis: has joined #ruby
[17:37:07] ebonics: has joined #ruby
[17:37:26] manzo: has joined #ruby
[17:38:12] CustosLimen: has joined #ruby
[17:38:17] tyfighter: has joined #ruby
[17:39:47] startupality: has joined #ruby
[17:42:09] ndrei: has joined #ruby
[17:46:13] bronson: has joined #ruby
[17:46:32] al2o3-cr: How can I set the default prefix for regexp globally for a cinch bot, instead of doing match /foo/, prefix: /^%/ for each plugin?
[17:47:19] mrmargolis: has joined #ruby
[17:47:28] ndrei: has joined #ruby
[17:49:23] sinkensabe: has joined #ruby
[17:50:10] al2o3-cr: nvm found it, it was under plugins.prefix in bot options been looking a that page for a while too
[17:50:15] tuelz: al2o3-cr: there is an option in cinch to set it to whatever you want
[17:51:38] itsgg: has joined #ruby
[17:52:42] gambl0re: has joined #ruby
[17:52:47] gusrub: has joined #ruby
[17:53:14] al2o3-cr: tuelz: yeah, I just found now mate thanks
[17:53:57] sent1nel: has joined #ruby
[17:55:11] tuelz: al2o3-cr: for sure, I made a twitch bot the other day for giggles and couldn't belive how easy cinch was to use. It actually got boring really fast because it was too easy even for a crappy 'grammer like myself
[17:55:32] tuelz: well it was easy for the basic stuff I did anyhow
[17:55:47] tuelz: the docu is lacking for adding modules and stuff iirc
[17:57:04] einarj: has joined #ruby
[17:57:11] bmurt: has joined #ruby
[17:57:21] al2o3-cr: tuelz: cinch is rather easy to set up when you read the docs thouroughly, I tend to scan the docs that one of my main problems :)
[17:58:00] tuelz: haha, yeah I read pretty well because I have yet to get something right with a scan. Not quite good enough with ruby to infer things yet
[18:00:09] al2o3-cr: I tried getting summer to work but I failed miserably :(
[18:00:15] ebbflowgo: has joined #ruby
[18:00:32] al2o3-cr: and also cinch supports sasl :)
[18:00:56] ljarvis: cinch has come quite far
[18:01:03] ljarvis: since I built the original
[18:01:42] banister: has joined #ruby
[18:01:50] al2o3-cr: Is it dominik the main maintainer now?
[18:02:15] Limix: has joined #ruby
[18:02:16] ljarvis: yeah, we merged cinch built by me, and another bot he built
[18:02:27] ndrei: has joined #ruby
[18:02:28] ljarvis: then he took over maintenance after a while
[18:02:34] bronson: has joined #ruby
[18:02:45] al2o3-cr: ljarvis: ah cool I really like it :)
[18:03:00] ta: has joined #ruby
[18:03:09] al2o3-cr: upto version 2.2.5 now
[18:03:11] ljarvis: glad to hear it, Dom has put a lot of time into it
[18:03:12] jhass: that one thread per handler call model though...
[18:03:27] ljarvis: yeah not a fan
[18:03:44] ljarvis: we had many idea conflicts :)
[18:04:21] tubuliferous: has joined #ruby
[18:04:51] havenwood: has joined #ruby
[18:05:42] gambl0re: has joined #ruby
[18:06:21] mary5030: has joined #ruby
[18:06:40] tuelz: why wouldn't you want new threads for handlers? Just added complexity?
[18:07:38] jhass: you want several threads for handlers, yes
[18:07:49] jhass: you don't want to spawn a new one for each call to a handler
[18:08:07] apeiros: tuelz: for me, it causes the bot to die at times due to too many open filehandles
[18:08:46] ljarvis: using a thread pool would probably be good
[18:08:54] tuelz: ahh, I see
[18:08:55] apeiros: I'm updating butler
[18:08:59] apeiros: I'll use a thread per plugin
[18:09:07] ljarvis: wow butler
[18:09:17] apeiros: so each plugin can handle its own concurrency
[18:09:27] apeiros: yeah, ancient.
[18:09:28] ljarvis: didn't you start building silver server or something like that
[18:09:33] apeiros: it learned sasl from cinch ;-)
[18:09:37] kayloos: has joined #ruby
[18:09:40] apeiros: silverplatter. yes.
[18:09:44] ljarvis: that's the one
[18:09:46] apeiros: the new butler is based on that code.
[18:09:52] ljarvis: more like an irc toolchain right?
[18:09:59] apeiros: but as it always is, I of course couldn't just use the code. *sob*
[18:10:21] ljarvis: I used to enjoy writing irc bots
[18:10:27] ljarvis: (hence cinch + others)
[18:10:32] apeiros: I hate the protocol
[18:10:35] ljarvis: now I want to rip my face off at the thought
[18:10:37] apeiros: it's insanity looking innocent
[18:10:39] ljarvis: yep, it's awful
[18:10:45] pontiki: isn't that like a phase people go through?
[18:11:06] ljarvis: then they write a ton of command line parsers?
[18:11:25] pontiki: and irc bots
[18:11:26] apeiros: I wrote one for butler actually
[18:11:30] tuelz: not me - I never wanted to write them, but some streamers on twitch TV wanted some features an irc bot could handle so I tried to help them out
[18:11:34] ljarvis: I did only write one though, and it's kinda okay
[18:11:39] poguez_: has joined #ruby
[18:11:43] pontiki: and little languages
[18:11:51] ljarvis: apeiros: that's actually how slop started
[18:11:53] apeiros: I tend to use optparse now.
[18:12:21] pontiki: i use thor, never worry about the opt parsing :)
[18:12:32] apeiros: I don't remember why I don't use slop, though
[18:12:32] tuelz: I'm going through the 'little' language phase with elixir right now, and sorta with elm. I like functional languages sparse stdlibs
[18:12:41] ebonics: anyone use mruby
[18:12:56] ljarvis: apeiros: meh, optparse is decent enough
[18:13:02] ljarvis: tuelz: elixir is awesome
[18:13:21] al2o3-cr: trollop pretty nice imo
[18:13:29] tuelz: ljarvis: it's a lot of fun, that's for sure. A general purpose language on BEAM is really appealing
[18:13:41] ljarvis: al2o3-cr: I'm biased but I didn't like it (hence slop existing)
[18:14:03] Vile`: has joined #ruby
[18:14:58] al2o3-cr: bt like apeiros i tend to use optparse
[18:15:11] tuelz: I honestly have a hard time understanding why the JVM got so popular while BEAM just sat around being awesome
[18:15:23] tchebb: has joined #ruby
[18:15:29] ljarvis: I use optparse a lot too
[18:16:07] al2o3-cr: probably only use because it's in stdlib
[18:16:47] gf3_: has joined #ruby
[18:17:06] al2o3-cr: Ah question with optparse, use with hash, struct or ostruct?
[18:17:32] apeiros: hash, sometimes custom config class.
[18:17:50] ljarvis: hash most of the time for me, then pass that to a config class if I need to
[18:18:00] sinkensabe: has joined #ruby
[18:18:46] Yzguy: has joined #ruby
[18:18:56] ljarvis: i very rarely use ostruct
[18:19:01] prillian5: has joined #ruby
[18:19:35] prillian5: I'm a newbe to ruby. I try to install opensource-billing (a ruby-webapplication).
[18:19:46] sent1nel: has joined #ruby
[18:19:56] apeiros: for one-offs I could. but other than that - it's expensive
[18:20:34] al2o3-cr: ok thanks for the clarification
[18:20:38] prillian5: After hours I'm nearly done (i think). But if I done now rake db:create, I got this error:
[18:20:58] prillian5: Could not find json-1.8.2 in any of the sources
[18:21:12] prillian5: I even try this: gem2.2 install json
[18:21:18] ljarvis: prillian5: add json to your gemfile
[18:21:41] prillian5: This command say it is installed now, but if I try the db:create again, I got the same error
[18:21:55] jhass: prillian5: try bundle exec rake db:create
[18:22:13] sandelius: has joined #ruby
[18:22:22] prillian5: Could not find rake-10.4.2 in any of the sources
[18:22:40] jhass: bundle install
[18:23:06] prillian5: This is my Gemfile: http://privatepaste.com/86d8ff6bfc
[18:23:38] prillian5: bundle install give a bunch list of modules, and at the end:
[18:23:41] jhass: bundle install says could not find rake?
[18:23:46] Kricir: has joined #ruby
[18:23:50] prillian5: Your bundle is complete!
[18:23:51] prillian5: Use `bundle show [gemname]` to see where a bundled gem is installed.
[18:24:15] jhass: odd, can you show your Gemfile.lock?
[18:24:28] prillian5: http://privatepaste.com/f25618fa04
[18:24:33] prillian5: yes, one moment
[18:25:11] jhass: Using rake (10.4.2)
[18:25:17] prillian5: http://privatepaste.com/639f2511f1
[18:25:21] jhass: do you run both commands in the same environment?
[18:25:35] jhass: rake (10.4.2)
[18:25:45] prillian5: I run all in the basefolder of the webapp
[18:26:17] jhass: bundle show rake ?
[18:26:24] ndrei: has joined #ruby
[18:26:58] jhass: and working directory is not the only relevant thing, user, environment variables etc
[18:28:01] prillian5: give: /usr/lib/ruby/gems/2.2.0/gems/rake-10.4.2
[18:28:20] nszceta: has joined #ruby
[18:28:23] prillian5: bundle install |grep json
[18:28:34] prillian5: Using json (1.8.2)
[18:28:36] prillian5: Using multi_json (1.11.0)
[18:28:41] jhass: so how exactly did you run bundle exec rake db:create ?
[18:28:47] sepp2k: has joined #ruby
[18:28:53] Notte: has joined #ruby
[18:29:01] prillian5: on the document_root of the webapplication
[18:29:37] jhass: right after bundle install, on the same shell prompt?
[18:29:39] mrmargolis: has joined #ruby
[18:30:13] prillian5: think so. Do all the stuff in one shell
[18:30:22] OrbitalKitten: has joined #ruby
[18:30:24] arta82: has joined #ruby
[18:30:30] prillian5: should i start another shell?
[18:31:07] Palmer11: has joined #ruby
[18:31:44] jhass: probably not
[18:32:00] jhass: mh, that's very odd
[18:32:32] weemsledeux: has joined #ruby
[18:32:55] jhass: sorry for the mistrust, but could you just copy paste the last ~500-1000 log of your terminal history, invocations, output, everything?
[18:34:36] despai: has joined #ruby
[18:35:10] sinkensabe: has joined #ruby
[18:35:23] prillian5: http://privatepaste.com/e0df0578e3
[18:36:03] workmad3: has joined #ruby
[18:36:42] zotherstupidguy: has joined #ruby
[18:36:58] jhass: mmh, I really meant your terminal scrollback, including prompts etc, just as it is :)
[18:38:23] juanpaucar: has joined #ruby
[18:38:36] prillian5: I restart the machine, at most of the stuff is gone
[18:38:41] nettoweb: has joined #ruby
[18:38:54] prillian5: Only listing from bundle install is available there
[18:39:05] mary5030: has joined #ruby
[18:40:17] ArchRogem: has joined #ruby
[18:40:23] prillian5: I have installed ruby2.2 and ruby-switch
[18:40:26] jhass: try bundle exec rake db:create one more time, pastebin the full output including invocation (including prompt)
[18:40:36] prillian5: then I've done ruby-switch --set ruby2.2
[18:41:12] multiscan: has joined #ruby
[18:41:14] prillian5: http://privatepaste.com/66e76a073b
[18:41:26] shuber_: has joined #ruby
[18:41:38] prillian5: http://privatepaste.com/07032e5f47
[18:41:52] bjeanes: has joined #ruby
[18:41:58] jhass: that's really odd
[18:42:00] prillian5: same with sudo
[18:42:26] jhass: oh, so you randomly try with sudo? :/
[18:43:10] jhass: did you ever run bundle install without sudo?
[18:43:14] arietis: has joined #ruby
[18:43:33] rickmasta: has joined #ruby
[18:44:22] simpyll: has joined #ruby
[18:44:23] DerisiveLogic: has joined #ruby
[18:44:39] ruboto: General advise in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
[18:44:52] prillian5: but hear this: If i do ' sudo bundle exec rake2.2 db:create' I got one step closer
[18:45:03] jhass: yeah, since you installed with root permissions
[18:45:09] prillian5: so what have I to do? Do it as user ?
[18:45:13] d1n: has joined #ruby
[18:45:24] prillian5: cause i use the 2.2 after rake
[18:45:28] jhass: would be better, at most, don't mix
[18:45:34] jhass: you clearly mix here
[18:45:45] prillian5: I've done all wtih root
[18:45:58] prillian5: sudo -s before all
[18:46:09] prillian5: ok, what to do now
[18:46:10] jhass: so it doesn't change the user in your prompt?
[18:46:29] prillian5: It does. sudo -s become "root"
[18:46:38] jhass: entwickler@entwickler-VirtualBox:/var/www/open-source-billing$ bundle exec rake db:create
[18:46:58] jhass: just saying, anyway, what's ruby -v as your user?
[18:47:18] prillian5: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux-gnu]
[18:47:20] ght: My ruby app is executing an update statement with mysql, and other update mysql queries are working fine, but this one to a date field is not, and I need to review logs and see why this change isn't written.
[18:47:41] ght: Are there logs I can review to determine why this mysql statement isn't throwing an exception but isn't actually updating the database?
[18:47:58] ght: Using the mysql2 gem, of course.
[18:47:59] jhass: prillian5: okay, good, as your user do bundle install --path vendor/bundle, so just we avoid messing with the global stuff more, then bundle exec rake should work without the 2.2 suffix
[18:48:14] jhass: (as your user)
[18:48:27] pontiki: ght: is this in develop and/or test environments?
[18:48:32] prillian5: bundle exec rake2.2 db:create
[18:48:50] ght: This is a ruby app writing and rading from a single mysql database.
[18:48:57] ght: reading*
[18:48:58] prillian5: this give: http://privatepaste.com/2abe0aa661
[18:48:59] pontiki: ok, never mind
[18:49:14] jhass: prillian5: please try what I wrote
[18:49:33] prillian5: exec this: bundle install --path vendor/bundle ?
[18:49:35] jespada: has joined #ruby
[18:50:03] prillian5: http://privatepaste.com/05e4dd84a2
[18:50:19] prillian5: ah, one moment
[18:50:21] jhass: ght: if you're using mysql2 directly, you have to do logging yourself afaik
[18:50:33] prillian5: whole dir have root-permission, I've to change the user to my user
[18:51:05] ght: jhass: I'm using a logger, but the mysql query isn't generating any output or throwing an exception.
[18:51:05] jhass: prillian5: yes, sudo chown -R entwickler:entwickler /var/www/open-source-billing
[18:51:11] ght: Normally, when your SQL syntax is off, it'll throw an exception.
[18:51:45] ght: I'm looking for mysql logs themselves in /var/log and seeing nothing relevant. Perhaps I could turn up verbosity on mysql logging itself.
[18:51:50] prillian5: looks good...
[18:51:52] jhass: ght: maybe the query is just a noop or you're verifying your assumption incorrectly?
[18:51:53] yardenbar: has joined #ruby
[18:52:14] prillian5: ...still looks good... doing some stuff...
[18:52:40] ght: jhass: I've checked the statement and the database multiple times. If I'm missing something in that regard, I'm heading to the hospital because I'm clearly having a stroke.
[18:53:13] ght: I'll look into increasing mysql logging verbosity itself so I can track down the statement.
[18:53:19] jhass: what if you take the generated query and run it in the mysql shell?
[18:53:37] prillian5: jhass: installs now all the modules again.
[18:54:06] jhass: prillian5: yes, that's intentional
[18:54:24] jhass: we install to a local site dir now to not mess with or be messed up by the global stuff
[18:54:33] tuelz: has joined #ruby
[18:54:33] Musashi007: has joined #ruby
[18:55:26] ziprar: has joined #ruby
[18:55:26] ziprar: has joined #ruby
[18:55:38] _seanc_: has joined #ruby
[18:55:52] yardenbar: Hi, can anyone recommend a crontab gem? I'm looking for a way to determine which cron-job should have run since time X
[18:56:26] MasterPiece: has joined #ruby
[18:56:31] jhass: systemctl list-timers
[18:56:36] jhass: scnr, ignore me
[18:57:30] jhass: uh, did I scare them away?
[18:58:01] kaleido: has joined #ruby
[18:58:04] prillian5: this is the massage after the list of installed modules now: http://privatepaste.com/dea21dc032
[18:58:19] podman: has joined #ruby
[18:58:25] jhass: that's normal so far
[18:58:36] jhass: I hope bundle exec rake db:create runs now
[18:58:49] einarj: has joined #ruby
[18:59:50] ScriptGeek: has joined #ruby
[19:00:04] ScriptGeek: What is wrong with my code? https://gist.github.com/ScriptGeek/031bce3b36d0ff3e3dac
[19:01:19] jhass: ScriptGeek: tell us!
[19:01:38] jhass: ScriptGeek: what do you expect, what do you get
[19:01:44] jhass: prillian5: nope? :(
[19:01:46] prillian5: http://privatepaste.com/814a0ac40f
[19:01:51] pontiki: you could even show us your tests and test data that you used to check that code!
[19:02:32] jhass: prillian5: I noticed you did bundle update, any strong reason not to revert to upstreams Gemfile.lock?: git checkout Gemfile.lock; bundle;
[19:03:13] edwinvdgraaf: has joined #ruby
[19:03:19] prillian5: jhass: sorry, don't understand that sentence
[19:03:52] jhass: prillian5: okay, step by step, you remember running bundle update?
[19:03:54] doerteDev: has joined #ruby
[19:04:05] ScriptGeek: jhass: I'm doing a quiz the TeamTreehouse website and it's telling me the find_index method did not return the correct index
[19:04:32] vickleton: has joined #ruby
[19:04:37] platzhirsch: has joined #ruby
[19:04:40] jhass: ScriptGeek: you're still pretty vague :) I'm sure the error message you get is not that vague
[19:05:00] baweaver: has joined #ruby
[19:05:18] jhass: prillian5: just yes or no, I'm not saying you should do it (again)
[19:05:20] ScriptGeek: Actually, that's verbatim
[19:05:40] prillian5: jhass: yes, I remember
[19:06:00] jhass: ScriptGeek: I can believe that, but I doubt it's everything it outputs?
[19:06:10] jhass: prillian5: do you remember why?
[19:06:21] ScriptGeek: That's all I get
[19:06:41] jhass: huh, well, then we need at least all the context you have
[19:06:43] prillian5: cause I have many trouble with installing an module
[19:06:48] sinkensabe: has joined #ruby
[19:06:58] prillian5: I found this hint here: https://github.com/vteams/open-source-billing/issues/20
[19:07:08] ScriptGeek: Here is the task: Fill in the??find_index??method to return the index of a todo item in the??@todo_items??array given the??name.The method should return the index of the item if the item is found and??nil??if it is not found.
[19:07:32] prillian5: I can set the VM back to the start and do the steps again
[19:07:36] jhass: prillian5: that's an ill advise since it updates everything, not just the troublesome gem
[19:08:18] prillian5: here is what I did : but in german language: https://wiki.xstable.com/doku.php/websoftware:opensourcebilling
[19:08:40] spider-mario: has joined #ruby
[19:08:47] ScriptGeek: I see what I did wrong now =p
[19:08:48] prillian5: https://translate.google.de/translate?sl=de&tl=en&js=y&prev=_t&hl=de&ie=UTF-8&u=https%3A%2F%2Fwiki.xstable.com%2Fdoku.php%2Fwebsoftware%3Aopensourcebilling&edit-text=&act=url
[19:09:28] jhass: prillian5: try: git checkout Gemfile.lock; bundle update escape_utils;
[19:10:04] yqt: has joined #ruby
[19:10:35] prillian5: still in progress
[19:10:44] yqt: has joined #ruby
[19:11:00] turtil: has joined #ruby
[19:12:06] prillian5: jhass: http://privatepaste.com/8d6d329816
[19:12:19] prillian5: jep. that was the error
[19:12:47] ebonics: er can anyone tell what this is is supposed to be aliasing :|
[19:12:48] ebonics: https://github.com/iij/mruby-regexp-pcre/blob/master/mrblib/regexp_pcre.rb#L219
[19:13:00] edwinvdg_: has joined #ruby
[19:13:01] Spami: has joined #ruby
[19:13:02] _seanc_: has joined #ruby
[19:13:25] fabrice31: has joined #ruby
[19:13:34] jhass: ebonics: size to length or length to size, I can never remember :P
[19:13:46] ebonics: jhass, it's size to length, but there's no length method?
[19:14:13] jhass: maybe the interpreter special cases the class *shrug*
[19:14:19] iwishiwerearobot: has joined #ruby
[19:14:39] ebonics: ACTION confuse
[19:14:45] jhass: there's no begin or end either
[19:14:53] Aria: has joined #ruby
[19:14:54] Takle: has joined #ruby
[19:15:15] jhass: nor is @data set anywhere
[19:15:23] jhass: I bet on highly special cased class
[19:16:00] jhass: ebonics: https://github.com/iij/mruby-regexp-pcre/blob/master/src/mruby_regexp_pcre.c#L358 there
[19:16:20] ebonics: mm good catch jhass
[19:16:26] FernandoBasso: has joined #ruby
[19:16:29] lifenoodles: has joined #ruby
[19:16:42] asmodlol: has joined #ruby
[19:16:42] arietis: has joined #ruby
[19:17:50] smellor32: has joined #ruby
[19:18:14] jhass: prillian5: ah, it's bundle update github-linguist
[19:18:28] jhass: which escape_utils is a dependency of
[19:18:45] kaleido: to like json or to hate json, that is the question
[19:19:01] prillian5: jhass: means what to do now?
[19:19:10] FernandoBasso: I'm using filewather. I run a script like ruby C:\path\to\mywatcher.rb and it doesn't seem to watch the current dir. If I run it like ruby .\mywatcher.rb, then it works. Any one has any hints on this?
[19:19:10] cyberarm: has joined #ruby
[19:19:18] jhass: prillian5: nope, doesn't work either, means wait until I figure it out :P
[19:19:29] xxneolithicxx: kaleido: if thats the question go find out how you feel about XML then that should answer the question for you
[19:19:41] xehbit: has joined #ruby
[19:19:42] kaleido: hah, well played sir
[19:20:27] jhass: kaleido: additionally how you feel about yaml and toml
[19:20:43] CustosLimen: has joined #ruby
[19:21:57] codeFiend: has joined #ruby
[19:22:25] smelllor32: has left #ruby: ()
[19:22:39] xehbit: has joined #ruby
[19:23:03] xxneolithicxx: need to poke some brains now that more folks are around, it was dead last night
[19:23:22] xxneolithicxx: https://gist.github.com/anonymous/d77964bf7325fc5efccb
[19:23:39] xehbit: has joined #ruby
[19:23:43] xxneolithicxx: Im trying to monkey patch this to add some methods https://github.com/rubygems/rubygems/blob/master/lib/rubygems/specification.rb#L38
[19:23:44] Scripore: has joined #ruby
[19:24:13] xehbit: has joined #ruby
[19:24:16] xxneolithicxx: the gist above is wrong in that i should have made them class methods and called them correct below but even when i fix that the monkey patching doesnt work right
[19:24:43] swerter: has joined #ruby
[19:24:48] xxneolithicxx: and when i skip monkey patching and define the methods in the block itself they still arent callable from within the block
[19:24:51] jhass: prillian5: alright, bundle update copyright-header that one should be it
[19:25:33] xxneolithicxx: so im guessing im not understanding something about binding or scope here thats playing a role
[19:25:42] xehbit: has joined #ruby
[19:26:29] crdpink2: has joined #ruby
[19:27:02] lidenskap: has joined #ruby
[19:27:09] xehbit: has joined #ruby
[19:27:28] jhass: xxneolithicxx: it doesn't instance eval, I'd just define them as toplevel methods
[19:28:09] xehbit: has joined #ruby
[19:28:17] jhass: but in the current version it would be spec.find_executables
[19:28:18] xxneolithicxx: i had them as normal methods defined above the block but they werent in scope/usable from inside the block
[19:28:30] jhass: weird, they should've been
[19:28:37] xxneolithicxx: right i noticed that afterwards last night and didnt update the gist
[19:29:00] xxneolithicxx: let me put what i get when they are just normal toplevel
[19:29:09] xehbit: has joined #ruby
[19:29:24] ebbflowgo: has joined #ruby
[19:29:28] swgillespie: has joined #ruby
[19:29:34] multiscan: has joined #ruby
[19:30:26] jenrzzz: has joined #ruby
[19:31:09] xehbit: has joined #ruby
[19:31:16] multiscan: has joined #ruby
[19:31:41] prillian5: jhass: ok, looks good. Seems that I can now go on to configure the webapp.
[19:31:45] prillian5: Thanks a lot jhass
[19:32:09] xehbit: has joined #ruby
[19:32:29] ewn76: has joined #ruby
[19:33:09] xehbit: has joined #ruby
[19:34:29] ebbflowgo: has joined #ruby
[19:35:21] xxneolithicxx: https://gist.github.com/anonymous/70da634f8ab8308f6157
[19:35:37] xxneolithicxx: thats what i get with toplevels, its doesnt seem to see them at all
[19:36:13] Musashi007: has joined #ruby
[19:36:17] yardenbar: has joined #ruby
[19:36:24] xxneolithicxx: and if i move the definitions inside the block, i still get the same
[19:36:42] jhass: mmh, that might mess things up: https://github.com/rubygems/rubygems/blob/master/lib/rubygems/specification.rb#L1122
[19:37:20] jhass: try putting them into your own module, module GemHelper; module_function; def .... end; GemHelper.find....
[19:37:58] yardenbar: Hi all, got disconnected earlier, looking for a crontab parser gem. the idea is to determine which jobs should have ran since time X
[19:38:28] yardenbar: while cron daemon was down
[19:38:39] jhass: I wonder if whenever includes a parser
[19:39:03] yardenbar: looked that up, not includes
[19:39:05] einarj: has joined #ruby
[19:39:59] pontiki: i don't think so
[19:40:04] yardenbar: there's https://github.com/siebertm/parse-cron
[19:40:15] pontiki: it removed entries with guard lines, not reading what's in side them
[19:40:22] yardenbar: anyone used that?
[19:40:40] ndrei: has joined #ruby
[19:41:17] jhass: no, but looks good
[19:41:56] coderhs: has joined #ruby
[19:42:59] manzo: has joined #ruby
[19:45:03] tyfighter: has joined #ruby
[19:45:14] kaleido: has joined #ruby
[19:46:35] jenrzzz: has joined #ruby
[19:47:03] Leef_: has joined #ruby
[19:48:46] j0n3: has joined #ruby
[19:48:53] xxneolithicxx: you da man, that worked
[19:48:53] xxneolithicxx: with a slight tweak
[19:49:11] xxneolithicxx: because of the binding it considered scope to be under Gem::Specification by default
[19:49:28] einarj: has joined #ruby
[19:49:29] xxneolithicxx: so I had to make the module Gem::Specification::SpecificationHelper
[19:49:30] jhass: ah yeah, I wondered if it should be ::GemHelper
[19:49:42] mary5030: has joined #ruby
[19:49:57] xxneolithicxx: and in the block i use SpecificationHelper::method
[19:50:16] xxneolithicxx: but i dont understand why it didnt let me add them to the Gem::Specification class directly
[19:50:19] Mohan: has joined #ruby
[19:50:20] xxneolithicxx: its weird but it works
[19:52:41] c355E3B: has joined #ruby
[19:53:09] tubuliferous: has joined #ruby
[19:53:24] Obfuscate: has joined #ruby
[19:53:26] xxneolithicxx: no if i put it toplevel and call ::GemHelper it still doesnt see it
[19:53:49] xxneolithicxx: the binding seems to hide everything above Gem::Specification
[19:55:19] jenksy: has joined #ruby
[19:56:42] lidenskap: has joined #ruby
[19:57:00] lidenskap: has joined #ruby
[19:57:12] ndrei: has joined #ruby
[19:58:48] einarj: has joined #ruby
[20:00:15] trouloulioud_dev: has joined #ruby
[20:01:08] sent1nel: has joined #ruby
[20:01:46] edwinvdgraaf: has joined #ruby
[20:02:05] edwinvdgraaf: has joined #ruby
[20:02:47] pandaant: has joined #ruby
[20:03:05] prillian5: Does nginx have to configer in special way to run a ruby application?
[20:03:28] prillian5: I have now installed this application: https://github.com/vteams/open-source-billing
[20:03:37] ndrei: has joined #ruby
[20:03:41] bmalum: has joined #ruby
[20:03:41] prillian5: but dosn't see where the index.html is to find
[20:03:44] jhass: depends, there are two basic setups passenger and reverse proxy
[20:04:03] bronson: has joined #ruby
[20:04:04] jhass: there's no index.html
[20:04:05] _blizzy_: has joined #ruby
[20:04:05] haxrbyte_: has joined #ruby
[20:04:10] weemsledeux: has joined #ruby
[20:04:53] jhass: passenger is a module that runs a ruby application server inside nginx, it needs to be compiled into nginx and is not in the standard distribution
[20:05:10] jhass: a reverse proxy you can configure with the standard version of nginx
[20:05:12] c355E3B: They do offer a PPA though for some linux distributions
[20:05:39] jhass: in the reverse proxy setup you run a ruby application server separately
[20:05:55] prillian5: I have this installed. And it point in nginx.conf to the right passenger/locations.ini
[20:06:21] haxrbyte_: has joined #ruby
[20:07:24] lektrik: has joined #ruby
[20:07:34] prillian5: this is my loaded vhost: http://privatepaste.com/4ab775193e
[20:07:49] jhass: https://www.phusionpassenger.com/documentation/Users%20guide%20Nginx.html#_deploying_to_a_virtual_host_8217_s_root
[20:12:01] lex1: has joined #ruby
[20:13:31] Aswebb__: has joined #ruby
[20:14:35] shuber_: has joined #ruby
[20:14:48] kadoppe: has joined #ruby
[20:17:01] longfeet: has joined #ruby
[20:23:22] rht: has joined #ruby
[20:23:47] prillian5: ruby and nginx drive me crazy
[20:24:17] ndrei: has joined #ruby
[20:24:48] adaedra: It can do that
[20:25:01] asmodlol: has joined #ruby
[20:25:51] wildroman2: has joined #ruby
[20:26:23] Nahra: has joined #ruby
[20:27:04] juanpaucar: has joined #ruby
[20:27:26] turtil: has joined #ruby
[20:28:19] CustosLimen: has joined #ruby
[20:28:41] prillian5: jhass: [error] 13388#0: *1 directory index of "/var/www/open-source-billing/public/" is forbidden, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost"
[20:28:58] prillian5: this normaly tells me (out of my php-world) the index-file was not found
[20:29:03] sinkensabe: has joined #ruby
[20:29:12] jhass: no, that's access denied
[20:29:21] lex1: /nick a0lex
[20:29:22] prillian5: I have set the document-root to the public-folder of the ruby-app
[20:29:26] jhass: you have no such or file directory in mind
[20:29:34] prillian5: jhass: which permission i need?
[20:29:35] _seanc_: has joined #ruby
[20:29:39] prillian5: nginx runs as www-data
[20:29:43] Brozo: has joined #ruby
[20:29:58] jhass: maybe just chown the whole stuff to www-data then
[20:30:12] prillian5: still try this
[20:30:31] prillian5: but anyway, fileindex is not "permission denied" ?!
[20:30:45] lex1: has joined #ruby
[20:30:52] wildroman3: has joined #ruby
[20:31:18] lex1: has left #ruby: ()
[20:31:22] adaedra: er, prillian5 may be right, actually
[20:31:33] adaedra: nginx seems to want to show the directory index
[20:31:37] CorpusCallosum: has joined #ruby
[20:31:42] adaedra: looks like the reverse proxy's not working
[20:31:47] jhass: it's passenger
[20:31:58] adaedra: then passenger's not working
[20:32:12] jhass: maybe it refuses to work because it can't read a thing there ;)
[20:32:14] Drewch: has joined #ruby
[20:32:43] concave: has joined #ruby
[20:32:58] prillian5: cat /usr/bin/passenger_free_ruby gives me a binary-file
[20:33:07] prillian5: so seems to point to the right direction?!
[20:33:25] jhass: the chown didn't help?
[20:35:13] ndrei: has joined #ruby
[20:35:25] ZergCoder: has joined #ruby
[20:35:36] al2o3-cr: has joined #ruby
[20:35:46] prillian5: no, whole /var/www set to www-data:www-data
[20:35:47] lex1: has joined #ruby
[20:36:30] jhass: and nginx doesn't complain about the passenger_enabled directive or the like on restart?
[20:36:39] jhass: ACTION donates a few / to lex1
[20:37:33] prillian5: passenger-config --root is the path i have in nginx.conf
[20:37:35] yxhuvud: has joined #ruby
[20:38:33] Drewch: has joined #ruby
[20:40:42] lex1: has left #ruby: ("WeeChat 1.2")
[20:41:28] stef204: has joined #ruby
[20:43:27] xehbit: has joined #ruby
[20:45:32] prillian5: adaedra: jhass: still stuck on this.
[20:45:56] adaedra: no other error in nginx-error.log file?
[20:46:28] jhass: turn up debug logging for nginx
[20:47:40] _seanc_: has joined #ruby
[20:49:39] rodfersou: has joined #ruby
[20:50:01] concave: has joined #ruby
[20:50:17] prillian5: ok, got it. passenger_enabled on; have to set to server{ }
[20:50:28] prillian5: Before I had set it to http and got an error
[20:51:38] jhass: I think I linked an example showing that earlier ;)
[20:51:48] irobevjodu: has left #ruby: ()
[20:52:07] ebbflowgo: has joined #ruby
[20:52:15] codeFiend: has joined #ruby
[20:53:15] bogdanteleaga: has joined #ruby
[20:53:59] ki0: has joined #ruby
[20:55:15] _seanc_1: has joined #ruby
[20:56:29] StevenXL: has joined #ruby
[20:57:10] Scripore: has joined #ruby
[20:58:11] multi_io: has joined #ruby
[20:58:48] deric_skibotn: has joined #ruby
[20:59:16] ndrei: has joined #ruby
[21:00:53] KebabRemover: has joined #ruby
[21:02:06] creakybones: has joined #ruby
[21:03:02] iwishiwerearobot: has joined #ruby
[21:05:12] dain: has joined #ruby
[21:05:19] ndrei: has joined #ruby
[21:05:27] _blizzy_: has joined #ruby
[21:06:38] towski_: has joined #ruby
[21:07:13] al2o3-cr: has joined #ruby
[21:08:10] multiscan: has joined #ruby
[21:08:22] nszceta: has joined #ruby
[21:08:48] jstanton: has joined #ruby
[21:10:17] SouL_|_: has joined #ruby
[21:12:41] multiscan: has joined #ruby
[21:13:37] TheHodge: has joined #ruby
[21:13:46] platzhirsch: has joined #ruby
[21:16:05] shuber_: has joined #ruby
[21:16:24] wildroman2: has joined #ruby
[21:17:47] einarj_: has joined #ruby
[21:19:01] CaptainCibai: has joined #ruby
[21:19:23] CrazyM4n: has joined #ruby
[21:19:58] Aearnus: has joined #ruby
[21:20:26] idafyaid: has joined #ruby
[21:22:04] SouL_|_: has joined #ruby
[21:22:33] swgillespie: has joined #ruby
[21:25:16] FernandoBasso: has joined #ruby
[21:26:15] wildroman2: has joined #ruby
[21:28:14] Jarboe: has joined #ruby
[21:28:32] shuber_: has joined #ruby
[21:28:45] banister: has joined #ruby
[21:32:46] quimrstorres: has joined #ruby
[21:32:53] swgillespie: has joined #ruby
[21:33:57] Coldblackice: has joined #ruby
[21:36:39] lidenskap: has joined #ruby
[21:36:52] bkxd: has joined #ruby
[21:37:04] ki0: has joined #ruby
[21:37:06] polyrob_: has joined #ruby
[21:37:57] startupality: has joined #ruby
[21:39:51] einarj: has joined #ruby
[21:41:57] tubuliferous: has joined #ruby
[21:46:37] Dakuan: has joined #ruby
[21:47:31] yh__: has joined #ruby
[21:49:24] Timba-as: has joined #ruby
[21:49:30] Dakuan: has joined #ruby
[21:50:38] gustavn: has joined #ruby
[21:51:59] Hijiri: has joined #ruby
[21:53:54] nettoweb: has joined #ruby
[21:54:31] nszceta_: has joined #ruby
[22:00:42] northfurr: has joined #ruby
[22:04:29] alphaatom: has joined #ruby
[22:04:42] pwattstbd: has joined #ruby
[22:04:44] ZergCoder: has joined #ruby
[22:04:57] A205B064: has joined #ruby
[22:05:22] yh__: has joined #ruby
[22:05:53] segfalt: has joined #ruby
[22:06:09] alphaatom: has joined #ruby
[22:07:06] simpyll: has joined #ruby
[22:08:15] einarj: has joined #ruby
[22:08:23] ght: I have been working on this for two hours, read a million articles, this makes no sense.
[22:08:49] ght: What in the holy everliving fuck is wrong with this syntax, and how can I see what actual SQL statement is being generated by the mysql2 gem? mysqlcl.query("UPDATE `affiliates` SET `last_payment_error_reason` = 'Test' WHERE `affiliates`.`id` = 138")
[22:09:32] ght: I can successfuly establish the connection, update other values in that table, that column does exist, and all that happens is the fucking thing returns nil with no discernable way to determine why the hell that's happening.
[22:09:53] jhass: what do you get returned if you run that in the mysql console?
[22:09:54] Takle: has joined #ruby
[22:10:11] ght: Every time you research it you get 10 pages of posts for idiot users moaning that they can't get mysql to work in rails, I'm not using rails here, I'm using a ruby app to interact with a mysql database.
[22:10:21] jhass: what do you get returned if you run that in the mysql console?
[22:10:27] ght: Does anyone see anything wrong with that syntax, and otherwise..
[22:10:29] ght: nil, jhass.
[22:10:32] ght: I get nil.
[22:10:34] ght: I'm running it in irb.
[22:10:34] jhass: what do you get returned if you run that in the mysql console?
[22:10:37] ght: The result.
[22:10:38] jhass: yes, wrong
[22:10:41] jhass: what do you get returned if you run that in the mysql console?
[22:10:43] ght: In mysql itself, ok.
[22:14:01] bronson: has joined #ruby
[22:14:12] ght: mysql> UPDATE `affiliates` SET `last_payment_error_reason` = 'Test' WHERE `affiliates`.`id` = 138;
[22:14:15] ght: Query OK, 0 rows affected (0.00 sec)
[22:14:17] ght: Rows matched: 1 Changed: 0 Warnings: 0
[22:14:36] jhass: MySQL thinks the column already has that value
[22:14:58] ght: mysql> UPDATE `affiliates` SET `last_payment_error_reason` = 'Test2' WHERE `affiliates`.`id` = 138;
[22:14:58] jhass: SELECT last_payment_error_reason FROM affiliates WHERE id = 138
[22:15:01] ght: Query OK, 1 row affected (0.00 sec)
[22:15:03] ght: Rows matched: 1 Changed: 1 Warnings: 0
[22:15:44] MrBeardy: has joined #ruby
[22:15:58] juanpaucar: has joined #ruby
[22:17:26] jhass: so given the first one indicated that the column already had that value, how did you verify it doesn't work prior?
[22:18:45] startupality: has joined #ruby
[22:19:11] sinequanon: has joined #ruby
[22:19:37] wookiehangover: has joined #ruby
[22:20:28] apeiros: *crickets*
[22:21:04] jhass: also note that mysql2 returns nil in the success case of non select statements: https://github.com/brianmario/mysql2/blob/master/ext/mysql2/client.c#L497-L498
[22:21:14] Scripore: has joined #ruby
[22:22:38] wildroman2: has joined #ruby
[22:25:26] roqo: has joined #ruby
[22:27:06] apeiros: common case of "got what I want, thank you's are for wussies" and never to be heard of again. aren't such people lovely?
[22:27:43] jhass: apeiros: for extra fun scroll up to our earlier encounter
[22:27:54] Aeyrix: I can't scroll up :(
[22:28:05] apeiros: the "only asking 4 times needed"?
[22:28:36] jhass: no, hours further up
[22:28:47] apeiros: ACTION scrolls
[22:29:06] Aeyrix: Pls gist. :)
[22:29:14] Aeyrix: I can only see 50 lines when I connect.
[22:29:30] jhass: Aeyrix: /topic
[22:29:43] Radar: good morning
[22:29:44] Aeyrix: I also can't see the topic
[22:29:51] Aeyrix: Hey Radar
[22:29:53] Aeyrix: has left #ruby: ("AndroIRC - Android IRC Client ( http://www.androirc.com )")
[22:30:12] Aeyrix: has joined #ruby
[22:30:28] havenwood: Aeyrix: type: /topic
[22:30:30] Radar: ./topic without the dot will show you the topic
[22:30:45] pontiki: g'day Radar
[22:30:48] Aeyrix: Yeah but try doing that in a phone using SwiftKey
[22:32:35] apeiros: Radar: most clients, just // for / as first char
[22:32:38] einarj: has joined #ruby
[22:32:42] Radar: so it does
[22:32:50] al2o3-cr: Radar: or /say /topic
[22:37:27] ght: jhass: Thank you for your help, that helped me isolate the issue.
[22:37:37] ght: Basically, execute the query in the mysql CLI and look for warnings there.
[22:37:52] n008f4g_: has joined #ruby
[22:38:02] ght: Since the mysql2 gem won't relay warnings, unless there's some helper method I'm missing.
[22:38:34] mrmargolis: has joined #ruby
[22:38:46] jhass: docs list http://www.rubydoc.info/gems/mysql2/Mysql2/Client#warning_count-instance_method at least
[22:39:21] avahey: has joined #ruby
[22:39:45] arietis: has joined #ruby
[22:39:53] cirn0: has joined #ruby
[22:40:14] wookiehangover: has joined #ruby
[22:42:04] turtil: has joined #ruby
[22:42:16] _seanc_: has joined #ruby
[22:42:36] startupality: has joined #ruby
[22:42:52] jhass: query_info(_string) might have some meat
[22:43:06] bronson: has joined #ruby
[22:43:13] robbyoconnor: has joined #ruby
[22:44:58] turtil: has joined #ruby
[22:45:20] shuber_: has joined #ruby
[22:46:41] quimrstorres: has joined #ruby
[22:47:29] woodruffw: has joined #ruby
[22:49:01] quimrstorres: has joined #ruby
[22:50:00] Dakuan: has joined #ruby
[22:50:46] fabrice31: has joined #ruby
[22:51:51] iwishiwerearobot: has joined #ruby
[22:54:52] Rubie: has joined #ruby
[23:00:04] huddy: has joined #ruby
[23:01:15] Aswebb_: has joined #ruby
[23:02:23] Takle: has joined #ruby
[23:04:05] pwattstbd: has joined #ruby
[23:04:07] tuelz: has joined #ruby
[23:04:32] tuelz: anyone know where I can find a decent getting started guide for using sunspot without rails
[23:05:07] pontiki: i've only ever seen the README
[23:05:20] tuelz: not sure what needs to be config'd according to the docs the defaults should be pointing where my solr is running, but I'm getting http errors which makes me think it's looking in the wrong place or something
[23:05:28] cirn0: has joined #ruby
[23:07:32] tuelz: it's times like these when I can sympathize with the vocal 'Rails is not Ruby' community
[23:08:12] tuelz: every other blog is saying 'solr with ruby objects' yadda yadda and scroll down to see the first thing 'first include 'sunspot_rails' in yoru gemfile....
[23:09:33] pontiki: i've never had reason to try it outside of rails, sorry
[23:09:43] quimrstorres: has joined #ruby
[23:09:46] jtdowney: has joined #ruby
[23:10:44] simpyll: has joined #ruby
[23:10:46] tuelz: all good, I'll just bang my head against the wall until it works
[23:11:23] Ropeney: has joined #ruby
[23:11:39] _blizzy_: has joined #ruby
[23:11:56] startupality: has joined #ruby
[23:12:16] ebonics: the hell is "class <<self"
[23:12:25] chris349: has joined #ruby
[23:13:20] jhass: open the singleton class of self
[23:14:51] chris349: What is the best way to run the rails server from systemd? When I run it directly it works, but I need it to load automatically upon bootup. When I try to run it from systemd it fails saying: require: cannot load such file -- bundler/setup (LoadError)
[23:15:49] tuelz: chris349: are you running `rails server` or `bundle exec rails server`? also #rubyonrails is a very active channel
[23:16:36] zenspider: chris349: what ruby are you using? rvm? you'll need to set up root the same way
[23:16:40] zenspider: (or run ruby directly)
[23:16:54] zenspider: full paths are a good thing for crontabs and rc files
[23:17:45] startupality: has joined #ruby
[23:18:49] huddy: has joined #ruby
[23:20:53] chris349: I run the command directly and there is no issue: /usr/local/rvm/rubies/ruby-2.2.1/bin/ruby /opt/errbit/script/rails server
[23:20:59] jhass: "set up root the same way"? no, just make sure your User= is right
[23:21:23] jhass: ah, rvm, use the wrappers, rvm help wrapper
[23:21:29] chris349: But when I run it from the systemd script it does not run and gives this error: require: cannot load such file -- bundler/setup (LoadError)
[23:23:40] havenwood: has joined #ruby
[23:24:33] gambl0re: has joined #ruby
[23:24:53] wildroman2: has joined #ruby
[23:25:28] chris349: Is there any way to run rvm wrapper with the defaults?
[23:27:00] chris349: I really dont understand how rvm wrapper works
[23:27:16] jhass: do you understand how rvm use works?
[23:27:58] chris349: I try /usr/local/rvm/bin/rvm wrapper /opt/errbit/script/rails server but it fails with the error Unknown ruby interperter version, Could not load ruby /opt/errbit/script/rails
[23:28:15] jhass: did you read rvm help wrapper?
[23:28:19] chris349: I just use rvm to install ruby. I only have one version of ruby installed
[23:28:23] jhass: it doesn't sound like you did
[23:28:53] chris349: Yes I read the help but I dont understand the terms used, for e.g what is ree?
[23:29:11] nettoweb: has joined #ruby
[23:29:13] jhass: just an ancient outdated ruby version
[23:29:31] ebonics: am i the only one who builds their own ruby dists
[23:29:57] jhass: ebonics: mh, I maintain ruby-2.0 and ruby-2.1 in the AUR :P
[23:30:11] jhass: chris349: so what does rvm current say where it works?
[23:30:14] chris349: All I know is I run this command in the console and everything works as expected: /usr/local/rvm/rubies/riby-2.2.1/bin/ruby /opt/errbit/script/rails server and everything works perfect.
[23:30:27] chris349: How can I adapat this command to work in systemd so it loads at boot time?
[23:30:36] ebonics: i have a directory in my home directory with ruby versions i need
[23:30:38] jhass: by answering my question
[23:30:45] tubuliferous: has joined #ruby
[23:30:48] ebonics: then manually change the path to the one i need
[23:30:57] jhass: ebonics: uh, why not chruby?
[23:31:12] chris349: ebonics, I only need and have one version of ruby installed
[23:31:17] ebonics: idk, i used rvm once and it started installing shit
[23:31:36] ebonics: never looked into chruby
[23:32:20] ebonics: chruby looks cool
[23:32:26] jhass: I think you'll like it, basically just a thin wrapper around what you do
[23:33:03] jhass: chris349: so, what does rvm current say?
[23:33:21] chris349: jhass, ruby-2.2.1
[23:33:38] jhass: then do rvm wrapper 2.2.1 rails
[23:33:43] ebonics: chris349, why are you using rvm if you only use 1 version :o
[23:34:13] jhass: ebonics: trying to remove a system wide rvm installl is not worth it at this point
[23:34:24] cirn0: has joined #ruby
[23:34:24] ebonics: rvm is the type of thing that causes headaches at some point
[23:34:36] workmad3: has joined #ruby
[23:34:38] ebonics: when you cant figure out where your ruby is getting run from or where the paths are set
[23:35:42] zenspider: ebonics: agreed... but it's the easiest entrypoint on linux (unfortunately)
[23:35:56] zenspider: I'd rather they use ruby-build or something.... but whatevs... they have what they have
[23:37:34] chris349: Yes it seems to have to do with the paths, how can I set the path correctly from the systemd script?
[23:37:39] gregf: has joined #ruby
[23:38:01] jhass: did you do rvm wrapper 2.2.1 rails?
[23:38:13] zenspider: chris349: the easiest way is to not set it and to use full paths
[23:38:41] zenspider: second easiest is to set an explicit PATH=xxx in the systemd script
[23:38:49] chris349: zenspider, I am using the full path, but it seems that other things are called that depend on the enviroment path, which is not set through systemd
[23:38:55] zenspider: long term easiest is to set it up right via /etc/profile or equiv
[23:39:02] jhass: sigh, why do you ignore me?
[23:39:12] Radar: because this is IRC
[23:40:08] bronson: has joined #ruby
[23:42:22] jhass: chris349: do you ignore everything unless highlighted or what's up?
[23:42:26] bigkevmcd: has joined #ruby
[23:42:35] tmoor: has joined #ruby
[23:43:24] chris349: jhass, No I am not sure how to properly use rvm wrapper
[23:43:33] jhass: I told you. Twice
[23:44:14] CloCkWeRX: has joined #ruby
[23:44:59] jhass: so after you executed the command I gave you, twice, just do ExecStart=/usr/local/rvm/wrappers/ruby-2.2.1/rails server
[23:45:24] chris349: jhass, In that case, how will it know where to find the actual code to run?
[23:45:36] jhass: well, you set WorkingDirectory
[23:45:58] michael_mbp: has joined #ruby
[23:46:14] chris349: jhass, How/where is WorkingDirectory set?
[23:46:22] jhass: in your unit
[23:46:26] jhass: man systemd.service
[23:46:39] shuber_: has joined #ruby
[23:46:41] jhass: systemd has excellent docs
[23:47:18] jhass: oh, I guess WorkingDirectory is in man systemd.exec
[23:47:24] RegulationD: has joined #ruby
[23:48:02] zenspider: jhass: JEEZE... your advice SUCKS
[23:48:48] jhass: systemd.service says: Service files must include a "[Service]" section, which carries information about the service and the process it supervises. A number of options that may be used in this section are shared with other unit types. These options are documented in systemd.exec(5) and systemd.kill(5).
[23:48:51] jhass: just sayin'
[23:49:00] tyfighter: has joined #ruby
[23:49:11] charliesome: has joined #ruby
[23:50:08] lidenskap: has joined #ruby
[23:51:08] Yzguy: has joined #ruby
[23:51:36] Dakuan: has joined #ruby
[23:52:01] rodfersou: has joined #ruby
[23:52:28] chris349: jhass, Thank you, that actually works
[23:52:39] jhass: surprise!
[23:52:57] jtdowney: has joined #ruby
[23:53:23] jhass: chris349: make sure to set User= too, you don't want to run that as root. Might need to chown the app
[23:54:27] chris349: I set User=root
[23:54:34] jhass: yes, that's bad
[23:54:49] jhass: (and the default btw)