« Back to channel list

#ruby - 07 September 2015

« Back 1 day Forward 1 day »
[00:00:51] Mon_Ouie: Position as [line, column] maybe?
[00:01:00] glennt: has joined #ruby
[00:01:56] mary5030: has joined #ruby
[00:02:03] havenwood: >> require 'ripper'; Ripper.sexp "\n case 'a'; when 'a','b'; 'c' end"
[00:02:04] ruboto: havenwood # => [:program, [[:case, [:string_literal, [:string_content, [:@tstring_content, "a", [2, 7]]]], [:when, ...check link for more (https://eval.in/429023)
[00:02:13] rbennacer: has joined #ruby
[00:02:13] havenwood: Mon_Ouie: +1
[00:03:14] havenwood: shevy: https://github.com/jimweirich/sorcerer#readme
[00:03:18] tubuliferous_: has joined #ruby
[00:03:19] havenwood: shevy: https://www.weirichfund.org
[00:03:55] havenwood: shevy: stop making me cry
[00:03:56] claw: has joined #ruby
[00:05:16] pipecloud: has joined #ruby
[00:05:25] majjoha: has joined #ruby
[00:05:28] zenguy_pc: has joined #ruby
[00:06:06] shevy: did you have coffee yet
[00:07:12] havenwood: shevy: Yeah, Jim Weirich was just the greatest of Rubyists and my personal hero. If you haven't seen his talks... do!!
[00:07:55] nux443: has joined #ruby
[00:08:01] zenguy_pc: has joined #ruby
[00:08:20] fostertheweb: has joined #ruby
[00:08:25] Swappticon: has joined #ruby
[00:08:53] Tamae: has joined #ruby
[00:09:25] platzhirsch: has left #ruby: ()
[00:10:22] havenwood: shevy: http://confreaks.tv/presenters/jim-weirich
[00:10:41] theery: has joined #ruby
[00:12:31] pipecloud: has joined #ruby
[00:13:04] Valeness_: has joined #ruby
[00:13:23] jammes: has joined #ruby
[00:13:34] ledestin: has joined #ruby
[00:14:49] michael_mbp: has joined #ruby
[00:15:06] rickmasta: has joined #ruby
[00:17:38] lannonbr_: has joined #ruby
[00:18:03] fgo_: has joined #ruby
[00:19:48] mary5030: has joined #ruby
[00:20:06] khgfd: has joined #ruby
[00:20:57] pipecloud: has left #ruby: ("Textual IRC Client: www.textualapp.com")
[00:23:17] roshanavand: has joined #ruby
[00:23:39] mesamoo: has joined #ruby
[00:25:42] swgillespie: has joined #ruby
[00:25:44] al2o3-cr: has joined #ruby
[00:27:43] bluOxigen: has joined #ruby
[00:29:42] _blizzy_: has joined #ruby
[00:30:15] Guest4117: has joined #ruby
[00:31:38] Guest4117: has left #ruby: ()
[00:33:01] djbkd: has joined #ruby
[00:35:28] jdawgaz: has joined #ruby
[00:39:01] newtonianb: has joined #ruby
[00:41:41] Oog: has joined #ruby
[00:42:39] saddad: has joined #ruby
[00:42:52] workmad3: has joined #ruby
[00:43:41] charliesome: has joined #ruby
[00:44:45] ghr: has joined #ruby
[00:44:56] keen__________15: has joined #ruby
[00:45:10] bier: has joined #ruby
[00:45:57] pontiki: has joined #ruby
[00:47:00] Oog: has joined #ruby
[00:48:18] Ox0dea: That poor platzhirsch fellow went away thinking case expressions don't evaluate to a value. :/
[00:50:43] fgo_: has joined #ruby
[00:51:29] devoldmx: has joined #ruby
[00:53:19] JDiPierro: has joined #ruby
[00:53:42] al2o3-cr: you arrays are gone
[00:54:45] al2o3-cr: hi craysiii
[00:55:15] chipotle: has joined #ruby
[00:57:55] al2o3-cr: How can i send an object a method, trough a time tunnel and back again?
[00:58:14] pipework: al2o3-cr: You need something that's bigger on the inside
[00:58:19] pontiki: you need to requre "tardis"
[00:59:15] devbug_: has joined #ruby
[01:00:11] shevy: is this random-words-day again?
[01:00:38] bootstrappm: has joined #ruby
[01:00:52] al2o3-cr: Its big apple day
[01:01:28] al2o3-cr: Trainers is not all it seems
[01:02:05] jher: has joined #ruby
[01:02:13] al2o3-cr: I finally got it
[01:04:07] al2o3-cr: Cheese, cheeseis the answer
[01:04:17] charliesome: has joined #ruby
[01:04:30] emba: has joined #ruby
[01:04:44] Musashi007: has joined #ruby
[01:04:45] al2o3-cr: Oh, and milk
[01:06:45] pontiki: you and Chesterson
[01:07:28] al2o3-cr: Incoming... https://www.youtube.com/watch?v=4NBDvXpsBzk
[01:09:56] Ox0dea: crayfishx: How about Jaguarundi?
[01:11:32] araujo_: has joined #ruby
[01:11:38] ghr: has joined #ruby
[01:12:13] Azure: has joined #ruby
[01:12:18] rakm: has joined #ruby
[01:13:00] Oog: has joined #ruby
[01:13:23] Swappticon: has joined #ruby
[01:18:33] jesseherrick: has joined #ruby
[01:24:40] failshell: has joined #ruby
[01:30:27] mary5030: has joined #ruby
[01:31:48] jesseherrick: has joined #ruby
[01:32:29] jesseherrick: has left #ruby: ()
[01:32:49] johnhamelink: has joined #ruby
[01:33:14] JDiPierro: has joined #ruby
[01:33:56] ybian: has joined #ruby
[01:35:51] charliesome: has joined #ruby
[01:36:02] devoldmx: has joined #ruby
[01:40:56] Rakunh0: has joined #ruby
[01:43:06] tkuchiki: has joined #ruby
[01:43:15] lampshades: has joined #ruby
[01:43:58] haraoka: has joined #ruby
[01:44:18] weemsledeux: has joined #ruby
[01:44:20] lampshades: has joined #ruby
[01:44:30] bruno-: has joined #ruby
[01:49:34] rickmasta: has joined #ruby
[01:52:56] Klumben: has joined #ruby
[01:53:35] segfalt: has joined #ruby
[01:56:16] fostertheweb: has joined #ruby
[01:59:44] dfockler: has joined #ruby
[02:00:29] JDiPierro: has joined #ruby
[02:00:44] Ox0dea: Congratulations!
[02:00:50] al2o3-cr: Tell the world
[02:00:57] al2o3-cr: the good news
[02:01:27] phreakocious: has joined #ruby
[02:02:07] yeticry: has joined #ruby
[02:02:20] Exuma: has joined #ruby
[02:02:23] JDiPierro: has joined #ruby
[02:03:10] [ace]: question time! i'm working on a small library i want to interact with from irb.
[02:03:17] chipotle: has joined #ruby
[02:03:19] michael_mbp: has joined #ruby
[02:03:32] al2o3-cr: you presses \r to early
[02:03:33] [ace]: in the module should "def self.blah"+include or "def blah"+extend
[02:03:44] alem0lars: has joined #ruby
[02:04:23] pipework: [ace]: what
[02:04:32] pipework: why not prepend?
[02:04:43] [ace]: i see include "gives access"
[02:04:47] [ace]: and extend copies
[02:04:52] [ace]: ACTION looks up prepend
[02:05:05] al2o3-cr: all about scope
[02:05:10] pipework: [ace]: Surely you understand that no one here could possibly understand what you're talking about based on what you've said so far, right?
[02:05:23] A124: has joined #ruby
[02:05:39] shevy: al2o3-cr I need a code monkey
[02:05:46] sross07: has joined #ruby
[02:05:58] [ace]: pipework: oh sorry. I'm trying
[02:06:07] al2o3-cr: shevy: i'm right here :)
[02:06:08] [ace]: the include/extend is what I do from the irb prompt
[02:06:09] majjoha: has joined #ruby
[02:06:33] pipework: [ace]: Show some code.
[02:06:37] krz: has joined #ruby
[02:07:10] shevy: yes you can include into irb and extend as well
[02:07:23] qiukun_: has joined #ruby
[02:07:26] Asher2: has joined #ruby
[02:07:28] al2o3-cr: shevy: the amount of time you've been doing ruby, you could be teaching matz
[02:07:52] hololeap: has joined #ruby
[02:08:07] colstrom_: has joined #ruby
[02:08:14] eregon_: has joined #ruby
[02:08:20] shevy: if you do 1 minute per day then it'll be only 365 minutes per year
[02:08:34] crdpink2: has joined #ruby
[02:09:12] al2o3-cr: shevy: How is C treating you?
[02:09:58] harryk_: has joined #ruby
[02:10:00] chihhsin_: has joined #ruby
[02:10:01] zack6849_: has joined #ruby
[02:10:02] jamon_: has joined #ruby
[02:10:07] cornerma1: has joined #ruby
[02:10:08] bubuntu_: has joined #ruby
[02:10:09] Derasi: has joined #ruby
[02:10:10] eam_: has joined #ruby
[02:10:11] stnly: has joined #ruby
[02:10:13] lotherk_: has joined #ruby
[02:10:19] QKO_: has joined #ruby
[02:10:20] hostess_: has joined #ruby
[02:10:38] hydrozen: has joined #ruby
[02:10:39] PaulePan1er: has joined #ruby
[02:10:39] verdoc_: has joined #ruby
[02:10:42] devn_: has joined #ruby
[02:10:51] [ace]: al2o3-cr: what do you mean about "all about scope" ?
[02:10:55] shevy: I find C very boring so far :(
[02:10:56] [ace]: pipework: i'm working a tiny gist now
[02:11:12] julieeharshaw: has joined #ruby
[02:11:47] al2o3-cr: >> "afoo".instance_eval { reverse }
[02:11:49] ruboto: al2o3-cr # => "oofa" (https://eval.in/429038)
[02:11:59] Ox0dea: has joined #ruby
[02:12:25] ghr: has joined #ruby
[02:12:38] needhelpwithfunk: has joined #ruby
[02:12:40] pipework: >> "afoo".instance_eval(&:reverse)
[02:12:41] ruboto: pipework # => "oofa" (https://eval.in/429039)
[02:12:44] al2o3-cr: That indicated it's going back into the scope of the class
[02:12:47] needhelpwithfunk: hey folks. I got a funky problem that I need coding help on
[02:12:58] Ox0dea: needhelpwithfunk: Go for it.
[02:13:02] dgutierrez1287: has joined #ruby
[02:13:18] [k-: has joined #ruby
[02:13:27] needhelpwithfunk: imagine a tic tac toe board. if I asked you what the space inside the board was, you could reasonably point out the 9 different blocks of empty space
[02:13:52] Billias_: has joined #ruby
[02:13:54] tris-: has joined #ruby
[02:13:56] linc01n_: has joined #ruby
[02:13:58] sfr^^: has joined #ruby
[02:14:02] scottyme-: has joined #ruby
[02:14:03] Musashi007: has joined #ruby
[02:14:03] needhelpwithfunk: okay, now you know the 9 blocks in the tic tac toe board have white space, check. okay, how do you differentiate the blocks now?
[02:14:04] Papierko-: has joined #ruby
[02:14:09] waxjar_: has joined #ruby
[02:14:12] braincrash: has joined #ruby
[02:14:12] bf4: has joined #ruby
[02:14:14] Olipro-: has joined #ruby
[02:14:17] nomadic: has joined #ruby
[02:14:17] No_One: has joined #ruby
[02:14:19] skakri`: has joined #ruby
[02:14:20] cschneid-: has joined #ruby
[02:14:20] wookiehangover_: has joined #ruby
[02:14:24] shevy: a webchat user :)
[02:14:29] northfurr: has joined #ruby
[02:14:32] Plas: has joined #ruby
[02:14:34] Ox0dea: needhelpwithfunk: You're not explaining yourself very well.
[02:14:37] dymk_: has joined #ruby
[02:14:41] Ox0dea: Each square can have exactly one of three states.
[02:14:44] pontiki: you can do it in a single dimensional array, a two-dimensional array, or L-space with Ook
[02:14:50] bigredbo_: has joined #ruby
[02:14:55] universal: has joined #ruby
[02:14:59] needhelpwithfunk: let me draw a schematic
[02:15:03] Ox0dea: needhelpwithfunk: You could make them ' ', 'X', and 'O', or even use the ternary number system to pack everything in nice and tight.
[02:15:13] iooner-: has joined #ruby
[02:15:15] pontiki: mmmmmmm ternary
[02:15:18] TheMoonMaster_: has joined #ruby
[02:15:20] znz_jp0: has joined #ruby
[02:15:21] jimeh_: has joined #ruby
[02:15:43] al2o3-cr: ternary is goooooddd...
[02:15:53] Ox0dea: needhelpwithfunk: Each square can have state 0, 1, or 2, and you've got nine squares.
[02:15:56] al2o3-cr: but your belts on
[02:15:59] pontiki: pal of mine is designing a tri-state computer :)
[02:16:00] needhelpwithfunk: give me a second. I'll draw thisu p.
[02:16:03] lupine: has joined #ruby
[02:16:09] Ox0dea: needhelpwithfunk: We're all familiar with Tic-Tac-Toe?
[02:16:31] pontiki: maybe it's not tic-tac-toe, but something *like* a tic-tac-toe board
[02:16:51] mesamoo: has joined #ruby
[02:16:53] Xiti: has joined #ruby
[02:18:00] Ox0dea: pontiki: https://en.wikipedia.org/wiki/Setun
[02:18:02] TvL: has joined #ruby
[02:18:06] Seich: has joined #ruby
[02:18:11] epochwolf: has joined #ruby
[02:18:33] pontiki: yeah, that's what she showed me :)
[02:18:48] pontiki: she's designing her own
[02:18:48] devoldmx: has joined #ruby
[02:19:11] [k-: im making a simple grid library \o/
[02:19:45] Ox0dea: Use a Vector.
[02:19:56] mjmac: has joined #ruby
[02:20:06] al2o3-cr: Use an Array or whatever
[02:20:35] [k-: i used an Array
[02:20:59] Ox0dea: Did you make Grid#[] super-convenient?
[02:21:05] mistergibson: has joined #ruby
[02:21:26] [k-: no, i made the implementation opaque
[02:22:10] go|dfish: has joined #ruby
[02:22:20] [k-: you cant have everything in haskell :p
[02:22:30] aaeron: has joined #ruby
[02:22:32] needhelpwithfunk: http://i.imgur.com/A5MVIdc.png
[02:22:34] sparr: has joined #ruby
[02:22:47] needhelpwithfunk: black tiles are walls (collision)
[02:22:57] needhelpwithfunk: tiles with pink dots are accepted as white space.
[02:23:17] needhelpwithfunk: scanning through a basic array can basically give me pink dots as white space. I got that part down
[02:23:43] needhelpwithfunk: the part I need help with is, what do I have to say/program to get the computer to understand that the purply color surrounding the white space needs to be categorized as a block
[02:23:55] needhelpwithfunk: the first nine blocks that have pink dots should be block 1
[02:23:57] DarkBushido: has joined #ruby
[02:23:57] DarkBushido: has joined #ruby
[02:24:07] needhelpwithfunk: one collider over, there's another nine blocks that should be block 2
[02:24:15] nullwarp: has joined #ruby
[02:24:17] Ox0dea: needhelpwithfunk: How many white squares in your image?
[02:24:32] cball: has joined #ruby
[02:24:34] s00pcan: has joined #ruby
[02:24:34] kriskropd: has joined #ruby
[02:24:57] segmond: has joined #ruby
[02:25:04] al2o3-cr: needhelpwithfunk: start simple with something like #=> Array.new(3) { Array.new(3, 32.chr) }
[02:25:14] needhelpwithfunk: 64 black squares (seperator/collidor) , 36 white squares ( pink dot), and 4 blocks
[02:25:26] Ox0dea: >> 36.times.map { |i| i / 9 + 1 } # needhelpwithfunk
[02:25:27] al2o3-cr: then multiple thereafter
[02:25:27] ruboto: Ox0dea # => [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, ...check link for more (https://eval.in/429049)
[02:25:57] ChoiKyuSang: has joined #ruby
[02:26:05] bubbys: has joined #ruby
[02:27:08] qwebirc1010559: has joined #ruby
[02:27:10] qwebirc1010559: okay. battery died.
[02:27:18] qwebirc1010559: what was the solution?
[02:27:33] Papabear: has joined #ruby
[02:27:36] perryh: has joined #ruby
[02:27:55] qwebirc1010559: how do I get the computer to understand to caterogize those pink dots as blocks?
[02:28:21] hfp_: has joined #ruby
[02:28:27] qwebirc1010559: http://i.imgur.com/A5MVIdc.png
[02:28:32] al2o3-cr: variables man, variables
[02:28:39] Keltia_: has joined #ruby
[02:29:13] devoldmx: has joined #ruby
[02:29:28] nlsun_: has joined #ruby
[02:29:31] My_Hearing: has joined #ruby
[02:29:31] al2o3-cr: go the long route round
[02:29:44] webhat_: has joined #ruby
[02:29:48] kgirthofer_: has joined #ruby
[02:29:51] dima_: has joined #ruby
[02:29:59] Ox0dea: qwebirc1010559: https://eval.in/429054
[02:30:06] Ox0dea: The arithmetic here is pretty simple.
[02:30:29] cfloare_: has joined #ruby
[02:30:29] tokik_: has joined #ruby
[02:30:31] Ox0dea: Feel free to make that 36 any multiple of 9.
[02:30:31] rvchangu-: has joined #ruby
[02:30:36] tenseiten: has joined #ruby
[02:30:36] tenseiten: has joined #ruby
[02:30:49] duracrisis: has joined #ruby
[02:31:01] Rakunh0: has joined #ruby
[02:31:01] rikai_: has joined #ruby
[02:31:51] KnownSyntax_: has joined #ruby
[02:32:05] qwebirc1010559: okay. that works for this instance.
[02:32:16] qwebirc1010559: But what if the borders aren't so clean as in the example? what if they're jagged?
[02:32:36] jxie_: has joined #ruby
[02:32:41] al2o3-cr: qwebirc1010559: is this ascii or gui?
[02:32:58] ekleog_: has joined #ruby
[02:33:05] danshultz_: has joined #ruby
[02:33:26] Lildirt|SomeoneT: has joined #ruby
[02:33:32] unsymbol_: has joined #ruby
[02:33:38] al2o3-cr: Well, that piece of code is nion useless for jaggedness
[02:34:04] Ox0dea: He wanted "nigh on".
[02:34:06] integralequation: has joined #ruby
[02:34:14] al2o3-cr: slang dudes
[02:34:30] qwebirc1010559: i'm not familiar with the phrase, sorry.
[02:34:38] qwebirc1010559: so he's saying it is usless?
[02:34:42] Gadgetoid: has joined #ruby
[02:35:16] Ox0dea: Using simple modular arithmetic for irregular geometry isn't of much utility, but you're stringing us along here.
[02:35:17] RazorX: has joined #ruby
[02:35:19] segy: has joined #ruby
[02:35:22] warreng: has joined #ruby
[02:35:27] cgrieger^away: has joined #ruby
[02:35:30] Ox0dea: What was the point of using a Tic-Tac-Toe board as an example if it doesn't actually relate to the problem you want to solve?
[02:35:32] ehth77: has joined #ruby
[02:35:34] jeaye: has joined #ruby
[02:35:36] qwebirc1010559: i'm sorry. i'm not that great of an explainer.
[02:35:41] qwebirc1010559: here's a better example:
[02:35:43] fold1: has joined #ruby
[02:35:48] weemsledeux: has joined #ruby
[02:36:08] cgfbee: has joined #ruby
[02:36:21] qwebirc1010559: imagine the floor plans of a house. there's grooves, indentations in some rooms. some rooms are nice squares. how would you get a program to differentiate the different rooms in the house?
[02:36:26] Platini: has joined #ruby
[02:36:54] qwebirc1010559: http://www.heizoelpreis.co/wp-content/uploads/2015/09/simple-home-floor-plan-and-decor-very-simple-house-floor-plans-with-simple-house-floor-plans.jpg
[02:37:02] veloutin: has joined #ruby
[02:37:11] hydrozen: has joined #ruby
[02:37:35] Ox0dea: You're asking such a high-level question as to make it almost impossible to provide you with anything resembling a meaningful answer.
[02:37:39] qwebirc1010559: the program should be able to understand that the bedroom is block X, great room is block Y
[02:38:26] Musashi007: has joined #ruby
[02:38:32] Ox0dea: You could split your thing into a grid and do something akin to a flood fill.
[02:38:41] M-mistake: has joined #ruby
[02:38:49] russt: has joined #ruby
[02:39:16] qwebirc1010559: that's brilliant. I think this is exactly what I'm looking for.
[02:39:30] Ox0dea: The algorithm is pretty straightforward, and a good use case for recursion to boot.
[02:39:41] qwebirc1010559: wow, that's amazing.
[02:40:13] al2o3-cr: ACTION slow claps
[02:40:17] qwebirc1010559: so in essence, the floodfill would fill each room, then lob that whole room as block 1, and continue throughout the rest of the house
[02:40:25] Ox0dea: That's about the size of it, yep.
[02:40:42] qwebirc1010559: thanks a whole bunch everyone
[02:40:48] Ox0dea: Happy to have been of some help.
[02:41:17] qwebirc1010559: wow, i'm in shock. there's a word to my madness. i'm not crazy after all
[02:41:58] qwebirc1010559: ah, forgot to ask.
[02:42:09] Queeniebee: has joined #ruby
[02:42:11] qwebirc1010559: how intensive is this algorithm to run?
[02:42:36] qwebirc1010559: it's not too crazy on resources, is it?
[02:42:51] al2o3-cr: nah, can't be
[02:43:04] blackjid: has joined #ruby
[02:43:21] qwebirc1010559: alright, thanks once again. i'm off. catch you all later.
[02:44:22] al2o3-cr: Good job that weren't reality
[02:44:41] Ox0dea: That went far better than I anticipated.
[02:44:44] Swappticon: has joined #ruby
[02:45:09] al2o3-cr: ACTION nearly spits out his drink
[02:48:07] al2o3-cr: Yeah, I agree
[02:49:09] Ox0dea: I initially assumed they were trying to do some sort of massively multiplayer Tic-Tac-Toe thing using a single collection.
[02:49:18] jenrzzz: has joined #ruby
[02:49:34] johnhamelink: has joined #ruby
[02:49:46] [k-: i thought he just wanted a grid
[02:50:07] al2o3-cr: Assumptions are dangerous with the (freenode web)
[02:50:12] ChasedSpade: has joined #ruby
[02:51:05] Klumben: has joined #ruby
[02:51:09] cajone1: has joined #ruby
[02:56:57] shevy: multiplayer tic-tac-toe
[02:57:18] Musashi007_: has joined #ruby
[02:57:28] shevy: in one old king's quest game part there was a sub-game embedded
[02:57:52] shevy: hmm or was it space quest
[02:58:10] mozzarella: has joined #ruby
[02:58:49] Thr3d_: has joined #ruby
[02:59:15] Dwarf: has joined #ruby
[03:01:04] Ox0dea: shevy: Tic-Tac-Toe *is* multiplayer?
[03:01:08] sevenseacat: has joined #ruby
[03:01:32] al2o3-cr: Ox0dea: But you might have a voice?
[03:02:19] rickmasta: has joined #ruby
[03:02:21] Gadgetoid: has joined #ruby
[03:02:21] monsieurp: has joined #ruby
[03:02:21] _axx: has joined #ruby
[03:02:21] ccooke: has joined #ruby
[03:02:21] matti: has joined #ruby
[03:02:21] ajaiswal: has joined #ruby
[03:02:42] northfurr: has joined #ruby
[03:03:00] nisstyre: has joined #ruby
[03:03:01] shevy: Ox0dea yeah the same way how chess is. thousand of people play it simultaneously
[03:03:30] Ox0dea: Ah, Tic-Tac-Toe with move consensus, then.
[03:03:37] Ox0dea: Twitch Plays Tic-Tac-Toe.
[03:03:56] shevy: I've been watching twitch solo gamers!
[03:04:38] terrellt: has joined #ruby
[03:04:50] shevy: mostly for the commentary
[03:05:02] tubulife-: has joined #ruby
[03:05:20] shevy: so I was more listening than watching actually
[03:05:45] bweston: has joined #ruby
[03:05:47] Stany: has joined #ruby
[03:06:09] matled-: has joined #ruby
[03:06:10] tenderlo_: has joined #ruby
[03:06:40] Rollabun_: has joined #ruby
[03:06:51] majjoha: has joined #ruby
[03:07:57] justinmcp_: has joined #ruby
[03:07:58] mblagden_: has joined #ruby
[03:08:12] gener1c: has joined #ruby
[03:08:36] Lycanii_: has joined #ruby
[03:09:46] Vile`: has joined #ruby
[03:09:57] Skelz0r: has joined #ruby
[03:10:05] peterhu: has joined #ruby
[03:10:05] ec\: has joined #ruby
[03:10:06] bnagy: has joined #ruby
[03:10:08] braincrash: has joined #ruby
[03:10:09] mblagden: has joined #ruby
[03:10:13] Jamo_: has joined #ruby
[03:10:16] pandaant: has joined #ruby
[03:10:42] bradland: has joined #ruby
[03:12:21] roxtrongo: has joined #ruby
[03:12:48] Kuukunen: has joined #ruby
[03:13:55] csaunders: has joined #ruby
[03:14:14] okdas: has joined #ruby
[03:14:14] okdas: has joined #ruby
[03:14:29] DanKnox: has joined #ruby
[03:14:31] brainslug: has joined #ruby
[03:14:39] danshultz: has joined #ruby
[03:15:14] gnarf: has joined #ruby
[03:15:38] Omni_: has joined #ruby
[03:16:07] Ox0dea: https://github.com/ruby/ruby/commit/7b5d9d7
[03:16:19] Ox0dea: I wish this hadn't happened. :/
[03:16:37] Ox0dea: It would be nice if Proc invocation could be indistinguishable from method calls.
[03:17:24] baroquebobcat: has joined #ruby
[03:17:43] ellisTAA: has joined #ruby
[03:18:14] ellisTAA: has joined #ruby
[03:18:19] sevenseacat: *sees parse.y and runs screaming*
[03:18:39] [k-: this was 9 years ago
[03:19:07] ellisTAA: the liskov substitution principle states ???objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program.??? ??? does this mean that the method i write should not depend on a specific instance of an object but any instance of that class?
[03:19:17] evillution: has joined #ruby
[03:19:23] Ox0dea: [k-: 1.9.3 is kill for a reason.
[03:19:41] shred45: has joined #ruby
[03:19:56] Ox0dea: EllisTAA: LSP is why #each is so damned useful.
[03:20:29] integralequation: has joined #ruby
[03:20:31] ellisTAA: i don???t understand the ??????instances of their subtypes ...'
[03:21:11] ellisTAA: is lsp releated to each because we can use each on hashes and arrays or bc each can be used on any array?
[03:21:20] Ox0dea: The former.
[03:21:34] jidar: has joined #ruby
[03:21:40] existensil: has joined #ruby
[03:21:48] Encapsulation: has joined #ruby
[03:22:04] hydrozen: has joined #ruby
[03:22:20] bmurt: has joined #ruby
[03:22:27] al2o3-cr: Encapsulation: where've you been hiding?
[03:22:46] ellisTAA: so is the LSP saying that a method should work with an object and everything that inherits from it?
[03:23:47] bubbys: has joined #ruby
[03:24:29] nisstyre: has joined #ruby
[03:24:34] Ox0dea: EllisTAA: Yes, but it doesn't preclude the subclasses from providing their own definitions where appropriate.
[03:25:19] ellisTAA: in the case that a subclass provided their own definition of a method would that be an example of Open Closed Principle
[03:25:23] ellisTAA: https://www.wikiwand.com/en/SOLID_(object-oriented_design)
[03:25:28] failshell: has joined #ruby
[03:27:02] Scripore: has joined #ruby
[03:27:40] Ox0dea: Did #ruby just become a study group? :P
[03:29:41] lokulin: has joined #ruby
[03:31:42] opensource_ninja: has joined #ruby
[03:35:02] Kellin: has joined #ruby
[03:35:16] newtonianb: I have a hash I'm trying to write to file but it keeps wrapping it in [{...}] how can I just dumpt out the hash without the enclosed square brackets
[03:35:34] newtonianb: File.open(outputFile, 'w') { |file| file.write(hash.to_json) }
[03:35:40] skarn: has joined #ruby
[03:35:46] sevenseacat: then your hash isnt a hash
[03:35:58] newtonianb: when I puts it it shows it without the square brackets though
[03:36:21] sevenseacat: puts will print out a string representation of it
[03:36:27] sevenseacat: try actually inspecting it, ie. hash.class
[03:37:07] newtonianb: ah ya it says Array
[03:37:24] newtonianb: :/ so I guess I can just do .to_s ?
[03:37:57] sevenseacat: are you supposed to have a hash instead of a narray? fix your code so you do?
[03:38:13] newtonianb: hash = Dir["#{src}/*.json"].map { |f| JSON.parse(File.read(f)) }.flatten
[03:38:26] newtonianb: I'm merging all JSON files in a directory then I want to write hash back out
[03:38:39] Antiarc: has joined #ruby
[03:38:46] sevenseacat: flatten in this case doesnt do what you think it does
[03:39:11] shevy: Newtonianb you have a hash in an array there
[03:40:16] newtonianb: It seems like it yup, I don't want the array though, how do I dump the hash I just index first element of the array? Its starting to feel I'm not doing this json merge properly?
[03:40:30] [k-: &ri Array#flatten Hash#merge
[03:40:31] `derpy: http://www.rubydoc.info/stdlib/core/Array#flatten-instance_method, http://www.rubydoc.info/stdlib/core/Hash#merge-instance_method
[03:40:32] shevy: you would do it properly if you'd have a hash right?
[03:40:39] sevenseacat: Newtonianb: you're not merging anything
[03:40:54] shevy: so if your hash is the first element of your array, reference to it, then you have your hash
[03:41:47] newtonianb: All my json files being combined are just a flat key:value, I'm trying to combine them all into one json
[03:42:18] sevenseacat: nothing is being combined anywhere
[03:42:46] newtonianb: wait really? I though it was, let me double check
[03:44:06] newtonianb: ah ya right now it's just appending each json into an array of hash
[03:44:11] codecop: has joined #ruby
[03:45:16] bruno-: has joined #ruby
[03:45:42] newtonianb: Should I tweak my map loop or run something like this at the end a.reduce Hash.new, :merge
[03:46:34] shevy: what is that
[03:47:01] newtonianb: I just found out it seems to do what I want on my array of hashes combines it to one hash
[03:48:11] Ox0dea: Newtonianb: You can just say `a.reduce(:merge)`.
[03:48:28] phutchins: has joined #ruby
[03:48:57] newtonianb: awesome thanks! now I got a line liner for this all Dir["#{src}/*.json"].map { |f| JSON.parse(File.read(f)) }.flatten.reduce(:merge)
[03:49:02] Ox0dea: Yay, one-liners!
[03:49:16] newtonianb: thank you @sevenseacat @Ox0dea @shevy
[03:49:27] Ox0dea: Newtonianb: #flat_map > #map + #flatten.
[03:49:47] Ox0dea: Yay, Ruby!
[03:53:24] gix: has joined #ruby
[03:53:45] iamninja: has joined #ruby
[03:56:50] houhoulis: has joined #ruby
[03:57:10] mrityunjay: has joined #ruby
[03:57:21] auzty: has joined #ruby
[03:57:58] auzty: has joined #ruby
[03:59:07] auzty: has joined #ruby
[03:59:58] Oog: has joined #ruby
[04:02:22] auzty: has joined #ruby
[04:02:32] MasterPiece: has joined #ruby
[04:04:03] newtonianb: Is there a way to hook on to rube execution so I can display in my console some automatic logger saying 'running method xxx' without polluting my code with puts everywhere
[04:04:13] newtonianb: something along the lines of __call in php
[04:04:26] i: has joined #ruby
[04:05:08] Radar: why do you want to do that?
[04:05:19] [k-: set_trace_func
[04:05:26] catcher: has joined #ruby
[04:05:29] Ox0dea: &ri TracePoint
[04:05:30] `derpy: http://www.rubydoc.info/stdlib/core/TracePoint
[04:06:29] catcher: hey guys, need to turn this string "key1: val1, key2: val2" into hash { key1: "val1", key2: "val2" }
[04:06:37] catcher: recommendations?
[04:07:07] gambl0re: has joined #ruby
[04:07:36] majjoha: has joined #ruby
[04:08:27] Ox0dea: Newtonianb: https://eval.in/429091
[04:08:36] Ox0dea: catcher: How did you end up in this situation?
[04:09:11] newtonianb: perfect just what I needed thank you @Ox0dea
[04:09:27] catcher: Ox0dea: mapping third-party data
[04:09:49] Ox0dea: catcher: Do you trust this third party?
[04:10:06] catcher: Ox0dea: yes, it'll be consistent
[04:10:34] Ox0dea: catcher: Is `val1` a string without quotes, then?
[04:10:52] catcher: Ox0dea: correct, single string
[04:10:56] catcher: w/ no quotes
[04:11:20] segfalt: has joined #ruby
[04:13:10] mary5030: has joined #ruby
[04:13:44] Ox0dea: catcher: Well, I would've suggested wrapping it in curly braces and using #eval, but that there are no quotes gums up the works a bit.
[04:15:34] howdoi: has joined #ruby
[04:15:43] Ox0dea: >> 'key1: val1, key2: val2'.split(', ').map { |kv| kv.split(': ') }.to_h # catcher
[04:15:44] ruboto: Ox0dea # => {"key1"=>"val1", "key2"=>"val2"} (https://eval.in/429099)
[04:16:22] Ox0dea: I don't see why that shouldn't suffice if the data is consistently formatted.
[04:16:58] freerobby: has joined #ruby
[04:17:03] hololeap: has joined #ruby
[04:17:10] fedexo: has joined #ruby
[04:17:55] catcher: Ox0dea: yep, looks like that will indeed cover it, thanks!
[04:18:14] Ox0dea: Sure thing.
[04:18:56] Oog_: has joined #ruby
[04:20:16] tkuchiki_: has joined #ruby
[04:20:23] workmad3: has joined #ruby
[04:23:52] tkuchiki: has joined #ruby
[04:24:13] bootstrappm: has joined #ruby
[04:25:00] moeabdol: has joined #ruby
[04:25:59] Rurik: has joined #ruby
[04:29:52] Ropeney: has joined #ruby
[04:30:49] lolmaus: has joined #ruby
[04:31:18] devbug: has joined #ruby
[04:31:31] j416: has joined #ruby
[04:32:27] romero: has joined #ruby
[04:33:51] mary5030: has joined #ruby
[04:34:04] oddalot: has joined #ruby
[04:37:28] weemsledeux: has joined #ruby
[04:37:38] ht__: has joined #ruby
[04:39:37] banjara: has joined #ruby
[04:40:00] dgutierrez1287: has joined #ruby
[04:40:27] majjoha: has joined #ruby
[04:41:03] theery: has joined #ruby
[04:44:44] sevenseacat: has joined #ruby
[04:44:48] Swappticon: has joined #ruby
[04:45:57] darkf: has joined #ruby
[04:48:53] Oog_: has joined #ruby
[04:48:54] eggoez: has joined #ruby
[04:49:52] arescorpio: has joined #ruby
[04:49:59] iamninja: has joined #ruby
[04:50:33] vdamewood: has joined #ruby
[04:51:55] weemsledeux: has joined #ruby
[04:51:59] _liquid_: has joined #ruby
[04:53:05] UtkarshRay: has joined #ruby
[04:53:10] bootstrappm: has joined #ruby
[04:54:47] tmtwd: has joined #ruby
[04:56:52] KnownSyntax: has joined #ruby
[04:56:52] KnownSyntax: has joined #ruby
[05:00:40] Oog: has joined #ruby
[05:00:42] flughafen: has joined #ruby
[05:02:15] chipotle: has joined #ruby
[05:02:58] Spami: has joined #ruby
[05:04:10] northfurr: has joined #ruby
[05:04:58] tkuchiki: has joined #ruby
[05:05:20] sevenseacat: has joined #ruby
[05:05:21] BraddPitt: has joined #ruby
[05:06:01] amoeba: has joined #ruby
[05:06:18] scottstamp: has joined #ruby
[05:06:18] bootstrappm: has joined #ruby
[05:07:10] pyon: has joined #ruby
[05:08:16] pipework: has joined #ruby
[05:09:30] Voxxit: has joined #ruby
[05:09:36] jordanm: has joined #ruby
[05:11:17] emba: has joined #ruby
[05:12:12] Oog_: has joined #ruby
[05:13:30] riotjones: has joined #ruby
[05:14:10] kgirthofer: has joined #ruby
[05:14:24] CHVNX: has joined #ruby
[05:14:44] zenguy_pc: has joined #ruby
[05:15:12] yardenbar: has joined #ruby
[05:15:24] opensource_ninja: has joined #ruby
[05:15:28] Kharma: has joined #ruby
[05:15:32] mrsolow: has joined #ruby
[05:18:16] TheWhip_: has joined #ruby
[05:19:10] psye: has joined #ruby
[05:19:59] khebbie: has joined #ruby
[05:20:15] psye: has joined #ruby
[05:20:20] f4cl3y: has joined #ruby
[05:21:40] n008f4g_: has joined #ruby
[05:22:13] newtonianb: newStr = str.sub! '...', '.' How can I NOT override str here and just get the returned value?
[05:22:42] flughafen: hey shevy sevenseacat certainty
[05:23:20] roxtrongo: has joined #ruby
[05:23:44] duncannz: has joined #ruby
[05:23:57] Aearnus: has joined #ruby
[05:23:58] dhjondoh: has joined #ruby
[05:24:41] Aearnus: I want to find a substring by specific text that surrounds it, how would I do that?
[05:24:53] Aearnus: Could I use regex?
[05:25:04] Aearnus: Alright, I guess that answers that haha
[05:25:06] bigredboots: has joined #ruby
[05:25:32] Oog_: has joined #ruby
[05:25:43] Mendenhall: has joined #ruby
[05:25:52] baweaver: expected input and output?
[05:26:24] failshell: has joined #ruby
[05:26:46] Ox0dea: Newtonianb: For really serious, though?
[05:26:51] Aearnus: I think string.scan is exactly what I need
[05:26:52] baweaver: >> /nope(<?wins>.+)nope/.match('nope ohaithar nope')
[05:26:53] ruboto: baweaver # => nil (https://eval.in/429111)
[05:27:04] tejasmanohar: has joined #ruby
[05:27:06] Ox0dea: Aearnus: You want to find multiple matches, then?
[05:27:19] Aearnus: no, I only need one
[05:27:24] Ox0dea: Then you don't want #scan.
[05:28:01] Ox0dea: >> 'footargetbar'[/foo(.+)bar/, 1] # Aearnus
[05:28:02] ruboto: Ox0dea # => "target" (https://eval.in/429112)
[05:28:21] Aearnus: Ox0dea: whaaaaat, you can do that?
[05:28:27] Aearnus: That's awesome!
[05:28:27] Ox0dea: Nah, I lied.
[05:28:58] baweaver: regex capture groups would be an interesting read for later as well.
[05:29:14] Aearnus: Definitely, I need to read into regex more
[05:33:25] zlogan: has joined #ruby
[05:33:47] Aearnus: Ox0dea: That works perfectly, thanks
[05:33:52] OrbitalKitten: has joined #ruby
[05:34:02] Ox0dea: Aearnus: Happy to help.
[05:35:24] aganov: has joined #ruby
[05:35:34] [k-: Newtonianb: String#sub
[05:37:09] Ox0dea: >> String.instance_methods.include?(:yellow_sub)
[05:37:10] ruboto: Ox0dea # => false (https://eval.in/429121)
[05:37:14] Ox0dea: Ruby is anti-Beatles?
[05:37:30] khebbie: has joined #ruby
[05:39:17] yeticry: has joined #ruby
[05:40:11] devbug_: has joined #ruby
[05:42:13] tagrudev: has joined #ruby
[05:42:49] michael_mbp: has joined #ruby
[05:43:47] codenapper: has joined #ruby
[05:44:28] mary5030: has joined #ruby
[05:45:08] stardiviner: has joined #ruby
[05:45:52] baweaver: >>class String;def yellow_sub(*args, &block);"we all live in a yellow #{sub(*args, &block)}marine" end;end; 'foo'.yellow_sub(/oo/, 'bar')
[05:45:53] ruboto: baweaver # => "we all live in a yellow fbarmarine" (https://eval.in/429122)
[05:46:00] bruno-: has joined #ruby
[05:47:44] baweaver: https://www.youtube.com/watch?v=krIus0i9xn8
[05:50:24] Oog: has joined #ruby
[05:50:39] baweaver: has left #ruby: ()
[05:50:39] baweaver: has joined #ruby
[05:53:05] morenoh153: has joined #ruby
[05:53:13] Ox0dea: baweaver: Needs more "\e[33;1m", methinks.
[05:53:35] baweaver: morenoh153: alo
[05:53:54] Ox0dea: morenoh153: Ahoy!
[05:55:06] Alina-malina: has joined #ruby
[05:56:20] nux443: has joined #ruby
[05:56:33] baweaver: Are we doing pirates now?
[05:56:55] Ox0dea: baweaver: "Hello" is actually pretty recent.
[05:57:08] Ox0dea: The inventor of the telephone wanted us to answer with "Ahoy".
[05:57:28] weemsledeux: has joined #ruby
[05:57:32] djbkd: has joined #ruby
[05:57:36] baweaver: Hm, that rings a Bell
[05:58:52] tkuchiki: has joined #ruby
[05:59:16] Ox0dea: Fun fact: Instagram's name is an homage to AGB.
[06:00:06] Ox0dea: Learned that in a /r/shittyaskhistory post.
[06:02:23] AlexAltea: has joined #ruby
[06:03:25] baweaver: ironic, no?
[06:05:32] evillution: has joined #ruby
[06:05:40] dionysus69: has joined #ruby
[06:06:27] NeverDie: has joined #ruby
[06:08:45] khebbie: has joined #ruby
[06:09:13] workmad3: has joined #ruby
[06:10:55] acke: has joined #ruby
[06:22:50] ChasedSpade: has joined #ruby
[06:23:15] Klumben: has joined #ruby
[06:23:24] mblagden: has joined #ruby
[06:24:19] michael_mbp: has joined #ruby
[06:25:24] alem0lars: has joined #ruby
[06:25:27] bmn: has joined #ruby
[06:25:55] riotjones: has joined #ruby
[06:26:37] swgillespie: has joined #ruby
[06:28:37] bitfukr: has joined #ruby
[06:29:00] krz: has joined #ruby
[06:29:26] Oog: has joined #ruby
[06:33:49] michael_mbp: has joined #ruby
[06:34:46] firstdayonthejob: has joined #ruby
[06:35:13] tkuchiki: has joined #ruby
[06:36:16] bigkevmcd: has joined #ruby
[06:39:41] arup_r: has joined #ruby
[06:41:39] eGGsha: has joined #ruby
[06:42:26] charliesome: has joined #ruby
[06:42:36] astrobun_: has joined #ruby
[06:45:40] Salehi: has joined #ruby
[06:46:19] mrityunjay: has joined #ruby
[06:46:52] skullcrasher: has joined #ruby
[06:47:45] astrobun_: has joined #ruby
[06:48:20] i: has joined #ruby
[06:54:39] ferhaty: has joined #ruby
[06:54:39] Guest69233: has joined #ruby
[06:56:59] tmtwd: has joined #ruby
[06:58:24] roxtrongo: has joined #ruby
[06:59:24] ledestin: has joined #ruby
[06:59:48] OrbitalKitten: has joined #ruby
[07:00:03] eightfold: has joined #ruby
[07:00:12] Strygwyr: has joined #ruby
[07:00:23] ndrei: has joined #ruby
[07:01:27] majjoha: has joined #ruby
[07:02:06] mary5030: has joined #ruby
[07:02:20] tvw: has joined #ruby
[07:03:01] greenarrow: has joined #ruby
[07:03:12] stardiviner: has joined #ruby
[07:04:00] hololeap: has joined #ruby
[07:06:59] dgutierrez1287: has joined #ruby
[07:07:04] andikr: has joined #ruby
[07:07:20] vmatiyko: has joined #ruby
[07:07:34] Strygwyr: has left #ruby: ()
[07:14:18] hmsimha_: has joined #ruby
[07:14:41] ivanf: has joined #ruby
[07:19:44] terlar: has joined #ruby
[07:21:23] ruurd: has joined #ruby
[07:24:29] bazbing80: has joined #ruby
[07:25:00] sundhell: has joined #ruby
[07:31:57] devoldmx: has joined #ruby
[07:35:02] towski_: has joined #ruby
[07:35:23] joonty: has joined #ruby
[07:43:48] Hounddog: has joined #ruby
[07:44:52] skullcrasher: has joined #ruby
[07:45:23] Spami: has joined #ruby
[07:46:00] gamov: has joined #ruby
[07:46:06] skullcrasher_: has joined #ruby
[07:46:36] bruno-: has joined #ruby
[07:46:49] vondruch: has joined #ruby
[07:47:57] wpp: has joined #ruby
[07:48:58] Hounddog: has joined #ruby
[07:51:44] joonty: has joined #ruby
[07:52:09] exadeci: has joined #ruby
[07:52:17] nitrix: has joined #ruby
[07:58:26] DeweyD: has joined #ruby
[07:59:44] lsmola: has joined #ruby
[08:00:05] robbyoconnor: has joined #ruby
[08:02:00] Pupeno: has joined #ruby
[08:02:29] timonv: has joined #ruby
[08:03:46] khebbie_: has joined #ruby
[08:04:05] leat: has joined #ruby
[08:04:14] dhjondoh: has joined #ruby
[08:04:37] robbyoconnor: has joined #ruby
[08:04:52] eightfold: has joined #ruby
[08:05:07] arup_r: has joined #ruby
[08:08:14] ruurd: has joined #ruby
[08:08:52] shevy: say if you include 10 different gems
[08:09:03] shevy: and you suspect that one of them slows down things... what would be a convenient way to test that?
[08:10:42] webhat: has joined #ruby
[08:12:29] ghr: has joined #ruby
[08:13:58] tonios57: has joined #ruby
[08:16:24] sagittarian: has joined #ruby
[08:17:13] face: has joined #ruby
[08:17:54] Ox0dea: shevy: gems.each { |gem| s = Time.now; require gem; puts "#{gem} took #{Time.now - s}s to load." }
[08:17:58] yeticry: has joined #ruby
[08:18:12] Ox0dea: The culprit ought to stand out.
[08:20:01] Sou|cutter: has joined #ruby
[08:24:41] zacts: has joined #ruby
[08:25:05] apeiros: ACTION had a gem once which essentially did Dir.glob("/**/*.rb") 
[08:25:54] shevy: 1.3635e-05s
[08:26:02] spence6245_: has joined #ruby
[08:26:42] bmalum: has joined #ruby
[08:27:29] [k-: 0.00001365s
[08:27:43] marr: has joined #ruby
[08:27:44] [k-: i missed a three there
[08:28:05] shevy: half the display has those 0.000 and the other half those e-
[08:28:54] [k-: the more zeros the better
[08:29:15] [k-: the higher e- the better
[08:29:28] krisquigley: has joined #ruby
[08:29:33] shevy: I have almost found the snail
[08:30:02] spence6245_: any one up for some code katas or paired programming?
[08:30:10] shevy: 0.047573305000000s hmm the gist gem
[08:30:50] shevy: oh... and one of my old gems
[08:30:59] sdfgsdfg: has joined #ruby
[08:33:32] fxn: has joined #ruby
[08:34:13] jgt: has joined #ruby
[08:34:25] yfeldblum: has joined #ruby
[08:35:46] shevy: the larger the gem, the more files it has
[08:35:50] shevy: the longer it takes to load it :)
[08:36:07] Ox0dea: That is not an invariant.
[08:36:46] chthon: has joined #ruby
[08:37:13] [k-: your face is an invariant
[08:37:25] shevy: strangely enough the gist gem loads quite slowly too
[08:38:02] shevy: https://github.com/defunkt/gist
[08:38:37] shevy: https://github.com/defunkt/gist/blob/master/lib/gist.rb
[08:38:43] shevy: hmm perhaps because it loads other stuff
[08:39:34] shevy: cool... I even load the same gem twice...
[08:40:18] shevy: well that was fun; I optimized about +0.003 seconds... I think I spent more time than gaining from this!
[08:41:32] jgt: has joined #ruby
[08:42:14] Ox0dea: shevy: How did you load the same gem twice?
[08:42:31] Ox0dea: >> require 'json'; require 'json'
[08:42:33] ruboto: Ox0dea # => false (https://eval.in/429179)
[08:42:50] mike___1234: has joined #ruby
[08:43:58] Rurik: has joined #ruby
[08:44:14] Oog: has joined #ruby
[08:44:19] khebbie: has joined #ruby
[08:44:35] wildlander: has joined #ruby
[08:44:56] yeticry: has joined #ruby
[08:48:05] Motoservo: has joined #ruby
[08:48:35] anisha: has joined #ruby
[08:50:26] yeticry: has joined #ruby
[08:51:35] last_staff: has joined #ruby
[08:51:57] meph: has joined #ruby
[08:52:22] Hrorek: has joined #ruby
[08:53:03] shevy: Ox0dea I had a big array of gems to load which had one duplicate
[08:53:19] apeiros: yard doesn't happen to process inline dot graphs somehow?
[08:53:24] Ox0dea: Sure, but that shouldn't've mattered.
[08:53:41] Ox0dea: shevy: Kernel#require does deduplication.
[08:53:41] Igorshp: has joined #ruby
[08:53:45] TheHodge: has joined #ruby
[08:53:48] evillution: has joined #ruby
[08:54:21] apeiros: shevy: that only means you required it twice. it will only load once, though.
[08:54:37] apeiros: you can require as often as you want. if it is already required, it becomes a no-op.
[08:55:03] dumdedum: has joined #ruby
[08:56:09] dhtns: has left #ruby: ("Part")
[08:57:36] Siyfion: has joined #ruby
[08:57:38] araujo: has joined #ruby
[08:59:23] Guest30083: has joined #ruby
[08:59:32] roxtrongo: has joined #ruby
[09:00:51] leafybasil: has joined #ruby
[09:01:24] qwertme: has joined #ruby
[09:01:24] jakzn: has joined #ruby
[09:02:02] mprelude: has joined #ruby
[09:02:09] qwertme: has joined #ruby
[09:02:24] platzhirsch: has joined #ruby
[09:04:42] emba: has joined #ruby
[09:06:52] araujo: has joined #ruby
[09:06:52] araujo: has joined #ruby
[09:07:06] startupality: has joined #ruby
[09:09:26] DoubleMalt: has joined #ruby
[09:10:25] solars: has joined #ruby
[09:12:10] khebbie_: has joined #ruby
[09:12:35] leat: has joined #ruby
[09:12:52] Rollabunna: has joined #ruby
[09:14:30] astrobun_: has joined #ruby
[09:15:03] fella5s: has joined #ruby
[09:15:19] tubuliferous: has joined #ruby
[09:18:15] leafybasil: has joined #ruby
[09:18:16] leat: has joined #ruby
[09:19:39] AlexAltea: has joined #ruby
[09:20:07] khebbie: has joined #ruby
[09:26:24] Rurik: has joined #ruby
[09:26:57] ereslibre: has joined #ruby
[09:28:30] leat: has joined #ruby
[09:30:34] faces: has joined #ruby
[09:30:57] arup_r: has joined #ruby
[09:32:42] devoldmx: has joined #ruby
[09:32:45] jokester: has joined #ruby
[09:33:52] hololeap: has joined #ruby
[09:35:19] Ox0dea: Tell me why the technological singularity won't bother to fix its own buffer overflows.
[09:35:29] arup_r: has joined #ruby
[09:37:31] emba: has joined #ruby
[09:37:43] iamninja: has joined #ruby
[09:37:45] Blaguvest: has joined #ruby
[09:39:40] emba: has joined #ruby
[09:40:19] [k-: tell me why you have gotten into this tell me why phase
[09:41:11] solocshaw: has joined #ruby
[09:42:07] Pumukel: has joined #ruby
[09:42:56] otherj: has joined #ruby
[09:44:30] Nowaker: has joined #ruby
[09:44:48] Mendenhall: has joined #ruby
[09:48:01] kramsee: has joined #ruby
[09:49:50] kramsee: has joined #ruby
[09:50:55] kramsee: has joined #ruby
[09:52:31] Rurik: has joined #ruby
[09:52:32] shredding: has joined #ruby
[09:55:16] startupality_: has joined #ruby
[09:57:27] patrick_star: has joined #ruby
[09:57:29] bruno-: has joined #ruby
[09:59:24] khebbie: has joined #ruby
[09:59:26] timonv: has joined #ruby
[10:02:02] greenarrow: has joined #ruby
[10:02:46] mary5030: has joined #ruby
[10:02:54] bruno-: has joined #ruby
[10:04:36] astrobun_: has joined #ruby
[10:07:49] Igorshp: has joined #ruby
[10:08:13] bruno-: has joined #ruby
[10:12:03] porfa: has joined #ruby
[10:12:47] yorickpeterse: yay race conditions
[10:13:04] Stalkr_: has joined #ruby
[10:13:23] claw: has joined #ruby
[10:14:26] Stalkr^: has joined #ruby
[10:16:03] porfa: hello's :)
[10:17:29] FernandoBasso: has joined #ruby
[10:17:50] dhjondoh: has joined #ruby
[10:21:08] emba: has joined #ruby
[10:22:29] [k-: http://t.co/XFxe3ol4aU
[10:22:41] [k-: hi vhesy
[10:22:42] segfalt: has joined #ruby
[10:22:49] [k-: hm, cheesy
[10:23:08] skade: has joined #ruby
[10:23:38] dhjondoh: has joined #ruby
[10:24:23] shevy: this is a mickey mouse picture right?
[10:24:40] shevy: or it is a skater
[10:25:29] [k-: ACTION leaves shevy to think about it alone
[10:25:31] drbrain: has joined #ruby
[10:25:54] bruno-_: has joined #ruby
[10:27:22] sevenseacat: has joined #ruby
[10:28:34] doddok: has joined #ruby
[10:31:09] skade: has joined #ruby
[10:31:18] bruno-: has joined #ruby
[10:33:28] devoldmx: has joined #ruby
[10:36:39] bruno-: has joined #ruby
[10:37:00] workmad3: has joined #ruby
[10:37:31] shevy: .end_with? == '&'
[10:41:07] AxonetBE: has joined #ruby
[10:41:18] [k-: .end_with? ?&
[10:41:30] [k-: returns a bool
[10:41:50] AxonetBE: I have a router who can receive sms, now I want to thread them via a ruby application but I was wondering how to get sms list as fast as possible when there is a new sms arriving.
[10:42:05] bruno-: has joined #ruby
[10:42:15] jeadre: has joined #ruby
[10:42:26] AxonetBE: Do I have to cronjob? The bad thing about cronjobs is that the smallest interval is only 1 second
[10:43:40] workmad3: has joined #ruby
[10:45:43] platzhirsch: has joined #ruby
[10:46:05] otherj: has joined #ruby
[10:47:32] bruno-: has joined #ruby
[10:50:50] stamina: has joined #ruby
[10:52:34] bruno-: has joined #ruby
[10:52:35] yu1in: has joined #ruby
[10:54:00] mclee_: has joined #ruby
[10:55:03] bonhoeffer_: has joined #ruby
[10:56:23] konsolebox: has joined #ruby
[10:56:40] Trynemjoel: has joined #ruby
[10:56:54] astrobun_: has joined #ruby
[10:57:59] bruno-: has joined #ruby
[10:58:41] bradland: has joined #ruby
[10:58:48] ndrei: has joined #ruby
[11:00:17] roxtrongo: has joined #ruby
[11:01:28] rocknrollMarc: has joined #ruby
[11:02:06] arup_r: has joined #ruby
[11:02:32] bweston92: has joined #ruby
[11:02:59] Brando753: has joined #ruby
[11:03:22] bruno-: has joined #ruby
[11:05:07] porfa: has joined #ruby
[11:13:45] Rollabunna: has joined #ruby
[11:13:49] bruno-: has joined #ruby
[11:13:59] platzhirsch: has joined #ruby
[11:15:02] codecop: has joined #ruby
[11:17:07] darix: AxonetBE: it depends on the tool receiving the sms
[11:17:13] darix: if it can call your ruby script directly
[11:17:24] darix: or write the sms to a pipe/socket where the ruby script is listening
[11:18:23] k3asd`: has joined #ruby
[11:19:11] bruno-: has joined #ruby
[11:19:48] face: has joined #ruby
[11:20:14] eightfold: has joined #ruby
[11:20:19] AxonetBE: darix: I is just a cgi bin script that I can call an get a list of the sms messages, I have to parse them after
[11:21:12] darix: so cronjob it is
[11:22:37] dhjondoh: has joined #ruby
[11:27:12] yorickpeterse: Today I got fucked over by eval + proc + Binding
[11:27:14] yorickpeterse: or so it seems
[11:27:40] yorickpeterse: yay for Ruby not having the ability to fully isolate procs from their enclosing scopes
[11:27:49] yorickpeterse: other than defining a dummy class and using its binding
[11:29:14] jgt: has joined #ruby
[11:29:28] bruno-: has joined #ruby
[11:31:26] eGGsha: has joined #ruby
[11:31:26] [k-: example?
[11:32:10] astrobun_: has joined #ruby
[11:32:14] yorickpeterse: I'll have a commit in a few minutes
[11:32:17] emba: has joined #ruby
[11:32:25] yu1in: has left #ruby: ()
[11:33:33] ZenYung: has joined #ruby
[11:34:26] ZenYung: Is it possible to invoke a method on an object dynamically based on a string?
[11:34:36] chthon: has joined #ruby
[11:34:36] claw: has joined #ruby
[11:34:47] yorickpeterse: ZenYung: look into the "send" / "__send__" method
[11:34:59] yorickpeterse: &ri Object#send
[11:34:59] `derpy: http://www.rubydoc.info/stdlib/core/Object#send-instance_method
[11:35:14] [k-: no, look at the public_send method
[11:35:20] [k-: public_send!!!
[11:35:22] ZenYung: ah, perfect.. thanks a lot!
[11:35:33] [k-: public_send!!!
[11:36:20] yorickpeterse: public_send would be better, but sometimes one does actually want to call a private method
[11:36:27] yorickpeterse: even considering all the risks that might bring
[11:36:38] ZenYung: What's the risk of calling a private method?
[11:36:47] [k-_: has joined #ruby
[11:37:05] yorickpeterse: It could be removed at some point
[11:37:15] yorickpeterse: since it's a private method it's usually not considered part of the public/stable API
[11:37:24] ZenYung: I am not writing an API
[11:37:24] yorickpeterse: Thus an author might decide to rename it, remove it, etc, without telling users
[11:37:34] [k-: and, violating encapsulation is bad
[11:37:37] yorickpeterse: API is just a term, it's not limited to web APIs
[11:38:05] yorickpeterse: Now to see how the hell I'm going to test this race condition
[11:38:43] [k-: spin up a million instances to test it
[11:39:21] yorickpeterse: [k-: Yeah euh that's not how race conditions work
[11:39:24] shevy: is .send or .public_send faster?
[11:39:34] yorickpeterse: It will reproduce it, since I can reproduce it using 4 threads, but it's not a reliable manner
[11:40:31] Asher: has joined #ruby
[11:40:32] sdothum: has joined #ruby
[11:41:41] ZenYung: yorickpeterse: maybe you can do something with injecting sleep at the right point
[11:42:18] yorickpeterse: That doesn't make it more reliable, it only introduces more factors
[11:42:48] dorei: has joined #ruby
[11:42:49] yorickpeterse: e.g. it might as well only occur when the stars are aligned
[11:43:03] yorickpeterse: If that were actually the case the only way to test it would be to actually align the stars
[11:43:05] ZenYung: I would say find a number of threads which increases the chance of the race condition to show up to about 99%, but I don't think it's a good unit test if it's based on probability
[11:43:23] yorickpeterse: Sure, it's a way of testing if it's there
[11:43:28] yorickpeterse: But you can't use it to prove/disprove anything
[11:43:32] yorickpeterse: Since it's based on probability, not fact
[11:43:34] Asher: has joined #ruby
[11:43:40] yorickpeterse: I know why it happens, but translating that to a test is really hard
[11:43:41] Rurik: has joined #ruby
[11:43:46] [k-_: * the expert shares his wisdom *
[11:43:54] yorickpeterse: A test that doesn't just bombard the code with threads that is
[11:44:20] devoldmx: has joined #ruby
[11:44:21] ZenYung: You could do some theoritically stuff and prove it with something like Hoare calculus
[11:44:57] yorickpeterse: Hm, I _can_ grab a Binding from a Proc
[11:45:04] ZenYung: Thread interleavings can be manupulated, no?
[11:45:04] yorickpeterse: so I can at least assert it's not re-using the binding from the method that generated it
[11:46:17] ponga: has joined #ruby
[11:46:48] yorickpeterse: Hm interesting, a Proc always seems to have its own Binding
[11:46:56] yorickpeterse: it probably inherits it, instead of taking it over directly
[11:47:23] tkuchiki: has joined #ruby
[11:47:56] ZenYung: yorickpeterse: Can't you use your hideous XML parser to unit test the race condition?
[11:48:08] havenwood: has joined #ruby
[11:48:16] Gnomethrower: has joined #ruby
[11:48:16] yorickpeterse: It's not that bad
[11:48:25] yorickpeterse: also, this _is_ a race condition in said library :P
[11:49:25] ZenYung: Well okay then
[11:49:54] yorickpeterse: I'll explain all this in my commit in a few minutes :P
[11:50:22] yorickpeterse: Ruby 2.2 defines Binding#receiver
[11:50:27] yorickpeterse: but Rubinius only defines Binding#self
[11:50:42] timonv: has joined #ruby
[11:50:46] iamninja: has joined #ruby
[11:50:48] ZenYung: Rubinious?
[11:50:53] ZenYung: You got a to be kidding me
[11:51:01] yorickpeterse: and jruby 1.7 defines neither
[11:51:11] yorickpeterse: I don't get why people use "Rubinious"
[11:51:22] ZenYung: Aren't that the MRI is dead people?
[11:51:39] yorickpeterse: Not that I know of
[11:52:04] khebbie: has joined #ruby
[11:52:43] yorickpeterse: Hm, JRuby 9k at least has Binding#receiver
[11:52:46] ZenYung: http://rubini.us/2013/10/15/introducing-rubinius-x/
[11:52:48] voker57: has joined #ruby
[11:53:18] yorickpeterse: Nothing in there says "MRI is dead"
[11:53:22] yorickpeterse: or "MRI is dead people"
[11:53:33] shevy: "Ruby is a dying language."
[11:53:51] ZenYung: These guys are just dangerous
[11:54:01] yorickpeterse: shevy: which is a very different claim
[11:54:03] ZenYung: I find it very questionable that you support them, but okay then
[11:54:10] yorickpeterse: and considering all the people moving away, I can't help but agree
[11:54:21] ZenYung: Moving where
[11:54:29] yorickpeterse: Node.js, Go, soon Rust, etc
[11:54:33] apeiros: yorickpeterse: what's up with people attacking you out of nowhere? o0
[11:54:36] ZenYung: Node.js? hah
[11:54:40] yorickpeterse: apeiros: people don't like the truth I suppose
[11:54:41] shevy: javascript is gaining popularity everywhere
[11:54:54] yorickpeterse: apeiros: also I'm used to it, so w/e
[11:54:55] ZenYung: Not everyone can drink the KoolAid
[11:54:57] Oka: has joined #ruby
[11:55:51] blueOxigen: has joined #ruby
[11:56:36] phutchins: has joined #ruby
[11:56:43] ZenYung: I do believe JS is gaining popularity, but still mainly on the front-end
[11:56:46] yorickpeterse: if it's anything we drank it certainly isn't koolaid
[11:57:06] ZenYung: with everyone being hipstery on React.JS, Angular, etc
[11:57:22] ZenYung: don't worry, just teasing
[11:57:36] [k-_: Haskell is where the party's at
[11:57:55] ZenYung: What, you're a delicate flower. Can't be rough on you
[11:57:58] yorickpeterse: [k-_: https://twitter.com/jneen_/status/640644137599942656
[11:58:02] shevy: ZenYung it'll be only a matter of time, see there http://redmonk.com/dberkholz/2014/05/02/github-language-trends-and-the-fragmenting-landscape/
[11:58:39] ZenYung: Oh dear god
[12:00:29] Azure|dc: has joined #ruby
[12:00:31] dionysus69: has joined #ruby
[12:01:24] ndrei: has joined #ruby
[12:02:27] shevy: we have one top ten repository there
[12:02:30] shevy: rails \o/ http://githubranking.com/
[12:02:57] shevy: javascript has... hmm... node angular... jquery... impress ... unsure about bootstrap, perhaps it can be counted among that as well
[12:03:19] shevy: I don't understand why facebook is so big
[12:03:23] [k-_: i have not used impress.js at all
[12:03:25] [k-_: is it nice
[12:04:54] shevy: I only used jquery so far. I like it... I can do super useless stuff such as dragging around images
[12:07:09] joonty: has joined #ruby
[12:07:23] yorickpeterse: https://github.com/YorickPeterse/oga/commit/bd48dc15cc26f4eb556068afaafd2ab18271d8d3 commit for the curious
[12:10:04] khebbie: has joined #ruby
[12:10:17] sfr^^: has joined #ruby
[12:11:49] ranchodev: has joined #ruby
[12:13:02] Kallis: has joined #ruby
[12:14:05] iateadonut: has joined #ruby
[12:19:13] Hrorek: has joined #ruby
[12:20:07] Ox0dea: J(10) + S(19) = 1019 * 2 == 2038
[12:20:09] Ox0dea: >> Time.at(2 ** 31).year
[12:20:10] ruboto: Ox0dea # => 2038 (https://eval.in/429374)
[12:20:12] Ox0dea: Coincidence? I think not.
[12:20:30] Ox0dea: JavaScript is the forever language.
[12:20:45] shevy: yeah. made easy as the monopoly
[12:20:54] Ox0dea: C'est la vie.
[12:21:05] Ox0dea: History is written by the people who got there first.
[12:21:47] jgt: has joined #ruby
[12:23:05] arup_r: has joined #ruby
[12:23:39] [k-: what is 10, what is 19, why is there 2
[12:24:02] [k-: you didn't even form 31!
[12:24:52] [k-: i miscounted
[12:24:56] Ox0dea: [k-: J is the 10th letter of the English alphabet, S the 19th.
[12:24:57] [k-: you did form 31
[12:26:07] Ox0dea: Here's why I chose 2 ** 31: https://en.wikipedia.org/wiki/Year_2038_problem
[12:26:21] shevy: will the world end in 2038?
[12:26:25] Ox0dea: Could do.
[12:26:31] shevy: will apeiros finish halsbe before 2038?
[12:26:31] centrx: has joined #ruby
[12:27:10] IrishGringo: has joined #ruby
[12:27:55] Igorshp: has joined #ruby
[12:28:12] aiRness: has joined #ruby
[12:28:35] centrx: has joined #ruby
[12:28:39] claw: has joined #ruby
[12:29:14] failshell: has joined #ruby
[12:29:55] aiRness: Hello. Is it possible tp move the "Rendered" logs to new relic for processing with the ruby agent? I'm planning to use lograge for the actual log files but I would like to have the "Rendeded" information to New Relic
[12:30:06] mike___1234: has joined #ruby
[12:30:14] zenguy_pc: has joined #ruby
[12:30:34] khebbie: has joined #ruby
[12:30:45] yorickpeterse: Rendered logs?
[12:31:58] Cust0sLim3n: has joined #ruby
[12:32:03] terlar: has joined #ruby
[12:34:43] benlovell: has joined #ruby
[12:35:14] shevy: if one loads several gems, some of which are somewhat big aka more than 100.000kb size as a .gem file, should one use require 'name_of_gem', or autoload() instead?
[12:35:54] jhass: don't autoload, the hassles are not worth it in 90% of the cases
[12:36:01] CloCkWeRX: has joined #ruby
[12:36:28] maloik: has joined #ruby
[12:37:06] rushed: has joined #ruby
[12:38:59] aiRness: yorickpeterse: "Rendered layouts/_assets.html.erb (2.0ms)" that kind of entries
[12:39:56] yorickpeterse: The Rails channel is probably better for Rails questions
[12:39:57] ruboto: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
[12:40:10] Zggb: has joined #ruby
[12:41:13] pandaant: has joined #ruby
[12:43:41] Rokko_11: has joined #ruby
[12:44:04] Rokko_11: hi! I've got a question about Ruby Syntax.
[12:44:15] jhass: that's great
[12:44:18] Rokko_11: config.vm.network :forwarded_port, guest: 3022, host: 8080
[12:44:34] Rokko_11: work, but my IDE shows me syntax-errors?
[12:44:45] jhass: because your IDE is stupid and/or ancient
[12:45:05] devoldmx: has joined #ruby
[12:45:11] jhass: that syntax got introduced in Ruby 1.9, which is by now not even in security maintenance anymore, that old is it
[12:45:14] Rokko_11: it's IntelliJ
[12:45:48] centrx: Rokko_11, Does it tell you what it thinks the syntax errors are?
[12:45:50] tkuchiki: has joined #ruby
[12:45:52] jhass: newer versions of RubyMine definitely recognize it, I'd have heard the complains before otherwise
[12:45:54] benlovell: Rokko_11: that's a vagrant file right? you need to turn on ruby syntax for that file
[12:46:13] Rokko_11: ok, thank you.
[12:46:33] akemrir: has joined #ruby
[12:47:41] workmad3: has joined #ruby
[12:48:53] joonty: has joined #ruby
[12:51:55] morenoh153: has joined #ruby
[12:52:50] claw: has joined #ruby
[12:55:36] ruurd: has joined #ruby
[12:56:23] moss: has joined #ruby
[12:57:19] f4cl3y: has joined #ruby
[12:59:11] krisquigley: has joined #ruby
[13:00:26] Scripore: has joined #ruby
[13:00:59] aiRness: yorickpeterse: ok
[13:01:03] aiRness: has left #ruby: ()
[13:01:16] joonty: has joined #ruby
[13:01:18] GreyHands: has joined #ruby
[13:04:29] sonOfRa: has joined #ruby
[13:05:01] victortyau: has joined #ruby
[13:06:15] bonhoeffer_: has joined #ruby
[13:06:34] tkuchiki: has joined #ruby
[13:10:36] bonhoeffer: has joined #ruby
[13:12:26] vmatiyko: has joined #ruby
[13:12:58] porfa: has joined #ruby
[13:14:37] Rollabunna: has joined #ruby
[13:15:17] znz_jp: has joined #ruby
[13:15:18] sonOfRa: Does anyone know of a kerberos interface that is actually updated? https://github.com/domcleal/rkerberos seems abandoned for the last 2 years
[13:15:19] sonOfRa: I don't really want to resort to having to call kpasswd via exec (especially since kpasswd is interactive and doesn't have a non-interactive mode)
[13:15:22] sonOfRa: sorry if that showed up twice, my VPN was acting up.
[13:15:39] prettiestPony11: has joined #ruby
[13:16:02] Konstruktionist: has joined #ruby
[13:16:51] tkuchiki: has joined #ruby
[13:17:48] khebbie: has joined #ruby
[13:19:23] dionysus69: has joined #ruby
[13:19:53] sonOfRa: And, in case I do have to fall back to calling kpasswd manually, what is a good way to work with interactive commands via ruby? Open3?
[13:24:34] Igorshp: has joined #ruby
[13:24:44] lxsameer: has joined #ruby
[13:25:16] maceto: has joined #ruby
[13:27:47] jgt: has joined #ruby
[13:29:21] Gnomethrower: has joined #ruby
[13:30:21] abyss: has joined #ruby
[13:31:34] otherj: has joined #ruby
[13:32:12] David27: has joined #ruby
[13:32:23] maceto: has joined #ruby
[13:32:53] ndrei: has joined #ruby
[13:32:53] otherj: has joined #ruby
[13:34:00] esauOp: has joined #ruby
[13:34:11] otherj: has joined #ruby
[13:34:47] maceto: has joined #ruby
[13:36:21] otherj: has joined #ruby
[13:37:39] krz: has joined #ruby
[13:37:59] alexUaN: has joined #ruby
[13:39:52] khebbie: has joined #ruby
[13:40:19] maceto: has joined #ruby
[13:40:25] alexUaN: Hi. How can I convert hash like this: {:a => "a", :b => ["b1", "b2"]} to query with index: "a=a&b[0]=b1&b[1]=b2" ?
[13:41:26] Guest66031: has joined #ruby
[13:41:41] charliesome: has joined #ruby
[13:42:04] grenierm: has joined #ruby
[13:44:19] claw: has joined #ruby
[13:44:42] decoponio: has joined #ruby
[13:44:55] Igorshp: has joined #ruby
[13:45:52] devoldmx: has joined #ruby
[13:45:54] Igorshp: has joined #ruby
[13:46:50] NeverDie: has joined #ruby
[13:48:06] abyss: I'd like to write some tool with receive some parameteres and do something with this params... Anyone knows any nice gem/library to ruby to handle it?
[13:48:08] bonhoeffer: has joined #ruby
[13:50:07] roxtrongo: has joined #ruby
[13:50:34] livcd: abyss: command line parameters?
[13:51:39] iamninja: has joined #ruby
[13:51:45] juanpablo____: has joined #ruby
[13:52:54] shevy: abyss optgetlong, and optionparser in stdlib; addons as in slop ... I think thor... and some others. And of course there is good old ARGV parsing yourself :)
[13:53:04] abyss: livcd: I think yes, but I am open to any ideas (how to make prof or so;)), can be even rest api, but yes, basicly command line parameters.
[13:53:11] shevy: get_opt_long actually... http://ruby-doc.org/stdlib-1.9.3/libdoc/getoptlong/rdoc/GetoptLong.html
[13:53:43] tmtwd: has joined #ruby
[13:53:46] shevy: https://github.com/leejarvis/slop
[13:53:50] abyss: shevy: thank you:)
[13:54:33] charliesome: has joined #ruby
[13:56:31] bronson: has joined #ruby
[13:56:35] ledestin: has joined #ruby
[13:57:39] Mekkis: has joined #ruby
[13:57:51] bigkevmcd: has joined #ruby
[13:57:57] catcher: has joined #ruby
[13:59:05] ebbflowgo: has joined #ruby
[14:00:48] CpuID: has joined #ruby
[14:01:17] moeabdol: has joined #ruby
[14:02:05] shapeshifter: has joined #ruby
[14:03:52] stardiviner: has joined #ruby
[14:04:01] Ropeney: has joined #ruby
[14:06:45] ljarvis: i heard slop is pretty okay
[14:07:01] ljarvis: also please dont use getoptlong
[14:07:05] juanpablo____: has joined #ruby
[14:07:17] chihhsin: has joined #ruby
[14:08:11] shadeslayer: has joined #ruby
[14:09:21] moeabdol: has joined #ruby
[14:09:28] jher: has joined #ruby
[14:09:59] pontiki: abyss: look at gems methadone and GLI, also do look at thor
[14:10:37] pontiki: they handle the option parsing stuff letting you get to the meat of your tool
[14:10:55] yosafbridge: has joined #ruby
[14:11:03] ebbflowgo: has joined #ruby
[14:11:12] infernix: has joined #ruby
[14:12:52] jhass: ?cookie ljarvis
[14:12:52] ruboto: ljarvis, here's your cookie: ????
[14:13:50] Swappticon: has joined #ruby
[14:13:53] ljarvis: ?cake jhass
[14:13:53] ruboto: jhass, here's your cake: ????
[14:14:08] Soda: has joined #ruby
[14:14:17] tkuchiki: has joined #ruby
[14:14:31] jhass: how generous, thank you!
[14:15:08] pontiki: huh, it worked
[14:15:18] platzhirsch: Emojis in IRC
[14:15:21] platzhirsch: the end is nigh
[14:16:43] shevy: platzhirsch only when you have unicode
[14:16:56] platzhirsch: Why shouldn't I? I was born 1988
[14:16:59] kent\n: has joined #ruby
[14:17:01] g3funk: has joined #ruby
[14:17:27] platzhirsch: so one year after Unicode was born
[14:17:58] pontiki: it was in the human DNA code by then
[14:18:37] pontiki: those of us born earlier have had to get along with implants
[14:18:57] northfurr: has joined #ruby
[14:19:06] pontiki: i am still missing the one for these new emoji
[14:20:22] shevy: 4chan implants ready!
[14:26:12] mistnim: has joined #ruby
[14:26:43] charliesome: has joined #ruby
[14:26:46] arup_r: shevy: Do your cat make friendship with rats ?
[14:26:50] rbennacer: has joined #ruby
[14:27:14] bazbing80: has joined #ruby
[14:28:28] chills42_: has joined #ruby
[14:29:17] mistnim: hello, let's say that at some spot in my program I need to check multiples if the objects in an array are all the same. Should I make a method (all_same? array) or extend Enumerable with that method? What is reccomended?
[14:29:56] moeabdol: has joined #ruby
[14:30:02] failshell: has joined #ruby
[14:30:05] pontiki: could use all?
[14:30:20] saddad: has joined #ruby
[14:30:33] s00pcan: has joined #ruby
[14:30:33] shevy: arup_r nope, it's fight to death. nearby there are no rats though, mostly just small mice (save for the sewers but the cat can not go there)
[14:30:35] mistnim: pontiki all? needs a block
[14:30:40] pontiki: array.all?{|i| i == array[0]} or some monstrousity
[14:30:55] pontiki: and? that's the wonderfulness of it
[14:30:59] shevy: mistnim if you have to re-use this then you should put it into a method
[14:31:07] mistnim: pontiki yes that I would use in the method
[14:31:15] Scripore: has joined #ruby
[14:31:20] blackjid: has joined #ruby
[14:31:30] mistnim: ok, but should the method be in Enumerable or by itself?
[14:31:59] shevy: by itself
[14:32:00] pontiki: how many different object types do you need to use it on?
[14:32:18] mistnim: just Array
[14:32:24] pontiki: all Arrays?
[14:33:09] pontiki: then extend Array
[14:34:27] daum: has joined #ruby
[14:35:20] skullcrasher: has joined #ruby
[14:35:25] noethics: has joined #ruby
[14:35:26] tkuchiki: has joined #ruby
[14:35:29] rodfersou: has joined #ruby
[14:35:45] Musashi007: has joined #ruby
[14:37:27] mistnim: I have some problems to figure out how to organize a program. Where should I put the code to extend Array? It's just required by a class
[14:38:25] shevy: simplest way is to load the file where it is required
[14:38:44] shevy: now you can either put that code into the same file, or you put it into a separate .rb and load that .rb file then
[14:39:50] mistnim: shevy, but still that extension is going to be avialable to all the program after it's loaded right?
[14:40:36] phutchins: has joined #ruby
[14:40:46] pontiki: yes, mistnim
[14:41:12] morenoh153: has joined #ruby
[14:41:37] pontiki: the question is will it be needed someplace before that specific class; if so, you should probably put it in it's own file, and make sure it gets loaded early
[14:42:24] mistnim: well it's not needed, but I guess it won't hurt, I suppose there is no way to isolate it only for the class in any case
[14:42:36] i: has joined #ruby
[14:42:43] pontiki: when i asked "all Arrays" what did you think I meant?
[14:43:21] ljarvis: fuck off Rails' collection #take
[14:43:29] hydra___: has joined #ruby
[14:43:38] acke: has joined #ruby
[14:43:45] rushed: has joined #ruby
[14:43:53] dopie: has joined #ruby
[14:44:04] hydra___: How should I pin a package to specific version using gem?
[14:44:18] shevy: mistnim if you extend a core class then yes, if you load the code into other .rb files
[14:44:21] hydra___: (before installing it)
[14:48:12] yozier: has joined #ruby
[14:48:52] yozier: how an I match "foo_hi" but not"foo_hi$" ?
[14:49:34] centrx: /foo_hi[^$]/ ?
[14:51:00] khebbie: has joined #ruby
[14:51:05] charliesome: has joined #ruby
[14:51:17] David27: has joined #ruby
[14:52:34] Oog: has joined #ruby
[14:52:35] mistnim: in any case if a class needs a simple generic method, that is clearly not part of the class itself, I can put it on the class.rb file, or require it from there. But I still don't like it that these methods leaks through other parts of the program.
[14:53:49] jhack: has joined #ruby
[14:53:55] centrx: mistnim, use refinements
[14:54:04] daum: has left #ruby: ("Leaving")
[14:54:39] JDiPierro: has joined #ruby
[14:54:47] mistnim: centrx, ok, I didn't know, I'll check that out
[14:59:28] izzol: hmm, how to add one zero to the integer? So lets say I have 1 and I wan't to iterate over: 1, 10, 100, 1000, 10000 and so on.
[15:00:12] mistnim: centrx, it says you can use them only at the top-level, not in classes
[15:00:29] krz: has joined #ruby
[15:00:48] mistnim: izzol i *= 10?
[15:01:34] northfurr: has joined #ruby
[15:02:04] izzol: mistnim: right ;-) thank!
[15:02:34] centrx: mistnim, refinements are used per file with 'using', no?
[15:03:39] c0m0: has joined #ruby
[15:03:57] decoponio: has joined #ruby
[15:05:15] Alina-malina: has joined #ruby
[15:05:44] jhack: has joined #ruby
[15:05:52] livcd: ot: is there some general chan for discussion about everything ?
[15:06:11] centrx: livcd, What kind of everything?
[15:06:41] livcd: centrx: general discussion about anything :D...i have a moral dilema
[15:06:58] ljarvis: livcd: #ruby-offtopic
[15:07:04] Musashi007: has joined #ruby
[15:07:09] centrx: livcd, There's also ##defocus
[15:07:18] livcd: thanks defocus it is
[15:09:09] leitz: has joined #ruby
[15:10:06] leitz: Ruby 1.8, using JSON. How do you handle a JSON.parse if the file might be empty?
[15:10:56] centrx: leitz, What's the result supposed to be? Make it an empty hash?
[15:11:52] leitz: centrx, yes. If the file contains JSON load it into a hash. Otherwise create and empty hash.
[15:12:16] northfurr: has joined #ruby
[15:12:25] centrx: leitz, Yeah I would just do that, if str.empty? then return {}
[15:12:32] workmad3: has joined #ruby
[15:12:42] leitz: Also, for the record, this is a fun programming thing. I'm happier with guidance than fully devloped answers.
[15:13:03] Azure: has joined #ruby
[15:14:24] leitz: Line 24. https://gist.github.com/LeamHall/39925425c61dc4e19c80
[15:15:30] Rollabunna: has joined #ruby
[15:15:58] leitz: The simple way would be to test for file length. However, I'm using JSON a bit and need to figure out a good test for "is this file in JSON format" and what to do if it is not.
[15:16:57] yqt: has joined #ruby
[15:17:07] khebbie: has joined #ruby
[15:17:25] centrx: leitz, Isn't "file" a string representing the filename?
[15:17:38] ljarvis: leitz: the second question is the important one imo. Also, if it doesn't exist you just create an empty one, which seems not ideal. Why not dump an empty JSON hash in so you know it's ready to be valid for input?
[15:17:54] ljarvis: also good eye centrx
[15:19:01] centrx: thanks lj
[15:19:20] dagda1: has joined #ruby
[15:19:30] charliesome: has joined #ruby
[15:20:01] UtkarshRay: has joined #ruby
[15:20:04] maceto: has joined #ruby
[15:20:39] Igorshp: has joined #ruby
[15:21:24] JDiPierro: has joined #ruby
[15:21:42] last_staff: has joined #ruby
[15:23:52] charliesome: has joined #ruby
[15:24:31] Renich: has joined #ruby
[15:25:15] tmtwd: has joined #ruby
[15:26:17] tejasmanohar: has joined #ruby
[15:26:48] havenwood: has joined #ruby
[15:27:02] s00pcan: has joined #ruby
[15:28:19] maceto: has joined #ruby
[15:30:44] failshell: has joined #ruby
[15:30:59] tkuchiki: has joined #ruby
[15:31:23] pushpak: has joined #ruby
[15:33:59] Pisuke: has joined #ruby
[15:35:12] The_Phoenix: has joined #ruby
[15:35:17] tvon: has joined #ruby
[15:35:30] leitz: Ah, I'm coyping lines from something else I wrote and missed that line.
[15:35:52] sepp2k: has joined #ruby
[15:35:54] ndrei: has joined #ruby
[15:36:28] charliesome: has joined #ruby
[15:39:41] shevy: copy/pasting is harder than it looks like!
[15:39:56] leitz: Hehe...actually, I'm typing by hand. Helps me learn.
[15:41:57] porfa: has joined #ruby
[15:41:58] grenierm: has joined #ruby
[15:42:08] s00pcan: has joined #ruby
[15:42:42] eosinx: has joined #ruby
[15:43:34] maceto: has joined #ruby
[15:44:02] leitz: The bottom answer on this looks good, but it means the file is getting parsed twice. Not a critical issue with this program, but still an annoyance. http://stackoverflow.com/questions/26232909/checking-if-a-string-is-valid-json-before-trying-to-parse-it
[15:44:25] cornerma1: has joined #ruby
[15:44:27] rippa: has joined #ruby
[15:45:10] otherj: has joined #ruby
[15:46:04] chills42: has joined #ruby
[15:46:22] Papierkorb: leitz: do you only care if it could be JSON (like the file utility), or do you want to be sure?
[15:46:32] otherj: has joined #ruby
[15:46:45] devoldmx: has joined #ruby
[15:47:04] phreakocious: has joined #ruby
[15:47:19] leitz: Papierkorb, pure JSON. Down the road I'll move to MongoDB for datastorage.
[15:48:02] otherj: has joined #ruby
[15:49:08] otherj: has joined #ruby
[15:49:18] rippa: has joined #ruby
[15:49:47] faces: has joined #ruby
[15:50:28] maceto: has joined #ruby
[15:50:38] darix: that rescue parse error is the best
[15:50:56] darix: it saves you from parsing twice
[15:51:43] poguez_: has joined #ruby
[15:52:03] JDiPierro: has joined #ruby
[15:52:33] iamninja: has joined #ruby
[15:55:30] Jardayn: has joined #ruby
[15:55:54] dmr8: has joined #ruby
[15:55:55] s00pcan: has joined #ruby
[15:56:34] n008f4g_: has joined #ruby
[15:57:12] morenoh153: has joined #ruby
[15:57:43] houhoulis: has joined #ruby
[15:57:49] sdothum: has joined #ruby
[16:01:57] eosinx: Does it makes sense to run an open source ERP to run your personal household?
[16:02:53] eosinx: Oops, wrong channel
[16:04:12] mkosaki: has joined #ruby
[16:05:02] ascarter: has joined #ruby
[16:05:45] prettiestPony11: has joined #ruby
[16:05:56] darix: eosinx: if you have to ask, of course it makes sense. because there is no such thing as overkill.
[16:07:32] ekleog: has joined #ruby
[16:08:04] riotjones: has joined #ruby
[16:08:25] Papierkorb: eosinx: I agree with darix. Using a complete ERP suite will make sure that while you scale your household, your solution will scale with you effortless. This way, you can keep focusing on what matters, and not on learning new tools all the time
[16:09:39] Rakunh0: has joined #ruby
[16:10:09] shevy: we need more kickass stuff written in ruby
[16:10:25] darix: shevy: like a replacement for roundcube mail
[16:10:28] darix: or tt-rss
[16:10:42] eosinx: darix, Papierkorb: thx guys, do you use one?
[16:11:14] s00pcan: has joined #ruby
[16:11:15] Papierkorb: eosinx: While my second name is Overkill, no, I'm not insane :)
[16:11:22] Papierkorb: in fact, I had to google ERP
[16:12:01] darix: eosinx: when you visit your doctor the next time. please let them check your sarcasm detector
[16:12:03] SCHAAP137: has joined #ruby
[16:12:03] SCHAAP137: has joined #ruby
[16:12:08] shevy: darix I don't even... oh... is that a mail thing in the browser?
[16:12:09] rbennacer: has joined #ruby
[16:12:25] davedev24: has joined #ruby
[16:12:27] darix: eosinx: you want just some simple calendar/contact sharing between devices?
[16:12:27] Papierkorb: shevy: yeah, roundcube is actually a quite good webmail client
[16:12:34] darix: look at things like balaika
[16:12:50] darix: shevy: it is one of the better opensource web mail tools
[16:13:27] darix: sorry baikal: http://baikal-server.com/
[16:13:47] darix: carddav/caldav server in ruby would be nice to have as part of it
[16:14:37] krz: has joined #ruby
[16:14:57] prasselpikachu: has joined #ruby
[16:15:47] aaeron: has joined #ruby
[16:15:58] eosinx: darix: no, I want a running purchase/inventory system
[16:15:59] jgt: has joined #ruby
[16:16:44] Papierkorb: I use StickyNotes 2.0
[16:19:23] Rakunh0: has joined #ruby
[16:21:11] maceto: has left #ruby: ()
[16:21:19] autrilla: has joined #ruby
[16:21:35] xcesariox: has joined #ruby
[16:21:50] khebbie: has joined #ruby
[16:22:24] sepp2k: has joined #ruby
[16:22:44] Stany: has joined #ruby
[16:25:43] mleung: has joined #ruby
[16:27:12] s00pcan: has joined #ruby
[16:27:28] [H]unt3r: has joined #ruby
[16:27:56] yardenbar: has joined #ruby
[16:28:15] chills42: has joined #ruby
[16:28:34] Musashi007: has joined #ruby
[16:30:01] youngbaks: has joined #ruby
[16:30:35] ruurd: has joined #ruby
[16:33:12] TomyLobo: has joined #ruby
[16:34:35] mleung: has joined #ruby
[16:35:57] DLSteve: has joined #ruby
[16:36:06] Swappticon: has joined #ruby
[16:39:14] Rurik: has joined #ruby
[16:41:03] ruurd: has joined #ruby
[16:42:11] allcentury: has joined #ruby
[16:42:57] arup_r: has joined #ruby
[16:45:20] roshanavand: has joined #ruby
[16:45:25] rbennacer: has joined #ruby
[16:46:04] Rurik: has joined #ruby
[16:46:13] jas02: has joined #ruby
[16:46:39] symm-: has joined #ruby
[16:46:46] banister: has joined #ruby
[16:50:32] nlsun: has joined #ruby
[16:52:21] eGGsha: has joined #ruby
[16:52:54] yfeldblum: has joined #ruby
[16:54:40] psye: has joined #ruby
[16:55:11] j4d: has joined #ruby
[16:55:26] eosinx: has joined #ruby
[16:55:39] esauOp: has joined #ruby
[16:55:39] chouhoulis: has joined #ruby
[16:57:13] prettiestPony11: has joined #ruby
[16:57:19] rakm: has joined #ruby
[16:58:55] alphaatom: has joined #ruby
[16:59:07] kirun: has joined #ruby
[17:00:38] Hrorek: has joined #ruby
[17:01:27] ruurd: has joined #ruby
[17:02:04] petricore: has joined #ruby
[17:02:49] Maletor: has joined #ruby
[17:03:28] iamninja: has joined #ruby
[17:03:52] Maletor: has joined #ruby
[17:05:38] ruurd_: has joined #ruby
[17:05:52] aaeron: has joined #ruby
[17:06:38] phutchins: has joined #ruby
[17:07:25] arooni-mobile: has joined #ruby
[17:07:44] northfurr_: has joined #ruby
[17:09:22] Torrieri: has joined #ruby
[17:09:32] Ketchy: has joined #ruby
[17:09:39] eosinx: has left #ruby: ()
[17:10:00] allcentury: has joined #ruby
[17:10:10] drewvanstone: has joined #ruby
[17:10:34] wpp: has joined #ruby
[17:10:54] khebbie: has joined #ruby
[17:11:50] mary5030: has joined #ruby
[17:13:19] chouhoulis: has joined #ruby
[17:14:57] JDiPierro: has joined #ruby
[17:15:37] lkba: has joined #ruby
[17:15:49] mary5030: has joined #ruby
[17:16:03] baweaver: has joined #ruby
[17:16:23] Rollabunna: has joined #ruby
[17:16:43] failshell: has joined #ruby
[17:17:37] chills42: has joined #ruby
[17:17:50] davedev24: has joined #ruby
[17:18:26] Queeniebee: has joined #ruby
[17:19:01] swgillespie: has joined #ruby
[17:19:34] shevy: sticky nose
[17:19:40] vmatiyko: has joined #ruby
[17:22:41] baweaver: shevy: http://www.6dollarshirts.com/teetime
[17:24:12] sundhell: has joined #ruby
[17:24:25] Rurik: has joined #ruby
[17:24:58] Torrieri: has joined #ruby
[17:24:59] Torrieri: has joined #ruby
[17:25:14] miah: never need to buy t-shirts as convensions, companies, and work generally have me overflowing with them
[17:25:22] miah: we started making rugs out of them
[17:25:59] rbennacer: has joined #ruby
[17:28:08] s00pcan: has joined #ruby
[17:28:25] northfurr: has joined #ruby
[17:29:05] shevy: baweaver lol
[17:29:17] shevy: and how much they smile
[17:30:17] JDiPierro: has joined #ruby
[17:30:33] gambl0re: has joined #ruby
[17:30:53] yfeldblum: has joined #ruby
[17:32:29] Meow-J: has joined #ruby
[17:33:49] emba: has joined #ruby
[17:33:55] hololeap: has joined #ruby
[17:34:50] yfeldblum: has joined #ruby
[17:34:51] dgutierrez1287: has joined #ruby
[17:35:37] joonty: has joined #ruby
[17:36:06] acke: has joined #ruby
[17:36:51] Zamerick: has joined #ruby
[17:37:12] khebbie_: has joined #ruby
[17:37:48] yfeldblum: has joined #ruby
[17:38:16] Swappticon: has joined #ruby
[17:38:31] s00pcan: has joined #ruby
[17:38:39] HAL2328: has joined #ruby
[17:39:07] juanpablo____: has joined #ruby
[17:39:42] khebbie: has joined #ruby
[17:40:40] naftilos76: has joined #ruby
[17:41:54] shevy: yo certainty
[17:43:13] kinduff: has joined #ruby
[17:43:51] Soda: has joined #ruby
[17:44:55] ruurd: has joined #ruby
[17:45:18] [k-_: it is certain that certainty certainly greeted shevy in that certain manner
[17:47:22] devoldmx: has joined #ruby
[17:47:25] FATZOMBI: has joined #ruby
[17:48:15] platzhirsch: Who's on OS X?
[17:48:20] jgt: has joined #ruby
[17:49:26] fedexo: has joined #ruby
[17:49:28] adaedra: is that a survey or do you have a question?
[17:49:55] Stalkr_: has joined #ruby
[17:50:48] dionysus69: has joined #ruby
[17:52:32] claw: has joined #ruby
[17:53:09] JDiPierro: has joined #ruby
[17:54:16] FATZOMBI: has left #ruby: ("Leaving")
[17:54:45] krisquigley: has joined #ruby
[17:55:06] havenwood: platzhirsch: I'm on OS X at the moment.
[17:55:24] platzhirsch: I always thought OS X is a great alterantive OS-wise if you want to stay *ix'ish
[17:55:40] havenwood: platzhirsch: FreeBSD-like.
[17:55:41] go|dfish: has joined #ruby
[17:56:03] havenwood: With a dash of NetBSD.
[17:56:12] leafybasil: has joined #ruby
[17:57:52] AlexAltea: has joined #ruby
[17:58:05] havenwood: ??? Ships with Ruby.
[17:59:10] ponga: platzhirsch: OSX too
[17:59:33] Rurik: OSX ships with Ruby?
[17:59:45] Soda: has joined #ruby
[17:59:51] ponga: Rurik: IIRC its some environment used ruby
[17:59:59] ponga: it also ships with python too
[18:00:04] swgillespie: has joined #ruby
[18:00:24] Rurik: Linux distros mostly ship with python
[18:00:37] iszak: has joined #ruby
[18:00:38] iszak: has joined #ruby
[18:00:43] ponga: my only linux distro is EOS at the moment, haven't checked that yet
[18:00:44] havenwood: Rurik: It also ships with macruby, which Apple developed.
[18:00:51] ponga: I only use my Linux Distro to play kerbal space program
[18:02:25] ponga: what's the consensus of ruby 3.0 will be static? is it plausible?
[18:02:28] havenwood: And macruby's successor, RubyMotion, just got a free starter edition.
[18:02:54] ponga: haven, really? i didn't know that
[18:02:58] spider-mario: has joined #ruby
[18:03:01] bluOxigen: has joined #ruby
[18:03:08] firstdayonthejob: has joined #ruby
[18:03:08] havenwood: http://www.rubymotion.com/news/2015/09/03/announcing-rubymotion-4-0-free-cross-platform-games-watchos-2-0.html
[18:03:58] ponga: already downloading
[18:04:08] adaedra: havenwood: mmh, I thought macruby was discontinued, it's still shipped?
[18:07:16] apt-get: has joined #ruby
[18:08:08] stuartb: has joined #ruby
[18:09:00] platzhirsch: has left #ruby: ()
[18:09:27] havenwood: adaedra: Yeah, just checked on another machine and it doesn't seem to be default installed any longer. That makes sense with RubyMotion replacing it and Laurent not working at Apple.
[18:09:51] ht__: has joined #ruby
[18:09:51] havenwood: adaedra: I thought it still was but you're right.
[18:10:13] rehat: has joined #ruby
[18:11:28] eosinx: has joined #ruby
[18:13:17] vmatiyko: has joined #ruby
[18:14:19] fantazo: has joined #ruby
[18:15:43] blue_deref: has joined #ruby
[18:17:13] roxtrongo: has joined #ruby
[18:17:33] Lycanii: has joined #ruby
[18:19:13] axisys_: has joined #ruby
[18:19:51] dfockler: has joined #ruby
[18:21:17] Hanmac1: has joined #ruby
[18:24:14] pyon: has joined #ruby
[18:24:25] Swappticon: has joined #ruby
[18:24:29] Umeaboy: has joined #ruby
[18:25:58] nofxx: has joined #ruby
[18:26:35] mclee_: has joined #ruby
[18:27:23] ohaibbq: has joined #ruby
[18:28:53] DmitryBochkarev: has joined #ruby
[18:30:06] Jackneill: has joined #ruby
[18:30:37] saransh__: has joined #ruby
[18:30:56] saransh__: I am developing a theme in jekyll
[18:31:12] yardenbar: has joined #ruby
[18:31:27] atmosx: Rurik: yes it does, but I wouldn't use it
[18:31:47] saransh__: In the default layout file, I have placed footer outside the body but it gets rendered in the body
[18:31:49] saransh__: http://pastebin.com/DrVXT5W8
[18:31:49] ruboto: saransh__, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/bfd93e9058dddcdea765
[18:31:49] ruboto: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[18:32:50] saransh__: any idea how to render footer outside of body?
[18:33:34] bootstrappm: has joined #ruby
[18:34:22] Umeaboy: has joined #ruby
[18:34:47] jhass: there's a #jekyll
[18:35:03] pontiki: has joined #ruby
[18:35:21] pranny: has joined #ruby
[18:35:30] jhass: btw afaik the only valid descendants from <html> are <head> and <body>
[18:35:47] jhass: so that doesn't make a whole lot of sense either way
[18:35:52] pipework: saransh__: Why do you think you want the footer outside of the body?
[18:36:21] saransh__: <pipework>: I have a lot of pages, some does not use 100% height
[18:36:38] saransh__: so, i need footer outside of body
[18:36:39] pipework: saransh__: That's the concern of stylesheets, not the structure of your document.
[18:37:17] jhass: so #css ;P
[18:37:27] felixr: has joined #ruby
[18:37:38] saransh__: <pipework>: I also want to know, how can we do it?
[18:37:39] felixrsmith: has joined #ruby
[18:37:52] pipework: saransh__: Usually by googling, "css footer bottom"
[18:38:19] saransh__: <pipework>: in jekyll theme, how to get footer outside of body?
[18:38:22] pontiki: in particular, "sticky footer"
[18:38:27] chouhoul_: has joined #ruby
[18:38:34] pipework: saransh__: Google "css footer bottom"
[18:38:34] platzhirsch: has joined #ruby
[18:38:39] pglombardo: has joined #ruby
[18:38:48] pipework: There is no "outside of the body" you only have the body.
[18:41:22] pipework: saransh__: You may need to end up changing your stylesheet if styles are applied to the body element or overriding the attributes the footer inherits from the body if you can't change the stylesheet entirely.
[18:41:34] jhass: <html><head></head><body><header></header><section></section><footer></footer></body></html>
[18:41:55] pontiki: <article> feels left out :(
[18:41:59] pipework: psh, no hgroup?
[18:41:59] codecop: has joined #ruby
[18:42:08] saransh__: i have used sticky footer
[18:43:01] saransh__: I was not able to figure out, how can we make these modifications with in jekyll
[18:43:31] pontiki: it has absolutely nothing to do with jekyll, or with ruby. go learn html and css, they are separate knowledge domains
[18:44:04] saransh__: yes, guys. I get that, thanks :)
[18:46:00] krz: has joined #ruby
[18:46:25] jgt: has joined #ruby
[18:46:51] iszak: has joined #ruby
[18:46:51] iszak: has joined #ruby
[18:47:47] segfalt: has joined #ruby
[18:52:21] Rurik: has joined #ruby
[18:53:04] yasha0x80: has joined #ruby
[18:53:20] gregf: has joined #ruby
[18:54:08] Swappticon: has joined #ruby
[18:54:58] yardenbar: has joined #ruby
[18:57:22] iszak: has joined #ruby
[18:58:11] craysiii: has joined #ruby
[18:58:14] radgeRayden: has joined #ruby
[18:59:52] saddad: has joined #ruby
[19:00:28] dagda1: has joined #ruby
[19:00:46] banjara: has joined #ruby
[19:01:18] toretore: has joined #ruby
[19:03:04] Musashi007: has joined #ruby
[19:03:16] platzhirsch: has left #ruby: ()
[19:03:53] dopie: has joined #ruby
[19:05:38] houhoulis: has joined #ruby
[19:06:24] c355E3B: has joined #ruby
[19:07:10] paracr4ck: has joined #ruby
[19:09:05] esauOp: has joined #ruby
[19:09:23] Swappticon: has joined #ruby
[19:09:30] duoi: has joined #ruby
[19:10:21] djbkd: has joined #ruby
[19:10:25] flaf: has joined #ruby
[19:12:37] sepp2k1: has joined #ruby
[19:14:14] iszak: has joined #ruby
[19:14:21] flaf: Hi, I have a hash variable h1 where keys are strings and values are array of strings or hashes of strings (for keys and values). With h2 = h1.clone, can I be sure that h1 and h2 are completely ???independant????
[19:14:27] leafybasil: has joined #ruby
[19:14:46] Pupeno: has joined #ruby
[19:14:57] esauOp_: has joined #ruby
[19:15:13] toretore: the clone will only apply to the hash itself, not its keys and values
[19:15:41] toretore: so if you go h1.keys[0].upcase!, that will affect both h1 and h2
[19:16:03] toretore: or h1['array'] << value
[19:16:08] toretore: the array is the same
[19:16:26] flaf: Ah. So I'm not sure to understand the sense of h1.clone.
[19:16:45] toretore: it makes a copy of h1
[19:16:53] toretore: simple as that
[19:17:07] pipework: flaf: deep_clone/deep_dup/deep_copy are things.
[19:17:15] Torrieri: has joined #ruby
[19:17:16] Rollabunna: has joined #ruby
[19:17:18] pipework: Might wanna look them up in the googlenets.
[19:17:22] failshell: has joined #ruby
[19:17:27] flaf: Is it possible in my case to have h2 a copy completely independent of h1?
[19:17:45] toretore: >> h1 = {foo: 'bar'}; h2 = h1.clone; h2[:foo] = 'baz'; h1[:foo]
[19:17:46] ruboto: toretore # => "bar" (https://eval.in/429567)
[19:18:14] toretore: flaf: "completely independent" can mean a lot of things
[19:18:48] toretore: as pipework said, there are deep clone implementations that will probably do what you want
[19:18:52] flaf: toretore: any change in h1 doesn't change h2.
[19:19:07] toretore: again, "change" can mean many things
[19:19:16] flaf: ok deep clone is not standard, correct?
[19:19:30] workmad3: has joined #ruby
[19:19:44] toretore: "deep clone" can also mean many things
[19:19:57] toretore: it's not a simple problem with a simple solution
[19:20:07] rodfersou: has joined #ruby
[19:20:18] toretore: it's many different problems with many different solutions
[19:20:36] leafybasil: has joined #ruby
[19:20:37] iszak: has joined #ruby
[19:20:38] iszak: has joined #ruby
[19:20:39] flaf: toretore: yes I admit. In my case h1 is just a hash of strings/arrays of string/hash of strings/
[19:21:19] toretore: you'd be better off describing exactly what you're trying to do with real code
[19:21:43] toretore: then you'd get real suggestions that work for your exact case
[19:22:19] kjones_: has joined #ruby
[19:23:20] Cust0sLim3n: has joined #ruby
[19:23:53] Vile`: has joined #ruby
[19:25:24] futilegames: has joined #ruby
[19:26:59] minotep: has joined #ruby
[19:27:34] Vile`: has joined #ruby
[19:28:00] flaf: toretore: here is an example of hash http://paste.alacon.org/38111
[19:29:56] devbug: has joined #ruby
[19:30:02] toretore: flaf: and what's the reason you want to "deep clone" it?
[19:30:08] flaf: I have to have a ???clone??? of this hash (h2) and be able to change a value in h2 (not the structure, just a ???final??? value like the macaddress or an option etc. without change the state of h1.
[19:30:31] chipotle: has joined #ruby
[19:30:40] flaf: Oh, I will try to be more precise with this example...
[19:31:13] iszak: has joined #ruby
[19:31:13] iszak: has joined #ruby
[19:32:11] flaf: => http://paste.alacon.org/38112
[19:32:48] rickmasta: has joined #ruby
[19:32:57] segfalt: has joined #ruby
[19:32:57] roxtrongo: has joined #ruby
[19:33:13] flaf: I just want to ???clone??? this hash (h2) and just change/update the '__default__' strings in h2 but I want to keep interfaces (h1) unchanged.
[19:33:23] flaf: Is it clear?
[19:34:08] toretore: ok, that's good enough
[19:34:17] swgillespie: has joined #ruby
[19:34:18] toretore: a deep clone implementation would do that
[19:36:28] swgillespie: has joined #ruby
[19:36:48] flaf: Ok, so I need to install a ruby-gem, correct?
[19:38:00] newtonianb: has joined #ruby
[19:38:34] chills42: has joined #ruby
[19:38:42] toretore: flaf: http://paste.alacon.org/38113
[19:40:21] drikerf: has joined #ruby
[19:41:00] s00pcan: has joined #ruby
[19:42:29] nahtnam: has joined #ruby
[19:42:41] s00pcan: has joined #ruby
[19:43:06] prettiestPony11: has joined #ruby
[19:43:14] DLSteve: has joined #ruby
[19:43:15] veloutin: has joined #ruby
[19:43:25] flaf: toretore: thx, it works well. Now I will study this code. I think it will be useful for me for another things.
[19:43:51] drikerf: has joined #ruby
[19:45:01] shadeslayer: has joined #ruby
[19:45:06] iloverubynoob: has joined #ruby
[19:47:13] northfurr: has joined #ruby
[19:48:08] devoldmx: has joined #ruby
[19:48:09] chris2: in StringScanner, can i somehow see the char just before the position?
[19:50:24] arooni-mobile: has joined #ruby
[19:50:33] yqt: has joined #ruby
[19:51:44] toretore: you can do str[strscan.pos-1]
[19:52:20] veloutin: has joined #ruby
[19:52:26] Alina-malina: has joined #ruby
[19:55:13] ChanServ: -b *!*@*ip.168.1.99.198
[19:55:18] bootstrappm: has joined #ruby
[19:55:44] krisquigley: has joined #ruby
[19:56:43] VeryBewitching: has joined #ruby
[19:58:17] firstdayonthejob: has joined #ruby
[19:59:10] Ox0dea: toretore: No need to deep_dup the keys, for what it's worth.
[20:00:05] Ox0dea: >> s = 'abc'; foo = {s => s}; s << 'xyz'; foo
[20:00:06] ruboto: Ox0dea # => {"abc"=>"abcxyz"} (https://eval.in/429597)
[20:00:25] schaary: has joined #ruby
[20:00:27] devbug_: has joined #ruby
[20:01:00] Ox0dea: Well, never mind; keys can be arbitrarily complex.
[20:01:22] schaary: how can I detect the encoding of a file with ruby?
[20:01:44] Ox0dea: schaary: https://github.com/brianmario/charlock_holmes
[20:02:10] schaary: Ox0dea: thx
[20:02:14] Ox0dea: Sure thing.
[20:03:06] toretore: Ox0dea: in the sense that you'd have to rehash anyway, yeah
[20:03:48] khebbie: has joined #ruby
[20:03:51] Ox0dea: toretore: Mm-hmm. I tried to do something clever with #replace in order to generalize the thing, but yours is about as good as it'll get.
[20:04:32] tejasmanohar: has joined #ruby
[20:04:58] Torrieri: has joined #ruby
[20:05:16] Ox0dea: I realize BasicObject is supposed to be just that, but it seems a little odd that instances can't be hashed.
[20:05:33] zachk: has joined #ruby
[20:08:55] Alina-malina: has joined #ruby
[20:09:31] kamal2222ahmed: has joined #ruby
[20:10:43] Mendenhall: has joined #ruby
[20:11:04] n0xff: has joined #ruby
[20:13:05] flaf: toretore: thx again. I think I have well understood your function and it's perfect for my usage. As Ox0dea said, I think I can replace ???h[deep_dup(k)] = deep_dup(v)??? by just ???h[k.dup] = deep_dup(v)??? because, in my case, keys in hashes are always strings.
[20:14:13] workmad3: has joined #ruby
[20:14:56] toretore: you can probably skip the dup altogether
[20:15:17] toretore: deep_dup(str) will just do str.dup anyway
[20:15:30] stevednd: has joined #ruby
[20:15:35] flaf: Yes indeed.
[20:16:10] Ox0dea: >> h = {'foo'=>1, 'bar'=>2}; foo.keys.all?(&:frozen?) # flaf
[20:16:11] ruboto: Ox0dea # => undefined local variable or method `foo' for main:Object (NameError) ...check link for more (https://eval.in/429604)
[20:16:15] Ox0dea: >> h = {'foo'=>1, 'bar'=>2}; h.keys.all?(&:frozen?) # flaf
[20:16:16] ruboto: Ox0dea # => true (https://eval.in/429605)
[20:16:19] flaf: It's curious, here http://apidock.com/rails/Enumerable/each_with_object I can read ???This method is deprecated or moved on the latest stable version.???. Is it a mistake?
[20:17:02] Ox0dea: flaf: Ruby freezes Hash keys as of 2.1 or so, so they can't be modified without some trickery; thus, no need to dup.
[20:17:13] Ox0dea: Might even be 2.0, actually.
[20:18:05] Ox0dea: Since 1.8?!
[20:18:12] flaf: Ox0dea: oh sorry, your code it too tricky for me. I'm not a ruby expert. ;)
[20:18:20] Ox0dea: 18>> {'foo'=>1}.keys[0].frozen?
[20:18:21] ruboto: Ox0dea # => true (https://eval.in/429606)
[20:19:09] Ox0dea: flaf: Not sure why #each_with_object is marked as deprecated there; it's unlikely to go away any time soon.
[20:19:23] davedev24: has joined #ruby
[20:19:35] jhass: flaf: apidock is horrible, don't use it. Try devdocs.io
[20:19:43] Fr0Zn: has joined #ruby
[20:19:46] flaf: Ah ok, thx.
[20:19:55] bootstrappm: has joined #ruby
[20:20:10] jhass: Ox0dea: it's the rails docs, well, some version of it
[20:21:17] metalic: has joined #ruby
[20:21:20] Ox0dea: flaf: Hmm, which code was too tricky?
[20:21:32] dotix: has joined #ruby
[20:21:59] rbennacer: has joined #ruby
[20:22:28] flaf: Ox0dea: this => https://eval.in/429605 Too tricky for me ;)
[20:23:11] Ox0dea: flaf: Well, I trust you know what Hash#keys returns?
[20:23:40] flaf: Ah, yes, it's just to show me that keys in hashes are frozen, correct?
[20:23:46] Ox0dea: Nailed it.
[20:24:29] segfalt: has joined #ruby
[20:25:02] startupality: has joined #ruby
[20:25:11] acke: has joined #ruby
[20:25:40] futilegames_: has joined #ruby
[20:25:54] Torrieri: has joined #ruby
[20:25:54] Torrieri: has joined #ruby
[20:27:29] yasha0x80: has joined #ruby
[20:28:53] hololeap: has joined #ruby
[20:29:35] northfurr_: has joined #ruby
[20:31:27] yfeldblum: has joined #ruby
[20:32:52] Torrieri: has joined #ruby
[20:33:47] Alina-malina: has joined #ruby
[20:33:53] ruurd: has joined #ruby
[20:34:31] mike___1234: has joined #ruby
[20:35:18] porfa: has joined #ruby
[20:36:45] garethrees: has joined #ruby
[20:39:11] iamninja: has joined #ruby
[20:40:40] porfa: has joined #ruby
[20:40:41] rickmasta: has joined #ruby
[20:40:46] bonhoeffer: has joined #ruby
[20:41:05] leitz: has joined #ruby
[20:41:06] northfurr_: has joined #ruby
[20:42:26] ndrei: has joined #ruby
[20:43:02] chipotle: has joined #ruby
[20:43:26] jhack: has joined #ruby
[20:45:05] krisquigley: has joined #ruby
[20:46:47] leat: has joined #ruby
[20:48:57] aaeron: has joined #ruby
[20:48:57] northfurr_: has joined #ruby
[20:50:32] morenoh153: has joined #ruby
[20:51:03] northfurr_: has left #ruby: ()
[20:51:37] Ox0dea: [1,2,3].pack('?*') => 'ABC'
[20:51:41] Ox0dea: Should the ? be K or Y?
[20:52:15] Ox0dea: I need both cases, and those are the only options as of 2.3.
[20:53:07] rickmasta: has joined #ruby
[20:56:17] Limix: has joined #ruby
[20:58:14] otherj: has joined #ruby
[20:59:25] otherj: has joined #ruby
[21:00:38] otherj: has joined #ruby
[21:01:46] otherj: has joined #ruby
[21:02:59] otherj: has joined #ruby
[21:03:55] saddad: has joined #ruby
[21:04:33] tejasmanohar: has joined #ruby
[21:07:24] Torrieri: has joined #ruby
[21:07:24] Torrieri: has joined #ruby
[21:12:24] dgutierrez1287: has joined #ruby
[21:12:34] warreng: has joined #ruby
[21:18:10] Rollabunna: has joined #ruby
[21:18:15] ordepdev: has joined #ruby
[21:18:55] Xiti: has joined #ruby
[21:19:36] s00pcan: has joined #ruby
[21:21:20] AxonetBE: has joined #ruby
[21:24:22] blackmesa: has joined #ruby
[21:25:54] Rakunh0: has joined #ruby
[21:25:57] rickmasta: has joined #ruby
[21:26:50] dorei: what are the implications of defining a class inside another class ?
[21:27:52] dorei: i have a class X::A (class X under module A) and i want to create a class X::A::Conf and it seems the only way to do it is to define a class Conf inside class X::A
[21:27:59] ferz_: has joined #ruby
[21:28:56] sphex: has joined #ruby
[21:29:58] bruno-: has joined #ruby
[21:30:27] newtonianb: has joined #ruby
[21:30:43] morenoh153: is there a ruby way of getting all elements in an array from an index to the end?
[21:30:52] Ox0dea: dorei: If X and A exist, you can just open class X::A::Conf.
[21:31:15] craysiii: http://stackoverflow.com/questions/14739640/ruby-classes-within-classes-or-modules-within-modules
[21:31:28] Ox0dea: dorei: Mind, you probably meant A::X::Conf?
[21:31:56] Ox0dea: >> foo = [1, 2, 3, 4]; foo[1..-1] # morenoh153
[21:31:57] ruboto: Ox0dea # => [2, 3, 4] (https://eval.in/429608)
[21:32:15] Torrieri: has joined #ruby
[21:32:15] Torrieri: has joined #ruby
[21:32:41] lele: has joined #ruby
[21:34:24] tmtwd: has joined #ruby
[21:35:22] ordepdev: has joined #ruby
[21:35:24] vF3hNGxc47h8: has joined #ruby
[21:35:47] porfa: has joined #ruby
[21:40:29] lkba: has joined #ruby
[21:40:52] cashnguns: has joined #ruby
[21:41:17] ebbflowgo: has joined #ruby
[21:41:20] shellie_: has joined #ruby
[21:43:27] newtonianb: has joined #ruby
[21:43:34] tmtwd: has joined #ruby
[21:44:58] sepp2k: has joined #ruby
[21:48:00] yasha0x80: has joined #ruby
[21:48:54] devoldmx: has joined #ruby
[21:51:37] shinnya: has joined #ruby
[21:51:43] roxtrongo: has joined #ruby
[21:55:14] rodfersou: has joined #ruby
[21:58:03] morenoh153: Ox0dea: thanks
[21:58:27] morenoh153: any way to have a nested loop that starts from a given index? I want to build combinations
[21:58:29] Ox0dea: morenoh153: Sure thing. #[] and #[]= are quite powerful. Do make a note to look into other ways they can be used.
[21:59:13] Ox0dea: morenoh153: There is almost certainly a built-in method that does what you're trying to roll from scratch.
[21:59:45] Ox0dea: >> Array.instance_methods.grep(/ation/) # morenoh153
[21:59:46] ruboto: Ox0dea # => [:permutation, :combination, :repeated_permutation, :repeated_combination] (https://eval.in/429611)
[22:00:55] morenoh153: Ox0dea: very nice
[22:01:38] yasha0x80: has joined #ruby
[22:02:58] workmad3: has joined #ruby
[22:04:34] omgtora: has joined #ruby
[22:04:38] ruboto: Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[22:04:39] omgtora: http://i.imgur.com/iobJtA1.jpg
[22:04:44] omgtora: that comic is your
[22:04:51] omgtora: by you i mean #ruby
[22:05:34] ruboto: I don't know anything about topic
[22:05:54] omgtora: ?genderequality
[22:05:54] ruboto: I don't know anything about genderequality
[22:06:28] omgtora: equality doesnt mean you can claim a word is offensive because it's not "gender neutral" simply because of it's spelling
[22:06:29] ruboto: Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
[22:06:58] baweaver: !mute omgtora
[22:06:59] ruboto: +q omgtora!*@*
[22:06:59] ruboto: -o ruboto
[22:07:19] Jardayn: dem pesky trolls
[22:07:24] Jardayn: fucking with our channel
[22:07:37] baweaver: keep the meta in offtopic.
[22:08:35] rickmasta: has joined #ruby
[22:09:22] workmad3: has joined #ruby
[22:09:36] DeweyD: has joined #ruby
[22:09:55] iamninja: has joined #ruby
[22:09:58] firstdayonthejob: has joined #ruby
[22:10:11] rocknrollMarc: has joined #ruby
[22:10:22] guilhon: has joined #ruby
[22:10:50] Rakunh0: has joined #ruby
[22:11:52] guilhon: has left #ruby: ()
[22:11:59] veloutin: has joined #ruby
[22:12:18] chrisseaton: is there a way to run eval without creating a new lexical environment? so that variables bound in the eval are created in caller's environment?
[22:12:27] roxtrongo: has joined #ruby
[22:12:41] baweaver: class_eval and module_eval I believe
[22:12:52] chrisseaton: eg I want to do binding.eval("x = 14"); x and to have that work
[22:13:09] Ox0dea: chrisseaton: Even binding_of_caller can't introduce new locals, so no.
[22:13:26] baweaver: So why do you want to?
[22:13:37] baweaver: just use a hash
[22:13:56] chrisseaton: baweaver: it's not for a real program, it's an experiment
[22:14:12] baweaver: class and module evals are as close as you'll probably get.
[22:14:12] Ox0dea: chrisseaton: Are you aware that you can pass a Binding into #eval?
[22:14:26] Ox0dea: >> b = binding; eval 'x = 14', b; eval 'x', b
[22:14:27] ruboto: Ox0dea # => 14 (https://eval.in/429615)
[22:15:37] Musashi007: has joined #ruby
[22:15:39] nottora: has joined #ruby
[22:15:43] chrisseaton: ah that seems to do what I want
[22:15:44] nottora: I made it more applicable: http://imgur.com/064Y3TO
[22:15:58] baweaver: !mute nottora
[22:15:58] ruboto: +q nottora!*@*
[22:15:58] ruboto: -o ruboto
[22:16:06] chrisseaton: of course I can't reference the local statically - I have to use eval to read it - but actually that's fine for what I want to do - thanks very much!
[22:16:59] bonhoeffer: has joined #ruby
[22:17:08] morenoh153: any idea why this breaks down on input https://gist.github.com/morenoh149/6c450ddbafb96d617bee
[22:17:24] sphex: has joined #ruby
[22:17:48] ChanServ: +o baweaver
[22:17:49] morenoh153: added sample input
[22:17:50] Ox0dea: chrisseaton: For potential future reference: https://gist.github.com/0x0dea/24eb06e6b9b8cc8a9483
[22:18:44] Coldblackice: has joined #ruby
[22:18:57] chrisseaton: Ox0dea: thanks very much - I'm seeing what happens to performance if I replace every statement in a benchmark with the same thing but in #eval
[22:19:50] allcentury: has joined #ruby
[22:19:53] Ox0dea: chrisseaton: Expect dramatic impact.
[22:20:15] chrisseaton: Ox0dea: right, but I'm hoping to have a technique to remove that impact :)
[22:22:48] Ox0dea: morenoh153: Is this C?
[22:23:04] mblagden_: morenoh153: I believe you have some other code affecting this.. as written, I believe it would work fine
[22:23:23] hmsimha_: has joined #ruby
[22:23:39] mblagden_: i.e. sorted [1, 5, 3, 3, 7] would produce false
[22:24:36] Ox0dea: morenoh153: https://eval.in/429625
[22:24:46] Ox0dea: Your code is indeed fine, but it really needs to eat a sandwich or something.
[22:26:25] porfa: has joined #ruby
[22:26:49] Ox0dea: Could also use some standard library love.
[22:27:55] Rakunh0: has joined #ruby
[22:27:56] jonr22: has joined #ruby
[22:27:59] sdothum: has joined #ruby
[22:28:57] hydrozen: has joined #ruby
[22:29:33] morenoh153: has left #ruby: ()
[22:30:18] morenoh149: has joined #ruby
[22:30:30] havenwood: has joined #ruby
[22:30:58] morenoh149: Ox0dea: right. I'm not understanding ruby breaking out of if blocks. I want to, if temp is nil to set it and break out of the if to the next iteration of array.each
[22:31:34] Spami: has joined #ruby
[22:32:55] k3asd`: has joined #ruby
[22:33:21] Ox0dea: morenoh149: Is Ruby your first language?
[22:34:11] segfalt: has joined #ruby
[22:35:44] morenoh149: no I mostly do javascript
[22:40:08] Ox0dea: morenoh149: In any case, your method does do what it's supposed to, so you must be mutating the array somewhere.
[22:40:44] Ox0dea: For what it's worth, a much more idiomatic definition of #sorted might look something like this: `def sorted a; a.each_cons(2).all? { |x, y| x < y }; end`.
[22:41:01] Ox0dea: Make that <=, of course.
[22:41:09] ch0ke: has joined #ruby
[22:41:52] tno: has joined #ruby
[22:45:21] ham: has joined #ruby
[22:45:25] firstdayonthejob: has joined #ruby
[22:46:39] baweaver: Ox0dea: might make it take an optional block for arbitrary sort types
[22:46:57] firstdayonthejob: has joined #ruby
[22:47:56] aaeron: has joined #ruby
[22:48:23] shmilan: has joined #ruby
[22:52:40] Ox0dea: It'd be nice if comparisons could be chained.
[22:53:00] al2o3-cr: deop this minute
[22:53:14] Ox0dea: Then #sorted? could just be an alias for #reduce.
[22:53:26] stardiviner: has joined #ruby
[22:53:55] duoi: has joined #ruby
[22:54:08] firstdayonthejob: has joined #ruby
[22:54:40] kjones_: has joined #ruby
[22:54:59] firstdayonthejob: has joined #ruby
[22:55:16] Ox0dea: Is this a refinements bug? https://eval.in/429627
[22:55:30] pipework: Refinements isn't a bug? :D
[22:55:38] al2o3-cr: pry is good for checking aliases with `stat`
[22:55:38] Ox0dea: Motion sustained.
[22:56:16] startupality: has joined #ruby
[22:57:06] al2o3-cr: Wait, What Weechat 1.4-dev...
[22:57:13] pipework: Ox0dea: Is this all just an excuse to use :< in your code more?
[22:57:47] zeroDivisible: has joined #ruby
[22:58:10] Azure: has joined #ruby
[23:00:02] al2o3-cr: It's all about `this` nowadays haha
[23:00:15] platzhirsch: has joined #ruby
[23:00:34] amystephen: has joined #ruby
[23:00:38] platzhirsch: Ruby Rogues was a great podcast recommendation!
[23:01:54] bonhoeffer: has joined #ruby
[23:02:29] Pupeno: has joined #ruby
[23:02:52] Mendenhall: has left #ruby: ("WeeChat 1.0.1")
[23:03:08] al2o3-cr: platzhirsch: What is Ruby Rogues?
[23:03:38] platzhirsch: al2o3-cr: https://devchat.tv/ruby-rogues/
[23:03:59] mike___1234: has joined #ruby
[23:04:36] al2o3-cr: I seeded that before
[23:05:52] al2o3-cr: Someone teach me some shit
[23:05:58] petricore: has joined #ruby
[23:06:04] ruboto: this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
[23:07:02] bonhoeffer: has left #ruby: ()
[23:08:26] sevenseacat: has joined #ruby
[23:10:37] platzhirsch: is that a bot?
[23:10:47] theery: has joined #ruby
[23:10:56] ruboto: I don't know anything about bot
[23:11:05] ruboto: I don't know anything about whoami
[23:11:12] platzhirsch: No, are you al2o3-cr
[23:11:24] ruboto: I don't know anything about java
[23:11:31] ruboto: shevy is the hound of baskerville
[23:11:39] ruboto: I don't know anything about platzhirsch
[23:12:00] al2o3-cr: shevy got his own linker hee
[23:12:52] platzhirsch: shevy is the best
[23:13:12] al2o3-cr: you got that right :D
[23:13:47] cball: has joined #ruby
[23:18:48] Ox0dea: al2o3-cr: That's at least the second time I've seen you accused of being a bot. :P
[23:19:01] Rollabunna: has joined #ruby
[23:19:38] Ox0dea: pipework: :< is a pretty great method, but this particular usage was just a search for elegance.
[23:19:50] Ox0dea: #sorted? == #reduce is pretty sexy.
[23:20:00] Exponential: has joined #ruby
[23:20:57] allcentury: has joined #ruby
[23:23:34] kriskropd: has joined #ruby
[23:23:50] ebbflowgo: i'm having difficulties requiring the 'pg' gem using jruby
[23:23:51] ebbflowgo: https://gist.github.com/ebbflowgo/ec5c5c31c61aea295f57
[23:24:03] ebbflowgo: getting #NameError: uninitialized constant PG
[23:24:07] al2o3-cr: has joined #ruby
[23:24:40] ndrei: has joined #ruby
[23:24:46] Radar: ebbflowgo: Potentially due to using an older version of JRuby? *shrug* I don't know much about JRuby tbh
[23:25:04] Radar: Does say that it's compatible with that older version
[23:25:30] ebbflowgo: Radar: checking
[23:28:05] blue_deref: has joined #ruby
[23:28:13] jhack: has joined #ruby
[23:28:30] Musashi007: has joined #ruby
[23:28:32] juanpablo____: has joined #ruby
[23:29:58] shmilan: has joined #ruby
[23:30:16] ebbflowgo: Radar: might be a config issue, will look into it
[23:30:42] David27: has joined #ruby
[23:35:55] dfinninger: has joined #ruby
[23:36:50] CloCkWeRX: has joined #ruby
[23:36:51] CloCkWeRX: has left #ruby: ()
[23:36:53] OrbitalKitten: has joined #ruby
[23:37:25] veloutin: has joined #ruby
[23:38:03] LiquidInsect: has joined #ruby
[23:38:50] symm-: has joined #ruby
[23:39:49] meph: has joined #ruby
[23:42:20] platzhirsch: has joined #ruby
[23:45:22] VeryBewitching: has joined #ruby
[23:46:18] Swappticon: has joined #ruby
[23:47:17] rickmasta: has joined #ruby
[23:47:48] solocshaw: has joined #ruby
[23:48:08] ascarter: has joined #ruby
[23:49:38] devoldmx: has joined #ruby
[23:50:12] ascarter: has joined #ruby
[23:52:55] tsou: has joined #ruby
[23:54:46] ebbflowgo: headius: if you have a moment => https://gist.github.com/ebbflowgo/ec5c5c31c61aea295f57
[23:56:30] chipotle: has joined #ruby
[23:59:50] unreal: has joined #ruby