« Back to channel list

#ruby - 24 October 2015

« Back 1 day Forward 1 day »
[00:00:05] ibouvousaime: another stupid question from me
[00:00:10] chad59: I want to install ruby on a new system. What version of ruby should I install?
[00:00:11] jhass: /usr/bin/true
[00:00:18] Ox0dea: chad__: Trunk.
[00:00:23] jhass: chad__: 2.2.3, see topic
[00:01:02] chad59: jhass: That's the latest one... Is it stable?
[00:05:48] ibouvousaime: Done installing documentation for rails after 559 seconds
[00:05:48] ibouvousaime: 1 gem installed
[00:06:19] ibouvousaime: THANK YOUUUU GUYSSSS
[00:06:23] jhass: ?guys ibouvousaime
[00:06:23] ruboto: ibouvousaime, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[00:07:27] ibouvousaime: I want to hug yall xD
[00:10:12] diegoaguilar: has joined #ruby
[00:12:05] bonhoeffer: has joined #ruby
[00:13:59] ibouvousaime: anyone who uses/used Aptana RadRails here ? what do you think about it ?
[00:14:07] charliesome: has joined #ruby
[00:14:47] EminenceHC: has joined #ruby
[00:16:07] l_tonz: has joined #ruby
[00:19:00] jgt1: has joined #ruby
[00:19:41] vF3hNGxc47h8: has joined #ruby
[00:23:19] diegoaguilar: has joined #ruby
[00:25:51] choke: has joined #ruby
[00:27:16] charliesome: has joined #ruby
[00:28:25] al2o3-cr: has joined #ruby
[00:29:53] `tim`: has joined #ruby
[00:31:01] devbug_: has joined #ruby
[00:31:18] NeverDie: has joined #ruby
[00:31:29] workmad3: has joined #ruby
[00:37:24] wprice: has joined #ruby
[00:37:31] rcvalle: has joined #ruby
[00:37:40] dopamean_: has joined #ruby
[00:41:33] charliesome: has joined #ruby
[00:42:24] bubuntu: has joined #ruby
[00:42:35] l_tonz: has joined #ruby
[00:43:23] devbug: has joined #ruby
[00:45:43] JJM: has joined #ruby
[00:46:36] tkuchiki: has joined #ruby
[00:47:36] simi: has joined #ruby
[00:48:38] devbug_: has joined #ruby
[00:48:38] mary5030: has joined #ruby
[00:49:32] crdpink2: has joined #ruby
[00:51:41] jenrzzz: has joined #ruby
[00:52:20] patdohere: has joined #ruby
[00:52:30] sepp2k: has joined #ruby
[00:53:46] RegulationD: has joined #ruby
[00:54:22] bmurt: has joined #ruby
[00:56:38] charliesome_: has joined #ruby
[00:56:47] bmurt: has joined #ruby
[00:56:50] EminenceHC: has joined #ruby
[00:57:26] pontiki: has joined #ruby
[00:58:29] devbug: has joined #ruby
[00:59:11] konrath: has joined #ruby
[00:59:42] baweaver: has joined #ruby
[01:01:40] Rollabunna: has joined #ruby
[01:04:28] Exuma: has joined #ruby
[01:04:45] webopsx: has joined #ruby
[01:05:51] Exuma: can someone help me the most efficient way to write this?
[01:05:56] Exuma: I need to turn this:
[01:06:14] Exuma: http://pastie.org/10503043
[01:06:15] Exuma: into this
[01:06:43] Exuma: {'hello-world'=> 839, 'nice-sunset' => 104}
[01:06:52] Exuma: its over 10,000 items... ive tried using inject methods
[01:06:56] Exuma: its insanely slow
[01:07:25] Exuma: i can get it to this [{"zoo-volunteer"=>110}, {"zoom-photos"=>149}]
[01:07:27] Exuma: very easily
[01:07:28] Yzguy: has joined #ruby
[01:07:35] Exuma: its getting it to be the key value which proves difficult for efficiency
[01:07:48] jpfuentes2: has joined #ruby
[01:07:56] bubbys: has joined #ruby
[01:09:09] stannard: has joined #ruby
[01:10:06] dopamean_: has joined #ruby
[01:10:59] devbug_: has joined #ruby
[01:11:54] cwong_on_irc: has joined #ruby
[01:12:34] mozzarella: how are you doing it?
[01:14:27] willardg: has joined #ruby
[01:15:04] ibouvousaime: I understood something else too I need to put rvm use --default 2.2 everytime Id like to start rails
[01:15:29] dopamean_: has joined #ruby
[01:15:48] BraddPitt: if you go line by line loading it into a hash object (don't recreate it though!) you can take new_hash[old_hash[event][slug]] => old_hash[event][count]
[01:15:52] BraddPitt: i think that would work
[01:18:48] j4cknewt_: has joined #ruby
[01:19:00] diegoaguilar: has joined #ruby
[01:19:21] swgillespie: has joined #ruby
[01:19:24] j4cknewt_: has joined #ruby
[01:21:06] Rollabunna: has joined #ruby
[01:21:17] hahuang65: has joined #ruby
[01:22:36] BraddPitt: ah sorry, i have quits/parts muted
[01:23:03] alcipir: has joined #ruby
[01:23:14] shevy: I have as well!
[01:24:27] mozzarella: people keep joining, ask a question and leave as soon as possible, it's annoying
[01:25:42] rbennacer: has joined #ruby
[01:26:47] amclain_: has joined #ruby
[01:27:12] weaksauce: people don't understand how irc works I imagine
[01:27:22] ruurd: has joined #ruby
[01:28:26] willharrison: has joined #ruby
[01:29:02] NeverDie: has joined #ruby
[01:29:54] sphex_: has joined #ruby
[01:30:16] tigarcia: has joined #ruby
[01:30:28] Ox0dea: has joined #ruby
[01:30:32] phatypus: has joined #ruby
[01:31:07] Ox0dea: BraddPitt: But not joins?
[01:31:09] bruce_lee2: has joined #ruby
[01:31:15] shevy: they have not yet discovered that IRC is meant to idle for power
[01:31:53] Ox0dea: IRC is for /r/unixporn screenshots.
[01:31:56] bkxd: has joined #ruby
[01:32:01] solocshaw: has joined #ruby
[01:32:41] skweek: has joined #ruby
[01:33:00] charliesome: has joined #ruby
[01:33:00] alcipir: has joined #ruby
[01:36:50] bryanray: has joined #ruby
[01:37:43] swgillespie: has joined #ruby
[01:40:24] packardwelles: has joined #ruby
[01:40:26] packardwelles: which of the following sorting algorithms has the best asymptotic runtime complexity?
[01:40:45] Coraline: The first one
[01:41:07] Rollabunna: has joined #ruby
[01:41:09] packardwelles: what kind of algorithm is that?
[01:41:25] Coraline: The good kind
[01:41:48] packardwelles: there is bubble sort heap sort selection sort and insertion sort
[01:42:02] Musashi007: has joined #ruby
[01:42:04] Ox0dea: packardwelles: Sleepsort is conspicuously absent.
[01:42:27] Coraline: And sorta sort
[01:42:33] packardwelles_: has joined #ruby
[01:43:13] packardwelles_: which of the following sorting algorithms has the best asymptotic runtime complexity? bubble, heap, selection, or insertion?
[01:43:30] weaksauce: I always bubble sort my heaps and then select sort when I want to select. insertion sort is fake
[01:44:15] Ox0dea: ?try packardwelles_
[01:44:15] ruboto: packardwelles_, Why don't you try it and see for yourself?
[01:44:28] packardwelles_: i have no idea what that means
[01:45:40] Ox0dea: Sounds like you've lost your shovel.
[01:45:47] tmtwd: has joined #ruby
[01:45:48] weaksauce: packardwelles_ I am sure most people here know the answer but it really sounds like you want us to do your homework
[01:46:30] nicol: has joined #ruby
[01:46:31] psye: has joined #ruby
[01:46:32] shevy: Coraline lol that communication :)
[01:47:02] rcvalle: has joined #ruby
[01:47:26] psye: has joined #ruby
[01:47:56] vanillapeach: has joined #ruby
[01:48:05] vanillapeach: what is asymptotic runtime complexity?
[01:49:13] shevy: it's too complex
[01:49:20] weaksauce: how your algorithm handles big inputs
[01:49:37] vanillapeach: how can i learn this stuff i haven't seen it on codecademy
[01:49:56] vanillapeach: someone told me to go to hackerrank after codecademy and their first question is that
[01:50:00] vanillapeach: ACTION woosh
[01:50:24] sdwrage: has joined #ruby
[01:50:39] willardg: has joined #ruby
[01:51:33] shevy: codecademy is too complex
[01:52:48] Ox0dea: Complexity is too simple.
[01:52:54] vanillapeach: i'm so confused
[01:53:01] rbennacer: has joined #ruby
[01:53:05] vanillapeach: are you guys being for real or just trolling?
[01:53:09] Ox0dea: ?guys vanillapeach
[01:53:09] ruboto: vanillapeach, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[01:53:36] vanillapeach: wow pc trolls in here :(
[01:53:41] ruboto: fflush, apeiros, banisterfiend, seanstickle, zzak, Radar, Mon_Ouie, Havenn, sevenseacat, miah, workmad3, Coraline, jhass, drbrain, zenspider, slyphon, rubyhacker1, ljarvis, baweaver, Adaedra, Aria
[01:54:08] sankaber: has joined #ruby
[01:54:09] shevy: aaaaah he wants to be gone
[01:54:21] vanillapeach: yes i want him to be gone
[01:54:39] vanillapeach: he's trolling and that is not good for the core of the ruby community
[01:55:07] havenwood: vanillapeach: Learning Ruby?
[01:55:21] vanillapeach: complete beginner
[01:55:36] vanillapeach: i completed codecademy for whatever that's worth
[01:56:26] havenwood: vanillapeach: Have any questions so far?
[01:56:42] vanillapeach: yes i would like to know where i can learn this asymptotic runtime complexity thing
[01:57:07] vanillapeach: it's the first question on hackerrank and i tried googling but the answers were far too advanced for my level
[01:57:38] Ox0dea: vanillapeach: Which is faster, looping through a collection twice, or just once?
[01:58:31] drbrain: vanillapeach: we the ops require inclusive language per our channel rules: http://ruby-community.com/pages/user_rules
[01:58:54] bruno-: has joined #ruby
[01:58:57] havenwood: vanillapeach: really
[01:58:58] vanillapeach: it's figure of speech
[01:59:12] BraddPitt: 21:31 < Ox0dea> BraddPitt: But not joins?
[01:59:13] havenwood: vanillapeach: I think Hacker Rank might not be the best next step for you.
[01:59:16] BraddPitt: joins, parts and quits are all hidden
[01:59:30] vanillapeach: what would you recommend after codecademy
[01:59:31] mary5030: has joined #ruby
[01:59:35] havenwood: vanillapeach: It's quite particular with its subject matter.
[01:59:39] BraddPitt: build something yourself vanillapeach!
[01:59:40] favadi: has joined #ruby
[01:59:45] havenwood: vanillapeach: I guess it depends on what you want to learn!
[01:59:52] Ox0dea: BraddPitt: WeeChat has a "smart filter" that only shows "relevant" joins, parts, and quits; it's pretty great.
[02:00:03] vanillapeach: i literally did every exercise there and have the ability to code basic sites with html css and javascript and know how to create login pages with rails
[02:00:08] BraddPitt: ah, I'm on [deprecated] irssi
[02:00:21] havenwood: vanillapeach: Have you done any testing yet?
[02:00:25] vanillapeach: their ruby track was interesting but i want to learn more i want to become a senior developer asap
[02:00:27] havenwood: vanillapeach: Tried Ruby Koans?
[02:00:31] vanillapeach: yes i have done testing
[02:00:49] vanillapeach: i don't see the point of testing but that's okay i will once i actually start coding
[02:01:09] drbrain: testing allows you to make changes safely and rapidly
[02:01:41] vanillapeach: where can i learn about algorithms?
[02:01:43] charliesome: has joined #ruby
[02:02:12] vanillapeach: particularly those
[02:02:55] vanillapeach: bubble, insertion, heap, and selection
[02:03:24] vanillapeach: and an explanation of what asymptotic runtime complexity in plain english would be
[02:05:00] Ox0dea: https://simple.wikipedia.org/wiki/Big_O_notation
[02:05:02] havenwood: vanillapeach: http://mathworld.wolfram.com/images/eps-gif/Asymptote_1000.gif
[02:05:45] Ox0dea: Hey, those look like they're gonna touch at some point!
[02:07:26] Ox0dea: havenwood: Does the GIF end?
[02:07:51] favadi: has joined #ruby
[02:08:12] RegulationD: has joined #ruby
[02:08:24] havenwood: Ox0dea: it's an animated gif just *very* slow
[02:08:27] l_tonz: has joined #ruby
[02:08:38] RobertBirnie: has joined #ruby
[02:10:05] arooni: has joined #ruby
[02:11:08] RobertBirnie: has joined #ruby
[02:12:07] Igorshp: has joined #ruby
[02:12:50] Azure: has joined #ruby
[02:12:50] dfinninger: has joined #ruby
[02:14:28] bb010g: has joined #ruby
[02:18:17] alcipir: has joined #ruby
[02:19:37] workmad3: has joined #ruby
[02:21:43] rickmasta: has joined #ruby
[02:26:41] tkuchiki: has joined #ruby
[02:27:33] `tim`: has joined #ruby
[02:27:41] skcin7: has joined #ruby
[02:31:29] CloCkWeRX: has joined #ruby
[02:37:05] jenrzzz: has joined #ruby
[02:38:05] tigarcia: has joined #ruby
[02:44:13] e1senhorn: has joined #ruby
[02:44:15] arescorpio: has joined #ruby
[02:44:39] wildlander: has joined #ruby
[02:44:51] favadi: has joined #ruby
[02:47:59] O47m341: has joined #ruby
[02:48:55] bollullera: has left #ruby: ()
[02:53:54] joneshf-laptop: has joined #ruby
[02:54:47] shevy: it's weekend again and people are sleepy
[02:55:32] badhatter: has joined #ruby
[02:56:18] Ropeney: has joined #ruby
[02:58:02] wlch: has joined #ruby
[02:59:17] eam: shevy: good evening
[02:59:53] ivanskie: has joined #ruby
[03:00:03] bruno-: has joined #ruby
[03:00:51] gener1c: has joined #ruby
[03:04:44] willardg: has joined #ruby
[03:07:13] Kharma: has joined #ruby
[03:09:43] houhoulis: has joined #ruby
[03:10:22] braincrash: has joined #ruby
[03:15:10] leat: has joined #ruby
[03:20:05] bmurt: has joined #ruby
[03:22:37] lavros: has joined #ruby
[03:22:42] wlch2: has joined #ruby
[03:22:47] ramfjord: has joined #ruby
[03:22:56] wlch2: has joined #ruby
[03:23:09] fantazo: has joined #ruby
[03:23:53] wsewolod: has joined #ruby
[03:24:26] leat: has joined #ruby
[03:27:50] wlch: has joined #ruby
[03:30:49] rehat: has joined #ruby
[03:31:23] wlch: has joined #ruby
[03:32:26] speaking1ode: has joined #ruby
[03:32:35] gix: has joined #ruby
[03:33:16] stardiviner: has joined #ruby
[03:33:39] govg: has joined #ruby
[03:36:32] jamto11: has joined #ruby
[03:39:19] RegulationD: has joined #ruby
[03:42:20] duderonomy: has joined #ruby
[03:45:25] sdwrage: has joined #ruby
[03:46:44] baweaver: has joined #ruby
[03:54:12] favadi: has joined #ruby
[03:54:16] darkf: has joined #ruby
[03:54:24] howdoicomputer: has joined #ruby
[03:55:03] ramfjord: has joined #ruby
[03:56:04] speaking1ode: has joined #ruby
[03:59:58] ghormoon: has joined #ruby
[04:01:44] bruno-: has joined #ruby
[04:07:46] workmad3: has joined #ruby
[04:10:41] govg: has joined #ruby
[04:10:59] cajone: has left #ruby: ()
[04:12:09] weaksauce: vanillapeach are you trolling or do you really not know asymptotic running time complexity?
[04:12:11] weaksauce: the woosh statement above I thought you were trolling
[04:13:05] arup_r: has joined #ruby
[04:19:50] c9s: has joined #ruby
[04:21:25] c9s: has joined #ruby
[04:22:21] umgrosscol: has joined #ruby
[04:23:29] nXqd: has joined #ruby
[04:24:11] c9s: has left #ruby: ()
[04:24:35] nXqd: I'm looking for a way to build a ruby bot on gitter ( it would be the same on irc ). It would be great that anyone has created it before gives me some hint or keyword ( security, deployment ) ...
[04:25:04] nanoz: has joined #ruby
[04:26:03] Feyn: has joined #ruby
[04:26:41] freerobby1: has joined #ruby
[04:27:27] nettoweb: has joined #ruby
[04:29:05] jher: has joined #ruby
[04:32:45] gix: has joined #ruby
[04:34:48] tubuliferous_: has joined #ruby
[04:35:59] robbyoconnor: has joined #ruby
[04:36:01] tkuchiki: has joined #ruby
[04:36:24] Rinzlit: has joined #ruby
[04:40:09] howdoicomputer: has joined #ruby
[04:43:56] shevy: I keep on rewriting old ruby code :(
[04:44:10] shevy: and it always takes longer than anticipated...
[04:44:42] Musashi007: has joined #ruby
[04:46:04] tkuchiki: has joined #ruby
[04:47:05] rippa: has joined #ruby
[04:48:45] totimkopf: shevy: how old is the ruby code?
[04:49:47] robbyoconnor: has joined #ruby
[04:50:31] tigarcia: has joined #ruby
[04:51:57] sudiptamondal: has joined #ruby
[04:52:02] mollusk_: has joined #ruby
[04:52:20] foooobear: has joined #ruby
[04:53:21] Puck7744: has joined #ruby
[04:53:37] darkf_: has joined #ruby
[04:55:29] robbyoconnor: has joined #ruby
[04:55:54] PaulCape_: has joined #ruby
[05:00:19] moeabdol: has joined #ruby
[05:01:36] pontiki: has joined #ruby
[05:01:54] bruno-: has joined #ruby
[05:01:57] devoldmx: has joined #ruby
[05:03:17] The_Phoenix: has joined #ruby
[05:03:55] wprice: has joined #ruby
[05:04:22] solocshaw: has joined #ruby
[05:06:00] trosborn: has joined #ruby
[05:09:03] Musashi007: has joined #ruby
[05:12:46] vadgeayna: has joined #ruby
[05:13:09] vadgeayna: why are loops inside conditionals bad practice?
[05:13:45] favadi: has joined #ruby
[05:15:38] tmtwd: has joined #ruby
[05:20:49] sudiptamondal: has joined #ruby
[05:22:06] freerobby: has joined #ruby
[05:22:55] havenwood: vadgeayna: Why do you claim so?
[05:23:06] vadgeayna: someone told me that
[05:25:19] havenwood: vadgeayna: have the code from the context it was said?
[05:25:55] Gnomethrower: has joined #ruby
[05:26:38] vF3hNGxc47h8: has joined #ruby
[05:26:42] Musashi007: Is anyone interested in playing with ruby with a partner? I???d be down to help out with whatever
[05:26:49] tkuchiki: has joined #ruby
[05:27:00] havenwood: Musashi007: Have anything in mind to make?
[05:27:23] Musashi007: Always but i???d be happy to help with something you???re working on
[05:27:59] Musashi007: I definitely do, though
[05:28:13] phatypus: has joined #ruby
[05:29:15] johnny56: has joined #ruby
[05:30:09] clx: has joined #ruby
[05:30:44] Pupp3tm4st3r: has joined #ruby
[05:32:39] lkba: has joined #ruby
[05:32:45] stannard: has joined #ruby
[05:32:48] lkba: has joined #ruby
[05:32:56] rehat: this might be an odd question but is there a way to run a ruby script A with an arg to another ruby script B that has a bunch of constants so that ruby script A can use??
[05:37:42] jher: rehat: Module constants
[05:39:30] govg: has joined #ruby
[05:40:11] RegulationD: has joined #ruby
[05:41:53] jiada: has joined #ruby
[05:44:08] jiada: has joined #ruby
[05:47:21] alcipir: has joined #ruby
[05:47:27] nemo_: has joined #ruby
[05:47:30] devoldmx: has joined #ruby
[05:48:53] zapata: has joined #ruby
[05:48:55] safeforge: has joined #ruby
[05:49:08] shevy: totimkopf ranging from 7 to perhaps 3 years, the 7 ones are slowly gone, the 3-years old code is like a mixture of ~3-~5 years
[05:49:34] shevy: I got a significantly better workflow over the course of the last 2 years but I still end up rewriting every now and then
[05:51:48] Pupp3tm4st3r: has joined #ruby
[05:55:54] workmad3: has joined #ruby
[05:56:43] nemo__: has joined #ruby
[05:59:26] skcin7: has joined #ruby
[06:00:39] PaulCapestany: has joined #ruby
[06:02:23] alcipir: has joined #ruby
[06:02:51] suffice: has joined #ruby
[06:05:52] duncannz: has joined #ruby
[06:13:00] Fredrich010: has joined #ruby
[06:13:09] GnuYawk: has joined #ruby
[06:13:09] GnuYawk: has joined #ruby
[06:13:42] jenrzzz: has joined #ruby
[06:15:03] leat: has joined #ruby
[06:16:05] skcin7: has joined #ruby
[06:16:19] nemo_: has joined #ruby
[06:19:15] mostlybadfly: has joined #ruby
[06:20:12] jamto11: has joined #ruby
[06:24:14] moeabdol: has joined #ruby
[06:24:31] skade: has joined #ruby
[06:24:47] demonlove: has joined #ruby
[06:25:25] Vile`: has joined #ruby
[06:26:55] vadgeayna: what is the best ruby compiler?
[06:27:32] moeabdol: has joined #ruby
[06:28:08] A124: has joined #ruby
[06:28:59] havenwood: vadgeayna: one that's just-in-time
[06:33:37] vadgeayna: why isn't tickle more popular?
[06:33:41] favadi: has joined #ruby
[06:34:47] havenwood: vadgeayna: huh?
[06:34:58] vadgeayna: tickle the programming language
[06:35:30] sudiptamondal: has joined #ruby
[06:36:32] havenwood: vadgeayna: Ruby is traditionally an interpreted rather than compiled language. There are multiple solid implementations of Ruby.
[06:37:00] vadgeayna: what happens if you compile ruby?
[06:37:10] skcin7: has joined #ruby
[06:37:21] havenwood: vadgeayna: I'm tempted to say: http://crystal-lang.org
[06:38:13] havenwood: vadgeayna: The Crystal compiler was written in Ruby before it was bootstrapped to Crystal.
[06:38:30] vadgeayna: so basically crystal is compiled ruby
[06:39:00] havenwood: vadgeayna: It's not Ruby.
[06:39:16] havenwood: vadgeayna: It's Ruby-inspired syntax.
[06:39:47] havenwood: vadgeayna: So it's very familiar for a Rubyist with a modern standard library.
[06:42:13] havenwood: vadgeayna: It's not 1.0 yet.
[06:43:00] vadgeayna: why not use existing programming languages then?
[06:43:17] vadgeayna: why not improve what we already have?
[06:44:19] agent_white: vadgeayna: In a carptenter's belt there are many tools.
[06:44:24] trosborn: has joined #ruby
[06:45:01] vadgeayna: yes but why have two hammers
[06:45:05] agent_white: Each tool does a certain job well. Very well. Though another tool maybe can do that job, it maybe doesn't as another.
[06:45:33] havenwood: vadgeayna: Carpenters do use multiple types of hammers.
[06:45:40] joonty: has joined #ruby
[06:45:42] agent_white: There are many kinds of hammers.
[06:46:05] vadgeayna: but programming all you're doing is creating text that gets translated into binary every time
[06:46:12] havenwood: Not even counting mallets and sledge hammers.
[06:46:14] vadgeayna: in theory all you need are a few languages
[06:46:33] agent_white: vadgeayna: If that was so. We all would be using a single language. Everywhere. For everything.
[06:46:58] agent_white: And people across the globe, would all speak the same languages, in every region.
[06:47:46] vadgeayna: well the fact is you don't need python you can just use ruby for the same exact things
[06:47:50] agent_white: Or eat the same food, for each meal... see what I'm getting at?
[06:48:00] vadgeayna: you don't need c# or other languages since you have c and c++
[06:48:25] havenwood: vadgeayna: no trolling
[06:48:33] vadgeayna: i'm not trolling
[06:48:37] agent_white: vadgeayna: It's a combination of the right hand for the right tool, and the right tool for the right job.
[06:49:01] vadgeayna: all you really need are one interpreted and object oriented language and the other a compiled programming language
[06:49:11] agent_white: If we all loved one language. And all agreed it did everything. Well. This channel wouldn't exist.
[06:49:15] havenwood: vadgeayna: nope
[06:49:20] vadgeayna: i don't see the point of confusing everyone by having so many programming languages
[06:49:29] vadgeayna: people want to be cool and say that they created a new language
[06:49:58] vadgeayna: people who can't learn ruby should give up programming because it's not for them
[06:50:12] relix: has joined #ruby
[06:50:19] havenwood: !kick vadgeayna no trolling
[06:50:19] ruboto: ruboto kicked vadgeayna: trolling
[06:50:19] ruboto: -o ruboto
[06:50:37] vadgeayna: has joined #ruby
[06:50:43] vadgeayna: what did i say that was trolling?
[06:50:56] havenwood: vadgeayna: "people who can't learn ruby should give up programming because it's not for them"
[06:50:56] vadgeayna: trolling means deliberately untrue messages designed to get a reaction from people
[06:50:59] havenwood: vadgeayna: stop it
[06:50:59] vadgeayna: i wasn't doing either
[06:51:11] vadgeayna: wow you're treating me like a 5 year old
[06:51:21] vadgeayna: i'm 13 thank you
[06:51:34] apeiros: I guess that explains the nick
[06:51:57] havenwood: !ban vadgeayna !T 1h trolling
[06:51:58] ChanServ: +b vadgeayna!*@*
[06:51:58] ChanServ: ChanServ kicked vadgeayna: trolling
[06:52:06] agent_white: The last sentence you said wasn't (just) trolling. Anyone who wants to learn will learn; and to program, will program.
[06:52:23] agent_white: That's not trolling, it's discouraging and ignorant.
[06:52:29] agent_white: Oh. He's gone.
[06:52:31] agent_white: havenwood: Thank you.
[06:54:09] Xeago: has joined #ruby
[06:57:07] Musashi007: @havenwood how do you like ot manage your ruby projects?
[06:57:30] willardg: has joined #ruby
[06:58:42] havenwood: Musashi007: You should ask that to someone who's a better maintainer than me!
[06:59:40] Musashi007: anyone who is a better maintainer than havenwood want to say how they manage their ruby projets? :D
[07:00:48] havenwood: Musashi007: For example, see: https://github.com/jeremyevans/roda
[07:00:58] havenwood: Musashi007: https://github.com/jeremyevans/sequel
[07:04:22] Musashi007: oh lordy what are these examples of
[07:04:42] pontiki: has joined #ruby
[07:05:41] skcin7_: has joined #ruby
[07:06:01] havenwood: Musashi007: There're many factors but handling issues, test coverage, responding to pull requests, keeping a changelog, a coherent git history, a regular patten of updates, and fostering a welcome environment are some
[07:07:51] towski_: has joined #ruby
[07:10:38] havenwood: Musashi007: Probably saying no is pretty important. Growing a community would be vital unless you can do it all.
[07:10:56] dnewkerk: has joined #ruby
[07:14:31] swgillespie: has joined #ruby
[07:15:41] NeverDie: has joined #ruby
[07:17:40] vdamewood: has joined #ruby
[07:18:02] nemo_: has joined #ruby
[07:19:24] firstdayonthejob: has joined #ruby
[07:21:21] jamto11: has joined #ruby
[07:22:28] tkuchiki: has joined #ruby
[07:27:32] null__: has joined #ruby
[07:27:32] null__: has joined #ruby
[07:27:35] Soda: has joined #ruby
[07:29:42] erbesharat: has joined #ruby
[07:29:43] symm-: has joined #ruby
[07:29:50] Fredrich010: has joined #ruby
[07:32:14] armyriad: has joined #ruby
[07:33:37] relix: has joined #ruby
[07:34:30] diegoaguilar: has joined #ruby
[07:36:58] moei: has joined #ruby
[07:38:09] aryaching: has joined #ruby
[07:38:13] Fredrich010: has joined #ruby
[07:38:55] beauby: has joined #ruby
[07:41:04] RegulationD: has joined #ruby
[07:42:42] Fredrich_: has joined #ruby
[07:42:43] willardg: has joined #ruby
[07:42:54] keen______: has joined #ruby
[07:44:00] charliesome: has joined #ruby
[07:44:06] workmad3: has joined #ruby
[07:45:45] CloCkWeRX: has joined #ruby
[07:51:57] ChanServ: -b vadgeayna!*@*
[07:53:15] zipace: has joined #ruby
[07:54:46] jokester: has joined #ruby
[07:54:54] teclator: has joined #ruby
[07:56:31] zipace: has joined #ruby
[08:02:16] tkuchiki: has joined #ruby
[08:02:41] spider-mario: has joined #ruby
[08:03:53] SuzieQueue: has joined #ruby
[08:04:22] erbesharat: i get this error when i want install jbuilder and web-console gem: http://dpaste.com/0FV7XD3
[08:04:51] erbesharat: i searched and found this https://github.com/rubygems/rubygems/issues/515 but there is not any solution for fixing this error.
[08:13:34] bruno-: has joined #ruby
[08:16:17] davedev24: has joined #ruby
[08:18:00] vadgeayna: has joined #ruby
[08:18:51] bruno-_: has joined #ruby
[08:23:20] sl33k: has joined #ruby
[08:23:33] sl33k: i am trying to force delete and install my homebrew
[08:24:03] sl33k: but some ???possible??? brew files in /usr/local dont seem to be getting deleted and I have been advised to delete manually.
[08:24:07] tkuchiki: has joined #ruby
[08:24:09] sl33k: would this be a safe operation?
[08:24:40] apeiros: sl33k: I think homebrew has its own channel
[08:24:42] davedev24: has joined #ruby
[08:24:46] mikecmpbll: has joined #ruby
[08:25:26] sl33k: apeiros: aye
[08:26:07] jackjackdripper: has joined #ruby
[08:28:49] aryaching: has joined #ruby
[08:32:23] chipotle: has joined #ruby
[08:34:15] nowhereFast: has joined #ruby
[08:34:17] ruurd: has joined #ruby
[08:34:22] Xiti: has joined #ruby
[08:34:27] decoponio: has joined #ruby
[08:36:44] vigintas: has joined #ruby
[08:37:21] vigintas: has joined #ruby
[08:37:35] yosiat: has joined #ruby
[08:37:40] chipotle_: has joined #ruby
[08:39:08] charliesome: has joined #ruby
[08:43:28] j416_: has joined #ruby
[08:43:58] alcipir: has joined #ruby
[08:44:25] Musashi007: has joined #ruby
[08:46:48] inteq: has joined #ruby
[08:47:28] hfp_work: has joined #ruby
[08:48:10] skade: has joined #ruby
[08:48:31] platzhirsch: has joined #ruby
[08:49:25] sl33k: has joined #ruby
[08:54:08] Musashi007: has joined #ruby
[08:56:44] Jackneill: has joined #ruby
[08:57:34] chipotle: has joined #ruby
[08:58:25] vdamewood: has joined #ruby
[09:00:14] sudiptamondal: has joined #ruby
[09:00:28] dmolina: has joined #ruby
[09:00:48] Xeago: has joined #ruby
[09:00:54] stardiviner: has joined #ruby
[09:01:53] favadi: has joined #ruby
[09:05:21] pontiki: has joined #ruby
[09:06:06] bmalum: has joined #ruby
[09:09:02] marr: has joined #ruby
[09:09:58] patdohere: has joined #ruby
[09:10:19] bmalum_: has joined #ruby
[09:11:08] bmalum: has joined #ruby
[09:12:54] hmsimha: has joined #ruby
[09:14:20] favadi: has joined #ruby
[09:16:40] karapetyan: has joined #ruby
[09:17:38] GBrawl: has joined #ruby
[09:19:53] jgt1: has joined #ruby
[09:19:59] bmalum_: has joined #ruby
[09:27:27] hiyosi: has joined #ruby
[09:29:38] tkuchiki: has joined #ruby
[09:31:51] Rinzlit1: has joined #ruby
[09:32:06] workmad3: has joined #ruby
[09:33:12] CloCkWeRX1: has joined #ruby
[09:41:49] ibouvousaime: has joined #ruby
[09:41:53] RegulationD: has joined #ruby
[09:46:50] dmolina: has joined #ruby
[09:48:47] benlovell: has joined #ruby
[09:49:09] vadgeayna: i don't like niggers
[09:52:01] skade: has joined #ruby
[09:52:41] pandaant: has joined #ruby
[09:53:42] workmad3: has joined #ruby
[09:55:25] leafybasil: has joined #ruby
[09:55:28] platzhirsch: has joined #ruby
[09:56:39] Xeago: has joined #ruby
[09:56:58] Galas: has joined #ruby
[09:59:50] vanillapeach: has joined #ruby
[10:02:22] andykingking: has joined #ruby
[10:02:32] bubbys: has joined #ruby
[10:02:40] workmad3: has joined #ruby
[10:03:21] yfeldblum: has joined #ruby
[10:04:09] sudiptamondal: has joined #ruby
[10:04:21] shinenelson: has joined #ruby
[10:04:46] sudiptamondal: has joined #ruby
[10:06:17] sudiptamondal: has joined #ruby
[10:10:36] simi: has joined #ruby
[10:11:38] ruurd: has joined #ruby
[10:12:12] voker57: has joined #ruby
[10:12:51] jgt1: has joined #ruby
[10:15:00] firstdayonthejob: has joined #ruby
[10:16:29] gigetoo: has joined #ruby
[10:17:04] karapetyan: has joined #ruby
[10:17:28] demonlove: has joined #ruby
[10:19:29] sl33k: which terminal do most of you guys use? I would like to modify mine to look more sexy and appealing
[10:19:42] sl33k: using iTerm and it still looks a bit dull
[10:22:32] Galas: I use iTerm
[10:22:39] Galas: you can download themes for it
[10:23:22] sl33k: Galas: like when I do ls -al
[10:23:38] sl33k: i like when the output comes out with types in different colors
[10:24:03] sl33k: Galas: also it would be nice to get ???syntax??? highlight when I am typing commands like: git add blah
[10:24:43] workmad3: has joined #ruby
[10:27:17] jhass: sl33k: you describe shell features rather than terminal features. Have a look at fish and zsh
[10:27:18] bruce_lee2: has joined #ruby
[10:28:06] sl33k: jhass: i know this isnt exactly a ruby/rails feature, but seeing as i would be using the terminal a lot. I would be glad if you could explain
[10:28:26] jhass: do echo $SHELL
[10:28:34] jhass: that's what you have currently running
[10:28:52] jhass: the shell is the program that runs inside your terminal most of the time and provides the prompt where you type stuff
[10:30:21] gigetoo: has joined #ruby
[10:31:35] lavros_: has joined #ruby
[10:31:39] lkba: has joined #ruby
[10:31:49] charliesome_: has joined #ruby
[10:32:57] sl33k: jhass: /bin/bash is the output
[10:33:09] jhass: not surprisingly
[10:33:25] jhass: so google "fish shell" and "zsh" now
[10:33:25] sl33k: jhass: what does iTerm or iTerm2 bring to the table then?
[10:33:38] Caius: has joined #ruby
[10:33:39] sl33k: jhass: which would you advise me to go with?
[10:33:51] sl33k: i???ve heard of zsh
[10:33:52] skade: has joined #ruby
[10:33:52] jhass: I never tried fish, so I'm biased
[10:34:14] jhass: but zsh requires a fair amount of configuration to get to something really nice
[10:34:15] lubarch: has joined #ruby
[10:34:39] sl33k: jhass: https://github.com/robbyrussell/oh-my-zsh
[10:34:53] jhass: yeah, or pretzo
[10:35:21] adaedra: yorickpeterse runs under fish iirc
[10:35:33] sl33k: jhass: i???ll have a look at all of that.
[10:35:53] sl33k: jhass: meanwhile, feel fairly comfy and bored with ruby so on rails now: https://www.railstutorial.org/book/beginning
[10:36:07] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[10:36:20] sl33k: jhass: are you there?
[10:36:34] jhass: I idle there
[10:37:00] sl33k: jhass: what do you use ruby for outside rails in real life?
[10:37:48] sl33k: anyways, i want to spend time in rails and get instant gratification (and productivity) also ascertain my ruby level. I???ll need to come back later on
[10:37:55] jhass: I've written, mmh, 3 IRC bots in it, lot's of small adhoc scripts to automate some task, stuff like that
[10:39:44] tkuchiki: has joined #ruby
[10:41:27] ruurd: has joined #ruby
[10:41:27] sl33k: jhass: dont know what mmh is. irc bots in java are built from libraries stuff like pircbot library or so. automation sounds fun :D
[10:42:20] sl33k: jhass: thanks for helping
[10:42:34] jhass: mmh, as in the "let me think" sound
[10:42:55] joonty: has joined #ruby
[10:43:06] bruno-: has joined #ruby
[10:43:11] sl33k: ACTION facepalm
[10:43:27] Feyn: has joined #ruby
[10:43:50] karapetyan: something.map { |i| i ** 2 } -- is there any shortcut for it?
[10:44:55] jhass: karapetyan: nope
[10:47:10] hfp_work: has joined #ruby
[10:47:11] ruurd: has joined #ruby
[10:48:11] astrobunny: has joined #ruby
[10:48:20] bruno-_: has joined #ruby
[10:49:17] yorickpeterse: adaedra: yes, I use Fish
[10:49:21] yorickpeterse: and it's pretty easy to set up
[10:49:25] yorickpeterse: no need for oh-my-bloatware
[10:49:39] adaedra: I tried, I didn't like it that much :<
[10:49:54] tkuchiki: has joined #ruby
[10:50:05] platzhirsch: has joined #ruby
[10:50:57] Guest71876: has joined #ruby
[10:51:42] karapetyan: has joined #ruby
[10:52:01] joonty: has joined #ruby
[10:53:36] bruno-_: has joined #ruby
[10:56:09] howdoicomputer: has joined #ruby
[10:59:12] zarubin_: has joined #ruby
[10:59:30] lkba_: has joined #ruby
[11:00:58] gregf: has joined #ruby
[11:01:28] platzhirsch: has left #ruby: ()
[11:01:31] cfloare: has joined #ruby
[11:02:42] htmldrum: has joined #ruby
[11:04:15] jgt: has joined #ruby
[11:06:05] pontiki: has joined #ruby
[11:06:22] Xiti: has joined #ruby
[11:07:02] Galas: has joined #ruby
[11:07:51] HANJIN: has joined #ruby
[11:08:31] psye: has joined #ruby
[11:09:26] ht__: has joined #ruby
[11:09:41] psye: has joined #ruby
[11:13:20] kirun: has joined #ruby
[11:15:36] sl33k_: has joined #ruby
[11:16:19] nowhereFast: has joined #ruby
[11:18:03] Rutix: has joined #ruby
[11:18:03] Rutix: has joined #ruby
[11:22:56] sdothum: has joined #ruby
[11:24:31] Rollabunna: has joined #ruby
[11:25:18] rbennacer: has joined #ruby
[11:25:28] workmad3: has joined #ruby
[11:29:26] solocshaw1: has joined #ruby
[11:34:04] gigetoo: has joined #ruby
[11:35:29] lubarch: has joined #ruby
[11:36:51] AccordLTN: has joined #ruby
[11:38:00] Nightmare: has joined #ruby
[11:39:26] Jello_Raptor: has joined #ruby
[11:39:40] davedev24: has joined #ruby
[11:41:32] SCHAAP137: has joined #ruby
[11:42:49] RegulationD: has joined #ruby
[11:42:55] bonhoeffer_: has joined #ruby
[11:43:53] aryaching: has joined #ruby
[11:45:01] Galas: has joined #ruby
[11:47:11] hadrig: has joined #ruby
[11:47:23] big|bad|wolf: has joined #ruby
[11:48:58] workmad3: has joined #ruby
[11:49:32] hadrig: has joined #ruby
[11:49:32] rickmasta: has joined #ruby
[11:50:21] big|bad|wolf: has joined #ruby
[11:50:41] beauby: has joined #ruby
[11:51:58] tkiel: has joined #ruby
[11:52:28] zarubin_: has joined #ruby
[11:52:54] karapetyan: has joined #ruby
[11:53:53] cornerma1: has joined #ruby
[11:54:27] FernandoBasso: has joined #ruby
[11:54:45] workmad3: has joined #ruby
[11:54:58] zarubin_: has joined #ruby
[11:55:04] Rinzlit: has joined #ruby
[11:55:58] OrbitalKitten: has joined #ruby
[11:56:53] howdoicomputer: has joined #ruby
[12:04:31] ajb-: has joined #ruby
[12:05:30] ajb-: has joined #ruby
[12:07:20] leafybasil: has joined #ruby
[12:07:50] alcipir: has joined #ruby
[12:08:58] leafybas_: has joined #ruby
[12:09:15] tkiel: has joined #ruby
[12:09:38] zarubin_: has joined #ruby
[12:09:46] p1k: has joined #ruby
[12:09:47] leafybas_: has joined #ruby
[12:09:54] Rinzlit1: has joined #ruby
[12:09:58] p1k: is there a method to get all the class methods for a class?
[12:11:40] ruurd: has joined #ruby
[12:11:46] leafybasil: has joined #ruby
[12:12:21] apeiros: p1k: klass.methods
[12:12:33] apeiros: also see .private_methods
[12:13:44] wsewolod: has joined #ruby
[12:13:51] tkuchiki: has joined #ruby
[12:14:10] hadrig: has joined #ruby
[12:14:37] p1k: apeiros: can i get private and non-private together?
[12:14:58] apeiros: don't think so. but they return arrays and you can use Array#+
[12:16:31] BSaboia: has joined #ruby
[12:16:32] p1k: how can i fetch a specific private method without calling it ?
[12:17:14] nanoz: has joined #ruby
[12:17:40] jbw: has joined #ruby
[12:18:05] akemrir: has joined #ruby
[12:20:51] hadrig: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[12:21:16] mengu: has joined #ruby
[12:21:23] Fredrich010: has joined #ruby
[12:21:41] MeMoc: has joined #ruby
[12:21:43] lavros: has joined #ruby
[12:21:55] OrbitalKitten: has joined #ruby
[12:22:06] steffkes: has joined #ruby
[12:22:06] steffkes: has joined #ruby
[12:26:31] jamto11: has joined #ruby
[12:28:57] zotherst1: has joined #ruby
[12:29:16] The_Phoenix: has joined #ruby
[12:31:08] bonhoeffer: has joined #ruby
[12:31:21] gregoriokusowski: has joined #ruby
[12:31:59] jgt: has joined #ruby
[12:32:07] The_Phoenix: has joined #ruby
[12:32:08] cdg: has joined #ruby
[12:32:22] yorickpeterse: adaedra: took me a day or two
[12:32:27] yorickpeterse: can't go back now
[12:32:59] sudiptamondal: has joined #ruby
[12:33:44] sudiptamondal: has joined #ruby
[12:34:04] BrunoSaboia: has joined #ruby
[12:34:40] adaedra: yorickpeterse: I tried for some days, but I went back to zsh, easier to configure (maybe because I already know how).
[12:35:14] adaedra: I kind of felt it tried too hard being smart.
[12:39:51] millerti: has joined #ruby
[12:39:56] millerti: I'm writing a program in Ruby, and I have subclassed Array. As long as I create a new one and access methods on it, I get what I want. But what if I have a regular array, but I want to convert it to an instance of the subclass?
[12:40:45] adaedra: You can't.
[12:40:48] odigity: The OpenSSL::PKey::EC.new method is undocumented, and every example I can find shows how to generate a new key pair instead of reusing an existing private key, which is useless.
[12:41:23] adaedra: What you can do, is put the additional methods in a module rather than a subclass, and extend the instance where you need the additional methods, millerti
[12:42:04] millerti: adaedra: One of the thing I want to do us concatenate two of the subclass. But + on the superclass seems to return an Array.
[12:42:16] odigity: millerti, the Kernel module has a method called Array() that turns whatever you pass into it into an array. Perhaps you can make a similar constructor function in your class. For example, if your class is MyArray, you can create a class method that takes an array and returns your special array, like MyArray.from_ary
[12:42:41] adaedra: millerti: but maybe subclassing Array is not the best solution. What are you trying to do, in the first place?
[12:43:05] odigity: If you do decide to subclass the array and still want + to work, you will have to override it by defining your own version in your subclass.
[12:43:11] millerti: odigity: Yeah, I thought about making a constructor, but how do I take an array and assign it to the internal array of the subclass?
[12:43:34] odigity: but yes, adaedra's suggestion to try an alternative approach is also worth considering. (though there's nothing wrong with subclassing Array or Hash, it's done all the time)
[12:43:59] millerti: odigity: If I override +, I can use the super class's implementation of + to concatenate, but I get an Array, not the subclass.
[12:44:13] yorickpeterse: adaedra: never really bothered with zsh tbh, so not sure
[12:44:17] millerti: Why did I do this? Because I need an array that automatically creates something other than nil for empty elements.
[12:44:19] mengu: has joined #ruby
[12:44:19] mengu: has joined #ruby
[12:44:20] yorickpeterse: but configuring Fish from the shell is pretty easy
[12:44:22] yorickpeterse: the web UI is meh
[12:44:23] odigity: millerti, I'm aware. you'll have to than repackage the resulting array as a MyArray
[12:44:34] odigity: millerti, the feature you're looking for is built-in to Array, I think
[12:44:35] millerti: odigity: How do I do that repackaging?
[12:45:10] nowhereFast: has joined #ruby
[12:45:10] odigity: millerti, the same way you build up your MyArray in the first place. by using << or [] or a dozen other methods that add elements to an array
[12:45:40] millerti: odigity: Gah. I need the speed of using built-in methods.
[12:46:12] odigity: millerti, can you give me an example of a case where you're getting a nil but want something else when using the default Array?
[12:46:54] millerti: Sure. This is called InstructionArray, and when I access an element not previously assigned, I want to get a "null" Instruction. So I overrode [] to make that happen.
[12:47:26] millerti: This happens when I'm merging instruction sequences which only partially overlap, so when I go off the end of one, I need to merge with blank instructions.
[12:47:26] adaedra: Just make an InstructionArray that has the array as instance variable, and implement all you want on it.
[12:47:46] adaedra: This way, if you have an array, you can just InstructionArray.new(array) to have your instance and methods ready.
[12:47:48] odigity: millerti, have you looked at the Array#fetch method?
[12:47:57] millerti: adaedra: Yeah, but that means basically overriding all methods. I did think of that. It wasn't until I started trying to optimize for speed that I ran into this trouble.
[12:48:15] odigity: millerti, http://ruby-doc.org/core-2.2.3/Array.html#method-i-fetch
[12:48:58] millerti: Well, replacing [] everywhere with fetch would involve rewriting a ton of code that currently uses []
[12:49:10] DoubleMalt: has joined #ruby
[12:49:44] odigity: millerti, I don't think there's a magic way to get what you want without one of the strategies describe above
[12:49:51] millerti: Maybe I can abuse concat?
[12:49:53] adaedra: millerti: extend may be what you're looking for then.
[12:49:54] devoldmx: has joined #ruby
[12:50:11] adaedra: &ri Module#extend
[12:50:11] `derpy: http://www.rubydoc.info/stdlib/core/Object#extend-instance_method
[12:50:16] millerti: I'm wondering if I use InstructionArray.concat if I would get an InstructionArray.
[12:50:19] adaedra: Ah right, object.
[12:50:32] odigity: adaedra, extend wouldn't solve his problem. he wants to alter the behavior of [] to behave like fetch with an implicit default without having to override the dozens of methods that return a new Array
[12:50:49] adaedra: odigity: extend with a module that defines [].
[12:50:52] JammyHammy: has joined #ruby
[12:51:06] odigity: adaedra, possible, if it doesn't break anything
[12:51:35] millerti: Hmm... so I make InstructionArray and then extend it with Array? How do I make sure that MY [] takes priority?
[12:51:37] odigity: millerti, you can simply redefine [] on Array directly, but it will affect all ruby code in the process -- unless you use .extend, which only adds a method to an object, not it's class
[12:51:56] skade: has joined #ruby
[12:52:30] adaedra: module Ex; def [](*); :blocked; end; end; a = []; p a[0]; a.extend Ex; p a[0]
[12:52:32] sl33k: has joined #ruby
[12:52:34] millerti: Ok, so somehow, in my constuctor, I need to first extend the new object with Array methods and follow that by overriding [] ?
[12:52:34] adaedra: >> module Ex; def [](*); :blocked; end; end; a = []; p a[0]; a.extend Ex; p a[0]
[12:52:35] ruboto: adaedra # => nil ...check link for more (https://eval.in/456334)
[12:52:53] odigity: but all the array methods that return new arrays won't have had .extend called on them, so you'll still not get the magic you want
[12:53:06] adaedra: millerti: no, you put your [] method in a module, then extend the array objects that need the altered [] behavior with this module.
[12:53:27] odigity: adaedra, the extend will get lost the minute he uses any of dozens of methods that return a new array
[12:53:48] Cyther: has joined #ruby
[12:53:51] adaedra: odigity: well, isn't it also the case with an array subclass?
[12:53:52] millerti: I'm going to experiment with concat.
[12:53:57] odigity: probably because the Array class code doesn't use self.class to create new objects :)
[12:54:03] odigity: adaedra, it is
[12:54:21] adaedra: but at least, the new behavior can be applied to an existing array, this way
[12:54:26] odigity: adaedra, nothing we've discussed meets *all* of millerti's preferences; I suspect nothing will
[12:54:30] everbot: has joined #ruby
[12:54:47] adaedra: but composition may be a better way, and I doubt it is needed to have /all/ of Array+Enumerable methods available.
[12:54:56] millerti: Having InstuctionArray *contain* an Array would at least WORK.
[12:55:07] millerti: Yeah, I'd add them until I had all I needed.
[12:55:18] odigity: adaedra, agreed, that may be the best compromise if this behavior is only needed in certain areas that only use a few array methods
[12:55:57] odigity: Quick reminder: I'm completely stuck because I can't figure out how to us OpenSSL::PKey::EC. I'd appreciate any help.
[12:59:07] millerti: So If I pass an array to the contructor of the composite class, do I want to use dup or clone?
[12:59:14] codecop: has joined #ruby
[12:59:23] devoldmx: has joined #ruby
[12:59:44] doddok: has joined #ruby
[13:00:35] firstdayonthejob: has joined #ruby
[13:02:57] alcipir: has joined #ruby
[13:03:42] jonnie: has joined #ruby
[13:04:56] govg: has joined #ruby
[13:05:10] millerti: I forgot how to do each. When I get an each, I just want to make the array do an each. How do I do that? I'll google it, obviously.
[13:05:48] adaedra: you can just use Forwardable
[13:05:51] adaedra: &ri Forwardable
[13:05:51] `derpy: http://www.rubydoc.info/stdlib/forwardable/Forwardable
[13:05:53] jgt: has joined #ruby
[13:11:37] houhoulis: has joined #ruby
[13:11:49] alcipir: has joined #ruby
[13:12:44] nowhereFast: has joined #ruby
[13:14:45] millerti: has joined #ruby
[13:15:30] OrbitalKitten: has joined #ruby
[13:16:06] Meow-J: has joined #ruby
[13:16:31] workmad3: has joined #ruby
[13:17:10] sgambino: has joined #ruby
[13:17:20] ht__: has joined #ruby
[13:19:04] yokel: has joined #ruby
[13:20:59] diegoaguilar: has joined #ruby
[13:21:16] Diabolik: Radar you around?
[13:21:44] kith: has joined #ruby
[13:26:03] z4j5: has joined #ruby
[13:26:13] atomical: has joined #ruby
[13:28:29] Yzguy: has joined #ruby
[13:28:43] RegulationD: has joined #ruby
[13:37:09] phutchins: has joined #ruby
[13:37:14] sankaber: has joined #ruby
[13:38:13] adaedra: you just woke up?
[13:38:39] nsuke: has joined #ruby
[13:38:54] zarubin: has joined #ruby
[13:39:29] shevy: but I was up until about 7 hours ago too
[13:39:43] millerti: So I'm implementing all of these Array methods on my custom array, but I'm having a problem with Inject always returning zero. I did "include Enumerable", and I have an each, but inject is always getting back zero. Any ideas?
[13:44:02] freerobby: has joined #ruby
[13:44:46] alcipir: has joined #ruby
[13:45:16] howdoicomputer: has joined #ruby
[13:45:29] alphaatom: has joined #ruby
[13:45:43] bonhoeffer: has joined #ruby
[13:45:44] ibouvousaime: has joined #ruby
[13:45:58] Xeago: has joined #ruby
[13:46:17] araujo: has joined #ruby
[13:46:17] araujo: has joined #ruby
[13:53:00] dfinninger: has joined #ruby
[13:55:00] ivanskie: has joined #ruby
[13:55:26] araujo: has joined #ruby
[13:55:27] araujo: has joined #ruby
[13:58:09] jamto11: has joined #ruby
[13:58:23] ruboto: We can't help you without your code, please post it to https://gist.github.com
[13:59:14] Jardayn: has joined #ruby
[13:59:46] odigity: Is there an easy way to use sequel to update the value of a column for all rows that have a null?
[14:00:15] odigity: I guess a subquery would do it, actually.
[14:01:01] Xeago: has joined #ruby
[14:01:04] odigity: RefreshToken.where(id: RefreshToken.where(mycol: nil)).update(Time.now)
[14:01:22] odigity: Wait, that's redundant.
[14:01:25] clx: has joined #ruby
[14:01:26] mostlybadfly: has joined #ruby
[14:02:52] shevy: that token is really refreshed
[14:03:47] odigity: shevy, I'd add a refresh() method, but sequel already defines one :)
[14:04:10] odigity: (in case you're curious about the context, I need to revoke all previous refresh tokens when issuing a new one)
[14:04:24] odigity: (by setting revoked_at: Time.now)
[14:05:07] RobertBirnie: has joined #ruby
[14:08:24] odigity: Also, I just realized I'm not in #sequel.
[14:08:26] ruurd: has joined #ruby
[14:09:36] sl33k: has joined #ruby
[14:10:04] symm-: has joined #ruby
[14:13:10] beauby: has joined #ruby
[14:13:33] zarubin: has joined #ruby
[14:13:39] nowhereFast: has joined #ruby
[14:13:51] sepp2k: has joined #ruby
[14:14:24] alphaatom: has joined #ruby
[14:14:25] doublemalt_: has joined #ruby
[14:17:08] clx: has joined #ruby
[14:18:59] aswen: has joined #ruby
[14:22:36] nowhereFast: has joined #ruby
[14:24:01] shevy: https://github.com/ruby/ruby/blob/trunk/ChangeLog#L3
[14:24:07] shevy: wheeeee ruby goes haiku \o/
[14:24:18] symm-: has joined #ruby
[14:26:01] ht__: has joined #ruby
[14:27:41] Jameser: has joined #ruby
[14:28:57] alphaatom: has joined #ruby
[14:29:31] RegulationD: has joined #ruby
[14:32:33] sl33k: jhass: hi mate (friend)???so i have zsh running. (not best of settings, but better than bland bash)
[14:32:47] sl33k: used the oh-my-zsh link.
[14:33:16] sl33k: jhass: i was wondering what would be the equivalent of ~/bash_profile. I usually setup my ssh git stuff in there
[14:33:49] zarubin: has joined #ruby
[14:34:33] crime: has joined #ruby
[14:37:54] DoubleMalt: has joined #ruby
[14:38:12] sl33k: adaedra: that seems to contain lot of settings already
[14:38:54] adaedra: sl33k: good, you can add yours below. It was probably added by first-run assitant and/or oh-my-zsh.
[14:39:34] sl33k: adaedra: got clues on how to make prompt always show full directory path?
[14:39:44] sl33k: adaedra: it looks much better than bash :D
[14:39:57] adaedra: sl33k: change the PROMPT variable
[14:39:59] jhass: well, to nitpick the equivalent to .bash_profile is .zprofile, .zshrc is the equivalent to .bashrc
[14:40:23] SCHAAP137: has joined #ruby
[14:40:23] SCHAAP137: has joined #ruby
[14:40:42] jhass: sl33k: https://github.com/robbyrussell/oh-my-zsh/wiki/themes
[14:41:59] Ropeney: has joined #ruby
[14:42:06] naztharune: has joined #ruby
[14:42:45] sl33k: exit or quit doesnt quit zsh. would sure need some reading. default is good though
[14:42:59] adaedra: exit should quit it.
[14:43:19] sl33k: adaedra: on second launch it does.
[14:44:02] bmalum: has joined #ruby
[14:45:09] shinnya: has joined #ruby
[14:45:59] ht__: has joined #ruby
[14:48:02] sl33k: jhass: i???m guessing with the right settings both on zsh and vim, one can create a fairly usable IDE. looking at showing directories as tree structure.
[14:52:27] idefine: has joined #ruby
[14:54:08] clx: has joined #ruby
[14:54:47] QORRiE: has joined #ruby
[14:56:54] tvw: has joined #ruby
[14:57:03] Xeago: has joined #ruby
[14:57:56] benlovell: has joined #ruby
[14:57:56] pathrocle: has joined #ruby
[14:58:25] Xeago: has joined #ruby
[14:58:51] arup_r: has joined #ruby
[14:59:58] z4j5: has joined #ruby
[15:00:40] jonee: has joined #ruby
[15:01:21] chopin: has joined #ruby
[15:03:21] Galas: sl33k: yes
[15:03:45] Galas: i was fairly suspicious of zsh but its actually quite nice
[15:04:15] dfinninger: has joined #ruby
[15:04:35] workmad3: has joined #ruby
[15:06:15] aryaching: has joined #ruby
[15:06:46] skade: has joined #ruby
[15:07:07] Musashi007: has joined #ruby
[15:07:55] Kerber0s: has joined #ruby
[15:08:33] sl33k: Galas: boring bash look not helpful for me. I already like zsh
[15:08:39] Kerber0s: has joined #ruby
[15:08:47] Galas: I've used bash for years
[15:09:05] Galas: but then I got a job where they used oh-my-zsh and I sort of drank the koolaid
[15:09:22] Galas: to show dirs as a tree structure you can do tree
[15:09:40] chopin: has joined #ruby
[15:10:04] pathrocle: has joined #ruby
[15:10:10] phutchins: has joined #ruby
[15:10:17] skade: has joined #ruby
[15:10:21] Thomas-0725: has joined #ruby
[15:10:25] sl33k: Galas: i???m mostly a java dev and havent done much scripting. one of the reasons why i???m trying ruby and ruby on rail koolaid
[15:10:37] sl33k: i already started doing more JS and angularjs
[15:11:16] sl33k: basically playing with idea of RAD. I???ll probably end up with Scala or Clojure. But i would like having a set of dynamic lang tools and choices for quick stuff
[15:11:29] Galas: I hear great things about Scala
[15:11:33] sl33k: finding the right archetype in java is so hard.
[15:11:34] Galas: especially from people going in from Java
[15:11:38] mengu: has joined #ruby
[15:11:38] mengu: has joined #ruby
[15:11:43] Galas: its a natural progression, I think
[15:11:46] Galas: even more so than Clojure
[15:11:56] sl33k: Galas: yeah: there is Play 2 framework which runs on Scala and ???steals??? a damn lot from rails
[15:12:02] Galas: yeah I know about play
[15:12:23] Galas: most frameworks after rails tbh
[15:12:28] Galas: steal a damn lot from rails
[15:12:52] sl33k: django had scaffolding too. wonder why it didnt pick up
[15:13:22] sl33k: btw there is even a spring boot java project now that does scafoldin (i doubt i like scaffolding)???i???m wary of generate dcodes
[15:13:40] Galas: you are telling me it does
[15:13:47] Galas: django picked up pretty much
[15:13:56] Galas: python/django is extremely popular iwhere I am
[15:14:00] Galas: even more than ruby
[15:14:48] someguy: has joined #ruby
[15:14:59] sl33k: Galas: nice. i just feel terrible not been good in any dynamic language and now doing the needful
[15:15:07] clx: has joined #ruby
[15:15:32] z4j5: has joined #ruby
[15:15:41] Galas: I'd suspect that if you come from a static lang you'll pick it up easily
[15:15:57] Galas: the question is whether you'd like it
[15:16:19] Galas: I quite like the compiler to be honest
[15:16:54] sl33k: Galas: for me; its coming at same time i???m drinking the TDD koolaid. More like, as long as you have test coverage, there really is no issue
[15:17:24] Galas: I only do dynamic languages to be honest
[15:17:36] Galas: so I am kinda talking out of my ass
[15:20:42] astrobun_: has joined #ruby
[15:21:17] s2013: has joined #ruby
[15:21:17] someguy: how do you find the remaining size of a file given a file pointer?
[15:21:44] jhass: someguy: .size - .pos ?
[15:22:08] sl33k: Galas: do you do TDD?
[15:22:35] Galas: I am starting to
[15:22:52] Galas: I do mostly JS tho
[15:23:07] karapetyan: has joined #ruby
[15:23:17] shevy: you poor man
[15:23:19] Galas: so I am kinda of looking at TDD/BDD in the front-end which is a bit different
[15:23:32] nowhereFast: has joined #ruby
[15:23:36] shevy: there was a 50% chance and I was wrong!
[15:24:01] someguy: jhass: thanks
[15:27:22] jgt: has joined #ruby
[15:27:29] dmolina: has joined #ruby
[15:29:11] `tim`: has joined #ruby
[15:31:29] alphaatom: has joined #ruby
[15:31:30] karapetyan: has joined #ruby
[15:31:40] step1step2_: has joined #ruby
[15:31:53] DanielI: has joined #ruby
[15:32:33] nowhereFast: has joined #ruby
[15:33:24] howdoicomputer: has joined #ruby
[15:37:06] Yzguy: has joined #ruby
[15:37:34] Galas: don't feel bad
[15:37:36] Galas: it was a choice
[15:37:37] Galas: I like JS
[15:37:42] Guest41758: has joined #ruby
[15:39:02] SCHAAP137: has joined #ruby
[15:42:21] freerobby: has joined #ruby
[15:42:27] dravine: has joined #ruby
[15:44:50] Cyther: has joined #ruby
[15:45:02] lkba: has joined #ruby
[15:45:44] Pupp3tm4st3r: has joined #ruby
[15:45:47] nfk: has joined #ruby
[15:46:06] processoriented: has joined #ruby
[15:47:20] stamina: has joined #ruby
[15:47:23] dfinninger: has joined #ruby
[15:47:32] alphaatom: has joined #ruby
[15:48:27] aspiers: has joined #ruby
[15:48:50] pwnd_nsfw: has joined #ruby
[15:49:13] Soda: has joined #ruby
[15:49:49] yosiat: has joined #ruby
[15:51:25] EminenceHC: has joined #ruby
[15:51:48] Guest41758: has joined #ruby
[15:53:44] nowhereFast: has joined #ruby
[15:55:48] ereslibre: has joined #ruby
[15:55:49] ereslibre: has joined #ruby
[15:58:22] sumark: has joined #ruby
[16:00:51] crime: on a scale of 1 to 10 with 10 being great, if I were to start a ruby hash and override [] and []= to redis.get and redis.set, how bad would that be?
[16:01:22] bigmac__: has joined #ruby
[16:01:57] shinenelson: has joined #ruby
[16:03:39] Marsupermammal: has joined #ruby
[16:04:07] symm-: has joined #ruby
[16:04:43] wsewolod: has joined #ruby
[16:06:47] skade: has joined #ruby
[16:07:30] Papierkorb: crime: -??? - Why don't you just implement a class which feels like a Hash, but doesn't inherits Hash?
[16:08:02] crime: because it's going to be obscenely large and it doesn't necessarily have to be fast because I'm gonna connect it to redis remotely
[16:08:17] Papierkorb: crime: obscenely large?"
[16:08:32] crime: 100m+ keys
[16:08:51] Papierkorb: crime: So what? def [](key); redis.hget("foo", key); end
[16:09:01] crime: basically
[16:09:03] Papierkorb: How's that large?
[16:09:13] crime: the dataset
[16:09:20] crime: the data is far too large for a ruby hash
[16:09:30] Mia: has joined #ruby
[16:09:30] Mia: has joined #ruby
[16:09:30] crime: sorry misunderstood you
[16:09:39] crime: english is my first language im just stupid
[16:09:40] jhass: http://www.rubydoc.info/gems/redis/Redis/Distributed#[]-instance_method
[16:10:18] crime: I can use regular ruby objects, or do I need to use like msgpack or json or something?
[16:11:32] codecop: has joined #ruby
[16:12:18] houhoulis: has joined #ruby
[16:13:59] pdoherty: has joined #ruby
[16:15:00] Yzguy: has joined #ruby
[16:16:43] rippa: has joined #ruby
[16:16:45] Marsuper_: has joined #ruby
[16:20:17] beauby: has joined #ruby
[16:23:54] Thomas-0725: has joined #ruby
[16:24:02] al2o3-cr: has joined #ruby
[16:27:21] freerobby1: has joined #ruby
[16:29:56] alphaatom: has joined #ruby
[16:30:26] RegulationD: has joined #ruby
[16:30:43] step1step2_: what IDE are you guys using?
[16:31:00] al2o3-cr: i don't use one
[16:31:46] nettoweb: has joined #ruby
[16:31:49] Galas: I don't either
[16:31:55] Galas: I hear good things about rubymine?
[16:32:18] step1step2_: so you edit ruby files within your terminal?
[16:33:02] step1step2_: im currently on a windows mashine :C
[16:33:11] al2o3-cr: vim, emacs, nano whatever i fancy :p
[16:33:28] jhass: My main editor is still sublime text, wouldn't call that IDE
[16:33:32] Galas: yeah mine as well
[16:33:36] Galas: will do vim if required
[16:33:49] al2o3-cr: yep, sublime text is nice also atom too
[16:34:00] zarubin: has joined #ruby
[16:34:03] howdoicomputer: has joined #ruby
[16:34:05] Galas: atom is slow
[16:34:16] al2o3-cr: not that slow
[16:34:25] Galas: i'm happy with sublime anyway
[16:34:29] havenwood: Galas: It isn't for me. Maybe your computer is slow
[16:35:03] Galas: unless it changed
[16:35:17] Galas: and is now more performant
[16:35:28] havenwood: Galas: Free is a good price. It did fairly recently hit 1.0. You can see startup time with Timecop.
[16:36:51] iamse7en: has joined #ruby
[16:36:53] Galas: I'm just not that interested, tbh
[16:36:58] Galas: I'm happy with sublime and vim
[16:37:26] kalz: has joined #ruby
[16:38:16] al2o3-cr: step1step2_: notepad++ for a simple one for MS
[16:39:08] slawrence00: has joined #ruby
[16:39:22] iamse7en: What's the most efficient way to test if two variables share the same sign (pos/neg)? rather than e.g. x > 0 && y > 0
[16:39:50] bruno-: has joined #ruby
[16:39:53] dfinninger: has joined #ruby
[16:41:40] jamto11_: has joined #ruby
[16:42:44] e1senhorn: has joined #ruby
[16:42:45] s2013: has joined #ruby
[16:44:11] hiyosi: has joined #ruby
[16:44:38] araujo: has joined #ruby
[16:45:05] bruno-_: has joined #ruby
[16:45:35] Papierkorb: iamse7en: I guess it doesn't get more efficient and understandable than that condition you wrote
[16:46:08] iamse7en: Papierkorb: okay! I can work with it, just takes a few more lines. thanks
[16:47:18] beauby: has joined #ruby
[16:47:18] Contigi: has joined #ruby
[16:47:45] shevy: iamse7en isn't that abs() ?
[16:47:46] step1step2_: alright, thanks guys
[16:47:50] Yzguy: has joined #ruby
[16:48:37] iamse7en: shevy: well, i want the inverse as well. if they're both negative.
[16:48:51] iamse7en: a true/false if two vars share same sign
[16:49:09] chipotle: has joined #ruby
[16:50:29] varunwachaspati: has joined #ruby
[16:50:32] shevy: perhaps you can get ruby core to add .positive? and .negative? :)
[16:52:39] sdwrage: has joined #ruby
[16:52:40] workmad3: has joined #ruby
[16:52:56] chris2: has joined #ruby
[16:56:33] swgillespie: has joined #ruby
[16:57:21] kjcwncsdr: has joined #ruby
[16:58:20] kjcwncsdr: www.buzzfeed.co.il - free sex www.buzzfeed.co.il - free sex www.buzzfeed.co.il - free sex www.buzzfeed.co.il - free sex www.buzzfeed.co.il - free sex www.buzzfeed.co.il - free sex www.buzzfeed.co.il - free sex www.buzzfeed.co.il - free sex
[16:58:34] jhass: !ban kjcwncsdr !T 1w spam
[16:58:35] ChanServ: +b kjcwncsdr!*@*
[16:58:35] ChanServ: ChanServ kicked kjcwncsdr: spam
[16:59:14] tkuchiki: has joined #ruby
[17:00:02] al2o3-cr: shevy: class Numeric; def pos?; self.to_s =~ /^(\d+).?(\d+)?$/ ? true : false end end # :P
[17:00:04] relix: has joined #ruby
[17:00:22] alphaatom: has joined #ruby
[17:00:24] jhass: al2o3-cr: self > 0
[17:00:34] nowhereFast: has left #ruby: ()
[17:01:16] al2o3-cr: jhass: wasn't thinking to good :)
[17:02:40] al2o3-cr: self >= 0 ?
[17:02:52] jhass: well, 0 is neither
[17:03:01] jhass: depending on your standpoint
[17:03:06] yosiat: has joined #ruby
[17:04:24] houhoulis: has joined #ruby
[17:04:37] al2o3-cr: I always make things complicated
[17:07:48] last_staff: has joined #ruby
[17:13:10] Yzguy: has joined #ruby
[17:16:08] millerti: has joined #ruby
[17:16:24] willardg: has joined #ruby
[17:16:51] shlomo: has joined #ruby
[17:18:48] SleepySensei: has joined #ruby
[17:19:06] xcesariox: has joined #ruby
[17:20:30] Underdogg: has joined #ruby
[17:20:41] Papierkorb: How do I define a method in a module so I can include the module or use the module as standalone, and both times have access to the method?
[17:20:58] adaedra: module_method ?
[17:21:08] adaedra: or function
[17:21:15] adaedra: &ri Module#module_function
[17:21:15] `derpy: http://www.rubydoc.info/stdlib/core/Module#module_function-instance_method
[17:21:24] adaedra: yeah, this
[17:21:40] Papierkorb: adaedra: thanks!
[17:21:49] z4j5: has joined #ruby
[17:22:08] The_Phoenix: has joined #ruby
[17:23:48] skweek: has joined #ruby
[17:23:48] blackmesa: has joined #ruby
[17:24:52] step1step2_: how do i autorun a ruby script on a server? does it work like node.js with a package.json file?
[17:24:56] kobain: has joined #ruby
[17:25:05] darix: step1step2_: write an init script
[17:25:25] The_Phoenix: has joined #ruby
[17:25:30] p1k: has joined #ruby
[17:26:00] kobain: has joined #ruby
[17:26:08] step1step2_: and what os would you choose?
[17:29:38] Underdogg: has joined #ruby
[17:30:37] alphaatom: has joined #ruby
[17:31:04] workmad3: has joined #ruby
[17:32:57] chipotle: has joined #ruby
[17:33:01] bruno-: has joined #ruby
[17:34:01] The_Phoenix: has joined #ruby
[17:34:21] lianj: has joined #ruby
[17:34:56] howdoicomputer: has joined #ruby
[17:34:57] Papierkorb: I'm doing a lookup in a nested hash using a string in the form of 'a.b.c' with a hash like { 'a' => { 'b' => { 'c' => 123 } } } - The query string would give 123. I'm doing this using this code: "a.b.c".split('.').each_with_object([ hash ]){|part, chain| chain << chain[-1][part]}.last
[17:35:03] Papierkorb: Is there a better alternative?
[17:35:09] Papierkorb: E.g. without the temporary array?
[17:35:39] shevy: hmm I have old code, using Next.new which obviously was a class I once wrote... but I can't find it anymore :(
[17:37:59] jhass: Papierkorb: "a.b.c".split(".").inject(hash) {|hash, key| hash[key] }
[17:38:58] relix: has joined #ruby
[17:41:13] Coraline: Clever jhass
[17:42:50] ochkoffein: has joined #ruby
[17:43:03] jhass: interestingly the question comes up fairly regularly
[17:43:03] keen______: has joined #ruby
[17:43:37] Papierkorb: jhass: hah, that's much better, thanks
[17:44:14] ruurd: has joined #ruby
[17:46:01] willardg: has joined #ruby
[17:46:02] step1step2_: darix: so linux, ubuntu maybe?
[17:46:20] RegulationD: has joined #ruby
[17:46:49] kuntz: has joined #ruby
[17:46:57] Xeago: has joined #ruby
[17:49:27] gambl0re: has joined #ruby
[17:53:39] swgillespie: has joined #ruby
[17:54:02] shevy: ubuntu is probably the easiest one to use for non-techies and non-trekkies
[17:54:09] freerobby: has joined #ruby
[17:54:27] ndrei: has joined #ruby
[17:56:50] rehat: has joined #ruby
[17:57:11] willardg: has joined #ruby
[17:58:57] step1step2_: alright, good enough for me
[17:58:58] ndrei: has joined #ruby
[18:00:50] alphaatom: has joined #ruby
[18:01:17] rehat: this might be an odd question but is there a way to run ruby script A from the commandline with an arg to another ruby script B that has a bunch of constants so that ruby script A can use? Like programmatically require a module
[18:02:16] adaedra: arguments are in ARGV
[18:02:19] jhass: rehat: require is a method call, you could dynamically derive its argument
[18:02:24] jhass: from ARGV too
[18:02:31] jhass: though tbh it sounds somewhat ugly
[18:03:26] rehat: well I want to pass in a config file as a requirement so that the user is aware they need to update it before calling my script but yeah maybe I am doing it wrong
[18:03:42] jhass: use json, yaml or toml for config then
[18:04:00] jhass: a common trick is to run it through ERB first
[18:04:01] rehat: oh lol, ok
[18:06:59] rehat: so something like this https://hackhands.com/ruby-read-json-file-hash/
[18:07:00] swgillespie: has joined #ruby
[18:07:18] ytti: i asked this few days ago, and didn't see reply
[18:07:28] ytti: can someone recommend me python ORM, if I like sequel
[18:07:34] ytti: I tried peewee, but seems like a chore
[18:07:42] ytti: Interface.select().join(Device).where(Device.name == router)
[18:07:43] shevy: don't abandon ruby man!
[18:07:48] jhass: maybe ask #python for their favorite instead?
[18:07:53] ytti: employer is gay for python
[18:07:58] ytti: well US branch of them
[18:08:00] shevy: take over company!!!
[18:08:03] jhass: heh, language
[18:08:11] shevy: english language
[18:08:18] ytti: gay still means happy
[18:08:40] jhass: don't start shittalk like that please
[18:09:35] al2o3-cr: Does String#unpack don't deal with encoding?
[18:09:42] bmalum: has joined #ruby
[18:09:57] jhass: I hope not, it wouldn't make sense for what it does
[18:10:05] jhass: well, except for U or whatever it was I guess
[18:10:21] ruurd: has joined #ruby
[18:10:31] al2o3-cr: ok thanks jhass
[18:12:08] Hanmac: has joined #ruby
[18:15:00] patdohere: has joined #ruby
[18:16:03] crime: ytti, SQLAlchemy seems like the next best thing
[18:17:26] patdohere: has joined #ruby
[18:17:37] ytti: yeah it's the 'premier' ORM for python
[18:18:14] ytti: but it seems it's perhaps bit too old, in that it has some idioms which were born before modern ORMs, and getting rid of those probably won't happen
[18:18:24] ytti: crime, it seems even heavier for ismple stuff
[18:18:36] Asher: has joined #ruby
[18:19:20] crime: well it aint sequel
[18:20:07] crime: there's also SQLObject, idk much about it
[18:20:20] alcipir: has joined #ruby
[18:22:23] centrx: has joined #ruby
[18:22:31] Yzguy: has joined #ruby
[18:23:34] blackmes1: has joined #ruby
[18:24:05] nettoweb: has joined #ruby
[18:29:14] patdohere: has joined #ruby
[18:32:15] aethersix: has joined #ruby
[18:32:36] aethersix: has left #ruby: ()
[18:32:38] fedexo: has joined #ruby
[18:34:48] yqt: has joined #ruby
[18:35:13] aswen: has joined #ruby
[18:35:15] devoldmx: has joined #ruby
[18:38:25] al2o3-cr: [-1].pack('Q') what does ruby take this number as Inf?
[18:38:32] willardg: has joined #ruby
[18:39:28] centrx: >> [-1].pack('Q')
[18:39:28] Bellthoven: has joined #ruby
[18:39:29] ruboto: centrx # => "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" (https://eval.in/456372)
[18:40:10] QualityAddict: has joined #ruby
[18:40:21] unreal_: has joined #ruby
[18:40:32] duderonomy: has joined #ruby
[18:40:43] al2o3-cr: is it all about signed/unsigned
[18:41:08] Bellthoven: has joined #ruby
[18:41:11] baweaver: has joined #ruby
[18:41:14] centrx: I have no idea what you're asking
[18:41:21] zotherstupidguy: has joined #ruby
[18:41:37] al2o3-cr: ah, never mind i think i understand, np centrx
[18:42:04] benlovell: has joined #ruby
[18:43:56] ruurd: has joined #ruby
[18:44:34] workmad3: has joined #ruby
[18:46:27] shevy: centrx is so good that he is able to answer questions without even understanding them!
[18:47:53] centrx: rubskillz
[18:48:03] clx: has joined #ruby
[18:48:19] fedexo: has joined #ruby
[18:53:03] Cork: has joined #ruby
[18:53:16] jonnie: has joined #ruby
[18:54:41] Musashi007: has joined #ruby
[18:55:29] aswen: has joined #ruby
[18:55:33] processoriented: has joined #ruby
[18:57:22] wharr_: has joined #ruby
[18:57:40] Bellthoven: has joined #ruby
[18:57:52] skcin7: has joined #ruby
[18:59:43] AlexRussia: has joined #ruby
[18:59:51] ndrei: has joined #ruby
[19:02:31] sdwrage: has joined #ruby
[19:03:51] ferr: has joined #ruby
[19:04:06] lxsameer: has joined #ruby
[19:05:13] blue_deref: has joined #ruby
[19:07:19] cachemoi: has joined #ruby
[19:08:35] maxz: has joined #ruby
[19:10:03] step1step2_: can i autostart a ruby script using bundler? like with a gemfile?
[19:10:20] step1step2_: i can't use linux as os
[19:10:29] ahegyi: has joined #ruby
[19:10:35] cachemoi: hey everyone I'm having trouble when i run jekyll build. here are the details: https://gist.github.com/cachemoi/b272522b5955228b698a
[19:13:05] vigintas: has joined #ruby
[19:13:40] jonnie: has joined #ruby
[19:13:55] ruurd: has joined #ruby
[19:16:42] jhass: step1step2_: what does autostart mean?
[19:17:25] step1step2_: i mean once i start the ruby server, the script should also start. i dont wanna ssh into the server and start it manually
[19:18:17] jhass: step1step2_: look into the foreman gem. Or a supervisor like god, monit, eye, bluepill
[19:19:07] cachemoi: has joined #ruby
[19:20:32] allcentury: has joined #ruby
[19:22:04] Modar: has joined #ruby
[19:22:06] amclain: has joined #ruby
[19:22:08] Modar: has left #ruby: ("bbs")
[19:22:24] alcipir: has joined #ruby
[19:22:40] step1step2_: i'm overwhelmed
[19:22:58] howdoicomputer: has joined #ruby
[19:23:00] hmsimha: has joined #ruby
[19:23:36] haylon: has joined #ruby
[19:24:53] ndrei: has joined #ruby
[19:26:25] step1step2_: i just want to execute a ruby script on a ruby server -.-
[19:26:26] zenguy_pc: has joined #ruby
[19:26:42] jhass: ruby foo.rb
[19:27:29] step1step2_: on the server start ofc
[19:27:41] step1step2_: i want to create an irc bot based on https://github.com/cinchrb/cinch
[19:27:41] jhass: "the server"?
[19:27:54] step1step2_: it's a ruby 2.0 server
[19:28:01] jhass: there's no such thing
[19:28:16] step1step2_: http://i.imgur.com/0qQT6JB.png
[19:28:40] jhass: why don't you just say you use OpenShift?
[19:28:59] step1step2_: i didn't know this is important
[19:29:20] step1step2_: ?????? ??? ??? ??? ??????
[19:30:04] jhass: just launch a background task in your post_start_ruby script
[19:30:22] jhass: use a supervisor as mentioned above if you want it to restart on crashes
[19:31:25] step1step2_: are you talking about http://godrb.com/ ?
[19:31:36] jhass: that's one example of a supervisor
[19:32:54] hectortrope: has joined #ruby
[19:35:57] armyriad: has joined #ruby
[19:35:58] Igorshp: has joined #ruby
[19:37:16] Yzguy: has joined #ruby
[19:38:04] NeverDie: has joined #ruby
[19:38:35] al2o3-cr: has joined #ruby
[19:39:41] Kerber0s: has joined #ruby
[19:41:33] ramfjord: has joined #ruby
[19:42:09] chipotle: has joined #ruby
[19:42:26] ruurd: has joined #ruby
[19:46:04] skade: has joined #ruby
[19:47:12] RegulationD: has joined #ruby
[19:49:47] baweaver: has joined #ruby
[19:49:51] sl33k: has joined #ruby
[19:50:07] Kerber0s: has joined #ruby
[19:52:30] ruby_student: has joined #ruby
[19:52:48] pathrocle: has joined #ruby
[19:53:44] ruby_student: Hi Guys, I have a really simple question regarding finding Powers of 2 : http://rubyfiddle.com/riddles/cd40e
[19:54:04] ruby_student: In the above code, should it return false? Since Input 8 returns 4?
[19:55:03] Xeago: ruby_student: the code returns nil (puts returns nil). I think you're missing the essence of line2/3
[19:55:37] Xeago: num is reassigned num/2 for as long as the modulus of num and 2 is 0
[19:56:20] Xeago: so with an input of 8, num will have values 8, 4, 2, 1 before getting to line 5
[19:56:54] Xeago: >> (1==1).to_s
[19:56:55] ruboto: Xeago # => "true" (https://eval.in/456383)
[19:57:12] Xeago: no need for ? "true" : "false" :)
[19:57:13] phillips1012: has joined #ruby
[19:57:28] ruby_student: this is complete new revelation to me
[19:57:44] mesamoo: has joined #ruby
[19:57:54] ruby_student: I thought it was just a static one-time condition
[19:58:27] karapetyan: has joined #ruby
[19:58:43] ruby_student: Xeago, this is because of the While Loop, correct? This is why the code returns 8,4,2,1
[19:59:18] Xeago: ruby_student: have a look at http://rubyfiddle.com/riddles/d51c6/2, I've added a print statement
[19:59:28] step1step2_: hm.. where to playce the simple.god file?
[19:59:42] Xeago: ruby_student: the while loop repeatedly reassigns, yes
[19:59:46] Trynemjoel: has joined #ruby
[19:59:55] yosiat: has joined #ruby
[19:59:59] Xeago: (technically, you're code does not return 8,4,2,1)
[20:00:53] Xeago: ruby_student: try http://rubyfiddle.com/riddles/d51c6/3
[20:01:27] ruby_student: mother of god
[20:03:04] Xeago: ruby_student: here is an idiomatic example: http://rubyfiddle.com/riddles/d51c6/5
[20:03:24] ruby_student: I see now Xeago, the Loop stops when it reaches 1 % 2, because 1% 2 does not equal to 0, which is an invalid condition for the loop, causing it to stop
[20:03:30] Xeago: instead of calculating moduli and comparing it to 0, just check whether it is even or not :)
[20:03:38] Xeago: ruby_student: correct!
[20:04:06] ruby_student: yessss, i have learned something new today
[20:04:13] Xeago: ruby_student: look at http://rubyfiddle.com/riddles/d51c6/5 still
[20:04:27] Xeago: it's a more idiomatic way of writing what you're doing
[20:04:37] ajb-: has joined #ruby
[20:04:59] Xeago: oh, but that's buggy
[20:05:25] ajb-: has joined #ruby
[20:05:30] cmoneylulz: has joined #ruby
[20:06:12] ruby_student: This was one of the problems I had to solve for a coding bootcamp I'm applying for
[20:06:29] ruby_student: Basic stuff, but I still find it interesting
[20:06:44] vigintas: has joined #ruby
[20:07:00] Xeago: Glad you're enjoying ruby :)
[20:07:20] stamina: has joined #ruby
[20:09:50] ElFerna: has joined #ruby
[20:10:50] fantazo: has joined #ruby
[20:11:16] bmalum: has joined #ruby
[20:11:34] phutchins: has joined #ruby
[20:13:18] armyriad2: has joined #ruby
[20:13:43] saddad: has joined #ruby
[20:14:13] step1step2_: jhass: what am i doing wrong? http://i.imgur.com/lrxWCG6.gifv
[20:14:13] step1step2_: ?????? ??? ??? ??? ??????
[20:14:55] bigmac_: has joined #ruby
[20:15:11] jhass: step1step2_: how about using a video to share an error message?
[20:15:14] tubuliferous_: has joined #ruby
[20:16:12] step1step2_: so god file have to be at /var/run/god?
[20:16:13] bigmac_: im looking at pack("p*") and unpack("p*")
[20:16:15] jhass: I saw something about a pid directory that doesn't exist, which you should create, for the the quarter second it was displayed
[20:16:17] canton7: step1step2_, the error message is visible for such a short time that it's impossible to say
[20:16:31] canton7: step1step2_, ... and then there's a 15 second wait to see it again
[20:16:36] bigmac_: documentation says "pointer to a structure (fixed-length string)
[20:16:47] Trynemjoel: has joined #ruby
[20:16:55] jhass: step1step2_: no, but it shouldn't be in public/ either
[20:16:58] step1step2_: http://kopy.io/iAThr
[20:17:27] SenpaiSilver: has joined #ruby
[20:17:29] armyriad: has joined #ruby
[20:17:36] jhass: mkdir -p /var/lib/openshift/562bccfe7628e1e526000140/.god/pids
[20:17:58] diegoaguilar: has joined #ruby
[20:18:09] rdema: has joined #ruby
[20:18:12] step1step2_: Permission denied ?????? ??? ??? ??? ??????
[20:18:59] step1step2_: sudo is not available either. rip :D
[20:19:30] jhass: well, there's probably a way to configure another directory, check the docs
[20:19:39] JDiPierro: has joined #ruby
[20:19:42] jhass: pick one you can write to
[20:20:34] bigmac_: can some one try and explain pack("p*") . . .
[20:20:41] bigmac_: something is stored in memory ?
[20:21:14] cachemoi: has joined #ruby
[20:21:24] ngscheur1: has joined #ruby
[20:22:04] vigintas: has joined #ruby
[20:22:57] shevy: anyone knows why we don't have a to camelcase variant in class String?
[20:23:07] alcipir: has joined #ruby
[20:23:35] crime: how does it know where the word ends?
[20:24:09] step1step2_: lol god has email support cO
[20:24:38] armyriad: has joined #ruby
[20:24:38] shevy: crime length of the whole string
[20:25:47] crime: i dont understand, how could .to_camelCase determine where each word ends iftheyarentspacedatall
[20:25:49] step1step2_: i'm blind confirmed
[20:26:23] cmoneylulz: has joined #ruby
[20:26:55] ytti: crime, ships with dictionary?
[20:27:17] ytti: (good luck doing that for inflecetion heavy langauges)
[20:27:22] al2o3-cr: has joined #ruby
[20:27:23] shevy: crime yeah this is really trivial, in this case the common delimiter _ was not found so no modification is made
[20:27:56] crime: oh well snake_case -> camelCase would be easy
[20:28:15] step1step2_: is there some kind of config file of god?
[20:28:29] crime: step1step2_: only if you're in the root directory
[20:28:57] step1step2_: If you'd rather have the PID file stored in a different location, you can set it at the top of your config:
[20:28:57] step1step2_: God.pid_file_directory = '/home/tom/pids'
[20:29:07] step1step2_: where to save this?
[20:30:46] crime: i thought we were making a joke
[20:30:50] crime: i misunderstood you
[20:31:32] Channel6: has joined #ruby
[20:31:36] step1step2_: hm, i just need the name of the file
[20:32:22] hectortrope: has joined #ruby
[20:32:43] workmad3: has joined #ruby
[20:35:40] Thomas-0725: has joined #ruby
[20:36:17] benlovell: has joined #ruby
[20:37:07] baweaver: has joined #ruby
[20:37:19] kadoppe: has joined #ruby
[20:40:06] aryaching_: has joined #ruby
[20:40:31] bigmac_: ["abcdefghijklmnop"].pack("p*")=> "\xC8O)\x01\x00\x00\x00\x00"
[20:40:45] bigmac_: the original string is stored in memory?
[20:41:09] bigmac_: and the output string above is just a reference i guess?
[20:42:09] bigmac_: ("\xC8O)\x01\x00\x00\x00\x00").unpack("p*")=>"abcdefghijklmnop"
[20:42:41] step1step2_: is this the config file? http://i.imgur.com/5GmM8ZZ.gifv
[20:44:32] ruurd: has joined #ruby
[20:44:34] benlovell: has joined #ruby
[20:45:20] shevy: if this is a config file then the project must be deleted
[20:45:25] crime: so rubocop is screaming at me because I'm using a global to hold my redis object that I need to use across several classes, what's the alternative to this?
[20:46:06] crime: step1step2_: sure looks like it
[20:46:42] shevy: crime depends. A CONSTANT could be used, or even better, if you namespace already then store in an @ivar on the module-level
[20:47:13] crime: a constant, thats what I think I need
[20:48:03] RegulationD: has joined #ruby
[20:48:04] shevy: python 3.6, isn't it pretty? f'result = {intvalue:#06x} in hex'
[20:49:30] crime: shevy using a constant worked like a charm
[20:50:01] benlovell: has joined #ruby
[20:50:02] al2o3-cr: copying ruby damn!
[20:50:20] ramfjord: has joined #ruby
[20:51:40] shevy: al2o3-cr haha
[20:51:58] shevy: the programming languages steal features from other programming languages
[20:52:41] yfeldblum: has joined #ruby
[20:53:22] step1step2_: did i do something wrong? http://i.imgur.com/T73cSr2.png
[20:55:01] shevy: what are you doing
[20:55:12] weaksauce: step1step2_ read the quickstart on the god page
[20:55:18] weaksauce: in short yes.
[20:57:27] benlovell: has joined #ruby
[20:58:41] clx: any critiques on this? https://gist.github.com/anonymous/edbe6794a0c63bc3f785
[20:58:48] dikaio: has joined #ruby
[20:58:59] clx: would be much appreciated
[20:59:16] step1step2_: the quickstart teaches me to use god -c simple.god -D
[20:59:23] step1step2_: http://kopy.io/UhYAv
[21:00:23] ruurd: has joined #ruby
[21:00:42] clx: that code is a monkey patch to be clear
[21:00:49] clx: I know self is probably not needed
[21:00:58] clx: and I will probably extract that
[21:01:49] step1step2_: (???????????????)
[21:02:32] clx: how come unicode in a terminal irc client works better than in a chrome tab?
[21:03:29] blackmesa: has joined #ruby
[21:03:45] benlovell: has joined #ruby
[21:05:54] skweek: has joined #ruby
[21:07:16] alcipir: has joined #ruby
[21:08:13] rehat: has joined #ruby
[21:08:21] step1step2_: ???( ????? ??? ????? )???
[21:08:32] willharrison: has joined #ruby
[21:09:16] weaksauce: step1step2_ what's in your simple.god file? please gist it instead of pictures
[21:10:12] step1step2_: weaksauce: https://gist.github.com/step1step2/0a864cbe093454397aae
[21:11:29] howdoicomputer: has joined #ruby
[21:11:37] benlovell: has joined #ruby
[21:12:05] step1step2_: ruby jodusbot.rb manually works fine
[21:13:33] weaksauce: god --version
[21:14:05] al2o3-cr: they'll be opening up classes next
[21:14:18] al2o3-cr: and calling them refinements
[21:14:31] al2o3-cr: ACTION sssssssssssss..........
[21:15:16] LiquidInsect: has joined #ruby
[21:15:30] step1step2_: weaksauce: your right, i messed it up https://gist.github.com/step1step2/0f1c0314959e47b13efc
[21:15:37] step1step2_: it worked before i edited the god file
[21:15:49] rickmasta: has joined #ruby
[21:15:52] EminenceHC: has joined #ruby
[21:16:02] weaksauce: yep. you shouldn't ever need to modify the libraries' code
[21:16:57] allcentury: has joined #ruby
[21:17:00] step1step2_: alright, i removed my changes, now it works again
[21:17:00] step1step2_: Version 0.13.7
[21:17:46] benlovell: has joined #ruby
[21:18:15] step1step2_: hm.. so using God.pid_file_directory was wrong
[21:18:25] step1step2_: but there is nothing else in the docs
[21:22:50] benlovell: has joined #ruby
[21:23:16] yosiat: has joined #ruby
[21:23:54] weaksauce: it's fine to use but, as it said on the page further down, you have to put it in your *config* file
[21:24:39] step1step2_: what config file? the god file?
[21:26:44] ndrei: has joined #ruby
[21:26:52] mengu: has joined #ruby
[21:26:52] mengu: has joined #ruby
[21:27:17] ndrei: has joined #ruby
[21:27:24] step1step2_: i asked 3 hours ago how to start a ruby script. then someone told me to use god which is only made be run into another problem. is it really that hard to tell me how i start my ruby script? i mean in node.js it takes 10 seconds.
[21:27:35] step1step2_: or it's ruby itself, bad language
[21:30:38] crime: you never asked clearly, jhass specifically told you about foreman and some other gems
[21:31:00] ytti: exit if fork!11
[21:31:16] crime: you can run any ruby script with `ruby scriptname.rb`
[21:31:24] crime: and if you want something to be scheduled, just use cron
[21:31:36] ytti: i see that industry is shifting from forking long running programs to running them in foreground
[21:31:40] ytti: and logging to stdout
[21:31:48] ytti: and having generin runner take care of rest
[21:31:53] ytti: i kind like this direction
[21:31:59] Musashi007: has joined #ruby
[21:32:31] step1step2_: i have isntalled god now i dont want to read another documentaiton
[21:32:37] step1step2_: documentation
[21:33:31] sepp2k1: has joined #ruby
[21:33:56] gambl0re: has joined #ruby
[21:34:23] step1step2_: god quick start wants me to create a god file that is completly useless because i cannot run it
[21:34:29] step1step2_: very nice package
[21:35:18] Musashi007: Not sure if this is the best place to ask but can someone reccomend an entity from which to purchase a root sign certificate
[21:36:00] jhass: it's not, but do you mean a sub-CA or...?
[21:36:31] QORRiE: has joined #ruby
[21:36:46] Musashi007: looking that up
[21:37:23] rbennacer: has joined #ruby
[21:37:38] Musashi007: No, i???m trying to get my site ssl-enabled and the next step is to purchase a signed certificate, I believe
[21:39:09] phillips1012: has joined #ruby
[21:39:18] jhass: alright, so just a normal domain certificate
[21:39:33] workmad3: has joined #ruby
[21:40:17] weaksauce: step1step2_ you are asking how to make a daemon run correctly on a linux server. it's the same thing for pretty much every other server type process out there.
[21:40:25] jhass: there are tons of sellers for that. Wosign and StartSSL hand out basic ones for free. letsencrypt.org will do so in a couple of weeks, or you can try to get into the beta program now. http://www.garrisonhost.com/ssl-certificates/alphassl.html has fairly cheap offers
[21:40:28] jhass: Musashi007: ^
[21:40:28] weaksauce: jhass gave you some options
[21:41:01] Musashi007: wow thank you
[21:42:16] Asher: has joined #ruby
[21:42:20] utopiaaa: has joined #ruby
[21:42:48] weaksauce: step1step2_ did you try that again this time putting the pid config inside the .god config file?
[21:42:53] Musashi007: I???m going to startssl.com and it tells me their cert is untrusted.. lol
[21:43:13] jhass: Musashi007: huh, browser/OS?
[21:43:27] Musashi007: osx capitan safari
[21:43:40] crime: well there's two problems
[21:43:40] jhass: interesting
[21:43:50] Musashi007: it.. doesn???t do it in firefox.
[21:44:02] Musashi007: what the shit
[21:44:30] jhass: well, it's not the most trustworthy CA, but I thought generally accepted so far
[21:45:28] bkxd: has joined #ruby
[21:45:30] jonee: has joined #ruby
[21:49:02] diegoaguilar: has joined #ruby
[21:49:21] QORRiE: has joined #ruby
[21:53:19] _aeris: has joined #ruby
[21:53:35] diesel: has joined #ruby
[21:56:22] ElFerna: has joined #ruby
[21:56:24] Musashi007: @jhass any idea how to get into the letsencrypt beta program? I don???t see it on their site anywhere
[21:57:09] EminenceHC: has joined #ruby
[21:57:14] SCHAAP137: has joined #ruby
[21:58:06] phillips1012: has joined #ruby
[21:58:50] jhass: Musashi007: https://twitter.com/letsencrypt/status/643535804963397632
[21:59:59] shevy: jhass working on any interesting stuff lately?
[21:59:59] Musashi007: sorry I should have googled that.. stupidly figured checking their website would be enough. Thank you
[22:00:26] jhass: shevy: last thing I hacked was https://github.com/jhass/crpaste
[22:01:21] badhatter: has joined #ruby
[22:01:27] yosiat: has joined #ruby
[22:02:12] everbot: has joined #ruby
[22:02:16] towski_: has joined #ruby
[22:03:45] al2o3-cr: jhass: do you do more crystal || ruby ?
[22:03:58] jhass: I don't count
[22:04:03] nettoweb: has joined #ruby
[22:04:22] al2o3-cr: fair enough :)
[22:05:17] li0nK1ng: has joined #ruby
[22:06:01] haylon_: has joined #ruby
[22:06:09] mloy: has left #ruby: ("Leaving")
[22:08:19] blackmesa: has joined #ruby
[22:09:27] devoldmx: has joined #ruby
[22:10:00] yfeldblum: has joined #ruby
[22:10:07] banister: has joined #ruby
[22:11:13] devoldmx: has joined #ruby
[22:12:32] htmldrum: has joined #ruby
[22:12:53] willardg: has joined #ruby
[22:14:15] step1step2_: weaksauce: https://gist.github.com/step1step2/80f18151080af853ec72
[22:14:20] step1step2_: you mean like that?
[22:15:03] weaksauce: that config file is all ruby.
[22:15:14] SleepySensei: has joined #ruby
[22:15:23] weaksauce: you need to put the line at the top of the file most likely for it to have any effect on the stuff below it
[22:16:53] mary5030: has joined #ruby
[22:17:24] unreal_: has joined #ruby
[22:17:33] riotjones: has joined #ruby
[22:17:48] step1step2_: hm, alright. how to ensure the file path is valid?
[22:19:14] shevy: step1step2_ perhaps there is a query method to access it?
[22:19:19] weaksauce: that's between you and your filesystem I mean you could do some ruby to check and create the folder but that's beyond the scope of the config file imo
[22:20:11] step1step2_: does this help? http://kopy.io/fAMyD
[22:20:21] shevy: there is another variant https://github.com/mojombo/god/blob/538831aaea00c8dc522c51d55eeb569881193e17/lib/god/conditions/cpu_usage.rb#L29
[22:20:22] Jonson: has joined #ruby
[22:20:53] mary5030: has joined #ruby
[22:21:22] Jonson: Anyone there?
[22:21:32] weaksauce: step1step2_ `mkdir pid`
[22:22:00] weaksauce: God.pid_file_directory = './pid'
[22:22:09] Jonson: How can I convert Iconv.conv('ASCII//TRANSLIT//IGNORE', 'UTF-8', str) using String#encode instead?
[22:22:10] weaksauce: might work if it doesn't need an absolute path
[22:24:15] blackmesa: has joined #ruby
[22:24:15] Jonson: has joined #ruby
[22:24:29] step1step2_: weaksauce, is this good or bad? http://i.imgur.com/Mq5kUlq.png
[22:25:20] weaksauce: good step1step2_
[22:25:23] step1step2_: http://kopy.io/V1Sml
[22:26:06] ngscheur1: has joined #ruby
[22:26:17] step1step2_: we make progress ?????? ??? ??? ??? ??????
[22:26:55] alcipir: has joined #ruby
[22:27:14] s2013: has joined #ruby
[22:30:01] blackmesa: has joined #ruby
[22:31:56] alcipir_: has joined #ruby
[22:31:56] step1step2_: when i restart the server, nothing happens
[22:32:25] kies^: has joined #ruby
[22:41:34] baweaver: has joined #ruby
[22:45:35] s00pcan: has joined #ruby
[22:46:10] workmad3: has joined #ruby
[22:48:50] mloy: has joined #ruby
[22:48:57] RegulationD: has joined #ruby
[22:49:15] s2013: has joined #ruby
[22:50:43] weemsledeux: has joined #ruby
[22:51:45] mostlybadfly: has joined #ruby
[22:51:50] Xiti: has joined #ruby
[22:54:05] arooni: has joined #ruby
[22:55:12] crazydiamond: has joined #ruby
[22:56:54] karapetyan: it's not good idea remove some elements from array inside each block ?
[22:56:56] karapetyan: or map block
[22:57:21] jhass: modifying the collection you iterate over is not a good idea in general, yeah
[22:57:32] jhass: even if Ruby allows it for some, it leads to hard to understand code
[22:57:38] adaedra: You may be wanting Array#select / Array#reject
[22:57:43] karapetyan: jhass: ok :)
[22:57:47] purplexed^: has joined #ruby
[22:57:57] EminenceHC: has joined #ruby
[22:57:58] karapetyan: jhass: also thank you so much for codewars recommendations
[22:58:44] bb010g: has joined #ruby
[22:59:01] purplexed^: Question about unit tests and project structure: I see that it's normal to make a folder 'test' alongside 'lib' in the project structure. But I don't seem to find any convention for file-naming, and folder structure. Anyone know of a common structure/convention.
[22:59:29] howdoicomputer: has joined #ruby
[22:59:44] Coldblackice: has joined #ruby
[23:00:20] banister: purplexed^ spec/
[23:00:29] banister: purplexed^ foo_spec.rb
[23:00:32] banister: if you're using rspec
[23:00:37] banister: otherwise i think it's test/ and foo_test.rb
[23:01:07] jhass: class/module Foo; end; lib/foo.rb test/foo_test.rb, spec/foo_spec.rb
[23:01:18] bollullera: has joined #ruby
[23:01:33] al2o3-cr: is this heirachy?
[23:01:40] jhass: class/module FooBar; end; lib/foo_bar.rb test/foo_bar_test.rb, spec/foo_bar_spec.rb
[23:01:51] banister: al2o3-cr wat http://i1.kym-cdn.com/photos/images/original/000/173/576/Wat8.jpg
[23:01:52] jhass: class/module Foo::Bar; end; lib/foo/bar.rb test/foo/bar_test.rb, spec/foo/bar_spec.rb
[23:02:02] rbennacer: has joined #ruby
[23:02:18] vikaton: has joined #ruby
[23:02:20] al2o3-cr: banister: LOL
[23:02:35] purplexed^: okay, so repeat the hierarchy, postfixing with _test
[23:02:37] jhass: oh, someone doesn't know wat
[23:02:45] jhass: al2o3-cr: https://www.destroyallsoftware.com/talks/wat
[23:02:55] purplexed^: that's a fun talk
[23:03:03] EminenceHC: has joined #ruby
[23:03:23] workmad3: has joined #ruby
[23:04:10] WajidKagzi: has joined #ruby
[23:04:14] pandaant: has joined #ruby
[23:04:28] al2o3-cr: jhass: LOL phaha
[23:05:34] banister: al2o3-cr you seem to be having a right ol' chuckle!
[23:05:39] Fredrich_: has joined #ruby
[23:05:44] al2o3-cr: banister: looking good http://imgur.com/gallery/eTvo9
[23:05:49] alphaatom: has joined #ruby
[23:07:34] VeryBewitching: has joined #ruby
[23:08:06] Or1on: has joined #ruby
[23:10:52] minimalism: has joined #ruby
[23:11:02] alcipir: has joined #ruby
[23:12:36] tubuliferous_: has joined #ruby
[23:14:01] mloy: has joined #ruby
[23:15:18] tkuchiki: has joined #ruby
[23:15:37] troulouliou_dev: has joined #ruby
[23:17:06] freerobby: has joined #ruby
[23:18:27] ramfjord: has joined #ruby
[23:20:30] al2o3-cr: about as funny as my little toe
[23:20:31] banister: al2o3-cr you're still chuckling away
[23:21:27] al2o3-cr: makes sense
[23:22:22] purplexed^: <- just discovered attr_writer, attr_reader .. life just became easier :D
[23:22:41] purplexed^: fun to be a noob again
[23:23:00] al2o3-cr: purplexed^: macros for setter/getter resp.
[23:23:26] purplexed^: it's hard writing ruby for a C# developer :)
[23:23:31] adaedra: purplexed^: ppst, attr_accessor
[23:23:31] purplexed^: completely different mindset
[23:23:57] al2o3-cr: yeah for both ^
[23:24:07] Ox0dea: has joined #ruby
[23:24:10] purplexed^: attr_accessor, shall learn that too now
[23:24:13] adaedra: isn't it something like `type myattr { get; set; }` in C# ?
[23:24:32] purplexed^: yeah, kinda like auto props
[23:24:52] LoganG_: has joined #ruby
[23:25:25] saddad: has joined #ruby
[23:26:54] purplexed^: but I forgot how long it takes to learn a new language
[23:27:36] adaedra: learn != master
[23:28:12] purplexed^: i meant master yeah
[23:28:33] EminenceHC: has joined #ruby
[23:29:03] Guest41758: has joined #ruby
[23:29:33] Asher: has joined #ruby
[23:30:17] weaksauce: purplexed^ eloquent ruby is excellent if you know the basics of programming and ruby.
[23:31:17] purplexed^: what confuses me in ruby is the many ways you can do things. But watching Idiomatic Ruby on pluralsight, has really helped me
[23:31:32] mary5030: has joined #ruby
[23:32:15] Ox0dea: Was it ever even common practice to skin cats?
[23:32:33] step1step2_: can someone help me with god? my ruby script is still getting ignored even tho god is running
[23:33:17] weaksauce: #linux might be a better place for that
[23:33:36] karapetyan: has joined #ruby
[23:33:46] zarubin: has joined #ruby
[23:36:16] haylon: has joined #ruby
[23:36:38] alcipir_: has joined #ruby
[23:37:17] PlasmaStar: has joined #ruby
[23:37:17] purplexed^: Is monkey patching ever used in larger collaborative projects ?
[23:37:28] purplexed^: it sounds like it should be considered harmful
[23:39:10] weaksauce: rails does it for some things
[23:39:13] Coraline: Monkey patching is evil.
[23:39:36] purplexed^: okay, sio I'll avoid it until I know what I am doing
[23:40:06] purplexed^: with my C# background it sounds like a terrible idea :D
[23:42:21] weaksauce: used correctly it's not that bad but it's something to do with extreme caution unless you absolutely need it.
[23:42:47] weaksauce: ruby gives you a lot of rope to hang yourself with
[23:43:40] Jardayn: has joined #ruby
[23:45:19] Fredrich010: has joined #ruby
[23:45:43] baweaver: ACTION uses monkey patching
[23:46:01] ytti: now with refinements nay-sayers really need to be creative aout hating it
[23:46:12] baweaver: It's far more of a matter of recognizing when something is truly generic enough to justify it
[23:46:34] gregoriokusowski: has joined #ruby
[23:48:03] Fredrich_: has joined #ruby
[23:50:18] mloy: has left #ruby: ("Leaving")
[23:53:59] rodfersou: has joined #ruby
[23:56:15] Fredrich010: has joined #ruby
[23:56:50] shevy: refinements look ugly!
[23:57:11] shevy: but the term "monkey patching" is also ugly
[23:57:17] shevy: I call it beaver patching